# --------- Next Sound ----------------
execute if predicate entity/hurt run playsound custom.seagull.hurt hostile @a ~ ~ ~
execute if predicate entity/hurt run function 0_enemy_boss:sound_cooldown/reset_by_hurt

execute if score @s EB_next_sound matches ..0 run function 0_enemy_boss:sound_cooldown/generic_long
execute if score @s EB_next_sound matches 1 run playsound custom.seagull.ambient hostile @a ~ ~ ~

# --------- Visual ----------------
# Tp
function olink:ch1/find_linked
tp @e[type=marker,limit=1,tag=ch1_olinked,tag=aj,distance=0.02..] ~ ~ ~ ~ ~

# Hurt
execute if predicate entity/hurt as @e[type=marker,limit=1,tag=ch1_olinked,tag=aj] run function annoying_seagull:set_variant/hurt
execute if predicate entity/not/hurt as @e[type=marker,limit=1,tag=ch1_olinked,tag=aj] run function annoying_seagull:set_variant/default

# Animation
execute if predicate entity/moving as @e[type=marker,limit=1,tag=ch1_olinked,tag=!aj.annoying_seagull.anim.fly] run function annoying_seagull:animations/fly/play
execute if predicate entity/not/moving as @e[type=marker,limit=1,tag=ch1_olinked,tag=aj.annoying_seagull.anim.fly] run function annoying_seagull:animations/fly/stop