Rock-Scissors-Paper style battle

Hello,

I am trying to make a rock-scissors-paper-style battle system.
I think there maybe exists a thread regarding this system; if so, please let me know.

Each skill has 1 of 3 types (rock/scissors/paper).

e.g.
skill a / skill b / skill c / ...: Rock
skill A / skill B / skill C / ...: Scissors
skill 1 / skill 2 / skill 3 / ...: Paper

Below is the idea that I have in mind to implement it:

Idea

Each skill has declaration & action skill slots so that

Declaration: adds a state (rock/scissors/paper)​
Action: performs the actual action only if the actor wins against the opponent in the skill type (rock/scissors/paper)​

The battle flow is:

Turn 1​
Declare skill a: adds 'rock' state to the actor​
The enemy also declares a skill, and one of the states is added to the enemy​

Turn 2​
Judge the states of both players (rock/scissors/paper)​
If the actor wins against the opponent (e.g. actor: rock, enemy: scissors),​
the actor's action is invoked, and the opponent's movement is ignored.​
Else, if the opponent wins against the actor,​
the actor's action is ignored, and the opponent's movement is run.​

There were several problems I faced while implementing:

1. Judging states of each player "before" the action
2. Enabling/disabling declaration/action slots in each turn

For 2, I tried HimeWorks' ActorBattleCommands plugin,
but it didn't work well.
(e.g. 'action' was not disabled at first, and 'action' slots were duplicated after the declaration in commands or so on).

If there is any idea that can solve the problem or that can implement the battle system in general,
please let me know.

Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/rock-scissors-paper-style-battle.153477/