1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Update lib/spells/BattleSpellMechanics.cpp

Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
This commit is contained in:
Opuszek
2025-07-08 10:02:37 +02:00
committed by GitHub
parent 4eaa337eb3
commit 7fc25319ee

View File

@@ -460,8 +460,7 @@ void BattleSpellMechanics::reflect(BattleSpellCast & sc, vstd::RNG & rng, const
if (!isReceptive(newTarget)) if (!isReceptive(newTarget))
sc.resistedCres.insert(newTarget->unitId()); //A spell can be reflected to then resisted by an immune unit. Consistent with the original game. sc.resistedCres.insert(newTarget->unitId()); //A spell can be reflected to then resisted by an immune unit. Consistent with the original game.
beforeCast(sc, rng, beforeCast(sc, rng, { reflectedTo });
boost::assign::list_of(reflectedTo));
} }
const battle::Unit * BattleSpellMechanics::getRandomUnit(vstd::RNG & rng, BattleSide & side) const battle::Unit * BattleSpellMechanics::getRandomUnit(vstd::RNG & rng, BattleSide & side)