Send Char.Vitals on combat stamina spend

This commit is contained in:
Jared Miller 2026-02-11 23:07:57 -05:00
parent 3d386fbf99
commit 64c25b1025
Signed by: shmup
GPG key ID: 22B5C6D66A38B06C

View file

@ -80,8 +80,14 @@ async def do_attack(player: Player, target_args: str, move: CombatMove) -> None:
CombatState.WINDOW,
)
# Execute the attack
# Execute the attack (deducts stamina)
encounter.attack(move)
# Send vitals update immediately after stamina deduction
from mudlib.gmcp import send_char_vitals
send_char_vitals(player)
if switching:
await player.send(f"You switch to {move.name}!\r\n")
else:
@ -106,6 +112,11 @@ async def do_defend(player: Player, _args: str, move: CombatMove) -> None:
player.stamina -= move.stamina_cost
# Send vitals update immediately after stamina deduction
from mudlib.gmcp import send_char_vitals
send_char_vitals(player)
# If in combat, queue the defense on the encounter
encounter = get_encounter(player)
if encounter is not None: