瀏覽代碼

Hero hiring adjustments

The AI is now a lot more likely to buy a hero early on when that hero's army is worth more than half the cost of the hero, regardless of other circumstances.
Xilmi 1 年之前
父節點
當前提交
34b8123fba
共有 2 個文件被更改,包括 2 次插入1 次删除
  1. 1 1
      AI/Nullkiller/Analyzers/ObjectClusterizer.cpp
  2. 1 0
      AI/Nullkiller/Behaviors/RecruitHeroBehavior.cpp

+ 1 - 1
AI/Nullkiller/Analyzers/ObjectClusterizer.cpp

@@ -505,7 +505,7 @@ void ObjectClusterizer::clusterizeObject(
 		else if (priority <= 0)
 			continue;
 
-		bool interestingObject = path.turn() <= 2 || priority > 0.5f;
+		bool interestingObject = path.turn() <= 2 || priority > ai->settings->isUseFuzzy() ? 0.5f : 0;
 
 		if(interestingObject)
 		{

+ 1 - 0
AI/Nullkiller/Behaviors/RecruitHeroBehavior.cpp

@@ -124,6 +124,7 @@ Goals::TGoalVec RecruitHeroBehavior::decompose(const Nullkiller * ai) const
 	{
 		if (ai->cb->getHeroesInfo().size() == 0
 			|| treasureSourcesCount > ai->cb->getHeroesInfo().size() * 5
+			|| bestHeroToHire->getArmyCost() > GameConstants::HERO_GOLD_COST / 2.0
 			|| (ai->getFreeResources()[EGameResID::GOLD] > 10000 && !ai->buildAnalyzer->isGoldPressureHigh() && haveCapitol)
 			|| (ai->getFreeResources()[EGameResID::GOLD] > 30000 && !ai->buildAnalyzer->isGoldPressureHigh()))
 		{