foundryvtt-wh4-lang-fr-fr/reference_scripts/QPVVDPcJ4Xi5FmQl.js

9 lines
486 B
JavaScript
Raw Permalink Normal View History

if(this.actor.hasCondition("fatigued") && args.opposedTest.result.hitloc.value == "head" && (args.opposedTest.attackerTest.result.critical || args.actor.status.wounds.value - args.totalWoundLoss < 0))
{
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), { fields: { difficulty: "average" }, skipTargets: true, appendTitle : ` - ${this.effect.name}`})
await test.roll();
if (test.failed)
{
this.actor.addCondition("unconscious")
}
}