Fix pertes des entités de cauchemar
This commit is contained in:
parent
4efd8cdd0b
commit
807e58e36a
@ -1151,7 +1151,7 @@ export class RdDActor extends Actor {
|
||||
const sante = duplicate(this.data.data.sante);
|
||||
let compteur = sante[name];
|
||||
if (!compteur) {
|
||||
return;
|
||||
return ;
|
||||
}
|
||||
let result = {
|
||||
sonne: false,
|
||||
@ -2236,7 +2236,9 @@ export class RdDActor extends Actor {
|
||||
let encaissement = this.jetEncaissement(rollData);
|
||||
|
||||
this.ajouterBlessure(encaissement); // Will upate the result table
|
||||
const perteVie = await this.santeIncDec("vie", - encaissement.vie);
|
||||
const perteVie = this.isEntiteCauchemar()
|
||||
? { newValue: 0}
|
||||
: await this.santeIncDec("vie", - encaissement.vie);
|
||||
const perteEndurance = await this.santeIncDec("endurance", -encaissement.endurance, (encaissement.critiques > 0));
|
||||
|
||||
this.computeEtatGeneral();
|
||||
@ -2250,7 +2252,7 @@ export class RdDActor extends Actor {
|
||||
encaissement.sonne = perteEndurance.sonne;
|
||||
encaissement.jetEndurance = perteEndurance.jetEndurance;
|
||||
encaissement.endurance = santeOrig.endurance.value - perteEndurance.newValue;
|
||||
encaissement.vie = santeOrig.vie.value - perteVie.newValue;
|
||||
encaissement.vie = this.isEntiteCauchemar() ? 0 : (santeOrig.vie.value - perteVie.newValue);
|
||||
|
||||
ChatUtility.createChatWithRollMode(this.name, {
|
||||
roll: encaissement.roll,
|
||||
|
Loading…
Reference in New Issue
Block a user