Target Selection
Keep card text, player input, and FlowGraph target resolution aligned so every rule affects only its intended objects
Card Target defines player input
| Editor Label | Runtime Enum | Player action | Expected source in Behavior |
|---|---|---|---|
None | CardTargetMode.None | Select no unit | The Graph decides whether it needs a unit, card, or no target |
Single Enemy | CardTargetMode.SingleEnemyUnit | Select one living enemy | Opponent reads the submitted enemy from Card Context |
All Enemies | CardTargetMode.AllEnemyUnits | Select no unit | AllEnemies resolves every living enemy |
Self | CardTargetMode.Self | Select no unit | Self resolves the player |
Single Enemy: Before the UI submits the selection, the card shows the pending target with an aiming arrow and unit highlight.

All Enemies: The card skips this selection. Its Behavior must resolve AllEnemies so every living enemy receives the range effect promised by the text. Meteor Strike therefore displays the same damage on all three enemies.

UnitSource resolves units from context
| Source | Resolved result |
|---|---|
Self | The current Host: the player in a player Card, the owner in a Status, or the acting enemy in an Enemy Graph |
Opponent | For a Player Host, the submitted living enemy, falling back to the first living enemy when none was submitted. For an Enemy Host, the player |
AllEnemies | Every living enemy, excluding dead units |
AllUnits | The living player and all living enemies |
Use Self for healing, armor, and self-Buffs, Opponent for a single-target card effect on the selected enemy, and AllEnemies for area rules.
A connected Target Port overrides the Source Field
When a node has both a target input pin, or Target Port, and a static target field, or Source Field, the connection takes priority.
- Connected pin: The node uses the value or reference supplied by the connection. The
TargetSourcedropdown in the static panel is ignored automatically. - Unconnected pin: The node falls back to the default contextual target selected in
TargetSource, such asSelforActive Unit.
CardSource and live card-instance resolution
CardSource resolves matching card-instance collections at runtime. Whenever a downstream node executes, these Sources read the latest state from the current battle.
| Source | Resolved result |
|---|---|
ThisCard | The CardInstance currently resolving |
HandPile | The current hand |
DrawPile | The current draw pile |
DiscardPile | The current discard pile |
ExhaustPile | The current exhaust pile |
AllPiles | The combined hand, draw pile, discard pile, and exhaust pile |
Filtering Selector collections
Use a Selector when game logic, rather than manual player input, decides the target of a card effect. Connections can filter, sort, and limit an initial collection until only the exact target objects remain.
- Filter: Retains objects that meet specific conditions, such as damage cards or enemies carrying Poison.
- Sort: Orders the retained objects, such as highest to lowest cost or lowest to highest HP.
- Pick / Take / Random: Extracts the exact objects needed by the next
Action, such as 1 random card or the first 2 elements.
The graph below filters the draw pile to all Basic Attack cards, selects one at random, then moves it into the hand.

Unit selection follows the same logic. To resolve the enemy with the lowest HP, connect All Enemies to a Filter that retains living units, connect that to a Sort ordered by ascending HP, then use Pick Element to extract the first element and pass it to the damage node.
Fault tolerance and design rules for empty results
Runtime fault tolerance through silent execution
Built-in FlowGraph Actions protect against empty values.
- When an Action resolves its targets, it skips missing, dead, or invalid objects automatically.
- If the final target collection is empty, such as when damage targets all enemies after every enemy has died, the Action does not throw an error or stop the rest of the Graph. It skips safely and continues.
Do not rely on silent skipping to communicate a rule
The code may remain error-free, but if nothing happening would violate player expectations, do not leave the result to silent skipping. Follow these design rules:
- Intercept with a Branch: Use a
ConditionandBranchto test whether the target is empty. When it is, follow another path with a visible fallback effect or message. - Make the text explicit: State the restriction in the card description so the player is not misled.
- Localize player-facing text correctly:
- Player-facing text in the description field: Use direct, readable in-game language, such as "Deal 8 damage to the selected enemy" or "Apply 2 Burn to all enemies."
- Never expose implementation fields: Terms such as
Opponent,UnitSource,CardSource, andCollection Operatorexist only for Editor graph construction and must never appear in player-facing card descriptions or UI.