extends Entity

func target_enemy_attacked():
	if can_block:
		block()
		$Timer.start(1)

func _on_Timer_timeout():
	if animation_player.current_animation == "Idle":
		if can_use_items and items.size() > 0 and health < max_health/10:
			item_use()
		else:
			attack()
	
	$Timer.start(rand_range(0.5, 1.5) / agility_base)

