execute as @e[type=zombie,tag=!plussed,predicate=survivalplus:25chance] run data merge entity @s {IsBaby:0b,CanBreakDoors:1b,CustomName:{"text":"Wraith"},Health:30,CanPickUpLoot:0b,Tags:[blood,plussed,dupe,wraith,rerare],equipment:{chest:{id:chainmail_chestplate},head:{id:chainmail_helmet}},attributes:[{id:"attack_damage",base:8f},{id:"knockback_resistance",base:.6f},{id:"movement_speed",base:0.22f},{id:"max_health",base:30f},{id:"armor",base:8f}],drop_chances:{chest:0f,head:0f},DeathLootTable:"survivalplus:entities/wraith"}
execute as @e[tag=wraith] run effect give @s invisibility infinite 0 true
execute at @e[tag=dupe] unless entity @e[predicate=survivalplus:rerare,distance=..100] run summon zombie
tag @e[tag=blood,tag=dupe] remove dupe