1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-12 10:03:53 +02:00

Fix chain lightning wasting effect on creatures immune to magic

This commit is contained in:
Dydzio 2024-09-28 17:14:41 +02:00
parent 7f8f09c8fa
commit 63b711758f

View File

@ -197,7 +197,7 @@ EffectTarget UnitEffect::transformTargetByChain(const Mechanics * m, const Targe
auto possibleTargets = m->battle()->battleGetUnitsIf([&](const battle::Unit * unit) -> bool
{
return isValidTarget(m, unit);
return isReceptive(m, unit) && isValidTarget(m, unit);
});
for(const auto *unit : possibleTargets)