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