MZ (VS action sequences)-How to check if target of an attack has a state?

Hello,

I want an animation and special damage to trigger if my battler hits a poisoned enemy, but I don't know what conditional branch to use in MZ. I use Visustella battle core's action sequences.

Thank you
I had to toy with it, and may still not be the most efficient, but used


<JS Post-Damage>

if (target.isStateAffected(72))

{target.addState(73);

target.removeState(72)}

</JS Post-Damage>

in a skill to check if they are Chilled, and if so, add Frigid and remove Chilled. You can probably tinker to get it to do something else as well.

in the formula box too, you can have it check for the target being poisoned to alter the damage formula

b.isStateAffected(x) ? a.atk*3 : a.atk*2;
Replace x with the Poison state, of course, and the formula as you like

Original thread: https://forums.rpgmakerweb.com/threads/vs-action-sequences-how-to-check-if-target-of-an-attack-has-a-state.131899/