Yanfly Battle A.I Core Targeting Eval

http://yanfly.moe/2015/10/19/yep-16-battle-a-i-core/

I was having trouble figuring out how to have a skill condition in the AI priority check something about the user of the skill while still being able to target the other party from that condition.

<AI Priority>
Eval user.isStateAffected(13) +++ Random 30%: ■[E]Volte
</AI Priority>

Eventually I realized that using a custom Eval condition would do the job! The above eval checks to see if the user of the skill has a specific state. If they do and the random chance passes, the skill will be performed on the other party.

But I'm unfamiliar with how to use the eval to check other things from the user, such as their HP/MP/TP, etc. Like seeing if their HP is above/below/equal to a certain percentage. Does anyone know this?
Moderator(s), feel free to lock this thread. Got it figured it out. I'll post the solution for anyone who's curious:

Eval user.hpRate()
Will get the Hp rate for the user and it returns a value like .50 (50%).
So when you want to compare it for the condition Eval user.hpRate() === 1: that'll see if it's equal to 1 (100%)

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/yanfly-battle-a-i-core-targeting-eval.81538/