Lunatic Help: If Target Defeated

I am using the standard Yanfly stuff. I was wondering what command do I use for "If actor/enemy defeated?"

For Example:
If Target is Defeated, raise AGI by 50%.
I would use a standard battle event page, enemy hp <=0% condition, duration battle. If you wish, you can use the plugin that makes first troop events global battle events to make it simpler.
actor.isDead() or enemy.isDead()
target.isDead() if you want to check if the target of the skill is dead.
user.isDead() if you want to check if the user of the skill is dead.
Another way is check if the HP equals or is below 0.

"target.hp <= 0"

This way if you have plan to put an enemy Immortal for a custom defeat for example, this enemy doesn't necessarily needs to be dead for the effect to trigger.

Original thread: https://forums.rpgmakerweb.com/threads/lunatic-help-if-target-defeated.81177/