mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-25 21:38:59 +02:00
Quick fix for SACRIFICE immunity check
This commit is contained in:
parent
bd70f672c3
commit
27f2dfc576
@ -467,7 +467,8 @@ ESpellCastProblem::ESpellCastProblem SacrificeMechanics::canBeCasted(const CBatt
|
|||||||
//using isImmuneBy directly as this mechanics does not have overridden immunity check
|
//using isImmuneBy directly as this mechanics does not have overridden immunity check
|
||||||
//therefore we do not need to check caster and casting mode
|
//therefore we do not need to check caster and casting mode
|
||||||
//TODO: check that we really should check immunity for both stacks
|
//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;
|
const bool casterStack = stack->owner == player;
|
||||||
|
|
||||||
if(!immune && casterStack)
|
if(!immune && casterStack)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user