State applied when you run out of MP

I guess you could say this is two questions, 1 is "how would I do this?" and the other
is "should I do this?"
I'm considering both.
I tried putting this
"State #21 will be automatically added when MP reaches 0." However, it didn't seem to do anything in game.
The state would lower both ATK and MAT by 50% while active.

The game already has a strong focus on ELEMENTS and TP, and I don't want the game to be too complicated, so I'm considering scrapping the idea, but I'm still at least curious how this would actually be done.
Any ideas?
Thanks
I tried putting this
"State #21 will be automatically added when MP reaches 0." However, it didn't seem to do anything in game.

obviously it didn't do anything, that isn't how it works.
This could be done with YEP Passive States, make the character have a passive state which checks for their current MP. when it reaches 0, it applies the state. Then, once applied, the new state will continue to check current MP, such that it will remove itself when MP reaches 1 or higher.

Oh, nvm, follow what Cythera said, that cuts out an extra step and makes it easier than what I said.
HOW you do this is pretty easy; if you SHOULD do this is another conversation haha.
How: Use passive states, give the actors you want this to apply to the passive state, and have this in the state's notebox:
<Passive Condition: MP Below 1>
So the state is active whenever the actor's MP is below 1. That's the simplest way I can think of.
Should you? Um, totally depends on your combat system. The penalty seems high to me, but if your combat system revolves around using skills and your basic attack = useless, then you'll need MP to use those skills anyway, so the penalty won't matter. My suggestion: play with the idea; I think it could 100% be a cool mechanic if done properly, and if balanced. Punish the player for not watching their resources carefully enough? Love it - in the right style of game.
issue usually is getting to exactly 0 MP. any MP regen effects practically cancels out this kinda feature.
and if could easyly end up with 1-5MP but nothing to spend them on.
gotta weigh the odds of having exactly 0MP vs just having less then 5-10%

this would work if its a stamina system where every actor just losing MP every turn,
or if it gives a buff to give a playstyle option, "keep MP to burn tough fight or just burn ur MP normally to have stronger basic actions
The way I was thinking of making it more valuable was that perhaps some enemies might remove MP instead of HP, though that would likely make the battle system even more complex than it already is, which isn't super complex for an RPG, but generally, less is more, and I want the game to be fairly accessible, so I'm seriously considering dropping the idea.
Thankyou for pointing me in the direction of passive states though, that looks like a pretty cool plugin, but of course, Yanfly's plugins usually are.

Original thread: https://forums.rpgmakerweb.com/threads/state-applied-when-you-run-out-of-mp.128951/