##ID1 - Behavior and AI
execute on vehicle on vehicle at @s if entity @p[distance=..5] run function main:game/mobs/ai/movement/move {"tag":"id27_bee","height":0,"speed":-0.2,"score":""}

execute on vehicle on vehicle rotated as @s on passengers run rotate @s ~ 0

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

#shot
execute unless score @s enemy_attack_2 matches 1.. as @s[scores={enemy_ability_cooldown_1=..0,stun=..0}] at @s run function main:game/mobs/ai/id/id27/shoot

#if stun
execute if entity @s[scores={stun=1..}] store result score @s enemy_ability_cooldown_1 run random value 80..120

#vfx
particle flame ~ ~ ~ 0.25 0.25 0.25 0 1 normal

execute if entity @s[scores={enemy_attack_2=1..}] at @s run particle lava ~ ~0.5 ~ 0.25 0.25 0.25 0 1 force

execute if entity @s[scores={enemy_attack_2=1}] at @s run function main:game/mobs/ai/id/id27/death_1