#base robot_giant.pop
#base robot_standard.pop
#base ex_upgrade_click.pop
#base robot_click.pop
#base robot_click_giant.pop
#base robot_hole.pop

WaveSchedule
{
	StartingCurrency		1200
	RespawnWaveTime 		1
	CanBotsAttackWhileInSpawnRoom no

	Mission
	{
		Objective	DestroySentries
		Where	spawnbot
		BeginAtWave	1
		RunForThisManyWaves	8
		InitialCooldown	30
		CooldownTime	40
		TFBot
		{
			Template	T_TFBot_SentryBuster
		}
	}

	// Wave 1 (1000)
	// 1200 + 1000 + 100 (2300)

	Mission
	{
		Objective	Engineer
		Where	spawnbot
		BeginAtWave	1
		RunForThisManyWaves	1
		InitialCooldown	60
		CooldownTime	60
		DesiredCount	1
		TFBot
		{
			Template	T_TFBot_Engineer_Sentry_Teleporter
		}
	}

	Wave
	{
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
		WaitWhenDone	65
		Checkpoint	Yes

		WaveSpawn
		{
			Name	w1_giant
			TotalCurrency	100
			TotalCount	5
			MaxActive	2
			SpawnCount	1
			WaitBeforeStarting	0
			WaitBetweenSpawns	35
			Where	spawnbot
			TFBot
			{
				Template	T_TFBot_Giant_Pyro
				Attributes AlwaysCrit
			}
		}

		WaveSpawn
		{
			Name	w1_wave01
			TotalCurrency	150
			TotalCount	27
			MaxActive	9
			SpawnCount	9
			WaitBeforeStarting	0
			WaitBetweenSpawns	0
			Where	spawnbot
			TFBot
			{
				Template	T_TFBot_Heavy_Penetration
				Skill Expert
			}
		}

		WaveSpawn
		{
			Name	w1_wave02
			WaitForAllSpawned	w1_wave01
			TotalCurrency	150
			TotalCount	10
			MaxActive	5
			SpawnCount	5
			WaitBeforeStarting	0
			WaitBetweenSpawns	0
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Soldier
					Attributes AlwaysCrit
				}
				TFBot
				{
					Template	T_TFBot_Giant_Medic_Uber
				}
				TFBot
				{
					Template	T_TFBot_Sniper_Huntsman_Spammer_Penetration
				}
				TFBot
				{
					Template	T_TFBot_Sniper_Huntsman_Spammer_Penetration
				}
				TFBot
				{
					Template	T_TFBot_Sniper_Huntsman_Spammer_Penetration
				}
			}
		}
		WaveSpawn
		{
			Name	w1_wave02
			WaitForAllSpawned	w1_wave01
			TotalCurrency	100
			TotalCount	4
			MaxActive	2
			SpawnCount	2
			WaitBeforeStarting	10
			WaitBetweenSpawns	5
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Soldier
					Attributes AlwaysCrit
				}
				TFBot
				{
					Template	T_TFBot_Medic
				}
			}
		}
		WaveSpawn
		{
			Name	w1_wave02_superscout
			WaitForAllSpawned	w1_wave01
			TotalCurrency	100
			TotalCount	5
			MaxActive	4
			SpawnCount	2
			WaitBeforeStarting	15
			WaitBetweenSpawns	20
			Where	spawnbot
			TFBot
			{
				Template	T_TFBot_Giant_Scout_Fast
			}
		}

		WaveSpawn
		{
			Name	w1_wave03
			WaitForAllSpawned	w1_wave02
			TotalCurrency	200
			TotalCount	20
			MaxActive	10
			SpawnCount	5
			WaitBeforeStarting	10
			WaitBetweenSpawns	3
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Pyro_Crit
				}
				TFBot
				{
					Template	T_TFBot_Medic
				}
				TFBot
				{
					Template	T_TFBot_Heavy_Penetration
					Skill Expert
				}
				TFBot
				{
					Template	T_TFBot_Heavy_Penetration
					Skill Expert
				}
			}
		}
		
		WaveSpawn
		{
			TotalCurrency	200
			TotalCount	40
			MaxActive	8
			SpawnCount	8
			WaitBeforeStarting	0
			WaitBetweenSpawns	0
			Support	1
			Where	spawnbot
			RandomChoice
			{
		    	TFBot
		    	{
			    	Template    T_TFBot_Soldier_Stun
		    	}
				TFBot
		    	{
			    	Template    T_TFBot_Soldier_DirectHit
		    	}
			}
		}
	}
	
	// Wave 2 (1200)
	// 1200 + 2200 + 200 (3600)

	Mission
	{
		Objective	Spy
		Where	spawnbot_mission_spy
		BeginAtWave	2
		RunForThisManyWaves	1
		InitialCooldown	60
		CooldownTime	60
		DesiredCount	2
		TFBot
		{
			Template	T_TFBot_Spy
		}
	}
	Mission
	{
		Objective	Engineer
		Where	spawnbot
		BeginAtWave	2
		RunForThisManyWaves	1
		InitialCooldown	120
		CooldownTime	60
		DesiredCount	1
		TFBot
		{
			Template	T_TFBot_Engineer_Sentry_Teleporter
		}
	}

	Wave
	{
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
		WaitWhenDone	65
		Checkpoint	Yes

		WaveSpawn
		{
			TotalCurrency	150
			TotalCount	1
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	0
			WaitBetweenSpawns	30
			Where	spawnbot
			FirstSpawnOutput                                                                                                                                                            
			{
				 Target boss_spawn_relay                                            
				 Action Trigger                         
			}

			Tank
			{
				Health 35000
				Speed 75
				Name "tankboss"
				StartingPathTrackNode "boss_path_1"

				OnKilledOutput                                  
				{
					Target boss_dead_relay
					Action Trigger                         
				}
				
				OnBombDroppedOutput                             
				{
					Target boss_deploy_relay 
					Action Trigger                         
				}
			}
		}
		WaveSpawn
		{
			Name	w2_wave01
			TotalCurrency	200
			TotalCount	20
			MaxActive	12
			SpawnCount	4
			WaitBeforeStarting	0
			WaitBetweenSpawns	10
			Where	spawnbot
			TFBot
			{
				Template	T_TFBot_Giant_Demo_Burst
			}
		}
		WaveSpawn
		{
			Name	w2_wave01
			TotalCurrency	100
			TotalCount	20
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	10
			WaitBetweenSpawns	7
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Heavy_Crit
				}
				TFBot
				{
					Template	T_TFBot_Medic_Quickheal
				}
				TFBot
				{
					Template	T_TFBot_Demo_Sticky
				}
				TFBot
				{
					Template	T_TFBot_Demo_Sticky
				}
			}
		}

		WaveSpawn
		{
			Name	w2_wave02_heavyrush
			WaitForAllSpawned	w2_wave01
			TotalCurrency	150
			TotalCount	30
			MaxActive	9
			SpawnCount	3
			WaitBeforeStarting	10
			WaitBetweenSpawns	4
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Heavy_Crit
				}
				TFBot
				{
					Template	T_TFBot_Medic_Quickheal
				}
				TFBot
				{
					Template	T_TFBot_Soldier_Spammer_Backup
				}
			}
		}
		WaveSpawn
		{
			Name	w2_wave02_giant
			WaitForAllSpawned	w2_wave01
			TotalCurrency	100
			TotalCount	4
			MaxActive	2
			SpawnCount	2
			WaitBeforeStarting	40
			WaitBetweenSpawns	25
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Heavy_Flame
					Attributes AlwaysCrit
				}
				TFBot
				{
					Template	T_TFBot_Medic_Quickheal
				}
			}
		}
		WaveSpawn
		{
			Name	w2_wave02
			WaitForAllSpawned	w2_wave01
			TotalCurrency	250
			TotalCount	50
			MaxActive	9
			SpawnCount	3
			WaitBeforeStarting	10
			WaitBetweenSpawns	0
			Where	spawnbot
			TFBot
			{
				Template	T_TFBot_Pyro_Dragon_Hard
			}
		}

		WaveSpawn
		{
			Name	w2_wave03
			WaitForAllSpawned	w2_wave02
			TotalCurrency	150
			TotalCount	30
			MaxActive	10
			SpawnCount	10
			WaitBeforeStarting	0
			WaitBetweenSpawns	0
			Where	spawnbot
			TFBot
			{
				Template	T_TFBot_Heavy_Crit
			}
		}
		WaveSpawn
		{
			Name	w2_wave03
			WaitForAllDead	w2_wave02
			TotalCurrency	100
			TotalCount	8
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	0
			WaitBetweenSpawns	25
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Pyro_Dragon
				}
				TFBot
				{
					Template	T_TFBot_Medic_Quickheal
				}
				TFBot
				{
					Template	T_TFBot_Heavy_Crit
				}
				TFBot
				{
					Template	T_TFBot_Heavy_Crit
				}
			}
		}
	}
	
	// Wave 3 (1400)
	// 1200 + 3600 + 300 (5100)

	Mission
	{
		Objective	Sniper
		Where	spawnbot_mission_sniper
		BeginAtWave	3
		RunForThisManyWaves	1
		InitialCooldown	60
		CooldownTime	30
		DesiredCount	3
		TFBot
		{
			Template	T_TFBot_Sniper_Sydney_Sleeper
		}
	}
	Mission
	{
		Objective	Engineer
		Where	spawnbot
		BeginAtWave	3
		RunForThisManyWaves	1
		InitialCooldown	50
		CooldownTime	50
		DesiredCount	1
		TFBot
		{
			Template	T_TFBot_Engineer_Sentry_Teleporter
		}
	}

	Wave
	{
		WaitWhenDone	65
		Checkpoint	Yes
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}

		WaveSpawn
		{
			TotalCurrency	200
			TotalCount	2
			MaxActive	2
			SpawnCount	1
			WaitBeforeStarting	0
			WaitBetweenSpawns	30
			Where	spawnbot

			FirstSpawnOutput                                                                                                                                                            
			{
				 Target boss_spawn_relay                                            
				 Action Trigger                         
			}

			Tank
			{
				Health 30000
				Speed 75
				Name "tankboss"
				StartingPathTrackNode "boss_path_1"

				OnKilledOutput                                  
				{
					Target boss_dead_relay
					Action Trigger                         
				}
				
				OnBombDroppedOutput                             
				{
					Target boss_deploy_relay 
					Action Trigger                         
				}
			}
		}

		WaveSpawn
		{
			Name	w3_wave01
			TotalCurrency	100
			TotalCount	2
			MaxActive	2
			SpawnCount	2
			WaitBeforeStarting	0
			WaitBetweenSpawns	0
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Heavy_Tomislav
					Attributes AlwaysCrit
					tag special_main_left
				}
				TFBot
				{
					Template	T_TFBot_Giant_Medic_Shield_Extended_QuickHeal
				}
			}
		}
		WaveSpawn
		{
			Name	w3_wave01
			TotalCurrency	100
			TotalCount	4
			MaxActive	4
			SpawnCount	2
			WaitBeforeStarting	10
			WaitBetweenSpawns	20
			Where	spawnbot
			TFBot
			{
				Template	T_TFBot_Giant_Scout_Fast_Expert
			}
		}
		WaveSpawn
		{
			Name	w3_wave01_support
			TotalCurrency	100
			TotalCount	32
			MaxActive	12
			SpawnCount	4
			WaitBeforeStarting	15
			WaitBetweenSpawns	0
			Where	spawnbot
			TFBot
			{
				Template	T_TFBot_Sniper_Huntsman_Penetration
				Attributes AlwaysCrit
			}
		}

		WaveSpawn
		{
			Name	w3_wave02
			WaitForAllSpawned	w3_wave01
			TotalCurrency	100
			TotalCount	2
			MaxActive	2
			SpawnCount	2
			WaitBeforeStarting	5
			WaitBetweenSpawns	0
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Heavy_Tomislav
					Attributes AlwaysCrit
					tag special_main_right
				}
				TFBot
				{
					Template	T_TFBot_Giant_Medic_Shield_Extended_QuickHeal
				}
			}
		}
		WaveSpawn
		{
			Name	w3_wave02
			WaitForAllSpawned	w3_wave01
			TotalCurrency	100
			TotalCount	4
			MaxActive	4
			SpawnCount	2
			WaitBeforeStarting	10
			WaitBetweenSpawns	20
			Where	spawnbot
			TFBot
			{
				Template	T_TFBot_Giant_Scout_Fast_Expert
			}
		}
		WaveSpawn
		{
			Name	w3_wave02_support
			WaitForAllSpawned	w3_wave01_support
			TotalCurrency	200
			TotalCount	40
			MaxActive	12
			SpawnCount	4
			WaitBeforeStarting	5
			WaitBetweenSpawns	0
			Where	spawnbot
			TFBot
			{
				Template	T_TFBot_Scout_Delivery_Hard
			}
		}
		
		WaveSpawn
		{
			WaitForAllSpawned	w3_wave02
			TotalCurrency	100
			TotalCount	1
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	20
			WaitBetweenSpawns	0
			Where	spawnbot

			FirstSpawnOutput                                                                                                                                                            
			{
				 Target boss_spawn_relay                                            
				 Action Trigger                         
			}

			Tank
			{
				Health 30000
				Speed 75
				Name "tankboss"
				StartingPathTrackNode "boss_path_1"

				OnKilledOutput                                  
				{
					Target boss_dead_relay
					Action Trigger                         
				}
				
				OnBombDroppedOutput                             
				{
					Target boss_deploy_relay 
					Action Trigger                         
				}
			}
		}
		WaveSpawn
		{
			Name	w3_wave03
			WaitForAllSpawned	w3_wave02
			TotalCurrency	150
			TotalCount	3
			MaxActive	3
			SpawnCount	3
			WaitBeforeStarting	10
			WaitBetweenSpawns	0
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Heavy_Tomislav
					Attributes AlwaysCrit
					tag nav_prefer_flank_left
				}
				TFBot
				{
					Template	T_TFBot_Giant_Medic_Shield_Extended_QuickHeal
				}
				TFBot
				{
					Template	T_TFBot_Giant_Soldier_Spammer_Conch
				}
			}
		}
		WaveSpawn
		{
			Name	w3_wave03
			WaitForAllSpawned	w3_wave02
			TotalCurrency	150
			TotalCount	3
			MaxActive	3
			SpawnCount	3
			WaitBeforeStarting	20
			WaitBetweenSpawns	0
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Heavy_Tomislav
					Attributes AlwaysCrit
					tag nav_prefer_flank_right
				}
				TFBot
				{
					Template	T_TFBot_Giant_Medic_Shield_Extended_QuickHeal
				}
				TFBot
				{
					Template	T_TFBot_Giant_Soldier_Spammer_Conch
				}
			}
		}
		WaveSpawn
		{
			Name	w3_wave03
			WaitForAllSpawned	w3_wave02
			TotalCurrency	100
			TotalCount	30
			MaxActive	12
			SpawnCount	3
			WaitBeforeStarting	20
			WaitBetweenSpawns	0
			Where	spawnbot
			TFBot
			{
				Template	T_TFBot_Demoknight_BattleAxe
				Attributes AlwaysCrit
			}
		}
	}
	
	// Wave 4 (1200)
	// 1200 + 4800 + 400 (6400)

	Wave
	{
		WaitWhenDone	65
		Checkpoint	Yes
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}

		WaveSpawn
		{
			Name	w4_wave01
			TotalCurrency	120
			TotalCount	24
			MaxActive	12
			SpawnCount	4
			WaitBeforeStarting	0
			WaitBetweenSpawns	0
			Where	spawnbot
			TFBot
			{
				Template	T_TFBot_Demo_Crit
			}
		}

		WaveSpawn
		{
		    Name  w4_wave02_giant
			TotalCurrency	160
			TotalCount	32
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	20
			WaitBetweenSpawns	10
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Soldier_Stun_Spammer
				}
				TFBot
				{
					Template	T_TFBot_Medic_Quickuber_Armored
				}
				TFBot
				{
					Template	T_TFBot_Sniper_SMG_Spammer_Expert
					Attributes AlwaysCrit
				}
				TFBot
				{
					Template	T_TFBot_Sniper_SMG_Spammer_Expert
					Attributes AlwaysCrit	
				}
			}
		}

		WaveSpawn
		{
			Name	w4_wave02
			WaitForAllSpawned	w4_wave01
			TotalCurrency	200
			TotalCount	20
			MaxActive	4
			SpawnCount	2
			WaitBeforeStarting	10
			WaitBetweenSpawns	5
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Pyro_Crit
				}
				TFBot
				{
					Template	T_TFBot_Medic_Armored
				}
			}
		}
		WaveSpawn
		{
			Name	w4_wave02
			WaitForAllDead	w4_wave01
			TotalCurrency	150
			TotalCount	30
			MaxActive	6
			SpawnCount	6
			WaitBeforeStarting	0
			WaitBetweenSpawns	0
			Where	spawnbot
			TFBot
			{
				Template	T_TFBot_Soldier_Crit
			}
		}
		
		WaveSpawn
		{
		    Name  w4_wave03
			WaitForAllSpawned	w4_wave02_giant
			TotalCurrency	160
			TotalCount	16
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	25
			WaitBetweenSpawns	15
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Demo_Bomber_Blast
					Attributes AlwaysCrit
				}
				TFBot
				{
					Template	T_TFBot_Medic_Quickuber_Armored
				}
				TFBot
				{
					Template	T_TFBot_Medic_Quickuber_Armored
				}
				TFBot
				{
					Template	T_TFBot_Medic_Quickuber_Armored
				}
			}
		}

		WaveSpawn
		{
			Name	w4_wave04
			WaitForAllSpawned	w4_wave03
			TotalCurrency	150
			TotalCount	30
			MaxActive	10
			SpawnCount	10
			WaitBeforeStarting	10
			WaitBetweenSpawns	0
			Where	spawnbot
			TFBot
			{
				Template	T_TFBot_Heavy_Deflector_HoH_Hyper
			}
		}
		
		WaveSpawn
		{
			Name	w4_support
			WaitForAllSpawned	w4_wave02
			TotalCurrency	200
			TotalCount	40
			MaxActive	10
			SpawnCount	10
			WaitBeforeStarting	15
			WaitBetweenSpawns	0
			Support	1
			Where	spawnbot
			RandomChoice
			{
				TFBot
				{
					Class Scout
					Skill Expert
					Attributes AlwaysCrit
					Name "Crit Scout"
					Tag	"nav_prefer_flank_right"
				}
				TFBot
				{
					Class Scout
					Skill Expert
					Attributes AlwaysCrit
					Name "Crit Scout"
					Tag	"nav_prefer_flank_left"
				}
			}
		}
		WaveSpawn
		{
			TotalCurrency	60
			TotalCount	20
			MaxActive	4
			SpawnCount	2
			WaitBeforeStarting	0
			WaitBetweenSpawns	20
			Support	1
			Where	spawnbot
			Squad
			{
		    	TFBot
		    	{
			    	Template	T_TFBot_Engineer_Sentry_Tele_Battle_FastBuild
					Health 600
		    	}
				TFBot
		    	{
			    	Template	T_TFBot_Medic_Armored
					ClassIcon medic_uber_armored_giant
		    	}
			}
		}
	}

	// Wave 5 (1600)
	// 1200 + 6400 + 500 (8100)

	Mission
	{
		Objective	Engineer
		Where	spawnbot
		BeginAtWave	5
		RunForThisManyWaves	1
		InitialCooldown	60
		CooldownTime	30
		DesiredCount	2
		TFBot
		{
			Template	T_TFBot_Engineer_Sentry_Teleporter_FastBuild
		}
	}
	Mission
	{
		Objective	Sniper
		Where	spawnbot_mission_sniper
		BeginAtWave	5
		RunForThisManyWaves	1
		InitialCooldown	60
		CooldownTime	50
		DesiredCount	2
		TFBot
		{
			Template	T_TFBot_Sniper_Fullauto
		}
	}

	Wave
	{
		WaitWhenDone	65
		Checkpoint	Yes
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}

		WaveSpawn
		{
			TotalCurrency	100
			TotalCount	1
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	20
			WaitBetweenSpawns	0
			Where	spawnbot

			FirstSpawnOutput                                                                                                                                                            
			{
				 Target boss_spawn_relay                                            
				 Action Trigger                         
			}

			Tank
			{
				Health 50000
				Speed 75
				Name "tankboss"
				StartingPathTrackNode "boss_path_1"

				OnKilledOutput                                  
				{
					Target boss_dead_relay
					Action Trigger                         
				}
				
				OnBombDroppedOutput                             
				{
					Target boss_deploy_relay 
					Action Trigger                         
				}
			}
		}
		
		WaveSpawn
		{
			TotalCurrency	100
			TotalCount	16
			MaxActive	2
			SpawnCount	1
			WaitBeforeStarting	0
			WaitBetweenSpawns	15
			Where	spawnbot
			TFBot
			{
				Template	T_TFBot_Giant_Scout_Baseball_Armored 
				Attributes	AlwaysCrit
			}
		}

		WaveSpawn
		{
			Name	w5_wave01
			TotalCurrency	200
			TotalCount	12
			MaxActive	9
			SpawnCount	3
			WaitBeforeStarting	0
			WaitBetweenSpawns	10
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Soldier_Rocketshotgun_SlowBarrage
					Attributes AlwaysCrit
				}
				TFBot
				{
					Template	T_TFBot_Medic_Shield_Extended
				}
				TFBot
				{
					Template	T_TFBot_Soldier_TankBuster
				}
			}
		}
		WaveSpawn
		{
			Name	w5_wave01
			TotalCurrency	100
			TotalCount	40
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	0
			WaitBetweenSpawns	0
			Where	spawnbot
			Squad
			{
		    	TFBot
		    	{
				    Template	T_TFBot_Demo_Loch_Tankbuster
		    	}
				TFBot
		    	{
				    Template	T_TFBot_Medic_Shield_Quickfix_Extended
		    	}
				TFBot
		    	{
				    Template	T_TFBot_Demo_Loch_Tankbuster
		    	}
				TFBot
		    	{
				    Template	T_TFBot_Demo_Loch_Tankbuster
		    	}
			}
		}

		WaveSpawn
		{
			Name	w5_wave02
			WaitForAllSpawned	w5_wave01
			TotalCurrency	100
			TotalCount	2
			MaxActive	2
			SpawnCount	2
			WaitBeforeStarting	30
			WaitBetweenSpawns	0
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Soldier_Barrage_Hyper
					tag nav_prefer_flank_left
				}
				TFBot
				{
					Template	T_TFBot_Giant_Medic
				}
			}
		}
		WaveSpawn
		{
			Name	w5_wave02
			WaitForAllSpawned	w5_wave01
			TotalCurrency	100
			TotalCount	2
			MaxActive	2
			SpawnCount	2
			WaitBeforeStarting	50
			WaitBetweenSpawns	0
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Soldier_Barrage_Hyper
					tag nav_prefer_flank_right
				}
				TFBot
				{
					Template	T_TFBot_Giant_Medic
				}
			}
		}
		WaveSpawn
		{
			Name	w5_wave02
			WaitForAllSpawned	w5_wave01
			TotalCurrency	100
			TotalCount	2
			MaxActive	2
			SpawnCount	2
			WaitBeforeStarting	70
			WaitBetweenSpawns	0
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Soldier_Barrage_Hyper
					tag special_main_left
				}
				TFBot
				{
					Template	T_TFBot_Giant_Medic
				}
			}
		}
		WaveSpawn
		{
			Name	w5_wave02
			WaitForAllSpawned	w5_wave01
			TotalCurrency	100
			TotalCount	2
			MaxActive	2
			SpawnCount	2
			WaitBeforeStarting	90
			WaitBetweenSpawns	0
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Soldier_Barrage_Hyper
					tag special_main_right
				}
				TFBot
				{
					Template	T_TFBot_Giant_Medic
				}
			}
		}
		WaveSpawn
		{
			Name	w5_wave02_heavy
			WaitForAllSpawned	w5_wave01
			TotalCurrency	100
			TotalCount	24
			MaxActive	4
			SpawnCount	2
			WaitBeforeStarting	30
			WaitBetweenSpawns	8
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Heavy_Dragon
				}
				TFBot
				{
					Template	T_TFBot_Medic_Shield_Extended
				}
			}
		}

		WaveSpawn
		{
			Name	w5_tank02
			WaitForAllDead	w5_wave02
			TotalCurrency	100
			TotalCount	1
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	0
			WaitBetweenSpawns	0
			Where	spawnbot

			FirstSpawnOutput                                                                                                                                                            
			{
				 Target boss_spawn_relay                                            
				 Action Trigger                         
			}

			Tank
			{
				Health 50000
				Speed 75
				Name "tankboss"
				StartingPathTrackNode "boss_path_1"

				OnKilledOutput                                  
				{
					Target boss_dead_relay
					Action Trigger                         
				}
				
				OnBombDroppedOutput                             
				{
					Target boss_deploy_relay 
					Action Trigger                         
				}
			}
		}
		WaveSpawn
		{
			Name	w5_wave03_giant01
			WaitForAllSpawned	w5_wave02
			TotalCurrency	100
			TotalCount	8
			MaxActive	4
			SpawnCount	4
			WaitBeforeStarting	20
			WaitBetweenSpawns	0
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Soldier_Directhit_Barrage_Buff
					Attributes AlwaysCrit
				}
				TFBot
				{
					Template	T_TFBot_Medic_Shield_Extended
				}
			}
		}
		WaveSpawn
		{
			Name	w5_wave03_giant02
			WaitForAllSpawned	w5_wave03_giant01
			TotalCurrency	100
			TotalCount	8
			MaxActive	8
			SpawnCount	2
			WaitBeforeStarting	10
			WaitBetweenSpawns	10
			Where	spawnbot
			Squad
			{
		    	TFBot
		    	{
			     	Template	T_TFBot_Giant_Pyro_Backburner
					tag nav_prefer_flank_right
		    	}
				TFBot
		    	{
			     	Template	T_TFBot_Medic_Shield_Extended
		    	}
			}
		}
		WaveSpawn
		{
			Name	w5_wave03_giant02
			WaitForAllSpawned	w5_wave03_giant01
			TotalCurrency	100
			TotalCount	8
			MaxActive	8
			SpawnCount	2
			WaitBeforeStarting	15
			WaitBetweenSpawns	10
			Where	spawnbot
			Squad
			{
		    	TFBot
		    	{
			     	Template	T_TFBot_Giant_Pyro_Backburner
					tag nav_prefer_flank_left
		    	}
				TFBot
		    	{
			     	Template	T_TFBot_Medic_Shield_Extended
		    	}
			}
		}
		WaveSpawn
		{
			Name	w5_wave03
			WaitForAllSpawned	w5_wave02
			TotalCurrency	200
			TotalCount	60
			MaxActive	12
			SpawnCount	3
			WaitBeforeStarting	20
			WaitBetweenSpawns	0
			Where	spawnbot
			RandomChoice
			{
		    	TFBot
		    	{
			     	Template	T_TFBot_Heavy_Deflector_Crit
		    	}
				TFBot
		    	{
			     	Template	T_TFBot_Heavy_Flame_Crit
		    	}
			}
		}
	}

	// Wave 6 (2000)
	// 1200 + 8400 + 600 (10200)

	Mission
	{
		Objective	Engineer
		Where	spawnbot
		BeginAtWave	6
		RunForThisManyWaves	1
		InitialCooldown	60
		CooldownTime	30
		DesiredCount	1
		TFBot
		{
			Template	T_TFBot_Engineer_Sentry_Teleporter_Armored
			Attributes AlwaysCrit
		}
	}
	Mission
	{
		Objective	Spy
		Where	spawnbot_mission_spy
		BeginAtWave	6
		RunForThisManyWaves	1
		InitialCooldown	40
		CooldownTime	50
		DesiredCount	2
		TFBot
		{
			Template	T_TFBot_Spy_Hyper
		}
	}

	Wave
	{
		WaitWhenDone	65
		Checkpoint	Yes
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}

		WaveSpawn
		{
			Name	w6_wave01
			TotalCurrency	400
			TotalCount	16
			MaxActive	16
			SpawnCount	4
			WaitBeforeStarting	0
			WaitBetweenSpawns	5
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Heavy_Deflector_Flame
					Attributes AlwaysCrit
				}
				TFBot
				{
					Template	T_TFBot_Giant_Medic_Uber_Extended
				}
				TFBot
				{
					Template	T_TFBot_Giant_Soldier_Scatter_Hyper
				}
				TFBot
				{
					Template	T_TFBot_Giant_Soldier_Scatter_Hyper
				}
			}
		}

		WaveSpawn
		{
			Name	w6_wave02_superscout
			WaitForAllDead  w6_wave01
			TotalCurrency	200
			TotalCount	10
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	40
			WaitBetweenSpawns	10
			Where	spawnbot
			TFBot
			{
				Template	T_TFBot_Giant_Scout_Bonk_Baseball
				Attributes AlwaysCrit
			}
		}
		WaveSpawn
		{
			Name	w6_wave02
			WaitForAllDead    w6_wave01
			TotalCurrency	200
			TotalCount	20
			MaxActive	5
			SpawnCount	5
			WaitBeforeStarting	20
			WaitBetweenSpawns	0
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Heavy_Brassbeast_Hyper
					Attributes AlwaysCrit
					tag special_main_left
				}
				TFBot
				{
					Template	T_TFBot_Giant_Medic_Vaccinator_Blast
					Health	4500
				}
				TFBot
				{
					Template	T_TFBot_Demo_Scatter_Hyper
				}
				TFBot
				{
					Template	T_TFBot_Demo_Scatter_Hyper
				}
				TFBot
				{
					Template	T_TFBot_Demo_Scatter_Hyper
				}
			}
		}
		WaveSpawn
		{
			Name	w6_wave02
			WaitForAllDead    w6_wave01
			TotalCurrency	200
			TotalCount	20
			MaxActive	5
			SpawnCount	5
			WaitBeforeStarting	30
			WaitBetweenSpawns	0
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Heavy_Tomislav_Hyper
					Attributes AlwaysCrit
					tag special_main_right
				}
				TFBot
				{
					Template	T_TFBot_Giant_Medic_Vaccinator_Bullet
					Health	4500
				}
				TFBot
				{
					Template	T_TFBot_Soldier_Scatter_Hyper
				}
				TFBot
				{
					Template	T_TFBot_Soldier_Scatter_Hyper
				}
				TFBot
				{
					Template	T_TFBot_Soldier_Scatter_Hyper
				}
			}
		}

		WaveSpawn
		{
		    Name   w6_tank
			WaitForAllSpawned  w6_wave02
			TotalCurrency	200
			TotalCount	1
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	10
			WaitBetweenSpawns	0
			Where	spawnbot
			FirstSpawnOutput                                                                                                                                                            
			{
				 Target boss_spawn_relay                                            
				 Action Trigger                         
			}

			Tank
			{
				Health 50000
				Speed 75
				Name "tankboss"
				StartingPathTrackNode "boss_path_1"

				OnKilledOutput                                  
				{
					Target boss_dead_relay
					Action Trigger                         
				}
				
				OnBombDroppedOutput                             
				{
					Target boss_deploy_relay 
					Action Trigger                         
				}
			}
		}
		WaveSpawn
		{
			Name	w6_wave03
			WaitForAllSpawned  w6_wave02
			TotalCurrency	200
			TotalCount	16
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	20
			WaitBetweenSpawns	5
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Heavy_Shotgun_Burst_Expert
					Attributes AlwaysCrit
				}
				TFBot
				{
					Template	T_TFBot_Medic_Long_Quickfix
				}
			}
		}

		WaveSpawn
		{
			Name	w6_wave04
			WaitForAllSpawned	w6_wave03
			TotalCurrency	400
			TotalCount	8
			MaxActive	8
			SpawnCount	2
			WaitBeforeStarting	20
			WaitBetweenSpawns	20
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Demo_Scatter_Hyper
				}
				TFBot
				{
					Template	T_TFBot_Giant_Medic_Shield_Extended_QuickHeal
				}
			}
		}
		WaveSpawn
		{
			Name	w6_wave04
			WaitForAllDead	w6_wave03
			TotalCurrency	100
			TotalCount	20
			MaxActive	4
			SpawnCount	4
			WaitBeforeStarting	0
			WaitBetweenSpawns	0
			Support	1
			Where	spawnbot
			TFBot
			{
				Template	T_TFBot_Scout_Hyper_Bonk
			}
		}
	
		WaveSpawn
		{
			Name	w6_support
			WaitForAllDead	w6_wave01
			TotalCurrency	100
			TotalCount	48
			MaxActive	8
			SpawnCount	8
			WaitBeforeStarting	0
			WaitBetweenSpawns	0
			Support	1
			Where	spawnbot
			TFBot
			{
				Template	T_TFBot_Scout_Hyper_Bonk
			}
		}
	}
	
	// Wave 7 (2000)
	// 1200 + 10400 + 700 (12300)

	Mission
	{
		Objective	Engineer
		Where	spawnbot
		BeginAtWave	7
		RunForThisManyWaves	1
		InitialCooldown	60
		CooldownTime	30
		DesiredCount	2
		TFBot
		{
			Template	T_TFBot_Engineer_Sentry_Teleporter_Hyper
		}
	}

	Wave
	{
		WaitWhenDone	65
		Checkpoint	Yes
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}

		WaveSpawn
		{
			Name	w7_tank
			TotalCurrency	1200
			TotalCount	6
			MaxActive	4
			SpawnCount	1
			WaitBeforeStarting	0
			WaitBetweenSpawns	30
			Where	spawnbot
			Tank
			{
				Health	45000
				Name	Tank
				Speed	75
				StartingPathTrackNode	boss_path_a1
				OnKilledOutput
				{
					Target	boss_dead_relay
					Action	Trigger
				}
				OnBombDroppedOutput
				{
					Target	boss_deploy_relay
					Action	Trigger
				}
			}
		}

		WaveSpawn
		{
			Name	w7_wave01
			TotalCurrency	100
			TotalCount	8
			MaxActive	4
			SpawnCount	2
			WaitBeforeStarting	10
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Demo_Spammer_Burst_Hyper
					Attributes AlwaysCrit
				}
				TFBot
				{
					Template	T_TFBot_Medic_Quickheal
				}
			}
		}
		WaveSpawn
		{
			Name	w7_wave01
			TotalCurrency	200
			TotalCount	80
			MaxActive	16
			SpawnCount	4
			WaitBeforeStarting	0
			WaitBetweenSpawns	0
			Where	spawnbot
			RandomChoice
			{
				TFBot
				{
					Template	T_TFBot_Soldier_Burst_Hyper
				}
				TFBot
				{
					Template	T_TFBot_Soldier_Burst_Hyper
				}
				TFBot
		    	{
			     	Template	T_TFBot_Pyro_Hyper
		     	}
				TFBot
		    	{
			     	Template	T_TFBot_Pyro_Hyper
		     	}
				TFBot
		    	{
			    	Template	T_TFBot_Heavy_Penetration
			    	Attributes	AlwaysCrit
					ItemAttributes
		        	{
			        	ItemName	"Iron Curtain"
			         	"projectile penetration"	1
						"damage bonus"	3.0
		         	}
		    	}
				TFBot
		    	{
			    	Template	T_TFBot_Heavy_Penetration
			    	Attributes	AlwaysCrit
					ItemAttributes
		        	{
			        	ItemName	"Iron Curtain"
			         	"projectile penetration"	1
						"damage bonus"	3.0
		         	}
		    	}
			}
		}

		WaveSpawn
		{
			Name	w7_wave02
			WaitForAllSpawned	w7_wave01
			TotalCurrency	100
			TotalCount	8
			MaxActive	4
			SpawnCount	2
			WaitBeforeStarting	20
			WaitBetweenSpawns	20
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Soldier_Burst_Spammer_Hyper
					Attributes AlwaysCrit
				}
				TFBot
				{
					Template	T_TFBot_Medic_Quickheal
				}
			}
		}
		WaveSpawn
		{
			Name	w7_wave02
			WaitForAllSpawned	w7_wave01
			TotalCurrency	200
			TotalCount	80
			MaxActive	16
			SpawnCount	4
			WaitBeforeStarting	20
			WaitBetweenSpawns	0
			Where	spawnbot
			RandomChoice
			{
				TFBot
				{
					Template	T_TFBot_Scout_Blaster_Hyper
					Attributes AlwaysCrit
				}
				TFBot
				{
					Template	T_TFBot_Scout_Blaster_Hyper
					Attributes AlwaysCrit
				}
				TFBot
		    	{
			     	Template	T_TFBot_Demo_Burst_Hyper
		     	}
				TFBot
		    	{
			     	Template	T_TFBot_Demo_Burst_Hyper
		     	}
				TFBot
		    	{
			    	Template	T_TFBot_Heavy_Deflector_Pusher
			    	Attributes	AlwaysCrit
					ItemAttributes
					{
						ItemName	deflector
						"attack projectiles"	2
						"damage causes airblast"	1
						"damage bonus"	3
					}
		    	}
				TFBot
		    	{
			    	Template	T_TFBot_Heavy_Deflector_Pusher
			    	Attributes	AlwaysCrit
					ItemAttributes
					{
						ItemName	deflector
						"attack projectiles"	2
						"damage causes airblast"	1
						"damage bonus"	3
					}
		    	}
			}
		}

		WaveSpawn
		{
			Name	w7_wave03
			WaitForAllSpawned	w7_wave02
			TotalCurrency	100
			TotalCount	10
			MaxActive	10
			SpawnCount	2
			WaitBeforeStarting	20
			WaitBetweenSpawns	5
			Where	spawnbot

			RandomChoice
			{
				TFBot
				{
					Template	T_TFBot_Giant_Scout_Blaster_Hyper_Armored
					Attributes AlwaysCrit
					tag nav_prefer_flank_left
				}
				TFBot
				{
					Template	T_TFBot_Giant_Scout_Blaster_Hyper_Armored
					Attributes AlwaysCrit
					tag nav_prefer_flank_right
				}
			}
		}
		WaveSpawn
		{
			Name	w7_lasttank
			WaitForAllSpawned	w7_wave03
			TotalCurrency	100
			TotalCount	1
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	0
			WaitBetweenSpawns	0
			Where	spawnbot
			Tank
			{
				Health	160000
				Name	Tank
				Speed	75
				Skin	1
				StartingPathTrackNode	boss_path_a1
				OnKilledOutput
				{
					Target	boss_dead_relay
					Action	Trigger
				}
				OnBombDroppedOutput
				{
					Target	boss_deploy_relay
					Action	Trigger
				}
			}
		}
	}
	
	// Wave 8 (600)
	// 1200 + 11000 + 700 (12900)

	Mission
	{
		Objective	Sniper
		Where	spawnbot_mission_sniper
		BeginAtWave	8
		RunForThisManyWaves	1
		InitialCooldown	10
		CooldownTime	10
		DesiredCount	6
		TFBot
		{
			Template	T_TFBot_Sniper_Deathray
		}
	}
	Mission
	{
		Objective	Spy
		Where	spawnbot_mission_spy
		BeginAtWave	8
		RunForThisManyWaves	1
		InitialCooldown	20
		CooldownTime	10
		DesiredCount	6
		TFBot
		{
			Template	T_TFBot_Spy_Hyper
		}
	}

	Wave
	{
		StartWaveOutput
		{
			Target	wave_start_relay_boss
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
		WaitWhenDone	65
		Checkpoint	Yes

		WaveSpawn
		{
			Name w8_fakeboss
			TotalCurrency	600
			TotalCount	1
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	0
			WaitBetweenSpawns	0
			Where	spawnbot
			TFBot
			{
				Template T_TFBot_Chief_Gauntlet
				Attributes AlwaysCrit
		    	Name "Ultra Captain Punch?"
		    }
		}

		WaveSpawn
		{
			Name w8_realboss
			WaitForAllDead w8_fakeboss
			TotalCurrency	0
			TotalCount	1
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	10
			WaitBetweenSpawns	0
			Where	spawnbot
			TFBot
			{
				Name "The Real Captain"
				Class Heavyweapons
				ClassIcon heavy_chief
				Health 90000
				Scale 1.9
				ForceRomeVision 1  
				AimTrackingInterval 0  

				// Cycle states
				ChangeAttributes  
				{
					Name "Shotgun"
					Delay 0
					Repeats 1
					IfHealthBelow 75000
				}
				ChangeAttributes  
				{
					Name "Minigun"
					Delay 0
					Repeats 1
					IfHealthBelow 60000
				}
				ChangeAttributes  
				{
					Name "Shotgun"
					Delay 0
					Repeats 1
					IfHealthBelow 45000
				}
				ChangeAttributes  
				{
					Name "Minigun"
					Delay 0
					Repeats 1
					IfHealthBelow 30000
				}
				ChangeAttributes  
				{
					Name "Shotgun"
					Delay 0
					Repeats 1
					IfHealthBelow 15000
				}

				EventChangeAttributes
				{
					Default // Same as Minigun
					{
						Skill Expert
						Item "Iron Curtain"
						Item "War Head"
						WeaponRestrictions PrimaryOnly
						Attributes AlwaysCrit
						Attributes MiniBoss
						Attributes UseBossHealthBar
								
						ItemAttributes
						{
							ItemName "Iron Curtain"
							"damage bonus" 3.0
							"attack projectiles" 2
							"damage causes airblast" 1
							"projectile penetration" 1
						}
						CharacterAttributes
						{
							"move speed bonus"	0.4
							"damage force reduction" 0.3
							"airblast vulnerability multiplier" 0.3
							"override footstep sound set" 2
							"airblast vertical vulnerability multiplier" 0.1
							"rage giving scale" 0.1
						}
					}

					Minigun
					{
						Skill Expert
						Item "Iron Curtain"
						Item "War Head"
						WeaponRestrictions PrimaryOnly
						Attributes AlwaysCrit
						Attributes MiniBoss
						Attributes UseBossHealthBar
								
						ItemAttributes
						{
							ItemName "Iron Curtain"
							"damage bonus" 3.0
							"attack projectiles" 2
							"damage causes airblast" 1
							"projectile penetration" 1
						}
						CharacterAttributes
						{
							"move speed bonus"	0.4
							"health regen"	250
							"damage force reduction" 0.3
							"airblast vulnerability multiplier" 0.3
							"override footstep sound set" 2
							"airblast vertical vulnerability multiplier" 0.1
							"rage giving scale" 0.1
						}
					}

					Shotgun
					{
						Skill Expert
						Item "Iron Curtain"
						Item "War Head"
						WeaponRestrictions SecondaryOnly
						Attributes AlwaysCrit
						Attributes HoldFireUntilFullReload
						Attributes MiniBoss
						Attributes UseBossHealthBar
								
						ItemAttributes
						{
							ItemName "TF_WEAPON_SHOTGUN_HWG"
							"damage bonus" 100
						}
						CharacterAttributes
						{
							"move speed bonus"	0.4
							"health regen"	250
							"damage force reduction" 0.3
							"airblast vulnerability multiplier" 0.3
							"override footstep sound set" 2
							"airblast vertical vulnerability multiplier" 0.1
							"rage giving scale" 0.1
						}
					}
				}
		    }
		}
		WaveSpawn
		{
			Name w8_support
			WaitForAllDead w8_fakeboss
			TotalCurrency	0
			TotalCount	40
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	10
			WaitBetweenSpawns	0
			Where	spawnbot
			Support 1
			TFBot
			{
				Template T_TFBot_Heavy_Juggernaut_Minigun
		    }
		}
	}
}