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

7 lines
537 B
JavaScript

let spells = await warhammer.utility.findAllItems("spell", "Loading Spells", true, ["system.lore.value"]);
spells = spells.filter(i => ["dark", "light", "fire", "life", "beasts", "shadows", "death", "heavens", "metal"].includes(i.system.lore.value)).sort((a, b) => a.name > b.name ? 1 : -1);
let choices = await ItemDialog.create(spells, 7, {text : "Choisissez 7 Sorts parmi toute combinaison de Magie de Couleur, Sorcellerie ou Magie Noire", title : this.effect.name})
this.actor.addEffectItems(choices.map(i => i.uuid), this.effect)