|
|
|
@@ -109,10 +109,10 @@ export class RdDActor extends RdDBaseActorSang {
|
|
|
|
|
|
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
|
getEtatGeneral(options = { ethylisme: false }) {
|
|
|
|
|
let etatGeneral = Misc.toInt(this.system.compteurs.etat?.value)
|
|
|
|
|
const etatGeneral = Misc.toInt(this.system.compteurs.etat?.value)
|
|
|
|
|
if (options.ethylisme) {
|
|
|
|
|
// Pour les jets d'Ethylisme, on ignore le degré d'éthylisme (p.162)
|
|
|
|
|
etatGeneral -= Math.min(0, this.system.compteurs.ethylisme.value)
|
|
|
|
|
// Pour les jets d'Ethylisme, on retire le malus d'éthylisme (p.162)
|
|
|
|
|
return etatGeneral - this.malusEthylisme()
|
|
|
|
|
}
|
|
|
|
|
return etatGeneral
|
|
|
|
|
}
|
|
|
|
@@ -533,7 +533,7 @@ export class RdDActor extends RdDBaseActorSang {
|
|
|
|
|
message.content += `Vous dégrisez un peu (${RdDUtility.getNomEthylisme(value)}). `;
|
|
|
|
|
}
|
|
|
|
|
await this.update({
|
|
|
|
|
"system.compteurs.ethylisme": {
|
|
|
|
|
'system.compteurs.ethylisme': {
|
|
|
|
|
nb_doses: 0,
|
|
|
|
|
jet_moral: false,
|
|
|
|
|
value: value
|
|
|
|
@@ -1178,17 +1178,6 @@ export class RdDActor extends RdDBaseActorSang {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
|
async setEthylisme(degre) {
|
|
|
|
|
let ethylisme = duplicate(this.system.compteurs.ethylisme);
|
|
|
|
|
ethylisme.value = degre;
|
|
|
|
|
ethylisme.nb_doses = 0;
|
|
|
|
|
if (degre == 1) {
|
|
|
|
|
ethylisme.jet_moral = false;
|
|
|
|
|
}
|
|
|
|
|
await this.update({ "system.compteurs.ethylisme": ethylisme });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
|
async jetEthylisme() {
|
|
|
|
|
let rollData = {
|
|
|
|
@@ -1207,7 +1196,7 @@ export class RdDActor extends RdDBaseActorSang {
|
|
|
|
|
async actionPrincipale(item, onActionItem = async () => { }) {
|
|
|
|
|
let result = await super.actionPrincipale(item, onActionItem)
|
|
|
|
|
if (result) { return result }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result = await this.actionNourritureboisson(item, onActionItem)
|
|
|
|
|
if (result) { return result }
|
|
|
|
|
|
|
|
|
|