1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

Merge pull request #4687 from dydzio0614/chain-lightning-magic-immunity

Fix chain lightning wasting effect on creatures immune to magic
This commit is contained in:
Ivan Savenko 2024-10-01 15:27:15 +03:00 committed by GitHub
commit f39d515d54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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)