Event Reference
Start with a compact overview, then expand any event for its identity, payload fields, timing, and subscription example
The overview tables keep only the information needed to find an event. Expand an event for the complete contract. These names match the Event tab in Game Card Monitor

Battle and turn events
| Event | Payload | Raised when |
|---|---|---|
OnBattleStarted | None | battle setup, the opening hand, and initial enemy intents are ready |
OnTurnStarted | TurnEventArgs | each player turn starts |
OnEnemyTurnStarted | TurnEventArgs | each enemy phase starts |
OnTurnEnded | TurnEventArgs | each player turn finishes |
OnDrawPhase | TurnEventArgs | the draw step of a player turn begins |
OnDiscardPhase | TurnEventArgs | the discard step of a player turn begins |
OnBattleEnded | BattleEndedEventArgs | the battle resolves as a win or loss |
OnBattleStarted
Raised when battle setup, the opening hand, and initial enemy intents are ready. Typical use: Initial HUD refresh and battle-opening presentation.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnBattleStarted |
| String value | GCS_OnBattleStarted |
| Payload type | None |
public static IDisposable OnBattleStarted(Action handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
| — | — | This event has no payload parameters |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnBattleStarted(() => Debug.Log("OnBattleStarted"));
OnTurnStarted
Raised when each player turn starts. Typical use: Start-turn UI refresh.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnTurnStarted |
| String value | GCS_OnTurnStarted |
| Payload type | TurnEventArgs |
public static IDisposable OnTurnStarted(Action<TurnEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
TurnNumber | int | The current 1-based battle turn number |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnTurnStarted(args => Debug.Log(args.TurnNumber));
OnEnemyTurnStarted
Raised when each enemy phase starts. Typical use: Enemy-phase banner and input lock.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnEnemyTurnStarted |
| String value | GCS_OnEnemyTurnStarted |
| Payload type | TurnEventArgs |
public static IDisposable OnEnemyTurnStarted(Action<TurnEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
TurnNumber | int | The current 1-based battle turn number |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnEnemyTurnStarted(args => Debug.Log(args.TurnNumber));
OnTurnEnded
Raised when each player turn finishes. Typical use: End-turn cleanup and combat logs.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnTurnEnded |
| String value | GCS_OnTurnEnded |
| Payload type | TurnEventArgs |
public static IDisposable OnTurnEnded(Action<TurnEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
TurnNumber | int | The current 1-based battle turn number |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnTurnEnded(args => Debug.Log(args.TurnNumber));
OnDrawPhase
Raised when the draw step of a player turn begins. Typical use: Draw-phase UI and draw-count presentation.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnDrawPhase |
| String value | GCS_OnDrawPhase |
| Payload type | TurnEventArgs |
public static IDisposable OnDrawPhase(Action<TurnEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
TurnNumber | int | The current 1-based battle turn number |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnDrawPhase(args => Debug.Log(args.TurnNumber));
OnDiscardPhase
Raised when the discard step of a player turn begins. Typical use: Discard-phase UI and cleanup.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnDiscardPhase |
| String value | GCS_OnDiscardPhase |
| Payload type | TurnEventArgs |
public static IDisposable OnDiscardPhase(Action<TurnEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
TurnNumber | int | The current 1-based battle turn number |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnDiscardPhase(args => Debug.Log(args.TurnNumber));
OnBattleEnded
Raised when the battle resolves as a win or loss. Typical use: Victory or defeat presentation.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnBattleEnded |
| String value | GCS_OnBattleEnded |
| Payload type | BattleEndedEventArgs |
public static IDisposable OnBattleEnded(Action<BattleEndedEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
Won | bool | Whether the player won the battle |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnBattleEnded(args => Debug.Log(args.Won));
Card events
| Event | Payload | Raised when |
|---|---|---|
OnCardPlayed | CardPlayedEventArgs | a card play is accepted and executed |
OnCardModified | CardModifiedEventArgs | a card instance's runtime cost or state changes |
OnCardDrawn | CardLifecycleEventArgs | each card enters the hand through drawing |
OnCardDiscarded | CardLifecycleEventArgs | a card is discarded by overflow or end-of-turn cleanup |
OnCardExhausted | CardLifecycleEventArgs | a card moves to the exhaust pile |
OnCardRetained | CardLifecycleEventArgs | a card remains in hand during end-of-turn cleanup |
OnCardAddedToHand | CardLifecycleEventArgs | a card is created directly in the hand |
OnCardAddedToDeck | CardLifecycleEventArgs | a card is added directly to the draw pile |
OnDrawPileShuffled | None | the draw pile is shuffled |
OnCardPlayed
Raised when a card play is accepted and executed. Typical use: Play animation, combat log, and combo counters.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnCardPlayed |
| String value | GCS_OnCardPlayed |
| Payload type | CardPlayedEventArgs |
public static IDisposable OnCardPlayed(Action<CardPlayedEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
Card | GameCard | The effective card definition that was played |
InstanceId | int | The played card instance's runtime ID |
TargetUnitId | int? | The selected target unit ID, or null for cards without a selected target |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnCardPlayed(args => Debug.Log(args.Card));
OnCardModified
Raised when a card instance's runtime cost or state changes. Typical use: Refresh cost, upgrade, or transformed-card UI.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnCardModified |
| String value | GCS_OnCardModified |
| Payload type | CardModifiedEventArgs |
public static IDisposable OnCardModified(Action<CardModifiedEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
InstanceId | int | The runtime ID of the card instance that changed |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnCardModified(args => Debug.Log(args.InstanceId));
OnCardDrawn
Raised when each card enters the hand through drawing. Typical use: Draw animation and hand refresh.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnCardDrawn |
| String value | GCS_OnCardDrawn |
| Payload type | CardLifecycleEventArgs |
public static IDisposable OnCardDrawn(Action<CardLifecycleEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
InstanceId | int | The affected card instance's runtime ID |
Card | GameCard | The card instance's effective card definition |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnCardDrawn(args => Debug.Log(args.InstanceId));
OnCardDiscarded
Raised when a card is discarded by overflow or end-of-turn cleanup. Typical use: Discard animation and pile refresh.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnCardDiscarded |
| String value | GCS_OnCardDiscarded |
| Payload type | CardLifecycleEventArgs |
public static IDisposable OnCardDiscarded(Action<CardLifecycleEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
InstanceId | int | The affected card instance's runtime ID |
Card | GameCard | The card instance's effective card definition |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnCardDiscarded(args => Debug.Log(args.InstanceId));
OnCardExhausted
Raised when a card moves to the exhaust pile. Typical use: Exhaust animation and pile refresh.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnCardExhausted |
| String value | GCS_OnCardExhausted |
| Payload type | CardLifecycleEventArgs |
public static IDisposable OnCardExhausted(Action<CardLifecycleEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
InstanceId | int | The affected card instance's runtime ID |
Card | GameCard | The card instance's effective card definition |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnCardExhausted(args => Debug.Log(args.InstanceId));
OnCardRetained
Raised when a card remains in hand during end-of-turn cleanup. Typical use: Retain feedback and hand refresh.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnCardRetained |
| String value | GCS_OnCardRetained |
| Payload type | CardLifecycleEventArgs |
public static IDisposable OnCardRetained(Action<CardLifecycleEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
InstanceId | int | The affected card instance's runtime ID |
Card | GameCard | The card instance's effective card definition |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnCardRetained(args => Debug.Log(args.InstanceId));
OnCardAddedToHand
Raised when a card is created directly in the hand. Typical use: Generated-card presentation.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnCardAddedToHand |
| String value | GCS_OnCardAddedToHand |
| Payload type | CardLifecycleEventArgs |
public static IDisposable OnCardAddedToHand(Action<CardLifecycleEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
InstanceId | int | The affected card instance's runtime ID |
Card | GameCard | The card instance's effective card definition |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnCardAddedToHand(args => Debug.Log(args.InstanceId));
OnCardAddedToDeck
Raised when a card is added directly to the draw pile. Typical use: Deck-add feedback and pile refresh.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnCardAddedToDeck |
| String value | GCS_OnCardAddedToDeck |
| Payload type | CardLifecycleEventArgs |
public static IDisposable OnCardAddedToDeck(Action<CardLifecycleEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
InstanceId | int | The affected card instance's runtime ID |
Card | GameCard | The card instance's effective card definition |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnCardAddedToDeck(args => Debug.Log(args.InstanceId));
OnDrawPileShuffled
Raised when the draw pile is shuffled. Typical use: Shuffle animation and pile counter refresh.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnDrawPileShuffled |
| String value | GCS_OnDrawPileShuffled |
| Payload type | None |
public static IDisposable OnDrawPileShuffled(Action handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
| — | — | This event has no payload parameters |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnDrawPileShuffled(() => Debug.Log("OnDrawPileShuffled"));
Unit, HP, armor, damage, and energy events
| Event | Payload | Raised when |
|---|---|---|
OnUnitHpChanged | UnitHpChangedEventArgs | a unit's HP or armor changes |
OnUnitDied | UnitDiedEventArgs | a unit dies or is removed from battle |
OnDamageDealt | DamageEventArgs | an attacker causes HP loss to a target |
OnDamageTaken | DamageEventArgs | a unit loses HP from an attack or status |
OnArmorGained | ArmorChangedEventArgs | a unit gains armor |
OnArmorLost | ArmorChangedEventArgs | a unit loses armor |
OnEnergyChanged | EnergyChangedEventArgs | the player's current or maximum energy changes |
OnEnergyGained | EnergyDeltaEventArgs | the player gains energy |
OnEnergySpent | EnergyDeltaEventArgs | the player spends energy |
OnUnitHpChanged
Raised when a unit's HP or armor changes. Typical use: HP and armor bars.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnUnitHpChanged |
| String value | GCS_OnUnitHpChanged |
| Payload type | UnitHpChangedEventArgs |
public static IDisposable OnUnitHpChanged(Action<UnitHpChangedEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
UnitId | int | The affected unit's runtime ID |
CurrentHp | int | HP after the change |
MaxHp | int | The unit's maximum HP |
CurrentArmor | int | Armor after the change |
PreviousHp | int | HP before the change |
PreviousArmor | int | Armor before the change |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnUnitHpChanged(args => Debug.Log(args.UnitId));
OnUnitDied
Raised when a unit dies or is removed from battle. Typical use: Death presentation, rewards, and target cleanup.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnUnitDied |
| String value | GCS_OnUnitDied |
| Payload type | UnitDiedEventArgs |
public static IDisposable OnUnitDied(Action<UnitDiedEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
UnitId | int | The dead or removed unit's runtime ID |
Tier | string | The authored unit tier |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnUnitDied(args => Debug.Log(args.UnitId));
OnDamageDealt
Raised when an attacker causes HP loss to a target. Typical use: Outgoing damage logs and hit feedback.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnDamageDealt |
| String value | GCS_OnDamageDealt |
| Payload type | DamageEventArgs |
public static IDisposable OnDamageDealt(Action<DamageEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
SourceUnitId | int | The source unit ID, or -1 when there is no unit source |
TargetUnitId | int | The damaged unit's runtime ID |
Amount | int | The actual HP lost after armor and modifiers |
Lethal | bool | Whether this damage killed the target |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnDamageDealt(args => Debug.Log(args.SourceUnitId));
OnDamageTaken
Raised when a unit loses HP from an attack or status. Typical use: Incoming hit reactions.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnDamageTaken |
| String value | GCS_OnDamageTaken |
| Payload type | DamageEventArgs |
public static IDisposable OnDamageTaken(Action<DamageEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
SourceUnitId | int | The source unit ID, or -1 when there is no unit source |
TargetUnitId | int | The damaged unit's runtime ID |
Amount | int | The actual HP lost after armor and modifiers |
Lethal | bool | Whether this damage killed the target |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnDamageTaken(args => Debug.Log(args.SourceUnitId));
OnArmorGained
Raised when a unit gains armor. Typical use: Armor floating text and armor-bar refresh.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnArmorGained |
| String value | GCS_OnArmorGained |
| Payload type | ArmorChangedEventArgs |
public static IDisposable OnArmorGained(Action<ArmorChangedEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
UnitId | int | The affected unit's runtime ID |
Amount | int | The amount of armor gained or lost |
CurrentArmor | int | Armor after the change |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnArmorGained(args => Debug.Log(args.UnitId));
OnArmorLost
Raised when a unit loses armor. Typical use: Armor-break feedback.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnArmorLost |
| String value | GCS_OnArmorLost |
| Payload type | ArmorChangedEventArgs |
public static IDisposable OnArmorLost(Action<ArmorChangedEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
UnitId | int | The affected unit's runtime ID |
Amount | int | The amount of armor gained or lost |
CurrentArmor | int | Armor after the change |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnArmorLost(args => Debug.Log(args.UnitId));
OnEnergyChanged
Raised when the player's current or maximum energy changes. Typical use: Full energy UI refresh.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnEnergyChanged |
| String value | GCS_OnEnergyChanged |
| Payload type | EnergyChangedEventArgs |
public static IDisposable OnEnergyChanged(Action<EnergyChangedEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
CurrentEnergy | int | The player's energy after the change |
MaxEnergy | int | The player's resolved per-turn maximum energy |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnEnergyChanged(args => Debug.Log(args.CurrentEnergy));
OnEnergyGained
Raised when the player gains energy. Typical use: Energy-gain feedback.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnEnergyGained |
| String value | GCS_OnEnergyGained |
| Payload type | EnergyDeltaEventArgs |
public static IDisposable OnEnergyGained(Action<EnergyDeltaEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
Amount | int | The amount gained or spent |
CurrentEnergy | int | The player's energy after the change |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnEnergyGained(args => Debug.Log(args.Amount));
OnEnergySpent
Raised when the player spends energy. Typical use: Card-spend feedback.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnEnergySpent |
| String value | GCS_OnEnergySpent |
| Payload type | EnergyDeltaEventArgs |
public static IDisposable OnEnergySpent(Action<EnergyDeltaEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
Amount | int | The amount gained or spent |
CurrentEnergy | int | The player's energy after the change |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnEnergySpent(args => Debug.Log(args.Amount));
Status events
| Event | Payload | Raised when |
|---|---|---|
OnStatusChanged | StatusChangedEventArgs | a unit's status stack count changes |
OnStatusTicked | StatusTickedEventArgs | a status resolves at a turn boundary |
OnStatusInflicted | StatusTransitionEventArgs | a status is applied to a unit |
OnStatusExpired | StatusTransitionEventArgs | a status naturally decays to 0 stacks |
OnStatusRemoved | StatusTransitionEventArgs | a status is explicitly removed |
OnStatusChanged
Raised when a unit's status stack count changes. Typical use: Refresh the status widget.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnStatusChanged |
| String value | GCS_OnStatusChanged |
| Payload type | StatusChangedEventArgs |
public static IDisposable OnStatusChanged(Action<StatusChangedEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
UnitId | int | The affected unit's runtime ID |
Status | GameStatus | The status whose stack count changed |
Stacks | int | The new stack count |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnStatusChanged(args => Debug.Log(args.UnitId));
OnStatusTicked
Raised when a status resolves at a turn boundary. Typical use: Status resolution animation and combat log.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnStatusTicked |
| String value | GCS_OnStatusTicked |
| Payload type | StatusTickedEventArgs |
public static IDisposable OnStatusTicked(Action<StatusTickedEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
UnitId | int | The affected unit's runtime ID |
Status | GameStatus | The status that resolved |
Timing | string | The turn-boundary timing that resolved the status |
StacksBefore | int | Stack count before resolution |
StacksAfter | int | Stack count after resolution |
HpBefore | int | Unit HP before resolution |
HpAfter | int | Unit HP after resolution |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnStatusTicked(args => Debug.Log(args.UnitId));
OnStatusInflicted
Raised when a status is applied to a unit. Typical use: Status-application animation.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnStatusInflicted |
| String value | GCS_OnStatusInflicted |
| Payload type | StatusTransitionEventArgs |
public static IDisposable OnStatusInflicted(Action<StatusTransitionEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
UnitId | int | The affected unit's runtime ID |
Status | GameStatus | The status that was applied, expired, or removed |
Stacks | int | The stack count associated with the transition |
SourceUnitId | int | The applier unit ID, or -1 when no source is available |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnStatusInflicted(args => Debug.Log(args.UnitId));
OnStatusExpired
Raised when a status naturally decays to 0 stacks. Typical use: Natural-expiration animation.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnStatusExpired |
| String value | GCS_OnStatusExpired |
| Payload type | StatusTransitionEventArgs |
public static IDisposable OnStatusExpired(Action<StatusTransitionEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
UnitId | int | The affected unit's runtime ID |
Status | GameStatus | The status that was applied, expired, or removed |
Stacks | int | The stack count associated with the transition |
SourceUnitId | int | The applier unit ID, or -1 when no source is available |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnStatusExpired(args => Debug.Log(args.UnitId));
OnStatusRemoved
Raised when a status is explicitly removed. Typical use: Cleanse or explicit-removal feedback.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnStatusRemoved |
| String value | GCS_OnStatusRemoved |
| Payload type | StatusTransitionEventArgs |
public static IDisposable OnStatusRemoved(Action<StatusTransitionEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
UnitId | int | The affected unit's runtime ID |
Status | GameStatus | The status that was applied, expired, or removed |
Stacks | int | The stack count associated with the transition |
SourceUnitId | int | The applier unit ID, or -1 when no source is available |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnStatusRemoved(args => Debug.Log(args.UnitId));
Enemy and delayed trigger events
| Event | Payload | Raised when |
|---|---|---|
OnEnemyUnitIntentChanged | EnemyUnitIntentChangedEventArgs | an enemy resolves or re-plans the intents exposed to the player |
OnEnemyUnitActing | EnemyUnitActingEventArgs | an enemy is about to execute its current intent |
OnEnemyUnitSummoned | EnemyUnitSummonedEventArgs | an enemy is summoned during battle |
OnEnemyPhaseChanged | EnemyPhaseChangedEventArgs | an enemy advances to another authored behavior phase |
OnDelayedTriggerScheduled | DelayedTriggerScheduledEventArgs | a cross-turn effect is queued |
OnDelayedTriggerFired | DelayedTriggerFiredEventArgs | a queued cross-turn effect resolves |
OnDelayedTriggerCancelled | DelayedTriggerCancelledEventArgs | a queued cross-turn effect is cancelled |
OnEnemyUnitIntentChanged
Raised when an enemy resolves or re-plans the intents exposed to the player. Typical use: Refresh the enemy intent widget.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnEnemyUnitIntentChanged |
| String value | GCS_OnEnemyUnitIntentChanged |
| Payload type | EnemyUnitIntentChangedEventArgs |
public static IDisposable OnEnemyUnitIntentChanged(Action<EnemyUnitIntentChangedEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
UnitId | int | The enemy unit's runtime ID |
Intents | IReadOnlyList<IntentEntry> | The intents currently exposed to the player |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnEnemyUnitIntentChanged(args => Debug.Log(args.UnitId));
OnEnemyUnitActing
Raised when an enemy is about to execute its current intent. Typical use: Pre-action telegraphs such as a lunge.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnEnemyUnitActing |
| String value | GCS_OnEnemyUnitActing |
| Payload type | EnemyUnitActingEventArgs |
public static IDisposable Subscribe<EnemyUnitActingEventArgs>(
string eventName,
Action<EnemyUnitActingEventArgs> handler
);
Event parameters:
| Name | Type | Description |
|---|---|---|
UnitId | int | The acting enemy's runtime ID |
Intent | IntentTag | The category of the action about to execute |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.Subscribe<EnemyUnitActingEventArgs>(
GCSEventNames.OnEnemyUnitActing,
args => Debug.Log(args.UnitId)
);
OnEnemyUnitSummoned
Raised when an enemy is summoned during battle. Typical use: Summon presentation and layout refresh.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnEnemyUnitSummoned |
| String value | GCS_OnEnemyUnitSummoned |
| Payload type | EnemyUnitSummonedEventArgs |
public static IDisposable OnEnemyUnitSummoned(Action<EnemyUnitSummonedEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
SummonerId | int | The summoner unit ID, or -1 when no summoner was supplied |
SummonedUnitId | int | The summoned enemy's runtime ID |
Tier | string | The summoned enemy's authored tier |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnEnemyUnitSummoned(args => Debug.Log(args.SummonerId));
OnEnemyPhaseChanged
Raised when an enemy advances to another authored behavior phase. Typical use: Enemy behavior-phase UI.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnEnemyPhaseChanged |
| String value | GCS_OnEnemyPhaseChanged |
| Payload type | EnemyPhaseChangedEventArgs |
public static IDisposable OnEnemyPhaseChanged(Action<EnemyPhaseChangedEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
UnitId | int | The enemy unit whose behavior phase changed |
OldIndex | int | The previous behavior phase index |
NewIndex | int | The new behavior phase index |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnEnemyPhaseChanged(args => Debug.Log(args.UnitId));
OnDelayedTriggerScheduled
Raised when a cross-turn effect is queued. Typical use: Create a countdown indicator.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnDelayedTriggerScheduled |
| String value | GCS_OnDelayedTriggerScheduled |
| Payload type | DelayedTriggerScheduledEventArgs |
public static IDisposable OnDelayedTriggerScheduled(Action<DelayedTriggerScheduledEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
SourceUnitId | int | The source unit ID associated with the queued effect |
RemainingTurns | int | Turns remaining before the effect resolves |
ActionTypeName | string | The queued action's runtime type name |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnDelayedTriggerScheduled(args => Debug.Log(args.SourceUnitId));
OnDelayedTriggerFired
Raised when a queued cross-turn effect resolves. Typical use: Delayed-effect activation feedback.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnDelayedTriggerFired |
| String value | GCS_OnDelayedTriggerFired |
| Payload type | DelayedTriggerFiredEventArgs |
public static IDisposable OnDelayedTriggerFired(Action<DelayedTriggerFiredEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
SourceUnitId | int | The source unit ID associated with the effect |
ActionTypeName | string | The resolved action's runtime type name |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnDelayedTriggerFired(args => Debug.Log(args.SourceUnitId));
OnDelayedTriggerCancelled
Raised when a queued cross-turn effect is cancelled. Typical use: Remove a countdown indicator.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnDelayedTriggerCancelled |
| String value | GCS_OnDelayedTriggerCancelled |
| Payload type | DelayedTriggerCancelledEventArgs |
public static IDisposable OnDelayedTriggerCancelled(Action<DelayedTriggerCancelledEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
SourceUnitId | int | The source unit ID associated with the cancelled effect |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnDelayedTriggerCancelled(args => Debug.Log(args.SourceUnitId));
Reward and choice events
| Event | Payload | Raised when |
|---|---|---|
OnBattleRewardOffered | BattleRewardOfferedEventArgs | post-battle rewards become available |
OnBattleRewardSelected | BattleRewardSelectedEventArgs | the player applies a reward choice |
OnBattleRewardSkipped | None | the player declines the offered reward |
OnEffectChoiceOffered | EffectChoiceOfferedEventArgs | a card effect pauses for a player choice |
OnEffectChoiceSelected | EffectChoiceSelectedEventArgs | the player resolves an effect choice |
OnEffectChoiceSkipped | None | an optional effect choice is skipped |
OnBattleRewardOffered
Raised when post-battle rewards become available. Typical use: Open the reward picker.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnBattleRewardOffered |
| String value | GCS_OnBattleRewardOffered |
| Payload type | BattleRewardOfferedEventArgs |
public static IDisposable OnBattleRewardOffered(Action<BattleRewardOfferedEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
CardCandidates | IReadOnlyList<GameCard> | The card choices offered for a card reward |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnBattleRewardOffered(args => Debug.Log(args.CardCandidates.Count));
OnBattleRewardSelected
Raised when the player applies a reward choice. Typical use: Close the reward picker and refresh the run deck.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnBattleRewardSelected |
| String value | GCS_OnBattleRewardSelected |
| Payload type | BattleRewardSelectedEventArgs |
public static IDisposable OnBattleRewardSelected(Action<BattleRewardSelectedEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
Choice | RewardChoice | The selected reward kind |
SelectedCard | GameCard | The selected card for a card reward; otherwise null |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnBattleRewardSelected(args => Debug.Log(args.Choice));
OnBattleRewardSkipped
Raised when the player declines the offered reward. Typical use: Close the reward picker.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnBattleRewardSkipped |
| String value | GCS_OnBattleRewardSkipped |
| Payload type | None |
public static IDisposable OnBattleRewardSkipped(Action handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
| — | — | This event has no payload parameters |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnBattleRewardSkipped(() => Debug.Log("OnBattleRewardSkipped"));
OnEffectChoiceOffered
Raised when a card effect pauses for a player choice. Typical use: Open the FlowGraph choice picker.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnEffectChoiceOffered |
| String value | GCS_OnEffectChoiceOffered |
| Payload type | EffectChoiceOfferedEventArgs |
public static IDisposable OnEffectChoiceOffered(Action<EffectChoiceOfferedEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
PromptText | string | The prompt shown to the player |
Candidates | IReadOnlyList<ChoiceCandidate> | The choices produced by the effect graph |
AllowSkip | bool | Whether the player may skip the choice |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnEffectChoiceOffered(args => Debug.Log(args.PromptText));
OnEffectChoiceSelected
Raised when the player resolves an effect choice. Typical use: Close the choice picker and record the selection.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnEffectChoiceSelected |
| String value | GCS_OnEffectChoiceSelected |
| Payload type | EffectChoiceSelectedEventArgs |
public static IDisposable OnEffectChoiceSelected(Action<EffectChoiceSelectedEventArgs> handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
SelectedIndex | int | The player-selected candidate index, starting at 0 |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnEffectChoiceSelected(args => Debug.Log(args.SelectedIndex));
OnEffectChoiceSkipped
Raised when an optional effect choice is skipped. Typical use: Close the choice picker.
Event identity:
| Item | Value |
|---|---|
| Constant | GCSEventNames.OnEffectChoiceSkipped |
| String value | GCS_OnEffectChoiceSkipped |
| Payload type | None |
public static IDisposable OnEffectChoiceSkipped(Action handler);
Event parameters:
| Name | Type | Description |
|---|---|---|
| — | — | This event has no payload parameters |
Returns: An IDisposable subscription handle; call Dispose() to unsubscribe
Example:
IDisposable subscription = GCSApi.OnEffectChoiceSkipped(() => Debug.Log("OnEffectChoiceSkipped"));
Subscription lifetime
Store the IDisposable returned by GCSApi.On* or GCSApi.Subscribe*, then call Dispose() when the subscriber is disabled or destroyed so it does not keep receiving events after a scene change
private IDisposable _subscription;
private void OnEnable()
{
_subscription = GCSApi.OnBattleEnded(args => Debug.Log(args.Won));
}
private void OnDisable()
{
_subscription?.Dispose();
_subscription = null;
}
Nullability
| Field | Contract |
|---|---|
CardPlayedEventArgs.TargetUnitId | null when the card has no selected target |
BattleRewardSelectedEventArgs.SelectedCard | null for non-card rewards |
SourceUnitId / SummonerId | -1 when no source unit is available |
IReadOnlyList fields | Built-in events provide non-null lists |
Event names versus FlowGraph entries
Graph entries and hooks, including On Card Played and damage hooks, are FlowGraph timing points rather than event-channel broadcasts, so they have no GCSEventNames constant. See FlowGraph Fundamentals for the timing model