Kill Enemy, Gain Buff

I'm looking to make a skill that deals damage and gives the user a buff if the enemy dies. Has anyone done this? What's the cleanest way of doing it?

The simplest way is probably to alias the enemy "die" method and stick a conditional for the last skill used...but there must be a cleaner way.
I don't know exactly how, but I'm sure that you can do it with Yanfly's Skill Core plugin by adding Post-Damage Eval notetags on the skill you want. However, you'll need to know some Javascript. Yanfly uploaded yesterday a video on how to make skills that have an additional effect after the enemy dies, so you can start from there.
Sorry, this is actually for VX Ace. Looks like that script is for MV.

But I checked around his site and it looks like his Lunatic Objects script should work. I'll just set an after effect based on the enemy's hp.

Thanks!
Oh, my bad, sorry! Glad you found a way to do that skill.

Original thread: https://forums.rpgmakerweb.com/threads/kill-enemy-gain-buff.50955/