From 2392b9b9f4500a960a989f4e18ad756d8947deca Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Tue, 23 Nov 2021 02:12:23 +0100 Subject: [PATCH] Fix nombre de tentatives MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dans le tchat, la séparation échec/succès avait supprimé les tentatives --- module/actor.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/module/actor.js b/module/actor.js index 66675976..3ca22631 100644 --- a/module/actor.js +++ b/module/actor.js @@ -2618,15 +2618,16 @@ 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--; } if (rollData.rolled.isSuccess) { - rollData.tache.data.nb_jet_succes = rollData.tache.data.nb_jet_succes + 1; + rollData.tache.data.nb_jet_succes++; } else { - rollData.tache.data.nb_jet_echec = rollData.tache.data.nb_jet_echec + 1; + rollData.tache.data.nb_jet_echec++; } + rollData.tache.data.tentatives = rollData.tache.data.nb_jet_succes+rollData.tache.data.nb_jet_echec; + this.updateEmbeddedDocuments('Item', [rollData.tache]); this.santeIncDec("fatigue", rollData.tache.data.fatigue);