Add TP when the normal attack kills and/or criticals

How can I edit the damage formula so that a normal attack gives extra TP whenever said attack results in a critical and/or a death of the target?

Bonus: same question with exp instead of TP?
I would do that using Yanfly Damage Core plugin and insert a line in the if (critical) conditional block (see bellow).
Similar method can be used to check if target is dead following excution or you can use an Overkill plugin.

Sans titre 2.png
Hope this help.
No way to do it without Yanfly's plugin?
I guess there is other plugins out there that could do the same, but I only use Yanfly plugins so its the only one I know.
But if you don't want to use plugins at all, I would add a function in object.js
I don't think you can check for critical in the damage formula cause the if (critical) check comes after intital damage value have been establish...
But then again, there may be some other clever way that I not aware of...
I'll let others give theirs thoughts about it.

Original thread: https://forums.rpgmakerweb.com/threads/add-tp-when-the-normal-attack-kills-and-or-criticals.115899/