##ID 4
#remove points
scoreboard players remove .points_temp arena 1
scoreboard players remove .points arena 1
#summon id4_mob x and y are random values
summon zombie ~ ~ ~ {PersistenceRequired:1b,attributes:[{id:"minecraft:step_height",base:1},{id:"minecraft:follow_range",base:50},{id:"minecraft:attack_damage",base:0},{base:1000,id:"max_health"},{id:"minecraft:knockback_resistance",base:1000},{base:10000,id:"armor"},{base:10000,id:"armor_toughness"},{base:1000,id:"max_health"},{id:"minecraft:movement_speed",base:0.24}],ArmorItems:[{},{},{},{components:{"minecraft:custom_data":{enemy_drop:1b},"minecraft:profile":{id:[I;2131429491,-546682343,-1681000759,251135175],name:"",properties:[{name:"textures",value:"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDc2YTIwNjJjNDY1ZTA3MzVlMzk2ZWUyYTU4NTU2NWZhOWUzZDRiZTI2MTJjYjhkNmM4Zjg3YWIwYWM0NmIwZCJ9fX0="}]}},count:1,id:"minecraft:player_head"}],CanPickUpLoot:0b,CustomName:'{"text":"Slimed Bloaty","color":"green"}',Health:1000.0f,Tags:["id4_mob","enemy","newborn","small","melee","slime"],Passengers:[{id:"minecraft:block_display",transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.5f,-1.5f,-0.5f],scale:[1f,1f,1f]},Tags:["id4_particle"],block_state:{Name:"minecraft:slime_block",}}]}



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

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

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

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