Trying to make a move where you apply a state to an enemy and when they attack they are hit by their own attack and it consumes the state. I have managed to get the Damage portion to reflect and zero out the damage that would hit otherwise but not the states that come with the move. I am wondering if there is an easier way than this. This is with Yanfly Buffs and States Core Plugin.
Code:
<Custom Confirm Effect>
if (this.isHpEffect() && value > 0) {
user.gainHp(-value);
user.startDamagePopup();
value = 0;
target.startAnimation(42);
target.result().success = false;
}
</Custom Confirm Effect>