RMVXAce Formula for taking MP and transferring to an ally

My apologies if this has been submitted elsewhere...

I'm working on trying to set up a Skill called 'Take and Give' that takes MP from all enemies and spreads it evenly to all allies, including the caster.

The skill would be double the MAT of the caster for the 'MP Absorb' damage.

Anyone done this before, or know enough about the formula bar in VX Ace to give this a go?
I don't have a solution in hand for you that meets exactly what you're asking for...

Could you list out what battle scripts you're using? Someone might be able to give you a solution that way.

So, an alternative solution would be something like this...

Prework:

Create a status called MP Regen that lasts only 2 turns or modify the default one to suit your needs.

Create a common event called MP Regen. Set Trigger to 'none' 

--Change State: Entire Party, + [MP Regen]

--Exit Event Processing

Create the following skill:

Ability - Aura of Magic

Description - Steal MP from enemies and grant party MP Regen for 2 turns.

You can work out the cost and everything else. But the important tidbits you'll need...

Scope: All Enemies

Occasion: Only in Battle

Damage Type: MP Damage

Effects:

--Other - Common Event - MP Regen
Thanks, Zortik.

I backloaded a ton of scripts, and am trying to get them to play nice together.

YEA Battle Engine is the main one. (Yanfly)

Shadowmaster9000 Beastiary (love it!)

I also have a Summons and Pets script (compatible version, from VLUE)

I'm also going to try to implement the Animated Battlers VLUE came out with, using modified HOLDER images.

Additional scripts for the project give icons, TP management, upgraded message and status panels.

Yanfly updated Shops and Items.

Like I said, a ton of scripts, thousands of lines of code.

Original thread: https://forums.rpgmakerweb.com/threads/rmvxace-formula-for-taking-mp-and-transferring-to-an-ally.51036/