let filters = [
    {
        property : "type",
        value : "spell"
    },
    {
        property : "system.lore.value",
        value : "petty"
    }
]

let petty = (await ItemDialog.createFromFilters(filters, 4, {text : "Wähle 4 Zaubertricks der Niederen Magie"})).map(i => i.toObject());


filters = [
    {
        property : "type",
        value : "spell"
    },
    {
        property : "system.lore.value",
        value : ["death"]
    }
]

let arcane = (await ItemDialog.createFromFilters(filters, 8, {text : "Wähle 8 Arkane Zauber und Zauber der Lehre des Todes"})).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, {text : "Wähle 3 aus der Lehre der Nekromantie"})).map(i => i.toObject());

let items = [...necromancy, ...petty, ...arcane]

this.actor.createEmbeddedDocuments("Item", items);