Skip to content

@my-swu/simulator-client


@my-swu/simulator-client / PlaygroundCardStateChange

Type Alias: PlaygroundCardStateChange ​

PlaygroundCardStateChange = { advantageTokens?: number | null; damage?: number | null; experienceTokens?: number | null; ready?: boolean | null; shieldTokens?: number | null; type: "unit"; unitId: number; } | { damage: number; seat: Seat; type: "base"; }

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

One in-play card whose Playground-editable state may be set exactly.

Every field is a target value rather than a delta, so a client that shows current counts can submit what the board should look like instead of reconstructing the sequence of adjustments that gets there. Anything the engine derives — keywords, clone identity, controller, arena, card text — stays out of this patch and remains read-only.

Example:

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

const playgroundCardStateChange: PlaygroundCardStateChange = {
  "type": "unit",
  "unitId": 0,
}

console.log(playgroundCardStateChange)

Union Members ​

Type Literal ​

Example:

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

const playgroundCardStateChange: PlaygroundCardStateChange = {
  "type": "unit",
  "unitId": 0,
}

console.log(playgroundCardStateChange)

{ advantageTokens?: number | null; damage?: number | null; experienceTokens?: number | null; ready?: boolean | null; shieldTokens?: number | null; type: "unit"; unitId: number; }

advantageTokens? ​

optional advantageTokens?: number | null

damage? ​

optional damage?: number | null

experienceTokens? ​

optional experienceTokens?: number | null

ready? ​

optional ready?: boolean | null

true readies the unit even while an effect forbids readying.

shieldTokens? ​

optional shieldTokens?: number | null

type ​

type: "unit"

unitId ​

unitId: number


Type Literal ​

Example:

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

const playgroundCardStateChange: PlaygroundCardStateChange = {
  "type": "unit",
  "unitId": 0,
}

console.log(playgroundCardStateChange)

{ damage: number; seat: Seat; type: "base"; }

Released under the MIT License.