1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-07 00:58:39 +02:00

Support for Chain Lightning.

Fixed getClosestTile function.
This commit is contained in:
DjWarmonger
2012-05-20 11:40:23 +00:00
parent 59255a4cad
commit d34cf90bf7
4 changed files with 41 additions and 9 deletions

View File

@ -1607,6 +1607,7 @@ void CBattleInterface::spellCast( const BattleSpellCast * sc )
case Spells::LIGHTNING_BOLT:
case Spells::TITANS_LIGHTNING_BOLT:
case Spells::THUNDERBOLT:
case Spells::CHAIN_LIGHTNING: //TODO: zigzag effect
for (auto it = sc->affectedCres.begin(); it != sc->affectedCres.end(); ++it) //in case we have multiple targets
{
displayEffect(1, curInt->cb->battleGetStackByID(*it, false)->position);
@ -1630,7 +1631,6 @@ void CBattleInterface::spellCast( const BattleSpellCast * sc )
case Spells::SUMMON_AIR_ELEMENTAL:
case Spells::CLONE:
case Spells::REMOVE_OBSTACLE:
case Spells::CHAIN_LIGHTNING:
addNewAnim(new CDummyAnimation(this, 2)); //interface won't return until animation is played. TODO: make it smarter?
break;
} //switch(sc->id)