#base robot_giant.pop
#base robot_standard.pop
#base robot_lyney.pop
#base exp_restrict.pop

// WAVE 1 Current Money: 250$
// WAVE 2 Current Money: 250$ + 550$ + 100$ Bonus = 900$ (No Bonus: 800$)
// WAVE 3 Current Money: 900$ + 500$ + 100$ Bonus = 1500$ (No Bonus: 1300$)
// WAVE 4 Current Money: 1500$ + 500$ + 100$ Bonus = 2100$ (No Bonus: 1800$)
// WAVE 5 Current Money: 
// WAVE 6 Current Money: 
// Total Possible Money: 

WaveSchedule
{

	StartingCurrency 250
	RespawnWaveTime 4
	CanBotsAttackWhileInSpawnRoom no
	
	DisallowUpgrade "ubercharge"
	DisallowUpgrade "critboost"
	DisallowUpgrade "generate rage on heal" 
	DisallowUpgrade "explosive sniper shot"
	
	Mission // sentry buster
	{
		Objective DestroySentries

		InitialCooldown 5
		Where spawnbot
		BeginAtWave 1
		RunForThisManyWaves 9

		CooldownTime 45         

        TFBot
		{
			Template T_TFBot_SentryBuster
        }
	}
	
	Mission
	{
		Objective Spy

		InitialCooldown 15
		Where spawnbot_mission_spy
		BeginAtWave 1
		RunForThisManyWaves 1
		CooldownTime 50
		DesiredCount 2
		
		TFBot
		{
			Class Spy
			Skill Hard
		}
	}
	
	Mission
	{
		Objective Sniper

		InitialCooldown 40
		Where spawnbot_mission_sniper
		BeginAtWave 3
		RunForThisManyWaves 1
		CooldownTime 50
		DesiredCount 2
		
		TFBot
		{
			Class Sniper
			Skill Hard
		}
	}
	
	PointTemplates
	{
		MissionName
		{
			logic_relay
			{
				"targetname" "name"
				"OnTrigger" "tf_objective_resource,$SetClientProp$m_iszMvMPopfileName,Cave Course (Expert),0,-1"
			}
			OnSpawnOutput
			{
				Target "name"
				Action "trigger"
				Delay 0
			}
		}
		Fence_Big_Long
		{
			NoFixup 1
			prop_dynamic
			{
				"model" "models\props_coalmines\wood_fence_256.mdl"
				"solid" "6"
			}
		}
		Fence_Big_Med
		{
			NoFixup 1
			prop_dynamic
			{
				"model" "models\props_coalmines\wood_fence_128.mdl"
				"solid" "6"
			}
		}
	}
	
	SpawnTemplate MissionName
	SpawnTemplate  
	{
		Name "Fence_Big_Long"
		Origin "30 -882 601"
		Angles "0 0 -42"
	}
	SpawnTemplate  
	{
		Name "Fence_Big_Med"
		Origin "155 -882 601"
		Angles "0 0 -42"
	}
	SpawnTemplate  
	{
		Name "Fence_Big_Med"
		Origin "205 -852 500"
		Angles "42 70 -13.5"
	}
	SpawnTemplate  
	{
		Name "Fence_Big_Med"
		Origin "-202 -850 500"
		Angles "42 100 6.5"
	}
	SpawnTemplate  
	{
		Name "Fence_Big_Long"
		Origin "-1100 -128.1 587"
		Angles "0 90 0"
	}
	ExtraSpawnPoint  
	{
        Name "spawnbot_middle"
        TeamNum 3 //2 for red 3 for blu
        X	"163"
        Y	"4044"
        Z	"652"
	}
	ExtraSpawnPoint  
	{
        Name "spawnbot_left"
        TeamNum 3 //2 for red 3 for blu
        X	"-1132"
        Y	"2468"
        Z	"389"
	}
	ExtraSpawnPoint  
	{
        Name "spawnbot_right"
        TeamNum 3 //2 for red 3 for blu
        X	"1188"
        Y	"2543"
        Z	"384"
	}
	
	//WAVE 1 (550$)
	Wave
    {
		WaitWhenDone	65
		Checkpoint	Yes
        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_relay`, `Trigger`)
			"
		}
		
		WaveSpawn
		{
			Name "1a"

			Where spawnbot_middle
			TotalCount 16
			MaxActive 8
			SpawnCount 2
			WaitBeforeStarting 3
			WaitBetweenSpawns 3
			TotalCurrency 30
			
			TFBot
			{
				Class Soldier
				Skill Normal
			}
		}
		
		WaveSpawn
		{
			Name "1a"

			Where spawnbot_left
			Where spawnbot_right
			TotalCount 20
			MaxActive 8
			SpawnCount 4
			WaitBeforeStarting 8
			WaitBetweenSpawns 4
			TotalCurrency 20
			
			TFBot
			{
				Template T_TFBot_Scout_Sandman
			}
		}
		
		WaveSpawn
		{
			Name "1a"

			Where spawnbot_middle
			TotalCount 3
			MaxActive 3
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 15
			TotalCurrency 30
			
			TFBot
			{
				Template T_TFBot_Giant_Scout_Fast
			}
		}
		
		WaveSpawn
		{
			Name "1b"
			WaitForAllSpawned "1a"

			Where spawnbot_left
			Where spawnbot_right
			TotalCount 20
			MaxActive 10
			SpawnCount 2
			WaitBeforeStarting 0
			WaitBetweenSpawns 1.5
			TotalCurrency 80
			
			TFBot
			{
				Class Heavyweapons
				Skill Easy
			}
		}
		
		WaveSpawn
		{
			Name "1b"
			WaitForAllSpawned "1a"

			Where spawnbot_middle
			TotalCount 3
			MaxActive 3
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 15
			TotalCurrency 240
			
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Boxing_Heavy
				}
			}
		}
		
		WaveSpawn
		{
			Name "1b"
			WaitForAllDead "1a"

			Where spawnbot_middle
			TotalCount 30
			MaxActive 6
			SpawnCount 3
			WaitBeforeStarting 0
			WaitBetweenSpawns 8
			TotalCurrency 150
			
			Support 1
			
			TFBot
			{
				Class Scout
				Skill Easy
			}
		}
	}
	
	//WAVE 2 (500$)
	Wave
    {
		WaitWhenDone	65
		Checkpoint	Yes
        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_holograms_left`, `TurnOn`)
				EntFire(`bombpath_holograms_right`, `TurnOff`)
				EntFire(`bombpath_left_relay`, `Trigger`)
			"
		}
		
		WaveSpawn
		{
			Name "2a"

			Where spawnbot_middle
			TotalCount 3
			MaxActive 3
			SpawnCount 3
			WaitBeforeStarting 0
			WaitBetweenSpawns 3
			TotalCurrency 6
			
			TFBot
			{
				Template T_TFBot_Sniper_Huntsman
			}
		}
		
		WaveSpawn
		{
			Name "2a"

			Where spawnbot_middle
			Where spawnbot_left
			Where spawnbot_right
			TotalCount 27
			MaxActive 10
			SpawnCount 3
			WaitBeforeStarting 3
			WaitBetweenSpawns 3
			TotalCurrency 54
			
			TFBot
			{
				Template T_TFBot_Sniper_Huntsman
			}
		}
		
		WaveSpawn
		{
			Name "2a"

			Where spawnbot_middle
			TotalCount 9
			MaxActive 9
			SpawnCount 3
			WaitBeforeStarting 3
			WaitBetweenSpawns 15
			TotalCurrency 90
			
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Demo_RapidFire_FixIcons
				}
				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 "2b"
			WaitForAllSpawned "2a"
		
			TotalCount 1
            WaitBeforeStarting 0
			TotalCurrency 100

			Tank
			{
				Health 18000
				Speed 75
				Name "tankboss"
				StartingPathTrackNode "boss_path_a1"

				OnKilledOutput                                  
				{
					Target boss_dead_relay
					Action Trigger                         
				}
				
				OnBombDroppedOutput                             
				{
					Target boss_deploy_relay
					Action Trigger                         
				}
			}		
		}
		
		WaveSpawn
		{
			Name "2b"
			WaitForAllSpawned "2a"

			Where spawnbot_middle
			TotalCount 18
			MaxActive 9
			SpawnCount 6
			WaitBeforeStarting 0
			WaitBetweenSpawns 10
			TotalCurrency 50
			
			TFBot
			{
				Class Demoman
				Skill Normal
			}
		}
		
		WaveSpawn
		{
			Name "2b"
			WaitForAllSpawned "2a"

			Where spawnbot_left
			TotalCount 16
			MaxActive 6
			SpawnCount 1
			WaitBeforeStarting 5
			WaitBetweenSpawns 1
			TotalCurrency 50
			
			TFBot
			{
				Class Pyro
				Skill Easy
			}
		}
		
		WaveSpawn
		{
			Name "2c-support"
			WaitForAllSpawned "2b"

			Where spawnbot_middle
			TotalCount 6
			MaxActive 4
			SpawnCount 3
			WaitBeforeStarting 0
			WaitBetweenSpawns 18
			TotalCurrency 100
			
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Pyro_Dragon_Fury
				}
				TFBot
				{
					Template T_TFBot_Giant_Pyro_FlareGun_Spammer
				}
				TFBot
				{
					Template T_TFBot_Giant_Pyro_FlareGun_Spammer
				}
			}
		}
		
		WaveSpawn
		{
			Name "2c-support"
			WaitForAllSpawned "2b"

			Where spawnbot_right
			TotalCount 25
			MaxActive 5
			SpawnCount 5
			WaitBeforeStarting 5
			WaitBetweenSpawns 1
			TotalCurrency 50
			
			Support 1
			
			TFBot
			{
				Template T_TFBot_Pyro_Detonator
			}
		}
	}
	
	//WAVE 3 (500$)
	Wave
    {
		WaitWhenDone	65
		Checkpoint	Yes
        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_holograms_high_left`, `TurnOn`)
				EntFire(`bombpath_holograms_left`, `TurnOff`)
				EntFire(`bombpath_high_left_relay`, `Trigger`)
			"
		}
		
		WaveSpawn
		{
			Name "3a"
		
			TotalCount 1
            WaitBeforeStarting 0
			TotalCurrency 180

			Tank
			{
				Health 25000
				Speed 75
				Name "tankboss"
				StartingPathTrackNode "boss_path_a1"

				OnKilledOutput                                  
				{
					Target boss_dead_relay
					Action Trigger                         
				}
				
				OnBombDroppedOutput                             
				{
					Target boss_deploy_relay
					Action Trigger                         
				}
			}		
		}
		
		WaveSpawn
		{
			Name "3a"

			Where spawnbot_middle
			TotalCount 4
			MaxActive 4
			SpawnCount 2
			WaitBeforeStarting 0
			WaitBetweenSpawns 4
			TotalCurrency 20

			Squad
			{
				TFBot
				{
					Template T_TFBot_Soldier_Extended_Concheror
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Attributes IgnoreEnemies
					Name "Quick-Uber Medic"
				}
			}
		}
		
		WaveSpawn
		{
			Name "3a"

			Where spawnbot_middle
			TotalCount 44
			MaxActive 12
			SpawnCount 2
			WaitBeforeStarting 10
			WaitBetweenSpawns 3
			TotalCurrency 200

			Squad
			{
				TFBot
				{
					Template T_TFBot_Soldier_Extended_Concheror
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Attributes IgnoreEnemies
					Name "Quick-Uber Medic"
				}
			}
		}
		
		WaveSpawn
		{
			Name "3a"

			Where spawnbot_left
			TotalCount 1
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 20
			WaitBetweenSpawns 0
			TotalCurrency 20

			TFBot
			{
				Template T_TFBot_Giant_Soldier_Spammer
			}
		}
		
		WaveSpawn
		{
			Name "3a"

			Where spawnbot_right
			TotalCount 1
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 40
			WaitBetweenSpawns 0
			TotalCurrency 20
			
			TFBot
			{
				Template T_TFBot_Giant_Soldier_Spammer
			}
		}
		
		WaveSpawn
		{
			Name "3a-last"
			WaitForAllSpawned "3a"

			Where spawnbot_left
			TotalCount 3
			MaxActive 3
			SpawnCount 3
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 30

			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Soldier_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"
				}
			}
		}
		
		WaveSpawn
		{
			Name "3a-last"
			WaitForAllSpawned "3a"

			Where spawnbot_right
			TotalCount 3
			MaxActive 3
			SpawnCount 3
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 30

			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Soldier_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"
				}
			}
		}
	}
}