data merge entity @s {ArmorDropChances:[0.085F,0.085F,0.085F,0.000F],PatrolLeader:0b,PersistenceRequired:0b,HandItems:[{id:emerald,components:{"minecraft:custom_data":{1:1},"minecraft:custom_model_data":1001,"minecraft:custom_name":'{"text":"1$"}'},count:1}],HandDropChances:[0.5f]}
team join norm @s
loot replace entity @s weapon.mainhand loot ws:handitem/civ
execute if items entity @s armor.head * run loot replace entity @s armor.head loot ws:hat
execute store result score @s definecity run random value 1..4
execute unless score @s definecity matches 5 run return 0
execute store result score @s definecity run data get entity @s Pos[0] 0.001
execute store result entity @s Wave int 1 run function ws:misc/spawn/definecity
function ws:misc/spawn/patrolpoints with entity @s