From 758dd1875e1ffe7bfe71e8c31ca75564f3bbb0ea Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Wed, 9 Apr 2025 22:31:27 -0400 Subject: [PATCH] [Spells] Update to SPA 180 SE_ResistSpellChance to not block unresistable spells. (#4847) * SPA180 bypassed by field no_resist (field209) SPA 180 SE_ResistSpellChance provides chance to resist spells outright. This should not be checked to resist a spell if spell has (field209 / no_resist) set to 1. * Update spells.cpp confirmed on live unresistable spells are not blocked by sanctification disc or related AA's --- zone/spells.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/zone/spells.cpp b/zone/spells.cpp index e1eb943a4..7b2011607 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -5364,10 +5364,12 @@ float Mob::ResistSpell(uint8 resist_type, uint16 spell_id, Mob *caster, bool use } // Check for Chance to Resist Spell bonuses (ie Sanctification Discipline) - int resist_bonuses = CalcResistChanceBonus(); - if (resist_bonuses && zone->random.Roll(resist_bonuses) && !IsResurrectionSicknessSpell(spell_id)) { - LogSpells("Resisted spell in sanctification, had [{}] chance to resist", resist_bonuses); - return 0; + if (!spells[spell_id].no_resist && resist_type != RESIST_NONE) { + int resist_bonuses = CalcResistChanceBonus(); + if (resist_bonuses && zone->random.Roll(resist_bonuses) && !IsResurrectionSicknessSpell(spell_id)) { + LogSpells("Resisted spell in sanctification, had [{}] chance to resist", resist_bonuses); + return 0; + } } }