feat(content): PvP deaths respawn at 1hp instead of full health

NPC/environment deaths and duel arena are unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
max bittkerandClaude Fable 5 committed 2026-08-12 12:21:42 -04:00
1 parent 2f8d26a40b
commit 60c5445f45
1 file changed
+6
@@ -21,7 +21,9 @@ mes("Oh dear you are dead!");
clearqueue(player_death);
def_obj $prev_wep = inv_getobj(worn, ^wearpos_rhand);
def_boolean $pvp_death = false;
if (findhero = true) {
$pvp_death = true;
~pvp_death_lose_items;
session_log(^log_moderator, "Player died to <.displayname>");
} else {
@@ -37,6 +39,10 @@ anim(null, 0);
p_stopaction;
~stat_reset_all;
if ($pvp_death = true) {
// deaths to another player respawn at 1hp instead of full
stat_sub(hitpoints, calc(stat(hitpoints) - 1), 0);
}
healenergy(10000);
~clear_pk_skull;
~clear_poison;