HOW DO I...Debuff Stack requirements?

So hello! Hope you are doing well!

I was curious about how to make a spell that could give a debuff, but only if another specific debuff is already on the target for this new debuff to be applied. Is that possible? Do I have to use any scripts or plugins?
You could through the damage formula box but I don't know how it interacts with all the visual bits like popups or the battle log. There is also plugins ofcourse.
You could do something like this in your damage formula:

Code:
if (b.isDebuffAffected(1)) b.addDebuff(2)
//or
b.isDebuffAffected(1) ? b.addDebuff(2) : 0

Both of these will check if parameter 1 is debuffed and if it is will then debuff parameter 2. If you want to have the spell do something different if the enemy does not have parameter 1 debuffed, use the second statement and put whatever you want to happen in place of the "0".

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-debuff-stack-requirements.106581/