extends Entity

var attack_per_row = 0
var attack_per_row_min = 1
var attack_per_row_max = 2

func target_enemy_attacked():
	if animation_player.current_animation == "Idle":
		if (attack_per_row >= attack_per_row_max) \
		or (attack_per_row >= attack_per_row_min and randf() < 0.5):
			if can_use_items and items.size() > 0 and randf() < 0.5:
				item_use()
			else:
				block()
			attack_per_row = 0
		else:
			attack()
			attack_per_row += 1
