From a2ed85e96e2f0e471f621c513134dba4f17bffe4 Mon Sep 17 00:00:00 2001 From: Chas <79132112+cadowtin@users.noreply.github.com> Date: Wed, 27 Oct 2021 07:43:53 -0500 Subject: [PATCH] feat(dnd5e mapping): add all spells (#15) TODO > Add signifier for always prepared > Add signifier for at will casting > Add special config for Warlocks --- mappings/dnd5e.mapping | 237 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 208 insertions(+), 29 deletions(-) diff --git a/mappings/dnd5e.mapping b/mappings/dnd5e.mapping index a6d2793..a5c012a 100644 --- a/mappings/dnd5e.mapping +++ b/mappings/dnd5e.mapping @@ -140,61 +140,240 @@ /* Page #3 */ { "pdf": "Spellcasting Class 2", "foundry": @items.filter(i => i.type === 'class').map(i => `${i.name}`).join(' / ') }, /* Doesn't work with multiple classes properly */ { "pdf": "SpellcastingAbility 2", "foundry": @data.attributes.spellcasting.capitalize() || "" }, - { "pdf": "SpellSaveDC 2", "foundry": String(@data.attributes.spelldc) || "" }, + { "pdf": "SpellSaveDC 2", "foundry": @data.attributes.spelldc || "" }, { "pdf": "SpellAtkBonus 2", "foundry": "+" + String(@data.attributes.spelldc - 8) }, /* Doesn't account for negative values */ /* Spellslots Max + counts*/ - /**{ "pdf": "SlotTotal 19", "foundry": @data.spells.spell1.max || "" }, + { "pdf": "SlotsTotal 19", "foundry": @data.spells.spell1.max || "" }, { "pdf": "SlotsRemaining 19", "foundry": @data.spells.spell1.value || "" }, - { "pdf": "SlotTotal 20", "foundry": @data.spells.spell2.max || "" }, - { "pdf": "SlotsRemaining 20, "foundry": @data.spells.spell2.value || "" }, - { "pdf": "SlotTotal 21", "foundry": @data.spells.spell3.max || "" }, - { "pdf": "SlotsRemaining 21, "foundry": @data.spells.spell3.value || "" }, - { "pdf": "SlotTotal 22", "foundry": @data.spells.spell4.max || "" }, + { "pdf": "SlotsTotal 20", "foundry": @data.spells.spell2.max || "" }, + { "pdf": "SlotsRemaining 20", "foundry": @data.spells.spell2.value || "" }, + { "pdf": "SlotsTotal 21", "foundry": @data.spells.spell3.max || "" }, + { "pdf": "SlotsRemaining 21", "foundry": @data.spells.spell3.value || "" }, + { "pdf": "SlotsTotal 22", "foundry": @data.spells.spell4.max || "" }, { "pdf": "SlotsRemaining 22", "foundry": @data.spells.spell4.value || "" }, - { "pdf": "SlotTotal 23", "foundry": @data.spells.spell5.max || "" }, + { "pdf": "SlotsTotal 23", "foundry": @data.spells.spell5.max || "" }, { "pdf": "SlotsRemaining 23", "foundry": @data.spells.spell5.value || "" }, - { "pdf": "SlotTotal 24", "foundry": @data.spells.spell6.max || "" }, + { "pdf": "SlotsTotal 24", "foundry": @data.spells.spell6.max || "" }, { "pdf": "SlotsRemaining 24", "foundry": @data.spells.spell6.value || "" }, - { "pdf": "SlotTotal 25", "foundry": @data.spells.spell7.max || "" }, + { "pdf": "SlotsTotal 25", "foundry": @data.spells.spell7.max || "" }, { "pdf": "SlotsRemaining 25", "foundry": @data.spells.spell7.value || "" }, - { "pdf": "SlotTotal 26", "foundry": @data.spells.spell8.max || "" }, + { "pdf": "SlotsTotal 26", "foundry": @data.spells.spell8.max || "" }, { "pdf": "SlotsRemaining 26", "foundry": @data.spells.spell8.value || "" }, - { "pdf": "SlotTotal 27", "foundry": @data.spells.spell9.max || "" }, - { "pdf": "SlotsRemaining 27", "foundry": @data.spells.spell9.value || "" },*/ + { "pdf": "SlotsTotal 27", "foundry": @data.spells.spell9.max || "" }, + { "pdf": "SlotsRemaining 27", "foundry": @data.spells.spell9.value || "" }, /* Cantrips */ - /**{ "pdf": "Spells 1014", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 0)[1]?.name || "" }, + { "pdf": "Spells 1014", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 0)[0]?.name || "" }, { "pdf": "Spells 1016", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 0)[1]?.name || "" }, { "pdf": "Spells 1017", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 0)[2]?.name || "" }, { "pdf": "Spells 1018", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 0)[3]?.name || "" }, { "pdf": "Spells 1019", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 0)[4]?.name || "" }, { "pdf": "Spells 1020", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 0)[5]?.name || "" }, { "pdf": "Spells 1021", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 0)[6]?.name || "" }, - { "pdf": "Spells 1022", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 0)[7]?.name || "" },*/ + { "pdf": "Spells 1022", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 0)[7]?.name || "" }, /* 1st Level Spells */ - /**{ "pdf": "Spells 1015", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[2]?.name || "" }, - { "pdf": "Check Box 251", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[2]?.preparation.prepared === true ? "x" : "" || "" }, - { "pdf": "Spells 1022", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[3]?.name || "" }, - { "pdf": "Check Box 309", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[3]?.preparation.prepared === true ? "x" : "" || "" }, + { "pdf": "Spells 1015", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[0]?.name || "" }, + { "pdf": "Check Box 251", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[0]?.data.data.preparation.prepared || "" }, + { "pdf": "Spells 1023", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[1]?.name || "" }, + { "pdf": "Check Box 309", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[1]?.data.data.preparation.prepared || "" }, { "pdf": "Spells 1024", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[2]?.name || "" }, - { "pdf": "Check Box 3010", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[2]?.preparation.prepared === true ? "x" : "" || "" }, + { "pdf": "Check Box 3010", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[2]?.data.data.preparation.prepared || "" }, { "pdf": "Spells 1025", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[3]?.name || "" }, - { "pdf": "Check Box 3011", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[3]?.preparation.prepared === true ? "x" : "" || "" }, + { "pdf": "Check Box 3011", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[3]?.data.data.preparation.prepared || "" }, { "pdf": "Spells 1026", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[4]?.name || "" }, - { "pdf": "Check Box 3012", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[4]?.preparation.prepared === true ? "x" : "" || "" }, + { "pdf": "Check Box 3012", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[4]?.data.data.preparation.prepared || "" }, { "pdf": "Spells 1027", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[5]?.name || "" }, - { "pdf": "Check Box 3013", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[5]?.preparation.prepared === true ? "x" : "" || "" }, + { "pdf": "Check Box 3013", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[5]?.data.data.preparation.prepared || "" }, { "pdf": "Spells 1028", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[6]?.name || "" }, - { "pdf": "Check Box 3014", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[6]?.preparation.prepared === true ? "x" : "" || "" }, + { "pdf": "Check Box 3014", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[6]?.data.data.preparation.prepared || "" }, { "pdf": "Spells 1029", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[7]?.name || "" }, - { "pdf": "Check Box 3015", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[7]?.preparation.prepared === true ? "x" : "" || "" }, + { "pdf": "Check Box 3015", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[7]?.data.data.preparation.prepared || "" }, { "pdf": "Spells 1030", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[8]?.name || "" }, - { "pdf": "Check Box 3016", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[8]?.preparation.prepared === true ? "x" : "" || "" }, + { "pdf": "Check Box 3016", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[8]?.data.data.preparation.prepared || "" }, { "pdf": "Spells 1031", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[9]?.name || "" }, - { "pdf": "Check Box 3017", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[9]?.preparation.prepared === true ? "x" : "" || "" }, + { "pdf": "Check Box 3017", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[9]?.data.data.preparation.prepared || "" }, { "pdf": "Spells 1032", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[10]?.name || "" }, - { "pdf": "Check Box 3018", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[10]?.preparation.prepared === true ? "x" : "" || "" }, + { "pdf": "Check Box 3018", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[10]?.data.data.preparation.prepared || "" }, { "pdf": "Spells 1033", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[11]?.name || "" }, - { "pdf": "Check Box 3019", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[11]?.preparation.prepared === true ? "x" : "" || "" },*/ + { "pdf": "Check Box 3019", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 1)[11]?.data.data.preparation.prepared || "" }, + /* 2nd Level Spells */ + { "pdf": "Spells 313", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[0]?.name || "" }, + { "pdf": "Spells 310", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[1]?.name || "" }, + { "pdf": "Spells 3020", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[2]?.name || "" }, + { "pdf": "Spells 3021", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[3]?.name || "" }, + { "pdf": "Spells 3022", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[4]?.name || "" }, + { "pdf": "Spells 3023", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[5]?.name || "" }, + { "pdf": "Spells 3024", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[6]?.name || "" }, + { "pdf": "Spells 3025", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[7]?.name || "" }, + { "pdf": "Spells 3026", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[8]?.name || "" }, + { "pdf": "Spells 3027", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[9]?.name || "" }, + { "pdf": "Spells 3028", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[10]?.name || "" }, + { "pdf": "Spells 3029", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[11]?.name || "" }, + { "pdf": "Spells 3030", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[12]?.name || "" }, + + { "pdf": "Check Box 1046", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[0]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 1034", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[1]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 1035", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[2]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 1036", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[3]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 1037", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[4]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 1038", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[5]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 1039", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[6]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 1040", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[7]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 1041", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[8]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 1042", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[9]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 1043", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[10]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 1044", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[11]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 1045", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 2)[12]?.data.data.preparation.prepared || "" }, + /* 3rd Level Spells */ + { "pdf": "Spells 1048", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[0]?.name || "" }, + { "pdf": "Spells 1047", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[1]?.name || "" }, + { "pdf": "Spells 1049", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[2]?.name || "" }, + { "pdf": "Spells 1050", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[3]?.name || "" }, + { "pdf": "Spells 1051", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[4]?.name || "" }, + { "pdf": "Spells 1052", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[5]?.name || "" }, + { "pdf": "Spells 1053", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[6]?.name || "" }, + { "pdf": "Spells 1054", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[7]?.name || "" }, + { "pdf": "Spells 1055", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[8]?.name || "" }, + { "pdf": "Spells 1056", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[9]?.name || "" }, + { "pdf": "Spells 1057", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[10]?.name || "" }, + { "pdf": "Spells 1058", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[11]?.name || "" }, + { "pdf": "Spells 1059", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[12]?.name || "" }, + + { "pdf": "Check Box 315", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[0]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 314", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[1]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3031", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[2]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3032", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[3]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3033", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[4]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3034", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[5]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3035", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[6]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3036", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[7]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3037", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[8]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3038", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[9]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3039", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[10]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3040", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[11]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3041", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 3)[12]?.data.data.preparation.prepared || "" }, + + /* 4th Level Spells */ + { "pdf": "Spells 1061", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[0]?.name || "" }, + { "pdf": "Spells 1060", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[1]?.name || "" }, + { "pdf": "Spells 1062", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[2]?.name || "" }, + { "pdf": "Spells 1063", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[3]?.name || "" }, + { "pdf": "Spells 1064", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[4]?.name || "" }, + { "pdf": "Spells 1065", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[5]?.name || "" }, + { "pdf": "Spells 1066", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[6]?.name || "" }, + { "pdf": "Spells 1067", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[7]?.name || "" }, + { "pdf": "Spells 1068", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[8]?.name || "" }, + { "pdf": "Spells 1069", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[9]?.name || "" }, + { "pdf": "Spells 1070", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[10]?.name || "" }, + { "pdf": "Spells 1071", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[11]?.name || "" }, + { "pdf": "Spells 1072", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[12]?.name || "" }, + + { "pdf": "Check Box 317", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[0]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 316", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[1]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3042", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[2]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3043", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[3]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3044", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[4]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3045", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[5]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3046", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[6]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3047", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[7]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3048", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[8]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3049", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[9]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3050", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[10]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3051", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[11]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3052", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 4)[12]?.data.data.preparation.prepared || "" }, + + /* 5th Level Spells */ + { "pdf": "Spells 1074", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 5)[0]?.name || "" }, + { "pdf": "Spells 1073", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 5)[1]?.name || "" }, + { "pdf": "Spells 1075", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 5)[2]?.name || "" }, + { "pdf": "Spells 1076", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 5)[3]?.name || "" }, + { "pdf": "Spells 1077", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 5)[4]?.name || "" }, + { "pdf": "Spells 1078", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 5)[5]?.name || "" }, + { "pdf": "Spells 1079", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 5)[6]?.name || "" }, + { "pdf": "Spells 1080", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 5)[7]?.name || "" }, + { "pdf": "Spells 1081", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 5)[8]?.name || "" }, + + { "pdf": "Check Box 319", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 5)[0]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 318", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 5)[1]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3053", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 5)[2]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3054", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 5)[3]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3055", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 5)[4]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3056", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 5)[5]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3057", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 5)[6]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3058", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 5)[7]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3059", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 5)[8]?.data.data.preparation.prepared || "" }, + + /* 6th Level Spells */ + { "pdf": "Spells 1083", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 6)[0]?.name || "" }, + { "pdf": "Spells 1082", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 6)[1]?.name || "" }, + { "pdf": "Spells 1084", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 6)[2]?.name || "" }, + { "pdf": "Spells 1085", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 6)[3]?.name || "" }, + { "pdf": "Spells 1086", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 6)[4]?.name || "" }, + { "pdf": "Spells 1087", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 6)[5]?.name || "" }, + { "pdf": "Spells 1088", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 6)[6]?.name || "" }, + { "pdf": "Spells 1089", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 6)[7]?.name || "" }, + { "pdf": "Spells 1090", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 6)[8]?.name || "" }, + + { "pdf": "Check Box 323", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 6)[0]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 322", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 6)[1]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3060", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 6)[2]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3061", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 6)[3]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3062", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 6)[4]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3063", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 6)[5]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3064", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 6)[6]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3065", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 6)[7]?.data.data.preparation.prepared || "" },{ "pdf": "Check Box 3066", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 6)[8]?.data.data.preparation.prepared || "" }, + + /* 7th Level Spells */ + { "pdf": "Spells 1092", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 7)[0]?.name || "" }, + { "pdf": "Spells 1091", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 7)[1]?.name || "" }, + { "pdf": "Spells 1093", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 7)[2]?.name || "" }, + { "pdf": "Spells 1094", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 7)[3]?.name || "" }, + { "pdf": "Spells 1095", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 7)[4]?.name || "" }, + { "pdf": "Spells 1096", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 7)[5]?.name || "" }, + { "pdf": "Spells 1097", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 7)[6]?.name || "" },{ "pdf": "Spells 1098", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 7)[7]?.name || "" }, + { "pdf": "Spells 1099", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 7)[8]?.name || "" }, + + { "pdf": "Check Box 323", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 7)[0]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 322", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 7)[1]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3067", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 7)[2]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3068", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 7)[3]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3069", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 7)[4]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3070", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 7)[5]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3071", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 7)[6]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3072", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 7)[7]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3073", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 7)[8]?.data.data.preparation.prepared || "" }, + + /* 8th Level Spells */ + { "pdf": "Spells 10101", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 8)[0]?.name || "" }, + { "pdf": "Spells 10100", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 8)[1]?.name || "" }, + { "pdf": "Spells 10102", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 8)[2]?.name || "" }, + { "pdf": "Spells 10103", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 8)[3]?.name || "" }, + { "pdf": "Spells 10104", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 8)[4]?.name || "" }, + { "pdf": "Spells 10105", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 8)[5]?.name || "" }, + { "pdf": "Spells 10106", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 8)[6]?.name || "" }, + + { "pdf": "Check Box 325", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 8)[0]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 324", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 8)[1]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3074", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 8)[2]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3075", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 8)[3]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3076", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 8)[4]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3077", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 8)[5]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3078", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 8)[6]?.data.data.preparation.prepared || "" }, + + /* 9th Level Spells */ + { "pdf": "Spells 10108", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 9)[0]?.name || "" }, + { "pdf": "Spells 10107", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 9)[1]?.name || "" }, + { "pdf": "Spells 10109", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 9)[2]?.name || "" }, + { "pdf": "Spells 10110", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 9)[3]?.name || "" }, + { "pdf": "Spells 10111", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 9)[4]?.name || "" }, + { "pdf": "Spells 10112", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 9)[5]?.name || "" }, + + { "pdf": "Check Box 327", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 9)[0]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 326", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 9)[1]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3079", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 9)[2]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3080", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 9)[3]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3081", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 9)[4]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3082", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 9)[5]?.data.data.preparation.prepared || "" }, + { "pdf": "Check Box 3083", "foundry": @items.filter(i => i.type === 'spell' && i.data.data.level === 9)[6]?.data.data.preparation.prepared || "" }, { "pdf": "", "foundry": "" } ]