Skip to content

fix(pvp): play opponent skip SFX at skip time, not during their first hand - #506

Open
ChronoFinale wants to merge 1 commit into
Balatro-Multiplayer:mqttfrom
ChronoFinale:pr/skip-sfx-timing
Open

fix(pvp): play opponent skip SFX at skip time, not during their first hand#506
ChronoFinale wants to merge 1 commit into
Balatro-Multiplayer:mqttfrom
ChronoFinale:pr/skip-sfx-timing

Conversation

@ChronoFinale

@ChronoFinale ChronoFinale commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

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

  • Loaded up game, skipped and verified i heard skip sound when skip happened and not during pvp

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
ChronoFinale marked this pull request as ready for review July 23, 2026 22:49
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