feat: implement Candy Cannon mechanics, CI/CD pipelines, and version 2.3.7 updates
This commit is contained in:
@@ -131,6 +131,18 @@ func simple_move_to(grid_position: Vector2i) -> bool:
|
||||
if not try_push(grid_position, push_dir):
|
||||
return false
|
||||
|
||||
var gm = null
|
||||
var main = player.get_tree().root.get_node_or_null("Main")
|
||||
if main and main.get("gauntlet_manager"):
|
||||
gm = main.gauntlet_manager
|
||||
|
||||
# Check if currently trapped
|
||||
if gm and gm.is_active:
|
||||
var pid = player.get("peer_id") if "peer_id" in player else -1
|
||||
if pid != -1 and gm.trapped_players.has(pid):
|
||||
print("[Move] Failed: Player is trapped in a sticky cell")
|
||||
return false
|
||||
|
||||
# Check for Tekton interaction (Knock Mode)
|
||||
# If moving into a Tekton's space while in Knock Mode, trigger knock
|
||||
if player.get("is_knock_mode"):
|
||||
@@ -142,6 +154,12 @@ func simple_move_to(grid_position: Vector2i) -> bool:
|
||||
player.knock_tekton()
|
||||
return false # Don't move into the tile, just knock
|
||||
|
||||
# If moving into a sticky cell, trigger trap
|
||||
if gm and gm.is_active and gm.is_sticky_cell(grid_position):
|
||||
print("[Move] Player stepping into sticky cell at %s" % grid_position)
|
||||
movement_queue.clear()
|
||||
if player.is_multiplayer_authority() or multiplayer.is_server():
|
||||
gm._trap_player(player)
|
||||
|
||||
rotate_towards_target(grid_position)
|
||||
|
||||
@@ -249,6 +267,15 @@ func try_push(target_pos: Vector2i, direction: Vector2i) -> bool:
|
||||
|
||||
other_player.target_position = pushed_to_pos # Logical update
|
||||
|
||||
# Check if landing spot is sticky
|
||||
var main = player.get_tree().root.get_node_or_null("Main")
|
||||
if main and main.get("gauntlet_manager"):
|
||||
var gm = main.gauntlet_manager
|
||||
if gm.is_active and gm.is_sticky_cell(pushed_to_pos):
|
||||
print("[Move] Player pushed into sticky cell at %s" % pushed_to_pos)
|
||||
if multiplayer.is_server() or other_player.is_multiplayer_authority():
|
||||
gm._trap_player(other_player)
|
||||
|
||||
# 2. Apply freeze/stun effect (blue tint)
|
||||
if _can_rpc():
|
||||
other_player.rpc("apply_stagger", 1.5)
|
||||
|
||||
Reference in New Issue
Block a user