Perte d'endurance max

La perte maximale est l'endurance disponible
This commit is contained in:
2020-12-06 21:31:41 +01:00
parent f4bb541bb7
commit e8f69b74c7
2 changed files with 4 additions and 3 deletions

View File

@ -1631,6 +1631,7 @@ export class RdDActor extends Actor {
let degatsReel = attackerRoll.degats - armure;
let result = RdDUtility.computeBlessuresSante(degatsReel, attackerRoll.mortalite);
result.endurance = Math.max(result.endurance, -Number(this.data.data.sante.endurance.value));
await this.santeIncDec("vie", result.vie);
await this.santeIncDec("endurance", result.endurance, (result.critiques > 0));
result.locName = (attackerRoll.loc) ? attackerRoll.loc.label : "Corps";