浏览代码

Just remove hardcoded targetting for DEATH_RIPPLE & DESTROY_UNDED.
It will now affect all creatures (massive, non smart). Immunities are handled separately.

AlexVinS 11 年之前
父节点
当前提交
6bf4140145
共有 1 个文件被更改,包括 1 次插入14 次删除
  1. 1 14
      lib/CBattleCallback.cpp

+ 1 - 14
lib/CBattleCallback.cpp

@@ -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())