Stacking Buffs? Dispelling only one stack?

So I have been writing up groundwork for a few boss fights and have a few questions. Im fairly new to RPGMaker so im not an experienced programmer, so going into creating scripts and such is beyond me.


[Willing to use Yanfly if necessary so long as someone is willing to teach me how to implement a certain mechanic.]


One boss has an ability that on use, puts several stacks of a debuff/state on everyone in your party, and several turns later uses an ability that deals damage equal to how many stacks each member has and the idea is that you need to debuff them so its not fatal. is there a way to make it so dispelling only takes off one stack? Is there a way to make the ability deal damage based on these stacks?


Another boss starts out with a buff that reduces damage taken, and the idea is to break support beams around it to reduce its stacks, making it weaker with each one destroyed. again, im not too sure how I could do this.


I know it may be selfish and a bit much to ask, but I have tried doing some research and havent found any good leads, and I dont know anyone personally who also uses the program. Thanks in advance.
Honestly, I'm having the same problem with state stacks, since the Buffs & States Core only lets you stack more instances of statistical buffs.


A workaround/alternative for the first idea would be that the state lasts something like 3 turns and the boss increases the number of turns by casting that debuff repeatedly, with the skill being based on the number of turns left on that debuff. Instead of dispelling them, you could then let the fight be about preventing the debuff from stacking too high (silence, warding etc.). If you insist on the stacks, you can make the boss simply lower the relevant defensive stat and dispel it with counterbuffing.


The second one is more simple - make the support beams always go first with a buff targeting the boss (use Battle AI Core to ensure they target them and not each other) that buffs DEF+MDF (the aforementioned Buffs & States Core letting you stack the buff by any amount) and make the buff last only one turn, which means that they'll expire at the end of the turn and the beams recast it at the beginning of the next one.
While I would have preferred something a little more direct, I think that last method may be a good alternative until I get more into the rhythm of things. Thanks 🙂

Original thread: https://forums.rpgmakerweb.com/threads/stacking-buffs-dispelling-only-one-stack.60576/