Fix ability targeting gaps: multi-target, UpTo, ChooseOne, LinearOnly, RequiresLos

- AbilityTarget: add BranchIndex for ChooseOne branch selection
- Action: add ChooseOne? property; when set the action is a branch selector
- AbilitySystem: ExecuteSingleAction handles ChooseOne — reads BranchIndex
  from client targets, executes chosen branch actions (auto-resolved)
- game_screen.gd: count.N > 1 — input handler now accumulates targets until
  N collected before advancing to next action
- game_screen.gd: count.UpTo — show "Done Selecting" confirm button so player
  can finish with fewer than N targets
- game_screen.gd: ChooseOne — detect chooseone key in action dict, show branch
  panel with labelled buttons, record branchIndex in target payload
- game_screen.gd: LinearOnly — _is_linear() filter applied to both tile and
  unit highlights when ability range has linearonly=true
- game_screen.gd: RequiresLos — _client_has_los() supercover DDA (matches
  server LineOfSight.HasLos) applied to highlights when requireslos=true

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-28 16:27:47 -04:00
co-authored by Claude Happy
parent bd59904ce2
commit 2e3e284023
4 changed files with 190 additions and 15 deletions
+4 -2
View File
@@ -748,6 +748,8 @@ public sealed record AbilityTarget(
/// <summary>0-based index of the ability action this target satisfies.</summary>
int ActionIndex,
/// <summary>Set for unit/card targets.</summary>
string? InstanceId = null,
string? InstanceId = null,
/// <summary>Set for tile targets.</summary>
CoordDto? Coord = null);
CoordDto? Coord = null,
/// <summary>Set for ChooseOne actions: the 0-based index of the chosen branch.</summary>
int? BranchIndex = null);