fix: merge saving_throws D30 table into arcane_spell_defense
Release Creation / build (release) Successful in 49s
Release Creation / build (release) Successful in 49s
saving_throws was redundant — all saves in this system are vs spells. Removed SAVING_THROWS constant; all save rollType lookups use ARCANE_SPELL_DEFENSE. D30=1 arcane_spell_defense blank (no special result). Added miracle types to ARCANE_SPELL_ATTACK mapping so they get D30 results instead of null.
This commit is contained in:
@@ -27,8 +27,7 @@ export default class D30Roll {
|
||||
RANGED_DEFENSE: "ranged_defense",
|
||||
ARCANE_SPELL_ATTACK: "arcane_spell_attack",
|
||||
ARCANE_SPELL_DEFENSE: "arcane_spell_defense",
|
||||
SKILL_ROLLS: "skill_rolls",
|
||||
SAVING_THROWS: "saving_throws"
|
||||
SKILL_ROLLS: "skill_rolls"
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -134,8 +133,9 @@ export default class D30Roll {
|
||||
return options.isRanged ? this.ROLL_TYPES.RANGED_DEFENSE : this.ROLL_TYPES.MELEE_DEFENSE
|
||||
}
|
||||
|
||||
// Spell types
|
||||
if (externalType === "spell-attack" || externalType === "spell" || externalType === "spell-power") {
|
||||
// Spell/Miracle types
|
||||
if (externalType === "spell-attack" || externalType === "spell" || externalType === "spell-power"
|
||||
|| externalType === "miracle-attack" || externalType === "miracle" || externalType === "miracle-power") {
|
||||
return this.ROLL_TYPES.ARCANE_SPELL_ATTACK
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ export default class D30Roll {
|
||||
|
||||
// Saving throw types
|
||||
if (externalType === "save") {
|
||||
return options.isSpellSave ? this.ROLL_TYPES.ARCANE_SPELL_DEFENSE : this.ROLL_TYPES.SAVING_THROWS
|
||||
return this.ROLL_TYPES.ARCANE_SPELL_DEFENSE
|
||||
}
|
||||
|
||||
// If no match, return null
|
||||
|
||||
Reference in New Issue
Block a user