Browse Source

Merge pull request #3960 from vcmi/fix-3941

#3941 - recruit hero when no heroes
DjWarmonger 1 year ago
parent
commit
560d53a07c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      AI/Nullkiller/Engine/Nullkiller.cpp

+ 1 - 1
AI/Nullkiller/Engine/Nullkiller.cpp

@@ -354,7 +354,7 @@ void Nullkiller::makeTurn()
 		decompose(bestTasks, sptr(GatherArmyBehavior()), MAX_DEPTH);
 		decompose(bestTasks, sptr(GatherArmyBehavior()), MAX_DEPTH);
 		decompose(bestTasks, sptr(StayAtTownBehavior()), MAX_DEPTH);
 		decompose(bestTasks, sptr(StayAtTownBehavior()), MAX_DEPTH);
 
 
-		if(cb->getDate(Date::DAY) == 1)
+		if(cb->getDate(Date::DAY) == 1 || heroManager->getHeroRoles().empty())
 		{
 		{
 			decompose(bestTasks, sptr(StartupBehavior()), 1);
 			decompose(bestTasks, sptr(StartupBehavior()), 1);
 		}
 		}