Skip to content

Commit

Permalink
Do not make the ability to use an Earthquake spell dependent on the m…
Browse files Browse the repository at this point in the history
…agical resistance of units on the battlefield (#9372)
  • Loading branch information
oleg-derevenetz authored Dec 23, 2024
1 parent a9509a6 commit 00127ce
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/fheroes2/battle/battle_arena.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() ) {
Expand Down

0 comments on commit 00127ce

Please sign in to comment.