foundryvtt-wh4-lang-fr-fr/scripts/8zTkDVziBPaNbMQX.js

30 lines
617 B
JavaScript
Raw Permalink Normal View History

2024-05-16 17:57:51 +02:00
let filters = [
{
property : "type",
value : "spell"
},
{
property : "system.lore.value",
value : "petty"
}
]
2024-10-08 20:52:09 +02:00
let petty = await ItemDialog.createFromFilters(filters, 6, "Choisissez 6 Sorts de Magie Mineure")
2024-05-16 17:57:51 +02:00
filters = [
{
property : "type",
value : "spell"
},
{
property : "system.lore.value",
value : ""
}
]
2024-10-08 20:52:09 +02:00
let arcane = await ItemDialog.createFromFilters(filters, 9, "Choisissez 9 Sorts de Magie d'Arcane")
2024-05-16 17:57:51 +02:00
let items = petty.concat(arcane).map(i => i.toObject())
this.actor.createEmbeddedDocuments("Item", items);