Files
foundryvtt-wh4-lang-fr-fr/scripts/iuSoKntfJ4eAPafQ.js

9 lines
508 B
JavaScript

let spells = await warhammer.utility.findAllItems("spell", "Chargement des Sorts", true, ["system.lore.value"])
spells = spells.filter(s => ["fire", "heavens", "beasts", "shadow", "light", "life", "death", "metal"].includes(s.system.lore.value)).sort((a, b) => a.system.lore.value > b.system.lore.value ? 1 : -1)
let choice = await ItemDialog.create(spells, 1, {text : "Choisissez un Sort", title : this.effect.name});
if (choice[0])
{
this.actor.addEffectItems(choice.map(i => i.uuid), this.effect)
}