MZ Undead State?

Hey everyone,

I'm having a difficult time getting an Undead state (HP recover deals damage instead) to work. I'm using ATT_Turan's Eval Tags, which are a great alternative to Visustella.

I've tried this one, which I found on this thread for the Undead state there. I don't think I ever got it working when I used Visustella anyway.
Code:
  <Action Reaction Eval>
  if (this.isHpRecover()) {
    value = Math.abs(value);
  }
  </Action Reaction Eval>

and this one because it seems like it might make sense?
Code:
<Action Reaction Eval>
if (this.isHpRecover() && value > 0){
value = -value;}
</Action Reaction Eval>

Tried them both in my own project AND in a fresh clean one and neither do anything it seems. I'm using <Action Reaction Eval> because it'll apply the code on a successful hit before the effect of the hit is applied.

Like always, thanks for the assistance!
HpRecover can't deal damage, so you would have to instead have to add an gainHp(-value) and then make value = 0. I'm pretty sure that would rather make two numbers pop-up or just the zero, though.
HpRecover can't deal damage, so you would have to instead have to add an gainHp(-value) and then make value = 0. I'm pretty sure that would rather make two numbers pop-up or just the zero, though.
Ah ok! Good to know.

I tried this out, with yet no luck however.

Code:
 <Action Reaction Eval>
if (this.isHpRecover()) {
    value = Math.abs(value);
    target.gainHp(-value);
    value = 0;
  }
  </Action Reaction Eval>

I also tried it with Action Respond Eval, since that's on the user's end, but nothing there as well.
I'm wondering if this.isHpRecover() needs to be more specific on the this side of things.
this does not refer to the current Game_Action.

Per the documentation, there is a skill variable provided for that purpose.
Yea, replace this with skill.
Gah! Sheesh! Of course! I keep forgetting about skill instead of this! GOooOOOOoooD grief! Thank you all!

Also just figured out that for healing items to do the same, I have to change how the HP is recovered. Use the Damage Type dropdown and select HP Recover, and not use Effects for healing.

Thanks everyone!

Original thread: https://forums.rpgmakerweb.com/threads/undead-state.176408/