execute if score .enemies_ranged arena matches ..5 store result score .mob_type_random arena run random value 1..100
execute if score .enemies_ranged arena matches 5.. store result score .mob_type_random arena run random value 1..66
execute if score .enemies_big arena matches 4.. run scoreboard players set .mob_type_random arena 1

execute if score .mob_type_random arena matches 1..33 run scoreboard players set .mob_type arena 1
execute if score .mob_type_random arena matches 34..66 run scoreboard players set .mob_type arena 2
execute if score .mob_type_random arena matches 67..100 run scoreboard players set .mob_type arena 3

execute if score .mob_type arena matches 1 run function main:game/wave/spawn/type/melee_1
execute if score .mob_type arena matches 2 run function main:game/wave/spawn/type/big_1
execute if score .mob_type arena matches 3 run function main:game/wave/spawn/type/ranged_1

execute as @e[type=armor_stand,tag=enemies_spawnpoint_1] at @s run function main:game/wave/spawn/spread_random
scoreboard players set .points_temp arena 1
execute as @e[type=armor_stand,tag=enemies_spawnpoint_1] at @s run function main:game/mobs/spawn/random
kill @e[type=armor_stand,tag=enemies_spawnpoint_1]

execute if score .enemy_spawn_cooldown_1 arena matches ..0 store result score .enemy_spawn_cooldown_1 arena run random value 1..60