From bff88f7af447273739453f8415bdf830d1304de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Constantin?= Date: Mon, 30 Dec 2024 20:58:08 -0500 Subject: [PATCH] Improved morale with undead army When the player has an undead army, the moral does not apply. The issue is that the info is still (partially calculated) and displayed. The artifacts are taken into consideration but not the skills / tavern. With this commit the morale is always calculated & displayed in the hero menu. --- src/fheroes2/army/army.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/fheroes2/army/army.cpp b/src/fheroes2/army/army.cpp index aaca58f727c..e96b5849127 100644 --- a/src/fheroes2/army/army.cpp +++ b/src/fheroes2/army/army.cpp @@ -1207,18 +1207,13 @@ int Army::GetMoraleModificator( std::string * strs ) const // different race penalty std::set races; bool hasUndead = false; - bool allUndead = true; for ( const Troop * troop : *this ) if ( troop->isValid() ) { races.insert( troop->GetRace() ); hasUndead = hasUndead || troop->isUndead(); - allUndead = allUndead && troop->isUndead(); } - if ( allUndead ) - return Morale::NORMAL; - int result = Morale::NORMAL; // check castle modificator