particle enchanted_hit ~ ~.2 ~ .5 .5 .5 .1 8 force
particle dust 0.878 0.878 0.296 1 ~ ~.2 ~ .2 .2 .2 .1 4 force
particle dust 0.980 0.957 0.241 1 ~ ~.2 ~ .2 .2 .2 .1 4 force

execute as @e[distance=..9,type=!#no_interaction_p,tag=!unspellable] unless score @s electric_charge matches 0.. run tag @s add check
execute if entity @e[tag=check,limit=1] at @s run function items:obj/electric_charge/electrocute/main
tag @e[distance=..9,tag=check] remove check
