Skip to content

@my-swu/simulator-client


@my-swu/simulator-client / UnitStateView

Interface: UnitStateView ​

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

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

console.log(unitStateView)

Properties ​

abilitySuppression ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { abilitySuppression } = unitStateView

console.log(abilitySuppression)

abilitySuppression: UnitAbilitySuppressionView

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

Whether the unit currently loses all or most of its abilities.


arena ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { arena } = unitStateView

console.log(arena)

arena: CardArena

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


attachedUpgrades ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { attachedUpgrades } = unitStateView

console.log(attachedUpgrades)

attachedUpgrades: UpgradeStateView[]

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


capturedUnits ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { capturedUnits } = unitStateView

console.log(capturedUnits)

capturedUnits: CapturedUnitView[]

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


cardId ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { cardId } = unitStateView

console.log(cardId)

cardId: number

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


cardInstanceId ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { cardInstanceId } = unitStateView

console.log(cardInstanceId)

cardInstanceId: number

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


controller ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { controller } = unitStateView

console.log(controller)

controller: Seat

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


copiedCardId? ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { copiedCardId } = unitStateView

console.log(copiedCardId)

optional copiedCardId?: number | null

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

Card this unit entered play as a copy of (CR 8.5), when it is a copy.

card_id stays the physical card that is really on the board, so clients keep a stable identity for it; this carries the copied card so they can show the unit as what it currently is. None for normal units.


damage ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { damage } = unitStateView

console.log(damage)

damage: number

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


exhausted ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { exhausted } = unitStateView

console.log(exhausted)

exhausted: boolean

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


hasActiveCoordinate ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { hasActiveCoordinate } = unitStateView

console.log(hasActiveCoordinate)

hasActiveCoordinate: boolean

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

Whether this unit currently has an active Coordinate ability.


hasBounty ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { hasBounty } = unitStateView

console.log(hasBounty)

hasBounty: boolean

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

Whether the unit currently has one or more effective Bounty abilities.


hasGrit ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { hasGrit } = unitStateView

console.log(hasGrit)

hasGrit: boolean

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

Whether the unit currently has Grit after all live modifiers.


hasHidden ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { hasHidden } = unitStateView

console.log(hasHidden)

hasHidden: boolean

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

Whether the unit currently has Hidden after all live modifiers.


hasOverwhelm ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { hasOverwhelm } = unitStateView

console.log(hasOverwhelm)

hasOverwhelm: boolean

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

Whether the unit currently has Overwhelm after all live modifiers.


hasSaboteur ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { hasSaboteur } = unitStateView

console.log(hasSaboteur)

hasSaboteur: boolean

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

Whether the unit currently has Saboteur after all live modifiers.


hasSentinel ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { hasSentinel } = unitStateView

console.log(hasSentinel)

hasSentinel: boolean

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

Whether the unit currently has Sentinel after all live modifiers.


hp ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { hp } = unitStateView

console.log(hp)

hp: number

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


instanceId ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { instanceId } = unitStateView

console.log(instanceId)

instanceId: number

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


isLeader ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { isLeader } = unitStateView

console.log(isLeader)

isLeader: boolean

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


isLeaderCard ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { isLeaderCard } = unitStateView

console.log(isLeaderCard)

isLeaderCard: boolean

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

Whether this unit's physical card entered play as a deployed leader.

Unlike is_leader, this excludes units made leader units by continuous effects such as The Darksaber. Clients use this to select card art.


isToken ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { isToken } = unitStateView

console.log(isToken)

isToken: boolean

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

Whether the physical in-play card is a token that ceases to exist when it leaves play instead of entering a discard pile.

Runtime decoding accepts persisted snapshots written before this field existed, while schema exports keep the live client contract required.


owner ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { owner } = unitStateView

console.log(owner)

owner: Seat

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


power ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { power } = unitStateView

console.log(power)

power: number

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


raidValue ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { raidValue } = unitStateView

console.log(raidValue)

raidValue: number

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

Current Raid value after all live modifiers.


restoreValue ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { restoreValue } = unitStateView

console.log(restoreValue)

restoreValue: number

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

Current Restore value after all live modifiers.


shieldTokens ​

Example:

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

const unitStateView: UnitStateView = {
  "instanceId": 0,
  "cardInstanceId": 0,
  "cardId": 0,
  "owner": "one",
  "controller": "one",
  "arena": "ground",
  "isLeaderCard": false,
  "isLeader": false,
  "isToken": false,
  "exhausted": false,
  "damage": 0,
  "shieldTokens": 0,
  "hasSentinel": false,
  "hasHidden": false,
  "restoreValue": 0,
  "raidValue": 0,
  "hasGrit": false,
  "hasOverwhelm": false,
  "hasSaboteur": false,
  "hasBounty": false,
  "hasActiveCoordinate": false,
  "abilitySuppression": "none",
  "power": 0,
  "hp": 0,
  "capturedUnits": [],
  "attachedUpgrades": [],
}

const { shieldTokens } = unitStateView

console.log(shieldTokens)

shieldTokens: number

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

Released under the MIT License.