fix: merge saving_throws D30 table into arcane_spell_defense
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:
2026-06-14 22:57:41 +02:00
parent b567c8bbea
commit 1a7585e1f6
2 changed files with 59 additions and 112 deletions
+5 -5
View File
@@ -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