MV how to make a yanfly passive in which the user gains an attack stat increase when they get inflicted with an ailment (Yanfly)

had this idea for a character where if they get inflicted with a random ailment they gain an attack boost does anyone know how to achieve this (not that i have all of the yanfly plugins)
You'd want Yanfly's passives plugin. Give that character a passive with the attack boost (or whatever) but give it a condition:

Code:
<Custom Passive Condition>
if (user.isStateAffected(x) == true || user.isStateAffected(y) == true) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>

Replace "x" and "y" with the ID's of the states that trigger it. Using "||" means "or", so you can list all of the states in the condition that way.
thanks
You'd want Yanfly's passives plugin. Give that character a passive with the attack boost (or whatever) but give it a condition:

Code:
<Custom Passive Condition>
if (user.isStateAffected(x) == true || user.isStateAffected(y) == true) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>

Replace "x" and "y" with the ID's of the states that trigger it. Using "||" means "or", so you can list all of the states in the condition that way

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-yanfly-passive-in-which-the-user-gains-an-attack-stat-increase-when-they-get-inflicted-with-an-ailment-yanfly.172156/