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:
@@ -71,6 +71,14 @@ public sealed class Action
|
||||
public Condition[]? Conditions { get; set; }
|
||||
public Effect[] Effects { get; set; } = [];
|
||||
public DurationModel? Duration { get; set; }
|
||||
/// <summary>
|
||||
/// When non-null this Action is a branch selector — <see cref="Effects"/> are ignored.
|
||||
/// The controlling player picks one <see cref="Branch"/>; its <see cref="Branch.Actions"/>
|
||||
/// execute instead. Set <see cref="AbilityTarget.BranchIndex"/> in the client payload
|
||||
/// to indicate which branch was chosen (0-based; defaults to 0 if absent).
|
||||
/// Branch sub-actions are auto-resolved (no nested client targeting required).
|
||||
/// </summary>
|
||||
public ChooseOne? ChooseOne { get; set; }
|
||||
}
|
||||
|
||||
// ── ChooseOne ─────────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user