[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
This commit is contained in:
KayenEQ 2025-04-09 22:31:27 -04:00 committed by GitHub
parent 8e2961dda5
commit 758dd1875e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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) // Check for Chance to Resist Spell bonuses (ie Sanctification Discipline)
int resist_bonuses = CalcResistChanceBonus(); if (!spells[spell_id].no_resist && resist_type != RESIST_NONE) {
if (resist_bonuses && zone->random.Roll(resist_bonuses) && !IsResurrectionSicknessSpell(spell_id)) { int resist_bonuses = CalcResistChanceBonus();
LogSpells("Resisted spell in sanctification, had [{}] chance to resist", resist_bonuses); if (resist_bonuses && zone->random.Roll(resist_bonuses) && !IsResurrectionSicknessSpell(spell_id)) {
return 0; LogSpells("Resisted spell in sanctification, had [{}] chance to resist", resist_bonuses);
return 0;
}
} }
} }