diff --git a/module/actor.js b/module/actor.js index d6bcac1f..1e8ccceb 100644 --- a/module/actor.js +++ b/module/actor.js @@ -1766,7 +1766,7 @@ export class RdDActor extends Actor { async saouler(forceAlcool, alcool = undefined) { const actorData = Misc.data(this); let ethylisme = duplicate(actorData.data.compteurs.ethylisme); - + const etat = this.getEtatGeneral({ ethylisme: true }); const nbDoses = Number(actorData.data.compteurs.ethylisme.nb_doses || 0); const ethylismeData = { @@ -1793,23 +1793,23 @@ export class RdDActor extends Actor { } else { ethylisme.value = Math.max(ethylisme.value - 1, -7); ethylisme.nb_doses = 0; - - let perte = await RdDDice.rollTotal("1d6", {showDice:true}); + + let perte = await RdDDice.rollTotal("1d6", { showDice: true }); ethylismeData.perteEndurance = await this.santeIncDec("endurance", -perte, { ethylisme: true }); - + if (!ethylisme.jet_moral) { ethylismeData.jetMoral = await this._jetMoral('heureuse'); if (ethylismeData.jetMoral.ajustement == 1) { - ethylismeData.moralAlcool ='heureux'; + ethylismeData.moralAlcool = 'heureux'; ethylisme.jet_moral = true; } else if (ethylisme.value == -1) { ethylismeData.jetMoral.ajustement = -1; - ethylismeData.moralAlcool ='triste'; + ethylismeData.moralAlcool = 'triste'; ethylisme.jet_moral = true; await this.moralIncDec(-1); } } - if (ethylisme.value<0) { + if (ethylisme.value < 0) { // Qui a bu boira (p 164) ethylismeData.jetVolonte = { selectedCarac: actorData.data.carac.volonte, @@ -1823,10 +1823,10 @@ export class RdDActor extends Actor { RollDataAjustements.calcul(ethylismeData.jetVolonte, this); } } - ethylismeData.ajustementEthylique = ethylisme.value; - ethylismeData.nomEthylisme = RdDUtility.getNomEthylisme(ethylisme.value); + ethylismeData.ajustementEthylique = ethylisme.value; + ethylismeData.nomEthylisme = RdDUtility.getNomEthylisme(ethylisme.value); ethylismeData.doses = ethylisme.nb_doses; - + await this.update({ 'data.compteurs.ethylisme': ethylisme }); await RdDResolutionTable.displayRollData(ethylismeData, this, 'chat-resultat-ethylisme.html'); } @@ -2292,7 +2292,9 @@ export class RdDActor extends Actor { /* -------------------------------------------- */ _appliquerExperienceRollData(rollData) { const callback = this.createCallbackExperience(); - if (callback.condition(rollData)) { callback.action(rollData); } + if (callback.condition(rollData)) { + callback.action(rollData); + } } /* -------------------------------------------- */