with (instance_create_layer(room_width / 2, room_height / 2, "Instances", obj_player)) is_mercy = true
randomize()

global.this_floor_time = 0
global.objective = "KILL ALL ENEMIES"

index = 0

global.floor_count++

var _wood_layer = layer_get_id("Wood_Floor")
var _wood_layer2 = layer_get_id("Wood_Floor2")
var _fancy_layer = layer_get_id("Fancy_Floor")
if (clamp(global.floor_count, 0, 3) == global.floor_count){
	layer_set_visible(_wood_layer, true)
	layer_set_visible(_fancy_layer, false)
	layer_set_visible(_wood_layer2, false)
	global.max_time = 30
}
else if (clamp(global.floor_count, 3, 6) == global.floor_count){
	layer_set_visible(_fancy_layer, true)
	layer_set_visible(_wood_layer, false)
	layer_set_visible(_wood_layer2, false)
	global.max_time = 35
}
else if (clamp(global.floor_count, 6, 10) == global.floor_count){
	layer_set_visible(_wood_layer2, true)
	layer_set_visible(_wood_layer, false)
	layer_set_visible(_fancy_layer, false)
}

draw_objective = true
alarm[0] = 240


//music
audio_stop_all()
snd = instance_exists(obj_enemy) ? audio_play_sound(bgm_monsters, 1, false) : audio_play_sound(bgm_exit, 1, false)
audio_sound_gain(snd, 0, 0)
audio_sound_gain(snd, 1, 5000)

audio_play_sound(sfx_tower_explosion, 2, false)

