tag @s[tag=domain:clashing] remove domain:open
scoreboard players remove @s[tag=domain:clashing,scores={emotionP=-46..,domainclash=1}] emotionP 1
scoreboard players set @s[scores={emotionP=..-47}] domainclash -1
execute as @s[scores={domainclash=-1}] at @s run tag @e[r=15,c=1,scores={domainclash=1}] add domain:checkNearby
execute as @s[scores={domainclash=-1}] at @s unless entity @e[r=15,tag=!domain:checkNearby,scores={domainclash=1},c=1] run scoreboard players set @e[tag=domain:checkNearby,scores={domainclash=1},r=15,c=1] domainclash 2
tag @e[r=15,c=1,tag=domain:checkNearby] remove domain:checkNearby