소스 검색

Update BuyArmyBehavior.cpp

No longer saving money for city-halls when city-halls cannot be built.
Xilmi 1 년 전
부모
커밋
b0e4551dbf
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;
 		}