1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

vcmi: spell resistance rework

Now instead of XXX_IMMUNITY bonuses we have 2 bonuses with spellSchool
subtype: SPELL_SCHOOL_IMMUNITY and NEGATIVE_EFFECT_IMMUNITY.
All previous bonuses of subtype 0 is covered by SPELL_SCHOOL_IMMUNITY,
and all previous bonuses of subtype 1 is covered by
NEGATIVE_EFFECT_IMMUNITY. Unit tests are updated accordingly.
This commit is contained in:
Konstantin
2023-08-19 20:19:59 +03:00
committed by Konstantin P
parent c9bc3fd4e1
commit 8724181a0f
17 changed files with 99 additions and 121 deletions

View File

@@ -122,9 +122,9 @@ CSpellWindow::CSpellWindow(const CGHeroInstance * _myHero, CPlayerInterface * _m
++sitesPerOurTab[4];
spell->forEachSchool([&sitesPerOurTab](const spells::SchoolInfo & school, bool & stop)
spell->forEachSchool([&sitesPerOurTab](const ESpellSchool & school, bool & stop)
{
++sitesPerOurTab[(ui8)school.id];
++sitesPerOurTab[(ui8)school];
});
}
if(sitesPerTabAdv[4] % 12 == 0)