##ID 1
#remove points
scoreboard players remove .points_temp arena 1
scoreboard players remove .points arena 1

#summon id18_mob x and y are random values
#$execute as @e[sort=random,limit=1,tag=enemies_spawnpoint] at @s run 
summon zombie ~ ~1 ~ {PersistenceRequired:1b,attributes:[{id:"minecraft:step_height",base:1},{id:"minecraft:follow_range",base:50},{id:"minecraft:attack_damage",base:0},{id:"minecraft:knockback_resistance",base:1000},{id:"minecraft:movement_speed",base:0.30},{base:1000,id:"max_health"},{base:10000,id:"armor"},{base:10000,id:"armor_toughness"},{base:1000,id:"max_health"}],ArmorItems:[{},{},{},{id:"minecraft:potion",count:1,components:{"minecraft:item_model":"minecraft:enemies/slime_cube","minecraft:potion_contents":{custom_color:16711680}}}],CanPickUpLoot:0b,CustomName:'{"text":"Slime Cube","color":"white"}',Health:1000.0f,Tags:["id18_mob","enemy","newborn","medium","melee","slime","all_headshots"],active_effects:[{id:invisibility,duration:9999,amplifier:1,show_particles:false},{id:mining_fatigue,duration:9999,amplifier:1,show_particles:false},{id:poison,duration:9999,amplifier:10,show_particles:false},{id:resistance,duration:9999,amplifier:10,show_particles:false}]}



#set id for stuff
scoreboard players set @e[type=zombie,tag=id18_mob,tag=newborn,limit=1] id 18

##set level, health and id for newborn enemy
#set health
scoreboard players set @e[type=zombie,tag=id18_mob,tag=newborn,limit=1] health_max 150
scoreboard players add @e[type=zombie,tag=id18_mob,tag=newborn,limit=1] health 150

execute as @e[type=zombie,tag=id18_mob,tag=newborn] run function main:game/mobs/spawn/scores

#enemy is not newborn now
tag @e[type=zombie,tag=id18_mob,tag=newborn,limit=1] remove newborn