Passive State: When an enemy or ally dies->get x mp

I have a passive state on an actor I would like to put all this logic into.

In State notebox:
When an enemy or ally dies->get x mp.

At the beginning of the turn, you could maybe check to see if an enemy or ally is affected by death state and if so->get x mp per instance of this. But I would only need that to happen once per character death. I wouldn't want it to repeat every turn on the same character.

Any ideas on how to achieve this?
Perhaps you can override Game_Battler.prototype.refresh to fit your requirement?
In the function there're condition check for when battler hp is 0 then apply deathState. Snap in some function give mp to every battler that have the passive state.

Original thread: https://forums.rpgmakerweb.com/threads/passive-state-when-an-enemy-or-ally-dies-get-x-mp.114241/