#idle + movement
execute if entity @s[tag=!idle] if score .stun boss matches ..0 if entity @e[type=zombie,tag=id12_mob,predicate=!main:entity/motion/moving] as @s run function main:game/mobs/ai/id/id12/idle
execute if entity @s[tag=!walk] if score .stun boss matches ..0 if entity @e[type=zombie,tag=id12_mob,predicate=main:entity/motion/moving] as @s run function main:game/mobs/ai/id/id12/walk

#random attack
execute store result score .choice boss run random value 1..3
execute at @n[type=zombie,tag=id12_mob] positioned ~ ~ ~ if entity @a[distance=..10] if score .attack_is_playing boss matches ..0 run function main:game/mobs/ai/id/id12/random/start

#jump attack
execute at @n[type=zombie,tag=id12_mob] positioned ~ ~ ~ if entity @a[distance=11..] if score .cooldown_far boss matches ..0 if score .attack_is_playing boss matches ..0 run function main:game/mobs/ai/id/id12/far

#hideout
execute if score .far boss matches 80.. if score .attack_is_playing boss matches ..0 if score .cooldown_hideout boss matches ..0 run function main:game/mobs/ai/id/id12/hideout/start