//Clanker Carnage
//An Advanced mission for the map Barren by botrot. https://steamcommunity.com/id/BotRot

//Wave 1: $750; Wave 2: $750; Wave 3: $700; Wave 4: $700; Wave 5: $800; Wave 6: $800; Wave 7: $200
//Total Mission Money (including starting money): $5300; $5900 with bonus from A+ rating

#base robot_giant.pop
#base robot_standard.pop

WaveSchedule
{
	//Initial Money  $600
	StartingCurrency	600
	RespawnWaveTime	5
	CanBotsAttackWhileInSpawnRoom	no
	Advanced	1
	
	//Custom Bot Templates
	Templates
	{
		//Offense Classes
		T_TFBot_Pyro_Detonator //based on Detonator Pyro from Mannworks intermediate mission Mean Machines
		{
			ClassIcon  pyro_flare
			Name	"Rapid Flare Pyro"
			Class	Pyro
			Skill	Hard
			Item "the detonator"
			Item "old guadalajara"
			WeaponRestrictions SecondaryOnly
			ItemAttributes
			{
				ItemName "the detonator"
				"fire rate bonus" 0.4
				"reload time decreased" 0.2
			}
		}
		//Defense Classes
		T_TFBot_Demoknight_Persian //based on Persian Demoknight from Rottenburg advanced missions
		{
			ClassIcon  demoknight_persian_nys
			Name	"Persian Demoknight"
			Health  200
			Class	Demoman
			Skill	Hard
			WeaponRestrictions	MeleeOnly
			Attributes	"DisableDodge"
			Item	"ali baba's wee booties"
			Item	"the splendid screen"
			Item	"the persian persuader"
			Item    "sultan's ceremonial"
			ItemAttributes
			{
				ItemName	"the splendid screen"
				"attack not cancel charge"	1
			}
			ItemAttributes
			{
				ItemName "the persian persuader"
				"critboost on kill" 3
			}
		}
		T_TFBot_Chief_Demoman_RapidFire //Final Boss 
		{
			Class Demoman
			Name "Chief Crit-on-Kill Cyclops"
			ClassIcon demo_bomber
			Scale 1.9
			Skill Expert
			Health 40000
			Item "prince tavish's crown"
			Item "the iron bomber"
			WeaponRestrictions PrimaryOnly
			Attributes MiniBoss
			Attributes UseBossHealthBar
			Attributes HoldFireUntilFullReload
			ItemAttributes
			{
				ItemName "the iron bomber"
				"projectile spread angle penalty" 2
				"fire rate bonus" 0
				"faster reload rate" 0.1
				"critboost on kill" 5
			}
			CharacterAttributes
			{
				"move speed bonus"	0.35
				"damage force reduction" 0
				"airblast vulnerability multiplier" 0
				"override footstep sound set" 4
				"airblast vertical vulnerability multiplier" 0
				"rage giving scale" 0.1
			}
		}
		//Support Classes
		T_TFBot_Chief_Bowman_RapidFire //Midboss
		{
			Class Sniper
			Name "Crazed Chief Clanker"
			ClassIcon sniper_bow_multi
			Scale 1.9
			Skill Hard
			Health 12500
			Item "summer shades"
			Item "the cozy camper"
			Item "the fortified compound"
			WeaponRestrictions PrimaryOnly
			Attributes MiniBoss
			Attributes UseBossHealthBar
			ItemAttributes
			{
				ItemName "the fortified compound"
				"fire rate bonus" 0.3
				"faster reload rate" 0.75
				"Set DamageType Ignite" 1
				"bleeding duration"	 5
				"attach particle effect static" 13
			}
			ItemAttributes
			{
				ItemName "the cozy camper"
				"health regen" 10
			}
			CharacterAttributes
			{
				"head scale"  0.75
				"move speed bonus"	0.5
				"damage force reduction" 0.1
				"airblast vulnerability multiplier" 0.1
				"override footstep sound set" 2
				"airblast vertical vulnerability multiplier" 0.1
				"rage giving scale" 0.1
			}
		}
		T_TFBot_Sniper_Jarate_Master_Bleed
		{
			ClassIcon  sniper_jarate
			Name	"Jarate Bleedin' Master"
			Class	Sniper
			Skill	Expert
			WeaponRestrictions	SecondaryOnly
			Attributes AlwaysFireWeapon
			Item	"jarate"
			Item    "the tribalman's shiv"
			Item	"desert marauder"
			ItemAttributes
			{
				ItemName	"jarate"
				"effect bar recharge rate increased"	0.25
			}
			CharacterAttributes
			{
				"deploy time increased"	0
			}
		}
	}
	
	//Support Robot Missions
	Mission
	{
		Objective	DestroySentries
		Where	spawnbot
		BeginAtWave	1
		RunForThisManyWaves	5
		InitialCooldown	20
		CooldownTime	40
		DesiredCount	1
		TFBot
		{
			Template	T_TFBot_SentryBuster
			Attributes	"DisableDodge"
			CharacterAttributes
			{
				"damage force reduction" 0.1
				"airblast vulnerability multiplier" 0.1
                "airblast vertical vulnerability multiplier" 0.1
			}
		}
	}
	Mission
	{
		Objective	DestroySentries
		Where	spawnbot
		BeginAtWave	6
		RunForThisManyWaves	2
		InitialCooldown	10
		CooldownTime	30
		DesiredCount	1
		TFBot
		{
			Template	T_TFBot_SentryBuster
			Attributes	"DisableDodge"
			CharacterAttributes
			{
				"damage force reduction" 0.1
				"airblast vulnerability multiplier" 0.1
                "airblast vertical vulnerability multiplier" 0.1
			}
		}
	}
	Mission
	{
		Objective	Sniper
		Where	spawnbot_flank
		BeginAtWave	1
		RunForThisManyWaves	1
		InitialCooldown	30
		CooldownTime	35
		DesiredCount	2
		TFBot
		{
			Template	T_TFBot_Sniper
		}
	}
	Mission
	{
		Objective	Spy
		Where	spawnbot
		BeginAtWave	2
		RunForThisManyWaves	1
		InitialCooldown	20
		CooldownTime	45
		DesiredCount	2
		TFBot
		{
			Template	T_TFBot_Spy
			ItemAttributes
			{
				ItemName	"tf_weapon_revolver"
				"auto fires when full" 1
				"auto fires full clip" 1
				"reload time increased hidden" 1.5
			}
		}
	}
	Mission
	{
		Objective	Sniper
		Where	spawnbot_flank
		BeginAtWave	3
		RunForThisManyWaves	1
		InitialCooldown	25
		CooldownTime	30
		DesiredCount	2
		TFBot
		{
			Template	T_TFBot_Sniper_Razorback
		}
	}
	Mission
	{
		Objective	Spy
		Where	spawnbot
		BeginAtWave	4
		RunForThisManyWaves	1
		InitialCooldown	60
		CooldownTime	40
		DesiredCount	2
		TFBot
		{
			Template	T_TFBot_Spy
			ItemAttributes
			{
				ItemName	"tf_weapon_revolver"
				"auto fires when full" 1
				"auto fires full clip" 1
				"reload time increased hidden" 1.5
			}
		}
	}
	Mission
	{
		Objective	Spy
		Where	Behind
		BeginAtWave	4
		RunForThisManyWaves	1
		InitialCooldown	100
		CooldownTime	10
		DesiredCount	2
		TFBot
		{
			Template	T_TFBot_Heavyweapons_Gnome
			Health  300
			Skill   Hard
			Item "The All-Father"
			Item "Point and Shoot"
			ItemAttributes
			{
				ItemName "The Holiday Punch"
				"damage bonus" 1
			}
		}
	}
	Mission
	{
		Objective	Spy
		Where	spawnbot_flank
		BeginAtWave	6
		RunForThisManyWaves	1
		InitialCooldown	25
		CooldownTime	40
		DesiredCount	2
		TFBot
		{
			Template	T_TFBot_Spy
			ItemAttributes
			{
				ItemName	"tf_weapon_revolver"
				"auto fires when full" 1
				"auto fires full clip" 1
				"reload time increased hidden" 1.5
			}
		}
	}
	Mission
	{
		Objective	Sniper
		Where	spawnbot_flank
		BeginAtWave	7
		RunForThisManyWaves	1
		InitialCooldown	70
		CooldownTime	25
		DesiredCount	3
		TFBot
		{
			Template	T_TFBot_Sniper_Sydney_Sleeper
			Skill  		Expert
			Item 		"The Razorback"
		}
	}
	Mission
	{
		Objective	Spy
		Where	spawnbot
		BeginAtWave	7
		RunForThisManyWaves	1
		InitialCooldown	70
		CooldownTime	25
		DesiredCount	3
		TFBot
		{
			Name  "Saharan Spy"
			Template	T_TFBot_Spy
			Item  "L'Etranger"
			Item  "Your Eternal Reward"
			Item  "The Familiar Fez"
			CharacterAttributes
			{
				"voice pitch scale" 0
			}
		}
	}
	//Wave 1
	//Total Money: $750, $850 with bonus from A+ rating
	Wave
	{
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
		WaveSpawn
		{
			Name	wave1a
			TotalCurrency	50
			TotalCount	10
			MaxActive	4
			SpawnCount	2
			WaitBeforeStarting	0
			WaitBetweenSpawns	5
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Class	Pyro
					Skill	Easy
					Attributes AlwaysFireWeapon
				}
				TFBot
				{		
					Template	T_TFBot_Medic_QuickFix
				}
			}
		}
		WaveSpawn
		{
			Name	wave1a
			TotalCurrency	50
			TotalCount	21
			MaxActive	6
			SpawnCount	3
			WaitBeforeStarting	2
			WaitBetweenSpawns	5
			Where   spawnbot
			TFBot
			{
				Template	T_TFBot_Scout_Fish
				ClassIcon  scout_fish_nys
				Skill   Hard
				Attributes  "AlwaysCrit"
				Item   "the milkman"
			}
		}
		WaveSpawn
		{
			Name	wave1a2
			TotalCurrency	50
			TotalCount	1
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	25
			Where   spawnbot
			TFBot
			{
				Template	T_TFBot_Giant_DemoMan_PrinceTavish
			}
		}
		WaveSpawn
		{
			Name	wave1b
			WaitForAllDead  wave1a2
			TotalCurrency	50
			TotalCount	24
			MaxActive	6
			SpawnCount	2
			WaitBeforeStarting	0
			WaitBetweenSpawns	2
			Where   spawnbot
			TFBot
			{
				Template	T_TFBot_Heavyweapons_Heavyweight_Champ
				Skill 		Normal
			}
		}
		WaveSpawn
		{
			Name	wave1b
			WaitForAllDead  wave1a2
			TotalCurrency	50
			TotalCount	24
			MaxActive	4
			SpawnCount	4
			WaitBeforeStarting	0
			WaitBetweenSpawns	10
			Where   spawnbot
			TFBot
			{
				Template	T_TFBot_Sniper_Huntsman
			}
		}
		WaveSpawn
		{
			Name	wave1b2
			WaitForAllDead  wave1a2
			TotalCurrency	100
			TotalCount	2
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	20
			WaitBetweenSpawns  	20
			Where   spawnbot
			TFBot
			{
				Template	T_TFBot_Giant_Soldier_Crit
			}
		}
		WaveSpawn
		{
			Name	wave1c1
			WaitForAllDead	wave1b
			TotalCurrency	250
			TotalCount	1
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	5
			Where	spawnbot
			Tank
			{
				Health	15000
				Name	"tankboss"
				Speed	75
				StartingPathTrackNode	tank_path_1
				OnKilledOutput
				{
					Target	boss_dead_relay
					Action	Trigger
				}
				OnBombDroppedOutput
				{
					Target	boss_deploy_relay
					Action	Trigger
				}
			}
		}
		WaveSpawn
		{
			Name	wave1c2
			WaitForAllDead	wave1b
			TotalCurrency	50
			TotalCount	20
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	10
			WaitBetweenSpawns	10
			Where	spawnbot
			RandomChoice
			{
				TFBot
				{
					Class  Pyro
					Skill  Easy
				}
				TFBot
				{
					Class  Pyro
					Skill  Easy
				}
				TFBot
				{
					Class  Pyro
					Skill  Normal
				}
			}
		}
		WaveSpawn
		{
			Name	wave1c2
			WaitForAllDead	wave1b
			TotalCurrency	100
			TotalCount	18
			MaxActive	6
			SpawnCount	6
			WaitBeforeStarting	10
			WaitBetweenSpawns	10
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Class	Demoman
					Skill	Easy
				}
				TFBot
				{		
					Template	T_TFBot_Medic_QuickFix
				}
			}
		}
	}
	//Wave 2
	//Total Money: $750, $850 with bonus from A+ rating
	Wave
	{
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
		WaveSpawn
		{
			Name	wave2a
			TotalCurrency	50
			TotalCount	28
			MaxActive	7
			SpawnCount	7
			WaitBeforeStarting	0
			WaitBetweenSpawns	10
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Class Soldier
					Skill Normal
				}
			}
		}
		WaveSpawn
		{
			Name	wave2a
			TotalCurrency	100
			TotalCount	6
			MaxActive	2
			SpawnCount	2
			WaitBeforeStarting	10
			WaitBetweenSpawns	20
			Where	spawnbot
			TFBot
			{
				Template T_TFBot_Scout_Shortstop
			}
		}
		WaveSpawn
		{
			Name	wave2b
			WaitForAllDead  wave2a
			TotalCurrency	100
			TotalCount	20
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	0
			WaitBetweenSpawns	10
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Heavyweapons_Shotgun
					Name  "Shotgun Heavy"
				}
			}
		}
		WaveSpawn
		{
			Name	wave2b
			WaitForAllDead  wave2a
			TotalCurrency	100
			TotalCount	24
			MaxActive	6
			SpawnCount	2
			WaitBeforeStarting	5
			WaitBetweenSpawns	1
			Where	spawnbot
			TFBot
			{
				Template	T_TFBot_Demoknight_Persian
			}
		}
		WaveSpawn
		{
			Name	wave2b
			WaitForAllDead  wave2a
			TotalCurrency	150
			TotalCount	8
			MaxActive	4
			SpawnCount  4
			WaitBeforeStarting	15
			WaitBetweenSpawns	20
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template  	T_TFBot_Giant_Soldier_Spammer_Reload
				}
				TFBot
				{
					Template	T_TFBot_Pyro_Detonator
				}
				TFBot
				{
					Template	T_TFBot_Pyro_Detonator
				}
				TFBot
				{
					Template	T_TFBot_Pyro_Detonator
				}
			}
		}
		WaveSpawn
		{
			Name	wave2c
			WaitForAllDead  wave2b
			TotalCurrency	150
			TotalCount	12
			MaxActive	12
			SpawnCount	6
			WaitBeforeStarting  15
			WaitBetweenSpawns	30
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Heavyweapons_Heater
					ClassIcon   heavy_heater_nys_giant
					Name		"Giant Heater Heavy"
					MaxVisionRange 1200
					ItemAttributes
					{
						ItemName "The Huo Long Heatmaker"
						"damage bonus"	1.2
						"damage penalty" 1
					}		
				}
				TFBot
				{
					Template	T_TFBot_Pyro_Detonator
				}
				TFBot
				{
					Template	T_TFBot_Pyro_Detonator
				}
				TFBot
				{
					Template	T_TFBot_Pyro_Detonator
				}
				TFBot
				{
					Template	T_TFBot_Pyro_Detonator
				}
				TFBot
				{
					Template	T_TFBot_Pyro_Detonator
				}
			}
		}
		WaveSpawn
		{
			Name	wave2c
			WaitForAllDead  wave2b
			TotalCurrency	50
			TotalCount	20
			MaxActive	5
			SpawnCount	5
			WaitBeforeStarting	5
			WaitBetweenSpawns	10
			Where	spawnbot
			TFBot
			{
				Template	T_TFBot_Demo_Burst
				Skill       Normal
			}
		}
		WaveSpawn
		{
			Name	wave2support
			WaitForAllDead  wave2b
			TotalCurrency	50
			TotalCount	30
			MaxActive	4
			SpawnCount	2
			WaitBeforeStarting	0
			WaitBetweenSpawns	5
			Where	spawnbot_flank
			Support 1
			TFBot
			{
				Template	T_TFBot_Scout_Fish
				ClassIcon  scout_fish_nys
				Skill   Hard
				Attributes  "AlwaysCrit"
				Item   "the milkman"
			}
		}
	}
	//Wave 3
	//Total Money: $700, $800 with bonus from A+ rating
	Wave
	{
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
		WaveSpawn
		{
			Name	wave3a
			TotalCurrency	100
			TotalCount	8
			MaxActive	4
			SpawnCount	4
			WaitBeforeStarting	0
			WaitBetweenSpawns   20
			Where	spawnbot
			Squad
			{
				TFBot
				{
					ClassIcon   demo_spammer
					Template	T_TFBot_Giant_Demoman
				}
				TFBot
				{
					Template	T_TFBot_Heavy_IronFist_Airblast
					Attributes  "AlwaysCrit"
				}
				TFBot
				{
					Template	T_TFBot_Heavy_IronFist_Airblast
					Attributes  "AlwaysCrit"
				}
				TFBot
				{
					Template	T_TFBot_Heavy_IronFist_Airblast
					Attributes  "AlwaysCrit"
				}
			}
		}
		WaveSpawn
		{
			Name	wave3a2
			TotalCurrency	50
			TotalCount	24
			MaxActive	8
			SpawnCount	2
			WaitBeforeStarting	10
			WaitBetweenSpawns	3
			Where	spawnbot_flank
			TFBot
			{
				Class	Pyro
				Skill	Normal
			}
		}
		WaveSpawn
		{
			Name	wave3b1
			WaitForAllDead	wave3a
			TotalCurrency	100
			TotalCount	6
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	5
			WaitBetweenSpawnsAfterDeath	2
			Where	spawnbot_flank
			TFBot
			{
				Template	T_TFBot_Heavy_IronFist_Airblast
				Attributes  "AlwaysCrit"
			}
		}
		WaveSpawn
		{
			Name	wave3b
			WaitForAllDead	wave3a
			TotalCurrency	50
			TotalCount	20
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	5
			WaitBetweenSpawns	10
			Where	spawnbot
			TFBot
			{
				Name	Heavy
				Class	Heavyweapons
				Skill	Normal
			}
		}
		WaveSpawn
		{
			Name	wave3b
			WaitForAllDead	wave3a
			TotalCurrency	100
			TotalCount	6
			MaxActive	3
			SpawnCount	3
			WaitBeforeStarting	15
			WaitBetweenSpawns	25
			Where   spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Pyro
					Attributes  "AlwaysCrit"
				}
				TFBot
				{
					Template	T_TFBot_Medic_BigHeal
					Name   "Big Heal Medic"
					Item   "The Surgeon's Stahlhelm"
				}
				TFBot
				{
					Template	T_TFBot_Medic_Bigheal
					Name   "Big Heal Medic"
					Item   "The Surgeon's Stahlhelm"
				}
			}
		}
		WaveSpawn
		{
			Name	wave3c
			WaitForAllDead	wave3b
			TotalCurrency	100
			TotalCount	28
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	1
			WaitBetweenSpawns	7
			Where	spawnbot_flank
			TFBot
			{
				Template T_TFBot_Scout_FAN
			}
		}
		WaveSpawn
		{
			Name	wave3c
			WaitForAllDead	wave3b
			TotalCurrency	100
			TotalCount	2
			MaxActive	2
			SpawnCount	1
			WaitBeforeStarting	35
			WaitBetweenSpawns   8
			Where	spawnbot
			TFBot
			{
				Template	T_TFBot_Giant_Soldier_Spammer
			}
		}
		WaveSpawn
		{
			Name	wave3tank
			WaitForAllDead	wave3b
			TotalCurrency	100
			TotalCount	1
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	10
			Where	spawnbot
			Tank
			{
				Health	18000
				Name	"tankboss"
				Speed	75
				StartingPathTrackNode	tank_path_1
				OnKilledOutput
				{
					Target	boss_dead_relay
					Action	Trigger
				}
				OnBombDroppedOutput
				{
					Target	boss_deploy_relay
					Action	Trigger
				}
			}
		}
	}
	//Wave 4
	//Total Money: $700, $800 with bonus from A+ rating
	Wave
	{
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
		WaveSpawn
		{
			Name	wave4a
			TotalCurrency	150
			TotalCount	2
			MaxActive	2
			SpawnCount	2
			WaitBeforeStarting	0
			Where	spawnbot
			Squad
			{
				FormationSize 400
				TFBot
				{
					Template T_TFBot_Chief_Bowman_RapidFire
				}
				TFBot
				{
					Template T_TFBot_Giant_Major_League
					ClassIcon scout_stun
					Name  "Major League Omega"
					Scale 1.9
					Item "The Cockfighter"
					ItemAttributes
					{
						ItemName "The Sandman"
						"mark for death" 1
						"dmg bonus vs buildings" 2
					}
					CharacterAttributes
					{
						"damage force reduction" 0.1
						"airblast vulnerability multiplier" 0.1
						"airblast vertical vulnerability multiplier" 0.1
					}
				}
			}
		}
		WaveSpawn
		{
			Name	wave4b
			WaitForAllDead	wave4a
			TotalCurrency	100
			TotalCount	10
			MaxActive	10
			SpawnCount	5
			WaitBeforeStarting	20
			WaitBetweenSpawns	25
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Heavyweapons_Deflector
				}
				TFBot
				{
					Template	T_TFBot_Soldier_RocketPush
					Attributes  AlwaysCrit
				}
				TFBot
				{
					Template	T_TFBot_Soldier_RocketPush
					Attributes  AlwaysCrit
				}
				TFBot
				{
					Template	T_TFBot_Soldier_RocketPush
					Attributes  AlwaysCrit
				}
				TFBot
				{
					Template	T_TFBot_Soldier_RocketPush
					Attributes  AlwaysCrit
				}
			}
		}
		WaveSpawn
		{
			Name	wave4b
			WaitForAllDead	wave4a
			TotalCurrency	100
			TotalCount	40
			MaxActive	10
			SpawnCount	5
			WaitBeforeStarting	5
			WaitBetweenSpawns	7
			Where	spawnbot
			TFBot
			{
				Template	T_TFBot_Demoknight_Persian
			}
		}
		WaveSpawn
		{
			Name	wave4c
			WaitForAllDead	wave4b
			TotalCurrency	100
			TotalCount	1
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	2
			Where	spawnbot
			Tank
			{
				Health	20000
				Name	"tankboss"
				Speed	75
				StartingPathTrackNode	tank_path_1
				OnKilledOutput
				{
					Target	boss_dead_relay
					Action	Trigger
				}
				OnBombDroppedOutput
				{
					Target	boss_deploy_relay
					Action	Trigger
				}
			}
		}
		WaveSpawn
		{
			Name	wave4c
			WaitForAllDead	wave4b
			TotalCurrency	150
			TotalCount	3
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	10
			WaitBetweenSpawnsAfterDeath	8
			Where	spawnbot
			TFBot
			{
				Template   T_TFBot_Giant_Scout_Fast
				Attributes AlwaysCrit
			}
		}
		WaveSpawn
		{
			Name	wave4horde
			WaitForAllSpawned	wave4b
			TotalCurrency	50
			TotalCount	20
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	15
			WaitBetweenSpawns	5
			Where	spawnbot
			Support   1
			TFBot
			{
				Class	Demoman
				Skill	Easy
			}
		}
		WaveSpawn
		{
			Name	wave4support
			WaitForAllSpawned	wave4b
			TotalCurrency	50
			TotalCount	10
			MaxActive	4
			SpawnCount	2
			WaitBeforeStarting	15
			WaitBetweenSpawns	5
			Where  spawnbot
			Where  spawnbot_flank
			Support  1
			TFBot
			{
				Template T_TFBot_Heavyweapons_Gnome
				Health  300
				Skill   Hard
				Item "The All-Father"
				Item "Point and Shoot"
				ItemAttributes
				{
					ItemName "The Holiday Punch"
					"damage bonus" 1
				}
			}
		}
	}
	//Wave 5
	//Total Money: $800, $900 with bonus from A+ rating
	Wave
	{
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
		WaveSpawn
		{
			Name	wave5a
			TotalCurrency	100
			TotalCount	4
			MaxActive	2
			SpawnCount	2
			WaitBeforeStarting	0
			WaitBetweenSpawns	15
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Soldier_RocketShotgun
				}
				TFBot
				{
					Template	T_TFBot_Medic
					Skill Expert
				}
			}
		}
		WaveSpawn
		{
			Name	wave5a
			TotalCurrency	50
			TotalCount	20
			MaxActive	10
			SpawnCount	10
			WaitBeforeStarting	5
			WaitBetweenSpawns	15
			Where	spawnbot
			TFBot
			{
				Template  T_TFBot_Heavyweapons_Shotgun
				Name   "Shotgun Heavy"
			}
		}
		WaveSpawn
		{
			Name	wave5b1
			WaitForAllDead	wave5a
			TotalCurrency	100
			TotalCount	6
			MaxActive	2
			SpawnCount	2
			WaitBeforeStarting	5
			WaitBetweenSpawns	15
			Where	spawnbot
			TFBot
			{
				Template	T_TFBot_Giant_Soldier_Crit
			}
		}
		WaveSpawn
		{
			Name	wave5b1
			WaitForAllDead	wave5a
			TotalCurrency	100
			TotalCount	3
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	8
			WaitBetweenSpawns	15
			Where	spawnbot_flank
			TFBot
			{
				Template	T_TFBot_Giant_Soldier_Spammer
			}
		}
		WaveSpawn
		{
			Name	wave5b1
			WaitForAllDead	wave5a
			TotalCurrency	50
			TotalCount	32
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	5
			WaitBetweenSpawns	8
			Where	spawnbot
			TFBot
			{
				Template  T_TFBot_Heavyweapons_Shotgun
				Name   "Shotgun Heavy"
			}
		}
		WaveSpawn
		{
			Name	wave5b2
			WaitForAllSpawned	wave5b1
			TotalCurrency	100
			TotalCount	8
			MaxActive	4
			SpawnCount	2
			WaitBeforeStarting	10
			WaitBetweenSpawns	4
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Soldier_RocketPush
				}
				TFBot
				{
					Template	T_TFBot_Medic
					Skill Expert
				}
			}
		}
		WaveSpawn
		{
			Name	wave5c
			WaitForAllSpawned	wave5b2
			TotalCurrency	50
			TotalCount	4
			MaxActive	4
			SpawnCount	4
			WaitBeforeStarting	30
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Soldier_Spammer_Reload
				}
				TFBot
				{
					Template	T_TFBot_Medic
					Skill Expert
				}
				TFBot
				{
					Template	T_TFBot_Medic
					Skill Expert
				}
				TFBot
				{
					Template	T_TFBot_Medic
					Skill Expert
				}
			}
		}
		WaveSpawn
		{
			Name	wave5c
			WaitForAllSpawned	wave5b2
			TotalCurrency	50
			TotalCount	4
			MaxActive	4
			SpawnCount	4
			WaitBeforeStarting	30
			Where	spawnbot_flank
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Soldier_Spammer_Reload
				}
				TFBot
				{
					Template	T_TFBot_Medic
					Skill Expert
				}
				TFBot
				{
					Template	T_TFBot_Medic
					Skill Expert
				}
				TFBot
				{
					Template	T_TFBot_Medic
					Skill Expert
				}
			}
		}
		WaveSpawn
		{
			Name	wave5d
			WaitForAllDead	wave5c
			TotalCurrency	100
			TotalCount	6
			MaxActive	6
			SpawnCount	6
			WaitBeforeStarting	0
			Where	spawnbot
			Squad
			{
				FormationSize 400
				TFBot
				{
					Template	T_TFBot_Giant_Soldier_SlowBarrage
					Attributes  AlwaysCrit
				}
				TFBot
				{
					Template	T_TFBot_Medic
					Skill Expert
				}
				TFBot
				{
					Template	T_TFBot_Medic
					Skill Expert
				}
				TFBot
				{
					Template	T_TFBot_Medic
					Skill Expert
				}
				TFBot
				{
					Template	T_TFBot_Medic
					Skill Expert
				}
				TFBot
				{
					Template	T_TFBot_Medic
					Skill Expert
				}
			}
		}
		WaveSpawn
		{
			Name	wave5support
			WaitForAllDead	wave5b1
			TotalCurrency	50
			TotalCount	20
			MaxActive	6
			SpawnCount	3
			WaitBeforeStarting	5
			WaitBetweenSpawns	12
			Where	spawnbot_flank
			Support 1
			Squad
			{
				TFBot
				{
					ClassIcon  sniper_jarate
					Name	"Jarate Master"
					Class	Sniper
					Skill	Expert
					WeaponRestrictions	SecondaryOnly
					Attributes AlwaysFireWeapon
					Item	"jarate"
					Item	"desert marauder"
					ItemAttributes
					{
						ItemName	"jarate"
						"effect bar recharge rate increased"	0.001
					}
				}
				TFBot
				{
					Template	T_TFBot_Sniper_Jarate_Master_Bleed
				}
				TFBot
				{
					Template	T_TFBot_Sniper_Jarate_Master_Bleed
				}
			}
		}
		WaveSpawn
		{
			Name	wave5horde
			WaitForAllDead	wave5b1
			TotalCurrency	50
			TotalCount	30
			MaxActive	6
			SpawnCount	3
			WaitBeforeStarting	0
			WaitBetweenSpawns	3
			Support	1
			Where   spawnbot
			Where   spawnbot_flank
			TFBot
			{
				Template T_TFBot_Heavyweapons_Heavyweight_Champ
				Skill 	Hard
			}
		}
	}
	//Wave 6
	//Total Money: $900, $1000 with bonus from A+ rating
	Wave
	{
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
		WaveSpawn
		{
			Name	wave6a
			TotalCurrency	50
			TotalCount	40
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	0
			WaitBetweenSpawns	1
			Where	spawnbot
			RandomChoice
			{
				TFBot
				{
					Class Pyro
					Name  "Backburner Pyro"
					Skill Normal
					Item  "the backburner"
					ClassIcon pyro_backburner_nys
				}
				TFBot
				{
					Class Pyro
					Skill Normal
					Name  "Backburner Pyro"
					Item  "the backburner"
					ClassIcon pyro_backburner_nys
				}
				TFBot
				{
					Class Pyro
					Skill Hard
					Name  "Backburner Pyro"
					Item  "the backburner"
					ClassIcon pyro_backburner_nys
				}
			}
		}
		WaveSpawn
		{
			Name	wave6a
			TotalCurrency	50
			TotalCount	24
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	0
			WaitBetweenSpawns	8
			Where	spawnbot
			TFBot
			{
				Class Demoman
				Skill Hard
			}
		}
		WaveSpawn
		{
			Name	wave6a2
			WaitForAllSpawned	wave6a
			TotalCurrency	50
			TotalCount	3
			MaxActive	3
			SpawnCount	3
			WaitBeforeStarting	5
			Where	spawnbot
			TFBot
			{
				Template	T_TFBot_Giant_Scout
				MaxVisionRange 1200
				Attributes  "HoldFireUntilFullReload"
				Item  "Upgradeable tf_weapon_scattergun"
				ItemAttributes
				{
					ItemName	"Upgradeable tf_weapon_scattergun"
					"fire rate bonus"	0.6
				}
			}
		}
		WaveSpawn
		{
			Name	wave6b
			WaitForAllDead 	wave6a
			TotalCurrency	100
			TotalCount	30
			MaxActive	5
			SpawnCount	5
			WaitBeforeStarting	0
			WaitBetweenSpawns	10
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template T_TFBot_Demo_Burst
					Attributes  AlwaysCrit
				}
			}
		}
		WaveSpawn
		{
			Name	wave6b
			WaitForAllDead 	wave6a
			TotalCurrency	100
			TotalCount	30
			MaxActive	6
			SpawnCount	6
			WaitBeforeStarting	10
			WaitBetweenSpawns	10
			Where	spawnbot_flank
			TFBot
			{
				Template	T_TFBot_ScorchShot_FastShot
				ClassIcon   pyro_scorch
			}
		}
		WaveSpawn
		{
			Name	wave6b
			WaitForAllDead 	wave6a
			TotalCurrency	200
			TotalCount	9
			MaxActive	3
			SpawnCount	3
			WaitBeforeStarting	10
			WaitBetweenSpawns	20
			Where	spawnbot
			Squad
			{
				TFBot
				{
					Template	T_TFBot_Giant_Heavyweapons_Shotgun
				}
				TFBot
				{
					Template    T_TFBot_Medic
					Skill Expert
				}
				TFBot
				{
					Template    T_TFBot_Medic
					Skill Expert
				}
			}
		}
		WaveSpawn
		{
			Name	wave6c
			WaitForAllDead	wave6b
			TotalCurrency	100
			TotalCount	14
			MaxActive	14
			SpawnCount	7
			WaitBeforeStarting	20
			WaitBetweenSpawns   25
			Where	spawnbot
			Squad
			{
				FormationSize 400
				TFBot
				{
					Template	T_TFBot_Giant_Heavyweapons_Deflector
					Item  "the brass beast"
					ItemAttributes
					{
						ItemName "the brass beast"
						"attack projectiles" 1
						"damage bonus" 1.7
					}		
				}
				TFBot
				{
					Template	T_TFBot_Medic
					Skill Expert
				}
				TFBot
				{
					Template	T_TFBot_Medic
					Skill Expert
				}
				TFBot
				{
					Template	T_TFBot_Medic
					Skill Expert
				}
				TFBot
				{
					Template	T_TFBot_Medic
					Skill Expert
				}
				TFBot
				{
					Template	T_TFBot_Medic
					Skill Expert
				}
				TFBot
				{
					Template	T_TFBot_Medic
					Skill Expert
				}
			}
		}
		WaveSpawn
		{
			Name	wave6c
			WaitForAllDead	wave6b
			TotalCurrency	100
			TotalCount	27
			MaxActive	6
			SpawnCount	2
			WaitBeforeStarting	0
			WaitBetweenSpawns	3
			Where	spawnbot
			TFBot
			{
				ClassIcon  soldier_crit
				Name   "Charged Soldier"
				Class 	Soldier
				Skill 	Hard
				Attributes	"AlwaysCrit"
				Attributes  "HoldFireUntilFullReload"
				Item  "the original"
				Item  "stout shako"
				ItemAttributes
				{
					ItemName "The Original"
					"faster reload rate" 0.4
					"fire rate bonus" 1.25
					"projectile speed increased" 0.5
				}
			}
		}
		WaveSpawn
		{
			Name	wave6c
			WaitForAllDead	wave6b
			TotalCurrency	50
			TotalCount	3
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	20
			WaitBetweenSpawns	25
			Where	spawnbot
			TFBot
			{
				Template	T_TFBot_Giant_Scout
				MaxVisionRange  1200
				Attributes  "HoldFireUntilFullReload"
				Item  "Upgradeable tf_weapon_scattergun"
				ItemAttributes
				{
					ItemName	"Upgradeable tf_weapon_scattergun"
					"fire rate bonus"	0.6
				}
			}
		}
	}
	//Wave 7
	//Total Money: $200
	Wave
	{
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
		WaveSpawn
		{
			Name	wave7a
			TotalCurrency	50
			TotalCount	24
			MaxActive	6
			SpawnCount	6
			WaitBeforeStarting	0
			WaitBetweenSpawns	10
			Where   spawnbot
			TFBot
			{
				ClassIcon  heavy_deflector
				Name  "Deflector Heavy"
				Class	HeavyWeapons
				Skill	Hard
				MaxVisionRange 1200
				ItemAttributes
				{
					ItemName	"deflector"
					"attack projectiles"	1
				}
				Item	"deflector"
				Item	"the u-clank-a"
			}
		}
	    WaveSpawn
		{
			Name	wave7a
			TotalCurrency	50
			TotalCount	30
			MaxActive	9
			SpawnCount	3
			WaitBeforeStarting	2
			WaitBetweenSpawns	4
			Where   spawnbot
			TFBot
			{
				//based from Cataclysm, Coaltown Expert mission
				Class Sniper
				Skill Hard
				WeaponRestrictions PrimaryOnly
				ClassIcon sniper_bow_multi
				Name "Quick Draw Bowman"
				Item "The Huntsman"
				Item "the fruit shoot"
				Attributes AlwaysCrit
				ItemAttributes 
				{
					ItemName "The Huntsman"
					"damage penalty" 0.075
					"faster reload rate" 0.4	
				}
			}
		}
		WaveSpawn
		{
			Name	wave7a
			TotalCurrency	50
			TotalCount	3
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	10
			WaitBetweenSpawns	10
			Where	spawnbot
			TFBot
			{
				Template  	T_TFBot_Giant_Soldier_Spammer
			}
		}
		WaveSpawn
		{
			Name	wave7a
			TotalCurrency	50
			TotalCount	6
			MaxActive	2
			SpawnCount	2
			WaitBeforeStarting	10
			WaitBetweenSpawns	10
			Where	spawnbot_flank
			TFBot
			{
				Template	T_TFBot_Giant_Demo_Burst
				Attributes  "AlwaysCrit"
			}
		}
		WaveSpawn
		{
			Name	wave7boss
			WaitForAllDead    wave7a
			TotalCurrency	0
			TotalCount	11
			MaxActive	11
			SpawnCount	11
			WaitBeforeStarting	5
			Where	spawnbot
			Squad
			{
				FormationSize 400
				TFBot
				{
					Template	T_TFBot_Chief_Demoman_RapidFire
				}
				TFBot
				{
					Template	T_TFBot_Medic_QuickUber
					Skill       Expert
					Name   "Extended Uber Medic"
					Item   "Prussian Pickelhaube"
					ItemAttributes
					{
						ItemName "TF_WEAPON_MEDIGUN"
						"uber duration bonus" 4
					}
				}
				TFBot
				{
					Template	T_TFBot_Medic_QuickUber
					Skill       Expert
					Name   "Extended Uber Medic"
					Item   "Prussian Pickelhaube"
					ItemAttributes
					{
						ItemName "TF_WEAPON_MEDIGUN"
						"uber duration bonus" 4
					}
				}
				TFBot
				{
					Template	T_TFBot_Medic_QuickUber
					Skill       Expert
					Name   "Extended Uber Medic"
					Item   "Prussian Pickelhaube"
					ItemAttributes
					{
						ItemName "TF_WEAPON_MEDIGUN"
						"uber duration bonus" 4
					}
				}
				TFBot
				{
					Template	T_TFBot_Medic_QuickUber
					Skill       Expert
					Name   "Extended Uber Medic"
					Item   "Prussian Pickelhaube"
					ItemAttributes
					{
						ItemName "TF_WEAPON_MEDIGUN"
						"uber duration bonus" 4
					}
				}
				TFBot
				{
					Template	T_TFBot_Medic_QuickUber
					Skill       Expert
					Name   "Extended Uber Medic"
					Item   "Prussian Pickelhaube"
					ItemAttributes
					{
						ItemName "TF_WEAPON_MEDIGUN"
						"uber duration bonus" 4
					}
				}
				TFBot
				{
					Template	T_TFBot_Medic_QuickUber
					Skill       Expert
					Name   "Extended Uber Medic"
					Item   "Prussian Pickelhaube"
					ItemAttributes
					{
						ItemName "TF_WEAPON_MEDIGUN"
						"uber duration bonus" 4
					}
				}
				TFBot
				{
					Template	T_TFBot_Medic_QuickUber
					Skill       Expert
					Name   "Extended Uber Medic"
					Item   "Prussian Pickelhaube"
					ItemAttributes
					{
						ItemName "TF_WEAPON_MEDIGUN"
						"uber duration bonus" 4
					}
				}
				TFBot
				{
					Template	T_TFBot_Medic_QuickUber
					Skill       Expert
					Name   "Extended Uber Medic"
					Item   "Prussian Pickelhaube"
					ItemAttributes
					{
						ItemName "TF_WEAPON_MEDIGUN"
						"uber duration bonus" 4
					}
				}
				TFBot
				{
					Template	T_TFBot_Medic_QuickUber
					Skill       Expert
					Name   "Extended Uber Medic"
					Item   "Prussian Pickelhaube"
					ItemAttributes
					{
						ItemName "TF_WEAPON_MEDIGUN"
						"uber duration bonus" 4
					}
				}
				TFBot
				{
					Template	T_TFBot_Medic_QuickUber
					Skill       Expert
					Name   "Extended Uber Medic"
					Item   "Prussian Pickelhaube"
					ItemAttributes
					{
						ItemName "TF_WEAPON_MEDIGUN"
						"uber duration bonus" 4
					}
				}
			}
		}
	}
}
