MV Trying to figure out how to code a weird skill.

Hi, longtime lurker, first-time poster.
I'm using the entire Yanfly suite. Attempting to make a monster skill that has a 75% chance to target the character party, perform the damage animation, and deal a flat, scaling amount of their health - in this case, 50% of max.
The skill also has a 25% chance to instead target the user, perform the damage animation on self, and deal 99,999 true damage instead.
Can anyone walk me through at all how I might manage this using notetag scripting?

Thank you SO MUCH in advance.
use a different approach, and you can do that completely without any plugin.

make two different skills with the same name, one for damaging the user and one for attacking the party. Then set the ratings of both skills in the enemy action pattern so that the one skill is used under the same conditions 25% of the time, while the other is used 75% of the time.

max HP of the target is b.mhp, use that instead of a.atk or whatever.

Finished without any notetag or plugin
You're a genius.

Original thread: https://forums.rpgmakerweb.com/threads/trying-to-figure-out-how-to-code-a-weird-skill.170204/