class_name UnlimitedPower extends Modifier

@export var fire_rate_bonus: float = 1.0 # +1 shot per second
@export var ranged_damage: float = 99.5

func _init():
	id = "unlimited_power"
	display_name = "Unlimited Power"
	description = "Shoot lightning bolts. Fire rate + %0.1f. Ranged damage + %0.1f" % [fire_rate_bonus, ranged_damage]
	modifier_type = ModifierType.ADDITIVE

func apply_stats_modification(stats: StatsComponent) -> void:
	stats.update_stat("ranged.attack_rate", stats.get_stat("ranged.attack_rate") + fire_rate_bonus)
	stats.update_stat("ranged.damage", stats.get_stat("ranged.damage") + ranged_damage)

func set_projectile_scene(weapon: RangedWeaponComponent) -> void:
	weapon.projectile_scene = preload("res://assets/projectiles/projectile_lightning.tscn")
