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

9 lines
376 B
JavaScript
Raw Normal View History

2024-06-06 21:09:27 +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});
}