1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

- MIND_IMMUNITY bonus replaces separate protectons from various spells

- Creature Window can handle descriptions of spellcasting abilities
This commit is contained in:
DjWarmonger
2012-01-27 07:25:29 +00:00
parent 1cbd7e94e4
commit 855cebfe81
9 changed files with 29 additions and 65 deletions

View File

@@ -2171,6 +2171,11 @@ ESpellCastProblem::ESpellCastProblem BattleInfo::battleIsImmune(const CGHeroInst
if (battleTestElementalImmunity(subject, spell, Bonus::AIR_IMMUNITY, damageSpell))
return ESpellCastProblem::STACK_IMMUNE_TO_SPELL;
}
if (vstd::contains(VLC->spellh->mindSpells, spell->id))
{
if (subject->hasBonusOfType(Bonus::MIND_IMMUNITY))
return ESpellCastProblem::STACK_IMMUNE_TO_SPELL;
}
if (vstd::contains(VLC->spellh->risingSpells, spell->id))
{