From 63b711758f9034aeb9e1b7c059f6df451a15896e Mon Sep 17 00:00:00 2001 From: Dydzio Date: Sat, 28 Sep 2024 17:14:41 +0200 Subject: [PATCH] Fix chain lightning wasting effect on creatures immune to magic --- lib/spells/effects/UnitEffect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spells/effects/UnitEffect.cpp b/lib/spells/effects/UnitEffect.cpp index 657f98e9f..3598fbbb8 100644 --- a/lib/spells/effects/UnitEffect.cpp +++ b/lib/spells/effects/UnitEffect.cpp @@ -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)