1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00

Partial support for Death Cloud & Magog's Fire Ball.

Lots of refactoring is needed to handle this and multiple-target attacks.
This commit is contained in:
DjWarmonger
2011-07-02 16:49:22 +00:00
parent 11fade5e67
commit 51943e5f1e
5 changed files with 101 additions and 38 deletions

View File

@ -710,7 +710,17 @@ std::set<CStack*> BattleInfo::getAttackedCreatures( const CSpell * s, int skillL
{
CStack * st = getStackT(*it, onlyAlive);
if(st)
attackedCres.insert(st);
{
if (s->id == 76) //Death Cloud //TODO: fireball and fire immunity
{
if (st->isLiving() || st->position == destinationTile) //directly hit or alive
{
attackedCres.insert(st);
}
}
else
attackedCres.insert(st);
}
}
}
else if(s->getTargetType() == CSpell::CREATURE_EXPERT_MASSIVE)