forked from public/foundryvtt-wh4-lang-fr-fr
Update scripts
This commit is contained in:
48
scripts/zIpl3SkWv8zzlr2D.js
Normal file
48
scripts/zIpl3SkWv8zzlr2D.js
Normal file
@ -0,0 +1,48 @@
|
||||
let filters = [
|
||||
{
|
||||
property : "type",
|
||||
value : "spell"
|
||||
},
|
||||
{
|
||||
property : "system.lore.value",
|
||||
value : "petty"
|
||||
}
|
||||
]
|
||||
|
||||
let petty = (await ItemDialog.createFromFilters(filters, 4, "Choisissez 4 sorts de Magie Mineure")).map(i => i.toObject());
|
||||
|
||||
|
||||
filters = [
|
||||
{
|
||||
property : "type",
|
||||
value : "spell"
|
||||
},
|
||||
{
|
||||
property : "system.lore.value",
|
||||
value : ["death"]
|
||||
}
|
||||
]
|
||||
|
||||
let arcane = (await ItemDialog.createFromFilters(filters, 8, "Choisissez 8 Sorts d'Arcane & du Domaine de la Mort")).map(i => i.toObject());
|
||||
|
||||
filters = [
|
||||
{
|
||||
property : "type",
|
||||
value : "spell"
|
||||
},
|
||||
{
|
||||
property : "name",
|
||||
value: /^((?!\().)*$/gm, // Remove all spells with parentheses (all arcane spells spells)
|
||||
regex: true
|
||||
},
|
||||
{
|
||||
property : "system.lore.value",
|
||||
value : "necromancy"
|
||||
}
|
||||
]
|
||||
|
||||
let necromancy = (await ItemDialog.createFromFilters(filters, 3, "Choisissez 3 sorts du Domaine de la Nécromancie")).map(i => i.toObject());
|
||||
|
||||
let items = [...necromancy, ...petty, ...arcane]
|
||||
|
||||
this.actor.createEmbeddedDocuments("Item", items);
|
Reference in New Issue
Block a user