extends "res://scripts/Tower.gd"
## Tower Defense — Lecture 27 (Starter)
##
## Projectile tower that spawns bullets to track and hit enemies.
## More expensive but longer range.

# ============================================================
# CONSTANTS
# ============================================================

var projectile_scene := preload("res://scenes/projectile.tscn")

func _ready() -> void:
	tower_cost = 150
	tower_damage = 10
	tower_range = 12.0
	attack_cooldown = 1.5
	
	super._ready()


# ============================================================
# ATTACK
# ============================================================

func _perform_attack() -> void:
	# === TODO 1: Spawn and configure projectile ===
	# Check if current_target exists (return if not)
	# Instantiate projectile from projectile_scene
	# Add projectile to get_tree().root
	# Set projectile.global_position to tower position + Vector3.UP * 1.0
	# Set projectile.target to current_target
	# Set projectile.damage to tower_damage
	pass
