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

10 lines
404 B
JavaScript
Raw Normal View History

2024-05-16 17:57:51 +02:00
if (this.actor.getFlag("wfrp4e", "isAttached"))
{
let roll = await new Roll("1d10").roll()
await roll.toMessage(this.script.getChatData());
if (roll.total == 9 || roll.total == 10)
{
this.script.scriptMessage(`<strong>${this.actor.name}</strong> attaché à <strong>${this.actor.getFlag("wfrp4e", "isAttached")}</strong> tombe.`)
2024-05-16 17:57:51 +02:00
await this.actor.unsetFlag("wfrp4e", "isAttached")
}
}