Skill cannot be cast if user has state applied.

I dont know if im blanking but I cant think of a way to do this. Im not familiar with target core or script to prevent targeting if thats possible.

Looking to have 2 or 3 states that cannot interact with each other. Say you cast state 1 on actor, you cannot cast state 2 on that actor and vise versa. I believe I can make it replace using <Custom Apply Effect>, but I would prefer if the actor just could not be targeted.
<Custom Target Eval>
!b.stateAffected(66);
</Custom Target Eval>
Does not work and dont know what I would have to do :S
Yanfly selection control. You can use conditions for a target, where the target cannot be selected if state: x is applied.

edit: sorry, the condition would be for the skill notetag, and you would put Not State: x, and this will make it so the skill cannot target an actor/enemy with that state applied.
Try this to see if it works.
Code:
!target.isStateAffected(66);
Yep thanks guys this makes it so cannot be targeted
<Custom Select Condition>
if (target.isStateAffected(66)) {
condition = false;
} else {
condition = true;
}
</Custom Select Condition>
Edit: However it can be cast in the menu screen :S
yeah, select control only works in battle. You may need something else for blocking it in the menu.

but until you can find this way to make them unselectable, you can always just make the states give the person with it resistance to the other (resistance is immunity, as in resistance to death makes them immortal, while unable to have added by skills but still able to get it by other means is state rate 0)

Original thread: https://forums.rpgmakerweb.com/threads/skill-cannot-be-cast-if-user-has-state-applied.120769/