Operator Nodes
Find and configure the nodes that calculate, compare, convert, and filter values without changing battle state
Node Usageโ
Math Binary
Combines two numbers with arithmetic, a minimum or maximum, or a power. Connect the result to an Action, Hook, comparison, or another operator.
Inputs
A(Integer or Float): Left operand; falls back to the field valueB(Integer or Float): Right operand; falls back to the field value
Outputs
Result(Integer or Float): Calculated value; its type followsKind
Parameters
Number Type(Kind) (Int/Float):Int; Sets both input and result typesA(Number):0; Inspector fallback forAB(Number):0; Inspector fallback forBOperation(Op) (Add,Sub,Mul,Div,Mod,Min,Max,Pow):Add; Operation applied toAandB
Division or modulo by zero returns 0; integer division truncates its remainder, and integer Pow rounds the floating-point power result back to an integer
Math Unary
Changes a single number's sign, takes its absolute value or square root, or rounds it.
Inputs
A(Integer or Float): Value to transform; falls back to the field value
Outputs
Result(Integer or Float):Intmode always returns Integer;Floatmode returns Integer forSign,Floor,Ceil, andRound, otherwise Float
Parameters
Number Type(Kind) (Int/Float):Int; Sets the numeric modeA(Number):0; Inspector fallback for the inputOperation(Op) (Neg,Abs,Sign,Sqrt,Floor,Ceil,Round):Neg; Transformation to apply toA
Sqrt clamps negative values to zero before calculating; in Int mode, Floor, Ceil, and Round leave the already-integer input unchanged; in Float mode Sign, Floor, Ceil, and Round expose an Integer result port
Clamp
Restricts a number to an inclusive range; use it to keep costs, percentages, scaling values, or hook results inside an allowed minimum and maximum
Inputs
Value(Integer or Float): Number to restrictMin(Integer or Float): Inclusive lower boundMax(Integer or Float): Inclusive upper bound
Outputs
Result(Integer or Float): Clamped value; its type followsKind
Parameters
Number Type(Kind) (Int/Float):Int; Sets all port typesValue(Number):0; Inspector fallback forValueMin(Number):0; Inspector fallback forMinMax(Number):1; Inspector fallback forMax
Connect the bounds when another effect controls the range, or set them in the Inspector for a fixed range. In either case, keep Min less than or equal to Max because the node passes both values to Mathf.Clamp as supplied.
Condition
Compares two values and returns a boolean; feed Result to Branch, Gate, Select, or a hook rule
Inputs
A(Any): Left valueB(Any): Right value
Outputs
Result(Boolean): Result of the selected comparison
Parameters
Operation(Op) (>(Greater),โฅ(GreaterEqual),<(Less),โค(LessEqual),=(Equal),โ(NotEqual),โ(In)):=; Comparison rule as it appears in the editor
Numeric comparisons accept integers, floats, booleans (false = 0, true = 1), and numeric text; text that cannot be parsed compares as 0; numeric equality uses Mathf.Approximately, while strings compare exactly and case-sensitively; if either side is null, both sides are compared as text, making null equal to an empty string; two unconnected inputs therefore produce true for Equal; other values use normal value equality. In converts each side to a list of strings and returns true when the lists share at least one exact item; comma- or semicolon-separated text is split into items, and two empty lists do not overlap
Logic
Combines or negates boolean values; use it when a branch depends on several conditions, such as โtarget is alive and HP is below 50%โ
Inputs
A(Boolean): First operand; falls back to the field valueB(Boolean): Second operand forAnd,Or, andXor; hidden forNot
Outputs
Result(Boolean): Combined or inverted result
Parameters
A(Boolean): Off; Inspector fallback forAB(Boolean): Off; Inspector fallback for the second condition when usedOperation(Op) (And,Or,Xor,Not):And; Boolean operation;Notreads onlyA
Xor is true only when exactly one input is true
Ref Equal
Checks whether two ports point to the exact same runtime object; use it to match a collection element against the card that triggered the hook
Inputs
A(Any reference): First object referenceB(Any reference): Second object reference
Outputs
Result(Boolean): Identity comparison result
Parameters
Operation(Op) (Equal/NotEqual):Equal; Returns identity equality or its inverse
The node compares object references. If both inputs are unconnected, both are null, so Equal returns true and NotEqual returns false. Use Condition to compare names, IDs, field values, tags, or collection contents.
Select
Returns one of two values without splitting control flow; use it when only the data changes and both outcomes feed the same downstream node
Inputs
Condition(Boolean): ChoosesIfTruewhen true, otherwiseIfFalseIfTrue(Selected kind): Value returned for trueIfFalse(Selected kind): Value returned for false
Outputs
Result(Selected kind): Chosen input value
Parameters
Value Type(Kind) (Int,Float,Bool,String,Unit,Card,Status):Int; Sets both candidate ports and the result type
An unconnected Condition selects the false input, and Result is null if the selected input is unconnected. Use Branch when the outcomes need different actions or presentation paths.
Constant
Provides a fixed scalar or a database-backed text choice; it is useful when the same literal feeds several nodes or when you want a visible, reusable label in the graph
Inputs: none
Outputs
Value(Integer, Float, Boolean, String, or String list): Fixed result selected byKind; a database Tags/Keywords field returns a string list through anAnyport, never an asset reference
Parameters
Value Type(Kind) (Int,Float,Bool,String,Card,Status,Player,Enemy):Int; Chooses the visible value editor and output contractInt Value(Integer):0; Used only forIntFloat Value(Float):0; Used only forFloatBool Value(Boolean): Off; Used only forBoolString Value(String): Empty; Used forStringand single-value database fieldsField(Database field): Empty; ForCard,Status,Player, orEnemy, selects a field such as Type, Rarity, Tier, Tags, or KeywordsString Values(String list): Empty; Used when the chosen database field is multi-value, currently Tags or Keywords
Card, Status, Player, and Enemy modes expose editor dropdowns, but the runtime result is the selected string or string list, not a CardRef, StatusRef, or unit reference; use a Get node when an action needs the actual runtime object
Convert
Converts a scalar to an integer, float, boolean, or string; use it only at a real type boundary; keeping ports in their native type makes a graph easier to read
Inputs
A(Any scalar): Value to convert
Outputs
Result(Integer, Float, Boolean, or String): Converted value; type followsTo
Parameters
To Type(To) (Int,Float,Bool,String):Float; Target type
Float-to-integer conversion rounds to the nearest integer; invalid numeric text becomes 0; booleans become 0 or 1; a string is true when it is non-empty, numeric values are true when non-zero, and unsupported object types convert to the target type's empty value
Random
Generates a random integer, float, or boolean; use it for chance-based values or feed the boolean result into a Branch
Inputs
Min(Integer or Float): Shown forIntandFloat; lower range boundMax(Integer or Float): Shown forIntandFloat; upper range boundProbability(Float): Shown forBool; chance of returning true
Outputs
Result(Integer, Float, or Boolean): Random result; type followsKind
Parameters
Roll Type(Kind) (Int,Float,Bool):Int; Chooses range or probability modeMin(Number):0; Range fallback forIntandFloatMax(Number):1; Range fallback forIntandFloatProbability(Float):0.5; Boolean chance, normally expressed from0to1
Both numeric range ends are included; in Bool mode, values at or below 0 are always false and values above 1 are always true; use Random Elements when the result should be one or more items from a collection rather than a scalar
Count
Returns the number of items in a unit, card, or status collection; use it for hand-size checks, scaling, or a comparison that depends on how many targets remain
Inputs
Collection(Unit, Card, or Status collection): Collection to count; type followsKind
Outputs
Result(Integer): Item count; null collections return0
Parameters
Kind(internal) (Unit/Card/Status):Unitbefore inference; Set automatically from the connected collection type; not shown as an editable parameter
The node returns the collection's stored length, so null elements inside a non-null collection still count
Is Empty
Checks whether a collection contains no items; it is clearer than comparing Count with zero when emptiness is the only question
Inputs
Collection(Unit, Card, or Status collection): Collection to inspect; type followsKind
Outputs
Result(Boolean): True for null or zero-item collections
Parameters
Kind(internal) (Unit/Card/Status):Unitbefore inference; Set automatically from the connected collection type; not shown as an editable parameter
A collection containing one null element is not empty; only the collection reference and its item count are checked
Contains
Checks whether a collection contains one exact runtime object; use it to test membership after a selector or choice
Inputs
Collection(Unit, Card, or Status collection): Collection to searchValue(Unit, Card, or Status reference): Object to find; type followsKind
Outputs
Result(Boolean): True only when the same object reference occurs in the collection
Parameters
Kind(internal) (Unit/Card/Status):Unitbefore inference; Set automatically fromCollection; also changes theValuereference type
This is an identity test, not an asset-name, GUID, tag, or value comparison; a null collection or null Value returns false
Filter
Keeps only the units, cards, or statuses that meet the selected criteria; use it between a broad Get node and a target, collection action, sort, or pick operation
Inputs
Collection(Unit, Card, or Status collection): Source collection; type followsKind
Outputs
Result(Unit, Card, or Status collection): New collection containing matching non-null items, in source order
Parameters
Kind(internal) (Unit/Card/Status):Unitbefore inference; Set automatically fromCollection; changes the visible inline criteria and result typeFilter By(By Unit) (Multi-select:Team,Tags,Tier,HasStatus,HPBelow,HPAbove,Alive):Alive; Unit criteria shown after a Unit collection is connectedFilter By(By Card) (Multi-select:Type,Rarity,Keywords,Tags,CostBelow,CostAbove):Type; Card criteria shown after a Card collection is connectedFilter By(By Status) (Multi-select:Type,Tags):Type; Status criteria shown after a Status collection is connectedStatus(Status Id) (Status identifier): None; Required by unitHasStatusTeam(Player/Enemy/Neutral): None, Required by unitTeam, compares the runtimeUnitState.Teamidentity rather than the definition asset typeTier(Enemy tier): None; Required by unitTier; player units do not matchKeyword(Card keyword): None; Required by cardKeywordsTags(String list): Empty; Used by unit, card, or statusTagsType(Card type): None; Required by cardTypeRarity(Card rarity): None; Required by cardRarityStatus Type(Buff/Debuff):Buff; Used by statusTypeCost(Integer):0; Threshold for card cost criteriaHP%(Percent) (Float):50; HP percentage threshold for unit HP criteria
All selected criteria are combined with AND; within the Tags list, one exact shared tag is enough. HPBelow and HPAbove are strict comparisons; CostBelow means effective cost โค threshold, while CostAbove means effective cost โฅ threshold; an empty criterion list keeps every valid item, but a required text field left empty makes that criterion fail
Only Collection is a data socket. Status Id, Team, Percent, Cost, and the other criteria are edited inline on this node and cannot currently be wired from another node
Sort
Returns a reordered copy of a collection; use it before Pick Element or Take to select lowest-HP units, highest-cost cards, or statuses by stack count
Inputs
Collection(Unit, Card, or Status collection): Items to copy and sort; type followsKind
Outputs
Result(Unit, Card, or Status collection): Sorted copy; the original collection is not modified
Parameters
Kind(internal) (Unit/Card/Status):Unitbefore inference; Set automatically fromCollection; changes the visible sort field and result typeSort By(By Unit) (HP/Armor):HP; Unit sort keySort By(By Card) (Cost):Cost; Uses effective energy costSort By(By Status) (Stacks):Stacks; Uses the current graph host's stack count for each status definitionOrder(Ascending/Descending):Ascending; Sort direction
For status collections, the node reads stack counts from the current host. It keeps null elements in the result and sorts them with a value of 0.
Pick Element
Returns one item from a collection; pair it with Sort for lowest/highest selection, or use AtIndex for a position you already calculated
Inputs
Collection(Unit, Card, or Status collection): Collection to readIndex(Integer): Shown only forAtIndex; starts at0and falls back to the field value
Outputs
Element(Unit, Card, or Status reference): Selected item, or null when the collection is empty, the index is outside its bounds, or the selected slot itself contains null
Parameters
Kind(internal) (Unit/Card/Status):Unitbefore inference; Set automatically fromCollection; changes the element result typePick By(By) (First/Last/AtIndex):First; Selection ruleIndex(Integer):0; Inspector fallback used only byAtIndex
Take
Copies up to a requested number of items from the start or end of a collection; it preserves the selected items' original order
Inputs
Collection(Unit, Card, or Status collection): Source collectionCount(Integer): Maximum items to keep; falls back to the field value
Outputs
Result(Unit, Card, or Status collection): New collection with the selected range
Parameters
Kind(internal) (Unit/Card/Status):Unitbefore inference; Set automatically fromCollection; changes the result collection typeCount(Integer):1; Inspector fallback for requested item countFrom(Top/Bottom):Top; Reads from the start or end of the collection
A count larger than the collection returns all items, and a zero or negative count returns an empty collection. The result preserves any null elements in the selected range.
Exclude
Removes every item found in a second collection; use it for shapes such as โall enemies except the primary targetโ
Inputs
Collection(Unit, Card, or Status collection): Source itemsExclude(Matching collection type): Items to remove
Outputs
Result(Unit, Card, or Status collection): New collection with exclusions removed; source order is preserved
Parameters
Kind(internal) (Unit/Card/Status):Unitbefore inference; Set automatically fromCollection; applies to both collection inputs and the result
Membership uses runtime object identity; null items are omitted from the result, a null source collection returns an empty collection, and a null exclusion collection removes nothing
Merge Collections
Concatenates two collections; use it when one downstream action should receive targets assembled from two sources
Inputs
A(Unit, Card, or Status collection): Items placed firstB(Matching collection type): Items appended afterA
Outputs
Result(Unit, Card, or Status collection): New concatenated collection
Parameters
Kind(internal) (Unit/Card/Status):Unitbefore inference; Set automatically from the first collection input connection; applies to both inputs and the result
The node treats a null input collection as empty and preserves null elements and duplicates within either collection. If the same object appears in both inputs, it also appears twice in the result.
Make Collection
Builds a collection from individually connected references; use it when the graph has a small, explicit set of targets rather than an existing collection
Inputs
Slot0โฆSlotN(Unit, Card, or Status reference): One item per visible slot; null inputs are skipped
Outputs
Result(Unit, Card, or Status collection): New collection in slot order
Parameters
Element Type(Kind) (Unit/Card/Status):Unit; User-editable selector shown because this node has no source collection from which to infer the typeSlots(Slot Count) (Integer):2; Number of generated slot ports
Changing Slot Count rebuilds the input ports, with a minimum of 1 slot at runtime. Non-null items retain their slot order in the result, and the same reference can appear more than once.
Random Elements
Selects random list positions from a collection without reusing the same position; use it for a random subset of the supplied collection
Inputs
Collection(Unit, Card, or Status collection): Candidate poolCount(Integer): Requested number of results; falls back to the field value
Outputs
Result(Unit, Card, or Status collection): Random subset, in pick order
Parameters
Kind(internal) (Unit/Card/Status):Unitbefore inference; Set automatically fromCollection; changes the result collection typeCount(Integer):1; Inspector fallback for requested picks
A null or empty source collection or a count of zero or less returns an empty collection. Otherwise, the result contains at most as many entries as the source. The node samples by collection position, so null elements can appear in the result and an object that occupies several positions can appear more than once in Result.
Shuffle
Returns a randomly reordered copy of a collection; it does not mutate a battle pile or the source list
Inputs
Collection(Unit, Card, or Status collection): Items to copy and reorder
Outputs
Result(Unit, Card, or Status collection): Shuffled copy; null input produces an empty collection
Parameters
Kind(internal) (Unit/Card/Status):Unitbefore inference; Set automatically fromCollection; changes the result collection type
The node keeps null elements and shuffles them with the other items. To shuffle the actual draw pile and publish its battle event, use the Shuffle Draw Pile Action.