MV Plugins so that only certain character can have the state bonus based on traits or weapon(equippable weapons)

in my rpg a character can be a spellblade which cast spells that enchant swords. i need to be able to make it that only character with swords or blade or knife(maybe) can have that spell casted upon them, and not a white mage for example.
is it possible to do this with negate a state in class or actor?
yes and no (to the question about traits for this)

there is a way to have the default engine do something similar with traits, but it will never be absolute (it requires you to allow a small chance to non-bladed weapons).

the best way is probably to use one of yanlfy's plugins for targeting restrictions.
Unfortunately I can't give you the code for that notetag.
can i use state resist in class parameters for this?
can i use state resist in class parameters for this?
State resist does not stop you from using a skill on a battler. It just stops the state from happening. So that would be pretty annoying to a player to use the skill and it just wastes their turn.

As Andar said, Yanfly's Selection, while not free, is the way to do this (I don't know if anyone has written a free equivalent).

You would put this as the notetag in the skill's notes:
Code:
<Custom Select Condition>
condition=target.isWtypeEquipped(X) || target.isWtypeEquipped(Y) || target.isWtypeEquipped(Z);
</Custom Select Condition>

where X, Y and Z are the weapon types from the Types tab that you want the skill to be usable on. You can add as many as you like, following that format.
i don't know the price. so is the script on yanfly's website?http://www.yanfly.moe/wiki/Selection_Control_(YEP)#Download

it is this one? if so it is only 10$ so i guess i can afford it.

<Custom Select Condition>
condition=target.isWtypeEquipped(X) || target.isWtypeEquipped(Y) || target.isWtypeEquipped(Z);
</Custom Select Condition>

What do i replace the X Y Z with? The name of the weapon type? or the number of the types?
Number.

Original thread: https://forums.rpgmakerweb.com/threads/plugins-so-that-only-certain-character-can-have-the-state-bonus-based-on-traits-or-weapon-equippable-weapons.149148/