MV Increase user's TP when missing or if the enemy evaded.

Hello, everyone!
I'm having some trouble trying to create a skill that increases the user's TP (in my project, this is bad news) when he either misses or has is attack evaded by the enemy. I'm using Skill Core doing something like this:
<Post-Damage Eval> var result = target.result(); if (result.missed || result.evaded){ user.gainTp(5) } </Post-Damage Eval>

I hope I'm formatting correctly. Anyway, the reason why this doesn't work is because Post-Damage Eval is checked if the attack hits, correct? So, I thought of using instead Before Eval, but I'm not sure if it makes sense (and besides, it doesn't work anyway...).

I'd like some help, especially because I'm hesitant to mess too much with action sequences, since I'm afraid that I could do more damage than it's worth (but I am willing to try, so if this is the only way to make this work, I'll do it).

Thanks in advance!

EDIT: I have no idea why I wrote skill, I actually meant all attacks. My bad!
Moved to: Plugin Support
Hmm... So the skill is supposed to just always give TP? Or only when it does not hit?

If the skill is supposed to give TP regardless of landing, you can just add
TP +x: user in your action sequence. If it' supposed to only give TP if it does not hit, things would get a little more complicated.
Hmm... So the skill is supposed to just always give TP? Or only when it does not hit?

If the skill is supposed to give TP regardless of landing, you can just add
TP +x: user in your action sequence. If it' supposed to only give TP if it does not hit, things would get a little more complicated.
First of all, sorry if I wrote skill, I actually meant all type of attacks. I need more coffee. Anyway, it increases the user's TP when the hit doesn't land. In my combat system, the lower the TP, the better it is, so I wanted to punish missing by increasing the user's Tp, so that using to-hit buffs is encouraged. Hope I explained myself better!
If you want to create an ongoing effect where this happens, you'll have to do it as a state rather than a skill.
If you want to create an ongoing effect where this happens, you'll have to do it as a state rather than a skill.
Makes sense. So I guess that the problem now is: how do I detect if the hit misses/is evaded using a state? Because after that, increasing the TP is very easy by using the Buffs & State core plugin.
Makes sense. So I guess that the problem now is: how do I detect if the hit misses/is evaded using a state? Because after that, increasing the TP is very easy by using the Buffs & State core plugin.
Basically the same thing as you were already doing for the skill. The exact syntax might need tweaked a bit but you have the right idea.
Basically the same thing as you were already doing for the skill. The exact syntax might need tweaked a bit but you have the right idea.
Oh, so it's a syntax problem, maybe? Thanks, I'll try to make it work, I'm glad it's at the very least a somewhat logical solution ahahah!
Basically the same thing as you were already doing for the skill. The exact syntax might need tweaked a bit but you have the right idea.
It works! Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/increase-users-tp-when-missing-or-if-the-enemy-evaded.158805/