State that deals bonus damage on top of basic attack if the enemy has specific state

I'm looking to make a state which when a player has it equipped it deals bonus damage on top of their regular attack only.
When the user has the state, when attacking an enemy with a certain state it will deal bonus damage. There are several states that the enemy can have for the bonus damage to go off and there is more than 1 basic attack. How could i get around this?
You can boost the attack of the player with a trait by using traits parameters.

Sumrndm has a good video on this Tutorial #13 - States!


EDIT:
I missed the 'regular attack only'. You'll need a plugin for this.
You can boost the attack of the player with a trait by using traits parameters.

Sumrndm has a good video on this Tutorial #13 - States!


EDIT:
I missed the 'regular attack only'. You'll need a plugin for this.
Sorry i don't think i clarified, I'm looking for a flat bonus to the damage for example a.mat * 2 when feared not necessarily increasing params
I have yanfly plugins so that shouldn't be an issue.
Depending on how your states are setup, it may be simple or it may be more complex.

Without seeing the states, I can say a ternary operator in the damage formula can easily check for a state and return the desired damage formula. The ternary operator would not be so great for checking for multiple states.

I believe the yanfly Weapon Unleash plugin can replace the attack skill with another skill.

Check out the thread titled "Damage Formulas 101" for some great tips on leveraging the damage formula in some dynamic ways.

Just be careful, the damage formula is evaluated in a way that can have undesired effects if you try to use it for anything other than calculating and returning a damage value.

Original thread: https://forums.rpgmakerweb.com/threads/state-that-deals-bonus-damage-on-top-of-basic-attack-if-the-enemy-has-specific-state.156346/