docs(admin): comprehensive help section update in AbilityBuilder
Rewrote the help offcanvas to cover every feature of the ability system: - Canvas Mode usage guide (new section) - Action Groups AND/OR/XOR with Chooser Role (new section) - Costs with Cost Type and PickMode tables (new section) - Conditions expanded with all types and key parameters - Trigger-Specific Fields expanded into full reference table - Effects Categories table grouping all effects - Duration Types, Targeting, Filters updated/improved Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -1683,17 +1683,85 @@
|
||||
</div>
|
||||
<div class="offcanvas-body small">
|
||||
|
||||
@* ── Canvas usage ── *@
|
||||
<h6 class="fw-semibold text-primary">Canvas Mode</h6>
|
||||
<p class="mb-1">The canvas shows the current ability as a graph of connected nodes. Each node represents one part of the ability definition. Click a node to select it and edit its properties in the <strong>Inspector</strong> panel on the right.</p>
|
||||
<table class="table table-sm table-bordered mb-2">
|
||||
<thead class="table-dark"><tr><th>Interaction</th><th>Action</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td>Click node header</td><td>Select node and open Inspector</td></tr>
|
||||
<tr><td>Drag node header</td><td>Reposition node on canvas</td></tr>
|
||||
<tr><td>Scroll wheel</td><td>Zoom in / out</td></tr>
|
||||
<tr><td>Middle-mouse drag</td><td>Pan the canvas</td></tr>
|
||||
<tr><td>Click canvas background</td><td>Deselect node</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="mb-1">Use the <strong>left panel</strong> to switch between abilities and add new nodes (Action, Effect, Cost Entry, Sub-Group, Condition). The <strong>Form View</strong> button switches to the full form layout for any node type that needs it.</p>
|
||||
<p class="mb-3 text-muted fst-italic">SummonToken effects must be configured in Form View — the token editor is too wide for the Inspector panel.</p>
|
||||
|
||||
@* ── Ability types ── *@
|
||||
<h6 class="fw-semibold text-primary">Ability Types</h6>
|
||||
<table class="table table-sm table-bordered mb-3">
|
||||
<thead class="table-dark"><tr><th>Type</th><th>When it fires</th><th>Key fields</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td><strong>Active</strong></td><td>Player explicitly activates on their turn</td><td>Range, Cost, UsesPerTurn</td></tr>
|
||||
<tr><td><strong>Passive</strong></td><td>Always in effect while unit is on battlefield</td><td>Actions (target=Self)</td></tr>
|
||||
<tr><td><strong>Aura</strong></td><td>Applies Actions to units entering range; fires OnEnterAuraRange / OnLeaveAuraRange triggers. On Leave: <em>Persist</em> = keep effect duration, <em>Clear</em> = revert immediately, <em>Linger</em> = switch to linger duration</td><td>AuraRange, Actions, ClearOnLeave / LingerDuration</td></tr>
|
||||
<tr><td><strong>Triggered</strong></td><td>Fires automatically when a specific game event occurs</td><td>TriggerEvent, TriggerLimitPerTurn, Actions</td></tr>
|
||||
<tr><td><strong>Active</strong></td><td>Player explicitly activates on their turn</td><td>Range, Cost, UsesPerTurn, Conditions</td></tr>
|
||||
<tr><td><strong>Passive</strong></td><td>Always in effect while unit is on the battlefield; fires once on enter and whenever the trigger re-evaluates</td><td>Actions (target usually Self or ExactSelf)</td></tr>
|
||||
<tr><td><strong>Aura</strong></td><td>Applies effects to units within AuraRange. On Leave: <em>Persist</em> = keep effect duration, <em>Clear</em> = revert immediately, <em>Linger</em> = switch to a separate linger duration</td><td>AuraRange Min/Max, Actions, ClearOnLeave / LingerDuration</td></tr>
|
||||
<tr><td><strong>Triggered</strong></td><td>Fires automatically when a specific game event occurs and all ActivationConditions pass</td><td>TriggerEvent + fields, TriggerLimitPerTurn, Actions</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@* ── Action Groups ── *@
|
||||
<h6 class="fw-semibold text-primary">Action Groups — AND / OR / XOR</h6>
|
||||
<p class="mb-1">The <strong>Actions</strong> node controls how the ability's top-level action steps execute. Set <strong>Logic Op</strong> on the Actions node (or a Sub-Group node) to one of:</p>
|
||||
<table class="table table-sm table-bordered mb-2">
|
||||
<thead class="table-dark"><tr><th>Logic Op</th><th>Behaviour</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td><strong>And</strong></td><td>All actions in the group execute sequentially. Default for most abilities.</td></tr>
|
||||
<tr><td><strong>Or</strong></td><td>The chooser picks exactly one action (or sub-group) to execute.</td></tr>
|
||||
<tr><td><strong>Xor</strong></td><td>Same as Or — one branch fires; the choices are mutually exclusive by design.</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="mb-1">When Logic Op is <strong>Or</strong> or <strong>Xor</strong>, set <strong>Chooser Role</strong> to control who picks:</p>
|
||||
<table class="table table-sm table-bordered mb-2">
|
||||
<thead class="table-dark"><tr><th>Chooser Role</th><th>Who decides</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td>Self</td><td>The player who activated / owns the ability chooses</td></tr>
|
||||
<tr><td>Opponent</td><td>The opposing player chooses</td></tr>
|
||||
<tr><td>Random</td><td>Server picks immediately — no client prompt</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="mb-1"><strong>Sub-Groups</strong> let you nest a second level of AND/OR/XOR logic inside the main action group. Add them from the left-panel palette, then add actions inside each sub-group.</p>
|
||||
<p class="mb-3 text-muted fst-italic">ActionGroup vs ChooseOne: ActionGroup branches between independent action steps (each with their own targeting). ChooseOne (inside an Effect node) branches between effects on the same already-resolved target.</p>
|
||||
|
||||
@* ── Costs ── *@
|
||||
<h6 class="fw-semibold text-primary">Costs (Active abilities)</h6>
|
||||
<p class="mb-1">Add cost entries from the left-panel palette or via the Cost node's Inspector. The <strong>Cost</strong> node also supports AND / OR / XOR logic — for example, "pay 2 SP OR discard a card".</p>
|
||||
<table class="table table-sm table-bordered mb-2">
|
||||
<thead class="table-dark"><tr><th>Cost Type</th><th>What the player pays</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td>SpiritPoints</td><td>Spend N SP</td></tr>
|
||||
<tr><td>SacrificeTokens</td><td>Spend N ST</td></tr>
|
||||
<tr><td>DiscardFromHand</td><td>Discard N cards from hand (interactive pick if PickMode ≠ Random)</td></tr>
|
||||
<tr><td>MillTopOfDeck / MillBottomOfDeck</td><td>Send top/bottom N cards of deck to discard</td></tr>
|
||||
<tr><td>DealDamageToOwnArchSpirit</td><td>Deal N damage to your own ArchSpirit</td></tr>
|
||||
<tr><td>DealDamageToOwnSpirit</td><td>Deal N damage to a selected friendly Spirit</td></tr>
|
||||
<tr><td>SendSpiritFromBattlefieldToDiscard</td><td>Send a selected friendly Spirit to the discard</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="mb-1">For interactive costs (Discard, DealDamage, SendSpirit), set <strong>PickMode</strong>:</p>
|
||||
<table class="table table-sm table-bordered mb-3">
|
||||
<thead class="table-dark"><tr><th>PickMode</th><th>Who picks the card(s)</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td>SelfPick</td><td>Activating player selects from their eligible cards</td></tr>
|
||||
<tr><td>EnemyPick</td><td>Opponent selects — they see the player's eligible cards</td></tr>
|
||||
<tr><td>EnemySeePick</td><td>Opponent selects but hand is otherwise hidden</td></tr>
|
||||
<tr><td>EnemyRandomPick</td><td>Opponent's choice is made randomly by server</td></tr>
|
||||
<tr><td>Random</td><td>Server picks immediately — no prompt shown</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@* ── Targeting ── *@
|
||||
<h6 class="fw-semibold text-primary">Targeting — Scope</h6>
|
||||
<p class="mb-1">Scope defines the <em>zone</em> searched for targets.</p>
|
||||
<table class="table table-sm table-bordered mb-3">
|
||||
@@ -1709,33 +1777,45 @@
|
||||
</table>
|
||||
|
||||
<h6 class="fw-semibold text-primary">Targeting — Ownership</h6>
|
||||
<p class="mb-1">Ownership narrows the candidate pool and determines whether the player is prompted to pick.</p>
|
||||
<table class="table table-sm table-bordered mb-3">
|
||||
<thead class="table-dark"><tr><th>Ownership</th><th>Meaning</th><th>Player prompted?</th></tr></thead>
|
||||
<p class="mb-1"><strong>Ownership</strong> filters the valid target pool. <strong>Chooser</strong> is separate — it controls who picks the target from that pool.</p>
|
||||
<table class="table table-sm table-bordered mb-2">
|
||||
<thead class="table-dark"><tr><th>Ownership</th><th>Pool includes…</th><th>Auto-resolved?</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td>Self</td><td>Any unit owned by the same controller as the ability source</td><td>No (auto)</td></tr>
|
||||
<tr><td>ExactSelf</td><td>The exact unit instance that owns this ability</td><td>No (auto)</td></tr>
|
||||
<tr><td>Owner</td><td>Entities belonging to the ability owner</td><td>Yes (if Count>1 or All)</td></tr>
|
||||
<tr><td>Ally</td><td>Friendly units other than self</td><td>Yes</td></tr>
|
||||
<tr><td>Enemy</td><td>Opponent's units</td><td>Yes</td></tr>
|
||||
<tr><td>Any</td><td>Any entity in the zone regardless of controller</td><td>Yes</td></tr>
|
||||
<tr><td>Random</td><td>Engine picks a random valid target; player is not prompted</td><td>No (auto)</td></tr>
|
||||
<tr><td>Target</td><td>Re-uses the resolved target from the previous action</td><td>No (chained)</td></tr>
|
||||
<tr><td>Self</td><td>Any unit owned by the same controller as the source</td><td>Yes</td></tr>
|
||||
<tr><td>ExactSelf</td><td>The exact unit instance that owns this ability</td><td>Yes</td></tr>
|
||||
<tr><td>Owner</td><td>Entities belonging to the ability owner</td><td>Only if Count=1 and Chooser=Random</td></tr>
|
||||
<tr><td>Ally</td><td>Friendly units other than self</td><td>Only if Chooser=Random</td></tr>
|
||||
<tr><td>Enemy</td><td>Opponent's units</td><td>Only if Chooser=Random</td></tr>
|
||||
<tr><td>Any</td><td>All entities in the zone regardless of controller</td><td>Only if Chooser=Random</td></tr>
|
||||
<tr><td>Random</td><td>All valid targets — server picks one at random immediately</td><td>Yes</td></tr>
|
||||
<tr><td>Target</td><td>Re-uses the resolved target from the previous action (chained)</td><td>Yes</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="mb-1"><strong>Chooser</strong> — who selects from the filtered pool:</p>
|
||||
<table class="table table-sm table-bordered mb-3">
|
||||
<thead class="table-dark"><tr><th>Chooser</th><th>Who picks</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td>Self</td><td>Activating / controlling player — a target-pick prompt is shown to them</td></tr>
|
||||
<tr><td>Opponent</td><td>Opponent is prompted to pick from the filtered pool</td></tr>
|
||||
<tr><td>Ally</td><td>An allied player is prompted</td></tr>
|
||||
<tr><td>Random</td><td>Server picks immediately — no prompt is shown to anyone</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h6 class="fw-semibold text-primary">Targeting — Target Filters</h6>
|
||||
<p class="mb-1">Applied on top of Ownership to further narrow valid targets. Set on the Action node's <strong>Target Filter</strong> field.</p>
|
||||
<table class="table table-sm table-bordered mb-3">
|
||||
<thead class="table-dark"><tr><th>Filter</th><th>Meaning</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td>IsSelf</td><td>Target shares the same <em>card definition</em> as the source (matches all copies of this card type on the board)</td></tr>
|
||||
<tr><td>IsExactSelf</td><td>Target is the exact <em>unit instance</em> that owns this ability (use when only this specific unit should be affected)</td></tr>
|
||||
<tr><td>IsSelf</td><td>Target shares the same <em>card definition</em> as the source — matches all copies of this card type on the board</td></tr>
|
||||
<tr><td>IsExactSelf</td><td>Target is the exact <em>unit instance</em> that owns this ability — use when only this specific unit should be targeted</td></tr>
|
||||
<tr><td>IsAdjacentToSource</td><td>Target must be orthogonally adjacent to the ability's source unit</td></tr>
|
||||
<tr><td>IsAdjacentToUnitMatching</td><td>Target is adjacent to a unit matching ownership/filter defaults</td></tr>
|
||||
<tr><td>IsAdjacentToTileMatching</td><td>Target is adjacent to a tile matching supplied tile filter(s)</td></tr>
|
||||
<tr><td>IsAdjacentToUnitMatching</td><td>Target must be adjacent to a unit matching the configured ownership / unit filters</td></tr>
|
||||
<tr><td>IsAdjacentToTileMatching</td><td>Target must be adjacent to a tile matching configured tile filters</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@* ── ValueExpr ── *@
|
||||
<h6 class="fw-semibold text-primary">ValueExpr References</h6>
|
||||
<p class="mb-1">In any <strong>Amt</strong> field you can choose a dynamic reference instead of a fixed number. The engine resolves the reference at the moment the effect fires.</p>
|
||||
<table class="table table-sm table-bordered mb-3">
|
||||
@@ -1762,94 +1842,145 @@
|
||||
<h6 class="fw-semibold text-primary">Multi-Action Cross-Reference Example</h6>
|
||||
<p class="mb-1">"Return a target Spirit to its owner's hand and refund its SP cost."</p>
|
||||
<ul class="mb-3">
|
||||
<li><strong>Action 1</strong> — Scope: Hand or Battlefield, Type: Spirit, Ownership: Any, Count: 1 → Effect: <em>ReturnToHand</em></li>
|
||||
<li><strong>Action 1</strong> — Scope: Battlefield, Type: Spirit, Ownership: Any, Count: 1 → Effect: <em>ReturnToHand</em></li>
|
||||
<li><strong>Action 2</strong> — Scope: Player, Type: Player, Ownership: Target, Count: 1 → Effect: <em>ModifySP</em>, Amt: <code>Action0.Target.SpCost</code></li>
|
||||
</ul>
|
||||
<p class="text-muted fst-italic mb-3">Action 2 uses <code>Ownership: Target</code> to re-target the owner of the card selected in Action 1. The Amt dropdown will show <code>Action0.Target.*</code> options once Action 2 exists.</p>
|
||||
<p class="text-muted fst-italic mb-3">Action 2 uses <code>Ownership: Target</code> to re-target the owner of the card chosen in Action 1. The Amt dropdown shows <code>Action0.Target.*</code> options once Action 2 exists.</p>
|
||||
|
||||
@* ── Duration ── *@
|
||||
<h6 class="fw-semibold text-primary">Duration Types</h6>
|
||||
<p class="mb-1">Set on individual Effect nodes or overridden for all effects via <strong>Duration override</strong> on the Meta node.</p>
|
||||
<table class="table table-sm table-bordered mb-3">
|
||||
<thead class="table-dark"><tr><th>Duration</th><th>When the effect expires</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td>Instant</td><td>Applied once, never removed (stat changes etc.)</td></tr>
|
||||
<tr><td>UntilEndOfTurn</td><td>Expires at end of the active player's turn</td></tr>
|
||||
<tr><td>UntilStartOfOwnerTurn</td><td>Expires at start of the <em>ability owner's</em> next turn</td></tr>
|
||||
<tr><td>UntilStartOfSourceOwnerTurn</td><td>Expires at start of the <em>source unit owner's</em> next turn</td></tr>
|
||||
<tr><td>Instant</td><td>Applied once and never removed (permanent stat change, etc.)</td></tr>
|
||||
<tr><td>UntilEndOfTurn</td><td>Expires at end of the currently active player's turn</td></tr>
|
||||
<tr><td>UntilStartOfOwnerTurn</td><td>Expires at the start of the <em>ability owner's</em> next turn</td></tr>
|
||||
<tr><td>UntilStartOfSourceOwnerTurn</td><td>Expires at the start of the <em>source unit owner's</em> next turn</td></tr>
|
||||
<tr><td>UntilEndOfSequence</td><td>Expires when the current ability resolution sequence ends (within-turn only)</td></tr>
|
||||
<tr><td>ForNTurns</td><td>Expires after N complete turns have elapsed</td></tr>
|
||||
<tr><td>WhileSourceOnBattlefield</td><td>Expires when the source unit leaves the battlefield</td></tr>
|
||||
<tr><td>PermanentInMatch</td><td>Never expires for the rest of this game</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h6 class="fw-semibold text-primary">Conditions</h6>
|
||||
<p class="mb-1">Conditions can be added to <strong>Ability-level</strong> (ActivationConditions) or <strong>Action-level</strong>. All must pass for the ability/action to fire. The <strong>Subject</strong> dropdown selects whose state is checked: <code>Self</code> = ability source, <code>Target</code> = the resolved target.</p>
|
||||
@* ── Effects ── *@
|
||||
<h6 class="fw-semibold text-primary">Effects — Categories</h6>
|
||||
<p class="mb-1">Effects are grouped in the Effect Type picker. Key categories:</p>
|
||||
<table class="table table-sm table-bordered mb-3">
|
||||
<thead class="table-dark"><tr><th>Condition</th><th>Passes when…</th></tr></thead>
|
||||
<thead class="table-dark"><tr><th>Category</th><th>Examples</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td>IsOwnTurn / IsOpponentTurn</td><td>It is (or isn't) the owner's turn</td></tr>
|
||||
<tr><td>HealthBelow / HealthAbove N</td><td>Subject's current HP < N or > N</td></tr>
|
||||
<tr><td>DefenseIs / SPAtLeast / STAtLeast</td><td>Stat comparisons</td></tr>
|
||||
<tr><td>HasGenus / HasAbility</td><td>Subject has a genus tag / named ability</td></tr>
|
||||
<tr><td>IsOnTileWithAffinity</td><td>Subject's tile matches the specified affinity</td></tr>
|
||||
<tr><td>DestinationTileAffinityIs / PreviousTileAffinityIs</td><td>On move-triggered abilities, checks the moved-to / moved-from tile affinity</td></tr>
|
||||
<tr><td>MovedFromOrIntoAffinity</td><td>On move-triggered abilities, passes if either origin or destination tile matches affinity</td></tr>
|
||||
<tr><td>IsAdjacentToTileWithAffinity / IsOnOrAdjacentToTileWithAffinity</td><td>Positional affinity checks around the subject unit</td></tr>
|
||||
<tr><td>IsCurrentlyMoving</td><td>True only inside movement-trigger context for the moving source</td></tr>
|
||||
<tr><td>ControlledTileCountWithAffinity</td><td>Counts occupied tiles by affinity and compares via comparator/N</td></tr>
|
||||
<tr><td>IsAdjacentTo</td><td>Subject is adjacent to a unit matching Ownership</td></tr>
|
||||
<tr><td>WithinRangeOf</td><td>Subject is within N tiles of a unit matching Ownership</td></tr>
|
||||
<tr><td>UnitCountOnBattlefield</td><td>Total matching units on board satisfies comparator</td></tr>
|
||||
<tr><td>CardInZone</td><td>A matching card exists in the specified zone</td></tr>
|
||||
<tr><td>AND / OR / XOR</td><td>Composite — combines nested conditions</td></tr>
|
||||
<tr><td>Damage / Heal</td><td>DealDamage, DealDamagePlusStat, DOT (damage over time), RestoreHealth, HOT (heal over time), PreventNextDamage, PreventDeath</td></tr>
|
||||
<tr><td>Stat modification</td><td>ModifyStat, ModifyMaxStat, SetStatModMultiplier, ModifyChannelRange, SetAttackRange</td></tr>
|
||||
<tr><td>Resource</td><td>GainSP, SpendSP, GainST, SpendST, ModifySP, ModifySPAccumulation, ModifyCardsDrawnThisTurn</td></tr>
|
||||
<tr><td>Movement / Position</td><td>MoveUnit, PushUnit, PullUnit, DisplaceUnit, RepositionUnit</td></tr>
|
||||
<tr><td>Zone / Card</td><td>ReturnToHand, ReturnToDeck, PlaceOnDeck, ReturnToBattlefield, ChannelCard, AscendFromZone, TransitionFromZone, DrawCards, DiscardCards, SearchDeck, RevealCards, StackDeck</td></tr>
|
||||
<tr><td>Token</td><td>SummonToken, DestroyToken, CloneSpiritAsToken</td></tr>
|
||||
<tr><td>Control / Flags</td><td>TakeControl, KillUnit, DestroyUnit, SkipTurn, SetHealthMinimum, SetFixedSacrificeReturn, ModifyCost, ChangeAttackType, ObstructMovementType, SetMovementType, GrantAdditionalAttack, GrantMovementControl</td></tr>
|
||||
<tr><td>Ability / Genus</td><td>AddAbility, RemoveAbility, EnableAbility, DisableAbility, AddGenus, RemoveGenus</td></tr>
|
||||
<tr><td>Tile / Ruin</td><td>ChangeTileAffinity, DisableRuinForDuration</td></tr>
|
||||
<tr><td>Board state</td><td>ModifyPlayerProperty, ShuffleDeck, ApplyOnEvent</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@* ── Conditions ── *@
|
||||
<h6 class="fw-semibold text-primary">Conditions</h6>
|
||||
<p class="mb-1">Conditions can be on <strong>Ability-level</strong> (ActivationConditions — add via the Condition palette button) or <strong>Action-level</strong> (add via the action Inspector). All conditions must pass for the ability/action to fire.</p>
|
||||
<p class="mb-1">The <strong>Subject</strong> dropdown sets whose state is evaluated: <code>Self</code> = ability source unit, <code>Target</code> = the resolved target of this action.</p>
|
||||
<table class="table table-sm table-bordered mb-3">
|
||||
<thead class="table-dark"><tr><th>Condition</th><th>Passes when…</th><th>Key parameters</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td>IsOwnTurn / IsOpponentTurn</td><td>It is (or isn't) the owner's turn</td><td>—</td></tr>
|
||||
<tr><td>IsActivePlayerTurn</td><td>Subject's controller is the currently active player</td><td>Ownership</td></tr>
|
||||
<tr><td>HealthBelow / HealthAbove</td><td>Subject's current HP < N or > N</td><td>N</td></tr>
|
||||
<tr><td>DefenseIs / SPAtLeast / STAtLeast etc.</td><td>Resource stat comparison</td><td>N</td></tr>
|
||||
<tr><td>UnitPropertyCompare</td><td>Named unit stat vs comparator vs value</td><td>PropertyName, Comparator, Value</td></tr>
|
||||
<tr><td>PlayerPropertyCompare</td><td>Player resource (SP/ST/HandSize/DeckSize etc.) vs comparator</td><td>PropertyName, Comparator, Value</td></tr>
|
||||
<tr><td>UnitTypeIs</td><td>Subject is of the given card type (Spirit / ArchSpirit / SpiritToken)</td><td>UnitType</td></tr>
|
||||
<tr><td>OwnershipIs</td><td>Subject is owned by Self / Ally / Opponent relative to ability owner</td><td>Ownership</td></tr>
|
||||
<tr><td>IsThisCard</td><td>Subject is the exact source card instance</td><td>—</td></tr>
|
||||
<tr><td>HasGenus / HasAbility</td><td>Subject has a genus tag / named ability</td><td>Tag / AbilityRef</td></tr>
|
||||
<tr><td>IsOnTileWithAffinity</td><td>Subject's tile affinity matches</td><td>Affinity</td></tr>
|
||||
<tr><td>DestinationTileAffinityIs / PreviousTileAffinityIs</td><td>On move-triggers: destination / origin tile affinity</td><td>Affinity</td></tr>
|
||||
<tr><td>MovedFromOrIntoAffinity</td><td>On move-triggers: either origin or destination matches</td><td>Affinity</td></tr>
|
||||
<tr><td>IsAdjacentToTileWithAffinity / IsOnOrAdjacentToTileWithAffinity</td><td>Positional affinity check around subject</td><td>Affinity</td></tr>
|
||||
<tr><td>IsAdjacentTo</td><td>Subject is adjacent to a unit matching Ownership + UnitType</td><td>Ownership, UnitType</td></tr>
|
||||
<tr><td>WithinRangeOf</td><td>Subject is within Min–Max tiles of a unit matching filters</td><td>Min, Max</td></tr>
|
||||
<tr><td>IsInRangeOfUnit</td><td>Source within Min–Max tiles of a unit matching Type + Ownership</td><td>Min, Max, UnitType, Ownership</td></tr>
|
||||
<tr><td>UnitCountOnBattlefield</td><td>Count of matching units on board satisfies comparator</td><td>Ownership, UnitType, Comparator, N</td></tr>
|
||||
<tr><td>HandContainsCount</td><td>N cards of a given type/affinity are in hand</td><td>CardType, Affinity, Comparator, N</td></tr>
|
||||
<tr><td>CardInZone</td><td>A matching card exists in the specified zone</td><td>CardRef, Zone</td></tr>
|
||||
<tr><td>CardDefinitionCountInZone</td><td>N copies of this card definition exist in a zone</td><td>Zone, Ownership, Comparator, N</td></tr>
|
||||
<tr><td>ControlledTileCountWithAffinity</td><td>Occupied tiles matching affinity satisfies comparator</td><td>Ownership, Affinity, Comparator, N</td></tr>
|
||||
<tr><td>TileIsOccupied / TileOccupant</td><td>Subject's tile is occupied by a unit of the given type/ownership</td><td>UnitType, Ownership</td></tr>
|
||||
<tr><td>SurroundingTile</td><td>N or more tiles within Min–Max distance satisfy tile conditions</td><td>Min, Max, Comparator, TileCount</td></tr>
|
||||
<tr><td>MovementTypeIs</td><td>Subject's movement type matches</td><td>MovementType</td></tr>
|
||||
<tr><td>SPAccumulationCompare</td><td>Subject player's SP-per-turn satisfies comparator</td><td>Comparator, Value</td></tr>
|
||||
<tr><td>CostOfCardsInHand</td><td>Aggregate SP/ST cost of cards in hand satisfies comparator</td><td>CostType, CardType, Affinity, Comparator, Value</td></tr>
|
||||
<tr><td>IsCurrentlyMoving</td><td>True only inside movement-trigger context for the moving unit</td><td>—</td></tr>
|
||||
<tr><td>AND / OR / XOR / NOT</td><td>Composite — combine nested conditions with boolean logic</td><td>Inner conditions / JSON</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@* ── Triggers ── *@
|
||||
<h6 class="fw-semibold text-primary">Trigger Events</h6>
|
||||
<p class="mb-1">Available for <strong>Triggered</strong> abilities. The engine fires the ability whenever the event occurs and all ActivationConditions pass.</p>
|
||||
<ul class="mb-3 column-count-2">
|
||||
@foreach (var t in TriggerTypesList)
|
||||
{ <li><code>@t</code></li> }
|
||||
</ul>
|
||||
<p class="mb-1"><strong>Trigger Ownership</strong> controls whose actions fire the trigger:</p>
|
||||
<table class="table table-sm mb-3">
|
||||
<thead><tr><th>Value</th><th>Meaning</th></tr></thead>
|
||||
<p class="mb-1"><strong>Trigger Ownership / Source fields</strong> — filter which units or players cause the trigger to fire:</p>
|
||||
<table class="table table-sm table-bordered mb-3">
|
||||
<thead class="table-dark"><tr><th>Value</th><th>Meaning</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td><code>Any</code></td><td>Any unit's action fires the trigger</td></tr>
|
||||
<tr><td><code>Owner</code></td><td>Any unit owned by the same player fires the trigger</td></tr>
|
||||
<tr><td><code>Ally</code></td><td>Alias for Owner (same-player units)</td></tr>
|
||||
<tr><td><code>Enemy</code></td><td>Only opponent units fire the trigger</td></tr>
|
||||
<tr><td><code>Enemy</code></td><td>Only opponent-controlled units fire the trigger</td></tr>
|
||||
<tr><td><code>ExactSelf</code></td><td><strong>Only this specific unit instance</strong> fires the trigger — use this to react to your own movement/actions, not teammates'</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h6 class="fw-semibold text-primary">Trigger-Specific Fields</h6>
|
||||
<p class="mb-1">Some trigger types expose extra filtering fields beyond <code>Ownership</code> and <code>UnitType</code>.</p>
|
||||
|
||||
<p class="mb-1"><strong>OnUnitSentToDiscard — <code>CausedBy</code></strong></p>
|
||||
<p class="mb-1">Fires whenever a unit is sent to the discard pile from the battlefield. This includes:</p>
|
||||
<ul class="mb-2">
|
||||
<li>Combat — the attacker kills the target (or counterattack kills the attacker)</li>
|
||||
<li>Ability — a <em>KillUnit</em> or <em>SendToDiscard</em> ability effect resolves</li>
|
||||
</ul>
|
||||
<p class="mb-1">The optional <code>CausedBy</code> field narrows the trigger to units killed by a specific owner class:</p>
|
||||
<p class="mb-1">Trigger parameters appear automatically in the Inspector (and Form View) once a trigger event is selected. Common extras:</p>
|
||||
<table class="table table-sm table-bordered mb-2">
|
||||
<thead class="table-dark"><tr><th>CausedBy value</th><th>Fires when the killer is…</th></tr></thead>
|
||||
<thead class="table-dark"><tr><th>Trigger</th><th>Extra fields</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td>(empty)</td><td>Any killer — trigger fires regardless of who caused the discard</td></tr>
|
||||
<tr><td><code>ExactSelf</code></td><td><strong>This specific unit instance</strong> — the unit that owns this ability was the one that dealt the killing blow (Bloodlust pattern)</td></tr>
|
||||
<tr><td><code>Owner</code></td><td>Any unit controlled by the same player as this unit</td></tr>
|
||||
<tr><td><code>Enemy</code></td><td>Any opponent-controlled unit caused the discard</td></tr>
|
||||
<tr><td><code>Any</code></td><td>Same as empty — any killer</td></tr>
|
||||
<tr><td>OnUnitSentToDiscard</td><td><code>CausedBy</code> — filters by killer identity (see below)</td></tr>
|
||||
<tr><td>OnDamageDealt / OnHealed / OnUnitMPSpent</td><td><code>Amount</code> — optional minimum threshold</td></tr>
|
||||
<tr><td>OnStatModified</td><td><code>Stat</code> — optional stat name to filter on</td></tr>
|
||||
<tr><td>OnChanneled</td><td><code>CardType</code> — optional card type filter</td></tr>
|
||||
<tr><td>OnSPGained / OnSPSpent etc.</td><td><code>Player</code> — which player's resource event fires the trigger</td></tr>
|
||||
<tr><td>OnDamagePrevented / BeforeDamageApplied</td><td>Source and target ownership filters</td></tr>
|
||||
<tr><td>OnRuinActivation</td><td><code>OccupantOwnership</code> — optional occupant filter</td></tr>
|
||||
<tr><td>OnEnterAuraRange / OnLeaveAuraRange</td><td><code>AuraOwnership</code> + <code>UnitOwnership</code></td></tr>
|
||||
<tr><td>OnCardDiscarded</td><td><code>Cause</code> — optional cause string (e.g. "AbilityEffect")</td></tr>
|
||||
<tr><td>TriggerLimitPerTurn</td><td>Max times this trigger fires per turn (0 / blank = unlimited)</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="mb-1 text-muted fst-italic">Note: <code>Ownership</code> still filters the <em>unit being discarded</em>; <code>CausedBy</code> filters the <em>killer</em>. Use <code>Ownership: Any, CausedBy: ExactSelf</code> to react whenever this unit kills anything.</p>
|
||||
|
||||
<p class="mb-1 mt-2"><strong>Bloodlust example</strong> — "When this spirit sends another spirit to the discard, gain +1 attack":</p>
|
||||
<pre class="bg-light border rounded p-2 small mb-1">{"$type":"OnUnitSentToDiscard","UnitType":"Spirit","Ownership":"Any","CausedBy":"ExactSelf"}</pre>
|
||||
<p class="mb-1">Action: Scope <code>Battlefield</code>, Ownership <code>ExactSelf</code>, Effect <code>ModifyStat</code> — Stat <code>Damage</code>, Amt +1, Duration <code>PermanentInMatch</code> (or <code>UntilEndOfTurn</code> for temporary buff).</p>
|
||||
<p class="mb-1 mt-2"><strong>OnUnitSentToDiscard — CausedBy</strong></p>
|
||||
<p class="mb-1">Fires when a unit is sent to the discard from the battlefield (combat kill or ability effect). The optional <code>CausedBy</code> narrows by killer identity:</p>
|
||||
<table class="table table-sm table-bordered mb-2">
|
||||
<thead class="table-dark"><tr><th>CausedBy</th><th>Fires when the killer is…</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td>(empty)</td><td>Anyone — fires regardless of who caused the discard</td></tr>
|
||||
<tr><td><code>ExactSelf</code></td><td>This specific unit instance dealt the killing blow</td></tr>
|
||||
<tr><td><code>Owner</code></td><td>Any unit controlled by the same player as this unit</td></tr>
|
||||
<tr><td><code>Enemy</code></td><td>Any opponent-controlled unit</td></tr>
|
||||
<tr><td><code>Any</code></td><td>Same as empty</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="mb-1 text-muted fst-italic"><code>Ownership</code> still filters the <em>unit being discarded</em>; <code>CausedBy</code> filters the <em>killer</em>. Example: <code>Ownership=Any, CausedBy=ExactSelf</code> fires whenever this unit kills anything.</p>
|
||||
|
||||
<p class="mb-1 mt-2"><strong>Bloodlust example</strong> — "When this spirit kills another spirit, gain +1 Damage until end of turn":</p>
|
||||
<ul class="mb-1">
|
||||
<li>Trigger: <code>OnUnitSentToDiscard</code>, UnitType: Spirit, Ownership: Any, CausedBy: ExactSelf</li>
|
||||
<li>Action: Scope Battlefield, Ownership ExactSelf → Effect <code>ModifyStat</code>, Stat Damage, Amt +1, Duration UntilEndOfTurn</li>
|
||||
</ul>
|
||||
|
||||
<p class="mb-1 mt-2"><strong>OnUnitDeath vs OnUnitSentToDiscard</strong></p>
|
||||
<p class="mb-3 text-muted">Use <code>OnUnitDeath</code> to react to any unit being killed (e.g. opponent's unit dies anywhere). Use <code>OnUnitSentToDiscard</code> when you specifically want the <em>killer identity</em> via <code>CausedBy</code>, or when you need to distinguish combat-killed units from sacrificed/returned units (sacrificed units fire <code>OnSpiritSacrificed</code>, not <code>OnUnitSentToDiscard</code>).</p>
|
||||
<p class="mb-3 text-muted">Use <code>OnUnitDeath</code> to react to any unit dying anywhere. Use <code>OnUnitSentToDiscard</code> when you need the killer identity via <code>CausedBy</code>. Note: sacrificed units fire <code>OnSpiritSacrificed</code>, not <code>OnUnitSentToDiscard</code>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user