Ajouter compteurs success/echec pour les points de tache #215

This commit is contained in:
2021-10-30 09:16:28 +02:00
parent a97944ff89
commit 00d3f7ff31
4 changed files with 17 additions and 2 deletions

View File

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