YEP Battle A.I Core Bug

I made o Tech class enemy who gives shield to his allies.But a problem occur.I put it a A.I code to prevent him from giving the shield randomly but when ı do that my actors cannot perform any attack skill.İnterestingly they can perform heal or buff skills but they cannot attack to tech.This is only happening when the Tech alone.If there is an ally next to it, there will be no problems until that ally dies and then same problem occur again.I controlled everything one by one.When i delete the A.I Code there is no problem.But i when ı put the code that bug occures.Heres the enemy notes:
<DragonBone Settings>

Battler: BladeMaster
Scalex: -0.77
Scaley: 0.77
Width: 420
Height: 433


Ani Wait: Idle
Ani Walk: Idle
Ani Attack: Attack A
Ani Swing: Attack B
Ani Thrust: Attack C
Ani Missile: Attack A
Ani Skill: Attack A
Ani Chant: Idle
Ani Spell: Attack A
Ani Item: Attack A
Ani Guard: Guard
Ani Evade: Idle
Ani Damage: Damage
Ani Abnormal: Idle
Ani Sleep: Idle
Ani Dying: Idle
Ani Dead: Dead
Ani Victory: Idle
Ani Escape: Idle

Replace Sprite
</DragonBone Settings>



<AI Level: 120>
<AI Priority>
HP% param <= 70%: Guard, Lowest HP%
</AI Priority>


With this code this problem occures:
bug1.png
bug2.png

When ı delete the A.I code and make the enemy note like this no problem occured:
<DragonBone Settings>

Battler: BladeMaster
Scalex: -0.77
Scaley: 0.77
Width: 420
Height: 433


Ani Wait: Idle
Ani Walk: Idle
Ani Attack: Attack A
Ani Swing: Attack B
Ani Thrust: Attack C
Ani Missile: Attack A
Ani Skill: Attack A
Ani Chant: Idle
Ani Spell: Attack A
Ani Item: Attack A
Ani Guard: Guard
Ani Evade: Idle
Ani Damage: Damage
Ani Abnormal: Idle
Ani Sleep: Idle
Ani Dying: Idle
Ani Dead: Dead
Ani Victory: Idle
Ani Escape: Idle

Replace Sprite
</DragonBone Settings>
bug3.png

Will you help me pls?Thank you in advance
NOTE: THİS PROBLEM BEGİNS WHEN I START THE BATTLE INSTANTLY.
@killdude It looks like the AI code you're using is telling the enemy to prioritize Guard and Lowest HP% attacks as soon as it is reduced to 70% or less HP itself. Since the actors probably go first in the battle and there are two of them, they may be reducing the AI enemy to 70% before it ever gets its first turn. Hence, it only considers its priority. 🤔 Try lowering the HP% param <= 70%: Guard, Lowest HP% from 70 to, say...30 and see if that makes a difference. Hoping it helps. 🙂
No i dont reduce its health to %70 at the start of the battle and tried what you say no difference...I guess, when the tech is alone, I can only attack when it has %70 health or below.But isnt that ridiculous?I can't understand the problem since I don't know the coding ı guess 😀
I've tried a lot and found the problem.Its not about battle ai core.I guess its Selection Control plugin.When i add this code to skills note this problem occures.I guess ım doing something wrong but i cant find it.
Guard skill:Its a shield skill that gives barrier to allies.(Using by enemy)
Skill notes:
<Select Conditions>
Not User
Not State: Knockout
</Select Conditions>
Enemy Notes:
<AI Level: 120>
<AI Priority>
HP% param <= 50%: Guard, Lowest HP%
</AI Priority>

I've moved this thread to Plug-In Support. Thank you.

I've tried a lot and found the problem.Its not about battle ai core.I guess its Selection Control plugin.When i add this code to skills note this problem occures.I guess ım doing something wrong but i cant find it.
Guard skill:Its a shield skill that gives barrier to allies.(Using by enemy)
Skill notes:
<Select Conditions>
Not User
Not State: Knockout
</Select Conditions>
Enemy Notes:
<AI Level: 120>
<AI Priority>
HP% param <= 50%: Guard, Lowest HP%
</AI Priority>
If your allies aren't able to attack or otherwise use offensive abilities on the only enemy on screen, that enemy has a state that is making him un-targetable. Selection control definitely has this ability. It sounds like your issue isn't battle A.I. at all, but either a tag on the enemy, or on the state that the guard skill puts on him which prevents it from being targetted by a normal attack.
If your allies aren't able to attack or otherwise use offensive abilities on the only enemy on screen, that enemy has a state that is making him un-targetable. Selection control definitely has this ability. It sounds like your issue isn't battle A.I. at all, but either a tag on the enemy, or on the state that the guard skill puts on him which prevents it from being targetted by a normal attack.
But isn't it strange that I can attack when it has an ally?Then how should I write this skill?When i dont use battle ai code no problem happens with this selection control code.I guess there is a conflict between this plugins or i missunderstand something.

Original thread: https://forums.rpgmakerweb.com/threads/yep-battle-a-i-core-bug.109526/