
execute at @s run function endermen/ender_mystic/find_target

tag @e[r=13,family=player,tag=EndermanMysticTarget] add EndermanMysticDamage
tag @e[r=13,family=snowgolem,tag=EndermanMysticTarget] add EndermanMysticDamage
tag @e[r=13,family=irongolem,tag=EndermanMysticTarget] add EndermanMysticDamage
tag @e[r=13,family=villager,tag=EndermanMysticTarget] add EndermanMysticDamage
tag @e[r=13,family=wandering_trader,tag=EndermanMysticTarget] add EndermanMysticDamage
tag @e remove EndermanMysticTarget

execute as @e[c=1,type=ldz:ender_mystic] run damage @e[r=16,tag=EndermanMysticDamage] 6 entity_attack entity @s
tag @e remove EndermanMysticDamage