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

NKAI: reduce double army loss cases

This commit is contained in:
Andrii Danylchenko
2024-07-18 13:37:18 +03:00
parent 73ea0ce7bc
commit 37dc2a38e8
5 changed files with 73 additions and 16 deletions
+9
View File
@@ -26,7 +26,12 @@ ExecuteHeroChain::ExecuteHeroChain(const AIPath & path, const CGObjectInstance *
if(obj)
{
objid = obj->id.getNum();
#if NKAI_TRACE_LEVEL >= 1
targetName = obj->getObjectName() + tile.toString();
#else
targetName = obj->typeName + tile.toString();
#endif
}
else
{
@@ -260,7 +265,11 @@ void ExecuteHeroChain::accept(AIGateway * ai)
std::string ExecuteHeroChain::toString() const
{
#if NKAI_TRACE_LEVEL >= 1
return "ExecuteHeroChain " + targetName + " by " + chainPath.toString();
#else
return "ExecuteHeroChain " + targetName + " by " + chainPath.targetHero->getNameTranslated();
#endif
}
bool ExecuteHeroChain::moveHeroToTile(AIGateway * ai, const CGHeroInstance * hero, const int3 & tile)