feat: update
This commit is contained in:
@@ -143,9 +143,9 @@ func simple_move_to(grid_position: Vector2i) -> bool:
|
||||
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"):
|
||||
# Check for Tekton interaction (Charged Strike Mode)
|
||||
# If moving into a Tekton's space while Charged, trigger knock
|
||||
if player.get("is_charged_strike"):
|
||||
# Find Tekton at grid_position
|
||||
var tektons = player.get_tree().get_nodes_in_group("Tektons")
|
||||
for t in tektons:
|
||||
@@ -154,12 +154,19 @@ 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 moving into a sticky cell, trigger trap (unless cleanser active)
|
||||
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)
|
||||
var pid = player.get("peer_id") if "peer_id" in player else -1
|
||||
if pid != -1 and gm.is_cleanser_active(pid):
|
||||
# Cleanser immunity: clear sticky cell, use one cell, don't trap
|
||||
gm.clear_sticky_cell(grid_position)
|
||||
gm.use_cleanser_cell(pid)
|
||||
print("[Move] Cleanser cleared sticky cell at %s (%d cells left)" % [grid_position, gm.cleanser_cells_left.get(pid, 0)])
|
||||
else:
|
||||
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)
|
||||
|
||||
@@ -212,9 +219,9 @@ func try_push(target_pos: Vector2i, direction: Vector2i) -> bool:
|
||||
var att_pid = player.get("peer_id") if "peer_id" in player else player.name.to_int()
|
||||
has_smack = gm_for_smack.has_smack_charged(att_pid)
|
||||
|
||||
if (not player.get("is_attack_mode") and not has_smack) or player.get("is_invisible"):
|
||||
if (not player.get("is_charged_strike") and not has_smack) or player.get("is_invisible"):
|
||||
# Standard bumping effect (Visual only)
|
||||
print("[Move] Push blocked: Not in attack mode or is Ghost (%s trying to push %s)" % [player.name, other_player.name])
|
||||
print("[Move] Push blocked: Not charged or is Ghost (%s trying to push %s)" % [player.name, other_player.name])
|
||||
if _can_rpc():
|
||||
player.rpc("sync_bump", target_pos, true) # Soft bump
|
||||
elif player.has_method("sync_bump"):
|
||||
@@ -334,9 +341,16 @@ func try_push(target_pos: Vector2i, direction: Vector2i) -> bool:
|
||||
if main_sticky and main_sticky.get("gauntlet_manager"):
|
||||
var gm_sticky = main_sticky.gauntlet_manager
|
||||
if gm_sticky.is_active and gm_sticky.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_sticky._trap_player(other_player)
|
||||
var push_pid = other_player.get("peer_id") if "peer_id" in other_player else -1
|
||||
if push_pid != -1 and gm_sticky.is_cleanser_active(push_pid):
|
||||
# Cleanser immunity: clear sticky cell, use one cell
|
||||
gm_sticky.clear_sticky_cell(pushed_to_pos)
|
||||
gm_sticky.use_cleanser_cell(push_pid)
|
||||
print("[Move] Cleanser cleared push-into-sticky at %s" % pushed_to_pos)
|
||||
else:
|
||||
print("[Move] Player pushed into sticky cell at %s" % pushed_to_pos)
|
||||
if multiplayer.is_server() or other_player.is_multiplayer_authority():
|
||||
gm_sticky._trap_player(other_player)
|
||||
|
||||
# 2. Apply freeze/stun effect
|
||||
var stun_duration = 1.0 if (gm_push and gm_push.is_active) else 1.5
|
||||
|
||||
Reference in New Issue
Block a user