execute if score @s enemy_ability_cooldown_1 matches ..0 if score @s enemy_attack_1 matches ..0 at @s positioned ~-5 ~-5 ~-5 if entity @a[dx=9,dy=9,dz=9] run function main:game/mobs/ai/id/id17/start

# execute if score @s enemy_attack_1 matches 1.. run function main:game/mobs/ai/id/id17/attack_tick

execute if score @s enemy_attack_1 matches 1 run function main:game/mobs/ai/id/id17/attack

#particles for attack
execute as @s[scores={enemy_attack_1=21..}] at @s positioned ~ ~2.5 ~ run function main:particles/green_indicator
execute as @s[scores={enemy_attack_1=11..20}] at @s positioned ~ ~2.5 ~ run function main:particles/yellow_indicator
execute as @s[scores={enemy_attack_1=1..10}] at @s positioned ~ ~2.5 ~ run function main:particles/red_indicator