##ID 3
#remove points
scoreboard players remove .points_temp arena 1
scoreboard players remove .points arena 1
#summon id20_mob x and y are random values
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},{base:1000,id:"max_health"},{base:10000,id:"armor"},{base:10000,id:"armor_toughness"},{id:"minecraft:movement_speed",base:0.20},{id:"minecraft:scale",base:1.2}],ArmorItems:[{},{},{count:1b,id:"iron_chestplate"},{count:1b,id:"minecraft:player_head",components:{"minecraft:custom_data":{enemy_drop:1b},"profile":{id:[I;1286809112,-1121893785,-1834820193,935237806],properties:[{name:"textures",value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZmQ5YmRiM2ZhNTViOTJmY2RkMmQxZGM2NzNlMWYyYzkzNGRjMWMxZDQ2NTQ3OWFlZDM2NWI2MjA1N2JiNDkifX19"}]}}}],CanPickUpLoot:0b,CustomName:'{"text":"Boulderier","color":"green"}',HandItems:[{},{}],Health:1000.0f,Tags:["id20_mob","enemy","newborn","big","melee"]}

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

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

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

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

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