execute if score @s EB_next_attack matches 0 run effect give @s slowness 3 255 true

execute if score @s EB_next_attack matches 0 run playsound custom.cannon.shoot hostile @a ~ ~ ~
execute if score @s EB_next_attack matches -10 run playsound custom.cannon.shoot hostile @a ~ ~ ~
execute if score @s EB_next_attack matches -20 run playsound custom.cannon.shoot hostile @a ~ ~ ~
execute if score @s EB_next_attack matches -30 at @a[gamemode=!spectator] positioned ~ ~6 ~ run function attacks:cannon_ball/summon_down
execute if score @s EB_next_attack matches -50 at @a[gamemode=!spectator] positioned ~ ~6 ~ run function attacks:cannon_ball/summon_down
execute if score @s EB_next_attack matches -70 at @a[gamemode=!spectator] positioned ~ ~6 ~ run function attacks:cannon_ball/summon_down

execute if score @s EB_next_attack matches ..-70 run tag @s remove attacking
execute if score @s EB_next_attack matches ..-70 run tag @s remove cannon
