1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Nullkiller AI: basic hill fort support and hero chain reworked to start from stronger army

This commit is contained in:
Andrii Danylchenko
2021-05-16 14:15:12 +03:00
committed by Andrii Danylchenko
parent 400967904b
commit a39fa51e14
11 changed files with 275 additions and 44 deletions

View File

@@ -172,8 +172,13 @@ Goals::TGoalVec StartupBehavior::getTasks()
{
for(const CGTownInstance * town : towns)
{
if(town->garrisonHero && town->garrisonHero->movement && ai->nullkiller->getHeroLockedReason(town->garrisonHero) != HeroLockedReason::DEFENCE)
if(town->garrisonHero
&& town->garrisonHero->movement
&& !town->visitingHero
&& ai->nullkiller->getHeroLockedReason(town->garrisonHero) != HeroLockedReason::DEFENCE)
{
tasks.push_back(Goals::sptr(ExchangeSwapTownHeroes(town, nullptr).setpriority(0.0001f)));
}
}
}