YEP Battle AI: State

Hi,

I'm attempting to configure Yanfly's Battle AI Core such that an enemy will only use a move if the target isn't affected by a state. The instructions seem pretty straightforward with: STATE !== state x, but this doesn't seem to do anything at all for me. Enemies just ignore it and keep using the move over and over again while the state is applied.

If anyone has any ideas, it would be appreciated.
It would be better to show a print screen or something about your note field. Looks like a badly set notetag.
Hey buddy, I gotchya covered (I think).
A similar problem was making me pull my hair out.

By default, it can only check for a state (or lack thereof) in the target scope. So, if it's a skill that targets party members, it only checks allies as available targets and the same is true for skills that target enemies.

In my game I wanted to have enemies behave differently based on which row they were in. Since the rows are states, I had to check, no matter what skill was going to be used, if they had a specific row state.

Like so:
Code:
Eval user.isStateAffected(11) +++ Eval user.hpRate() < 0.9 +++ Random 30%:  (Skill name, etc.)

This code checks to see if the user doesn't have a state:
Code:
Eval !user.isStateAffected(13)

So I imagine you would just replace "!user" with "!target"?
Thanks Adam, I'll give it a shot!

Original thread: https://forums.rpgmakerweb.com/threads/yep-battle-ai-state.83378/