Ability that does something after it kills an enemy.

So, Im trying to figure out how to make an ability that damages an opponent
to give the actor some MP(or w/e) back but only if that ability kills him.
Im new to this and I use RPG maker MV.

Is there a way to use a conditional branch in an ability?
hello person!

It is possible to link this effect with a common event. Basically, create a common event that'll check the following:

If: Enemy #1 is state affected by Knockout (or whatever you named your Death state), then:
♦Force Action: MP Regen (create a skill with the MP Regen effect of course, and add whatever % or set amount you want)
♦
Else
♦Exit event processing (this part isn't necessary, but in case you want to make sure no funkiness goes down when the conditions aren't met...)

Then, go to your Skill tab and, to the right side (where you go to add effects, buffs and whatnot) have it call that common event.

I tried it, and it works! I'm pretty sure you can do this with formulas too, so I'm just providing a quick, simple solution. If you don't want your players to see the character casting the MP Regen skill you might wanna try formulas out (and I agree it looks somewhat messy 😮‍💨)
The above solution will cause a lot of unintended behavior, most notably that if you use this skill and other enemies have been KO'ed previously by other skills, you will still receive the MP gain.

Instead, use Yanfly's Skill Rewards Lunatic Pack plugin.
The above solution will cause a lot of unintended behavior, most notably that if you use this skill and other enemies have been KO'ed previously by other skills, you will still receive the MP gain.

Instead, use Yanfly's Skill Rewards Lunatic Pack plugin.
Lunatic plugins are too complicated for me. Is there any specific plugin for this effect??
Lunatic plugins are too complicated for me. Is there any specific plugin for this effect??

The Lunatic Packs are not the same thing as the "Lunatic Mode" features in other plugins. Their purpose, as I understand, is to offer simple shortcuts to what would otherwise be complex Lunatic Mode code.

You can just add a very simple notetag (I think it's something like <Defeat Reward: MP +10> but you can check it in the video on the page I linked in my last post) and it will handle this effect for you.
I'd like to add that I use the lifesteal plugin and was wondering if there was a way to add this effect using that plugin. I will check now the lunatic pack.
Lunatic plugins are too complicated for me. Is there any specific plugin for this effect??

The link Wavelenght sent was the answer to my question. Also, as he said, its a bit different from lunatic mode. There is a video in the link that makes the use of the plugin super easy.

Thanks for the help.

Original thread: https://forums.rpgmakerweb.com/threads/ability-that-does-something-after-it-kills-an-enemy.94924/