Skip to content

Auto-call coin flips for win/lose outcomes#10533

Open
RafaelHGOliveira wants to merge 1 commit intoCard-Forge:masterfrom
RafaelHGOliveira:feat/auto-call-coin-flip
Open

Auto-call coin flips for win/lose outcomes#10533
RafaelHGOliveira wants to merge 1 commit intoCard-Forge:masterfrom
RafaelHGOliveira:feat/auto-call-coin-flip

Conversation

@RafaelHGOliveira
Copy link
Copy Markdown
Contributor

Summary

Adds a new preference Auto-Call Coin Flips (default on) that skips the Heads/Tails prompt for coin flips where only the win/lose outcome matters (e.g. Krark's Thumb, Frenetic Efreet, Mana Clash, Goblin Bomb).

The mathematical outcome is unchanged: any call on a fair coin has 50/50 odds, so auto-calling Heads simply removes a redundant click that the player would have to make every flip. Cards where Heads vs Tails actually matters (no call) still prompt as before.

Motivation

In games with cards like Krark's Thumb, the player is asked twice per flip — once for the call, then once to pick which of the two results to keep. The call is mechanically meaningless on its own (50/50), and the player almost always picks Heads followed by the Heads result. This is repetitive in long games, especially Commander matches. Power players who want full manual control can disable the preference.

Behavior

  • chooseBinary(HeadsOrTails) — returns true (Heads) when the preference is enabled.
  • chooseFlipResult(..., call) — when call == true (the Krark-style replacement effect picks one of two flips to keep), returns true to keep the matching result and guarantee the called side. When call == false (Win/Lose-the-flip choice that doesn't depend on the call), the player is still prompted.

Implementation

File Change
ForgePreferences.java New UI_AUTO_CALL_COIN_FLIP pref, default true
PlayerControllerHuman.java Pref check in chooseBinary and chooseFlipResult
VSubmenuPreferences.java New checkbox in Gameplay Preferences
CSubmenuPreferences.java Bind checkbox to pref
en-US.properties Three i18n keys (cbAutoCallCoinFlip, nlAutoCallCoinFlip)

Test plan

  • mvn -B compile -pl forge-gui-desktop -am -DskipTests — clean build
  • Cast Mana Clash with pref on — flips resolve without prompts, damage applied normally
  • Cast Mana Clash with pref off — Heads/Tails prompt appears for each flip
  • Cast something with Krark's Thumb in play, pref on — single auto-resolved flip, replacement effect picks the better result automatically
  • Cast Frenetic Efreet, pref on — auto-resolves
  • Cards with NoCall semantics (e.g. cards that ask "did you flip Heads or Tails?") — still prompt the player regardless of pref

Adds UI_AUTO_CALL_COIN_FLIP preference (default true) that skips the
Heads/Tails prompt for coin flips where only the win/lose result matters
(e.g. Krark's Thumb, Frenetic Efreet). The mathematical outcome is
unaffected: any call has 50/50 odds, so auto-calling Heads removes a
redundant click without changing game state.

Behavior:
- chooseBinary(HeadsOrTails): returns true (Heads) when pref is enabled.
- chooseFlipResult: when call=true (Krark replacement effect),
  returns true to keep the matching result and guarantee the called
  side. NoCall flips still prompt the player.

Players who prefer to choose each call can disable the pref via
Settings -> Gameplay Preferences -> Auto-Call Coin Flips.
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