extends Item

#const DAMAGE_EFFECT = preload("res://Effects/Frost.tscn")
const EXPLOSION_PARTICLE = preload("res://Particles/ExplosionParticle.tscn")

func use(target, target_enemy):
	Audio.play_sound("FireBall")
	var damage_base = 1
	if target is Entity:
		damage_base = target.damage_base
	
	if target_enemy is Entity:
		target_enemy.hurt(50 * damage_base)
		if Global.battle_node != null:
			var inst = EXPLOSION_PARTICLE.instance()
			inst.global_position = target_enemy.global_position
			Global.battle_node.add_child(inst)
