Browse Source

Update BuyArmyBehavior.cpp

No longer saving money for city-halls when city-halls cannot be built.
Xilmi 1 year ago
parent
commit
b0e4551dbf
1 changed files with 1 additions and 1 deletions
  1. 1 1
      AI/Nullkiller/Behaviors/BuyArmyBehavior.cpp

+ 1 - 1
AI/Nullkiller/Behaviors/BuyArmyBehavior.cpp

@@ -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;
 			return tasks;
 		}
 		}