foundryvtt-wh4-lang-fr-fr/scripts/1wrPvP6lJwIAfmsl.js

10 lines
371 B
JavaScript
Raw Normal View History

2024-05-16 17:57:51 +02:00
let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.locations), 1, "Choisir une localisation");
let location = choice[0].id;
let itemTargeted = this.actor.items.get(this.effect.getFlag("wfrp4e", "itemTargets")[0])
if (itemTargeted)
{
itemTargeted.update({[`system.APdamage.${location}`] : itemTargeted.system.APdamage[location] + 1})
}