Преглед изворни кода

Quick fix for SACRIFICE immunity check

AlexVinS пре 10 година
родитељ
комит
27f2dfc576
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      lib/spells/BattleSpellMechanics.cpp

+ 2 - 1
lib/spells/BattleSpellMechanics.cpp

@@ -467,7 +467,8 @@ ESpellCastProblem::ESpellCastProblem SacrificeMechanics::canBeCasted(const CBatt
 		//using isImmuneBy directly as this mechanics does not have overridden immunity check
 		//therefore we do not need to check caster and casting mode
 		//TODO: check that we really should check immunity for both stacks
-		const bool immune =  ESpellCastProblem::OK != owner->isImmuneBy(stack);
+		ESpellCastProblem::ESpellCastProblem res = owner->isImmuneBy(stack);
+		const bool immune =  ESpellCastProblem::OK != res && ESpellCastProblem::NOT_DECIDED != res;
 		const bool casterStack = stack->owner == player;
 
 		if(!immune && casterStack)