From da6899b2c72a0e412b651d0a1a14cf85929d1f3d Mon Sep 17 00:00:00 2001 From: dingo Date: Mon, 9 Mar 2026 22:58:28 -0400 Subject: [PATCH] Fix: include ArchSpirit in Battlefield ability target candidates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BuildCandidates only added p.Field to the candidate pool for Scope=Battlefield, leaving p.ArchSpirit (stored as a separate PlayerState property) out. A Unit-typed ability targeting the opponent's ArchSpirit would match zero candidates → INSUFFICIENT_TARGETS. Also include p.ArchSpirit in the AnyZone pool for consistency. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude Co-Authored-By: Happy --- Server/src/SOR.Game/Abilities/AbilitySystem.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Server/src/SOR.Game/Abilities/AbilitySystem.cs b/Server/src/SOR.Game/Abilities/AbilitySystem.cs index 516439d..4e08077 100644 --- a/Server/src/SOR.Game/Abilities/AbilitySystem.cs +++ b/Server/src/SOR.Game/Abilities/AbilitySystem.cs @@ -467,13 +467,17 @@ public static class AbilitySystem var p = state.Players[ownerId]; switch (selector.Scope) { - case TargetScope.Battlefield: all.AddRange(p.Field); break; - case TargetScope.Hand: all.AddRange(p.Hand); break; - case TargetScope.Deck: all.AddRange(p.Deck); break; - case TargetScope.Discard: all.AddRange(p.Discard); break; + case TargetScope.Battlefield: + all.AddRange(p.Field); + if (p.ArchSpirit is not null) all.Add(p.ArchSpirit); + break; + case TargetScope.Hand: all.AddRange(p.Hand); break; + case TargetScope.Deck: all.AddRange(p.Deck); break; + case TargetScope.Discard: all.AddRange(p.Discard); break; case TargetScope.AnyZone: all.AddRange(p.Hand); all.AddRange(p.Deck); all.AddRange(p.Field); all.AddRange(p.Discard); + if (p.ArchSpirit is not null) all.Add(p.ArchSpirit); break; } }