MZ Limiting skill targetting

Is there any plugin out there that allows you to limit which characters/enemies a skill/item can target? Or, maybe even better, limiting skill targeting based on a State? Specifically, I need it to bar the character from selecting invalid targets: it's not enough for the skill to fail, I want to make sure it's impossible to use it on these enemies/actors to begin with.

As a practical example of what I'm talking about, say one party member is a robot and therefore cannot be targetted by normal healing items and can be healed only through the use of special items/skills that only target him (even if they are used by a different character).

Or, as another example, a character having a skill that applies a state to one or more enemies and then a secondary skill that targets only those with that state.
Check out VisuStella Battle Core's targeting options:

Alternatively, I have a plugin that offers a <target filter> Skill/Item notetag, e.g.
Code:
<target filter: return !target.isStateAffected(12);>
This says "you can only select targets not affected by state 12" (! = "not"). Plugin link:
Your script seems to work great. Just to check, is it free for commercial use (and how should I credit you)? And are you aware of any compatibility issues with the visustella library?
Yes, commerical use is OK! From the plugin's help section:
Terms of use: This plugin is free to use and/or modify, under these conditions: - None of the original plugin header is removed. - Credit is given to Caethyril for the original work.
You can credit me however you like: in-game or in a separate file shipped with the game, I don't have a preference.

I don't know of any outstanding conflicts with other plugins. I try to make all my plugins as cross-compatible as possible, which is partly why I don't have any "overhaul" type stuff. 😴

Original thread: https://forums.rpgmakerweb.com/threads/limiting-skill-targetting.135598/