autoformat
This commit is contained in:
parent
8756dde4e6
commit
053b949414
@ -1766,7 +1766,7 @@ export class RdDActor extends Actor {
|
|||||||
async saouler(forceAlcool, alcool = undefined) {
|
async saouler(forceAlcool, alcool = undefined) {
|
||||||
const actorData = Misc.data(this);
|
const actorData = Misc.data(this);
|
||||||
let ethylisme = duplicate(actorData.data.compteurs.ethylisme);
|
let ethylisme = duplicate(actorData.data.compteurs.ethylisme);
|
||||||
|
|
||||||
const etat = this.getEtatGeneral({ ethylisme: true });
|
const etat = this.getEtatGeneral({ ethylisme: true });
|
||||||
const nbDoses = Number(actorData.data.compteurs.ethylisme.nb_doses || 0);
|
const nbDoses = Number(actorData.data.compteurs.ethylisme.nb_doses || 0);
|
||||||
const ethylismeData = {
|
const ethylismeData = {
|
||||||
@ -1793,23 +1793,23 @@ export class RdDActor extends Actor {
|
|||||||
} else {
|
} else {
|
||||||
ethylisme.value = Math.max(ethylisme.value - 1, -7);
|
ethylisme.value = Math.max(ethylisme.value - 1, -7);
|
||||||
ethylisme.nb_doses = 0;
|
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 });
|
ethylismeData.perteEndurance = await this.santeIncDec("endurance", -perte, { ethylisme: true });
|
||||||
|
|
||||||
if (!ethylisme.jet_moral) {
|
if (!ethylisme.jet_moral) {
|
||||||
ethylismeData.jetMoral = await this._jetMoral('heureuse');
|
ethylismeData.jetMoral = await this._jetMoral('heureuse');
|
||||||
if (ethylismeData.jetMoral.ajustement == 1) {
|
if (ethylismeData.jetMoral.ajustement == 1) {
|
||||||
ethylismeData.moralAlcool ='heureux';
|
ethylismeData.moralAlcool = 'heureux';
|
||||||
ethylisme.jet_moral = true;
|
ethylisme.jet_moral = true;
|
||||||
} else if (ethylisme.value == -1) {
|
} else if (ethylisme.value == -1) {
|
||||||
ethylismeData.jetMoral.ajustement = -1;
|
ethylismeData.jetMoral.ajustement = -1;
|
||||||
ethylismeData.moralAlcool ='triste';
|
ethylismeData.moralAlcool = 'triste';
|
||||||
ethylisme.jet_moral = true;
|
ethylisme.jet_moral = true;
|
||||||
await this.moralIncDec(-1);
|
await this.moralIncDec(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ethylisme.value<0) {
|
if (ethylisme.value < 0) {
|
||||||
// Qui a bu boira (p 164)
|
// Qui a bu boira (p 164)
|
||||||
ethylismeData.jetVolonte = {
|
ethylismeData.jetVolonte = {
|
||||||
selectedCarac: actorData.data.carac.volonte,
|
selectedCarac: actorData.data.carac.volonte,
|
||||||
@ -1823,10 +1823,10 @@ export class RdDActor extends Actor {
|
|||||||
RollDataAjustements.calcul(ethylismeData.jetVolonte, this);
|
RollDataAjustements.calcul(ethylismeData.jetVolonte, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ethylismeData.ajustementEthylique = ethylisme.value;
|
ethylismeData.ajustementEthylique = ethylisme.value;
|
||||||
ethylismeData.nomEthylisme = RdDUtility.getNomEthylisme(ethylisme.value);
|
ethylismeData.nomEthylisme = RdDUtility.getNomEthylisme(ethylisme.value);
|
||||||
ethylismeData.doses = ethylisme.nb_doses;
|
ethylismeData.doses = ethylisme.nb_doses;
|
||||||
|
|
||||||
await this.update({ 'data.compteurs.ethylisme': ethylisme });
|
await this.update({ 'data.compteurs.ethylisme': ethylisme });
|
||||||
await RdDResolutionTable.displayRollData(ethylismeData, this, 'chat-resultat-ethylisme.html');
|
await RdDResolutionTable.displayRollData(ethylismeData, this, 'chat-resultat-ethylisme.html');
|
||||||
}
|
}
|
||||||
@ -2292,7 +2292,9 @@ export class RdDActor extends Actor {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
_appliquerExperienceRollData(rollData) {
|
_appliquerExperienceRollData(rollData) {
|
||||||
const callback = this.createCallbackExperience();
|
const callback = this.createCallbackExperience();
|
||||||
if (callback.condition(rollData)) { callback.action(rollData); }
|
if (callback.condition(rollData)) {
|
||||||
|
callback.action(rollData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
Loading…
Reference in New Issue
Block a user