remove commanders in battle mode

This commit is contained in:
Laserlicht
2026-01-10 16:00:34 +01:00
committed by GitHub
parent e3e0767a56
commit 7d8916bd61
+3
View File
@@ -369,6 +369,9 @@ void TurnOrderProcessor::onGameStarted()
{
auto towns = gameHandler->gameState().getMap().getObjects<CGTownInstance>();
auto heroes = gameHandler->gameState().getMap().getObjects<CGHeroInstance>();
for (auto hero : heroes)
if (auto cmd = hero->getCommander())
const_cast<CCommanderInstance*>(cmd)->setAlive(false); // TODO: support commanders in battle mode setup
if(!towns.size() && heroes.size() == 2)
gameHandler->startBattle(heroes.at(0), heroes.at(1));
else