SummonToken: structured admin editor + affinity enforcement + art URLs
- AbilityBuilder.razor: replace raw JSON textarea with full structured
editor for SummonToken effects. Supports two modes:
• Existing Card — searchable autocomplete from Spirit card catalog
• Custom Token — inline editor for all Spirit stats (name, affinity,
health/defense/damage, movement type/MP, attack range, LOS, all
permission flags, genus tags, abilities JSON, 2D art URL, 3D model URL)
Compiles TileFilter[TileAffinityMatchesFilter] when affinity is non-Void,
enabling client-side tile highlighting to match server enforcement.
- AbilitySystem.cs (SummonTokenEffect): validate that the target tile's
affinity is compatible with the token's affinity before placing.
- GameState.cs (CardInstance): add Art2dUrl + ModelUrl so summoned tokens
can carry visual asset references through the game state.
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:
@@ -214,6 +214,13 @@ public class CardInstance
|
||||
/// </summary>
|
||||
public Dictionary<int, int>? AbilityUsesThisTurn { get; set; }
|
||||
|
||||
// ── Visual assets (used primarily for SpiritToken rendering) ─────────────
|
||||
|
||||
/// <summary>URL of the 2-D card art image (used by client for token display).</summary>
|
||||
public string? Art2dUrl { get; set; }
|
||||
/// <summary>URL of the 3-D model GLTF/GLB (used by client for token rendering).</summary>
|
||||
public string? ModelUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Genus tags on this unit (e.g. "Beast", "Plant"). May be modified by abilities.
|
||||
/// Null until at least one genus tag is added.
|
||||
|
||||
Reference in New Issue
Block a user