fix(pvp): play opponent skip SFX at skip time, not during their first hand - #506
Open
ChronoFinale wants to merge 1 commit into
Open
fix(pvp): play opponent skip SFX at skip time, not during their first hand#506ChronoFinale wants to merge 1 commit into
ChronoFinale wants to merge 1 commit into
Conversation
MPAPI.calculate_blind (framework api/gamemode/hooks.lua) resolves the blind to dispatch display-sync context through by reading G.GAME.blind (whichever blind is CURRENTLY ACTIVE), but at the moment a skip happens the active blind is the vanilla small/big blind being skipped -- bl_mp_nemesis only becomes active once the boss blind starts. That resolution silently drops the skip's display-sync dispatch (and its SFX) whenever the active blind isn't the nemesis, so enemy.skips stays stale until the opponent's first playHand of the boss blind, whose payload still carries the cumulative skip count and fires the SFX there instead -- one hand late. Dispatch the nemesis blind's display-sync calculate directly by its stable registered key (G.P_BLINDS["bl_mp_nemesis"]) from pvp_api/net.lua's playHand/skip routes, instead of through MPAPI.calculate_blind's active-blind lookup, so the sync always fires at the real skip moment regardless of which blind is active. This also makes a later playHand echo of the same cumulative skip count a no-op reconcile (the delta is already zero), so the SFX plays exactly once per skip.
ChronoFinale
marked this pull request as ready for review
July 23, 2026 22:49
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 skip SFX played during their first hand instead of at skip time — the nemesis display-sync fired against the currently-active blind rather than the nemesis blind. Resolve the nemesis blind by key and calculate against it directly in the play/skip routes.
Rebased onto current
mqtt— re-expressed against the sync/receive networking rework. Test:luajit tests/test_skip_sync.lua— green.Closes #487
Testing