MV Help on how to make an enemy AI not target itself

Sorry for the confusing title, I'm bad with words.

Hi I'm currently using Yanfly's Battle A.I. Core and was wondering if it was possible to make it so the AI can't use a skill on itself.

Example: This enemy is a healer type and casts the skill "Boost" when one of their allies is below 50%, the problem is that if it's below 50% Itself it will cast it upon itself, which I don't want.

What I did is try and make an exception to it but it didn't seem to work.

<AI Level: 100>

<AI Priority>

HP% param <= 50% +++ Eval user.name() !== 'Bee Medic': Skill 11, Lowest HP%

</AI Priority>

I was wondering if I could get some help with this, thank you.
Use Yanfly's Selection Control on the skill, give it
Code:
<Select Conditions
Not User
</Select Conditions>
Eval user.name()
your eval doesnt seem to do what you'd want if it does anything. unless the enemy's name changes, that is either going to be always true or always false. it would make sense to change it to target, but that brings up an issue with "target" in the that plugin's eval code and you'd need a separate plugin to get around

without using any additional plugins however, you could use a state that you place on the medics at the start of the fight with a troop event and then say in the ai that boost cant be used on target with that state on with the provided state check.
you could also try to use their parameters as a way to filter them out of their target pool. like if a medic has 27 atk, it can only be used on targets with 28 or greater, etc.
These answers are both incredibly helpful, thank you both. I'll experiment with Robro's in the future considering there are a few things in mind I wish to try and do with the AI.

once again thank you both.
you'd need a separate plugin to get around
Just to humbly plug myself, I have an edit for that in my tweaks thread which allows the dev to simply use target in evals. No need for more complicated AIManager functions or whatnot.

But, agreed, that's not helpful in this case at all.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/help-on-how-to-make-an-enemy-ai-not-target-itself.174295/