Copycat move

I was wondering how to do a skill that a character could use that copies an enemy move. Something like a counter move but doesn't require the character to be hit but can use a special move the enemy has used in the battle.

Like for example:

Ice Lord uses Blizzard>hits Freya

Ernest uses move Copycat

Ernest uses Blizzard>hits Ice Lord

How can I set that up?

Original thread: https://forums.rpgmakerweb.com/threads/copycat-move.48711/