Parameter increases based on equipped weapon type

I do not know for sure if this thread goes here, as my issue may have a non script solution I don't see, so I apologize in advance if I posted it in the wrong place.

Anyway, I'm using Neon Black's Passive States script to create...well, passive states. It works fine, but I'm just mentioning it in case it needs to be known. Now, I can easily create states that boost parameters when an actor gains the state, but what I can't do is tie a boost to a specific weapon type.

To better expand on this, I want to create some passive states that increase the Strength stat when an actor is currently equipped with a specified weapon type, i.e if actor 1 has a sword equipped, Strength is increased by 5 points. If they equip a different weapon type, the boost goes away until equipping a sword again.

So, is this possible with the base program, or do I need an additional script to do this?
Does this need to be a state? Is Strength your name for ATK, or is it something different?
Yeah, Strength is ATK in my game.

I need it to be a state because the boost will be a learnable passive skill, and Neon Black's script does passives through states. Of course, if there's another way, I'm all ears.
I currently have damage formulas that uses weapons in their calculations. For example, one of my weapons deal 1.5x damage to plant monsters when equipped. What you are looking for is:

if user.actor? and user.weapons.any? {|weapon| weapon.wtype_id == 1}
if user.actor? and user.armors.any? {|armor| armor.atype_id == 1}

-user - Replace this depending on the script; ie a in damage formulas, @subject in action, etc.
-weapons/armors - The array that holds the weapons and armor of the current user (the reason we need to check if the user is the actor)
-any? - This returns true if at least one item in the array returns true, with each item given a name like armor/weapon.
-wtype_id/atype_id - The ids of weapon and armor respectively, numbered by the database.

---

Hm...The second-half of the question is how to apply that concept to a state. Mine is in a custom damage formula, which I could also add if a.state?(SWORDEQUIPPED). I suppose you don't want to write a custom formula, so you might need a script like Himework's Feature Conditions that activates certain features like regen and stat boosts when conditions like equipped weapon types are present...

Wait, do states only add percentages or can they also add specific number of stats?
Sorry for the late reply. Persona 5 has my full attention at the moment.

Anyway, I believe states only add percentages, which is not quite what I want. I suppose a passive skills script that didn't use states is probably my best bet.

Original thread: https://forums.rpgmakerweb.com/threads/parameter-increases-based-on-equipped-weapon-type.76347/