2024-05-16 17:57:51 +02:00
|
|
|
let filters = [
|
|
|
|
{
|
|
|
|
property : "type",
|
|
|
|
value : "spell"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
property : "system.lore.value",
|
|
|
|
value : "petty"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
2024-05-17 01:07:37 +02:00
|
|
|
let petty = await game.wfrp4e.apps.ItemDialog.createFromFilters(filters, 6, "Choisir 6 sorts de Magie Mineure")
|
2024-05-16 17:57:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
filters = [
|
|
|
|
{
|
|
|
|
property : "type",
|
|
|
|
value : "spell"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
property : "system.lore.value",
|
|
|
|
value : ""
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
2024-05-17 01:07:37 +02:00
|
|
|
let arcane = await game.wfrp4e.apps.ItemDialog.createFromFilters(filters, 9, "Choisir 9 Sorts d'Arcane")
|
2024-05-16 17:57:51 +02:00
|
|
|
|
|
|
|
let items = petty.concat(arcane).map(i => i.toObject())
|
|
|
|
|
|
|
|
this.actor.createEmbeddedDocuments("Item", items);
|