From 80e92314a05da6c52057ebc4cfb864f8b977debd Mon Sep 17 00:00:00 2001 From: doug1234 Date: Mon, 1 Jan 2024 23:05:49 -0500 Subject: [PATCH] Fixed bug causing enimies to cast healing spells on PCs. --- TemplePlus/ai.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TemplePlus/ai.cpp b/TemplePlus/ai.cpp index d11749f0c..0c41761b5 100644 --- a/TemplePlus/ai.cpp +++ b/TemplePlus/ai.cpp @@ -1424,6 +1424,8 @@ BOOL AiSystem::TargetFriendHurt(AiTactic * aiTac) auto performer = aiTac->performer; auto lowest = 70; auto N = combatSys.GetInitiativeListLength(); + aiTac->target = 0; + for (auto i = 0; i < N; i++) { auto combatant = combatSys.GetInitiativeListMember(i); if (!combatant || !critterSys.IsFriendly(performer, combatant))