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

Fix handling of opening spells when tactics is present

This commit is contained in:
Ivan Savenko 2023-08-31 01:32:32 +03:00
parent 3e169ef2f5
commit 0f4f9b3233
2 changed files with 7 additions and 0 deletions

View File

@ -507,6 +507,12 @@ void BattleFlowProcessor::onActionMade(const BattleAction &ba)
{
const auto & battle = gameHandler->gameState()->curB;
if (ba.actionType == EActionType::END_TACTIC_PHASE)
{
onTacticsEnded();
return;
}
const CStack * actedStack = battle->battleGetStackByID(ba.stackNumber, false);
const CStack * activeStack = battle->battleGetStackByID(battle->getActiveStackID(), false);

View File

@ -39,6 +39,7 @@ class BattleProcessor : boost::noncopyable
std::unique_ptr<BattleFlowProcessor> flowProcessor;
std::unique_ptr<BattleResultProcessor> resultProcessor;
void onTacticsEnded();
void updateGateState();
void engageIntoBattle(PlayerColor player);