Browse Source

Update RecruitHeroBehavior.cpp

closestThreat was supposed to be < 1, not < 0
Xilmi 10 months ago
parent
commit
64ad060846
1 changed files with 1 additions and 1 deletions
  1. 1 1
      AI/Nullkiller/Behaviors/RecruitHeroBehavior.cpp

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

@@ -98,7 +98,7 @@ Goals::TGoalVec RecruitHeroBehavior::decompose(const Nullkiller * ai) const
 			for(auto hero : availableHeroes)
 			{
 				if ((town->visitingHero || town->garrisonHero) 
-					&& closestThreat < 0
+					&& closestThreat < 1
 					&& hero->getArmyCost() < GameConstants::HERO_GOLD_COST / 3.0)
 					continue;
 				auto score = ai->heroManager->evaluateHero(hero);