From afb083093ae530144bf3b521d3d8b7460ef1f3c8 Mon Sep 17 00:00:00 2001 From: dingo Date: Mon, 23 Mar 2026 14:23:30 -0400 Subject: [PATCH] Hill Training: ExactSelf trigger + TileAffinityMatches FieldCard fix - AbilitySystem: add TileAffinityMatchesCondition case for FieldCard subject so activation conditions check the tile the unit is currently standing on (previously only handled Coord subjects; triggered abilities pass FieldCard) - AbilityBuilder: add "ExactSelf" to OwnershipValues dropdown for trigger events so designers can restrict triggers to only this specific unit instance - AbilityBuilder help section: add Trigger Ownership table documenting all ownership values including ExactSelf with clear explanation of instance-level scope Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude Co-Authored-By: Happy --- .../Components/Pages/Cards/AbilityBuilder.razor | 13 ++++++++++++- Server/src/SOR.Game/Abilities/AbilitySystem.cs | 6 ++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Server/src/SOR.Admin/Components/Pages/Cards/AbilityBuilder.razor b/Server/src/SOR.Admin/Components/Pages/Cards/AbilityBuilder.razor index 94d38e8..c256655 100644 --- a/Server/src/SOR.Admin/Components/Pages/Cards/AbilityBuilder.razor +++ b/Server/src/SOR.Admin/Components/Pages/Cards/AbilityBuilder.razor @@ -873,6 +873,17 @@ @foreach (var t in TriggerTypesList) {
  • @t
  • } +

    Trigger Ownership controls whose actions fire the trigger:

    + + + + + + + + + +
    ValueMeaning
    AnyAny unit's action fires the trigger
    OwnerAny unit owned by the same player fires the trigger
    AllyAlias for Owner (same-player units)
    EnemyOnly opponent units fire the trigger
    ExactSelfOnly this specific unit instance fires the trigger — use this to react to your own movement/actions, not teammates'
    @@ -1008,7 +1019,7 @@ private static readonly string[] StatValues = ["Damage", "Defense", "Health", "MP"]; private static readonly string[] PositionValues = ["Top", "Bottom"]; private static readonly string[] PlayerValues = ["Owner", "Opponent", "Both", "Any"]; - private static readonly string[] OwnershipValues = ["Any", "Owner", "Ally", "Enemy"]; + private static readonly string[] OwnershipValues = ["Any", "Owner", "Ally", "Enemy", "ExactSelf"]; private static readonly string[] UnitTypeValues = ["Unit", "Spirit", "ArchSpirit", "SpiritToken"]; private static readonly string[] TriggerCardTypeValues = ["Spirit", "ArchSpirit", "Ruin", "Repentance", "Instinct", "Terramorpha"]; private static readonly string[] TriggerDamageTypeValues= ["Any", "HP", "Defense"]; diff --git a/Server/src/SOR.Game/Abilities/AbilitySystem.cs b/Server/src/SOR.Game/Abilities/AbilitySystem.cs index 6fb99b9..bbdc8df 100644 --- a/Server/src/SOR.Game/Abilities/AbilitySystem.cs +++ b/Server/src/SOR.Game/Abilities/AbilitySystem.cs @@ -1626,6 +1626,12 @@ public static class AbilitySystem return tile is not null && AffinitySystem.Resolve(tile.Base1, tile.Base2) == tamc.Affinity; } + case TileAffinityMatchesCondition tamc when subject is FieldCard fc && fc.Position.HasValue: + { + var tile = ctx.State.Board?.GetTile(fc.Position.Value); + return tile is not null + && AffinitySystem.Resolve(tile.Base1, tile.Base2) == tamc.Affinity; + } default: return true;