mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
First attempt to replace rule-of-a-thumb behavior with actual reasoning
- GATHER_ARMY goal replaces wander function - Heroes will remember their own goals until they are fulfilled - Goal search handles mutual dependency - AI will recruit multiple heroes for exploration - Lots of tweaks
This commit is contained in:
@ -2889,7 +2889,7 @@ bool CGameHandler::hireHero(const CGObjectInstance *obj, ui8 hid, ui8 player)
|
||||
|
||||
//common preconditions
|
||||
if( (p->resources[Res::GOLD]<2500 && complain("Not enough gold for buying hero!"))
|
||||
|| (getHeroCount(player, false) >= 8 && complain("Cannot hire hero, only 8 wandering heroes are allowed!")))
|
||||
|| (getHeroCount(player, false) >= GameConstants::MAX_HEROES_PER_PLAYER && complain("Cannot hire hero, only 8 wandering heroes are allowed!")))
|
||||
return false;
|
||||
|
||||
if(t) //tavern in town
|
||||
|
Reference in New Issue
Block a user