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:
committed by
Andrii Danylchenko
parent
a39fa51e14
commit
17a960e850
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user