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

19 lines
679 B
JavaScript
Raw Normal View History

2024-06-06 22:07:28 +02:00
fromUuid(this.effect.origin).then(caster => {
if (caster) {
if (actor.items.find(it => it.name == game.i18n.localize("Bestial"))) {
let healed = caster.characteristics.wp.bonus
let wounds = duplicate(args.actor.status.wounds)
wounds.value += healed
if (wounds.value > wounds.max)
wounds.value = wounds.max
args.actor.update({ "system.status.wounds": wounds })
ChatMessage.create({ content: `${this.actor.prototypeToken.name} regagne ${healed} Blessures`, speaker: { alias: this.effect.name } })
} else {
ui.notifications.warn("L'Acteur ciblé n'a pas le Trait Bestial")
}
}
})