Skip to content

Conversation

@acbeard
Copy link
Contributor

@acbeard acbeard commented Jul 28, 2025

This PR addresses an issue where returning no value during the end_round call caused the function to be called again, resulting in infinite double-end prevention.

Enhanced the value being used to detect "stop ends" into being an MP.GAME var for "round_ended".

…used elsewhere. Add a return value of true so the operation does not retrigger endlessly.
@acbeard
Copy link
Contributor Author

acbeard commented Jul 28, 2025

This still does not address the issue where if the deck is fully discarded during a blind, the number of lives will not decrement. Based on where the fail_round call currently exists, I think round failure may need to be reworked slightly, or for a check of this particular case to exist on end_round and decrement the life total.

@acbeard acbeard changed the title Enhance double end prevention (#240) Enhance double end prevention Jul 28, 2025
@acbeard acbeard changed the title Enhance double end prevention Enhance double end prevention and ensure life loss during end-round when entire deck is discarded prior to playing any hands Jul 28, 2025
@acbeard
Copy link
Contributor Author

acbeard commented Jul 28, 2025

Add life loss calculation for the edge case where a player plays no hands and discards their entire deck.

Added handling during end_round that advances any pvp rounds where this occurs.

Tested from both sides during a pvp blind, and validated life loss behavior only occurs during the desired condition.

@acbeard acbeard changed the title Enhance double end prevention and ensure life loss during end-round when entire deck is discarded prior to playing any hands Enhance double end prevention and ensure life loss during end_round when entire deck is discarded prior to playing any hands Jul 28, 2025
@acbeard
Copy link
Contributor Author

acbeard commented Jul 28, 2025

This behavior update still does not correct the situation for the Survival game mode, open to any ideas for how that can be approached!

That said, I think this is worth incorporation to correct other game modes even if a survival solution is not found. Prevented fail_round call during survival so life loss gold will not be awarded incorrectly.

@acbeard acbeard changed the title Enhance double end prevention and ensure life loss during end_round when entire deck is discarded prior to playing any hands Enhance end_round duplication prevention and ensure life loss during end_round when entire deck is discarded prior to playing any hands Jul 28, 2025
@acbeard acbeard changed the title Enhance end_round duplication prevention and ensure life loss during end_round when entire deck is discarded prior to playing any hands Prevent end_round duplication and ensure life loss when entire deck is discarded prior to playing any hands Jul 28, 2025
@V-rtualized V-rtualized merged commit ab0d2d9 into Balatro-Multiplayer:main Aug 3, 2025
FilPag pushed a commit to FilPag/BalatroMultiplayer that referenced this pull request Aug 11, 2025
…ive-end-round-on-full-discard

Prevent end_round duplication and ensure life loss when entire deck is discarded prior to playing any hands
FilPag pushed a commit to FilPag/BalatroMultiplayer that referenced this pull request Sep 11, 2025
…ive-end-round-on-full-discard

Prevent end_round duplication and ensure life loss when entire deck is discarded prior to playing any hands
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.

2 participants