diff --git a/Server/src/SOR.Admin/Components/Pages/Cards/AbilityBuilder.razor b/Server/src/SOR.Admin/Components/Pages/Cards/AbilityBuilder.razor
index 4b03178..e15c8b7 100644
--- a/Server/src/SOR.Admin/Components/Pages/Cards/AbilityBuilder.razor
+++ b/Server/src/SOR.Admin/Components/Pages/Cards/AbilityBuilder.razor
@@ -1,5 +1,10 @@
@* AbilityBuilder.razor — structured UI for AbilityDefinition[] / Action[] JSON *@
@using Microsoft.AspNetCore.Components.Rendering
+@using Microsoft.EntityFrameworkCore
+@using SOR.Database.Contexts
+@using SOR.Database.Entities.Catalog
+@using SOR.Database.Enums
+@inject CatalogDbContext CatalogDb
@if (_abilities.Count == 0)
@@ -321,10 +326,13 @@
-
-
- @RenderEffectFields(effect, actionIdx, ab.TypeStr == "Triggered")
-
+ @if (effect.TypeKey != "SummonToken")
+ {
+
+
+ @RenderEffectFields(effect, actionIdx, ab.TypeStr == "Triggered")
+
+ }
@@ -335,6 +343,240 @@
+
+ @* ── SummonToken inline editor ── *@
+ @if (effect.TypeKey == "SummonToken")
+ {
+ var eff2 = effect;
+
+
+
+
Token source:
+
+
+
+
+
+
+ @if (eff2.TokenMode == "ExistingCard")
+ {
+
+
+
+
+
SetTokenSearch(eff2, e.Value?.ToString() ?? string.Empty)"
+ @onfocus="() => ShowTokenDropdown(eff2)"
+ @onblur="() => HideTokenDropdownAsync(eff2)" />
+ @if (eff2.TokenShowDropdown)
+ {
+ var filtered = _spiritCards.Where(c =>
+ string.IsNullOrEmpty(eff2.TokenExistingSearch) ||
+ c.Name.Contains(eff2.TokenExistingSearch, StringComparison.OrdinalIgnoreCase)).ToList();
+ @if (filtered.Count > 0)
+ {
+
+ @foreach (var sc in filtered)
+ {
+ var sc2 = sc;
+
+ }
+
+ }
+ }
+
+ @if (eff2.TokenExistingId.HasValue)
+ {
+
+
+ @eff2.TokenName
+
+
+
+ }
+
+
Stats below are loaded from the selected card. You may tweak them after loading.
+ }
+
+
+
+
+
+ SetTokenName(eff2, e.Value?.ToString() ?? string.Empty)" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SetTokenMinRange(eff2, e.Value?.ToString())" />
+
+
+
+ SetTokenMaxRange(eff2, e.Value?.ToString())" />
+
+
+
+ SetTokenBool(eff2, "RequiresLos", e)' />
+
+
+
+
+
+
+
+
+ SetTokenBool(eff2, "CanMove", e)' />
+
+
+
+ SetTokenBool(eff2, "CanAttack", e)' />
+
+
+
+ SetTokenBool(eff2, "CanDefend", e)' />
+
+
+
+ SetTokenBool(eff2, "CanBeAttacked", e)' />
+
+
+
+ SetTokenBool(eff2, "CanBeBlocked", e)' />
+
+
+
+ SetTokenBool(eff2, "CanBeObstructed", e)' />
+
+
+
+ SetTokenBool(eff2, "CanUseAbility", e)' />
+
+
+
+ SetTokenBool(eff2, "CanBeSacrificed", e)' />
+
+
+
+
+
+
+
+
+ SetTokenGenus(eff2, e.Value?.ToString() ?? string.Empty)" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Set Action Target type to Tile. Non-Void tokens only place on affinity-matching tiles.
+
+
+ }
}
@@ -647,6 +889,104 @@
private bool _showRaw;
private bool _showHelp;
+ // ── Spirit card list for "Existing Card" token mode ───────────────────────
+
+ private sealed record SpiritCardEntry(Guid Id, string Name, string Affinity,
+ int? MaxHealth, int? MaxDefense, int? Damage, int? MovementPoints, string MovementType,
+ int? MinAttackRange, int? MaxAttackRange, bool RequiresLos,
+ bool CanMove, bool CanAttack, bool CanDefend,
+ bool CanBeAttacked, bool CanBeBlocked, bool CanBeObstructed,
+ bool CanUseAbility, bool CanBeSacrificed,
+ string? AbilitiesJson);
+
+ private List