Skip to content

fix(hud): reset enemy hands display at PvP blind start - #502

Open
ChronoFinale wants to merge 1 commit into
Balatro-Multiplayer:mqttfrom
ChronoFinale:pr/enemy-hands-reset
Open

fix(hud): reset enemy hands display at PvP blind start#502
ChronoFinale wants to merge 1 commit into
Balatro-Multiplayer:mqttfrom
ChronoFinale:pr/enemy-hands-reset

Conversation

@ChronoFinale

Copy link
Copy Markdown
Contributor

The opponent's "hands left" HUD showed a stale/default value at the start of a PvP blind — it only updated once the opponent's data arrived. Reset it at blind start so it reads correctly from the first frame.

Rebased onto current mqtt. Test: luajit tests/test_enemy_hands_reset.lua — green.

Closes #486

The "Enemy hands left" HUD counter showed a wrong value at the start of
every PvP blind. action_start_blind reset the opponent's score and
info_received flag but never MP.GAME.enemy.hands, so the HUD carried
over either the previous blind's leftover count or the hardcoded
initial default (4) until the opponent's first synced action (the
nemesis blind's on_sync) landed.

The hands "?" mask was also only applied when hide_score_until_played
was enabled, so with that option off the stale/default number rendered
directly instead of being hidden.

Reset the stored hands count (to a safe numeric default, not nil --
Conjoined Joker does arithmetic on it every frame outside PvP blinds
too) alongside the existing resets, and decouple the hands mask from
hide_score_until_played since an un-synced hands count is never
correct regardless of that score-hiding option. Both decisions are
extracted as small pure functions in lib/blind_utils.lua for direct
unit testing.
@ChronoFinale
ChronoFinale marked this pull request as ready for review July 23, 2026 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant