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

19 lines
693 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
2024-06-06 22:46:40 +02:00
let wounds = foundry.utils.duplicate(args.actor.status.wounds)
2024-06-06 22:07:28 +02:00
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")
}
}
})