Skip to content

@my-swu/simulator-client


@my-swu/simulator-client / AbilityTarget

Type Alias: AbilityTarget ​

AbilityTarget = { type: "unit"; unitId: number; } | { type: "upgrade"; upgradeId: number; } | { cardInstanceId: number; seat: Seat; type: "resource"; } | { seat: Seat; type: "leader"; } | { leaderIndex: number; seat: Seat; type: "leaderByIndex"; } | { seat: Seat; type: "base"; } | { seat: Seat; type: "player"; }

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

Entity selected while resolving an ability.

Example:

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

const abilityTarget: AbilityTarget = {
  "type": "unit",
  "unitId": 0,
}

console.log(abilityTarget)

Union Members ​

Type Literal ​

Example:

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

const abilityTarget: AbilityTarget = {
  "type": "unit",
  "unitId": 0,
}

console.log(abilityTarget)

{ type: "unit"; unitId: number; }


Type Literal ​

Example:

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

const abilityTarget: AbilityTarget = {
  "type": "unit",
  "unitId": 0,
}

console.log(abilityTarget)

{ type: "upgrade"; upgradeId: number; }


Type Literal ​

Example:

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

const abilityTarget: AbilityTarget = {
  "type": "unit",
  "unitId": 0,
}

console.log(abilityTarget)

{ cardInstanceId: number; seat: Seat; type: "resource"; }


Type Literal ​

Example:

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

const abilityTarget: AbilityTarget = {
  "type": "unit",
  "unitId": 0,
}

console.log(abilityTarget)

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


Type Literal ​

Example:

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

const abilityTarget: AbilityTarget = {
  "type": "unit",
  "unitId": 0,
}

console.log(abilityTarget)

{ leaderIndex: number; seat: Seat; type: "leaderByIndex"; }

leaderIndex ​

leaderIndex: number

Zero-based position in that player's leader list.

seat ​

seat: Seat

Player who owns the leader slot.

type ​

type: "leaderByIndex"


Type Literal ​

Example:

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

const abilityTarget: AbilityTarget = {
  "type": "unit",
  "unitId": 0,
}

console.log(abilityTarget)

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


Type Literal ​

Example:

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

const abilityTarget: AbilityTarget = {
  "type": "unit",
  "unitId": 0,
}

console.log(abilityTarget)

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

Released under the MIT License.