Skip to content

@my-swu/simulator-client


@my-swu/simulator-client / PromptState

Type Alias: PromptState ​

PromptState = "lobbyReady" | { chooseInitiative: { reason?: InitiativeChoiceReason & string; seat: Seat; }; } | { mulligan: { seatOneDecided: boolean; seatTwoDecided: boolean; }; } | { multiplayerMulligan: { decidedSeats: Seat[]; }; } | { openingResources: { requiredCount: number; seatOneDecided: boolean; seatTwoDecided: boolean; }; } | { multiplayerOpeningResources: { decidedSeats: Seat[]; requiredCount: number; }; } | { action: { canDeployLeader: boolean; canTakeInitiative: boolean; seat: Seat; }; } | { resolveAbilities: { seat: Seat; }; } | { chooseAbilityCards: { abilityId: number; max: number; min: number; seat: Seat; }; } | { chooseAbilityModes: { abilityId: number; max: number; min: number; seat: Seat; }; } | { chooseAbilityName: { abilityId: number; seat: Seat; }; } | { chooseAbilityAspect: { abilityId: number; seat: Seat; }; } | { choosePlanCard: { seat: Seat; }; } | { chooseAbilityAttack: { abilityId: number; seat: Seat; }; } | { chooseDistribution: { abilityId: number; seat: Seat; }; } | { chooseTriggeredAbilityPlayerOrder: { seat: Seat; }; } | { chooseDelayedEffectOrder: { seat: Seat; }; } | { regroupResource: { max: number; min: number; seatOneDecided: boolean; seatTwoDecided: boolean; }; } | { multiplayerRegroupResource: { decidedSeats: Seat[]; max: number; min: number; }; } | "gameOver"

Defined in: packages/ts-sdk/src/generated/types/common.ts:5028

Prompt union exposed to clients and mirrored by the generated TypeScript SDK PromptState schema.

Each choice prompt pairs with a corresponding Pending*View payload in the game-state snapshot and a matching GameCommand response shape.

Example:

ts
import type { PromptState } from '@my-swu/simulator-client'

const promptState: PromptState = "lobbyReady"

console.log(promptState)

Released under the MIT License.