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

13 lines
534 B
JavaScript
Raw Permalink Normal View History

2024-05-16 17:57:51 +02:00
let actorSize = game.wfrp4e.config.actorSizeNums[args.actor.details.size.value]
let attackerSize = game.wfrp4e.config.actorSizeNums[args.attacker.details.size.value]
if (attackerSize > actorSize)
{
let msg = `<b>Attaque de Langue préhensile</b>: ${args.actor.prototypeToken.name} est désormais @Condition[Empêtré]`;
2024-05-16 17:57:51 +02:00
await args.actor.addCondition("entangled");
if (actorSize <= 2)
{
msg += `et @Condition[Engagé]`
2024-05-16 17:57:51 +02:00
}
this.script.scriptMessage(msg, {speaker : {alias: args.attacker.prototypeToken.name}})
}