瀏覽代碼

NKAI: fix heroes not recruited

Andrii Danylchenko 2 年之前
父節點
當前提交
1eabb738dc
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      AI/Nullkiller/Behaviors/RecruitHeroBehavior.cpp

+ 1 - 1
AI/Nullkiller/Behaviors/RecruitHeroBehavior.cpp

@@ -84,7 +84,7 @@ Goals::TGoalVec RecruitHeroBehavior::decompose() const
 				}
 			}
 
-			if(treasureSourcesCount < 5)
+			if(treasureSourcesCount < 5 && (town->garrisonHero || town->getUpperArmy()->getArmyStrength() < 10000))
 				continue;
 
 			if(cb->getHeroesInfo().size() < cb->getTownsInfo().size() + 1