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

30 lines
617 B
JavaScript

let filters = [
{
property : "type",
value : "spell"
},
{
property : "system.lore.value",
value : "petty"
}
]
let petty = await ItemDialog.createFromFilters(filters, 3, "Choisissez 3 Sorts de Magie Mineure")
filters = [
{
property : "type",
value : "spell"
},
{
property : "system.lore.value",
value : ""
}
]
let arcane = await ItemDialog.createFromFilters(filters, 3, "Choisissez 3 Sorts de Magie d'Arcane")
let items = petty.concat(arcane).map(i => i.toObject())
this.actor.createEmbeddedDocuments("Item", items);