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

18 lines
443 B
JavaScript
Raw Permalink Normal View History

2024-05-16 17:57:51 +02:00
let filters = [
{
property : "type",
value : "weapon"
},
{
property : "system.weaponGroup.value",
value : ["twohanded", "polearm"]
}
]
2024-10-08 20:52:09 +02:00
let items = await ItemDialog.createFromFilters(filters, 1, "Choisissez an appropriate Polearm or Two-Handed Weapon")
2024-05-16 17:57:51 +02:00
items = items.map(i => i.toObject())
2024-10-08 20:52:09 +02:00
items.forEach(i => i.system.equipped.value = true);
2024-05-16 17:57:51 +02:00
this.actor.createEmbeddedDocuments("Item", items);