1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fix hero limit check in AI

This commit is contained in:
Ivan Savenko 2023-11-26 18:53:46 +02:00
parent 2c8d0338ba
commit 60ca6f968c

View File

@ -187,7 +187,8 @@ bool HeroManager::heroCapReached() const
int heroCount = cb->getHeroCount(ai->playerID, includeGarnisoned);
return heroCount >= ALLOWED_ROAMING_HEROES
|| heroCount >= VLC->settings()->getInteger(EGameSettings::HEROES_PER_PLAYER_ON_MAP_CAP);
|| heroCount >= VLC->settings()->getInteger(EGameSettings::HEROES_PER_PLAYER_ON_MAP_CAP)
|| heroCount >= VLC->settings()->getInteger(EGameSettings::HEROES_PER_PLAYER_TOTAL_CAP);
}
float HeroManager::getMagicStrength(const CGHeroInstance * hero) const