Skip to content

Commit

Permalink
Merge pull request #746 from doug1234/ThanksForTheHelp
Browse files Browse the repository at this point in the history
Fixed bug causing enemies to cast healing spells on PCs.
  • Loading branch information
doug1234 authored Jan 12, 2024
2 parents 402ce6e + 038cc33 commit 71c7313
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions TemplePlus/ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1422,6 +1422,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))
Expand Down

0 comments on commit 71c7313

Please sign in to comment.