# SOR Ability System Gaps Found via Deck Conversion This document summarizes the recurring engine gaps found while converting the R1 deck audits for: - `red_shift_exodus_deck_orison_migration_covenant.md` - `eclipse_frontier_deck_lattice_witness_compact.md` - `amberthrone_fields_deck_grain_oath_concord.md` - `frosthallow_oaths_deck_white_truce_covenant.md` - `greenveil_reckoning_deck_crownseed_remembrance.md` - `sunscar_caravans_deck_sun_ledger_procession.md` - `tidecrown_intrigue_deck_open_harbors_claim.md` The current SOR ability system is already pretty capable for: - terrain-conditioned passives - straightforward actives with costs and ranges - aura entry triggers - stat buffs/debuffs - flag changes like `CanMove`, `CanAttack`, `CanBeAttacked`, `CanUseAbility` - tile affinity rewriting - push/pull displacement - random ruin activations - zone actions like draw, discard, and simple return-to-hand The repeated pressure points are not about raw complexity so much as **state memory, relational targeting, and replacement timing**. --- ## 1. Highest-value engine additions If only a few additions are made, these would unlock the most design space across all audited decks. ### 1.1 Trigger frequency caps for triggered abilities Repeated need: - “once per turn” - “the first time each turn” Examples: - Brakka / Sevra / Ilyra / Elowen / Ulla tier-1 economy triggers - aura-entry riders on multiple tier-2/tier-3 leaders and mythics - Polyphonic Sanctuary Hydra / Long Night Covenant Whale / Open Wells Colossus / Tidecrown Leviathan **Current issue:** `UsesPerTurn` exists only for Active abilities. **Recommended addition:** - `TriggerLimitPerTurn` or `UsesPerTurn` on `Triggered` abilities - optional per-source vs per-card-definition semantics **Impact:** very high. This fixes a huge class of nearly-implementable text without touching targeting or combat rules. --- ### 1.2 First-class reposition effect Repeated need: - “move a friendly unit 1 tile” - “another friendly unit may move 1 tile” - “move into or adjacent to target tile” Examples: - multiple courier/escort cards across all decks - many ArchSpirit tier-3 “target tile becomes X, then a friendly unit may move 1 tile” abilities - many Repentance and Instinct cards using emergency repositioning **Current issue:** The engine has `PushUnit`, `PullUnit`, `DisplaceUnit`, and `GrantMovementControl`, but not a clean “choose adjacent legal destination” effect. **Recommended addition:** - `RepositionUnitEffect` - destination constraints: - adjacent legal tile - adjacent to source - into / adjacent to a previously targeted tile - optional ownership/pathing restrictions **Impact:** very high. This would remove the single most common templating compromise in the audits. --- ### 1.3 Replacement / prevention timing Repeated need: - “would die instead survive at 1” - “prevent damage” - “before damage finalizes” Examples: - all tier-3 leader survival covenants - Crownseed Restorer - Night Dock Amnesty / No Blood on the Oathground style effects **Current issue:** The engine has `OnUnitDeath` and `OnDamagePrevented`, but no clean **pre-resolution replacement window**. **Recommended addition:** - new triggers like `BeforeUnitDeath`, `BeforeDamageApplied`, or `WouldTakeLethalDamage` - effects such as: - `PreventDeathEffect` - `SetHealthMinimumEffect` - `PreventNextDamageEffect` - optional sequence-scoped durations **Impact:** very high. This unlocks the decks’ most iconic “mercy / rescue / covenant” mechanics. --- ### 1.4 Destination-aware movement event data Repeated need: - “when this moves onto X” is fine if current tile check is enough - but many cards need more: “moves into X,” “enters Island,” “crosses onto Marsh,” “entering adjacent Swamp,” “moving into Island gain unblockable,” etc. Examples: - Pressure-Veil Djinn - Thawland Oathbound - Hask, Fang Against the Feud - Storm Coast Interceptor - Tidecrown Leviathan trigger rider - attack / move riders involving “from or into” terrain **Current issue:** Movement triggers do not expose previous tile, destination tile, or path-crossing info in a broadly usable condition model. **Recommended addition:** - movement event payload fields: - `SourceTile` - `DestinationTile` - `CrossedTiles` or at least destination - conditions: - `DestinationTileAffinityIs` - `PreviousTileAffinityIs` - `MovedFromOrIntoAffinity` **Impact:** high. --- ## 2. Strongly recurring secondary gaps ### 2.1 Movement-state-sensitive flag application Repeated need: - `CanBeBlocked = false while moving` - sometimes similar “only during movement” text Examples across multiple decks: - Serai tier-2 - Brakka roads package - Ulla tier-2 - Elowen tier-2 - Sevra tier-2 **Current issue:** The engine can set `CanBeBlocked`, but not condition it on “currently resolving movement.” **Recommended addition:** - movement-phase condition/state flag - or support for scoped effect windows like `DuringMovement` **Impact:** medium-high. Very common rider text. --- ### 2.2 Relational targeting / filtering beyond source adjacency Repeated need: - enemies adjacent to **Fort units** - enemies adjacent to **Steppe tiles** - unit on Fort **or adjacent to Fort** - unit adjacent to a tile with affinity X Examples: - Gate-Spire Intercessor - Sunken Tribunal Raykeeper - Samir, Grace of Shared Water - several other adjacency-to-terrain ideas **Current issue:** The engine has `IsAdjacentToSourceFilter` and some tile filters, but not richer relational filters from one arbitrary set to another. **Recommended addition:** - `IsAdjacentToUnitMatching(Filter...)` - `IsAdjacentToTileMatching(Filter...)` - `UnitOnOrAdjacentToAffinityCondition` **Impact:** high for positional deck design. --- ### 2.3 Negation / NOT conditions Repeated need: - “if that enemy is not on Fort” - inverse terrain checks **Current issue:** Conditions support `AND`, `OR`, `XOR` but no explicit `NOT`. **Recommended addition:** - `NotCondition` **Impact:** medium. Small implementation, broad templating payoff. --- ### 2.4 Modal branch support / ChooseOne execution Repeated need: - “choose one” modes - “A or B” on enter or in Instinct/Repentance cards - “instead” branches that want exclusive resolution Examples: - Shrine-Canopy Witness - Glassfire Deceiver-Advocate - Root-Memory Appeal - Return the Name variants - many Instinct cards with protection-or-move / push-or-pull / one flag or another **Current issue:** `ChooseOne` types exist in `Action.cs`, but `AbilityDefinition.Actions` is still `Action[]`, and `AbilitySystem.ExecuteActions` only processes `Action[]`. **Recommended addition:** - lift `Actions` to support `Action | ChooseOne` nodes - add resolver path and client choice plumbing **Impact:** high for card variety and cleaner templating. --- ### 2.5 End-of-sequence / action-window duration Repeated need: - “until end of sequence” - “this action” prevention - interrupt-window-only safety effects Examples: - many Instinct cards - action-window damage prevention cards **Current issue:** Current durations include `UntilEndOfTurn`, `UntilStartOfOwnerTurn`, `ForNTurns`, etc., but not a stack/sequence lifetime. **Recommended addition:** - `UntilEndOfSequence` - possibly `UntilCurrentActionResolves` **Impact:** medium-high for reactive card design. --- ## 3. Niche but still valuable additions ### 3.1 Named-card / card-ref presence conditions Needed for text like: - “if Brakka is in play” **Recommended addition:** - battlefield condition by definition ID / ability source card name / card ref ### 3.2 Player tile-control conditions Needed for text like: - “if you control a Swamp tile” **Recommended addition:** - `ControlledTileCountWithAffinityCondition` - or general tile-count query conditions ### 3.3 Reveal-result references Needed for text like: - “reveal top card; if it is Repentance or Instinct, draw it” **Recommended addition:** - revealed card references in action context - card-type conditions on revealed cards ### 3.4 Source-qualified damage triggers Needed for text like: - “enemies damaged by this” **Recommended addition:** - `OnDamageDealt` filtering by exact source instance or source filter ### 3.5 Tile-bound delayed markers Needed for text like: - “mark target tile; the next friendly unit to move onto it gains X” **Recommended addition:** - deferred effects anchored to tile coordinates with one-shot consumption --- ## 4. What the current system already does well These deck passes also confirm that the current engine is already strong in a lot of useful ways. ### 4.1 Terrain-conditioned passives Using: - `IsOnTileWithAffinityCondition` - passive actions - `WhileSourceOnBattlefield` tracking This supports a lot of deck identity already. ### 4.2 Basic tempo control Very common card text already works: - lose `CanMove` - lose `CanAttack` - lose `CanUseAbility` - gain `CanBeAttacked = false` - gain/lose stats until end of turn ### 4.3 Aura entry triggers `OnEnterAuraRange` is genuinely useful and already enables a lot of “escort / witness / support” gameplay. ### 4.4 Random ruin activations The ruin execution model is a great fit for “choose one at random from three triggered abilities.” ### 4.5 Core zone actions Draw, discard, simple return-to-hand, and some discard recursion already cover a lot of deck glue. --- ## 5. Recommended implementation order If the goal is to improve deck conversion throughput quickly, this is the order I would implement. ### Phase 1: highest deck-conversion payoff 1. Trigger frequency caps on triggered abilities 2. First-class `RepositionUnitEffect` 3. Replacement/prevention timing (`BeforeUnitDeath`, damage prevention) 4. Destination-aware movement event payload / conditions ### Phase 2: make card text cleaner and less compromised 5. `NotCondition` 6. Relational adjacency filters (`adjacent to unit matching`, `adjacent to tile matching`) 7. Movement-state-sensitive flag windows 8. `UntilEndOfSequence` ### Phase 3: expand expressive card design 9. Full `ChooseOne` / modal branch execution 10. Source-qualified damage triggers 11. Player tile-control conditions 12. Reveal-result references 13. Tile-bound delayed markers --- ## 6. Bottom line The R1 audits show that the current SOR ability system is **already good enough for a large percentage of these decks**. Most failures are not because the decks are wildly overdesigned. They fail in a few repeated categories: - **once-per-turn trigger control** - **real reposition instead of push/pull approximations** - **death/damage prevention timing** - **movement destination/state memory** - **relational targeting around terrain or other units** That is good news. It means the next tranche of engine work should not be a giant rewrite. A focused set of additions would convert a lot of currently “templating choice” or “not cleanly implementable” text into fully native card designs.