mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
Fix. Don't skip usual condition.
This commit is contained in:
parent
3eb5de9534
commit
bf20b165ec
@ -3312,8 +3312,9 @@ bool shouldVisit(HeroPtr h, const CGObjectInstance * obj)
|
|||||||
case Obj::TAVERN:
|
case Obj::TAVERN:
|
||||||
{//TODO: make AI actually recruit heroes
|
{//TODO: make AI actually recruit heroes
|
||||||
//TODO: only on request
|
//TODO: only on request
|
||||||
return (ai->myCb->getHeroesInfo().size() < VLC->modh->settings.MAX_HEROES_ON_MAP_PER_PLAYER) &&
|
if ((ai->myCb->getHeroesInfo().size() >= VLC->modh->settings.MAX_HEROES_ON_MAP_PER_PLAYER) ||
|
||||||
(ai->myCb->getResourceAmount()[Res::GOLD] - GOLD_RESERVE >= GameConstants::HERO_GOLD_COST);
|
(ai->myCb->getResourceAmount()[Res::GOLD] - GOLD_RESERVE < GameConstants::HERO_GOLD_COST))
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case Obj::BOAT:
|
case Obj::BOAT:
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user