feat(ability-prompts): wire all 8 pending pick types end-to-end
Server:
- GameMessages.cs: add push DTOs for CostGroupPick, ActionGroupPick,
BranchPick, TargetPick, TilePick, PlayerPick, RevealChoicePick
- GameHandlerBase.PushStateToPlayersAsync: push all 8 pending types
(including existing CostPick which was missing its push) to the
chooser player after every state update and on reconnect
Client:
- Game.gd: add 8 signals, 8 send functions, 8 push routes matching
game.ability.{cost,cost_group,action_group,branch,target,tile,player,
reveal_choice}_pick_request
- game_screen.gd: add handlers for all 8 types:
- cost_pick: hand-card selection panel with confirm
- cost_group_pick / action_group_pick: option-button panels
- branch_pick: same UI as local ChooseOne but sends game.branch_pick
- target_pick: reuses ABILITY_TARGET mode, flag routes to game.target_pick
- tile_pick: highlights valid tiles, click sends game.tile_pick
- player_pick: player-button panel from server-supplied validPlayerIds
- reveal_choice_pick: click-to-order card list, sends game.reveal_choice_pick
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -949,3 +949,96 @@ public sealed record GamePlayerPickRequest(
|
||||
|
||||
/// <summary>Acknowledged response for a player pick submission.</summary>
|
||||
public sealed record GamePlayerPickResponse(bool Success);
|
||||
|
||||
// ── Ability-pause push DTOs (server → client) ─────────────────────────────────
|
||||
|
||||
/// <summary>
|
||||
/// Pushed to the chooser when a CostGroup with OR/XOR logic requires a choice.
|
||||
/// The chooser responds with <see cref="GameCostGroupPickRequest"/>.
|
||||
/// </summary>
|
||||
public sealed record CostGroupPickRequestPush(
|
||||
string RequestId,
|
||||
string SourceInstanceId,
|
||||
/// <summary>JSON-serialized CostGroup — full group definition for display.</summary>
|
||||
string CostGroupJson);
|
||||
|
||||
/// <summary>
|
||||
/// Pushed to the chooser when an ActionGroup with OR/XOR logic requires a choice.
|
||||
/// The chooser responds with <see cref="GameActionGroupPickRequest"/>.
|
||||
/// </summary>
|
||||
public sealed record ActionGroupPickRequestPush(
|
||||
string RequestId,
|
||||
string SourceInstanceId,
|
||||
/// <summary>JSON-serialized ActionGroup — full group definition for display.</summary>
|
||||
string ActionGroupJson);
|
||||
|
||||
/// <summary>
|
||||
/// Pushed to the chooser (Opponent/Ally) when a ChooseOne requires a branch selection.
|
||||
/// The chooser responds with <see cref="GameBranchPickRequest"/>.
|
||||
/// </summary>
|
||||
public sealed record BranchPickRequestPush(
|
||||
string RequestId,
|
||||
string SourceInstanceId,
|
||||
int BranchCount,
|
||||
/// <summary>JSON-serialized Branch[] for display labels.</summary>
|
||||
string BranchesJson);
|
||||
|
||||
/// <summary>
|
||||
/// Pushed to the chooser (Opponent/Ally) when a leaf Action needs target picks
|
||||
/// from the non-activating player.
|
||||
/// The chooser responds with <see cref="GameTargetPickRequest"/>.
|
||||
/// </summary>
|
||||
public sealed record TargetPickRequestPush(
|
||||
string RequestId,
|
||||
string SourceInstanceId,
|
||||
/// <summary>JSON-serialized Action — full selector for client highlight logic.</summary>
|
||||
string ActionJson,
|
||||
/// <summary>JSON-serialized AbilityRange? — null when no range constraint.</summary>
|
||||
string? RangeJson);
|
||||
|
||||
/// <summary>
|
||||
/// Pushed to the chooser when an effect requires a tile selection.
|
||||
/// The chooser responds with <see cref="GameTilePickRequest"/>.
|
||||
/// </summary>
|
||||
public sealed record TilePickRequestPush(
|
||||
string RequestId,
|
||||
string SourceInstanceId,
|
||||
/// <summary>Discriminator for display (e.g. "CloneSpiritAsToken", "RelocateRuin").</summary>
|
||||
string EffectType,
|
||||
bool RequireEmpty,
|
||||
bool RequireOccupied,
|
||||
string? OccupantOwnership,
|
||||
/// <summary>Max tile distance from source; 0 = unlimited.</summary>
|
||||
int MaxRange,
|
||||
/// <summary>InstanceId of the primary target already resolved (e.g. the Spirit to clone). Empty when N/A.</summary>
|
||||
string TargetInstanceId);
|
||||
|
||||
/// <summary>
|
||||
/// Pushed to the chooser when an effect requires a player selection.
|
||||
/// The chooser responds with <see cref="GamePlayerPickRequest"/>.
|
||||
/// </summary>
|
||||
public sealed record PlayerPickRequestPush(
|
||||
string RequestId,
|
||||
string SourceInstanceId,
|
||||
/// <summary>Discriminator for display (e.g. "ChannelCardFromZone").</summary>
|
||||
string EffectType,
|
||||
/// <summary>"Self" | "Opponent" | "Any" — ownership hint for display.</summary>
|
||||
string Ownership,
|
||||
/// <summary>Account IDs of valid player choices.</summary>
|
||||
IReadOnlyList<string> ValidPlayerIds,
|
||||
/// <summary>InstanceId of the primary target already resolved. Empty when N/A.</summary>
|
||||
string TargetInstanceId);
|
||||
|
||||
/// <summary>
|
||||
/// Pushed to the chooser when cards have been revealed and must be ordered
|
||||
/// (e.g. StackDeckEffect interactive path).
|
||||
/// The chooser responds with <see cref="GameRevealChoicePickRequest"/>.
|
||||
/// </summary>
|
||||
public sealed record RevealChoicePickRequestPush(
|
||||
string RequestId,
|
||||
string SourceInstanceId,
|
||||
string EffectType,
|
||||
/// <summary>JSON-serialized CardInstance[] — the revealed cards to order.</summary>
|
||||
string RevealedCardsJson,
|
||||
/// <summary>How many cards must be included in the ordered response.</summary>
|
||||
int Count);
|
||||
|
||||
Reference in New Issue
Block a user