From 4eaa337eb363b9d20cb9c0c50d88d16c2900acbd Mon Sep 17 00:00:00 2001 From: Opuszek Date: Tue, 8 Jul 2025 10:00:27 +0200 Subject: [PATCH] Update lib/spells/BattleSpellMechanics.cpp Co-authored-by: Ivan Savenko --- lib/spells/BattleSpellMechanics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spells/BattleSpellMechanics.cpp b/lib/spells/BattleSpellMechanics.cpp index d13d8a9f8..bc498634e 100644 --- a/lib/spells/BattleSpellMechanics.cpp +++ b/lib/spells/BattleSpellMechanics.cpp @@ -444,7 +444,7 @@ bool BattleSpellMechanics::isReflected(const battle::Unit * unit, vstd::RNG & rn bool spellIsDirect = !isMassive() && owner -> getLevelInfo(getRangeLevel()).range == directSpellRange; bool spellIsReflectable = spellIsDirect && (mode == Mode::HERO || mode == Mode::MAGIC_MIRROR) && isNegativeSpell(); bool targetCanReflectSpell = spellIsReflectable && unit->getAllBonuses(Selector::type()(BonusType::MAGIC_MIRROR))->size()>0; - return targetCanReflectSpell && rng.nextInt(0, 99) < unit->valOfBonuses(magicMirrorSelector, magicMirrorCacheStr); + return targetCanReflectSpell && rng.nextInt(0, 99) < unit->valOfBonuses(BonusType::MAGIC_MIRROR); } void BattleSpellMechanics::reflect(BattleSpellCast & sc, vstd::RNG & rng, const battle::Unit * unit)