1-HP Skills

So, I need a script or a solution to this problem..

For a battle in my game, I want to make a skill for the enemy that leaves the party at 1-HP..
Is there anyway I can make this possible?
if that is enemy only, then it can be done by damage formula.

write b.hp - 1
instead of the usual a.atk - b.def variant

for any other situation that would be more complex to do...
Reviewed the answer and andar is right.
Deleted my thoughts.
if that is enemy only, then it can be done by damage formula.

write b.hp - 1
instead of the usual a.atk - b.def variant

for any other situation that would be more complex to do...
this actually worked! Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/1-hp-skills.155300/