Browse Source

Update BuyArmyBehavior.cpp

Removed pointless check for hero-army being more valuable than buying army directly as it was never the case anyways.
Xilmi 1 year ago
parent
commit
d9fe8d7fa0
1 changed files with 0 additions and 11 deletions
  1. 0 11
      AI/Nullkiller/Behaviors/BuyArmyBehavior.cpp

+ 0 - 11
AI/Nullkiller/Behaviors/BuyArmyBehavior.cpp

@@ -39,17 +39,6 @@ Goals::TGoalVec BuyArmyBehavior::decompose(const Nullkiller * ai) const
 
 	for(auto town : cb->getTownsInfo())
 	{
-		//If we can recruit a hero that comes with more army than he costs, we are better off spending our gold on them
-		if (ai->heroManager->canRecruitHero(town))
-		{
-			auto availableHeroes = ai->cb->getAvailableHeroes(town);
-			for (auto hero : availableHeroes)
-			{
-				if (hero->getArmyCost() > GameConstants::HERO_GOLD_COST)
-					return tasks;
-			}
-		}
-
 		uint8_t closestThreat = UINT8_MAX;
 		for (auto threat : ai->dangerHitMap->getTownThreats(town))
 		{