###Establishes id matches for hell attack sites###
scoreboard players operation #nitID nitTemp = @e[tag=nitKTP,limit=1,sort=nearest] nitID
execute as @e[tag=nitHellSite] if score @s nitID = #nitID nitTemp run tag @s add nitID_match

###Increases the Hell attack danger count, then performs matching attack###
scoreboard players add @e[tag=nitHellSite,tag=nitID_match] nitHellAttacks 1
tag @e[tag=nitHellSite,tag=nitID_match] remove nitID_match

###Increases siteplanning count on player for advancement purposes###
scoreboard players add @a[distance=..50,tag=nitCitizen] nitSiteCraft 1
advancement grant @a[scores={nitSiteCraft=8..}] only nitk:nitk/hamlet siteplanner-8