From 0df7f97513430e99486f2a08b65657ff5a3395b0 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sat, 30 Oct 2021 01:36:45 +0200 Subject: [PATCH] =?UTF-8?q?Nombre=20de=20tentatives=20pour=20une=20t=C3=A2?= =?UTF-8?q?che?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/actor.js | 1 + system.json | 2 +- template.json | 1 + templates/chat-resultat-tache.html | 7 +++++-- templates/item-tache-sheet.html | 6 ++++++ 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/module/actor.js b/module/actor.js index 5c9849fa..cb1208ca 100644 --- a/module/actor.js +++ b/module/actor.js @@ -2574,6 +2574,7 @@ export class RdDActor extends Actor { rollData.appliquerFatigue = ReglesOptionelles.isUsing("appliquer-fatigue"); rollData.tache = duplicate(rollData.tache); rollData.tache.data.points_de_tache_courant += rollData.rolled.ptTache; + rollData.tache.data.tentatives++; if (rollData.rolled.isETotal) { rollData.tache.data.difficulte--; } diff --git a/system.json b/system.json index d3743a53..489b07ca 100644 --- a/system.json +++ b/system.json @@ -6,7 +6,7 @@ "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..70c75f83 100644 --- a/template.json +++ b/template.json @@ -719,6 +719,7 @@ "difficulte": 0, "points_de_tache": 0, "points_de_tache_courant": 0, + "tentatives": 0, "description": "", "descriptionmj": "" }, diff --git a/templates/chat-resultat-tache.html b/templates/chat-resultat-tache.html index e6f2c81b..248d89f9 100644 --- a/templates/chat-resultat-tache.html +++ b/templates/chat-resultat-tache.html @@ -6,8 +6,11 @@ {{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
- Après {{tache.data.periodicite}} {{alias}} a obtenu {{rolled.ptTache}} point{{~#if (gt rolled.ptTache 1)}}s{{/if}} de tâche, - son avancement est de {{tache.data.points_de_tache_courant}} sur {{tache.data.points_de_tache}} point{{~#if (gt tache.data.points_de_tache_courant 1)}}s{{/if}} de tâche. + {{alias}} a obtenu {{rolled.ptTache}} point{{~#unless (eq rolled.ptTache 1)}}s{{/unless}} de tâche, + son avancement est de + {{tache.data.points_de_tache_courant}} sur {{tache.data.points_de_tache}} + point{{~#unless (eq tache.data.points_de_tache_courant 1)}}s{{/unless}} de tâche + ({{~#unless (eq tache.data.tentatives 1)}}{{tache.data.tentatives}} tentatives{{else}}première tentative{{/unless~}}). {{#if (and tache.data.fatigue appliquerFatigue)}}
Il s'est fatigué de {{tache.data.fatigue}} case{{~#if (gt tache.data.fatigue 1)}}s{{/if}}.{{/if}} {{#if rolled.isETotal}}
Son échec total augmente de 1 la difficulté de la tâche!{{/if~}} {{> "systems/foundryvtt-reve-de-dragon/templates/chat-info-appel-au-moral.html"}} diff --git a/templates/item-tache-sheet.html b/templates/item-tache-sheet.html index d4e1b5af..1287a683 100644 --- a/templates/item-tache-sheet.html +++ b/templates/item-tache-sheet.html @@ -44,10 +44,16 @@
+
+
+ + +
+
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}