1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Nullkiller: gold preasure and turn variables for priority evaluation. Tweaking building behavior

This commit is contained in:
Andrii Danylchenko
2021-05-16 14:19:00 +03:00
committed by Andrii Danylchenko
parent a39fa51e14
commit 17a960e850
23 changed files with 479 additions and 194 deletions

View File

@@ -84,7 +84,7 @@ void Nullkiller::updateAiState()
{
auto lockedReason = getHeroLockedReason(hero.h);
return lockedReason == HeroLockedReason::DEFENCE || lockedReason == HeroLockedReason::STARTUP;
return lockedReason == HeroLockedReason::DEFENCE;
});
ai->ah->updatePaths(activeHeroes, true);
@@ -134,6 +134,13 @@ void Nullkiller::makeTurn()
return;
}
if(bestTask->priority < MIN_PRIORITY)
{
logAi->trace("Goal %s has too low priority. It is not worth doing it. Ending turn.", bestTask->name());
return;
}
logAi->debug("Trying to realize %s (value %2.3f)", bestTask->name(), bestTask->priority);
try