update
This commit is contained in:
@@ -47,7 +47,6 @@ func _process(delta):
|
||||
movement_manager.simple_move_to(target_position)
|
||||
|
||||
|
||||
|
||||
# Targeting Mode Preview
|
||||
var main = player.get_node_or_null("/root/Main")
|
||||
if main and main.ui_manager and main.ui_manager.current_action_state == main.ui_manager.ActionState.TARGETING:
|
||||
@@ -69,7 +68,7 @@ func _process(delta):
|
||||
|
||||
# Choose highlight color/mesh based on skill
|
||||
# User Request: Use default hover item (1)
|
||||
var highlight_id = 1
|
||||
var highlight_id = 1
|
||||
|
||||
player.highlight_cells_if_authorized(area, highlight_id)
|
||||
|
||||
@@ -104,7 +103,7 @@ func handle_unhandled_input(event):
|
||||
if player.powerup_manager:
|
||||
# Attack Mode (formerly Special)
|
||||
player.powerup_manager.use_special_effect()
|
||||
KEY_E:
|
||||
KEY_E:
|
||||
if player.powerup_manager:
|
||||
# Spawn Boost
|
||||
if player.powerup_manager.has_method("spawn_boost_reward"):
|
||||
@@ -112,6 +111,13 @@ func handle_unhandled_input(event):
|
||||
else:
|
||||
# Fallback if method missing
|
||||
player.powerup_manager.use_special_effect()
|
||||
KEY_G:
|
||||
if player.is_carrying_tekton:
|
||||
player.throw_tekton()
|
||||
else:
|
||||
player.grab_tekton()
|
||||
KEY_B:
|
||||
player.knock_tekton()
|
||||
|
||||
# Handle spawn point selection if not yet selected
|
||||
|
||||
|
||||
@@ -7,15 +7,15 @@ const HOLO_TILES = [11, 12, 13, 14]
|
||||
|
||||
enum SpecialEffect {
|
||||
FASTER_SPEED, # ID 11
|
||||
AREA_FREEZE, # ID 12
|
||||
BLOCK_FLOOR, # ID 13
|
||||
AREA_FREEZE, # ID 12
|
||||
BLOCK_FLOOR, # ID 13
|
||||
INVISIBLE_MODE # ID 14
|
||||
}
|
||||
|
||||
# Levels & Cooldowns
|
||||
var powerup_levels: Dictionary = {} # EffectEnum -> int (1 to 8)
|
||||
var powerup_levels: Dictionary = {} # EffectEnum -> int (1 to 8)
|
||||
var powerup_cooldowns: Dictionary = {} # EffectEnum -> float (Time Remaining)
|
||||
var active_buffs: Dictionary = {} # EffectEnum -> float (Duration Running)
|
||||
var active_buffs: Dictionary = {} # EffectEnum -> float (Duration Running)
|
||||
|
||||
# Cooldown Constants (Level 1 / Level 8)
|
||||
const COOLDOWN_L1 = 15.0
|
||||
@@ -203,6 +203,11 @@ func activate_effect(effect: int, target_player: Node3D = null):
|
||||
if powerup_cooldowns.get(effect, 0.0) > 0:
|
||||
print("PowerUp %s on cooldown." % SpecialEffect.keys()[effect])
|
||||
return
|
||||
|
||||
# Check Carrying Restriction
|
||||
if player.get("is_carrying_tekton") and effect != SpecialEffect.FASTER_SPEED:
|
||||
NotificationManager.send_message(player, "Cannot use this power while carrying a Tekton!", NotificationManager.MessageType.WARNING)
|
||||
return
|
||||
|
||||
# Calculate Cooldown based on Level
|
||||
var level = powerup_levels.get(effect, 1)
|
||||
@@ -241,7 +246,7 @@ func activate_effect(effect: int, target_player: Node3D = null):
|
||||
NotificationManager.send_message(player, msg, NotificationManager.MessageType.NORMAL)
|
||||
# Do NOT set cooldown yet. Cooldown sets on execution.
|
||||
# Revert the cooldown set above (hacky but handles the split flow)
|
||||
powerup_cooldowns[effect] = 0.0
|
||||
powerup_cooldowns[effect] = 0.0
|
||||
emit_signal("cooldown_updated", effect, 0.0, 0.0)
|
||||
print("[SpecialTiles] Entered Targeting Mode for %s" % SpecialEffect.keys()[effect])
|
||||
return # Exit, wait for input
|
||||
@@ -406,7 +411,6 @@ func _execute_invisible_mode(target: Node3D):
|
||||
NotificationManager.send_message(target, "Invisible Mode!", NotificationManager.MessageType.POWERUP)
|
||||
|
||||
|
||||
|
||||
# =============================================================================
|
||||
# Helper: Spawn Powerups (For Super Push)
|
||||
# =============================================================================
|
||||
@@ -460,7 +464,7 @@ func _update_freeze_zones(delta: float):
|
||||
if dx <= zone.radius and dy <= zone.radius:
|
||||
# Apply slow effect repeatedly
|
||||
# We use a short duration so it expires quickly if they leave
|
||||
p.rpc("apply_slow_effect", 0.5)
|
||||
p.rpc("apply_slow_effect", 0.5)
|
||||
|
||||
if zone.timer <= 0:
|
||||
zones_to_remove.append(i)
|
||||
|
||||
Reference in New Issue
Block a user