# Next Sound
execute if predicate entity/hurt run playsound custom.troll.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
execute if score @s EB_next_sound matches 1 run playsound custom.troll.ambient hostile @a ~ ~ ~

# Next Attack
execute if entity @s[scores={EB_next_attack=..0},tag=!attacking] run function bosses:troll/attk/next
execute if entity @s[tag=attacking,tag=!attk_choosen] run function bosses:troll/attk/choose

# Attacks
execute if entity @s[tag=chase_wave,tag=jumping] if predicate entity/on_ground run function bosses:troll/chase_wave
execute if entity @s[tag=chase_wave,tag=!jumping] run function bosses:troll/jump
execute if entity @s[tag=multiple_wave,tag=jumping] if predicate entity/on_ground run function bosses:troll/multiple_wave
execute if entity @s[tag=multiple_wave,tag=!jumping] run function bosses:troll/jump
execute if entity @s[tag=stone_attk] run function bosses:troll/stone_attk
execute if entity @s[tag=minions] run function bosses:troll/minions/main
