execute at @s as @e[type=!#svm_ep:technical,distance=..2.25] run tag @s add hitby
execute at @s as @e[type=!#svm_ep:technical,dx=2] run tag @s add hitby

execute as @e[tag=hitby] store result score @s svm_ep.deal_damage run scoreboard players get @e[tag=same_id,limit=1] svm_ep.level
execute as @e[tag=hitby] run scoreboard players operation @s svm_ep.deal_damage /= %launched_ice_damage_divisor svm_ep.world_settings

execute as @e[tag=hitby] run function svm_ep:damage/deal_normal {"damage":"8","attacker":"@e[limit=1,tag=same_id]","type":"mob_attack"}

execute at @s run particle minecraft:item{item:ice} ~ ~ ~ 0 0 0 0.4 200
execute at @s run playsound minecraft:block.glass.break master @a[distance=..20] ~ ~ ~ 0.65 1.2
summon marker ~ ~ ~ {Tags:["svm_ep.crack_1","svm_ep.crack"]}
execute at @s if items entity @s contents minecraft:blue_ice run summon marker ~ ~ ~ {Tags:["svm_ep.crack_2","svm_ep.crack"]}

kill @s
tag @e[distance=..20] remove hitby
tag @a remove hitby
tag @s remove executor
tag @e remove same_id