1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

revert heroes count as on develop

This commit is contained in:
Mircea TheHonestCTO
2025-08-17 13:36:46 +02:00
parent 004e514fbc
commit c22a248c21

View File

@@ -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);
}