1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

Improvements to bonus system node types / propagators

- Node type is now set on construction and never changes
- Added army propagator that also checks for TOWN and HERO
- Renamed existing propagators to be in sync with enumeration
This commit is contained in:
Ivan Savenko
2025-06-25 17:34:20 +03:00
parent 099053437a
commit 6ac57a7cfc
31 changed files with 145 additions and 124 deletions

View File

@@ -467,7 +467,8 @@ BattleInfo::BattleInfo(IGameInfoCallback *cb, const BattleLayout & layout):
}
BattleInfo::BattleInfo(IGameInfoCallback *cb)
:GameCallbackHolder(cb),
:CBonusSystemNode(BonusNodeType::BATTLE_WIDE),
GameCallbackHolder(cb),
sides({SideInBattle(cb), SideInBattle(cb)}),
layout(std::make_unique<BattleLayout>()),
round(-1),
@@ -477,7 +478,6 @@ BattleInfo::BattleInfo(IGameInfoCallback *cb)
tacticsSide(BattleSide::NONE),
tacticDistance(0)
{
setNodeType(BATTLE);
}
BattleLayout BattleInfo::getLayout() const