1
0
mirror of https://github.com/vcmi/vcmi.git synced 2026-05-22 09:55:17 +02:00

Going to town when nothing to do.

The StayAtTown-behavior now always creates tasks for all heroes to go and stay at a town. It will be treated differently than going to a town for mana in the sense that it is only considered at the lowest priority-tier. So it will only happen when the AI doesn't find anything else to do. It should resolve one of the two main-reasons for losing weak heros.

The hunter-gather-priority-tier now goes strictly by distance for all taks that are considered above 0 in value.
This commit is contained in:
Xilmi
2024-09-06 22:14:59 +02:00
parent 099341e143
commit 0edc17b7d8
3 changed files with 8 additions and 21 deletions
-5
View File
@@ -41,11 +41,6 @@ std::string StayAtTown::toString() const
void StayAtTown::accept(AIGateway * ai)
{
if(hero->visitedTown != town)
{
logAi->error("Hero %s expected visiting town %s", hero->getNameTranslated(), town->getNameTranslated());
}
ai->nullkiller->lockHero(hero, HeroLockedReason::DEFENCE);
}