From 27f2dfc576e39b24a8a396d03bc97c9862f5084e Mon Sep 17 00:00:00 2001 From: AlexVinS Date: Tue, 15 Sep 2015 04:31:43 +0300 Subject: [PATCH] Quick fix for SACRIFICE immunity check --- lib/spells/BattleSpellMechanics.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/spells/BattleSpellMechanics.cpp b/lib/spells/BattleSpellMechanics.cpp index d8334509b..0b787fcdc 100644 --- a/lib/spells/BattleSpellMechanics.cpp +++ b/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)