A passive state that adds Death?

Folks,

I'm working on an alternative death case but the only thing I'm missing is a way to make a passive state activate the death state
once it's triggered. Since passive states work differently, I cannot seem to be able to use the JS Apply Effect, since passives are technically never applied.

Basically, I want a way to recognize when mp = 0, death.

So I created a passive with the mp = 0 requirement, cool, that part works.
Next I need a way for that to either trigger the real death state (#001) and perform the collapse effect (ideally a diiferent one, like no disappear or instant, etc.).

TL;DR: When passive is triggered, user must die.
Hmmm, have you tried changing the gainTp function to add state death if it drops to 0?

edit: though I think you'd have to change more than one spot
edit2: and since it seems it's not as simple as changing 1 spot, it doesn't necessarily work with VisuStella LOL
Is there a way to get the current target / all target mp/tp values from a script for a branch then? I could use that in a conditional at the action sequence and then apply the death state, maybe.
Well you could put for every actor VS BattleCore notetags <JS Post-Apply as User> and <JS Post-Apply as Target> to add state death if their tp is at 0. But of course that leaves still possible situations where they aren't killed if their tp goes to 0 (for example if you have some kind of tp drain going on).

Original thread: https://forums.rpgmakerweb.com/threads/a-passive-state-that-adds-death.175270/