Replace magic number with DEATH_PL constant

This commit is contained in:
Jared Miller 2026-02-14 00:24:32 -05:00
parent 8d31eeafaf
commit 1dbc3a1c68
Signed by: shmup
GPG key ID: 22B5C6D66A38B06C

View file

@ -4,6 +4,8 @@ from mudlib.combat.engine import end_encounter, get_encounter
from mudlib.commands import CommandDefinition, register from mudlib.commands import CommandDefinition, register
from mudlib.player import Player, players from mudlib.player import Player, players
DEATH_PL = -100.0
async def cmd_snap_neck(player: Player, args: str) -> None: async def cmd_snap_neck(player: Player, args: str) -> None:
"""Snap the neck of an unconscious target. """Snap the neck of an unconscious target.
@ -52,7 +54,7 @@ async def cmd_snap_neck(player: Player, args: str) -> None:
return return
# Execute the finisher # Execute the finisher
target.pl = -100.0 # Instant death target.pl = DEATH_PL
# Send dramatic messages # Send dramatic messages
await player.send(f"You snap {target.name}'s neck!\r\n") await player.send(f"You snap {target.name}'s neck!\r\n")