//	Mission designer: Lyney
//  Map Designer: Signalmax

#base robot_giant.pop
#base robot_standard.pop
#base robot_lyney.pop
//#base class_restrict.pop
//#base canteen_restrict.pop
//#base breakcapupgrade_lyney.pop
//#base judge_restricts.pop

// WAVE 1 Current Money: 900$
// WAVE 2 Current Money: 900$ + 1100$ + 100$ Bonus = 2100$ (No Bonus: 2000$)
// WAVE 3 Current Money: 2100$ + 900$ + 100$ Bonus = 3100$ (No Bonus: 2900$)
// WAVE 4 Current Money: 3100$ + 900$ + 100$ Bonus = 4100$ (No Bonus: 3800$)
// WAVE 5 Current Money: 4100$ + 900$ + 100$ Bonus = 5100$ (No Bonus: 4700$)
// Total Possible Money: 5100$ + 900$ = 6000$ (No Bonus: 5600$)

WaveSchedule
{
	StartingCurrency 900
	RespawnWaveTime 4
	CanBotsAttackWhileInSpawnRoom no
	Advanced 1
	
	//DisableSound "music.mvm_lost_wave" 
	//DisableSound "music.mvm_end_last_wave"
	//PrecacheSound "lament_et_tri_up8db.mp3"
	//PrecacheSound "lament_et_tri_end_up8db.mp3"

	//DisallowUpgrade "building instant upgrade"
	//DisallowUpgrade "generate rage on heal"
	//DisallowUpgrade "explosive sniper shot"
	//RespecEnabled 0
	
	Mission
	{
		Objective DestroySentries

		InitialCooldown 10
		Where spawnbot
		BeginAtWave 1
		RunForThisManyWaves 9
		CooldownTime 40

        TFBot
	    {
		    Template T_TFBot_SentryBuster
		    Attributes DisableDodge
        }
	}
	
	Mission
	{
		Objective Spy

		InitialCooldown 30
		Where spawnbot_mission_spy
		BeginAtWave 1
		RunForThisManyWaves 1
		CooldownTime 55
		DesiredCount 1
		
		TFBot
		{
			Class Spy
			Skill Normal
		}
	}
	
	Mission
	{
		Objective Sniper

		InitialCooldown 30
		Where spawnbot_mission_Sniper
		BeginAtWave 3
		RunForThisManyWaves 1
		CooldownTime 40
		DesiredCount 2
		
		TFBot
		{
			Class Sniper
			Skill Hard
		}
	}
	
	Mission
	{
		Objective Sniper

		InitialCooldown 30
		Where spawnbot_mission_Sniper
		BeginAtWave 5
		RunForThisManyWaves 1
		CooldownTime 40
		DesiredCount 2
		
		TFBot
		{
			Class Sniper
			Skill Hard
		}
	}
	
	Mission
	{
		Objective Spy

		InitialCooldown 60
		Where spawnbot_mission_spy
		BeginAtWave 5
		RunForThisManyWaves 1
		CooldownTime 48
		DesiredCount 2
		
		TFBot
		{
			Class Spy
			Skill Hard
		}
	}
	
	Wave // Wave 1 (1100$)
	{
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
		InitWaveOutput
		{
			Target wave_start_relay
			Action RunScriptCode
			Param
			"
				EntFire(`bombpath_choose_relay`, `Kill`)
				EntFire(`bombpath_clearall_relay`, `Trigger`)
				EntFire(`bombpath_right_arrows`, `TurnOff`)
                EntFire(`bombpath_left`, `Trigger`)
				ClientPrint(null,3,`\x08FF54F1FFThis mission, The bomb will take a unique path for each wave!`)
			"
		}
		
		WaveSpawn
		{
			Name "1a"

			Where spawnbot
			TotalCount 36
			MaxActive 7
			SpawnCount 3
			WaitBeforeStarting 0
			WaitBetweenSpawns 3
			TotalCurrency 100
			
			TFBot
			{
				Class Scout
				Skill Easy
			}
		}
		
		WaveSpawn
		{
			Name "1a"

			Where spawnbot
			TotalCount 15
			MaxActive 6
			SpawnCount 3
			WaitBeforeStarting 3
			WaitBetweenSpawns 6
			TotalCurrency 100
			
			TFBot
			{
				Class Soldier
				Skill Normal
			}
		}
		
		WaveSpawn
		{
			Name "1a"

			Where spawnbot_flank
			TotalCount 2
			MaxActive 2
			SpawnCount 1
			WaitBeforeStarting 10
			WaitBetweenSpawns 20
			TotalCurrency 150
			
			TFBot
			{
				Template T_TFBot_Giant_Huntsman
			}
		}
		
		WaveSpawn
		{
			Name "1b"
			WaitForAllSpawned "1a"
			
			Where spawnbot_flank
			TotalCount 2
			MaxActive 2
			SpawnCount 2
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 50
			
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Soldier_TwinRocket
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Attributes IgnoreEnemies
					Name "Quick-Uber Medic"
				}
			}
		}
		
		WaveSpawn
		{
			Name "1b"
			WaitForAllDead "1a"

			Where spawnbot
			TotalCount 20
			MaxActive 10
			SpawnCount 4
			WaitBeforeStarting 0
			WaitBetweenSpawns 5
			TotalCurrency 200
			
			Squad
			{
				ShouldPreserveSquad 1
				
				TFBot
				{
					Class Soldier
					Skill Normal
				}
				TFBot
				{
					Class Soldier
					Skill Normal
				}
				TFBot
				{
					Class Soldier
					Skill Normal
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Attributes IgnoreEnemies
					Name "Quick-Uber Medic"
				}
			}
		}
		
		WaveSpawn
		{
			Name "1b"
			WaitForAllDead "1a"

			Where spawnbot
			TotalCount 24
			MaxActive 8
			SpawnCount 3
			WaitBeforeStarting 0
			WaitBetweenSpawns 4
			TotalCurrency 200
			
			TFBot
			{
				Template T_TFBot_Demoman_Knight
			}
		}
		
		WaveSpawn
		{
			Name "1c"
			WaitForAllSpawned "1b"
			
			Where spawnbot
			TotalCount 2
			MaxActive 2
			SpawnCount 2
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 50
			
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Soldier_TwinRocket
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Attributes IgnoreEnemies
					Name "Quick-Uber Medic"
				}
			}
		}
		
		WaveSpawn
		{
			Name "1c"
			WaitForAllDead "1b"

			Where spawnbot
			TotalCount 18
			MaxActive 9
			SpawnCount 6
			WaitBeforeStarting 0
			WaitBetweenSpawns 4
			TotalCurrency 100
			
			Support Limited
			
			TFBot
			{
				Class Pyro
				Skill Easy
			}
		}
		
		WaveSpawn
		{
			Name "1c"
			WaitForAllDead "1b"

			Where spawnbot
			TotalCount 20
			MaxActive 8
			SpawnCount 5
			WaitBeforeStarting 0
			WaitBetweenSpawns 4.5
			TotalCurrency 100
			
			Support Limited
			
			TFBot
			{
				Class Scout
				Skill Easy
			}
		}
		
		WaveSpawn
		{
			Name "1c"
			WaitForAllDead "1b"
			
			Where spawnbot_flank2
			TotalCount 2
			MaxActive 2
			SpawnCount 2
			WaitBeforeStarting 8
			WaitBetweenSpawns 0
			TotalCurrency 50
			
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Soldier_TwinRocket
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Attributes IgnoreEnemies
					Name "Quick-Uber Medic"
				}
			}
		}
	}
	
	Wave // Wave 2 (1000$)
	{
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
		InitWaveOutput
		{
			Target wave_start_relay
			Action RunScriptCode
			Param 
			"
				EntFire(`bombpath_choose_relay`, `Kill`)
				EntFire(`bombpath_clearall_relay`, `Trigger`)
				EntFire(`bombpath_left_arrows`, `TurnOff`)
				EntFire(`bombpath_right_arrows`, `TurnOn`)
                EntFire(`bombpath_right`, `Trigger`)
				IncludeScript(`disablesquad`)
            "
		}
		
		WaveSpawn
		{
			Name "2a-Support"

			Where spawnbot_flank
			TotalCount 2
			MaxActive 2
			SpawnCount 2
			WaitBeforeStarting 30
			WaitBetweenSpawns 40
			TotalCurrency 0
			
			Support 1
			
			TFBot
			{
				Template T_TFBot_Soldier_DirectHit
			}
		}
		
		WaveSpawn
		{
			Name "2a"

			Where spawnbot_flank
			TotalCount 20
			MaxActive 8
			SpawnCount 2
			WaitBeforeStarting 3
			WaitBetweenSpawns 3
			TotalCurrency 20
			
			TFBot
			{
				Template T_TFBot_Sniper_Huntsman
			}
		}
		
		WaveSpawn
		{
			Name "2a"

			Where spawnbot
			TotalCount 16
			MaxActive 8
			SpawnCount 4
			WaitBeforeStarting 5
			WaitBetweenSpawns 5
			TotalCurrency 80
			
			Squad
			{
				TFBot
				{
					Template T_TFBot_Pyro_Shotgun
					Tag disband_squad
				}
				TFBot
				{
					Template T_TFBot_Pyro_Shotgun
					Tag disband_squad
				}
				TFBot
				{
					Template T_TFBot_Soldier_Shotgun
					Tag disband_squad
				}
				TFBot
				{
					Template T_TFBot_Heavyweapons_Shotgun
					Name "Shotgun Heavy"
					Tag disband_squad
				}
			}
		}
		
		WaveSpawn
		{
			Name "2a"

			Where spawnbot
			TotalCount 1
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 50
			
			TFBot
			{
				Template T_TFBot_Giant_Scout_Baseball
			}
		}
		
		WaveSpawn
		{
			Name "2a-giant-scout"
			WaitForAllSpawned "2a"

			Where spawnbot_flank
			TotalCount 1
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 50
			
			TFBot
			{
				Template T_TFBot_Giant_Scout_Baseball
			}
		}
		
		WaveSpawn
		{
			Name "2b"
			WaitForAllSpawned "2a"

			Where spawnbot_flank2
			TotalCount 20
			MaxActive 6
			SpawnCount 4
			WaitBeforeStarting 0
			WaitBetweenSpawns 3
			TotalCurrency 100
			
			TFBot
			{
				Template T_TFBot_Demoman_LochNLoad
			}
		}
		
		WaveSpawn
		{
			Name "2b"
			WaitForAllSpawned "2a"

			Where spawnbot_flank2
			TotalCount 20
			MaxActive 8
			SpawnCount 5
			WaitBeforeStarting 4
			WaitBetweenSpawns 4
			TotalCurrency 100
			
			TFBot
			{
				Template T_TFBot_Pyro_Flaregun
				Skill Hard
				Name "Flare Gun Pyro"
			}
		}
		
		WaveSpawn
		{
			Name "2b"
			WaitForAllSpawned "2a"

			Where spawnbot_flank
			TotalCount 2
			MaxActive 2
			SpawnCount 2
			WaitBeforeStarting 4
			WaitBetweenSpawns 0
			TotalCurrency 100
			
			Squad
			{
				FormationSize 100
				
				TFBot
				{
					Template T_TFBot_Giant_Soldier_Spammer_Reload
				}
				TFBot
				{
					Template T_TFBot_Medic_BigHeal_Armored
					Attributes IgnoreEnemies
					CharacterAttributes
					{
						"move speed bonus"	1.5
						"cannot pick up intelligence" 1
					}
				}
			}
		}
		
		WaveSpawn
		{
			Name "2c"
			WaitForAllSpawned "2b"

			Where spawnbot
			TotalCount 5
			MaxActive 5
			SpawnCount 5
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 100
			
			Squad
			{
				FormationSize 100
				
				TFBot
				{
					Template T_TFBot_Heavyweapons_Heater
					Name "Giant Heater Heavy"
				}
				TFBot
				{
					Template T_TFBot_Pyro_Flaregun
					Skill Hard
					Name "Flare Gun Pyro"
				}
				TFBot
				{
					Template T_TFBot_Pyro_Flaregun
					Skill Hard
					Name "Flare Gun Pyro"
				}
				TFBot
				{
					Template T_TFBot_Pyro_Flaregun
					Skill Hard
					Name "Flare Gun Pyro"
				}
				TFBot
				{
					Template T_TFBot_Medic_BigHeal_Armored
					Attributes IgnoreEnemies
					CharacterAttributes
					{
						"move speed bonus"	1.5
						"cannot pick up intelligence" 1
					}
				}
			}
		}
		
		WaveSpawn
		{
			Name "2c"
			WaitForAllDead "2b"

			Where spawnbot_flank2
			TotalCount 15
			MaxActive 6
			SpawnCount 3
			WaitBeforeStarting 10
			WaitBetweenSpawns 4
			TotalCurrency 60
			
			TFBot
			{
				Template T_TFBot_Scout_Pistol
				Skill Normal
			}
		}
		
		WaveSpawn
		{
			Name "2c"
			WaitForAllDead "2b"

			Where spawnbot_flank2
			TotalCount 16
			MaxActive 7
			SpawnCount 1
			WaitBeforeStarting 10
			WaitBetweenSpawns 1
			TotalCurrency 40
			
			TFBot
			{
				Template T_TFBot_Pyro_Flaregun
				Skill Hard
				Name "Flare Gun Pyro"
			}
		}
		
		WaveSpawn
		{
			Name "2c"
			WaitForAllDead "2b"

			Where spawnbot
			TotalCount 5
			MaxActive 5
			SpawnCount 5
			WaitBeforeStarting 15
			WaitBetweenSpawns 0
			TotalCurrency 100
			
			Squad
			{
				FormationSize 100
				
				TFBot
				{
					Template T_TFBot_Heavyweapons_Heater
					Name "Giant Heater Heavy"
				}
				TFBot
				{
					Template T_TFBot_Pyro_Flaregun
					Skill Hard
					Name "Flare Gun Pyro"
				}
				TFBot
				{
					Template T_TFBot_Pyro_Flaregun
					Skill Hard
					Name "Flare Gun Pyro"
				}
				TFBot
				{
					Template T_TFBot_Pyro_Flaregun
					Skill Hard
					Name "Flare Gun Pyro"
				}
				TFBot
				{
					Template T_TFBot_Medic_BigHeal_Armored
					Attributes IgnoreEnemies
					CharacterAttributes
					{
						"move speed bonus"	1.5
						"cannot pick up intelligence" 1
					}
				}
			}
		}
		
		WaveSpawn
		{
			Name "2c-giant"
			WaitForAllSpawned "2c"

			Where spawnbot
			TotalCount 2
			MaxActive 2
			SpawnCount 2
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 100
			
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Scout_Spammer_Reload_Armored_6Clip
					Skill Normal
				}
				TFBot
				{
					Template T_TFBot_Giant_Medic_Regen
					Attributes IgnoreEnemies
					Name "Giant Regen Medic"
					CharacterAttributes
					{
						"move speed bonus"	1.5
						"cannot pick up intelligence" 1
					}
				}
			}
		}
		
		//WaveSpawn
		//{
			//Name "2c-pyro"
			//WaitForAllSpawned "2c"

			//Where spawnbot
			//TotalCount 16
			//MaxActive 7
			//SpawnCount 1
			//WaitBeforeStarting 0
			//WaitBetweenSpawns 1
			//TotalCurrency 50
			
			//Support Limited
			
			//TFBot
			//{
				//Class Pyro
				//Skill Easy
				//ClassIcon pyro_support
			//}
		//}
	}
	
	Wave // Wave 3 (900$)
	{
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
		InitWaveOutput
		{
			Target wave_start_relay
			Action RunScriptCode
			Param 
			"
				EntFire(`bombpath_choose_relay`, `Kill`)
				EntFire(`bombpath_clearall_relay`, `Trigger`)
				EntFire(`bombpath_left_arrows`, `TurnOff`)
				EntFire(`bombpath_right_arrows`, `TurnOn`)
                EntFire(`bombpath_right`, `Trigger`)
            "
		}
		
		WaveSpawn
		{
			Name "3a"

			Where spawnbot
			TotalCount 3
			MaxActive 3
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 15
			TotalCurrency 60
			
			TFBot
			{
				Template T_TFBot_Giant_Demo_RapidFire_FixIcons
			}
		}
		
		WaveSpawn
		{
			Name "3a"

			Where spawnbot
			TotalCount 28
			MaxActive 10
			SpawnCount 2
			WaitBeforeStarting 3
			WaitBetweenSpawns 2
			TotalCurrency 100

			TFBot
			{
				Template T_TFBot_Demoman_Sticky
			}
		}
		
		WaveSpawn
		{
			Name "3a"

			Where spawnbot
			TotalCount 5
			MaxActive 3
			SpawnCount 1
			WaitBeforeStarting 5
			WaitBetweenSpawns 5
			TotalCurrency 40
			
			TFBot
			{
				Template T_TFBot_Soldier_Armored_Burst
			}
		}
		
		WaveSpawn
		{
			Name "3b-Tank"
			WaitForAllSpawned "3a"

			TotalCount 1
			WaitBeforeStarting 0
			TotalCurrency 150
			FirstSpawnWarningSound	"mvm\mvm_tank_start.wav"
			
			Tank
			{
				Health 20000
				Name "tankboss"
				Speed 75
				StartingPathTrackNode tankpath_right_1
				OnKilledOutput
				{
					Target boss_dead_relay
					Action Trigger
				}
				OnBombDroppedOutput
				{
					Target boss_deploy_relay
					Action Trigger
				}
			}
		}
		
		WaveSpawn
		{
			Name "3b"
			WaitForAllDead "3a"

			Where spawnbot_flank
			TotalCount 1
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 50
			
			TFBot
			{
				Template T_TFBot_Giant_Demoman_Battalion
			}
		}
		
		WaveSpawn
		{
			Name "3b"
			WaitForAllDead "3a"

			Where spawnbot
			Where spawnbot_flank
			TotalCount 20
			MaxActive 8
			SpawnCount 4
			WaitBeforeStarting 3
			WaitBetweenSpawns 5
			TotalCurrency 100
			
			TFBot
			{
				Template T_TFBot_Soldier_Bison
				Skill Normal
			}
		}
		
		WaveSpawn
		{
			Name "3b"
			WaitForAllDead "3a"

			Where spawnbot
			TotalCount 5
			MaxActive 5
			SpawnCount 5
			WaitBeforeStarting 25
			WaitBetweenSpawns 0
			TotalCurrency 100
			
			Squad
			{
				FormationSize 100
				
				TFBot
				{
					Template T_TFBot_Giant_Pyro_Dragon_Fury
				}
				TFBot
				{
					Template T_TFBot_Giant_Medic_Regen
					Attributes IgnoreEnemies
					Name "Giant Regen Medic"
					CharacterAttributes
					{
						"move speed bonus"	1.5
						"cannot pick up intelligence" 1
					}
				}
				TFBot
				{
					Template T_TFBot_Pyro_Airblast
				}
				TFBot
				{
					Template T_TFBot_Pyro_Airblast
				}
				TFBot
				{
					Template T_TFBot_Pyro_Airblast
				}
			}
		}
		
		WaveSpawn
		{
			Name "3c-Support"
			WaitForAllDead "3b"

			Where spawnbot_flank
			TotalCount 48
			MaxActive 5
			SpawnCount 4
			WaitBeforeStarting 0
			WaitBetweenSpawns 7
			TotalCurrency 50
			
			Support 1
			
			TFBot
			{
				Template T_TFBot_Soldier_Shovel
				Attributes AlwaysCrit
			}
		}
		
		WaveSpawn
		{
			Name "3c"
			WaitForAllDead "3b"

			Where spawnbot
			TotalCount 24
			MaxActive 9
			SpawnCount 3
			WaitBeforeStarting 0
			WaitBetweenSpawns 2
			TotalCurrency 50
			
			TFBot
			{
				Class Soldier
				Skill Normal
			}
		}
		
		WaveSpawn
		{
			Name "3c"
			WaitForAllDead "3b"

			Where spawnbot_flank
			TotalCount 10
			MaxActive 6
			SpawnCount 2
			WaitBeforeStarting 5
			WaitBetweenSpawns 4
			TotalCurrency 50
			
			TFBot
			{
				Template T_TFBot_Heavyweapons_Fist
			}
		}
		
		WaveSpawn
		{
			Name "3c-giant"
			WaitForAllSpawned "3c"

			Where spawnbot
			TotalCount 5
			MaxActive 5
			SpawnCount 5
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 100
			
			Squad
			{
				FormationSize 100
				
				TFBot
				{
					Template T_TFBot_Giant_Pyro_Dragon_Fury
				}
				TFBot
				{
					Template T_TFBot_Giant_Medic_Regen
					Attributes IgnoreEnemies
					Name "Giant Regen Medic"
					CharacterAttributes
					{
						"move speed bonus"	1.5
						"cannot pick up intelligence" 1
					}
				}
				TFBot
				{
					Template T_TFBot_Pyro_Airblast
				}
				TFBot
				{
					Template T_TFBot_Pyro_Airblast
				}
				TFBot
				{
					Template T_TFBot_Pyro_Airblast
				}
			}
		}
		
		WaveSpawn
		{
			Name "3c-Bowman"
			WaitForAllSpawned "3c"

			Where spawnbot
			TotalCount 25
			MaxActive 8
			SpawnCount 5
			WaitBeforeStarting 0
			WaitBetweenSpawns 7
			TotalCurrency 50
			
			Support Limited
			
			TFBot
			{
				Template T_TFBot_Soldier_Bison
				Skill Normal
			}
		}
	}
	
	Wave // Wave 4 (900$)
	{
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
		InitWaveOutput
		{
			Target wave_start_relay
			Action RunScriptCode
			Param
			"
				EntFire(`bombpath_choose_relay`, `Kill`)
				EntFire(`bombpath_clearall_relay`, `Trigger`)
				EntFire(`bombpath_right_arrows`, `TurnOff`)
				EntFire(`bombpath_left_arrows`, `TurnOn`)
                EntFire(`bombpath_left`, `Trigger`)
			"
		}
		
		WaveSpawn
		{
			Name "4a"

			Where spawnbot_flank2
			TotalCount 3
			MaxActive 3
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 15
			TotalCurrency 30
			
			TFBot
			{
				Template T_TFBot_Giant_Scout_Fast
			}
		}
		
		WaveSpawn
		{
			Name "4a"

			Where spawnbot
			TotalCount 27
			MaxActive 9
			SpawnCount 1
			WaitBeforeStarting 3
			WaitBetweenSpawns 1
			TotalCurrency 50
			
			TFBot
			{
				Template T_TFBot_Pyro_DF
			}
		}
		
		WaveSpawn
		{
			Name "4a-support"

			Where spawnbot
			TotalCount 3
			MaxActive 3
			SpawnCount 3
			WaitBeforeStarting 35
			WaitBetweenSpawns 50
			TotalCurrency 50
			
			Support 1
			
			TFBot
			{
				Template T_TFBot_Pyro_Airblast
			}
		}
		
		WaveSpawn
		{
			Name "4b"
			WaitForAllDead "4a"

			Where spawnbot_flank2
			TotalCount 3
			MaxActive 3
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 15
			TotalCurrency 30
			
			TFBot
			{
				Template T_TFBot_Giant_Scout_Fast
			}
		}
		
		WaveSpawn
		{
			Name "4b"
			WaitForAllDead "4a"

			Where spawnbot
			TotalCount 30
			MaxActive 9
			SpawnCount 3
			WaitBeforeStarting 0
			WaitBetweenSpawns 2.5
			TotalCurrency 60
			
			TFBot
			{
				Template T_TFBot_Sniper_Huntsman
			}
		}
		
		WaveSpawn
		{
			Name "4b"
			WaitForAllDead "4a"

			Where spawnbot_flank
			TotalCount 5
			MaxActive 3
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 8
			TotalCurrency 50
			
			TFBot
			{
				Template T_TFBot_Demoman_Burst_Armored
			}
		}
		
		WaveSpawn
		{
			Name "4c"
			WaitForAllDead "4b"

			Where spawnbot_flank2
			TotalCount 3
			MaxActive 3
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 15
			TotalCurrency 30
			
			TFBot
			{
				Template T_TFBot_Giant_Scout_Fast
			}
		}
		
		WaveSpawn
		{
			Name "4c"
			WaitForAllDead "4b"

			Where spawnbot
			TotalCount 28
			MaxActive 12
			SpawnCount 4
			WaitBeforeStarting 0
			WaitBetweenSpawns 2
			TotalCurrency 40
			
			TFBot
			{
				Template T_TFBot_Soldier_Extended_Buff_Banner_Bugfixed
				Skill Normal
			}
		}
		
		WaveSpawn
		{
			Name "4d"
			WaitForAllDead "4c"

			Where spawnbot_flank2
			TotalCount 3
			MaxActive 3
			SpawnCount 1
			WaitBeforeStarting 15
			WaitBetweenSpawns 15
			TotalCurrency 30
			
			TFBot
			{
				Template T_TFBot_Giant_Scout_Fast
			}
		}
		
		WaveSpawn
		{
			Name "4a"

			Where spawnbot
			TotalCount 4
			MaxActive 4
			SpawnCount 4
			WaitBeforeStarting 9
			WaitBetweenSpawns 0
			TotalCurrency 60
			
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Pyro_Dragon_Fury_Spammer
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Attributes IgnoreEnemies
					Name "Quick-Uber Medic"
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Attributes IgnoreEnemies
					Name "Quick-Uber Medic"
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Attributes IgnoreEnemies
					Name "Quick-Uber Medic"
				}
			}
		}
		
		WaveSpawn
		{
			Name "4b"
			WaitForAllSpawned "4a"

			Where spawnbot
			TotalCount 4
			MaxActive 4
			SpawnCount 4
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 100
			
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Demo_MineLayer
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Attributes IgnoreEnemies
					Name "Quick-Uber Medic"
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Attributes IgnoreEnemies
					Name "Quick-Uber Medic"
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Attributes IgnoreEnemies
					Name "Quick-Uber Medic"
				}
			}
		}
		
		WaveSpawn
		{
			Name "4c"
			WaitForAllSpawned "4b"

			Where spawnbot
			TotalCount 4
			MaxActive 4
			SpawnCount 4
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 60
			
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Pyro_Dragon_Fury_Spammer
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Attributes IgnoreEnemies
					Name "Quick-Uber Medic"
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Attributes IgnoreEnemies
					Name "Quick-Uber Medic"
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Attributes IgnoreEnemies
					Name "Quick-Uber Medic"
				}
			}
		}
		
		WaveSpawn
		{
			Name "4d"
			WaitForAllSpawned "4c"

			Where spawnbot
			TotalCount 4
			MaxActive 4
			SpawnCount 4
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 60
			
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Soldier_Crit_Spammer_Reload
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Attributes IgnoreEnemies
					Name "Quick-Uber Medic"
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Attributes IgnoreEnemies
					Name "Quick-Uber Medic"
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Attributes IgnoreEnemies
					Name "Quick-Uber Medic"
				}
			}
		}
		
		WaveSpawn
		{
			Name "4d"
			WaitForAllDead "4c"

			Where spawnbot
			TotalCount 4
			MaxActive 4
			SpawnCount 2
			WaitBeforeStarting 8
			WaitBetweenSpawns 22
			TotalCurrency 120
			
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giga_Soldier_BigrockBurst
				}
				TFBot
				{
					Template T_TFBot_Medic_Shield_Armored
					Attributes SpawnWithFullCharge
				}
			}
		}
		
		WaveSpawn
		{
			Name "4d-support-pyro"
			WaitForAllDead "4c"

			Where spawnbot
			TotalCount 40
			MaxActive 4
			SpawnCount 2
			WaitBeforeStarting 0
			WaitBetweenSpawns 1
			TotalCurrency 40
			
			Support 1
			
			TFBot
			{
				Class Pyro
				Skill Easy
			}
		}
		
		WaveSpawn
		{
			Name "4d-support-scout-soda"
			WaitForAllDead "4c"

			Where spawnbot
			TotalCount 50
			MaxActive 4
			SpawnCount 1
			WaitBeforeStarting 4
			WaitBetweenSpawns 1
			TotalCurrency 50
			
			Support 1
			
			TFBot
			{
				Template T_TFBot_Scout_Soda_Popper
				Skill Easy
			}
		}
		
		WaveSpawn
		{
			Name "4d-support-soldier"
			WaitForAllDead "4c"

			Where spawnbot
			TotalCount 40
			MaxActive 4
			SpawnCount 1
			WaitBeforeStarting 8
			WaitBetweenSpawns 1
			TotalCurrency 40
			
			Support 1
			
			TFBot
			{
				Template T_TFBot_Soldier_RocketShotgun
			}
		}
		
		//WaveSpawn
		//{
			//Name "4d-stopmusic"
			//WaitForAllDead "4d"
			
			//DoneOutput
            //{
				//Target musicstop
				//Action Trigger
			//}
		//}
	}
	
	Wave // Wave 5 (900$)
	{
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
		InitWaveOutput
		{
			Target wave_start_relay
			Action RunScriptCode
			Param
			"
				EntFire(`bombpath_choose_relay`, `Kill`)
				EntFire(`bombpath_clearall_relay`, `Trigger`)
				EntFire(`bombpath_right_arrows`, `TurnOff`)
				EntFire(`bombpath_left_arrows`, `TurnOn`)
                EntFire(`bombpath_left`, `Trigger`)
				//PrecacheSound(`no_turning_back_up8db.mp3`)
				//PrecacheSound(`no_turning_back_end_up8db.mp3`)
				//EmitSoundEx({sound_name = `no_turning_back_up8db.mp3`, flags = 4})
				//EmitSoundEx({sound_name = `no_turning_back_up8db.mp3`, flags = 4})
			"
		}
		
		WaveSpawn
		{
			Name "5a"

			Where spawnbot_flank
			TotalCount 25
			MaxActive 10
			SpawnCount 1
			WaitBeforeStarting 3
			WaitBetweenSpawns 1
			TotalCurrency 100
			
			TFBot
			{
				Class Scout
				Skill Normal
			}
		}
		
		WaveSpawn
		{
			Name "5a"

			Where spawnbot
			TotalCount 4
			MaxActive 4
			SpawnCount 4
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 100
			
			//FirstSpawnOutput
			//{
				//Target gamerules
				//Action RunScriptCode
				//Param
				//"
				//	EmitSoundEx({sound_name = `no_turning_back_up8db.mp3`, volume = 1.0})
				//	EmitSoundEx({sound_name = `no_turning_back_up8db.mp3`, volume = 0.6})
				//	ClientPrint(null,3,`\x08FF54F1FFMusic: No Turning Back - Enkanomiya OST (HOYO-MIX)`)
				//"
			//}
			
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Heavyweapons_Deflector
				}
				TFBot
				{
					Template T_TFBot_Giant_QuickUber_Medic
					Attributes IgnoreEnemies
				}
				TFBot
				{
					Template T_TFBot_Soldier_Extended_Concheror_BugFixed
				}
				TFBot
				{
					Template T_TFBot_Soldier_Extended_Concheror_BugFixed
				}
			}
		}
		
		WaveSpawn
		{
			Name "5b"
			WaitForAllSpawned "5a"
			
			Where spawnbot
			Where spawnbot_flank
			TotalCount 30
			MaxActive 9
			SpawnCount 3
			WaitBeforeStarting 0
			WaitBetweenSpawns 2.5
			TotalCurrency 180
			
			RandomChoice
			{
				TFBot
				{
					Template T_TFBot_Demoman_Targe
					Skill Hard
				}
				TFBot
				{
					Template T_TFBot_Pyro_Phlog
					Skill Hard
				}
				TFBot
				{
					Template T_TFBot_Demoman_ClusterBomb
					Skill Hard
				}
			}
		}
		
		WaveSpawn
		{
			Name "5b"
			WaitForAllSpawned "5a"

			Where spawnbot
			TotalCount 6
			MaxActive 6
			SpawnCount 2
			WaitBeforeStarting 0
			WaitBetweenSpawns 9
			TotalCurrency 90
			
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Soldier_Spammer
				}
				TFBot
				{
					Template T_TFBot_Medic_BigHeal_Armored
					Attributes SpawnWithFullCharge
				}
			}
		}
		
		WaveSpawn
		{
			Name "5c"
			WaitForAllSpawned "5b"

			Where spawnbot
			TotalCount 2
			MaxActive 2
			SpawnCount 2
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 30
			
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Soldier_Spammer
				}
				TFBot
				{
					Template T_TFBot_Medic_BigHeal_Armored
					Attributes SpawnWithFullCharge
				}
			}
		}
		
		WaveSpawn
		{
			Name "5c-Tank"
			WaitForAllDead "5b"

			TotalCount 1
			WaitBeforeStarting 0
			TotalCurrency 40
			FirstSpawnWarningSound	"mvm\mvm_tank_start.wav"
			
			Tank
			{
				Health 22000
				Name "tankboss"
				Speed 75
				StartingPathTrackNode tankpath_right_1
				OnKilledOutput
				{
					Target boss_dead_relay
					Action Trigger
				}
				OnBombDroppedOutput
				{
					Target boss_deploy_relay
					Action Trigger
				}
			}
		}
		
		WaveSpawn
		{
			Name "5c"
			WaitForAllDead "5b"

			Where spawnbot
			TotalCount 8
			MaxActive 8
			SpawnCount 4
			WaitBeforeStarting 2
			WaitBetweenSpawns 25
			TotalCurrency 160
			
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Demo_SlowBarrage
					Attributes AlwaysCrit
				}
				TFBot
				{
					Template T_TFBot_Giant_QuickUber_Medic
					Attributes IgnoreEnemies
				}
				TFBot
				{
					Template T_TFBot_Soldier_Extended_Concheror_BugFixed
				}
				TFBot
				{
					Template T_TFBot_Soldier_Extended_Concheror_BugFixed
				}
			}
		}
		
		WaveSpawn
		{
			Name "5d-support"
			WaitForAllDead "5c"

			Where spawnbot
			Where spawnbot
			Where spawnbot_flank
			Where spawnbot_flank2
			TotalCount 80
			MaxActive 6
			SpawnCount 2
			WaitBeforeStarting 0
			WaitBetweenSpawns 2
			TotalCurrency 80
			
			Support 1
			
			RandomChoice
			{
				TFBot
				{
					Template T_TFBot_Demo_Burst
				}
				TFBot
				{
					Template T_TFBot_Demo_Burst
				}
				TFBot
				{
					Template T_TFBot_Demo_Burst
				}
				TFBot
				{
					Template T_TFBot_Soldier_CritCharged
				}
				TFBot
				{
					Template T_TFBot_Soldier_CritCharged
				}
			}
		}
		
		WaveSpawn
		{
			Name "5d"
			WaitForAllDead "5c"

			Where spawnbot
			TotalCount 12
			MaxActive 9
			SpawnCount 4
			WaitBeforeStarting 0
			WaitBetweenSpawns 18
			TotalCurrency 120
			
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Soldier_BurstFire_Spammer
				}
				TFBot
				{
					Template T_TFBot_Soldier_Extended_Concheror_BugFixed
				}
				TFBot
				{
					Template T_TFBot_Soldier_Extended_Concheror_BugFixed
				}
				TFBot
				{
					Template T_TFBot_Soldier_Extended_Concheror_BugFixed
				}
			}
		}
		
		WaveSpawn
		{
			Name "5d-Tank"
			WaitForAllSpawned "5d"

			TotalCount 1
			WaitBeforeStarting 0
			TotalCurrency 0
			FirstSpawnWarningSound	"mvm\mvm_tank_start.wav"
			
			Tank
			{
				Health 30000
				Name "tankboss"
				Speed 75
				Skin 1
				StartingPathTrackNode tankpath_left_1
				OnKilledOutput
				{
					Target boss_dead_relay
					Action Trigger
				}
				OnBombDroppedOutput
				{
					Target boss_deploy_relay
					Action Trigger
				}
			}
		}
		
		WaveSpawn
		{
			Name "5d-last-giant"
			WaitForAllSpawned "5d"
			
			Where spawnbot
			TotalCount 4
			MaxActive 4
			SpawnCount 1
			WaitBeforeStarting 12
			WaitBetweenSpawns 2
			TotalCurrency 0
			
			TFBot
			{
				Template T_TFBot_Giant_Soldier_Spammer
				ClassIcon soldier_infinite_giant_crit_nl
				Attributes AlwaysCrit
				CharacterAttributes
				{
					"blast dmg to self increased" 0
				}
			}
		}
		
		//WaveSpawn
		//{
		//	Name "5d-dummy"
		//	WaitForAllDead "5d"
		//}
		//WaveSpawn
		//{
		//	Name "5d-dummy"
		//	WaitForAllDead "5c-Tank"
		//}
		//WaveSpawn
		//{
		//	Name "5d-dummy"
		//	WaitForAllDead "5d-Tank"
		//}
		//WaveSpawn
		//{
		//	Name "5d-dummy"
		//	WaitForAllDead "5d-last-giant"
		//}
		
		//WaveSpawn
		//{
		//	Name "5d-stopmusic"
		//	WaitForAllDead "5d-dummy"
		//	FirstSpawnOutput
		//	{
		//		Target gamerules
		//		Action RunScriptCode
		//		Param
		//		"
		//			EmitSoundEx({sound_name = `no_turning_back_up8db.mp3`, flags = 4})
		//			EmitSoundEx({sound_name = `no_turning_back_end_up8db.mp3` volume = 1.0})
		//			EmitSoundEx({sound_name = `no_turning_back_up8db.mp3`, flags = 4})
		//			EmitSoundEx({sound_name = `no_turning_back_end_up8db.mp3` volume = 0.6})
		//		"
		//	}
		//}
	}
}

// Change Log:
// Wave 1
// subwave 1c reduce TotalCount From 25 to 20

// Change Log:
// 27/01/2024
// Wave 1
// Subwave 1a
// Add 15 Normal AI Soldier on First Wave (TotalCount 15 MaxActive 6 SpawnCount 3 WaitBeforeStarting 3 WaitBetweenSpawns 5)
// Reduce Scout MaxActive from 10 to 7
// Wave 2
// Add 4 Armored Big-Heal Medic each giant except giant scout
// Change Flare Gun Pyro from Normal AI to Hard AI
// Change Pistol Scout from Easy AI to Normal AI
// Wave 3
// Subwave 3a
// No RandomChoice (Only Stickybomb Demo)
// Add 5 Armored Burst Fire Soldier (TotalCount 5 MaxActive 3 SpawnCount 1 WaitBeforeStarting 5 WaitBetweenSpawns 5)
// Wave 5
// First Tank Health Decreased from 25k to 23k
// RandomChoice Change rate from
// 3/4 Burst Fire Demo : 1/4 Common Charged Soldier to
// 3/5 Burst Fire Demo : 2/5 Common Charged Soldier

// Change Log:
// 27/01/2024
// Wave 5
// Subwave 5b
// Change Phlog Pyro to RandomChoice Phlog Pyro Hard AI, Targe Demo Hard AI and Cluster Demo Hard AI and Change WaitBetweenSpawns from 3 to 2.5
// 1/3 Phlog Pyro Hard AI : 1/3 Targe Demo Hard AI : 1/3 Cluster Demo Hard AI
// Giant Rapid Fire Soldier Change WaitBetweenSpawns from 10 to 9
// No Refunded

// Change Log:
// Wave 2
// Change small bot in the Giant Heater Heavy Squad
// Change from Pyro to Flare Gun Pyro (Skill Hard)
// The last pyro was support limited
// Wave 3
// Change Giant Demoknight to Giant Battalion Demoman
// Wave 4
// Subwave 4a
// Add 1 Squad of Giant DF Pyro + 3 Uber Medic WaitBeforeStarting 9
// Subwave 4d
// Change Giant Charged Soldier to Giga Burst Fire Soldier

// Change Log
// Wave 1
// Subwave 1c the pyro and scout bot was Support Limited
// Wave 2
// Giant Burst Fire Soldier + armored big-heal medic Reduced from 2 pair to 1 pair
// Wave 5
// Reduce first tank health from 23k to 22k

// Change Log
// Wave 5
// Subwave 5c
// Change Giant Barrage Demo + Giant Uber Medic WaitBetweenSpawns from 18 to 25

// Change Log
// Wave 2
// Subwave 2a
// Change Major League Scout WaitBeforeStarting from 12 to 0
// Change Huntsman WaitBeforeStarting from 0 to 3 (This because if use 0 sometime huntsman carry the bomb instead Major League Scout)
// Subwave 2c-giant
// Add 1 Armored Big-Heal Medic on Giant Armored Burst Fire Scout
// Subwave 2c-pyro increase TotalCount from 10 to 16 (Support Limited)
// Wave 3
// Subwave 3c
// The Last Giant Dragon Fury Pyro + Giant Regen Medic change from WaitForAllSpawned "3b" to WaitForAllSpawned "3c"
// WaitBeforeStarting from 15 to 0 (spawn after soldier and steel gauntlet spawn all)
// Add Bison Soldier Support Limited TotalCount 25 MaxActive 8 SpawnCount 5 WaitBeforeStarting 0 WaitBetweenSpawns 7 TotalCurrency 50
// Crit Shovel Soldier Support Change TotalCurrency 100 > 50
// Wave 5
// Change Giant Heavy WaitBeforeStarting from 3 to 0
// Change Commmon Scout With Normal AI WaitBeforeStarting from 0 to 3

// Change Log
// Wave 2 Mission Support
// Change T_TFBot_Soldier_DirectHit to T_TFBot_Soldier_DirectHit_Support (Removed WeaponRestrictions PrimaryOnly)

// Change Log
// Wave 2 
// Move Support Soldier Direct Hit to WaveSpawn Support (Because it work better as WaveSpawn Support)
// Change Demo to Loch Demo
// The 2a 2nd Giant Scout is use "2a-giant-scout" name subwave
// Subwave 2b is use WaitForAllSpawned instead WaitForAllDead
// Subwave 2c
// The First Giant Heavy + Armored Medic Squad is Change WaitBeforeStarting from 5 to 0
// Wave 4 
// Removed Music

// Change Log
// Wave 2
// Change Armored Big-Heal Medic with Giant Scout to Giant Regen Medic
// Remove Pyro Support to balanced out

// Wave 4
// Rearranged the icon
// Give Attributes SpawnWithFullCharge on Shield Medic

// Wave 5
// The First Giant Uber Medic now using Giant Quick-Uber Medic (lower 8 sec duration uber to 5 sec duration)

// Change Log
// Wave 2 
// Added the squad of shotgun with NoFormation 1 (TotalCount 16 MaxActive 8 SpawnCount 4 WaitBeforeStarting 5 WaitBetweenSpawns 5 TotalCurrency 80)
// Huntsman TotalCurrency decreased from 100 to 20

// Change Log
// fixing wrong money at wave 2
// change money from 1050 to 1100

// Wave 2
// Money 1100$ to 900$

// Wave 3
// Money 1000$ to 900$

// Wave 4
// Money 1000$ to 900$
// Change Giga Mannhattan Burst to Giga Bigrock Burst

// Wave 5
// Money 1500$ to 900$

// Change Log
// Wave 4
// Change 1 of Giant Fury Pyro to Giant Burst Charge Soldier (Mannhattan Burst Version)
// Change Common Shield Medic to Armored Variant

// Wave 5
// Change Giant Heavy to Giant Deflector Heavy
// Tank buff HP from 28k to 30k
// Added Armored Big-Heal Medic on first 4 Giant Rapid Fire Soldier
