##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 ~ ~1 ~ {attributes:[{id:"minecraft:step_height",base:1},{id:"minecraft:follow_range",base:50}],ArmorItems:[{},{},{},{components:{"minecraft:custom_data":{enemy_drop:1b},"minecraft:profile":{id:[I;1286809112,-1121893785,-1834820193,935237806],name:"",properties:[{name:"textures",value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWM5NmI1ZWFlYzU3ZDQ3YTUwYWZiZjY4NDQyOTNmODgxNTEwZjhkYWI0NmQ1ZmYzMjY4N2U5ZWNiMDhlMTFiNSJ9fX0="}]}},count:1,id:"minecraft:player_head"}],CanPickUpLoot:0b,CustomName:'{"text":"Corrupt","color":"red"}',Health:1000.0f,Tags:["id4_mob","enemy","newborn"],attributes:[{base:1000,id:"max_health"},{base:10000,id:"armor"},{base:10000,id:"armor_toughness"}]}


# {count:1b,id:"minecraft:player_head",components:{"minecraft:custom_data":{enemy_drop:1b},"profile":{id:[I;1286809112,-1121893785,-1834820193,935237806],properties:[{name:"textures",value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTIyMDMzOTE4ZGQzY2Q4ZjU4NWZiZTYyZGMwNTJlYThkZjg1OTM4Y2Y4NzBiZGY3ZDE0YzFkNTMzNzhjYjU5ZSJ9fX0="}]}}}



#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 3500

#randomize cooldown on ability
execute as @e[type=zombie,tag=id4_mob,tag=newborn,limit=1] store result score @s enemy_ability_cooldown_1 run random value 50..100

execute as @e[type=#main:enemies,tag=enemy,tag=dummy,tag=newborn] run function main:game/mobs/spawn/scores {"tag":id4_mob}


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