From 4f78f67d8ff20cb1f1ee8d8ce9a83ad90b164f3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Zaremba?= Date: Fri, 1 May 2026 20:52:19 +0200 Subject: [PATCH] Check path target instead of start for remaining turns --- AI/Nullkiller2/Goals/ExecuteHeroChain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AI/Nullkiller2/Goals/ExecuteHeroChain.cpp b/AI/Nullkiller2/Goals/ExecuteHeroChain.cpp index 470c9fb64..ac40dd0f1 100644 --- a/AI/Nullkiller2/Goals/ExecuteHeroChain.cpp +++ b/AI/Nullkiller2/Goals/ExecuteHeroChain.cpp @@ -245,7 +245,7 @@ void ExecuteHeroChain::accept(AIGateway * aiGw) CGPath path; bool isOk = aiGw->nullkiller->getPathsInfo(hero)->getPath(path, node->coord); - if(isOk && path.nodes.back().turns > 0) + if(isOk && path.nodes.front().turns > 0) { logAi->warn("Hero %s has %d mp which is not enough to continue his way towards %s.", hero->getNameTranslated(), hero->movementPointsRemaining(), node->coord.toString());