From 4b807e01f1e4d490f315374468a26356d873de40 Mon Sep 17 00:00:00 2001 From: Andrii Danylchenko Date: Sun, 27 Aug 2023 20:44:03 +0300 Subject: [PATCH] BattleAI: fix freeze --- AI/BattleAI/AttackPossibility.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AI/BattleAI/AttackPossibility.cpp b/AI/BattleAI/AttackPossibility.cpp index 91cc7f62f..9a34420ea 100644 --- a/AI/BattleAI/AttackPossibility.cpp +++ b/AI/BattleAI/AttackPossibility.cpp @@ -30,7 +30,7 @@ void DamageCache::buildDamageCache(std::shared_ptr hb, int sid { auto stacks = hb->battleGetUnitsIf([=](const battle::Unit * u) -> bool { - return true; + return u->isValidTarget(); }); std::vector ourUnits, enemyUnits;