From 86616a5a3b5519ed39da601a26164ecf8578b060 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Mon, 28 Nov 2022 22:47:28 +0200 Subject: [PATCH] Fix visibility of stack amount box on start of combat --- client/battle/CBattleStacksController.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/battle/CBattleStacksController.cpp b/client/battle/CBattleStacksController.cpp index 5f5e259e5..936ef253d 100644 --- a/client/battle/CBattleStacksController.cpp +++ b/client/battle/CBattleStacksController.cpp @@ -260,10 +260,13 @@ bool CBattleStacksController::stackNeedsAmountBox(const CStack * stack) currentActionTarget = target.at(0).hexValue; } - if(!stack->alive()) + if(stack->hasBonusOfType(Bonus::SIEGE_WEAPON) && stack->getCount() == 1) //do not show box for singular war machines, stacked war machines with box shown are supported as extension feature return false; - if(stack->hasBonusOfType(Bonus::SIEGE_WEAPON) && stack->getCount() == 1) //do not show box for singular war machines, stacked war machines with box shown are supported as extension feature + if (!owner->battleActionsStarted) // do not perform any further checks since they are related to actions that will only occur after intro music + return true; + + if(!stack->alive()) return false; if(stack->getCount() == 0) //hide box when target is going to die anyway - do not display "0 creatures"