Fix: include ArchSpirit in Battlefield ability target candidates

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 <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
dingo
2026-03-09 22:58:28 -04:00
co-authored by Claude Happy
parent df9140ed2c
commit da6899b2c7
@@ -467,13 +467,17 @@ public static class AbilitySystem
var p = state.Players[ownerId]; var p = state.Players[ownerId];
switch (selector.Scope) switch (selector.Scope)
{ {
case TargetScope.Battlefield: all.AddRange(p.Field); break; case TargetScope.Battlefield:
case TargetScope.Hand: all.AddRange(p.Hand); break; all.AddRange(p.Field);
case TargetScope.Deck: all.AddRange(p.Deck); break; if (p.ArchSpirit is not null) all.Add(p.ArchSpirit);
case TargetScope.Discard: all.AddRange(p.Discard); break; 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: case TargetScope.AnyZone:
all.AddRange(p.Hand); all.AddRange(p.Deck); all.AddRange(p.Hand); all.AddRange(p.Deck);
all.AddRange(p.Field); all.AddRange(p.Discard); all.AddRange(p.Field); all.AddRange(p.Discard);
if (p.ArchSpirit is not null) all.Add(p.ArchSpirit);
break; break;
} }
} }