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

18 lines
443 B
JavaScript

let filters = [
{
property : "type",
value : "weapon"
},
{
property : "system.weaponGroup.value",
value : ["twohanded", "polearm"]
}
]
let items = await ItemDialog.createFromFilters(filters, 1, "Choisissez an appropriate Polearm or Two-Handed Weapon")
items = items.map(i => i.toObject())
items.forEach(i => i.system.equipped.value = true);
this.actor.createEmbeddedDocuments("Item", items);