1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-14 10:12:59 +02:00

Update BuyArmyBehavior.cpp

No longer saving money for city-halls when city-halls cannot be built.
This commit is contained in:
Xilmi 2024-08-07 01:35:17 +02:00
parent f4c0bee003
commit b0e4551dbf

View File

@ -48,7 +48,7 @@ Goals::TGoalVec BuyArmyBehavior::decompose(const Nullkiller * ai) const
}
}
if (ai->buildAnalyzer->isGoldPressureHigh() && !town->hasBuilt(BuildingID::CITY_HALL))
if (ai->buildAnalyzer->isGoldPressureHigh() && !town->hasBuilt(BuildingID::CITY_HALL) && cb->canBuildStructure(town, BuildingID::CITY_HALL) != EBuildingState::FORBIDDEN)
{
return tasks;
}