foundryvtt-wh4-lang-fr-fr/scripts/xWPgIZOQLba5nZ23.js

14 lines
446 B
JavaScript
Raw Normal View History

2024-06-06 22:07:28 +02:00
let nbFatigue = 1 + Number(this.effect.sourceTest.result.SL);
this.actor.addCondition("fatigued", nbFatigue);
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "hard"}, appendTitle : ` - ${this.effect.name}`})
await test.roll();
if (test.succeeded)
{
this.script.scriptNotification(this.actor.name + "a résisté !")
}
else if (test.failed)
{
this.actor.addCondition("unconscious", 1);
}