#main damage
$function main:mechanics/damage/enemy/calculation {"id":id1,"character":archer,"type":"rc","damage":$(damage),"stat":"attack","local_bonus":0,"indicator":1}

#rc
$execute at @s anchored eyes run function main:mechanics/arrow/start {"type":rc,"character":archer,"id":id1,"angle":"~ ~","tag":',"thundering"$(tag)',"pierce":1000}

#vfx + sfx
playsound item.trident.riptide_1 master @a ~ ~ ~ 3 1
function main:mechanics/effects/screenshake/start {duration:5,strength:500}
playsound atmos:bow_1 master @a ~ ~ ~ 10 1.1 1
playsound atmos:shock_1 master @a ~ ~ ~ 10 1
playsound entity.wind_charge.wind_burst master @a ~ ~ ~ 3 0

execute at @s anchored eyes positioned ^ ^ ^1 run function main:particles/circle {"particle":enchanted_hit,"range":0.00000025}

#particle
$summon item_display ~ ~ ~ {transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0.5f,0f],scale:[1f,1f,1f]},Tags:["$(arrow_model)","newborn"],item:{id:"minecraft:paper",count:1,components:{"minecraft:item_model":"minecraft:weapons/archer/$(arrow_model)"}}}
$execute as @e[type=item_display,tag=$(arrow_model),tag=newborn] run ride @s mount @n[type=item_display,tag=id1_archer_rc_arrow]
$execute as @e[type=item_display,tag=$(arrow_model),tag=newborn] run tag @s remove newborn

scoreboard players set .arrow archer 0