State for sharing MP

Hello everyone!

I am trying to make a passive state that will make the user having it share MP with another party member but use a percentage amount of that party member's MP and also consume MP upon each end of turn.

I assumed I needed two states for that. One state will be the passive state and the other will be a state which that passive state will detect and know who to share MP with.

Just as a demonstration, let's say Battler A has the state that makes it share MP with Battler B.
Battler A has 1000 MPs
Battler B has 100 MPs

Battler A uses a skill that costs 10 MPs
Battler B loses 1 MPs

The turn is over, Battler A loses 100 MPs and Battler B loses 10 MPs.

I am using yanfly's plugins by the way.

Thanks in advance!
Bump
Bump
Bump

Original thread: https://forums.rpgmakerweb.com/threads/state-for-sharing-mp.105365/