Bosses Resist Stat Debuffs

Something I would love for my game is to make bosses able to have their stats debuffed, but to make the debuffs half as effective.

For example, my actor has a skill that Debuffs atk 25%. I don't want the player to feel like that skill is useless against bosses cause that would be lame. I want the skill to debuff the boss's atk by 12.5% then another stack of the debuff would bring the total debuff to 25% and that would be the cap.

Is there a plugin that can do this? It seems like it would be pretty simple actually. I would give all bosses a passive state and the plugin would just check if the target of a debuff has this state and makes debuffs half as effective.

Thanks for any help!
Pretty sure you can do this kind of thing with Yanfly's plugin.
http://yanfly.moe/yep/
I think it's possible with buff & states core, or skill core. I can't tell exactly how since I don't tinker his plugins for a long time. But I recall doing sth similar last year.
In Yanfly's Buffs and States Core plugin (assuming you use that), in the parameter 'Buff Formula', use this code:

Code:
1.0 + (this._buffs[paramId] * 0.25) * (this.isStateAffected(x)? 0.5 : 1)

Replace x with the passive state id you wish to give the bosses.
Nice! Thanks Naveed. I was wondering if yanfly's plugin would be able to do it. And of course it can!

Original thread: https://forums.rpgmakerweb.com/threads/bosses-resist-stat-debuffs.80032/