#hud
clear @a leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},custom_data={archer:gui}]
execute if score .arrow archer matches 1 if score .storm_cooldown_s archer matches ..0 run function main:characters/archer/q/id1/storm/on
execute if score .arrow archer matches 2 if score .gale_cooldown_s archer matches ..0 run function main:characters/archer/q/id1/gale/on
execute if score .arrow archer matches 3 if score .thundering_cooldown_s archer matches ..0 run function main:characters/archer/q/id1/thundering/on

execute if score .arrow archer matches 1 if score .storm_cooldown_t archer matches 19 if score .storm_cooldown_s archer matches 1 run playsound entity.experience_orb.pickup master @a ~ ~ ~ 10 0.5 1
execute if score .arrow archer matches 2 if score .gale_cooldown_t archer matches 19 if score .gale_cooldown_s archer matches 1 run playsound entity.experience_orb.pickup master @a ~ ~ ~ 10 0.5 1
execute if score .arrow archer matches 3 if score .thundering_cooldown_t archer matches 19 if score .thundering_cooldown_s archer matches 1 run playsound entity.experience_orb.pickup master @a ~ ~ ~ 10 0.5 1



#vfx + sfx
execute as @e[type=marker,tag=archer_q] at @s run function main:characters/archer/q/id1/storm/particles

scoreboard players remove @e[type=marker,tag=archer_q,scores={q_duration_t=1..}] q_duration_t 1
execute as @e[type=marker,tag=archer_q,scores={q_duration_t=..0}] at @s anchored eyes run function main:characters/archer/q/id1/particles

execute if entity @e[type=marker,tag=archer_q,scores={hitbox_duration=1}] as @n[type=item_display,tag=aj.archer_q.root] run function animated_java:archer_q/animations/end/tween {"to_frame":0,"duration":5}

execute as @e[type=item_display,tag=aj.archer_weapon.root] at @s at @n[type=item_display,tag=id1_archer_q_arrow] run tp @s ^ ^ ^-1 facing entity @n[type=item_display,tag=id1_archer_q_arrow]

execute as @e[type=item_display,tag=archer_rc_gale] at @s at @n[type=item_display,tag=id1_archer_q_arrow] rotated as @n[type=item_display,tag=id1_archer_q_arrow] run rotate @s ~ ~

execute as @e[type=item_display,tag=archer_rc_thundering] at @s at @n[type=item_display,tag=id1_archer_q_arrow] rotated as @n[type=item_display,tag=id1_archer_q_arrow] run rotate @s ~ ~

execute if score .archer_mark_duration archer matches 1.. at @e[type=#main:enemies,tag=enemy,tag=archer_mark] run particle cherry_leaves ~ ~1.2 ~ 0.3 0.2 0.3 0 1 force

execute if score .archer_mark_duration archer matches 1 as @e[type=#main:enemies,tag=enemy,tag=archer_mark] run tag @s remove archer_mark

execute if score .archer_mark_duration archer matches 1.. run scoreboard players remove .archer_mark_duration archer 1

execute if entity @e[type=item_display,tag=archer_gale] run function main:particles/system/emitter_tick {"id":"400","particle":"004","particle_id":"400","life":22,"random_x":"-30..30","random_y":"-20..20","random_z":"-30..30","interpolation_duration":20,"from_translation":"0f,0f,0f","from_scale":"1f,1f,1f","from_rotation":"0f,0f,0f","to_translation":"0f,0f,0f","to_scale":"0f,0f,0f","to_rotation":"0f,0f,0f","billboard":"center","cooldown":"1"}