Progressive buff/debuff system in MV

I was wondering if anyone knew of a plugin that could handle buffs and debuffs in the same way that labyrinth of touhou 2 does, which is make any skill that buffs/debuffs a stat just add or subtract a percentage onto the total amount the stat is buffed/debuffed, up to a specific maximum, then any buff/debuff wears off overtime at a rate of approaching neutrality 20% per turn, sorry i'm really bad at explaining things so i'll give an example. Lets say you have a skill that buffs attack by 50%, then you use another skill in the same turn that buffs it by another 50%, your total buff would be attack+100%, and everyturn that would wear off by 20% meaning next turn it would drop to 80%, then the turn after it would drop to 64%, assuming no other buff/debuff is affecting it. Is this kind of system possible to replicate in rpg maker MV with a plugin, and if so what plugin can do so?
I believe you could do this with some very creative usage of Yanfly's Buffs & States Core. The wearing off would be the hardest part, but the way I would probably implement it would be to make each stack of the state improve the stat by just 1%, make the maximum number of stacks very high (like 100) or unlimited, and use a Custom Apply Effect tag to set the number of stacks (or adjust an existing number of stacks) when the state is applied or re-applied to a battler. Then, each turn (Custom Turn Start or Turn End Effect tags), multiply the number of stacks on the target by 0.80 and round.

This requires some knowledge of Javascript syntax and some creativity, so if you're having trouble, watch some of Yanfly's "Tips and Tricks" Videos to see examples of similar effects that will guide you toward the answer.
Huh, that's a good idea, one question though, how using this would i handle the whole debuff thing? Like in the system i want to copy if you had a 25% stat buff and were inflicted with a -50% debuff you'd end up with a -25% in the stat and the whole 20% buff/debuff wear off per turn would go off of that, that doesn't sound entirely possible with this method unless there's some shenanigans i can pull like checking if the actors have any positive stacks of the stats being affected, any suggestions on that?
Sorry for the bump, but I need more help on this, using Yanfly's buff and states core and action sequence pack i've successfully managed making the state stack upon itself for multiple stacks, but I can't seem to figure out making the amount the stat the state affects is buffed be based on the amount of stacks, and would appreciate some help in that direction

Original thread: https://forums.rpgmakerweb.com/threads/progressive-buff-debuff-system-in-mv.109689/