Enemies are curing the same ally

Hello. I am creating my first enemy's troops. In these troops, there are two enemies who are primarily healers and three enemies who are primarily attackers. The problem is that the healers always heal the same ally. It doesn't matter how many times I fight against these troops, the healers will inevitably only cure the ally situated most of the right.

Why is this happening?
I really don't know why this is happening, but maybe you could try and fix it with Yanfly's Advanced Enemy AI plugin. It makes the enemies smarter, and might fix this.
Hello. I am creating my first enemy's troops. In these troops, there are two enemies who are primarily healers and three enemies who are primarily attackers. The problem is that the healers always heal the same ally. I doesn't matter how many times I fight against these troops, the healers will inevitably only cure the ally situated most of the right.

Why is this happening?
Can you give me a picture of the enemies and troops?

I really don't know why this is happening, but maybe you could try and fix it with Yanfly's Advanced Enemy AI plugin. It makes the enemies smarter, and might fix this.
How can VXAce use plugin?
most likely you messed up with target rate features - that is what gives the probability of targeting each enemy on random target.


there are a few other possibilities, but we would have to see the troop and the skill data to do more than guessing.
Can you give me a picture of the enemies and troops?


How can VXAce use plugin?
I honestly don't know. I myself use MV, not VX or VX Ace. I was just trying to help.
Code:
##Small fixes by Lone Wolf

##Randomized Enemy Self-Targeting
# By default, enemy actions set to target a member of their own group will
# always, without exception, target the last enemy in the list, making buffs
# and healing commands essentially worthless when given to groups of enemies.
# This patch implements an extra step to keep enemies from skipping target
# selection for ally actions.

class Game_Action
  def targets_for_friends
    if item.for_user?
      [subject]
    elsif item.for_dead_friend?
      if item.for_one?
        [friends_unit.smooth_dead_target(@target_index)]
      else
        friends_unit.dead_members
      end
    elsif item.for_friend?
      if item.for_one?
        if @target_index < 0
          [friends_unit.random_target]
        else
          [friends_unit.smooth_target(@target_index)]
        end
      else
        friends_unit.alive_members
      end
    end
  end
end

This is a known never-fixed problem. Add this script into your script list, above Main but below the others. It should fix your issue. Credit goes to Lone Wolf.
Thank you all for taking some time looking at my issue! Specially for Shiro-chan, because the Lone Wolf's script worked perfectly as intended.

Although I didn't test it, I think I might have messed up something as Andar put it. It's an old project and I make some edits in the scripts from time to time.

Original thread: https://forums.rpgmakerweb.com/threads/enemies-are-curing-the-same-ally.147769/