Need help using enemy IDs for conditional branches

Hello,

I'm trying to make a skill that would call on a common event that would do something different depending what enemy was targeted, but based on the enemy ID rather than the troop index. I would imagine I could use the script call for the conditional trigger but I don't know what the code would be.

Is that even possible? If so, what would be the script to use? If not, any suggestions would be greatly appreciated.

Thanks in advance.
@Random Panda

Here's how I'd do it. First make a state, that is set to be 1000% added when the skill is used. Then you run the common event.
In the condtional branch script run this:
"$dataEnemies[x].isStateAffected(y)"
where x is the enemy id and y is the state.
After all the stuff you need for the common event is run.
Place a script call with this code:
"$dataEnemies[x].removeState(y);"

That should work, though let me now if it doesn't.

Original thread: https://forums.rpgmakerweb.com/threads/need-help-using-enemy-ids-for-conditional-branches.82154/