1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

Extend AI garrison troop removal logic to all RoE campaigns to emulate

H3 logic
This commit is contained in:
Ivan Savenko
2024-11-17 13:52:16 +00:00
parent 4ccce20eda
commit 56ee307b3a
4 changed files with 16 additions and 12 deletions

View File

@@ -90,18 +90,22 @@ std::string StartInfo::getCampaignName() const
return VLC->generaltexth->allTexts[508];
}
bool StartInfo::isSteadwickFallCampaignMission() const
bool StartInfo::isRestorationOfErathiaCampaign() const
{
constexpr std::array roeCampaigns = {
"DATA/GOOD1",
"DATA/EVIL1",
"DATA/GOOD2",
"DATA/NEUTRAL1",
"DATA/EVIL2",
"DATA/GOOD3",
"DATA/SECRET1",
};
if (!campState)
return false;
if (campState->getFilename() != "DATA/EVIL1")
return false;
if (campState->currentScenario() != CampaignScenarioID(2))
return false;
return true;
return vstd::contains(roeCampaigns, campState->getFilename());
}
void LobbyInfo::verifyStateBeforeStart(bool ignoreNoHuman) const