From 1a7585e1f657efe20c7cb9a791a82b3a74e8a563 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnier Date: Sun, 14 Jun 2026 22:57:41 +0200 Subject: [PATCH] fix: merge saving_throws D30 table into arcane_spell_defense MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- module/config/d30_results_tables.json | 161 +++++++++----------------- module/documents/d30-roll.mjs | 10 +- 2 files changed, 59 insertions(+), 112 deletions(-) diff --git a/module/config/d30_results_tables.json b/module/config/d30_results_tables.json index 72edb91..3d4528a 100644 --- a/module/config/d30_results_tables.json +++ b/module/config/d30_results_tables.json @@ -73,20 +73,6 @@ ], "description": "Possible Lethal or Vital Magical Strike or Add D20E to Spell Attack" }, - "arcane_spell_defense": { - "type": "choice", - "choices": [ - { - "type": "spell_calamity" - }, - { - "type": "bonus_dice", - "dice": "D20E", - "target": "spell_defense" - } - ], - "description": "Possible Spell Catastrophe or adds D20E to Spell Defense" - }, "skill_rolls": { "type": "skill_auto_success", "description": "Skill Succeeds Regardless of Opposing Roll" @@ -109,9 +95,19 @@ ], "description": "Possible Flawless or Legendary Defense or Add D20E to Defense" }, - "saving_throws": { - "type": "save_auto_success", - "description": "Saving Throw Succeeds Regardless of Opposing Roll" + "arcane_spell_defense": { + "type": "choice", + "choices": [ + { + "type": "spell_calamity" + }, + { + "type": "bonus_dice", + "dice": "D20E", + "target": "spell_defense" + } + ], + "description": "Possible Spell Catastrophe or adds D20E to Spell Defense" } }, "29": { @@ -135,11 +131,6 @@ "amount": 1, "description": "Gain 1 Grit" }, - "arcane_spell_defense": { - "type": "gain_grit", - "amount": 1, - "description": "Gain 1 Grit" - }, "skill_rolls": { "type": "gain_grit", "amount": 1, @@ -150,7 +141,7 @@ "amount": 1, "description": "Gain 1 Grit" }, - "saving_throws": { + "arcane_spell_defense": { "type": "gain_grit", "amount": 1, "description": "Gain 1 Grit" @@ -184,16 +175,16 @@ "type": "no_lethargy", "description": "No Spell Lethargy the Aether Approves of Characters Efforts" }, + "ranged_defense": { + "type": "luck_die", + "scope": "combat", + "description": "Granted 1 Luck dice for Use in This Combat Only" + }, "arcane_spell_defense": { "type": "flash_of_pain", "duration_dice": "1D6E", "target": "caster", "description": "Caster Suffers Severe pain and will be under a flash of pain for 1D6E seconds" - }, - "ranged_defense": { - "type": "luck_die", - "scope": "combat", - "description": "Granted 1 Luck dice for Use in This Combat Only" } }, "26": { @@ -208,12 +199,6 @@ "amount": 1, "target": "skill", "description": "Add 1 to Skill Roll" - }, - "saving_throws": { - "type": "bonus_flat", - "amount": 1, - "target": "save", - "description": "Add 1 to Saving Throw" } }, "21": { @@ -239,12 +224,6 @@ "target": "defender", "description": "Magical Damage inflicts Flash of pain 1D6E seconds" }, - "arcane_spell_defense": { - "type": "flash_of_pain", - "duration_dice": "1D6E", - "target": "caster", - "description": "Caster Suffers Severe pain and will be under a flash of pain for 1D6E seconds" - }, "skill_rolls": { "type": "bonus_dice", "dice": "D6", @@ -255,11 +234,11 @@ "type": "recover_pain", "description": "Defender Recovers or ignores any flash of pain" }, - "saving_throws": { - "type": "bonus_dice", - "dice": "D6", - "target": "save", - "description": "Granted D6 (1-6) Saving Throw Modifier for this Saving Throw Attempt" + "arcane_spell_defense": { + "type": "flash_of_pain", + "duration_dice": "1D6E", + "target": "caster", + "description": "Caster Suffers Severe pain and will be under a flash of pain for 1D6E seconds" } }, "20": { @@ -331,23 +310,6 @@ ], "description": "Possible Vicious Application of a Magical Attack or add D12 to attack" }, - "arcane_spell_defense": { - "type": "choice", - "choices": [ - { - "type": "special_defense", - "options": [ - "perfect_spell" - ] - }, - { - "type": "bonus_dice", - "dice": "D12", - "target": "spell_defense" - } - ], - "description": "Possible 20/20 Spell defense that Saves Against Any Magical Attack Except a Lethal Magical Strike or add D12 to spell defense" - }, "skill_rolls": { "type": "bonus_flat", "amount": 20, @@ -371,11 +333,22 @@ ], "description": "Possible 20/20 defense that avoids Any Attack Except a Lethal Strike or adds D12 to defense" }, - "saving_throws": { - "type": "bonus_flat", - "amount": 20, - "target": "save", - "description": "20 Added to Saving Throw" + "arcane_spell_defense": { + "type": "choice", + "choices": [ + { + "type": "special_defense", + "options": [ + "perfect_spell" + ] + }, + { + "type": "bonus_dice", + "dice": "D12", + "target": "spell_defense" + } + ], + "description": "Possible 20/20 Spell defense that Saves Against Any Magical Attack Except a Lethal Magical Strike or add D12 to spell defense" } }, "15": { @@ -416,12 +389,6 @@ "punch" ], "description": "Kick or Punch" - }, - "saving_throws": { - "type": "bonus_flat", - "amount": 1, - "target": "save", - "description": "Add 1 to Saving Throw" } }, "13": {}, @@ -474,12 +441,6 @@ "punch" ], "description": "Kick or Punch" - }, - "saving_throws": { - "type": "bonus_flat", - "amount": 1, - "target": "save", - "description": "Add 1 to Saving Throw" } }, "8": { @@ -499,10 +460,6 @@ "type": "mulligan", "description": "Mulligan, Can Re-Roll This Spell Attack" }, - "arcane_spell_defense": { - "type": "mulligan", - "description": "Mulligan, Can Re-Roll This Spell Defense" - }, "skill_rolls": { "type": "mulligan", "description": "Mulligan, Can Re-Roll This Skill roll" @@ -511,9 +468,9 @@ "type": "mulligan", "description": "Mulligan, Can Choose to Re-Roll This Defense" }, - "saving_throws": { + "arcane_spell_defense": { "type": "mulligan", - "description": "Mulligan, Can Re-Roll This Saving Throw" + "description": "Mulligan, Can Re-Roll This Spell Defense" } }, "7": { @@ -565,12 +522,6 @@ "punch" ], "description": "Kick or Punch" - }, - "saving_throws": { - "type": "bonus_flat", - "amount": 1, - "target": "save", - "description": "Add 1 to Saving Throw" } }, "3": { @@ -595,17 +546,17 @@ "multiplier": 3, "description": "Triple Damage on Spell Damage" }, - "arcane_spell_defense": { - "type": "bonus_dice", - "dice": "D12", - "target": "spell_defense", - "description": "D12 Added to Spell Defense Modifier" - }, "ranged_defense": { "type": "dr_multiplier", "multiplier": 3, "includes_shield": true, "description": "DR Tripled including Shield" + }, + "arcane_spell_defense": { + "type": "bonus_dice", + "dice": "D12", + "target": "spell_defense", + "description": "D12 Added to Spell Defense Modifier" } }, "2": { @@ -630,17 +581,17 @@ "multiplier": 2, "description": "Double Damage on Spell Damage" }, - "arcane_spell_defense": { - "type": "bonus_dice", - "dice": "D6", - "target": "spell_defense", - "description": "D6 Added to Spell Defense Modifier" - }, "ranged_defense": { "type": "dr_multiplier", "multiplier": 2, "includes_shield": true, "description": "DR Doubled including Shield" + }, + "arcane_spell_defense": { + "type": "bonus_dice", + "dice": "D6", + "target": "spell_defense", + "description": "D6 Added to Spell Defense Modifier" } }, "1": { @@ -653,10 +604,6 @@ "type": "spell_calamity", "description": "A possible spell calamity has occurred" }, - "arcane_spell_defense": { - "type": "spell_calamity", - "description": "Possible Spell Calamity or Catastrophe" - }, "melee_attack": { "type": "fumble", "detail": "melee_fumble", diff --git a/module/documents/d30-roll.mjs b/module/documents/d30-roll.mjs index ab3d08f..c957345 100644 --- a/module/documents/d30-roll.mjs +++ b/module/documents/d30-roll.mjs @@ -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