extends ProjectileBase

var fireball_aoe = false
var explosion_scene = preload("res://scenes/explosion.tscn")
@onready var perk_effects = get_node("/root/Game/PerkEffects")# Called when the node enters the scene tree for the first time.
func _on_body_entered(body: Node2D) -> void:
	fireball_aoe = perk_effects.fireball_aoe_enabled
	if body.is_in_group("enemies"):
		body.hit()
		if fireball_aoe:
			var boom = explosion_scene.instantiate()
			boom.global_position = global_position
			get_parent().call_deferred("add_child", boom)
		queue_free()
		
