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

30 lines
636 B
JavaScript
Raw Normal View History

2024-05-16 17:57:51 +02:00
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")
2024-05-16 17:57:51 +02:00
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")
2024-05-16 17:57:51 +02:00
let items = petty.concat(arcane).map(i => i.toObject())
this.actor.createEmbeddedDocuments("Item", items);