Yanfly's Buffs and States Core help

i have a skill that give a state to the user: when an enemy hit the user, damage is nulified and the enemy is stunned


but there's a problem, when the enemy is stunned he stucks right after the hit and doesnt come back until his next action begin


065589e58c3d45e893136b4c18ef646e.png



here is the state notes:


<Custom React Effect>


if (this.isHpEffect()) {


//set damage to 0


value = 0;


//remove state from user


target.removeState(87);


//stun the enemy


user.addState(8);


}


</Custom React Effect>


is there a way to only apply the stun when the enemy comes back? delay it or something?

Original thread: https://forums.rpgmakerweb.com/threads/yanflys-buffs-and-states-core-help.67620/