Skip to content

@my-swu/simulator-client


@my-swu/simulator-client / PlaygroundCommand

Type Alias: PlaygroundCommand ​

PlaygroundCommand = { cardId: number; seat: Seat; type: "addResource"; } | { seat: Seat; type: "drawCard"; } | { cardId: number; seat: Seat; type: "addCardToHand"; } | { card_ids: number[]; seat: Seat; type: "setDrawQueue"; } | { attachedTo?: PlayAttachment | null; cardId: number; seat: Seat; type: "putCardInPlay"; } | { attachedTo?: PlayAttachment | null; cardId: number; seat: Seat; type: "playCardForFree"; } | { modeIndices: number[]; seat: Seat; source: ActionAbilitySource; target?: AbilityTarget | null; targets: AbilityTarget[]; type: "executeActionAbility"; } | { amount: number; target: PlaygroundDamageTarget; type: "setDamage"; } | { change: PlaygroundCardStateChange; type: "changeCardState"; } | { target: PlaygroundDefeatTarget; type: "defeatCard"; } | { captorUnitId: number; cardId: number; ownerSeat: Seat; type: "captureCard"; } | { cardId: number; leaderIndex: number; seat: Seat; type: "swapLeader"; } | { cardId: number; seat: Seat; type: "swapBase"; }

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

Host-authorized raw scenario mutation for a Playground match.

Example:

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

const playgroundCommand: PlaygroundCommand = {
  "type": "addResource",
  "seat": "one",
  "cardId": 0,
}

console.log(playgroundCommand)

Union Members ​

Type Literal ​

Example:

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

const playgroundCommand: PlaygroundCommand = {
  "type": "addResource",
  "seat": "one",
  "cardId": 0,
}

console.log(playgroundCommand)

{ cardId: number; seat: Seat; type: "addResource"; }


Type Literal ​

Example:

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

const playgroundCommand: PlaygroundCommand = {
  "type": "addResource",
  "seat": "one",
  "cardId": 0,
}

console.log(playgroundCommand)

{ seat: Seat; type: "drawCard"; }


Type Literal ​

Example:

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

const playgroundCommand: PlaygroundCommand = {
  "type": "addResource",
  "seat": "one",
  "cardId": 0,
}

console.log(playgroundCommand)

{ cardId: number; seat: Seat; type: "addCardToHand"; }


Type Literal ​

Example:

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

const playgroundCommand: PlaygroundCommand = {
  "type": "addResource",
  "seat": "one",
  "cardId": 0,
}

console.log(playgroundCommand)

{ card_ids: number[]; seat: Seat; type: "setDrawQueue"; }


Type Literal ​

Example:

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

const playgroundCommand: PlaygroundCommand = {
  "type": "addResource",
  "seat": "one",
  "cardId": 0,
}

console.log(playgroundCommand)

{ attachedTo?: PlayAttachment | null; cardId: number; seat: Seat; type: "putCardInPlay"; }

attachedTo? ​

optional attachedTo?: PlayAttachment | null

Attachment host for an Upgrade or token upgrade.

attachedTo carries the canonical typed target, so a Fortify Upgrade can name a base host. attachedToUnitId remains a deserialize-only compatibility spelling for released clients and accepts only a bare legacy unit id.

cardId ​

cardId: number

seat ​

seat: Seat

type ​

type: "putCardInPlay"


Type Literal ​

Example:

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

const playgroundCommand: PlaygroundCommand = {
  "type": "addResource",
  "seat": "one",
  "cardId": 0,
}

console.log(playgroundCommand)

{ attachedTo?: PlayAttachment | null; cardId: number; seat: Seat; type: "playCardForFree"; }

attachedTo? ​

optional attachedTo?: PlayAttachment | null

Attachment host for an Upgrade or Pilot play.

Same typed shape and legacy attachedToUnitId alias as putCardInPlay.

cardId ​

cardId: number

seat ​

seat: Seat

type ​

type: "playCardForFree"


Type Literal ​

Example:

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

const playgroundCommand: PlaygroundCommand = {
  "type": "addResource",
  "seat": "one",
  "cardId": 0,
}

console.log(playgroundCommand)

{ modeIndices: number[]; seat: Seat; source: ActionAbilitySource; target?: AbilityTarget | null; targets: AbilityTarget[]; type: "executeActionAbility"; }


Type Literal ​

Example:

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

const playgroundCommand: PlaygroundCommand = {
  "type": "addResource",
  "seat": "one",
  "cardId": 0,
}

console.log(playgroundCommand)

{ amount: number; target: PlaygroundDamageTarget; type: "setDamage"; }


Type Literal ​

Example:

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

const playgroundCommand: PlaygroundCommand = {
  "type": "addResource",
  "seat": "one",
  "cardId": 0,
}

console.log(playgroundCommand)

{ change: PlaygroundCardStateChange; type: "changeCardState"; }


Type Literal ​

Example:

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

const playgroundCommand: PlaygroundCommand = {
  "type": "addResource",
  "seat": "one",
  "cardId": 0,
}

console.log(playgroundCommand)

{ target: PlaygroundDefeatTarget; type: "defeatCard"; }


Type Literal ​

Example:

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

const playgroundCommand: PlaygroundCommand = {
  "type": "addResource",
  "seat": "one",
  "cardId": 0,
}

console.log(playgroundCommand)

{ captorUnitId: number; cardId: number; ownerSeat: Seat; type: "captureCard"; }


Type Literal ​

Example:

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

const playgroundCommand: PlaygroundCommand = {
  "type": "addResource",
  "seat": "one",
  "cardId": 0,
}

console.log(playgroundCommand)

{ cardId: number; leaderIndex: number; seat: Seat; type: "swapLeader"; }


Type Literal ​

Example:

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

const playgroundCommand: PlaygroundCommand = {
  "type": "addResource",
  "seat": "one",
  "cardId": 0,
}

console.log(playgroundCommand)

{ cardId: number; seat: Seat; type: "swapBase"; }

Released under the MIT License.