DP : Added TN visibility for GM

This commit is contained in:
Vlyan
2022-02-12 14:27:06 +01:00
parent 5bbec503ea
commit da788d47c7
9 changed files with 25 additions and 12 deletions

View File

@@ -9,6 +9,9 @@
- Notes : Techniques in sheet need to be re-imported from the compendium or manually updated for this to work.
- Compendiums :
- Techniques : Added difficulty and skill values (not all techniques).
- DicePicker :
- Added TN hidden difficulty visibility for GM.
- Added a selection for techniques with skill list.
Syntaxe quick explanation :
- Difficulty can be :

View File

@@ -106,7 +106,7 @@
"opportunities": "Opportunities",
"strife": "Strife",
"difficulty": "TN",
"difficulty_hidden": "TN ???",
"difficulty_hidden": "???",
"dicepicker": "Dice Picker",
"void_point_used": "Void point used",
"assistance_used": "Skill assistance used",

View File

@@ -106,7 +106,7 @@
"opportunities": "Oportunidades",
"strife": "Conflictos",
"difficulty": "NO",
"difficulty_hidden": "NO ???",
"difficulty_hidden": "???",
"dicepicker": "Dice Picker",
"void_point_used": "Punto de Vacío utilizado",
"assistance_used": "Asistencia de habilidad utilizada",

View File

@@ -106,7 +106,7 @@
"opportunities": "Aubaines",
"strife": "Conflits",
"difficulty": "ND",
"difficulty_hidden": "ND ???",
"difficulty_hidden": "???",
"dicepicker": "Dice Picker",
"void_point_used": "Point de vide utilisé",
"assistance_used": "Assistance de compétence utilisée",

View File

@@ -686,7 +686,7 @@ export class DicePickerDialog extends FormApplication {
// 2: "vigilance"
// 3: "max"
// 4: "statusRank"
const infos = difficulty.match(CONFIG.l5r5e.techniqueDifficulty);
const infos = difficulty.match(CONFIG.l5r5e.regex.techniqueDifficulty);
if (!infos) {
console.log("L5R5E | Fail to parse difficulty", difficulty);
return false;
@@ -721,12 +721,16 @@ export class DicePickerDialog extends FormApplication {
return false;
}
// Before difficultyHiddenIsLock
this.difficulty = difficulty;
// Hide npc stats on target
if (infos[1] === "T") {
this.difficultyHidden = true;
this._difficultyHiddenIsLock.option = true;
this.object.difficulty.targetTokenId = targetTokenId;
}
return true;
}
// finally

View File

@@ -231,6 +231,7 @@ export class RollnKeepDialog extends FormApplication {
return {
...super.getData(options),
isGM: game.user.isGM,
cssClass: this.options.classes.join(" "),
data: this.object,
l5r5e: this.roll.l5r5e,

View File

@@ -17,8 +17,8 @@
<article class="tab parts part0" data-group="primary" data-tab="part0">
<h1>{{localize 'l5r5e.twenty_questions.title'}}</h1>
{{localize 'l5r5e.twenty_questions.part0.intro'}}
<br />
<br />
<br>
<br>
<label>
{{localize 'l5r5e.twenty_questions.part0.type'}}
<select name="template" class="skill-select">
@@ -29,8 +29,8 @@
{{/select}}
</select>
</label>
<br />
<br />
<br>
<br>
<i>{{localize (localize 'l5r5e.twenty_questions.part0.section{suffix}' suffix=suffix)}}</i>
<button class="next" name="next" type="button">{{localize 'l5r5e.twenty_questions.bt_next'}} <i class='fas fa-arrow-right'></i></button>
</article>

View File

@@ -22,7 +22,7 @@
<span class="chat-profil-element">
{{#if l5r5e.difficultyHidden}}
{{localize 'l5r5e.chatdices.difficulty_hidden'}}
{{localize 'l5r5e.chatdices.difficulty'}} {{localize 'l5r5e.chatdices.difficulty_hidden'}}
{{else}}
{{localize 'l5r5e.chatdices.difficulty'}} {{l5r5e.difficulty}}
{{/if}}

View File

@@ -16,12 +16,17 @@
{{/if}}
</li>
<li class="chat-profil-element">
{{localize 'l5r5e.chatdices.difficulty'}}
{{#if l5r5e.difficultyHidden}}
{{localize 'l5r5e.chatdices.difficulty_hidden'}}
{{#if isGM}}
?{{l5r5e.difficulty}}?
{{else}}
{{localize 'l5r5e.chatdices.difficulty'}} {{l5r5e.difficulty}}
{{localize 'l5r5e.chatdices.difficulty_hidden'}}
{{/if}}
<br />
{{else}}
{{l5r5e.difficulty}}
{{/if}}
<br>
{{#if l5r5e.voidPointUsed}}
<i class="i_void" title="{{localize 'l5r5e.chatdices.void_point_used'}}"></i>
{{/if}}