scoreboard players add @s BossAutoAttack 1
scoreboard players add @e[type=armor_stand,tag=AutoAttackSpawns,tag=AboutToFire] AutoAttackTimer 1
scoreboard players add @e[type=arrow,tag=GotLaunched] DeathTimerKyu 1


execute at @s[scores={BossAutoAttack=1}] run function zzzzdonotuse:cadeyrn/attacks/autoattack/summonstands
execute at @s[scores={BossAutoAttack=2..}] run execute as @e[type=armor_stand,tag=AutoAttackSpawns,tag=AboutToFire] run function zzzzdonotuse:cadeyrn/attacks/autoattack/chargebow
execute at @s[scores={BossAutoAttack=2}] run tag @e[type=armor_stand,tag=Tagged4Spawn] add AboutToFire
execute at @s[scores={BossAutoAttack=60}] run tag @e[type=armor_stand,tag=Tagged4Spawn2] add AboutToFire

execute as @s[scores={BossAutoAttack=220..}] run function zzzzdonotuse:cadeyrn/attacks/autoattack/reset
execute at @s[scores={BossAutoAttack=2..}] run execute at @e[type=armor_stand,tag=AutoAttackSpawns,tag=!AboutToFire] run particle dust 0.2 0 1 1 ~ ~ ~ 0.2 0.5 0.2 1 5 force
#execute as @e[scores={DeathTimerKyu=3..},type=arrow,tag=GotLaunched] run function zzzzdonotuse:cadeyrn/attacks/autoattack/checkmotion
kill @e[scores={DeathTimerKyu=10..},type=arrow,tag=GotLaunched]
execute as @e[type=arrow,tag=GotLaunched,nbt={inGround:1b}] run function zzzzdonotuse:cadeyrn/attacks/autoattack/destroyblock
#execute as @a[scores={BlockedShield=1..}] run execute at @s run kill @e[type=arrow,sort=nearest,limit=1,distance=..3]

#execute as @a[scores={BlockedShield=1..}] run scoreboard players set @s BlockedShield 0


