Skip to main content

Hook Nodes

GCS · Built-In Node Library

Intercept a pending gameplay value before GCS commits it.

Use a Hook when a value or decision must change before it is committed. Read the pending value from the Hook output, calculate the replacement, then finish with `Write Hook` or `Cancel Hook` where cancellation is supported.

Use a Hook when a value or decision must change before it is committed. Read the pending value from the Hook output, calculate the replacement, then finish with Write Hook or Cancel Hook where cancellation is supported.


Node Usage

Damage Dealt Hook

Intercepts an attacker's outgoing damage before the defender's attack and damage-taken hooks run. Connect Value through math or conditions into Write Hook; use On Damage Dealt for behavior that should happen after the hit resolves.

Inputs

  • None:The matching value point starts the branch

Outputs

  • Value(Int):Pending outgoing damage
  • Source(UnitRef):The Hook holder; for this value point, the attacker
  • Target(UnitRef):The same Hook holder, not the defender
  • Out(Flow):Continues into the Hook calculation

Parameters

  • Priority(Number):0;Status only: smaller values run first; Card Hooks currently ignore it
  • Scope(Option):Battle;Card only: Battle or Turns; Status Hooks ignore it
  • Turns(Number):1;Card only: lifetime when Scope = Turns, clamped to at least 1

Damage Dealt Hook node

Damage Taken Hook

Intercepts incoming damage after an attack-specific hook, or after Status Damage Hook for status ticks, but before armor absorbs it. Connect the replacement Value to Write Hook for vulnerability or resistance.

Inputs

  • None:The matching value point starts the branch

Outputs

  • Value(Int):Pending damage before armor absorption
  • Source(UnitRef):The Hook holder; for this value point, the defender
  • Target(UnitRef):The same Hook holder, not the attacker
  • Out(Flow):Continues into the Hook calculation

Parameters

  • Priority(Number):0;Status only: smaller values run first; Card Hooks currently ignore it
  • Scope(Option):Battle;Card only: Battle or Turns; Status Hooks ignore it
  • Turns(Number):1;Card only: lifetime when Scope = Turns, clamped to at least 1

Damage Taken Hook node

Attack Taken Hook

Intercepts attacker-driven damage on the defender before the general Damage Taken Hook. Status damage and direct HP loss do not enter this value point. Connect Value to Write Hook when only attacks should be changed.

Inputs

  • None:The matching value point starts the branch

Outputs

  • Value(Int):Pending attack damage
  • Source(UnitRef):The Hook holder; for this value point, the defender
  • Target(UnitRef):The same Hook holder, not the attacker
  • Out(Flow):Continues into the Hook calculation

Parameters

  • Priority(Number):0;Status only: smaller values run first; Card Hooks currently ignore it
  • Scope(Option):Battle;Card only: Battle or Turns; Status Hooks ignore it
  • Turns(Number):1;Card only: lifetime when Scope = Turns, clamped to at least 1

Attack Taken Hook node

HP Gain Hook

Intercepts the requested healing amount before max-HP clamping. Connect the calculated Value to Write Hook to amplify or suppress healing; the after-the-fact Entry is On HP Gained.

Inputs

  • None:The matching value point starts the branch

Outputs

  • Value(Int):Pending healing amount before the max-HP cap
  • Source(UnitRef):The healed Hook holder
  • Target(UnitRef):The same Hook holder
  • Out(Flow):Continues into the Hook calculation

Parameters

  • Priority(Number):0;Status only: smaller values run first; Card Hooks currently ignore it
  • Scope(Option):Battle;Card only: Battle or Turns; Status Hooks ignore it
  • Turns(Number):1;Card only: lifetime when Scope = Turns, clamped to at least 1

HP Gain Hook node

HP Loss Hook

Intercepts actual HP loss. In the damage path it runs after armor has determined the HP portion; it also runs for direct Lose HP. Connect Value to Write Hook for mechanics that modify HP loss regardless of how that loss was requested.

Inputs

  • None:The matching value point starts the branch

Outputs

  • Value(Int):Pending HP loss
  • Source(UnitRef):The Hook holder that will lose HP
  • Target(UnitRef):The same Hook holder
  • Out(Flow):Continues into the Hook calculation

Parameters

  • Priority(Number):0;Status only: smaller values run first; Card Hooks currently ignore it
  • Scope(Option):Battle;Card only: Battle or Turns; Status Hooks ignore it
  • Turns(Number):1;Card only: lifetime when Scope = Turns, clamped to at least 1

HP Loss Hook node

Armor Gain Hook

Intercepts armor before Gain Armor adds it to the holder. Connect Value to Write Hook for armor scaling; use On Armor Gained for a reaction after the armor changes.

Inputs

  • None:The matching value point starts the branch

Outputs

  • Value(Int):Pending armor gain
  • Source(UnitRef):The Hook holder gaining armor
  • Target(UnitRef):The same Hook holder
  • Out(Flow):Continues into the Hook calculation

Parameters

  • Priority(Number):0;Status only: smaller values run first; Card Hooks currently ignore it
  • Scope(Option):Battle;Card only: Battle or Turns; Status Hooks ignore it
  • Turns(Number):1;Card only: lifetime when Scope = Turns, clamped to at least 1

Armor Gain Hook node

Armor Loss Hook

Intercepts an explicit Lose Armor amount. Armor consumed by damage and turn-start reset do not use this value point. Connect Value to Write Hook for resistance to explicit armor removal.

Inputs

  • None:The matching value point starts the branch

Outputs

  • Value(Int):Pending explicit armor loss
  • Source(UnitRef):The Hook holder losing armor
  • Target(UnitRef):The same Hook holder
  • Out(Flow):Continues into the Hook calculation

Parameters

  • Priority(Number):0;Status only: smaller values run first; Card Hooks currently ignore it
  • Scope(Option):Battle;Card only: Battle or Turns; Status Hooks ignore it
  • Turns(Number):1;Card only: lifetime when Scope = Turns, clamped to at least 1

Armor Loss Hook node

Armor Reset Hook

Runs at the holder's turn start when the encounter rule is Reset On Turn Start. The incoming Value is 0, the normal reset target. Write a different non-negative value to choose the armor left after reset, or cancel the Hook to leave the current armor untouched.

Inputs

  • None:The matching value point starts the branch

Outputs

  • Value(Int):Pending post-reset armor value, initially 0
  • Target(UnitRef):The Hook holder whose armor is being reset
  • Out(Flow):Continues into the Hook calculation

Parameters

  • Priority(Number):0;Status only: smaller values run first; Card Hooks currently ignore it
  • Scope(Option):Battle;Card only: Battle or Turns; Status Hooks ignore it
  • Turns(Number):1;Card only: lifetime when Scope = Turns, clamped to at least 1

Armor Reset Hook node

Energy Gain Hook

Intercepts the amount passed to an explicit Gain Energy operation before it is added to the player. It does not control the normal turn-start refill; use Energy Per Turn Hook for that baseline. Connect Value to Write Hook for bonuses or penalties to energy gains.

Inputs

  • None:The matching value point starts the branch

Outputs

  • Value(Int):Pending explicit energy gain
  • Out(Flow):Continues into the Hook calculation

Parameters

  • Priority(Number):0;Status only: smaller values run first; Card Hooks currently ignore it
  • Scope(Option):Battle;Card only: Battle or Turns; Status Hooks ignore it
  • Turns(Number):1;Card only: lifetime when Scope = Turns, clamped to at least 1

Energy Gain Hook node

Energy Spend Hook

Intercepts the amount passed to an explicit Lose Energy operation. Card play subtracts the accepted cost directly and does not use this value point, so card discounts belong in Card Cost Hook. Connect Value to Write Hook for explicit energy-drain modifiers.

Inputs

  • None:The matching value point starts the branch

Outputs

  • Value(Int):Pending explicit energy loss
  • Out(Flow):Continues into the Hook calculation

Parameters

  • Priority(Number):0;Status only: smaller values run first; Card Hooks currently ignore it
  • Scope(Option):Battle;Card only: Battle or Turns; Status Hooks ignore it
  • Turns(Number):1;Card only: lifetime when Scope = Turns, clamped to at least 1

Energy Spend Hook node

Energy Per Turn Hook

Intercepts the player's resolved maximum energy: Battle Rules > Starting Energy when it is greater than zero, otherwise the player unit's base energy, plus the run bonus. At turn start GCS assigns this result as the refill amount, and the same resolver can also be queried while refreshing battle UI. Cancel Hook returns that unmodified base value rather than stopping the turn-start refill. Keep this Hook free of one-shot presentation effects, and connect Value to Write Hook to change the baseline.

Inputs

  • None:The matching value point starts the branch

Outputs

  • Value(Int):Pending maximum energy and turn-start refill value
  • Out(Flow):Continues into the Hook calculation

Parameters

  • Priority(Number):0;Status only: smaller values run first; Card Hooks currently ignore it
  • Scope(Option):Battle;Card only: Battle or Turns; Status Hooks ignore it
  • Turns(Number):1;Card only: lifetime when Scope = Turns, clamped to at least 1

Energy Per Turn Hook node

Inflict Status Hook

Runs on the applying unit before the receiver's status Hook and before stack rules are applied. Status identifies the incoming status, while both unit ports currently identify the applying Hook holder. Connect Out to cancellation or an explicit replacement stack value.

Current Stacks output

Stacks is registered by the editor, but the executor does not write the pending stack count to that port. It therefore cannot be used as the incoming value. Status is written correctly; Cancel Hook and a constant replacement can still be used.

Inputs

  • None:The matching value point starts the branch

Outputs

  • Status(StatusRef):The status about to be inflicted
  • Stacks(Int):Currently unwritten; do not use as the pending stack count
  • Source(UnitRef):The applying Hook holder
  • Target(UnitRef):The same Hook holder, not the receiver
  • Out(Flow):Continues into the Hook calculation

Parameters

  • Priority(Number):0;Status only: smaller values run first; Card Hooks currently ignore it
  • Scope(Option):Battle;Card only: Battle or Turns; Status Hooks ignore it
  • Turns(Number):1;Card only: lifetime when Scope = Turns, clamped to at least 1

Inflict Status Hook node

Receive Status Hook

Runs on the receiving unit after any Inflict Status Hook has changed the pending count and before the status's stack rule is applied. Status identifies the incoming status, while both unit ports identify the receiving Hook holder. Connect Out to cancellation or an explicit replacement stack value.

Current Stacks output

Stacks is registered by the editor, but the executor does not write the pending stack count to that port. It therefore cannot be used as the incoming value. Status is written correctly; Cancel Hook and a constant replacement can still be used.

Inputs

  • None:The matching value point starts the branch

Outputs

  • Status(StatusRef):The status about to be received
  • Stacks(Int):Currently unwritten; do not use as the pending stack count
  • Source(UnitRef):The receiving Hook holder, not the applier
  • Target(UnitRef):The same receiving Hook holder
  • Out(Flow):Continues into the Hook calculation

Parameters

  • Priority(Number):0;Status only: smaller values run first; Card Hooks currently ignore it
  • Scope(Option):Battle;Card only: Battle or Turns; Status Hooks ignore it
  • Turns(Number):1;Card only: lifetime when Scope = Turns, clamped to at least 1

Receive Status Hook node

Status Damage Hook

Intercepts damage supplied by a status before the general Damage Taken Hook. In a Status graph, set Status to limit the Hook to one status or leave it unassigned to match every status-damage source. Connect Value to Write Hook for tick-specific scaling.

Status filter on Card Hooks

The executor applies this filter while discovering Status Hooks. A registered Card Hook currently keeps only its value point and does not evaluate the Status field, so a card-hosted Status Damage Hook matches every status-damage source.

Inputs

  • None:The matching value point starts the branch

Outputs

  • Value(Int):Pending damage from the matching status
  • Source(UnitRef):The damaged Hook holder, not the status applier
  • Target(UnitRef):The same damaged Hook holder
  • Out(Flow):Continues into the Hook calculation

Parameters

  • Status(GameStatus):None;Status Hook: selected status, or all when None; Card Hook: currently ignored
  • Priority(Number):0;Status only: smaller values run first; Card Hooks currently ignore it
  • Scope(Option):Battle;Card only: Battle or Turns; Status Hooks ignore it
  • Turns(Number):1;Card only: lifetime when Scope = Turns, clamped to at least 1

Status Damage Hook node

Card Cost Hook

Intercepts the player's effective card cost after persistent cost rules have been applied. Cost evaluation can occur repeatedly, and GCS also resolves this value point as a pre-play gate with an incoming value of 0, so the Hook should perform calculation only and avoid one-shot VFX or audio. During ordinary cost evaluation, Cancel Hook keeps the cost from before Hooks; when the same Hook cancels the later pre-play gate, GCS rejects the play. Connect Value to Write Hook for the numeric cost.

Current Card output

The runtime carries the played card in the execution context but does not write it to this node's registered Card port. The Value port is usable; Card is not currently a valid source for Card Info or filtering.

Inputs

  • None:The matching value point starts the branch

Outputs

  • Card(CardRef):Currently unwritten; do not use
  • Value(Int):Pending effective cost; the additional pre-play gate invokes it with 0
  • Out(Flow):Continues into the Hook calculation

Parameters

  • Priority(Number):0;Status only: smaller values run first; Card Hooks currently ignore it
  • Scope(Option):Battle;Card only: Battle or Turns; Status Hooks ignore it
  • Turns(Number):1;Card only: lifetime when Scope = Turns, clamped to at least 1

Card Cost Hook node

Card Playable Hook

Runs during TryPlayCard after energy sufficiency and the built-in Unplayable keyword check, with an internal pending value of true. The control branch is active and can reach Cancel Hook to reject the play, or write an explicit Boolean based on other available context.

Current Card and Playable outputs are not usable

Although both ports are registered, the executor writes neither of them. The pending Boolean is stored internally under Value, but this node exposes no Value port. Do not connect Card or Playable until the runtime and port catalog are aligned.

Inputs

  • None:The playability check starts the branch

Outputs

  • Card(CardRef):Currently unwritten; do not use
  • Playable(Bool):Currently unwritten; do not use as the pending decision
  • Out(Flow):Continues into the Hook control branch

Parameters

  • Priority(Number):0;Status only: smaller values run first; Card Hooks currently ignore it
  • Scope(Option):Battle;Card only: Battle or Turns; Status Hooks ignore it
  • Turns(Number):1;Card only: lifetime when Scope = Turns, clamped to at least 1

Card Playable Hook node

Draw Count Hook

Intercepts the count supplied to Draw Cards before the draw loop starts. It affects both the number that can enter the hand and any overflow handling after the hand-size cap is reached. Connect Value to Write Hook for extra or reduced draws.

Current overflow calculation

The draw loop uses the Hook result, but DrawAndDispatch still calculates overflow from the original requested count. Reducing the Hook value can therefore send additional cards to discard as overflow, while increasing it does not expand that overflow count.

Inputs

  • None:The matching value point starts the branch

Outputs

  • Value(Int):Pending number of cards to draw
  • Out(Flow):Continues into the Hook calculation

Parameters

  • Priority(Number):0;Status only: smaller values run first; Card Hooks currently ignore it
  • Scope(Option):Battle;Card only: Battle or Turns; Status Hooks ignore it
  • Turns(Number):1;Card only: lifetime when Scope = Turns, clamped to at least 1

Draw Count Hook node

Hand Size Hook

Intercepts the encounter's maximum hand size whenever GCS needs the limit for drawing, adding a card, or related checks. Cancel Hook returns Battle Rules > Max Hand Size, ignoring Hook changes for that query. Because the resolver can run more than once, keep the branch deterministic and free of presentation side effects. Connect Value to Write Hook to replace the cap.

Inputs

  • None:The matching value point starts the branch

Outputs

  • Value(Int):Pending maximum hand size
  • Out(Flow):Continues into the Hook calculation

Parameters

  • Priority(Number):0;Status only: smaller values run first; Card Hooks currently ignore it
  • Scope(Option):Battle;Card only: Battle or Turns; Status Hooks ignore it
  • Turns(Number):1;Card only: lifetime when Scope = Turns, clamped to at least 1

Hand Size Hook node