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

17 lines
399 B
JavaScript

let filters = [
{
property : "type",
value : "skill"
},
{
property : "name",
value : /Melee/gm,
regex: true
}
]
let items = await ItemDialog.createFromFilters(filters, 2, "Choisissez 2 Skills to add +20")
items = items.map(i => i.toObject())
items.forEach(i => i.system.advances.value = 20)
this.actor.createEmbeddedDocuments("Item", items);