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

17 lines
412 B
JavaScript
Raw Normal View History

2024-05-16 17:57:51 +02:00
let filters = [
{
property : "type",
value : "skill"
},
{
property : "name",
value : /Melee/gm,
regex: true
}
]
let items = await game.wfrp4e.apps.ItemDialog.createFromFilters(filters, 2, "Choose 2 Skills to add +20")
items = items.map(i => i.toObject())
items.forEach(i => i.system.advances.value = 20)
this.actor.createEmbeddedDocuments("Item", items);