1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00
This commit is contained in:
AlexVinS 2016-09-29 19:37:59 +03:00
parent db2663613c
commit 688dc4c189

View File

@ -785,7 +785,7 @@ ESpellCastProblem::ESpellCastProblem SpecialRisingSpellMechanics::canBeCast(cons
//find alive possible target
const CStack * stackToHeal = cb->getStackIf([ctx, this](const CStack * s)
{
const bool ownerMatches = !ctx.ti.smart || s->getOwner() == ctx.caster->getOwner();
const bool ownerMatches = !ctx.ti.smart || s->owner == ctx.caster->getOwner();
return ownerMatches && s->isValidTarget(false) && s->coversPos(ctx.destination) && ESpellCastProblem::OK == owner->isImmuneByStack(ctx.caster, s);
});
@ -795,7 +795,7 @@ ESpellCastProblem::ESpellCastProblem SpecialRisingSpellMechanics::canBeCast(cons
//find dead possible target if there is no alive target
stackToHeal = cb->getStackIf([ctx, this](const CStack * s)
{
const bool ownerMatches = !ctx.ti.smart || s->getOwner() == ctx.caster->getOwner();
const bool ownerMatches = !ctx.ti.smart || s->owner == ctx.caster->getOwner();
return ownerMatches && s->isValidTarget(true) && s->coversPos(ctx.destination) && ESpellCastProblem::OK == owner->isImmuneByStack(ctx.caster, s);
});