Feat: ability activation UI with targeting flow

- Ability panel now starts a per-action targeting flow instead of
  immediately firing the ability
- Board abilities: blue tile highlights for unit/tile targets; click
  to collect AbilityTarget and advance to the next action
- Player/zone abilities: left-side player panel with player name
  buttons; zone (Hand/Deck/Discard) sub-buttons appear for zone-scoped
  abilities
- Re-clicking a selected spirit toggles the ability panel open/closed
- Auto-skips actions whose ownership is Self/ExactSelf/Random or whose
  count.all = true (server resolves those without player input)
- Game.send_activate_ability now accepts an optional targets array

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:22:02 -04:00
co-authored by Claude Happy
parent 696452f4c9
commit 9e400c87b4
2 changed files with 253 additions and 28 deletions
+7 -3
View File
@@ -204,11 +204,15 @@ func send_transition(incoming_card_instance_id: String) -> void:
{ "incomingCardInstanceId": incoming_card_instance_id })
func send_activate_ability(source_id: String, ability_index: int) -> void:
_game_request("game.activate_ability", {
func send_activate_ability(source_id: String, ability_index: int,
targets: Array = []) -> void:
var payload := {
"sourceInstanceId": source_id,
"abilityIndex": ability_index
})
}
if not targets.is_empty():
payload["targets"] = targets
_game_request("game.activate_ability", payload)
# ── Private ───────────────────────────────────────────────────────────────────