From c22a248c21d49cba4c5beb5bb9adbcc851766c49 Mon Sep 17 00:00:00 2001 From: Mircea TheHonestCTO Date: Sun, 17 Aug 2025 13:36:46 +0200 Subject: [PATCH] revert heroes count as on develop --- AI/Nullkiller2/Analyzers/HeroManager.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/AI/Nullkiller2/Analyzers/HeroManager.cpp b/AI/Nullkiller2/Analyzers/HeroManager.cpp index ea8a353ce..1bee2eb0b 100644 --- a/AI/Nullkiller2/Analyzers/HeroManager.cpp +++ b/AI/Nullkiller2/Analyzers/HeroManager.cpp @@ -196,9 +196,8 @@ float HeroManager::evaluateHero(const CGHeroInstance * hero) const bool HeroManager::heroCapReached(bool includeGarrisoned) const { int heroCount = cc->getHeroCount(aiNk->playerID, includeGarrisoned); - int maxAllowed = 1 + cc->howManyTowns() * aiNk->settings->getMaxRoamingHeroes(); - return heroCount >= maxAllowed + return heroCount >= aiNk->settings->getMaxRoamingHeroes() || heroCount >= cc->getSettings().getInteger(EGameSettings::HEROES_PER_PLAYER_ON_MAP_CAP) || heroCount >= cc->getSettings().getInteger(EGameSettings::HEROES_PER_PLAYER_TOTAL_CAP); }