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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user