particle crit ~ ~ ~ 0 0 0 0 1 force
execute if entity @e[type=spectral_arrow,tag=velocitybullet] 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 store result score power burst run data get entity @s SelectedItem.components."minecraft:enchantments"."minecraft:power"

execute unless data entity @s SelectedItem.components."minecraft:enchantments"."minecraft:power" as @e[dx=0,tag=!ignoredmg,type=!#survivalplus:notalive] positioned ~-0.99 ~-0.99 ~-0.99 if entity @s[dx=0] run damage @s 9 arrow by @n[tag=ignoredmg]
execute if score power burst matches 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 11 arrow by @n[tag=ignoredmg]
execute if score power burst matches 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 13 arrow by @n[tag=ignoredmg]
execute if score power burst matches 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 15 arrow by @n[tag=ignoredmg]
execute if score power burst matches 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 17 arrow by @n[tag=ignoredmg]
execute if score power burst matches 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 19 arrow by @n[tag=ignoredmg]
scoreboard players reset power

#execute as @e[dx=0,tag=!ignoredmg,type=!#survivalplus:notalive] positioned ~-0.99 ~-0.99 ~-0.99 if entity @s[dx=0] as @e[tag=velocitybullet] run function survivalplus:tools/archer/arrow/exitvelocity

execute if entity @s[distance=..70] if block ^ ^ ^.5 #survivalplus:nobounce positioned ^ ^ ^.5 run function survivalplus:tools/archer/arrow/velocitybullet
execute unless entity @s[distance=..70] as @e[tag=velocitybullet] run function survivalplus:tools/archer/arrow/exitvelocity
execute unless block ^ ^ ^.5 #survivalplus:nobounce as @e[tag=velocitybullet] run function survivalplus:tools/archer/arrow/exitvelocity
tag @e remove ignoredmg