feat(phase9): ability system gap fixes -- pause propagation, handlers, chooser, aura actions

- Fix pause propagation: ExecuteActions for-loop breaks on HasPendingInteraction();
  effect loop in ExecuteSingleAction also stops when any pending state is set
- Add HasPendingInteraction() helper to GameState covering all 7 pending types
- Create 4 missing handlers: GameCostGroupPickHandler, GameActionGroupPickHandler,
  GameBranchPickHandler, GameRevealChoicePickHandler + register in ServiceRegistration
- Add corresponding request/response records to GameMessages.cs
- Fix ActionNeedsClientTargets: short-circuit false when Chooser == Random
- Add ChooserActorId to PendingTriggeredTarget; FireTrigger sets it to opponent/ally
  when Chooser.Opponent/Ally; GameHandlerBase pushes to ChooserActorId
- ResumeTriggeredAbility validates against ChooserActorId (falls back to ActorId)
- Fix ApplyOnEventEffect: Action[] -> ActionGroup?; PendingDeferredEffect gains
  ActionGroupJson field; deferred firing uses ResolveActionGroup + ExecuteActions
- Wire OnEnterAuraActions / OnLeaveAuraActions into FireAuraTransition (one-shot,
  restricted to the entering/leaving unit)

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:
dingo
2026-04-21 06:09:32 -04:00
co-authored by Claude Happy
parent 80b92b17b9
commit 95c01cffb5
11 changed files with 411 additions and 15 deletions
+50
View File
@@ -860,3 +860,53 @@ public sealed record GameCostPickRequest(
/// <summary>Acknowledged response for a cost pick submission.</summary>
public sealed record GameCostPickResponse(bool Success);
/// <summary>
/// Sent by the chooser to select which CostGroup option to pay when logic is OR/XOR.
/// </summary>
public sealed record GameCostGroupPickRequest(
Guid SessionId,
string RequestId,
/// <summary>0-based index of the chosen cost option within the pending group.</summary>
int ChoiceIndex);
/// <summary>Acknowledged response for a cost-group pick submission.</summary>
public sealed record GameCostGroupPickResponse(bool Success);
/// <summary>
/// Sent by the chooser to select which ActionGroup branch to execute when logic is OR/XOR.
/// </summary>
public sealed record GameActionGroupPickRequest(
Guid SessionId,
string RequestId,
/// <summary>0-based index of the chosen child action/group.</summary>
int ChoiceIndex);
/// <summary>Acknowledged response for an action-group pick submission.</summary>
public sealed record GameActionGroupPickResponse(bool Success);
/// <summary>
/// Sent by the chooser (Opponent/Ally) to pick a ChooseOne branch.
/// </summary>
public sealed record GameBranchPickRequest(
Guid SessionId,
string RequestId,
/// <summary>0-based index of the chosen branch.</summary>
int BranchIndex);
/// <summary>Acknowledged response for a branch pick submission.</summary>
public sealed record GameBranchPickResponse(bool Success);
/// <summary>
/// Sent by the chooser to order the revealed cards (e.g. StackDeckEffect interactive).
/// </summary>
public sealed record GameRevealChoicePickRequest(
Guid SessionId,
string RequestId,
/// <summary>
/// 0-based indices of the revealed cards in the desired top-to-bottom order.
/// Cards not listed are placed at the bottom of the deck.
/// </summary>
int[] OrderedIndices);
/// <summary>Acknowledged response for a reveal-choice pick submission.</summary>
public sealed record GameRevealChoicePickResponse(bool Success);