From 2101d7ed1173c689f00f4881048ba70781de9ecd Mon Sep 17 00:00:00 2001 From: Oleg Derevenetz Date: Mon, 23 Dec 2024 13:19:17 +0300 Subject: [PATCH] Do not make the ability to use an Earthquake spell dependent on the magical resistance of units on the battlefield --- src/fheroes2/battle/battle_arena.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/fheroes2/battle/battle_arena.cpp b/src/fheroes2/battle/battle_arena.cpp index 697899178c7..c5001abbc72 100644 --- a/src/fheroes2/battle/battle_arena.cpp +++ b/src/fheroes2/battle/battle_arena.cpp @@ -952,11 +952,15 @@ bool Battle::Arena::isDisableCastSpell( const Spell & spell, std::string * msg / return false; } - if ( spell == Spell::EARTHQUAKE && !castle ) { - if ( msg ) { - *msg = _( "That spell will have no effect!" ); + if ( spell == Spell::EARTHQUAKE ) { + if ( castle == nullptr ) { + if ( msg ) { + *msg = _( "That spell will have no effect!" ); + } + return true; } - return true; + + return false; } if ( spell.isSummon() ) {