MZ Little help with VS battle core targetting

Is there a way around this, I'm going to make a skill that you can't target unless enemy is affected with certain states or specific states. Also I'm not javascript genius on how to make it work with this NOTETAG

Code:
<JS Targets>
code
code
targets = [code];
</JS Targets>



I was wondering what's the JS target code use that you can only target enemy if they're affected with poison and no other states.

This was said easier then done with Yanfly's target plugin (which is MV).I just need equivalent to that in his target plugin for MV, but to make it like it work in MZ (expect there is no notetag for it, unless..)
The JS Targets notetag only takes effect to modify the targets of a skill after it's been used; Selection Control was never ported, and VS has no intention of doing so due to low usage rate and compatibility issues.

There probably is a way to do what you're asking for, but at present moment I don't have a solution.
Oh shoot.. I was hoping for a solution. Even thought it's lack of popularity but I still find it useful.. Oh well.. I guess I gotta use YEP and possible make it work somehow

Original thread: https://forums.rpgmakerweb.com/threads/little-help-with-vs-battle-core-targetting.136707/