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

17 lines
431 B
JavaScript

let filters = [
{
property : "type",
value : "skill"
},
{
property : "name",
value : /Melee/gm,
regex: true
}
]
let items = await game.wfrp4e.apps.ItemDialog.createFromFilters(filters, 2, "Choisissez 2 Compétences pour y ajouter +20")
items = items.map(i => i.toObject())
items.forEach(i => i.system.advances.value = 20)
this.actor.createEmbeddedDocuments("Item", items);