@my-swu/simulator-client / ActiveEffectView
Interface: ActiveEffectView
Defined in: packages/ts-sdk/src/generated/types/common.ts:261
Public outstanding effect shown in active-effects clients.
Example:
import type { ActiveEffectView } from '@my-swu/simulator-client'
const activeEffectView: ActiveEffectView = {
"id": 'example',
"targets": [],
"duration": "attack",
"description": {
"type": "stats",
"power": 0,
"hp": 0,
},
}
console.log(activeEffectView)Properties
description
Example:
import type { ActiveEffectView } from '@my-swu/simulator-client'
const activeEffectView: ActiveEffectView = {
"id": 'example',
"targets": [],
"duration": "attack",
"description": {
"type": "stats",
"power": 0,
"hp": 0,
},
}
const { description } = activeEffectView
console.log(description)description:
ActiveEffectDescriptionView
Defined in: packages/ts-sdk/src/generated/types/common.ts:262
duration
Example:
import type { ActiveEffectView } from '@my-swu/simulator-client'
const activeEffectView: ActiveEffectView = {
"id": 'example',
"targets": [],
"duration": "attack",
"description": {
"type": "stats",
"power": 0,
"hp": 0,
},
}
const { duration } = activeEffectView
console.log(duration)duration:
EffectDurationView
Defined in: packages/ts-sdk/src/generated/types/common.ts:263
id
Example:
import type { ActiveEffectView } from '@my-swu/simulator-client'
const activeEffectView: ActiveEffectView = {
"id": 'example',
"targets": [],
"duration": "attack",
"description": {
"type": "stats",
"power": 0,
"hp": 0,
},
}
const { id } = activeEffectView
console.log(id)id:
string
Defined in: packages/ts-sdk/src/generated/types/common.ts:285
Stable identity for this effect, safe to key client state on.
STABILITY CONTRACT: an effect keeps the same id for as long as it is outstanding. Removing another effect from the same pane never renames it, and neither does a save/restore round-trip. Clients may therefore key tooltips, animations, and selection state on this value.
The guarantee comes from deriving the id off the effect's own monotonic registration order (active_order, effect.id) rather than its position in the registry vector. Two families still carry a positional suffix and are explicitly not covered:
continuous-restriction:<id>:<n>—nindexes the restriction list derived from the effect's own kind, which is a pure function of that kind, so it is stable for a given effect even though it looks positional.- the grant/link/permission families in
view_effects/active_grants.rsandactive_links.rs, whose registries have no per-row id yet. Those ids can still shift when an earlier row is removed.
inactive?
Example:
import type { ActiveEffectView } from '@my-swu/simulator-client'
const activeEffectView: ActiveEffectView = {
"id": 'example',
"targets": [],
"duration": "attack",
"description": {
"type": "stats",
"power": 0,
"hp": 0,
},
}
const { inactive } = activeEffectView
console.log(inactive)
optionalinactive?:boolean
Defined in: packages/ts-sdk/src/generated/types/common.ts:290
True when the effect is registered but its condition currently fails, so clients can show it as dormant rather than dropping it entirely.
source?
Example:
import type { ActiveEffectView } from '@my-swu/simulator-client'
const activeEffectView: ActiveEffectView = {
"id": 'example',
"targets": [],
"duration": "attack",
"description": {
"type": "stats",
"power": 0,
"hp": 0,
},
}
const { source } = activeEffectView
console.log(source)
optionalsource?:EffectSourceView|null
Defined in: packages/ts-sdk/src/generated/types/common.ts:291
targets
Example:
import type { ActiveEffectView } from '@my-swu/simulator-client'
const activeEffectView: ActiveEffectView = {
"id": 'example',
"targets": [],
"duration": "attack",
"description": {
"type": "stats",
"power": 0,
"hp": 0,
},
}
const { targets } = activeEffectView
console.log(targets)targets:
EffectTargetView[]
Defined in: packages/ts-sdk/src/generated/types/common.ts:292
text?
Example:
import type { ActiveEffectView } from '@my-swu/simulator-client'
const activeEffectView: ActiveEffectView = {
"id": 'example',
"targets": [],
"duration": "attack",
"description": {
"type": "stats",
"power": 0,
"hp": 0,
},
}
const { text } = activeEffectView
console.log(text)
optionaltext?:EffectTextRefsView|null
Defined in: packages/ts-sdk/src/generated/types/common.ts:298
Reviewed card-text and shared-message provenance when this public row was created by a resolving instruction. Absence means this registry does not retain a display declaration, never that text was inferred.
