Bugfix Appel au moral.

This commit is contained in:
LeFelis
2021-03-05 22:38:25 +01:00
parent 33b676e214
commit 7e252cf6ae
2 changed files with 3 additions and 3 deletions

View File

@ -1707,7 +1707,7 @@ export class RdDActor extends Actor {
createCallbackAppelAuMoral() { /* Si l'appel au moral est utilisé, on l'affiche dans le chat et on diminue éventuellement le moral */
return {
condition: r => r.use.appelAuMoral && game.settings.get("core", "rollMode") != 'selfroll',
action: r => { console.log("createCallbackAppelAuMoral"); this.displayAppelAuMoral ; console.log(r.rolled.isEchec); this._appliquerAppelMoral(r, game.settings.get("core", "rollMode") != 'blindroll') }
action: r => { this.displayAppelAuMoral ; this._appliquerAppelMoral(r, game.settings.get("core", "rollMode") != 'blindroll') }
};
}
@ -1786,7 +1786,7 @@ export class RdDActor extends Actor {
async _appliquerAppelMoral(rollData, display = true) {
if (!this.isPersonnage()) return;
if (!rollData.rolled.isEchec) return;
const waitUpdate = this.moralIncDec(-1); /* L'appel au moral a échoué. Le personnage perd un point de moral */
this.moralIncDec(-1); /* L'appel au moral a échoué. Le personnage perd un point de moral */
rollData.jetEchouerMoralDiminuer = true;
}