Making a skill do more damage if the User has a Buff

I trying to make a skill where if the user has a specific type of buff on them, That specific skill will do more damage, and if the user doesn't have the buff, then it does less damage.
I'm making a Necromancer where if he uses the skill "Extract Essence", it gives himself a buff that makes his summon skills do more damage a part from the other "non summon skills"
I've been searching through forums and other pages but i can't seem to find the solution..
Some links told me to use this damage formula but it just makes the attack do 0.

(a.isStateAffected(11)) { (80 + a.mat * 5 - b.mdf * 2) * 2 } else { 80 + a.mat * 5 - b.mdf *2}

Can someone help me?
Would that work for you?

Code:
(80 + a.mat * 5 - b.mdf * 2) * ((a.isStateAffected(11))?(2):(1))

Damage is multiplied by 2 if the user is under state 11. Multiplied by 1 otherwise.
Base_damage * (user_has_state ? 2 : 1)

Would that work for you?

Code:
(80 + a.mat * 5 - b.mdf * 2) * ((a.isStateAffected(11))?(2):(1))

Damage is multiplied by 2 if the user is under state 11. Multiplied by 1 otherwise.
Base_damage * (user_has_state ? 2 : 1)

That could work, i'll definitely try it out and i'll update you with the results.
Would that work for you?

Code:
(80 + a.mat * 5 - b.mdf * 2) * ((a.isStateAffected(11))?(2):(1))

Damage is multiplied by 2 if the user is under state 11. Multiplied by 1 otherwise.
Base_damage * (user_has_state ? 2 : 1)

It worked, thank you so much!

Original thread: https://forums.rpgmakerweb.com/threads/making-a-skill-do-more-damage-if-the-user-has-a-buff.175307/