Stat Boost Based on Equipped Weapon Type?

Hello!
I wonder if you can give someone a stat boost based on equipped weapon type?
For example, giving certain character who have a "Sword Mastery" skill to get Attack boost
whenever he equip a sword, but not other weapon.

Let me know if it's possible via default system or through certain plugins. 😀
Totally doable, just use this:
if (user.isWtypeEquipped(x))
"x" is the ID of weapon type in question.
@Frostorm
Where should I put the notetag?
Is it for skill or common event?
I guess you could give the actor in question a passive state like this: <Passive State: x> by putting it in the actor's notebox, where "x" is the state ID of the state that will hold the following code:
JavaScript:
<Custom Passive Condition>
  if (user.isWtypeEquipped(x)) {
    condition = true;
  } else {
    condition = false;
  }
</Custom Passive Condition>
Put that in the notebox of state "x" and don't forget to replace the "x" in user.isWtypeEquipped(x) as well. Remember, weapon type ID not weapon ID. Oh and finally, give the state the amount of ATK or w/e stat boost you want.

Edit: I forgot to mention those notetags require Yanfly plugins.

Original thread: https://forums.rpgmakerweb.com/threads/stat-boost-based-on-equipped-weapon-type.129214/