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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user