Balatro-Multiplayer / Balatro-Multiplayer/BalatroMultiplayer
[Beta v3 PvP] "Enemy hands left" HUD shows stale/default value at PvP blind start
- Dominant language
- Lua
- Stars
- 335
- Forks
- 106
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 1
Description
**Status: root cause confirmed**
**Affects:** MultiplayerPvP Closed Beta v3 (mqtt branch)
## Symptom
Tester report (with screenshot): "initial hand shows incorrectly." At the start of every PvP blind, the "Enemy hands left:" counter shows a wrong number — the hardcoded default (4) on the first PvP blind of a match, or the previous blind's leftover count (e.g. 0/1) on later ones — until the opponent's first play/skip syncs.
## Root cause
The old framework's server pushed `enemyInfo` (score/hands/skips/lives) every ~3s, continuously correcting the display. The MQTT conversion removed that stream (tombstone comment at `networking/action_handlers.lua:417-418`); opponent display state now syncs only via the nemesis blind's `on_sync` (`objects/blinds/nemesis.lua:35-132`), which fires solely on the opponent's `playHand`/`skip`.
`action_start_blind` (`networking/action_handlers.lua:398-415`) resets `enemy.score` and `info_received` at blind start but never resets `MP.GAME.enemy.hands`/`hands_text`, so the stale value renders. The "?" mask in `ui/game/blind_hud.lua:203-211` only applies when the separate `hide_score_until_played` option is on, so with it off the raw wrong number shows.
Contributor guide
Research direction
Start with action_start_blind in networking/action_handlers.lua and compare its state resets with the enemy hands fields used by objects/blinds/nemesis.lua. Read the HUD rendering in ui/game/blind_hud.lua, then verify that each PvP blind begins with a current enemy-hands value rather than the previous or default value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100