1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Bad morale can no longer happen after waiting

This commit is contained in:
Ivan Savenko 2023-04-20 13:08:55 +03:00
parent bfed62d3a2
commit d9939f0918

View File

@ -6600,9 +6600,9 @@ void CGameHandler::runBattle()
if(!removeGhosts.changedStacks.empty())
sendAndApply(&removeGhosts);
//check for bad morale => freeze
// check for bad morale => freeze
int nextStackMorale = next->MoraleVal();
if (nextStackMorale < 0)
if(!next->hadMorale && !next->waited() && nextStackMorale < 0)
{
auto diceSize = VLC->settings()->getVector(EGameSettings::COMBAT_BAD_MORALE_DICE);
size_t diceIndex = std::min<size_t>(diceSize.size()-1, -nextStackMorale);