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:
committed by
Andrii Danylchenko
parent
400967904b
commit
a39fa51e14
@@ -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)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user