From 1e28135a8ef651631408bc98d21183f59d62d1f4 Mon Sep 17 00:00:00 2001 From: WinterSolstice8 <60417494+wintersolstice8@users.noreply.github.com> Date: Sat, 11 May 2024 11:17:20 -0600 Subject: [PATCH] [core] Fix targetfind bug with Majesty/Accession cures --- src/map/ai/helpers/targetfind.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/map/ai/helpers/targetfind.cpp b/src/map/ai/helpers/targetfind.cpp index 74abb342724..018ecb5d13d 100644 --- a/src/map/ai/helpers/targetfind.cpp +++ b/src/map/ai/helpers/targetfind.cpp @@ -461,7 +461,9 @@ bool CTargetFind::validEntity(CBattleEntity* PTarget) } // If offensive, don't target other entities with same allegiance - if ((m_targetFlags & TARGET_ENEMY) && m_PBattleEntity->allegiance == PTarget->allegiance) + // Cures can be AoE with Accession and Majesty, ideally we would use SPELLGROUP or some other mechanism, but TargetFind wasn't designed with that in mind + if ((m_targetFlags & TARGET_ENEMY) && !(m_targetFlags & TARGET_PLAYER_PARTY) && + m_PBattleEntity->allegiance == PTarget->allegiance) { return false; }