help with skill that heals allies and damages enemies?

Title is pretty self explanatory for what i'm trying to accomplish, but ill go into detail in case it isn't

The skill im trying to make would deal damage to all enemy units, but also heal all of the users allies (including themselves). The problem i'm encountering is that normally, Rpg maker will only allow a skill to target either all enemies, or all allies. Im not 100% sure how i'm going to have this work since i want the skill to affect both parties at the same time, but also that i want them to have different effects on both Allies and enemies respectively

edit: heres a link to the ability im trying to replicate https://epicbattlefantasy.fandom.com/wiki/Power_Metal
won't work without scripting.

If you only want to affect the skill user, you could have used damage formula coding - but since it is all allies healing and all enemies damage, you'll need a full script for additional effects, something like Yanfly's lunatic codes.
If you only want to affect the skill user, you could have used damage formula coding
Or, replace the "skill user" with all allies, that might work too.
Code:
$game_party.alive_members.each {|actor| actor.hp += 100}; a.atk * 4 - b.def * 2

Edit:
This has an unintended effect.
If this targets 4 enemies, you get 400 +hp. If you only target one, you get 100 +hp.
(Which probably could be an interesting skill on its own)
the code theo gave(with the unintended effect) actually makes the skill better than what i was originally going for. usually, with power metal, you could just spam it as much as you want and reap the same benefits. Theo's version actually gives incentives for saving it for group battles instead of spamming it all the time.

the only issue is that the damages scales, but not the health regen. i tried replacing the {|actor| actor.hp += 100} part with {|actor| actor.hp += a.atk * 2}, but that just made the mode do no healing and 0 damage (probably just forgot parenthesis)

edit: it was Parenthesis
Why don't you just leave the damage formula blank, set the skill to target the user, and attach a common event? The common event can then deal damage to the entire enemy party, and heal the entire ally party.
Edit:
This has an unintended effect.
The problem with that method is that the damage formula is executed once for every hit - if you fight eight nemeies that means it can be executed up to eight times.
That doesn't matter is you want to add a state to the skill user (adding a state eight times doesn't change that it is only once on the user), but if you do a mathematical add...
The problem with that method is that the damage formula is executed once for every hit
Technically, that also works the same way "if you only want it to affect the skill user" for all enemies target. Unless you add "as long as it's only a single target spell" somewhere in your sentence.

Edit:
That doesn't matter is you want to add a state to the skill user (adding a state eight times doesn't change that it is only once on the user)
Technically (again) this also works the same if you replace the skill user with all allies.

Original thread: https://forums.rpgmakerweb.com/threads/help-with-skill-that-heals-allies-and-damages-enemies.120083/