Add generic active-ability placeholder VFX (game.visual.ability_placeholder)
Server: - Add AbilityPlaceholderVisualPush DTO (sourceInstanceId, abilityName, sourceAffinity, targets, targetMode: Self|Unit|Tile|PlayerZone|None) - Promote ComputeVisualTargets to GameHandlerBase (protected static) - Add ComputeAbilityVisualTargets — extends Repentance logic with Self/ExactSelf + All-count detection, falls back to enemy ArchSpirit - Add ComputeAbilityTargetMode — derives mode from visual targets + sourceInstanceId (PlayerZone when target is a player account ID) - Add FindSourceUnit helper — searches Field + ArchSpirit across all players - GameActivateAbilityHandler captures source unit + ability def before ActivateAbility, skips push when Animation.AssetUrl is set Client: - Add ability_placeholder_visual signal and push router case in Game.gd - New AbilityPlaceholderFx component: Self/None → radial glow burst + two expanding rings on source; Unit/Tile/PlayerZone → orb projectile from source unit body to resolved target, impact ring + burst motes on arrival - Wire component in game_screen.gd (_ready, _exit_tree, handler) 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:
@@ -48,6 +48,7 @@ var _sel_ctrl : SelectionController = null
|
||||
var _abt : AbilityTargeting = null
|
||||
var _prompt_handler: ServerPromptHandler = null
|
||||
var _repentance_fx : RepentancePlaceholderFx = null
|
||||
var _ability_fx : AbilityPlaceholderFx = null
|
||||
|
||||
# ── @onready node refs ────────────────────────────────────────────────────────
|
||||
|
||||
@@ -241,6 +242,13 @@ func _ready() -> void:
|
||||
_repentance_fx.units_root = _units_root
|
||||
add_child(_repentance_fx)
|
||||
|
||||
# AbilityPlaceholderFx
|
||||
_ability_fx = AbilityPlaceholderFx.new()
|
||||
_ability_fx.pathfinder = _pathfinder
|
||||
_ability_fx.unit_bodies = _mesh_builder.unit_bodies
|
||||
_ability_fx.units_root = _units_root
|
||||
add_child(_ability_fx)
|
||||
|
||||
# BoardInputHandler
|
||||
_input_handler = BoardInputHandler.new()
|
||||
_input_handler.hold_timer = _hold_timer
|
||||
@@ -310,6 +318,7 @@ func _ready() -> void:
|
||||
Game.player_pick_request.connect(_prompt_handler.on_player_pick_request)
|
||||
Game.reveal_choice_pick_request.connect(_prompt_handler.on_reveal_choice_pick_request)
|
||||
Game.repentance_placeholder_visual.connect(_on_repentance_placeholder_visual)
|
||||
Game.ability_placeholder_visual.connect(_on_ability_placeholder_visual)
|
||||
|
||||
# ── 6. Camera, skybox, hover, chat ───────────────────────────────────────
|
||||
_cam_ctrl.sync_cam_ctrl_panel()
|
||||
@@ -384,6 +393,8 @@ func _exit_tree() -> void:
|
||||
Game.reveal_choice_pick_request.disconnect(_prompt_handler.on_reveal_choice_pick_request)
|
||||
if Game.repentance_placeholder_visual.is_connected(_on_repentance_placeholder_visual):
|
||||
Game.repentance_placeholder_visual.disconnect(_on_repentance_placeholder_visual)
|
||||
if Game.ability_placeholder_visual.is_connected(_on_ability_placeholder_visual):
|
||||
Game.ability_placeholder_visual.disconnect(_on_ability_placeholder_visual)
|
||||
_skybox.clear_stars()
|
||||
_reset_unit_hover_glow()
|
||||
Chat.set_bubble_host(null)
|
||||
@@ -1133,6 +1144,11 @@ func _on_repentance_placeholder_visual(payload: Dictionary) -> void:
|
||||
_repentance_fx.play(payload)
|
||||
|
||||
|
||||
func _on_ability_placeholder_visual(payload: Dictionary) -> void:
|
||||
if _ability_fx != null:
|
||||
_ability_fx.play(payload)
|
||||
|
||||
|
||||
func _place_highlight_quad(quad: MeshInstance3D, x: int, y: int,
|
||||
col: Color, texture: Texture2D = null) -> void:
|
||||
var tile_top: float = _board_ctrl.tile_visual_tops.get(
|
||||
|
||||
Reference in New Issue
Block a user