From 64ad060846388b9959b1edbbe85f8728fcb1067b Mon Sep 17 00:00:00 2001 From: Xilmi Date: Tue, 17 Dec 2024 12:03:46 +0100 Subject: [PATCH] Update RecruitHeroBehavior.cpp closestThreat was supposed to be < 1, not < 0 --- AI/Nullkiller/Behaviors/RecruitHeroBehavior.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AI/Nullkiller/Behaviors/RecruitHeroBehavior.cpp b/AI/Nullkiller/Behaviors/RecruitHeroBehavior.cpp index ef4811ab7..f6c01ef4c 100644 --- a/AI/Nullkiller/Behaviors/RecruitHeroBehavior.cpp +++ b/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);