1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-01 00:45:26 +02:00

Support for Enchanter ability.

This commit is contained in:
DjWarmonger
2011-10-09 07:20:23 +00:00
parent d607d90a91
commit 5e40d3da72
8 changed files with 81 additions and 26 deletions

View File

@ -1462,6 +1462,7 @@ BattleInfo * BattleInfo::setupBattle( int3 tile, int terrain, int terType, const
curB->heroes[1] = const_cast<CGHeroInstance*>(heroes[1]);
curB->round = -2;
curB->activeStack = -1;
curB->enchanterCounter[0] = curB->enchanterCounter[1] = 0; //ready to cast
if(town)
{
@ -1915,7 +1916,7 @@ SpellCasting::ESpellCastProblem BattleInfo::battleCanCastThisSpellHere( int play
if(moreGeneralProblem != SpellCasting::OK)
return moreGeneralProblem;
if (mode != SpellCasting::CREATURE_ACTIVE_CASTING)
if (mode != SpellCasting::CREATURE_ACTIVE_CASTING && mode != SpellCasting::ENCHANTER_CASTING)
return battleIsImmune(getHero(player), spell, mode, dest);
else
return battleIsImmune(NULL, spell, mode, dest);