#execute if entity @e[tag=merchant] run function survivalplus:merchants/merchantdel
#execute if entity @e[type=skeleton,tag=merchant_face] run function survivalplus:merchants/skeleton
#execute if entity @e[type=stray,tag=merchant_face] run function survivalplus:merchants/stray
#execute if entity @e[type=zombie_villager,tag=merchant_face,tag=zombmerc] run function survivalplus:merchants/zombie
#execute if entity @e[type=wither_skeleton,tag=merchant_face] run function survivalplus:merchants/wither_skeleton
#execute if entity @e[type=piglin,tag=merchant_face] run function survivalplus:merchants/piglin
#execute if entity @e[type=zombie_villager,tag=merchant_face,tag=hmmerc] run function survivalplus:merchants/hm
#execute if entity @e[type=zombie,tag=merchant_face,tag=crysmerc] run function survivalplus:merchants/crystal

execute at @e[tag=merchant_face,nbt={HurtTime:10s}] run particle angry_villager ~ ~1.3 ~ .3 .3 .3 0 5
execute as @e[tag=merchant_face,predicate=survivalplus:targetinrange2,predicate=survivalplus:targeted] run effect give @s minecraft:slowness 1 255 true
#execute as @e[tag=merchant] run effect give @s invisibility 1 0 true
execute as @e[tag=merchant_face,predicate=survivalplus:targeted] run effect give @s weakness 1 255 true

execute as @e[tag=merchant_face,predicate=survivalplus:targeted,predicate=survivalplus:targetinrange4] run function survivalplus:merchants/merchantaggro