MZ User's param in a conditional branch ? (a.param equivalent)

Hi everyone,

In order to make an "action points" based battle system (where a character keeps acting until their MP = 0), I rely on custom formulas for abilities :

-User executes the action ; doesn't end turn since I use a "Instant Use" plugin for abilities.
-Then, if their MP = 0 : End Turn by applying state x ("cannot move")
-Else return 0.
==> That makes my users do their action THEN end their turn if their MP decrease to 0.

A basic attack formula looks like this : "var damage = a.atk * 4 - b.def * 2; b.hp -= damage; a.mp === 0 ? a.addState(31) : 0; damage" I'm not sure if this is the best way to do it, but it works fine.

But, since i'm using VisuStella's Battle Sequences, I'd like to simulate those formulas in Common Events :

So my question is : how to get / use user's MP in a conditional branch ? In other terms, what is the equivalent for "a.mp === 0 ?"

Thanks for your time !
you should be able to use $subject
you should be able to use $subject
Thanks for your answer, how should I use it though ?

I have found a workaround but i'm not sure about it :

in formula I put "$gameVariables.setValue(10, a.mp)", then check if var 10 =/= 0.
$subject.mp should work in the conditional
It does work, ty !

Original thread: https://forums.rpgmakerweb.com/threads/users-param-in-a-conditional-branch-a-param-equivalent.167163/