From 00d3f7ff31b3d3576a666ff3c8ed7ef062b6e25a Mon Sep 17 00:00:00 2001 From: sladecraven Date: Sat, 30 Oct 2021 09:16:28 +0200 Subject: [PATCH] Ajouter compteurs success/echec pour les points de tache #215 --- module/actor.js | 5 +++++ system.json | 4 ++-- template.json | 2 ++ templates/item-tache-sheet.html | 8 ++++++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/module/actor.js b/module/actor.js index c764d574..124782d6 100644 --- a/module/actor.js +++ b/module/actor.js @@ -2577,6 +2577,11 @@ export class RdDActor extends Actor { if (rollData.rolled.isETotal) { rollData.tache.data.difficulte--; } + if (rollData.rolled.isSuccess) { + rollData.tache.data.nb_jet_succes = rollData.tache.data.nb_jet_succes + 1; + } else { + rollData.tache.data.nb_jet_echec = rollData.tache.data.nb_jet_echec + 1; + } this.updateEmbeddedDocuments('Item', [rollData.tache]); this.santeIncDec("fatigue", rollData.tache.data.fatigue); diff --git a/system.json b/system.json index d3743a53..e6dff978 100644 --- a/system.json +++ b/system.json @@ -2,11 +2,11 @@ "name": "foundryvtt-reve-de-dragon", "title": "Rêve de Dragon", "description": "Rêve de Dragon RPG for FoundryVTT", - "version": "1.5.21", + "version": "1.5.22", "manifestPlusVersion": "1.0.0", "minimumCoreVersion": "0.8.0", "compatibleCoreVersion": "0.8.9", - "templateVersion": 124, + "templateVersion": 125, "author": "LeRatierBretonnien", "authors": [ { diff --git a/template.json b/template.json index 9f8617bf..81954ebf 100644 --- a/template.json +++ b/template.json @@ -719,6 +719,8 @@ "difficulte": 0, "points_de_tache": 0, "points_de_tache_courant": 0, + "nb_jet_echec": 0, + "nb_jet_succes": 0, "description": "", "descriptionmj": "" }, diff --git a/templates/item-tache-sheet.html b/templates/item-tache-sheet.html index d4e1b5af..cf87133f 100644 --- a/templates/item-tache-sheet.html +++ b/templates/item-tache-sheet.html @@ -48,6 +48,14 @@ +
+ + +
+
+ + +
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}