execute if entity @s[distance=..7] run particle crit ~ ~ ~ 0 0 0 0 1 force
#execute if entity @s[distance=7..10] run particle item{item:arrow} ~ ~ ~ 0 0 0 0 1 force

execute if entity @e[type=spectral_arrow,tag=shotgunbullet] as @e[dx=0,tag=!ignoredmg,type=!#survivalplus:notalive] positioned ~-0.99 ~-0.99 ~-0.99 if entity @s[dx=0] run effect give @s glowing 10
execute if entity @s[distance=0..1] as @e[dx=0,tag=!ignoredmg,type=!#survivalplus:notalive] positioned ~-0.99 ~-0.99 ~-0.99 if entity @s[dx=0] run damage @s 40 arrow by @n[tag=ignoredmg]
execute if entity @s[distance=1..2] as @e[dx=0,tag=!ignoredmg,type=!#survivalplus:notalive] positioned ~-0.99 ~-0.99 ~-0.99 if entity @s[dx=0] run damage @s 30 arrow by @n[tag=ignoredmg]
execute if entity @s[distance=2..3] as @e[dx=0,tag=!ignoredmg,type=!#survivalplus:notalive] positioned ~-0.99 ~-0.99 ~-0.99 if entity @s[dx=0] run damage @s 25 arrow by @n[tag=ignoredmg]
execute if entity @s[distance=3..4] as @e[dx=0,tag=!ignoredmg,type=!#survivalplus:notalive] positioned ~-0.99 ~-0.99 ~-0.99 if entity @s[dx=0] run damage @s 20 arrow by @n[tag=ignoredmg]
execute if entity @s[distance=4..5] as @e[dx=0,tag=!ignoredmg,type=!#survivalplus:notalive] positioned ~-0.99 ~-0.99 ~-0.99 if entity @s[dx=0] run damage @s 15 arrow by @n[tag=ignoredmg]
execute if entity @s[distance=5..6] as @e[dx=0,tag=!ignoredmg,type=!#survivalplus:notalive] positioned ~-0.99 ~-0.99 ~-0.99 if entity @s[dx=0] run damage @s 12.5 arrow by @n[tag=ignoredmg]
execute if entity @s[distance=6..7] as @e[dx=0,tag=!ignoredmg,type=!#survivalplus:notalive] positioned ~-0.99 ~-0.99 ~-0.99 if entity @s[dx=0] run damage @s 10 arrow by @n[tag=ignoredmg]
execute if entity @s[distance=7..8] as @e[dx=0,tag=!ignoredmg,type=!#survivalplus:notalive] positioned ~-0.99 ~-0.99 ~-0.99 if entity @s[dx=0] run damage @s 8 arrow by @n[tag=ignoredmg]
execute if entity @s[distance=8..9] as @e[dx=0,tag=!ignoredmg,type=!#survivalplus:notalive] positioned ~-0.99 ~-0.99 ~-0.99 if entity @s[dx=0] run damage @s 5 arrow by @n[tag=ignoredmg]
execute if entity @s[distance=9..10] as @e[dx=0,tag=!ignoredmg,type=!#survivalplus:notalive] positioned ~-0.99 ~-0.99 ~-0.99 if entity @s[dx=0] run damage @s 3 arrow by @n[tag=ignoredmg]

execute if entity @s[distance=..10] if block ^ ^ ^.3 #survivalplus:nobounce positioned ^ ^ ^.3 run function survivalplus:tools/archer/arrow/shotgunbullet
tag @s remove ignoredmg