From ddd0a1f1c02e5520ad5953c2489acde4fc8262f5 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Mon, 4 Jan 2021 14:06:35 +0100 Subject: [PATCH] =?UTF-8?q?=20#104=20Difficult=C3=A9=20par=20d=C3=A9faut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Possibilité de saisir pour les compétences une difficulté libre par défaut, qui sera automatiquement sélectionnée pour les jets de cette compétence faits par l'acteur. Ceci permet de simplifier le travail du MJ, qui peut préconfigurer les difficultés d'attaque des PNJs. --- module/rdd-roll.js | 2 +- system.json | 2 +- template.json | 2 ++ templates/item-competence-sheet.html | 4 ++++ templates/item-competencecreature-sheet.html | 4 ++++ 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/module/rdd-roll.js b/module/rdd-roll.js index 95fa2fb0..793a5493 100644 --- a/module/rdd-roll.js +++ b/module/rdd-roll.js @@ -39,7 +39,7 @@ export class RdDRoll extends Dialog { carac: actor.data.data.carac, finalLevel: 0, diffConditions: rollData.arme ? RdDBonus.bonusAttaque(rollData.surpriseDefenseur) :0, - diffLibre: 0, + diffLibre: rollData.competence?.data.default_diffLibre ?? 0, editLibre: true, editConditions: true, forceValue: actor.getForceValue(), diff --git a/system.json b/system.json index 2a2ca62a..04ce1d0d 100644 --- a/system.json +++ b/system.json @@ -5,7 +5,7 @@ "version": "1.2.0", "minimumCoreVersion": "0.7.5", "compatibleCoreVersion": "0.7.8", - "templateVersion": 77, + "templateVersion": 78, "author": "LeRatierBretonnien", "esmodules": [ "module/rdd-main.js", "module/hook-renderChatLog.js" ], "styles": ["styles/simple.css"], diff --git a/template.json b/template.json index a42ecfba..e135b22b 100644 --- a/template.json +++ b/template.json @@ -599,6 +599,7 @@ }, "competence": { "niveau": 0, + "default_diffLibre": 0, "base": 0, "categorie": "", "xp": 0, @@ -610,6 +611,7 @@ "competencecreature": { "categorie_parade": "", "niveau": 0, + "default_diffLibre": 0, "carac_value": 0, "iscombat": false, "isparade": false, diff --git a/templates/item-competence-sheet.html b/templates/item-competence-sheet.html index d15ba0f4..01644aa2 100644 --- a/templates/item-competence-sheet.html +++ b/templates/item-competence-sheet.html @@ -46,6 +46,10 @@ {{/select}} +
+ + +
{{#if (eq data.categorie 'draconic')}}
diff --git a/templates/item-competencecreature-sheet.html b/templates/item-competencecreature-sheet.html index d6bd549c..5a11b997 100644 --- a/templates/item-competencecreature-sheet.html +++ b/templates/item-competencecreature-sheet.html @@ -16,6 +16,10 @@
+
+ + +