# function main:dialog/start {"folder":"","allow_skip":"1",id:1}
execute at @a run function animated_java:slime_queen/summon {args:{}}
execute as @e[type=item_display,tag=aj.slime_queen.root] run function animated_java:slime_queen/animations/idle/tween {to_frame:0,duration:0}
summon zombie ~ ~ ~ {Silent:1b,Tags:["id12_mob","enemy","newborn","boss","heavy","slime","melee","ranged","big"],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}],ArmorItems:[{},{},{},{id:"minecraft:barrier",count:1,components:{"minecraft:item_model":"minecraft:blank"}}],attributes:[{id:"minecraft:step_height",base:1},{id:"minecraft:follow_range",base:50},{id:"minecraft:attack_damage",base:0},{id:"minecraft:movement_speed",base:0.45},{id:"minecraft:scale",base:1.9},{id:"minecraft:knockback_resistance",base:1.0},{id:"minecraft:armor",base:1000.0}],Health:10000.0f,CustomName:'{"text":"Azaroth The Slime Queen","color":"red"}'}

execute if score .difficulty_level progression matches 5 run tag @e[type=item_display,tag=aj.slime_queen.root] add enraged

particle block{block_state:lime_wool} ~ ~ ~ 0.25 0.25 0.25 0 5 force

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

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

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

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

#scores
scoreboard players set .cooldown boss 0
scoreboard players set .cooldown_far boss 0
scoreboard players set .cooldown_attack_string boss 0
scoreboard players set .cooldown_vertical_attack boss 0
scoreboard players set .cooldown_jump_attack boss 0
scoreboard players set .cooldown_hideout boss 0
scoreboard players set .cooldown_spawn boss 0
scoreboard players set .choice boss 0
scoreboard players set .attack_is_playing boss 0
scoreboard players set .stop boss 0
scoreboard players set .stun boss 0
scoreboard players set .stage boss 0
scoreboard players set .far boss -20

execute as @e[type=item_display,tag=aj.slime_queen.root] run function animated_java:slime_queen/animations/spawn/tween {to_frame:0,duration:5}

#dialogs
function main:dialog/id/boss/slime_queen/check