Replace magic number with DEATH_PL constant
This commit is contained in:
parent
8d31eeafaf
commit
1dbc3a1c68
1 changed files with 3 additions and 1 deletions
|
|
@ -4,6 +4,8 @@ from mudlib.combat.engine import end_encounter, get_encounter
|
|||
from mudlib.commands import CommandDefinition, register
|
||||
from mudlib.player import Player, players
|
||||
|
||||
DEATH_PL = -100.0
|
||||
|
||||
|
||||
async def cmd_snap_neck(player: Player, args: str) -> None:
|
||||
"""Snap the neck of an unconscious target.
|
||||
|
|
@ -52,7 +54,7 @@ async def cmd_snap_neck(player: Player, args: str) -> None:
|
|||
return
|
||||
|
||||
# Execute the finisher
|
||||
target.pl = -100.0 # Instant death
|
||||
target.pl = DEATH_PL
|
||||
|
||||
# Send dramatic messages
|
||||
await player.send(f"You snap {target.name}'s neck!\r\n")
|
||||
|
|
|
|||
Loading…
Reference in a new issue