tag @a remove CadVolleyP
tag @s add CadVolleyP

execute at @e[type=arrow,tag=CadVolley,tag=DoVolley] run summon armor_stand ~ ~ ~ {Marker:1b,Invisible:1b,Silent:1b,Silent:1b,Tags:["DiePls","CadVolStand1"],NoGravity:1b}
execute as @e[type=armor_stand,tag=CadVolStand1] run execute at @s run tp @s ~ ~ ~ facing entity @p[tag=CadVolleyP]

execute at @e[type=armor_stand,tag=CadVolStand1] run summon armor_stand ^ ^ ^ {Marker:1b,Invisible:1b,Silent:1b,Silent:1b,Tags:["DiePls","CadVolStand","OGPosVolley"],NoGravity:1b}
execute at @e[type=armor_stand,tag=CadVolStand1] run summon armor_stand ^ ^.5 ^ {Marker:1b,Invisible:1b,Silent:1b,Silent:1b,Tags:["DiePls","CadVolStand"],NoGravity:1b}
execute at @e[type=armor_stand,tag=CadVolStand1] run summon armor_stand ^ ^-.5 ^ {Marker:1b,Invisible:1b,Silent:1b,Silent:1b,Tags:["DiePls","CadVolStand"],NoGravity:1b}

execute at @e[type=armor_stand,tag=CadVolStand1] run summon armor_stand ^.5 ^ ^ {Marker:1b,Invisible:1b,Silent:1b,Silent:1b,Tags:["DiePls","CadVolStand"],NoGravity:1b}
execute at @e[type=armor_stand,tag=CadVolStand1] run summon armor_stand ^.5 ^.5 ^ {Marker:1b,Invisible:1b,Silent:1b,Silent:1b,Tags:["DiePls","CadVolStand"],NoGravity:1b}
execute at @e[type=armor_stand,tag=CadVolStand1] run summon armor_stand ^.5 ^-.5 ^ {Marker:1b,Invisible:1b,Silent:1b,Silent:1b,Tags:["DiePls","CadVolStand"],NoGravity:1b}

execute at @e[type=armor_stand,tag=CadVolStand1] run summon armor_stand ^-.5 ^ ^ {Marker:1b,Invisible:1b,Silent:1b,Silent:1b,Tags:["DiePls","CadVolStand"],NoGravity:1b}
execute at @e[type=armor_stand,tag=CadVolStand1] run summon armor_stand ^-.5 ^.5 ^ {Marker:1b,Invisible:1b,Silent:1b,Silent:1b,Tags:["DiePls","CadVolStand"],NoGravity:1b}
execute at @e[type=armor_stand,tag=CadVolStand1] run summon armor_stand ^-.5 ^-.5 ^ {Marker:1b,Invisible:1b,Silent:1b,Silent:1b,Tags:["DiePls","CadVolStand"],NoGravity:1b}

kill @e[type=armor_stand,tag=CadVolStand1]

execute as @e[type=armor_stand,tag=OGPosVolley] run function zzzzdonotuse:cadeyrn/attacks/arrowvolley/getcoords

execute as @e[type=armor_stand,tag=CadVolStand,tag=!OGPosVolley] run execute if predicate suhc:25percent run kill @s
execute at @e[type=armor_stand,tag=CadVolStand,tag=!OGPosVolley] run summon arrow ~ ~ ~ {SoundEvent:"entity.wither.break_block",Fire:100,crit:1b,damage:1.5d,Tags:["CadVolley2","DiePls"],Motion:[0.0,0.0,0.0]}
execute at @e[type=armor_stand,tag=CadVolStand,tag=OGPosVolley] run summon arrow ~ ~ ~ {SoundEvent:"entity.wither.break_block",Fire:100,crit:1b,damage:1.5d,Tags:["CadVolley2","DiePls","MiddleArrow"],Motion:[0.0,0.0,0.0]}


execute as @e[type=arrow,tag=CadVolley2] run execute store result entity @s Motion[0] double 0.085 run scoreboard players get @e[type=armor_stand,tag=OGPosVolley,limit=1] PosXTemp
#execute as @e[type=arrow,tag=CadVolley2] run execute store result entity @s Motion[1] double 0.00085 run scoreboard players get @e[type=armor_stand,tag=OGPosVolley,limit=1] PosYTemp

#execute as @e[type=arrow,tag=CadVolley2] run execute store result entity @s Motion[1] double 0.055 run scoreboard players get @e[type=armor_stand,tag=OGPosVolley,scores={PosYTemp=-3..-1},limit=1] PosYTemp

execute if entity @e[type=armor_stand,tag=OGPosVolley,scores={PosYTemp=-4000..-400},limit=1] run execute as @e[type=arrow,tag=CadVolley2] run execute store result entity @s Motion[1] double 0.0006 run scoreboard players get @e[type=armor_stand,tag=OGPosVolley,scores={PosYTemp=-4000..-400},limit=1] PosYTemp
execute if entity @e[type=armor_stand,tag=OGPosVolley,scores={PosYTemp=-400..-1},limit=1] run execute as @e[type=arrow,tag=CadVolley2] run execute store result entity @s Motion[1] double 0.0003 run scoreboard players get @e[type=armor_stand,tag=OGPosVolley,scores={PosYTemp=-400..-1},limit=1] PosYTemp

execute if entity @e[type=armor_stand,tag=OGPosVolley,scores={PosYTemp=0..250},limit=1] run execute as @e[type=arrow,tag=CadVolley2] run execute store result entity @s Motion[1] double 0.0020 run scoreboard players get @e[type=armor_stand,tag=OGPosVolley,scores={PosYTemp=0..250},limit=1] PosYTemp
execute if entity @e[type=armor_stand,tag=OGPosVolley,scores={PosYTemp=250..},limit=1] run execute as @e[type=arrow,tag=CadVolley2] run execute store result entity @s Motion[1] double 0.0015 run scoreboard players get @e[type=armor_stand,tag=OGPosVolley,scores={PosYTemp=250..},limit=1] PosYTemp
execute as @e[type=arrow,tag=CadVolley2] run execute store result entity @s Motion[2] double 0.085 run scoreboard players get @e[type=armor_stand,tag=OGPosVolley,limit=1] PosZTemp

tag @e[type=arrow] remove CadVolley2

kill @e[type=armor_stand,tag=CadVolStand]


