Option: Auto-apply remembered ability order#10683
Conversation
|
This is set up to apply the remembered order on a per-game basis with no multigame persistence. Simultaneous ability orders tend to develop over the course of a game as new cards enter the battlefield with different trigger abilities; at start of game you might have only 2 simultaneous triggers and that grows over time, with player having to re-confirm preferred order each time a new ability enters the mix. In practice the game eventually settles into a rhythm with the same triggers firing repeatedly; that's when this feature becomes useful and saves you time by applying saved order automatically. I considered whether to wire this up to the full per-card / per-match / per-install persistence model + UI menu used for yes/no triggers and autoyields however imo its over-engineering for this use case. Storing those different iterations and combos persistently and allowing user to configure saved ordering prefs for each possible iteration and combo they encountered is a UI nightmare and - even if solvable - the saved prefs and UI menu needed to control it would be a monster. imo not worth it. |
|
Thoughts:
not sure either is worth the effort or this minor improvement is enough and we just take it... feel free to make the final call though perhaps @Madwand99 also wants to chime in? |
|
I like the ability to choose to skip ability order decisions when possible. I agree with @MostCromulent that there is no need to remember beyond a given game. The main thing I'm not sure about is UI. First, the UI for applying ability orders is itself hard to understand. What does it mean? Which ability goes off first? (this is where an Undo would be handy). Then once I've figured that out, what would be easier: to go over to options, select Preselect or Auto-apply, come back, and continue the game, or maybe it's easier just to select a check-box on the auto-apply dialog to "Remember this decision" or similar? I don't have a good answer here. |
I don't have any in-principle issue with a "Remember this decision" checkbox in the selector rather than a universal Auto-pass preference. Will look into network implications of passing preferences on a per-ability-order basis like this. Zooming out a bit: what is the point of the "Preselect Previous Ability Order" preference at all? Since user is shown the ordering dialog anyway, why isn't this just the default ordering behavior and user gets the chance to re-order when they are re-shown the dialog if they don't want to keep previous selected order? With that in mind (and subject to any adverse network issues) we could:
|
Just curious, why does this preference need to be passed over the network anyway? Wouldn't such a preference be unique per each client? It's just automating the choice on the client side. |
|
it saves traffic if host knows he doesn't even have to ask client |
|
Very brief high-level summary: One would assume there are only two relevant network instances: the server and the client. Actually there are three: the server, a server-side proxy for the remote client, and the remote client itself. In ordinary local games you as the user have access the full game state because the engine is running on your machine. In network multiplayer, only the server has access to the engine and not all of its information can be transferred over the network. This means remote clients have to be able to operate with a much more limited set of information. This means even for remote clients most of the processing happens on the server-side remote proxy. Your local machine GUI basically sends the necessary inputs to the server, and your remote proxy on server side applies those inputs and the server sends the results back to your local machine. This means that even for client-specific preferences (yield state, enabled phase stops, "remember this decision" checkbox in our example), network serialization is important because it's the only way your server-side remote proxy finds out what you want to do, other than you being asked to provide an input prompt every time. |
well I guess if you're playing a theoretical deck where common trigger A before B and vice versa are both useful depending on context starting with a preselection adds an additional mouse click if you want to swap it around: I suppose if this PR manages to offer a way to suppress the dialog completely that will be the best outcome - this will tie in nicely with not halting game if a player is auto-yielding |
Adds an "Always use this order" checkbox to the simultaneous-ability ordering dialog. When checked, the chosen order is silently auto-applied on subsequent firings of the same SA combo within the match; when unchecked, the dialog still re-prompts but with the previous order pre-arranged. Preselect-previous behavior is baked in as the default, replacing UI_REORDER_SIMULTANEOUS_ABILITY_MODE entirely (along with its settings-UI row and SYNCED_PREFS entry). A "Reset Saved Ability Orders" Game-menu entry (always visible) wipes the saved orders via the existing YieldUpdate.ClearAbilityOrders envelope. The prior tri-state pref was a single global toggle that applied to every combo. The per-decision checkbox makes the choice combo-scoped, and gives correct per-client semantics in network play without any pref-overlay routing: the boolean rides back inside the order RPC's return value, written client-side and stored on the same server-side PCH that owns the saved orders for that player. The existing IGuiGame.order ProtocolMethod entry's signature is widened in place. Return type goes from List.class to IGuiGame.OrderResult<T>(List<T> ordered, boolean rememberDecision); one trailing Boolean.TYPE param (showRememberCheckbox) controls per-call checkbox visibility. No new ProtocolMethod entries, no new YieldUpdate variants for the response path. Every existing order(...) call site routes through narrow default overloads on IGuiGame that pass false and unwrap .ordered() back to List<T>, so the checkbox stays hidden everywhere except orderSimultaneousSa. Mobile parity included. PCH storage uses parallel structures - Map<String, List<Integer>> orderedSALookup + Set<String> rememberedKeys - rather than a wrapping record + helper cluster, addressing tool4ever's architectural-extension feedback on <!-- -->Card-Forge#10612. The lookup-key build, validity check, and apply loop are all inline in orderSimultaneousSa. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
58a59e8 to
67bd33a
Compare
…y-order IGuiGame.order: resolved in favor of the 9-arg widening (4-arg default delegates straight to 9-arg via .ordered() unwrap). Upstream's parallel refactor (4-arg → 8-arg) is subsumed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Forge prompts the user to order simultaneous abilities every time they fire, even after the user already ordered the same combo earlier in the game.
The previous pref (Preselect Previous Ability Order) only prefilled the dialog — it still required confirmation. Players who'd decided their preferred order had no way to skip the repeat prompt.
This PR replaces the boolean pref with a tri-state Remember Ability Orders (Off / Preselect / Auto-apply).
A Clear Ability Orders entry in the Game menu (visible only in Auto mode) wipes the saved orders within the current Game.
The read site is routed through YieldReworkV2's per-PCH pref overlay so remote clients in network play honour their own setting, not the host's.
Applies same concept as closed #10612 but with per-PCH architecture.
🤖 Generated with Claude Code