30 lines
636 B
JavaScript
30 lines
636 B
JavaScript
let filters = [
|
|
{
|
|
property : "type",
|
|
value : "spell"
|
|
},
|
|
{
|
|
property : "system.lore.value",
|
|
value : "petty"
|
|
}
|
|
]
|
|
|
|
let petty = await game.wfrp4e.apps.ItemDialog.createFromFilters(filters, 3, "Choisir 3 sorts de Magie Mineure")
|
|
|
|
|
|
filters = [
|
|
{
|
|
property : "type",
|
|
value : "spell"
|
|
},
|
|
{
|
|
property : "system.lore.value",
|
|
value : ""
|
|
}
|
|
]
|
|
|
|
let arcane = await game.wfrp4e.apps.ItemDialog.createFromFilters(filters, 3, "Choisir 3 sorts d'Arcane")
|
|
|
|
let items = petty.concat(arcane).map(i => i.toObject())
|
|
|
|
this.actor.createEmbeddedDocuments("Item", items); |