Fix nombre de tentatives

Dans le tchat, la séparation échec/succès avait supprimé les tentatives
This commit is contained in:
Vincent Vandemeulebrouck 2021-11-23 02:12:23 +01:00
parent b6b6acc4e3
commit 2392b9b9f4

View File

@ -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);