How to go about creating contextual enemy skills?

I'm struggling with how to accomplish this, so now I turn to the support forum. Core concept is simple:

You have an enemy. They have a skill. Let's say it's called Explode, like Voltorb from Pokemon or something. The idea is that if they are successful in using this move, they will highly damage your party. However, if you kill them before they get the move off, it instead backfires and hurts the enemy troop.

How I've tried accomplishing this to date is pretty much via Shaz's State Add/Remove Command. However, I can't seem to make any abilities trigger on death, so now I'm curious if this is even possible, period. Let me know if I can provide any more information that might provide more insight.
Hey Mate,

Coildnt you rathen yhen making it a skill use a battle event with variables and trigger when enemy hp =0%
Sorry for typos on my phone

I'll just edit this post so I don't get in trouble for a triple post ksjp17. I'm honestly very sorry, I did not mean to breach any rules.

Thank you for the link to the forum rules 😀
Zer0_Redemption , please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.

Even on a phone you can use the edit button to add to your last post if you want to say something more.
Maybe you could do a scriptcall/custom formula for that?

Code:
a.atk*8-b.def/2; a.add_state(1) #death is always state 1
Maybe you could do a scriptcall/custom formula for that?

a.atk*8-b.def/2; a.add_state(1) #death is always state 1
What do you mean? The issue is that the move doesn't go off if the enemy is killed before it completes, I need it to go off when the enemy is killed.
I'm struggling with how to accomplish this, so now I turn to the support forum. Core concept is simple:

You have an enemy. They have a skill. Let's say it's called Explode, like Voltorb from Pokemon or something. The idea is that if they are successful in using this move, they will highly damage your party. However, if you kill them before they get the move off, it instead backfires and hurts the enemy troop.

How I've tried accomplishing this to date is pretty much via Shaz's State Add/Remove Command. However, I can't seem to make any abilities trigger on death, so now I'm curious if this is even possible, period. Let me know if I can provide any more information that might provide more insight.

You should beable to use battle events to pull this off.

What you do is make the initual skill usage turn on a switch, then that switch triggers the special battle event page. Whatever delay you have your skill in question configured to go off, you do a check each turn for, if X enemy has 0 HP in any of thise turns, the group gets damaged.

Make sure to turn off the switch in the appropriate spots.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-go-about-creating-contextual-enemy-skills.45615/