Skip to content

Grinning Hunger loophole bugfix #371

Open
DragosIonita23 wants to merge 1 commit into
sindreslungaard:masterfrom
DragosIonita23:wonkerdrg/fix-grinning-hunger
Open

Grinning Hunger loophole bugfix #371
DragosIonita23 wants to merge 1 commit into
sindreslungaard:masterfrom
DragosIonita23:wonkerdrg/fix-grinning-hunger

Conversation

@DragosIonita23
Copy link
Copy Markdown
Contributor

📝 Summary

Grinning Hunger bugfix -- now correctly defaults to one zones (battlezone or shields) if the other zone doesn't have cards. Before you could exploit a loophole by choosing the empty zone (basically skipping the spell effect).

🎴 New Cards Added

🐞 Bugs Fixed

  • Grinning Hunger loophole. Before bugfix, opponent was able to exploit a loophole if one of the zones would not have any card.

🔧 Other Changes

  • Improved selectMultipartBase with a check for unambigous selection, similar to the check used in fx.Select.

✅ Checklist

Please confirm the following before submitting your PR:

  • I have read CONTRIBUTING.md
  • The changes has been tested locally
  • The PR does not contain an excessive amount of changes that could have been split up into multiple PRs

📸 Screenshots (if applicable)

If there are any visual changes to the frontend, please include some screenshots or screen recordings of it

…e or shields) if the other zone doesn't have cards. Before you could exploit a loophole by choosing the empty zone (basically skipping the spell effect).

// Bypass the selection pop-up if action is NOT cancellable and the selection is unambiguous, i.e. filtered cards length == min == max
// i.e. user doesn't have a choice
if !cancellable && min == max && totalCardsLength == min && len(cards) == 1 {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could potentially be used to get an unfair advantage if you trigger this popup for the opponent and notice it completes immediately you know that they did not have an option which might give you info you otherwise would have not known. For example if the selection is to choose 1 spell in the hand and it completes immediately, you know that the user had exactly 1 or 0 spell which could be an advantage to know?

Not sure if there are any real cases where this is actually exploitable from a card effects in the game. What do you think @DragosIonita23?

Copy link
Copy Markdown
Contributor Author

@DragosIonita23 DragosIonita23 Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sindreslungaard I get your point, which is obviously valid.

I don't know if there are real use cases of this, but from a theoretical point of view, it's clear it could lead to some unfair advantage in terms of cards knowledge.

From my point of view, the discussion here is between having an "optimisation" in the UI/UX of the players (i.e. automatically resolving a pop-up with an obvious select where there are no valid choices and the action is not cancellable, thus the game being played "faster" and more "friction-less" if you want, which I know is something you strived for historically speaking) AND not revealing potentially unwanted information about opponent's cards.

The most naive and simple fix would be to add a random delay instead of returning immediately from this use case. Minimum 1 second, maximum 3 seconds, or something like that. This way, you would literally "simulate" the opponent thinking of what to choose, thus not revealing any useful information about cards status.

Or, of course, I could simply remove this functionality of "optimisation of obvious and non-cancellable selects" directly.

What do you think?

@sindreslungaard sindreslungaard added the pending-next Will be merged in after the *next* branch has been merged label Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-next Will be merged in after the *next* branch has been merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants