How can I make a state that drains HP/MP and distributes it evenly to the party on each turn?

I need to make such a state for the game I'm making. Any idea how?
This will likely need a plugin. It certainly needed a script in Ace, and I do not think that anything was added to the editor which would enable this by use of the damage formula box.

I will, however, leave this here for a short while before moving to Plugin Requests, in case someone comes up with a cunning alternative.

EDIT
I assumed that this was draining from an enemy, rather than a character draining their own to share with allies. It would be as well to have that clarified, as my assumption might not have been correct.
From enemy.
You will need Yanfly State & Buff. I tested and works, but if theres any bug I'll be able to solve it only after my work ( 2 AM). Read the comments to adapt it to your need.

Code:
<Custom Regenerate Effect>
// Check if the original caster isn't the target and that the original target is alive.
if (origin !== target && origin.isAlive()) {
  // Determine the damage dealt.
  var damage = target.hp / 8;
  // Round up the damage.
  damage = Math.ceil(damage);
  //
  value = Math.floor(damage / $gameParty.aliveMembers().length);
    target.startAnimation(59);
  // Damage the target's HP.
  target.gainHp(-damage);
  // Check if the target is dead.
  if (target.isDead()) {
  // If the target is dead, make it collapse.
    target.performCollapse();
  }
}
  // Play the healing animation on the original caster.
  for (var i = 0; i < $gameParty.aliveMembers().length; i++) {
    var actor = $gameParty.aliveMembers()[i];
  // Ignore actor if the actor is the target (= Don't damage the target twice)
    if (actor === target) { continue };
    // Actor loses HP
    actor.gainHp(-value);
    actor.startDamagePopup();
    actor.clearResult();
    // Collapse Actor if dead
    };
</Custom Regenerate Effect>

Original thread: https://forums.rpgmakerweb.com/threads/how-can-i-make-a-state-that-drains-hp-mp-and-distributes-it-evenly-to-the-party-on-each-turn.92890/