瀏覽代碼

fix INVINCIBLE

Laserlicht 1 年之前
父節點
當前提交
1960d66971
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/spells/BattleSpellMechanics.cpp

+ 1 - 1
lib/spells/BattleSpellMechanics.cpp

@@ -259,7 +259,7 @@ std::vector<const CStack *> BattleSpellMechanics::getAffectedStacks(const Target
 
 
 	for(const Destination & dest : all)
 	for(const Destination & dest : all)
 	{
 	{
-		if(dest.unitValue)
+		if(dest.unitValue && !dest.unitValue->hasBonusOfType(BonusType::INVINCIBLE))
 		{
 		{
 			//FIXME: remove and return battle::Unit
 			//FIXME: remove and return battle::Unit
 			stacks.insert(battle()->battleGetStackByID(dest.unitValue->unitId(), false));
 			stacks.insert(battle()->battleGetStackByID(dest.unitValue->unitId(), false));