Creating Pokemon's "Upper Hand" move

Hello devs! I want to recreate Pokemon's "Upper Hand" Skill without having to resort to scripts. If the enemy has selected a Normal Attack and has not yet had a chance to execute its move, Upper Hand will strike first and stun the target for that turn; otherwise, Upper Hand will fail.

I tried create a State and possibly a Troop event, but I've hit a roadblock with the State's Traits. Any help would be greatly appreciated!
I want to recreate Pokemon's "Upper Hand" Skill without having to resort to scripts.
You can't. The regular settings in a skill's database entry have no way of knowing whether the target has acted this turn - you'll have to use some code.

Can you confirm which engine you're asking for? You posted in MZ Support, but your profile says you use MV.

You would give your Upper Hand this damage formula:
Code:
if (b._actions.length && b._actions[0].item().id == 1) {b.addState(X); your_damage_formula;} else 0
replace X with the ID of your stun state (no leading zeros), and replace the damage formula appropriately.

Note that this will only work correctly if Upper Hand is an actor-only skill. If it can be used by enemies, or if you use auto-battle, this will result in potential targets getting stunned even when the skill isn't chosen.

In those cases, you must use a plugin that gives you skill notetags to take the code for the state out of the damage formula.

Original thread: https://forums.rpgmakerweb.com/threads/creating-pokemons-upper-hand-move.164067/