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

9 lines
376 B
JavaScript
Raw Permalink Normal View History

2024-06-06 22:07:28 +02:00
const grim = this.actor.items.find(i => i.type === "trait" && i.name.includes("Grim"));
if (args.options?.deltaAdv > 0 && this.actor.hasCondition("engaged") && grim.specification.value !== 4) {
grim.update({"system.specification.value": 4});
}
if (!this.actor.hasCondition("engaged") && grim.specification.value !== 2) {
grim.update({"system.specification.value": 2});
}