1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00

Fix inability of unit to cast spell after receiving morale

This commit is contained in:
Ivan Savenko
2025-04-28 19:34:36 +03:00
parent 5433b07e5f
commit 5550edeb9a
16 changed files with 62 additions and 26 deletions

View File

@ -920,11 +920,13 @@ void CUnitState::afterNewRound()
makeGhost();
}
void CUnitState::afterGetsTurn()
void CUnitState::afterGetsTurn(BattleUnitTurnReason reason)
{
//if moving second time this round it must be high morale bonus
if(movedThisRound)
if(reason == BattleUnitTurnReason::MORALE)
{
hadMorale = true;
castSpellThisTurn = false;
}
}
void CUnitState::makeGhost()