How do I...add a weapon that kills the PLAYER?

So there will be a joke-weapon in my game! You have to equip it to use it.
If you use it in battle, it insta-kills whatever is hit with it...however, right afterwards, it kills the player who used it as well!

How do I tell the game to do that exactly?

I am open to a coupla ways this could occur:
1) Make it happen in-battle
2) Make it to where, after the enemy is defeated, and the player appears back in the overworld, the player immediately enters a death state! D:

:3
search for the pinned topic about damage coding or how to use the damage formula.
then add the commands that will add state 1 to the user (something like a.addstate(1); if I remember correctly) in addition to whatever damage you do to the target.
Killing the player character holding the weapon is easy. Make a conditional branch in a common event where if the actor has the weapon equipped, change state to add death. If you want it to only occur when the player uses the weapon, have the skill that "uses" the weapon call a common event where it either:
  1. turns on a switch. after combat, check for the switch. if it's on, change state to add death to that player character.
  2. gives the player character a state with -1000% HP regeneration. Make sure "KO by slip damage" in on for this.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-add-a-weapon-that-kills-the-player.128757/