Skip to content

Commit

Permalink
Added setup for reversible spells for priest
Browse files Browse the repository at this point in the history
  • Loading branch information
DBFBlackbull committed Jan 16, 2024
1 parent 95d4b3c commit df288f5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
9 changes: 6 additions & 3 deletions ADnD_2E_Revised/2ESheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -55508,8 +55508,6 @@ <h2>Monster Sheet specific</h2>
}
}

console.log()

wizardSpells['wizmonster'] = wizmonster;
/* ---- Wizard spells end ---- */
/* ---- Priest spells start ---- */
Expand Down Expand Up @@ -64299,13 +64297,18 @@ <h2>Monster Sheet specific</h2>
priestSpells['priq'] = priq;

const primonster = {};
for (const [_, section] of Object.entries(priestSpells)) {
for (const [spellLevel, section] of Object.entries(priestSpells)) {
for (const [spellName, spell] of Object.entries(section)) {
let name = spellName;
if (spellName === 'Fortify' && spell.book === 'Player\'s Option: Spells & Magic') {
name += " (S&M)";
}
primonster[name] = spell;
if (spell['reversible']) {
let reverseSpellName = `${spell['reversible']} (Reverse of ${spellName})`;
priestSpells[spellLevel][reverseSpellName] = spell;
primonster[reverseSpellName] = spell;
}
}
}
priestSpells['primonster'] = primonster;
Expand Down
7 changes: 6 additions & 1 deletion ADnD_2E_Revised/javascript/priestSpells.js
Original file line number Diff line number Diff line change
Expand Up @@ -8785,13 +8785,18 @@ priestSpells['pri7'] = pri7;
priestSpells['priq'] = priq;

const primonster = {};
for (const [_, section] of Object.entries(priestSpells)) {
for (const [spellLevel, section] of Object.entries(priestSpells)) {
for (const [spellName, spell] of Object.entries(section)) {
let name = spellName;
if (spellName === 'Fortify' && spell.book === 'Player\'s Option: Spells & Magic') {
name += " (S&M)";
}
primonster[name] = spell;
if (spell['reversible']) {
let reverseSpellName = `${spell['reversible']} (Reverse of ${spellName})`;
priestSpells[spellLevel][reverseSpellName] = spell;
primonster[reverseSpellName] = spell;
}
}
}
priestSpells['primonster'] = primonster;
Expand Down

0 comments on commit df288f5

Please sign in to comment.