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

26 lines
815 B
JavaScript
Raw Permalink Normal View History

2024-05-16 17:57:51 +02:00
this.script.scriptNotification(`Healed ${this.actor.characteristics.t.bonus * 2} Wounds`)
await this.actor.modifyWounds(this.actor.characteristics.t.bonus * 2)
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - Effets secondaires`,fields : {difficulty : "difficult"}})
2024-05-16 17:57:51 +02:00
await test.roll();
if (test.failed)
{
let roll = await new Roll("1d10").roll();
await roll.toMessage(this.script.getChatData())
if (roll.total <= 3)
{
this.actor.addCondition("blinded", 3)
}
else if (roll.total <= 6)
{
this.actor.addCondition("broken");
}
else if (roll.total <= 9)
{
this.actor.addCondition("stunned");
}
else if (roll.total == 10)
{
this.actor.addConditon("unconscious")
}
}