How to setup Team attacks (duo, trio, quad/unison)

So I've got an idea for special attacks, that would be based on who's in the party (similar to Mario RPG remake) and I figure I'll implement it similar to how Gen 5 pokemon did (the three pledge moves specifically, fire, water and grass pledge). The moves would have priority, and would go something like this:
1. Red began charging power
2.Blue began charging power
3.Green used Trio attack Rainbow Blitz!

I figured I could implement it via switches, where the selectable move would check for the other switches that are on, but what if the player were to mis-input on the last character, how can I have those switches turn off?

Also, would I be able to make a damage formula like /p[1] atk + /p[2] atk + /p[3] atk - b. Def?
Victor Engine has a plugin that can do that.

1709178122203.png

Original thread: https://forums.rpgmakerweb.com/threads/how-to-setup-team-attacks-duo-trio-quad-unison.166286/