Browse Source

fix INVINCIBLE

Laserlicht 1 year ago
parent
commit
1960d66971
1 changed files with 1 additions and 1 deletions
  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)
 	{
-		if(dest.unitValue)
+		if(dest.unitValue && !dest.unitValue->hasBonusOfType(BonusType::INVINCIBLE))
 		{
 			//FIXME: remove and return battle::Unit
 			stacks.insert(battle()->battleGetStackByID(dest.unitValue->unitId(), false));