MV Exceptions with "Mirror Move" skill

Hi, I have this skill inspired by the Mirror Move ability from Pokémon that Yanfly made in one of his videos. It's a skill that copies the last skill used by a character.
Works great, but I think it isn't quite complete yet.

Here is a link to the video:



And here is the code he wrote for it:

Global Passive:
JavaScript:
<Custom Action Start Effect>  var action = user.currentAction();  user._lastUsedSkill = user._lastUsedSkill || 1;  if (action && action.isSkill()) {    user._lastUsedSkill = action.item().id;  }  </Custom Action Start Effect>
Skill Notebox:
JavaScript:
<After Eval>  var id = target._lastUsedSkill || 1;  BattleManager.queueForceAction(user, id, -2);  </After Eval>

The main problem I have with it is the lack of exceptions it has. I don't want this skill to copy any skill at any time, there are a bunch of special ones that shouldn't be copied...
Is there any way of making it happen? Maybe with some "if/else"?

Original thread: https://forums.rpgmakerweb.com/threads/exceptions-with-mirror-move-skill.139162/