Fix: message sur jet de moral neutre
This commit is contained in:
parent
1a346a21c3
commit
4ee4445836
@ -457,7 +457,20 @@ export class RdDActor extends RdDBaseActor {
|
||||
|
||||
async _jetDeMoralChateauDormant(message) {
|
||||
const jetMoral = await this._jetDeMoral('neutre');
|
||||
message.content += jetMoral.ajustement == 0 ? ' -- le moral reste stable' : ' -- le moral retourne vers 0';
|
||||
message.content += ' -- le moral ' + this._messageAjustementMoral(jetMoral.ajustement);
|
||||
}
|
||||
_messageAjustementMoral(ajustement) {
|
||||
switch (Math.sign(ajustement)) {
|
||||
case 1:
|
||||
return `remonte de ${ajustement}`;
|
||||
case -1:
|
||||
return `diminue de ${-ajustement}`;
|
||||
case 0:
|
||||
return 'reste stable';
|
||||
default:
|
||||
console.error(`Le signe de l'ajustement de moral ${ajustement} est ${Math.sign(ajustement)}, ce qui est innatendu`)
|
||||
return `est ajusté de ${ajustement} (bizarre)`;
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
Loading…
Reference in New Issue
Block a user