extends Area3D


func _ready() -> void:
	pass


func _on_Acid_body_entered(body: Node3D) -> void:
	if body.is_in_group("movable") and body.has_node("Health"):
		if body.invincible == true:
			print ("invincible....")
			return
		if body.is_in_group("heavy"):
			if body.is_in_group("barrel") or body.is_in_group("box"):
				if body.has_method("take_damage") and body.damaged == false:
					body.take_damage()
				elif body.has_method("explode"):
					body.explode()
				else:
					body.hit()
				
			
		elif body.has_method("explode"):
			body.position.y = position.y + 2.2
			body.explode()
			
		else:
			body.health_node.kill()
		
			
		
	
