Yesterday, I thought that a user consumed 20% of his MHP and restored 20% of his MHP for the team, but this script seems to be unusable in battle. Once used, an error will be displayed, and there will be no error in other places
var c = $gameParty._targetActorId
var b = $gameActors.actor(c)
var d = Math.round(-0.4 * b.mhp)
var KO = true
Game_Interpreter.prototype.changeHp.call(this, b, d, KO);
var a = $gameActors.actor(c).mhp
$gameParty.members().forEach(function(m){
m.gainHp(Math.round((a * 0.2)));
});