I have an accessory which, when the wearer is hit, is supposed to restore a small amount of MP. The accessory is otherwise inactive. Here it is, for what it's worth.
State 36 has the following notetag. I am using VS Skills & States plugin.
As you can see, I include a console check. The console showed no error, but no MP was restored. I reduced the amount of MP the actor had in case it was being restored but the little popup wasn't working. That showed that nothing was being added.
I therefore assume that my code is wrong (nothing new there).
Can anyone tell me what my mistake is?
Thank you.
State 36 has the following notetag. I am using VS Skills & States plugin.
Code:
<JS Post-Damage>
if (this.isDamage())
console.log("Took a hit?")
target.gainMp(Math.floor(target.mmp*0.02))
</JS Post-Damage>
As you can see, I include a console check. The console showed no error, but no MP was restored. I reduced the amount of MP the actor had in case it was being restored but the little popup wasn't working. That showed that nothing was being added.
I therefore assume that my code is wrong (nothing new there).
Can anyone tell me what my mistake is?
Thank you.