fix(hud): reset enemy hands display at PvP blind start - #502
Open
ChronoFinale wants to merge 1 commit into
Open
Conversation
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
marked this pull request as ready for review
July 23, 2026 23:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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