@my-swu/simulator-client 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/generated/index.d.ts +3 -0
  2. package/dist/generated/schemas.d.ts +1 -1
  3. package/dist/generated/schemas.js +2911 -2689
  4. package/dist/generated/types/admin-match-debug-bundle.d.ts +1 -1
  5. package/dist/generated/types/admin-match-replay-response.d.ts +1 -1
  6. package/dist/generated/types/client-message.d.ts +1 -1
  7. package/dist/generated/types/common.d.ts +272 -260
  8. package/dist/generated/types/create-playground-share-response.d.ts +1 -0
  9. package/dist/generated/types/create-playground-share-response.js +2 -0
  10. package/dist/generated/types/format-event-response.d.ts +1 -1
  11. package/dist/generated/types/game-command.d.ts +1 -1
  12. package/dist/generated/types/game-event.d.ts +1 -1
  13. package/dist/generated/types/game-state.d.ts +1 -1
  14. package/dist/generated/types/get-match-response.d.ts +1 -1
  15. package/dist/generated/types/list-active-ai-matches-response.d.ts +1 -1
  16. package/dist/generated/types/lobby-access-response.d.ts +1 -1
  17. package/dist/generated/types/lobby-server-message.d.ts +1 -1
  18. package/dist/generated/types/match-access-recovery-response.d.ts +1 -1
  19. package/dist/generated/types/match-access-response.d.ts +1 -1
  20. package/dist/generated/types/match-history-replay-response.d.ts +1 -1
  21. package/dist/generated/types/match-recovery-response.d.ts +1 -1
  22. package/dist/generated/types/match-spectator-access-response.d.ts +1 -1
  23. package/dist/generated/types/playground-export-payload.d.ts +1 -0
  24. package/dist/generated/types/playground-export-payload.js +2 -0
  25. package/dist/generated/types/rematch-match-response.d.ts +1 -1
  26. package/dist/generated/types/restore-history-response.d.ts +1 -1
  27. package/dist/generated/types/restore-match-save-response.d.ts +1 -1
  28. package/dist/generated/types/server-message.d.ts +1 -1
  29. package/dist/generated/types/set-ai-paused-response.d.ts +1 -1
  30. package/dist/generated/types/set-playground-ai-seat-request.d.ts +1 -0
  31. package/dist/generated/types/set-playground-ai-seat-request.js +2 -0
  32. package/dist/generated/types/shared-match-history-replay-response.d.ts +1 -1
  33. package/dist/generated/types/submit-match-deck-response.d.ts +1 -1
  34. package/dist/generated/types/tournament-room-access-response.d.ts +1 -1
  35. package/dist/generated/types/tournament-room-server-message.d.ts +1 -1
  36. package/dist/generated/types/undo-match-response.d.ts +1 -1
  37. package/dist/generated/types/welcome-payload.d.ts +1 -1
  38. package/dist/generated/version.d.ts +1 -1
  39. package/dist/generated/version.js +1 -1
  40. package/dist/index.d.ts +2 -1
  41. package/dist/resources/admin.d.ts +3 -1
  42. package/dist/resources/admin.js +1 -0
  43. package/dist/resources/match-types.d.ts +11 -1
  44. package/dist/resources/matches.js +49 -0
  45. package/dist/types.d.ts +1 -1
  46. package/dist/validators.d.ts +4 -1
  47. package/package.json +1 -1
  48. package/schema/common.schema.json +2814 -2735
  49. package/schema/create-match-request.schema.json +5 -0
  50. package/schema/create-playground-share-response.schema.json +22 -0
  51. package/schema/game-command.schema.json +20 -0
  52. package/schema/game-state.schema.json +23 -0
  53. package/schema/manifest.json +4 -1
  54. package/schema/match-save-payload.schema.json +9 -1
  55. package/schema/playground-export-payload.schema.json +26 -0
  56. package/schema/route-manifest.json +58 -0
  57. package/schema/set-playground-ai-seat-request.schema.json +36 -0
@@ -39,9 +39,18 @@ export type AbilityTarget = ({
39
39
  /**
40
40
  * Trigger window for a parsed ability. Identifies WHEN the ability
41
41
  * fires; the WHAT is carried by `TriggeredEffect`.
42
+ *
43
+ * This type is on the public SDK schema — it reaches `GameState` through
44
+ * `PendingAbilityView.window` and `GameEvent` — but only ever server to
45
+ * client: no `GameCommand` carries one, so a consumer reads it and never
46
+ * constructs it. The two variants that carry a [`crate::effect::UnitFilter`]
47
+ * are therefore exported opaquely, the way `MatchSavePayload::state` is: the
48
+ * variant discriminant stays on the wire so a UI can still switch on the
49
+ * window, while the engine filter behind it does not pin ~60 internal fields
50
+ * and their whole reference closure into the SDK type surface.
42
51
  */
43
52
  export type AbilityWindow = (("AfterPlayOrDeploy" | "WhenActionPhaseStarts" | "WhenFirstActionPhaseStarts" | "WhenYouDrawCardsDuringActionPhase" | "WhenAnOpponentDrawsCardsDuringActionPhase" | "WhenAPlayerDrawsCardsDuringActionPhase" | "WhenYouTakeInitiative" | "WhenYouDeployLeader" | "WhenEntersPlay" | "OnAttack" | "OnDefense" | "WhenFriendlyUnitAttacks" | "WhenThisUnitIsAttacked" | "WhenThisUnitReadies" | "WhenDamageIsDealtToThisUnit" | "WhenCombatDamageIsDealtToThisUnit" | "WhenThisUnitIsHealed" | "WhenDamageIsDealtToYourBase" | "WhenFriendlyUnitDealsDamageToEnemyUnit" | "WhenEnemyUnitAttacks" | "WhenEnemyUnitAttacksYourBase" | "WhenPilotAttachesToThisUnit" | "WhenFriendlyUnitIsDefeated" | "WhenThisUnitDealsCombatDamageToBase" | "WhenThisUnitDealsCombatDamageToUnit" | "WhenFriendlyUnitDealsCombatDamageToBase" | "WhenEnemyUnitDealsCombatDamageToYourBase" | "WhenAttackEnds" | "WhenFriendlyUnitAttackEnds" | "WhenCaptured" | "WhenDefeated" | "WhenEnemyUnitDefeated" | "WhenIndirectDamageDealtToUnit" | "WhenYouDealNonCombatDamage" | "WhenRevealOrDiscardFromHand" | "WhenAPlayerDiscardsFromHand" | "WhenOpponentPlaysCard" | "WhenOpponentPlaysEvent" | "WhenOpponentPlaysSecondCardEachPhase" | "WhenYouUseTheForce" | "WhenRegroupPhaseStarts" | "WhenFriendlyForceUnitAttacks" | "AtStartOfTurn" | "AtEndOfTurn") | "WhenYouDrawCards" | "WhenEnemyUnitReadiesDuringActionPhase" | "WhenFriendlyUnitDealtDamageAndSurvives" | {
44
- WhenFriendlyUnitDealtCombatDamageAndSurvives: UnitFilter;
53
+ WhenFriendlyUnitDealtCombatDamageAndSurvives: unknown;
45
54
  } | "WhenEnemyGroundUnitAttacksYourBase" | {
46
55
  WhenAnotherFriendlyTraitUnitAttacks: string;
47
56
  } | "WhenUpgradeAttachesToThisUnit" | "WhenAnotherFriendlyUnitIsDefeated" | "WhenFriendlyUpgradeIsDefeated" | {
@@ -49,7 +58,7 @@ export type AbilityWindow = (("AfterPlayOrDeploy" | "WhenActionPhaseStarts" | "W
49
58
  } | "WhenYouDealDamageToEnemyBase" | {
50
59
  WhenFriendlyTraitUnitAttackEnds: string;
51
60
  } | "WhenThisUnitWouldBeCaptured" | {
52
- WhenUnitDefeated: UnitFilter;
61
+ WhenUnitDefeated: unknown;
53
62
  } | {
54
63
  WhenUnitLeavesPlay: RelationFilter;
55
64
  } | "WhenYouReadyCardsDuringRegroup" | "WhenFriendlyUnitAttacksAndDefeats" | "WhenFriendlyUnitDefeatedWhileAttacking" | "WhenYouPlayEvent" | "WhenYouPlayAUnit" | "WhenYouPlayOrCreateAUnit" | "WhenFriendlyUnitEntersPlay" | "WhenYouPlayAnotherUnit" | "WhenYouPlayAnUpgrade" | "WhenYouCollectABounty" | "WhenYouDiscardFromDeck");
@@ -278,6 +287,87 @@ export interface AdminMatchSummary {
278
287
  status: HistoryStatus;
279
288
  updatedAtMs: number;
280
289
  }
290
+ /**
291
+ * One AI decision's search-budget diagnostics, safe for durable storage.
292
+ */
293
+ export interface AiDecisionDiagnostic {
294
+ /**
295
+ * Pending ability the chosen command answered, when applicable.
296
+ */
297
+ abilityId?: (number | null);
298
+ /**
299
+ * Privacy-safe chosen-command shape: snake_case command kind only.
300
+ */
301
+ commandKind: string;
302
+ difficulty: AiDifficulty;
303
+ elapsedMs: number;
304
+ /**
305
+ * Engine event counter of the searched state; exact cross-check key.
306
+ */
307
+ eventsApplied: number;
308
+ /**
309
+ * Index of the replay frame this decision was made on (the state BEFORE
310
+ * the chosen command applied). `None` when no frame was recorded yet.
311
+ */
312
+ frameIndex?: (number | null);
313
+ /**
314
+ * Whether the minimum-iteration floor pushed past the wall-clock budget.
315
+ */
316
+ hardFloorOverrun: boolean;
317
+ /**
318
+ * Idle-stretch ceiling granted for this decision, when one was.
319
+ */
320
+ iterationCeiling?: (number | null);
321
+ iterationsBudget: number;
322
+ iterationsDone: number;
323
+ legalCount: number;
324
+ /**
325
+ * Minimum-iteration floor the search guarantees past the wall clock.
326
+ */
327
+ minIterations: number;
328
+ /**
329
+ * Time spent waiting for scheduler admission before the search started.
330
+ */
331
+ queueMs: number;
332
+ /**
333
+ * Whether the AI scheduler was idle when this decision was admitted.
334
+ */
335
+ schedulerIdle: boolean;
336
+ searchMode: AiDecisionSearchMode;
337
+ seat: Seat;
338
+ /**
339
+ * Gameplay snapshot marker the searched state carried. An undo between
340
+ * search and record makes this disagree with the frame at `frame_index`.
341
+ */
342
+ snapshotRevision: number;
343
+ /**
344
+ * Public source card of that pending ability, when applicable.
345
+ */
346
+ sourceCardId?: (number | null);
347
+ /**
348
+ * The starved-search guard discarded the search result entirely and
349
+ * answered from a one-ply heuristic ranking instead.
350
+ */
351
+ starvationFallback: boolean;
352
+ /**
353
+ * Starved search: the wall clock cut the decision at (or below) its
354
+ * minimum-iteration floor, so the move rests on noise-level visit
355
+ * counts. Any blunder on a starved decision is explained first by this
356
+ * flag, not by enumeration or evaluation defects.
357
+ */
358
+ starved: boolean;
359
+ timeBudgetMs?: (number | null);
360
+ /**
361
+ * Whether the wall clock cut the search before its iteration budget.
362
+ */
363
+ timeLimited: boolean;
364
+ workersCompleted: number;
365
+ workersRequested: number;
366
+ }
367
+ /**
368
+ * Decision algorithm that produced one recorded AI choice.
369
+ */
370
+ export type AiDecisionSearchMode = ("mcts" | "setupEvaluator" | "fastPath");
281
371
  /**
282
372
  * Public difficulty presets. Internal tuning (iteration counts, time
283
373
  * budgets) lives in `crate::r#match::registry::ai_factory` so it can be
@@ -320,6 +410,7 @@ export interface AiOpponentConfig {
320
410
  trilogyFormatMode: AiTrilogyFormatMode;
321
411
  }
322
412
  export interface AiSeatStatusPayload {
413
+ difficulty: AiDifficulty;
323
414
  paused: boolean;
324
415
  seat: Seat;
325
416
  trilogyFormatMode: AiTrilogyFormatMode;
@@ -699,6 +790,11 @@ export interface CreateMatchRequest {
699
790
  * currently support exactly 2 players.
700
791
  */
701
792
  playerCount: number;
793
+ /**
794
+ * Enables the server-owned scenario Playground runtime. Normal matches
795
+ * retain the default and never accept Playground mutations.
796
+ */
797
+ playground?: boolean;
702
798
  /**
703
799
  * Optional authored scenario selector for direct Learn match creation.
704
800
  */
@@ -719,6 +815,13 @@ export interface CreateMetaWindowRequest {
719
815
  startsAtMs?: (number | null);
720
816
  title: string;
721
817
  }
818
+ /**
819
+ * Opaque 30-day Playground share capability.
820
+ */
821
+ export interface CreatePlaygroundShareResponse {
822
+ expiresAtMs: number;
823
+ shareToken: string;
824
+ }
722
825
  /**
723
826
  * Request body for creating one sealed/draft tournament room.
724
827
  */
@@ -1020,14 +1123,6 @@ export interface DraftRoundConfig {
1020
1123
  */
1021
1124
  setCode: string;
1022
1125
  }
1023
- /**
1024
- * Typed game-state source for a dynamic Unit power ceiling.
1025
- */
1026
- export type DynamicPowerLimit = {
1027
- UpgradesOnUnits: {
1028
- relation: RelationFilter;
1029
- };
1030
- };
1031
1126
  /**
1032
1127
  * Public card subset affected by a play or cost modifier.
1033
1128
  */
@@ -1410,6 +1505,10 @@ export type FormatSetupInput = ({
1410
1505
  type: "draft";
1411
1506
  });
1412
1507
  export type GameCommand = (("deployLeader" | "takeInitiative" | "pass" | "concede") | {
1508
+ playground: {
1509
+ command: PlaygroundCommand;
1510
+ };
1511
+ } | {
1413
1512
  chooseInitiativePlayer: {
1414
1513
  seat: Seat;
1415
1514
  };
@@ -2004,6 +2103,19 @@ export interface GameState {
2004
2103
  */
2005
2104
  playerCount: number;
2006
2105
  players: SeatState[];
2106
+ /**
2107
+ * Whether this snapshot belongs to a server-authorized Playground match.
2108
+ */
2109
+ playground?: boolean;
2110
+ /**
2111
+ * Host-only Playground ability projection. Empty for normal matches and
2112
+ * while a resolution owns the command boundary.
2113
+ */
2114
+ playgroundActionAbilities?: PlaygroundActionAbilityView[];
2115
+ /**
2116
+ * Printed cards supplied by every configured Playground deck.
2117
+ */
2118
+ playgroundDeckCardIds?: number[];
2007
2119
  prompt: PromptState;
2008
2120
  rejectedPlayReasons: RejectedPlayView[];
2009
2121
  result?: (MatchResult | null);
@@ -3258,6 +3370,11 @@ export interface MatchHistoryPlayerSummary {
3258
3370
  * `revealed_frames` is returned only after both completion and ownership checks.
3259
3371
  */
3260
3372
  export interface MatchHistoryReplayArchive {
3373
+ /**
3374
+ * Per-AI-decision search diagnostics (budget, workers, starvation), in
3375
+ * decision order. Additive: older archives decode with an empty list.
3376
+ */
3377
+ aiDecisions?: AiDecisionDiagnostic[];
3261
3378
  /**
3262
3379
  * Events folded into each matching replay frame. Older archives decode
3263
3380
  * without this additive field and remain playable without captions.
@@ -3368,6 +3485,11 @@ export interface MatchSavePayload {
3368
3485
  * Whether AI was manually paused when this snapshot was captured.
3369
3486
  */
3370
3487
  aiPaused: boolean;
3488
+ /**
3489
+ * Exact manually paused AI seats. Empty payloads from older clients use
3490
+ * `ai_paused` as the all-seat compatibility fallback.
3491
+ */
3492
+ aiPausedSeats?: Seat[];
3371
3493
  /**
3372
3494
  * Wire mirror of the [`UnitState::copied_card`] Arcs that the inner
3373
3495
  * state could not embed. Keyed by `unit.instance_id`. Empty when no
@@ -3411,7 +3533,8 @@ export interface MatchSavePayload {
3411
3533
  };
3412
3534
  /**
3413
3535
  * Wire-format version. Always [`MATCH_SAVE_VERSION`] for newly minted
3414
- * payloads; restore rejects mismatches.
3536
+ * payloads; restore accepts every [`SUPPORTED_SAVE_VERSIONS`] entry and
3537
+ * rejects anything else.
3415
3538
  */
3416
3539
  version: number;
3417
3540
  }
@@ -3941,9 +4064,123 @@ export type PlayCardZone = ("hand" | "resource" | "discardPile");
3941
4064
  * One server-authoritative human-player room lifecycle event.
3942
4065
  */
3943
4066
  export type PlayerPresenceStatus = ("joined" | "disconnected" | "reconnected" | "left");
3944
- export type PlayerTargetPattern = (("SelfPlayer" | "EachPlayer" | "OpponentPlayer" | "ChosenOpponent" | "ChosenPlayer" | "DefendingPlayer" | "RememberedPlayer" | "RememberedUnitController" | "OtherThanRememberedPlayer") | "EachOpponent" | "EachOpponentWhoseBaseDamagedBySourceThisPhase" | "RememberedTargetController" | {
3945
- RelativeToRememberedPlayer: SeatDirection;
3946
- } | "ControllerOfLowerCostRememberedUnit");
4067
+ /**
4068
+ * Playground-only action ability that may be executed without normal action
4069
+ * timing, usage, condition, or cost gates.
4070
+ */
4071
+ export interface PlaygroundActionAbilityView {
4072
+ label: string;
4073
+ seat: Seat;
4074
+ source: ActionAbilitySource;
4075
+ targetGroups: TargetSelectionGroup[];
4076
+ }
4077
+ /**
4078
+ * One in-play card whose Playground-editable state may be set exactly.
4079
+ *
4080
+ * Every field is a target value rather than a delta, so a client that shows
4081
+ * current counts can submit what the board should look like instead of
4082
+ * reconstructing the sequence of adjustments that gets there. Anything the
4083
+ * engine derives — keywords, clone identity, controller, arena, card text —
4084
+ * stays out of this patch and remains read-only.
4085
+ */
4086
+ export type PlaygroundCardStateChange = ({
4087
+ advantageTokens?: (number | null);
4088
+ damage?: (number | null);
4089
+ experienceTokens?: (number | null);
4090
+ /**
4091
+ * `true` readies the unit even while an effect forbids readying.
4092
+ */
4093
+ ready?: (boolean | null);
4094
+ shieldTokens?: (number | null);
4095
+ type: "unit";
4096
+ unitId: number;
4097
+ } | {
4098
+ damage: number;
4099
+ seat: Seat;
4100
+ type: "base";
4101
+ });
4102
+ /**
4103
+ * Host-authorized raw scenario mutation for a Playground match.
4104
+ */
4105
+ export type PlaygroundCommand = ({
4106
+ cardId: number;
4107
+ seat: Seat;
4108
+ type: "addResource";
4109
+ } | {
4110
+ card_ids: number[];
4111
+ seat: Seat;
4112
+ type: "setDrawQueue";
4113
+ } | {
4114
+ attachedToUnitId?: (number | null);
4115
+ cardId: number;
4116
+ seat: Seat;
4117
+ type: "putCardInPlay";
4118
+ } | {
4119
+ attachedToUnitId?: (number | null);
4120
+ cardId: number;
4121
+ seat: Seat;
4122
+ type: "playCardForFree";
4123
+ } | {
4124
+ modeIndices: number[];
4125
+ seat: Seat;
4126
+ source: ActionAbilitySource;
4127
+ target?: (AbilityTarget | null);
4128
+ targets: AbilityTarget[];
4129
+ type: "executeActionAbility";
4130
+ } | {
4131
+ amount: number;
4132
+ target: PlaygroundDamageTarget;
4133
+ type: "setDamage";
4134
+ } | {
4135
+ change: PlaygroundCardStateChange;
4136
+ type: "changeCardState";
4137
+ } | {
4138
+ target: PlaygroundDefeatTarget;
4139
+ type: "defeatCard";
4140
+ } | {
4141
+ captorUnitId: number;
4142
+ cardId: number;
4143
+ ownerSeat: Seat;
4144
+ type: "captureCard";
4145
+ } | {
4146
+ cardId: number;
4147
+ leaderIndex: number;
4148
+ seat: Seat;
4149
+ type: "swapLeader";
4150
+ } | {
4151
+ cardId: number;
4152
+ seat: Seat;
4153
+ type: "swapBase";
4154
+ });
4155
+ /**
4156
+ * One board target whose damage counter Playground may set exactly.
4157
+ */
4158
+ export type PlaygroundDamageTarget = ({
4159
+ seat: Seat;
4160
+ type: "base";
4161
+ } | {
4162
+ type: "unit";
4163
+ unit_id: number;
4164
+ });
4165
+ /**
4166
+ * One in-play card Playground may defeat through normal leave-play handling.
4167
+ */
4168
+ export type PlaygroundDefeatTarget = ({
4169
+ type: "unit";
4170
+ unit_id: number;
4171
+ } | {
4172
+ type: "upgrade";
4173
+ upgrade_id: number;
4174
+ });
4175
+ /**
4176
+ * Portable Playground file. `restore_token` is a dedicated capability and
4177
+ * never contains a live match seat token.
4178
+ */
4179
+ export interface PlaygroundExportPayload {
4180
+ restoreToken: string;
4181
+ save: MatchSavePayload;
4182
+ version: number;
4183
+ }
3947
4184
  /**
3948
4185
  * Asks the limited-event host to prebuild every server-AI deck after the
3949
4186
  * shared pool is complete. Human players may continue constructing decks
@@ -3952,7 +4189,6 @@ export type PlayerTargetPattern = (("SelfPlayer" | "EachPlayer" | "OpponentPlaye
3952
4189
  export interface PrepareLobbyLimitedAiDecksRequest {
3953
4190
  playerToken: string;
3954
4191
  }
3955
- export type PresenceFilter = ("Any" | "Required" | "Forbidden");
3956
4192
  /**
3957
4193
  * Stable parent/stage identity shared by every prompt opened during an effect.
3958
4194
  */
@@ -4216,6 +4452,9 @@ export interface RejectedPlayView {
4216
4452
  cardInstanceId: number;
4217
4453
  reason: string;
4218
4454
  }
4455
+ /**
4456
+ * Restricts a target by controller relation to the effect source.
4457
+ */
4219
4458
  export type RelationFilter = ("Any" | "Friendly" | "Enemy");
4220
4459
  /**
4221
4460
  * HTTP request body for offering, accepting, or declining a rematch.
@@ -4357,10 +4596,6 @@ export interface SaveMatchRequest {
4357
4596
  * Player slot in clockwise multiplayer order.
4358
4597
  */
4359
4598
  export type Seat = ("one" | "two" | "three" | "four");
4360
- /**
4361
- * Relative multiplayer seat direction.
4362
- */
4363
- export type SeatDirection = ("Left" | "Right");
4364
4599
  /**
4365
4600
  * Per-seat stance on a two-sided post-game offer.
4366
4601
  *
@@ -4469,10 +4704,6 @@ export interface SeatState {
4469
4704
  */
4470
4705
  sideboardCount: number;
4471
4706
  }
4472
- /**
4473
- * How far back an `exclude_previously_selected` filter looks.
4474
- */
4475
- export type SelectionScope = ("ThisEffect" | "ThisClause");
4476
4707
  /**
4477
4708
  * Public reason a match series ended.
4478
4709
  */
@@ -4567,6 +4798,21 @@ export interface SetAiPausedRequest {
4567
4798
  */
4568
4799
  seatToken: string;
4569
4800
  }
4801
+ /**
4802
+ * Host-authored AI controller settings for one Playground seat.
4803
+ */
4804
+ export interface SetPlaygroundAiSeatRequest {
4805
+ /**
4806
+ * `None` removes the AI controller from this seat.
4807
+ */
4808
+ difficulty: (AiDifficulty | null);
4809
+ /**
4810
+ * Manual per-seat pause state. Ignored when `difficulty` is `None`.
4811
+ */
4812
+ paused: boolean;
4813
+ seat: Seat;
4814
+ seatToken: string;
4815
+ }
4570
4816
  /**
4571
4817
  * Request body for allowing or pausing new ranked queue admissions.
4572
4818
  */
@@ -4871,6 +5117,9 @@ export type TargetGroupPurpose = ({
4871
5117
  kind: "attachUpgrade";
4872
5118
  } | {
4873
5119
  kind: "exhaust";
5120
+ } | {
5121
+ amount: number;
5122
+ kind: "payToAvoidExhaust";
4874
5123
  } | {
4875
5124
  kind: "ready";
4876
5125
  } | {
@@ -5166,7 +5415,6 @@ export interface UndoRespondMatchRequest {
5166
5415
  */
5167
5416
  seatToken: string;
5168
5417
  }
5169
- export type UniquenessFilter = ("Any" | "Unique" | "NonUnique");
5170
5418
  export type UnitAbilitySuppressionView = ("none" | "partial" | "full");
5171
5419
  /**
5172
5420
  * Mirror of one [`UnitState::copied_card`] value on the wire.
@@ -5185,242 +5433,6 @@ export interface UnitCopiedCardEntry {
5185
5433
  unitInstanceId: number;
5186
5434
  }
5187
5435
  export type UnitDefeatCause = ("other" | "damage");
5188
- export type UnitExtremum = ("LeastRemainingHp" | "MostPower" | "HighestPrintedCost");
5189
- export interface UnitFilter {
5190
- /**
5191
- * Matches when any complete alternative filter matches.
5192
- *
5193
- * This keeps `one_of((unit_selector_a, unit_selector_b))` orthogonal
5194
- * without flattening distinct restrictions into one lossy filter.
5195
- */
5196
- alternatives?: UnitFilter[];
5197
- arena?: (CardArena | null);
5198
- attacked_base_this_phase: boolean;
5199
- /**
5200
- * Requires current control by one typed player independently from the
5201
- * broad source-relative relation.
5202
- */
5203
- controller?: (PlayerTargetPattern | null);
5204
- /**
5205
- * Marks a count whose Units must all be controlled by one other player.
5206
- *
5207
- * This is consumed by `Condition::AnotherPlayerControlsUnitsAtLeast`
5208
- * before the filter reaches ordinary target matching.
5209
- */
5210
- controller_is_another_player?: boolean;
5211
- controller_is_remembered_player: boolean;
5212
- dealt_base_damage_this_phase: boolean;
5213
- /**
5214
- * Matches a Unit in the arena opposite the resolving source Unit.
5215
- */
5216
- different_arena_from_source?: boolean;
5217
- different_aspect_from_remembered_card: boolean;
5218
- /**
5219
- * Requires legal attachment for Upgrade retained by preceding choice.
5220
- */
5221
- eligible_for_remembered_upgrade?: boolean;
5222
- exact_cost?: (number | null);
5223
- /**
5224
- * Only matches units whose cost equals context.remembered_unit_cost.
5225
- */
5226
- exact_cost_same_as_remembered_cost?: boolean;
5227
- exact_power_equal_ready_resources: boolean;
5228
- exact_remaining_hp_equal_ready_resources: boolean;
5229
- exact_title?: (string | null);
5230
- /**
5231
- * Matches any unit whose title is in this list. When combined with
5232
- * required_traits_any, either a matching title or trait satisfies the
5233
- * name/trait requirement.
5234
- */
5235
- exact_titles_any: string[];
5236
- /**
5237
- * Excludes Unit hosting resolving source Upgrade.
5238
- */
5239
- exclude_attached_unit?: boolean;
5240
- /**
5241
- * Excludes only the Unit that dealt the immediately preceding damage.
5242
- */
5243
- exclude_previous_damage_dealer?: boolean;
5244
- /**
5245
- * Excludes every Unit already selected earlier in the resolving effect.
5246
- *
5247
- * Distinct from `require_other`, which only knows the source Unit and the
5248
- * single most recent selection: a third sequential choice ("Give a third
5249
- * friendly unit +1/+1") has to exclude both earlier picks.
5250
- */
5251
- exclude_previously_selected?: (SelectionScope | null);
5252
- /**
5253
- * Excludes units retained by a preceding multi-target choice.
5254
- */
5255
- exclude_remembered_units?: boolean;
5256
- excluded_aspects: string[];
5257
- /**
5258
- * Excludes units currently controlled by one typed player.
5259
- */
5260
- excluded_controller?: (PlayerTargetPattern | null);
5261
- /**
5262
- * Excludes units with any listed canonical title.
5263
- */
5264
- excluded_titles?: string[];
5265
- excluded_traits: string[];
5266
- /**
5267
- * Restricts iteration to Units exploited while playing resolving source card.
5268
- */
5269
- exploited_to_play_source?: boolean;
5270
- extremum?: (UnitExtremum | null);
5271
- max_cost?: (number | null);
5272
- /**
5273
- * Only matches units whose printed cost is strictly less than the amount of
5274
- * combat damage dealt to a base this attack
5275
- * (`context.combat_damage_dealt_to_base`). Shin Hati ASH 51762.
5276
- */
5277
- max_cost_less_than_combat_damage_to_base?: boolean;
5278
- /**
5279
- * Filters out units whose cost exceeds the cost stored in context.remembered_unit_cost.
5280
- */
5281
- max_cost_same_or_less_than_remembered_cost: boolean;
5282
- /**
5283
- * Filters out units whose printed cost exceeds resources paid to play the
5284
- * source card for current trigger.
5285
- */
5286
- max_cost_same_or_less_than_resources_paid_to_play?: boolean;
5287
- max_cost_same_or_less_than_source: boolean;
5288
- max_power?: (number | null);
5289
- /**
5290
- * Dynamic alternative to a fixed `max_power`.
5291
- */
5292
- max_power_dynamic?: (DynamicPowerLimit | null);
5293
- /**
5294
- * Only matches a unit whose power is strictly less than at least one
5295
- * friendly unit's power (Ahsoka Tano 51727 action target restriction).
5296
- */
5297
- max_power_less_than_any_friendly?: boolean;
5298
- /**
5299
- * Only matches Units with strictly less power than remembered Unit.
5300
- */
5301
- max_power_less_than_remembered_power?: boolean;
5302
- max_power_less_than_source: boolean;
5303
- /**
5304
- * Filters out units whose power exceeds the power stored in context.remembered_unit_power.
5305
- */
5306
- max_power_same_or_less_than_remembered_power: boolean;
5307
- max_remaining_hp?: (number | null);
5308
- max_remaining_hp_less_than_source: boolean;
5309
- min_cost?: (number | null);
5310
- /**
5311
- * Only matches units whose cost is strictly greater than the cost stored in
5312
- * context.remembered_unit_cost (e.g. Reckless Sacrifice's "a unit that costs
5313
- * more than the discarded card").
5314
- */
5315
- min_cost_greater_than_remembered_cost?: boolean;
5316
- min_hp?: (number | null);
5317
- min_power?: (number | null);
5318
- min_remaining_hp?: (number | null);
5319
- /**
5320
- * Only matches Units with at least this many distinct active keywords.
5321
- */
5322
- minimum_distinct_keywords?: (number | null);
5323
- non_leader: boolean;
5324
- /**
5325
- * Requires canonical ownership by one typed player independently from
5326
- * current controller relation.
5327
- */
5328
- owner?: (PlayerTargetPattern | null);
5329
- relation: RelationFilter;
5330
- /**
5331
- * Only matches units that attacked during the current phase.
5332
- */
5333
- require_attacked_this_phase?: boolean;
5334
- require_damaged: boolean;
5335
- /**
5336
- * Only matches units that entered play this phase (UnitState::entered_this_phase).
5337
- */
5338
- require_entered_this_phase: boolean;
5339
- require_exhausted: boolean;
5340
- /**
5341
- * Only matches units that have at least one keyword (printed or granted).
5342
- */
5343
- require_has_keyword?: boolean;
5344
- /**
5345
- * Only matches Units healed at least once during current phase.
5346
- */
5347
- require_healed_this_phase?: boolean;
5348
- /**
5349
- * Restrict to leader units (deployed leaders). Set by "a friendly leader"
5350
- * targets, e.g. Mando's N-1 Starfighter (ASH 52696).
5351
- */
5352
- require_leader?: boolean;
5353
- /**
5354
- * Filters out units that have an Experience token attached.
5355
- */
5356
- require_no_experience: boolean;
5357
- require_no_pilot: boolean;
5358
- /**
5359
- * Filters out units that attacked earlier this phase.
5360
- */
5361
- require_not_attacked_this_phase: boolean;
5362
- /**
5363
- * Only matches Units that did not enter play during current phase.
5364
- */
5365
- require_not_entered_this_phase?: boolean;
5366
- /**
5367
- * Only matches Units that did not enter play during current round.
5368
- */
5369
- require_not_entered_this_round?: boolean;
5370
- require_other: boolean;
5371
- require_ready: boolean;
5372
- /**
5373
- * Only matches units that have at least one Shield token attached.
5374
- */
5375
- require_shield_token?: boolean;
5376
- require_undamaged: boolean;
5377
- required_aspects: string[];
5378
- required_aspects_any: string[];
5379
- required_card_or_upgrade_traits_any: string[];
5380
- required_keywords_any: string[];
5381
- required_traits: string[];
5382
- required_traits_any: string[];
5383
- requires_chosen_aspect: boolean;
5384
- /**
5385
- * Matches the arena occupied by Unit selected earlier in this ability.
5386
- */
5387
- same_arena_as_remembered_unit?: boolean;
5388
- same_arena_as_source: boolean;
5389
- same_name_as_remembered_card: boolean;
5390
- /**
5391
- * Matches Units with same name as Unit stored by preceding target choice.
5392
- */
5393
- same_name_as_remembered_unit?: boolean;
5394
- /**
5395
- * Requires the selected units' printed costs to be at most this value.
5396
- */
5397
- selected_max_combined_cost?: (number | null);
5398
- /**
5399
- * Requires selected Units' current combined power to be at most this value.
5400
- */
5401
- selected_max_combined_power?: (number | null);
5402
- /**
5403
- * Requires the selected units' combined remaining HP to be at most this
5404
- * value (Pre Vizsla ASH 51947: "with a total of N or less remaining HP").
5405
- */
5406
- selected_max_combined_remaining_hp?: (number | null);
5407
- /**
5408
- * Requires every selected unit in a multi-unit selection to share an arena.
5409
- */
5410
- selected_same_arena?: boolean;
5411
- /**
5412
- * Requires every selected Unit to share at least one Trait.
5413
- */
5414
- selected_share_trait?: boolean;
5415
- shares_aspect_with_context_unit: boolean;
5416
- /**
5417
- * Requires the target to share a trait with a leader card controlled by the source player.
5418
- */
5419
- shares_trait_with_friendly_leader: boolean;
5420
- token_filter: PresenceFilter;
5421
- uniqueness_filter: UniquenessFilter;
5422
- upgrade_filter: PresenceFilter;
5423
- }
5424
5436
  export interface UnitStateView {
5425
5437
  /**
5426
5438
  * Whether the unit currently loses all or most of its abilities.
@@ -0,0 +1 @@
1
+ export type { CreatePlaygroundShareResponse, } from './common.js';
@@ -0,0 +1,2 @@
1
+ /* eslint-disable */
2
+ export {};
@@ -1 +1 @@
1
- export type { AbilityTarget, AbilityWindow, ActionAbilitySource, ActionAbilityView, ActiveEffectDescriptionView, ActiveEffectView, AttachmentMode, AttackChoiceView, AttackTarget, AvailableAttackView, CaptureOptionsView, CaptureSelection, CapturedUnitView, CardArena, CardChoiceResourcePaymentOptionView, CardInstanceView, ConstructedFormat, CurrentAttackStateView, CurrentAttackView, DeckInput, DeckRegistrationView, DelayedEffectDescriptionView, DelayedEffectOrderChoiceView, DelayedEffectOrderOptionView, DelayedEffectTimingView, DelayedEffectView, DistributionAssignment, DistributionDamageKindView, DistributionItemView, DistributionTargetView, DistributionTokenKindView, DynamicPowerLimit, EffectCardScopeView, EffectDurationView, EffectResolutionDraftStepView, EffectResolutionDraftView, EffectRestrictionView, EffectSequenceOrder, EffectSequenceView, EffectSourceView, EffectTargetView, ExploitOptionsView, FormatEventResponse, FormatSeatView, GameState, GameTimerActiveClockView, GameTimerReserveView, GameTimerStateView, HiddenCardChoiceMode, HiddenZoneKind, InitiativeChoiceReason, InitiativeState, InstructedAttackView, LeaderActionView, LeaderDeployActionView, LeaderDeployCostView, LeaderDeployMode, LeaderDeployThresholdBonus, LeaderStateView, LimitedEventView, LimitedSideboardPoolView, MatchEndReason, MatchFormat, MatchPhase, MatchResult, MatchSeriesView, MatchStatus, ModeChoiceView, NamedCardEffectDescriptionView, NullableDistributionTokenKindView, NullableSeatView, PendingAbilityAspectChoiceView, PendingAbilityAttackChoiceView, PendingAbilityCardChoiceView, PendingAbilityFamily, PendingAbilityModeChoiceInputKind, PendingAbilityModeChoiceView, PendingAbilityNameChoiceView, PendingAbilityOrderAbilityView, PendingAbilityOrderChoiceView, PendingAbilityOrderGroupView, PendingAbilityView, PendingChoiceView, PendingDistributionView, PendingUndoRequest, PlayActionView, PlayCardSourceView, PlayCardZone, PlayerTargetPattern, PresenceFilter, PromptProvenanceView, PromptState, RejectedPlayView, RelationFilter, ResourceCardView, ResourcePaymentOptionView, Seat, SeatDirection, SeatOfferIntent, SeatState, SelectionScope, SeriesEndReason, SeriesGameRecord, SeriesResultView, SharedCounterState, SmuggleActionView, SmuggleKind, TargetGroupPurpose, TargetSelectionGroup, TargetSelectionPlanView, TriggerWindowView, TwinSunsCounter, TwinSunsCountersView, UndoRequestReason, UniquenessFilter, UnitAbilitySuppressionView, UnitExtremum, UnitFilter, UnitStateView, UpgradeStateView, } from './common.js';
1
+ export type { AbilityTarget, AbilityWindow, ActionAbilitySource, ActionAbilityView, ActiveEffectDescriptionView, ActiveEffectView, AttachmentMode, AttackChoiceView, AttackTarget, AvailableAttackView, CaptureOptionsView, CaptureSelection, CapturedUnitView, CardArena, CardChoiceResourcePaymentOptionView, CardInstanceView, ConstructedFormat, CurrentAttackStateView, CurrentAttackView, DeckInput, DeckRegistrationView, DelayedEffectDescriptionView, DelayedEffectOrderChoiceView, DelayedEffectOrderOptionView, DelayedEffectTimingView, DelayedEffectView, DistributionAssignment, DistributionDamageKindView, DistributionItemView, DistributionTargetView, DistributionTokenKindView, EffectCardScopeView, EffectDurationView, EffectResolutionDraftStepView, EffectResolutionDraftView, EffectRestrictionView, EffectSequenceOrder, EffectSequenceView, EffectSourceView, EffectTargetView, ExploitOptionsView, FormatEventResponse, FormatSeatView, GameState, GameTimerActiveClockView, GameTimerReserveView, GameTimerStateView, HiddenCardChoiceMode, HiddenZoneKind, InitiativeChoiceReason, InitiativeState, InstructedAttackView, LeaderActionView, LeaderDeployActionView, LeaderDeployCostView, LeaderDeployMode, LeaderDeployThresholdBonus, LeaderStateView, LimitedEventView, LimitedSideboardPoolView, MatchEndReason, MatchFormat, MatchPhase, MatchResult, MatchSeriesView, MatchStatus, ModeChoiceView, NamedCardEffectDescriptionView, NullableDistributionTokenKindView, NullableSeatView, PendingAbilityAspectChoiceView, PendingAbilityAttackChoiceView, PendingAbilityCardChoiceView, PendingAbilityFamily, PendingAbilityModeChoiceInputKind, PendingAbilityModeChoiceView, PendingAbilityNameChoiceView, PendingAbilityOrderAbilityView, PendingAbilityOrderChoiceView, PendingAbilityOrderGroupView, PendingAbilityView, PendingChoiceView, PendingDistributionView, PendingUndoRequest, PlayActionView, PlayCardSourceView, PlayCardZone, PlaygroundActionAbilityView, PromptProvenanceView, PromptState, RejectedPlayView, RelationFilter, ResourceCardView, ResourcePaymentOptionView, Seat, SeatOfferIntent, SeatState, SeriesEndReason, SeriesGameRecord, SeriesResultView, SharedCounterState, SmuggleActionView, SmuggleKind, TargetGroupPurpose, TargetSelectionGroup, TargetSelectionPlanView, TriggerWindowView, TwinSunsCounter, TwinSunsCountersView, UndoRequestReason, UnitAbilitySuppressionView, UnitStateView, UpgradeStateView, } from './common.js';
@@ -1 +1 @@
1
- export type { AbilityTarget, ActionAbilitySource, AttackTarget, CaptureSelection, DistributionAssignment, GameCommand, Seat, SmuggleKind, TwinSunsCounter, } from './common.js';
1
+ export type { AbilityTarget, ActionAbilitySource, AttackTarget, CaptureSelection, DistributionAssignment, GameCommand, PlaygroundCardStateChange, PlaygroundCommand, PlaygroundDamageTarget, PlaygroundDefeatTarget, Seat, SmuggleKind, TwinSunsCounter, } from './common.js';