execute positioned ~-22 12 ~-22 run kill @e[tag=spawn_rune,dx=44,dy=32,dz=44]

# Spawn wave
execute if score @s room_wave matches 1 positioned ~-22 12 ~-22 as @e[tag=mob,tag=!_boss,tag=w1,dx=44,dy=32,dz=44] at @s run function enemies_py:0_spawn_enemy
execute if score @s room_wave matches 2 positioned ~-22 12 ~-22 as @e[tag=mob,tag=!_boss,tag=w2,dx=44,dy=32,dz=44] at @s run function enemies_py:0_spawn_enemy
execute if score @s room_wave matches 3 positioned ~-22 12 ~-22 as @e[tag=mob,tag=!_boss,tag=w3,dx=44,dy=32,dz=44] at @s run function enemies_py:0_spawn_enemy

# Spawn wave
execute if score @s room_wave matches 1 positioned ~-22 12 ~-22 as @e[tag=mob,tag=_boss,tag=w1,dx=44,dy=32,dz=44] at @s run function game:room/3_spawn_wave/spawn_boss
execute if score @s room_wave matches 2 positioned ~-22 12 ~-22 as @e[tag=mob,tag=_boss,tag=w2,dx=44,dy=32,dz=44] at @s run function game:room/3_spawn_wave/spawn_boss
execute if score @s room_wave matches 3 positioned ~-22 12 ~-22 as @e[tag=mob,tag=_boss,tag=w3,dx=44,dy=32,dz=44] at @s run function game:room/3_spawn_wave/spawn_boss

# Confing next wave
scoreboard players add @s room_wave 1
