mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Fixed crash when aiming with Archangels.
This commit is contained in:
parent
937effb649
commit
0c45fb95d4
@ -1562,9 +1562,12 @@ ESpellCastProblem::ESpellCastProblem CBattleInfoCallback::battleIsImmune(const C
|
|||||||
|
|
||||||
if (spell->isRisingSpell())
|
if (spell->isRisingSpell())
|
||||||
{
|
{
|
||||||
auto maxHealth = calculateHealedHP (caster, spell, subject);
|
if (caster) //TODO: what with Archangels?
|
||||||
if (subject->count >= subject->baseAmount || maxHealth < subject->MaxHealth()) //must be able to rise at least one full creature
|
{
|
||||||
return ESpellCastProblem::STACK_IMMUNE_TO_SPELL;
|
auto maxHealth = calculateHealedHP (caster, spell, subject);
|
||||||
|
if (subject->count >= subject->baseAmount || maxHealth < subject->MaxHealth()) //must be able to rise at least one full creature
|
||||||
|
return ESpellCastProblem::STACK_IMMUNE_TO_SPELL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user