mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-27 21:49:10 +02:00
Just remove hardcoded targetting for DEATH_RIPPLE & DESTROY_UNDED.
It will now affect all creatures (massive, non smart). Immunities are handled separately.
This commit is contained in:
parent
1431fcedf7
commit
6bf4140145
@ -2033,20 +2033,7 @@ std::set<const CStack*> CBattleInfoCallback::getAffectedCreatures(const CSpell *
|
||||
|
||||
const CSpell::TargetInfo ti = spell->getTargetInfo(skillLevel);
|
||||
//TODO: more generic solution for mass spells
|
||||
if(spell->id == SpellID::DEATH_RIPPLE || spell->id == SpellID::DESTROY_UNDEAD )
|
||||
{
|
||||
for(const CStack *stack : battleGetAllStacks())
|
||||
{
|
||||
if((spell->id == SpellID::DEATH_RIPPLE && !stack->getCreature()->isUndead()) //death ripple
|
||||
|| (spell->id == SpellID::DESTROY_UNDEAD && stack->getCreature()->isUndead()) //destroy undead
|
||||
)
|
||||
{
|
||||
if(stack->isValidTarget())
|
||||
attackedCres.insert(stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (spell->id == SpellID::CHAIN_LIGHTNING)
|
||||
if (spell->id == SpellID::CHAIN_LIGHTNING)
|
||||
{
|
||||
std::set<BattleHex> possibleHexes;
|
||||
for (auto stack : battleGetAllStacks())
|
||||
|
Loading…
x
Reference in New Issue
Block a user