@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:
import type { PlaygroundCardStateChange } from '@my-swu/simulator-client'
const playgroundCardStateChange: PlaygroundCardStateChange = {
"type": "unit",
"unitId": 0,
}
console.log(playgroundCardStateChange)Union Members
Type Literal
Example:
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?
optionaladvantageTokens?:number|null
damage?
optionaldamage?:number|null
experienceTokens?
optionalexperienceTokens?:number|null
ready?
optionalready?:boolean|null
true readies the unit even while an effect forbids readying.
shieldTokens?
optionalshieldTokens?:number|null
type
type:
"unit"
unitId
unitId:
number
Type Literal
Example:
import type { PlaygroundCardStateChange } from '@my-swu/simulator-client'
const playgroundCardStateChange: PlaygroundCardStateChange = {
"type": "unit",
"unitId": 0,
}
console.log(playgroundCardStateChange){ damage: number; seat: Seat; type: "base"; }
