//Loco Legion
//An Advanced mission for the map Almazara by botrot. https://steamcommunity.com/id/BotRot
					
//Wave 1: $800; Wave 2: $800; Wave 3: $700; Wave 4: $1000; Wave 5: $800; Wave 6: $900 
//Total Mission Money (including starting money): $6200 ; $6700 with bonus from A+ rating

#base robot_giant.pop
#base robot_standard.pop

WaveSchedule
{
	//Initial Money $1200
	StartingCurrency	1200
	RespawnWaveTime	3
	CanBotsAttackWhileInSpawnRoom	no
 

	Advanced 1
	
	//Custom Bot Templates
	Templates
	{
		//Offense Classes
		T_TFBot_Giant_Soldier_Burst2 // Bigrock Burst Fire without double damage and crits
		{
			Class Soldier
			Name "Giant Burst Fire Soldier" 
			ClassIcon soldier_burstfire
			Health 4200
			Skill Expert
			WeaponRestrictions PrimaryOnly
			Attributes MiniBoss
			Attributes HoldFireUntilFullReload
			ItemAttributes
			{
					ItemName "TF_WEAPON_ROCKETLAUNCHER"
					"faster reload rate" 0.4
					"fire rate bonus" 0.2
					"clip size upgrade atomic" 5.0
					"Projectile speed increased" 0.9
			}
			CharacterAttributes
			{
				"move speed bonus"	0.5
				"damage force reduction" 0.4
				"airblast vulnerability multiplier" 0.4
				"override footstep sound set" 3
			}
		}
		T_TFBot_Pyro_Phlog
		{
			ClassIcon	pyro_phlog_v2
			Name	"Phlogiston Pyro"
			Class	Pyro
			Skill	Hard
			Attributes	SpawnWithFullCharge
			Item	"the phlogistinator"
			Item	"pyro's boron beanie"
		}
		T_TFBot_Giant_Pyro_Dragon
		{
			ClassIcon pyro_dragon_fury_fast
			Name "Giant Fast Furious Pyro"
			Health  3300
			Class Pyro
			Skill Expert
			MaxVisionRange	1000
			Item "the dragon's fury"
			Attributes AlwaysCrit
			WeaponRestrictions PrimaryOnly
			Attributes  MiniBoss
			CharacterAttributes
			{
				"move speed bonus"	0.5
				"damage force reduction" 0.6
				"airblast vulnerability multiplier" 0.6
				"override footstep sound set" 6
			}
			ItemAttributes
			{
				ItemName "The Dragon's Fury"
				"speed_boost_on_hit" 5
			}
		}
	
		//Defense Classes
		T_TFBot_Giant_Demoman_Loch
		{
			Class Demoman
			Name "Giant Rapid Fire Demoman"
			ClassIcon demo_loch_spammer_b
			Skill Normal
			Health 3300
			WeaponRestrictions PrimaryOnly
			Attributes HoldFireUntilFullReload
			Attributes MiniBoss
			Item "the loch-n-load"
			ItemAttributes
			{
				ItemName "the loch-n-load"
				"faster reload rate" -0.4
				"fire rate bonus" 0.5
			}
			CharacterAttributes
			{
				"move speed bonus"	0.5
				"damage force reduction" 0.5
				"airblast vulnerability multiplier" 0.5
				"override footstep sound set" 4
			}
		}
		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 "ali baba's wee booties"
				"max health additive bonus" 0
			}
			ItemAttributes
			{
				ItemName	"the splendid screen"
				"attack not cancel charge"	1
			}
		}
		T_TFBot_Heavyweapons_BrassFist
        {
			Class Heavyweapons
			ClassIcon heavy_brass_nys
			Skill Easy
			Health 900
			Scale 1.5
			MaxVisionRange 750
			Name  "Hibernating Heavy"
			Item "The Brass Beast"
			Item  "the buffalo steak sandvich"
			Item  "Warrior's Spirit"
			Item   "Big Chief"
			Tag big_giants
			ItemAttributes
			{
				ItemName "the buffalo steak sandvich"
				"force weapon switch" 1
				"single wep holster time increased" 0.1
			}
			CharacterAttributes
			{
				"deploy time increased" 0.5
			}
        }
		T_TFBot_Giant_Heavy_CritOnKill
		{
			ClassIcon	heavy_booster
			Health	5000
			Name	"Giant Crit-on-Kill Heavy"
			Class	HeavyWeapons
			Skill	Expert
			MaxVisionRange	1200
			WeaponRestrictions	PrimaryOnly
			Attributes	"MiniBoss"
			Item   "Upgradeable tf_weapon_minigun"
			Tag big_giants
			ItemAttributes
			{
				ItemName	"Upgradeable tf_weapon_minigun"
				"damage bonus"	1.25
				"critboost on kill"	3
			}
			CharacterAttributes
			{
				"move speed bonus"	0.5
				"damage force reduction"	0.3
				"airblast vulnerability multiplier"	0.3
				"override footstep sound set"	6
			}
		}
		//Support Classes
		T_TFBot_Medic_Shield
		{
			Class Medic
			Name "Shield Medic"
			Skill Expert
			ClassIcon medic_shield_lite
			WeaponRestrictions SecondaryOnly
			Attributes SpawnWithFullCharge
			Attributes IgnoreEnemies
			Attributes ProjectileShield
			Item  "the bot dogger"
			ItemAttributes
			{
				ItemName tf_weapon_medigun
				"ubercharge rate bonus" 0.01
				"generate rage on heal" 3
				"increase buff duration" 3
			}
			CharacterAttributes
			{
				"bot medic uber deploy delay duration" 9999
				"heal rate bonus" 2	
			}
		}
		T_TFBot_Medic_Overheal
		{
			Class Medic
			Name "Overhealer Medic"
			Skill Expert
			ClassIcon medic_overheal
			Item  "das naggenvatcher"
			ItemAttributes
			{
				ItemName "TF_WEAPON_SYRINGEGUN_MEDIC"
				"damage penalty" 0.1
			}
			ItemAttributes
			{
				ItemName tf_weapon_medigun
				"ubercharge rate bonus" 0.01
				"overheal decay disabled" 1
			}
			CharacterAttributes
			{
				"move speed bonus" 1.3 // keeps up with faster patients
				"heal rate bonus" 2
				"overheal fill rate reduced" 2
				"overheal expert" 2
				"patient overheal penalty" 0
			}
		}
		T_TFBot_Sniper_Lawrence
		{
			Name "Lawrence Sniper"
			Class Sniper
			Skill Hard
			MaxVisionRange  2500
			Item "The Bazaar Bargain"
			Item "The Shahanshah"
			Item "Desert Marauder"
			ItemAttributes
			{
				ItemName "The Bazaar Bargain"
				"mult sniper charge penalty DISPLAY ONLY" 1
				"sniper charge per sec" 3
			}
		}
		T_TFBot_Spy_Honor
		{
			ClassIcon spy
			Name	"Spy of Dishonor"
			Class	Spy
			Skill	Expert
			Item	"the enforcer"
			Item	"the big earner"
			Item	"cosa nostra cap"
			Item	"the made man"
		}

	}
	//Support Robot Missions
	Mission
	{
		Objective	DestroySentries
		Where	spawnbot_mission_sentrybuster
		BeginAtWave	1
		RunForThisManyWaves	6
		InitialCooldown	30
		CooldownTime	30
		DesiredCount	1
		TFBot
		{
			Template	T_TFBot_SentryBuster
			Attributes	DisableDodge
			Tag big_giants
			CharacterAttributes
			{
				"damage force reduction" 0.1
				"airblast vulnerability multiplier" 0.1
                "airblast vertical vulnerability multiplier" 0.1
			}
		}
	}
	Mission
	{
		Objective	Sniper
		Where	spawnbot_mission_sniper
		BeginAtWave	1
		RunForThisManyWaves	1
		InitialCooldown	45
		CooldownTime	40
		DesiredCount	2
		TFBot
		{
			Template	T_TFBot_Sniper_Lawrence
		}
	}
	Mission
	{
		Objective	Spy
		Where	spawnbot_mission_spy
		BeginAtWave	3
		RunForThisManyWaves	2
		InitialCooldown	30
		CooldownTime	45
		DesiredCount	3
		TFBot
		{
			Template	T_TFBot_Spy_Honor
			ItemAttributes
			{
				ItemName	"the enforcer"
				"auto fires when full" 1
				"auto fires full clip" 1
				"reload time increased hidden" 1.5
			}
		}
	}
	Mission
	{
		Objective	Sniper
		Where	spawnbot_mission_sniper
		BeginAtWave	4
		RunForThisManyWaves	1
		InitialCooldown	30
		CooldownTime	45
		DesiredCount	3
		TFBot
		{
			Template	T_TFBot_Sniper_Lawrence
		}
	}
	Mission
	{
		Objective	Sniper
		Where	spawnbot_mission_sniper
		BeginAtWave	5
		RunForThisManyWaves	1
		InitialCooldown	65
		CooldownTime	45
		DesiredCount	2
		TFBot
		{
			Template	T_TFBot_Sniper_Lawrence
		}
	}
	Mission
	{
		Objective	Engineer
		Where	spawnbot_mission_sentrybuster
		BeginAtWave	6
		RunForThisManyWaves	1
		InitialCooldown	30
		CooldownTime	40
		DesiredCount	1
		TFBot
		{
			Template	T_TFBot_Engineer_Sentry_Teleporter
            TeleportWhere spawnbot_carrier_1
			TeleportWhere spawnbot_carrier_2
			TeleportWhere spawnbot_mission_sniper
            TeleportWhere spawnbot_mission_sentrybuster
            Item "The Jag"
			Health 600 //Rottenburg Engineer health
			CharacterAttributes
			{
				"kill forces attacker to laugh"	1
			}
		}
	}
	
	
	//Wave 1
	//Total Money: $800, $900 with bonus from A+ rating
	Wave
	{
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
		InitWaveOutput
        {
            Target BigNet
            Action runscriptcode
            Param "
			EntFire(`clearall_relay`,`Trigger`,null,0.78)
			EntFire(`arrows_clear_relay`,`Trigger`,null,0.78)
            EntFire(`robotpath_purple_relay`,`Trigger`,null,0.78)
            IncludeScript(`tankextensions_main`, getroottable())
            IncludeScript(`tankextensions/blimp`, getroottable())
			IncludeScript(`tankextensions/combattank`, getroottable())
    	    IncludeScript(`tankextensions/combattank_weapons/minigun`, getroottable())
                  "
        }
		WaveSpawn
		{
			Name	wave1a
			TotalCurrency	100
			TotalCount	20
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	0
			WaitBetweenSpawns	4
			Where	spawnbot_carrier_1
			Squad
			{
				TFBot
				{
					Class Demoman
					Skill Normal
					Attributes HoldFireUntilFullReload
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Name  "Quick Uber Medic"
					Skill Expert
					Item   "Prussian Pickelhaube"
				}
				TFBot
				{
					Class Demoman
					Skill Normal
					Attributes HoldFireUntilFullReload
				}
				TFBot
				{
					Class Demoman
					Skill Normal
					Attributes HoldFireUntilFullReload
				}
			}
		}
		WaveSpawn
		{
			Name	wave1a
			TotalCurrency	100
			TotalCount	25
			MaxActive	10
			SpawnCount	5
			WaitBeforeStarting	5
			WaitBetweenSpawns	5
			Where   spawnbot_carrier_1
			Where	spawnbot_carrier_2
			TFBot
			{
				Template T_TFBot_Demoknight_Persian
			}
		}
		WaveSpawn
		{
			Name	wave1b
			WaitForAllSpawned wave1a
			TotalCurrency	50
			TotalCount	24
			MaxActive	8
			SpawnCount	2
			WaitBeforeStarting	5
			WaitBetweenSpawns	1
			Where   spawnbot_carrier_1
			Where	spawnbot_carrier_2
			TFBot
			{
				Class	Scout
				Skill	Easy
				MaxVisionRange 750
			}
		}
		WaveSpawn
		{
			Name	wave1b
			WaitForAllSpawned wave1a
			TotalCurrency	100
			TotalCount	16
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	5
			WaitBetweenSpawns	3
			Where   spawnbot_carrier_1
			Where	spawnbot_carrier_2
			TFBot
			{
				Class Soldier
				Name "Conch Soldier"
				Skill Hard
				ClassIcon soldier_conch
				Attributes SpawnWithFullCharge
				Item "The Concheror"
				CharacterAttributes
				{
					"deploy time increased" 0.5
					"increase buff duration"	2
				}
			}
		}
		WaveSpawn
		{
			Name	wave1b
			WaitForAllSpawned wave1a
			TotalCurrency	50
			TotalCount	1
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	23
			Where   spawnbot_carrier_1
			TFBot
			{
				Template T_TFBot_Giant_Scout_Baseball_Armored
			}
		}
		WaveSpawn
		{
			Name	wave1tank
			WaitForAllSpawned wave1b
			TotalCurrency	100
			TotalCount	1
			SpawnCount	1
			WaitBeforeStarting  5
			Tank
			{
				Health	15000
				Name	"tankboss"
				Speed	75
				StartingPathTrackNode	"tank_path_A"
				OnBombDroppedOutput
				{
					Target	boss_deploy_relay
					Action	Trigger
				}
				OnKilledOutput                                  
				{
					Target boss_dead_relay
					Action Trigger                         
				}
			}
			FirstSpawnOutput
			{
				Target	boss_spawn_relay
				Action	Trigger
			}
		}
		WaveSpawn
		{
			Name	wave1c2
			WaitForAllSpawned wave1b
			TotalCurrency	100
			TotalCount	9
			MaxActive	9
			SpawnCount	1
			WaitBeforeStarting	0
			WaitBetweenSpawns	0.5
			Where	spawnbot_carrier_1
			TFBot
			{
				Class Soldier
				Skill Hard
				Item "the direct hit"
				ClassIcon soldier_directhit_lite
				Name "Direct Hit Soldier"
			}
		}
		WaveSpawn
		{
			Name	wave1c2
			WaitForAllSpawned wave1b
			TotalCurrency	100
			TotalCount	12
			MaxActive	8
			SpawnCount	2
			WaitBeforeStarting	5
			WaitBetweenSpawns	2
			Where	spawnbot_carrier_2
			Squad
			{
				TFBot
				{
					Class Soldier
					Skill Hard
					Item "the direct hit"
					ClassIcon soldier_directhit_lite
					Name "Direct Hit Soldier"
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Name  "Quick Uber Medic"
					Skill Expert
					Item   "Prussian Pickelhaube"
				}
			}
		}
		WaveSpawn
		{
			Name	wave1support
			TotalCurrency	100
			TotalCount	10
			MaxActive	3
			SpawnCount	1
			WaitBeforeStarting	12
			WaitBetweenSpawns	14
			Where   spawnbot_carrier_1
			Where	spawnbot_carrier_2
			Support 1
			TFBot
			{
				Template T_TFBot_Heavyweapons_BrassFist
			}
		}
	}
	//Wave 2
	//Total Money: $800, $900 with bonus from A+ rating
	Wave
	{
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
		InitWaveOutput //forces bomb path
        {
            Target BigNet
            Action RunScriptCode
            Param "
			EntFire(`clearall_relay`,`Trigger`,null,0.78)
            EntFire(`arrows_clear_relay`,`Trigger`,null,0.78)
            EntFire(`robotpath_red_relay`,`Trigger`,null,0.78)
            "
        }
		WaveSpawn
		{
			Name	wave2a
			TotalCurrency	100
			TotalCount	30
			MaxActive	12
			SpawnCount	6
			WaitBeforeStarting	0
			WaitBetweenSpawns	1
			Where   spawnbot_carrier_1
			Where	spawnbot_carrier_2
			TFBot
			{
				Name "Bonk Scatter Scout"
				Class Scout
				Skill Normal
				Item "Bonk! Atomic Punch"
				Item "Bonk Helm"
				ClassIcon scout_bonk_scatter_nys2
				CharacterAttributes
				{
					"deploy time increased"	0.5
				}
			}
		}
		WaveSpawn
		{
			Name	wave2a
			TotalCurrency	100
			TotalCount	2
			MaxActive	2
			SpawnCount	1
			WaitBeforeStarting	5
			WaitBetweenSpawns	18
			Where   spawnbot_carrier_1
			TFBot
			{
				Template T_TFBot_Giant_Soldier_Crit
				Tag big_giants
			}
		}
		WaveSpawn
		{
			Name	wave2a
			TotalCurrency	100
			TotalCount	2
			MaxActive	2
			SpawnCount	1
			WaitBeforeStarting	10
			WaitBetweenSpawns	18
			Where   spawnbot_carrier_2
			TFBot
			{
				Template T_TFBot_Giant_Soldier_Crit
				Tag big_giants
			}
		}
		WaveSpawn
		{
			Name	wave2b
			WaitForAllSpawned wave2a
			TotalCurrency	100
			TotalCount	20
			MaxActive	6
			SpawnCount	2
			WaitBeforeStarting	8
			WaitBetweenSpawns	0.5
			Where   spawnbot_carrier_1
			Where   spawnbot_carrier_2
			TFBot
			{
				Template T_TFBot_Pyro_Phlog
				ItemAttributes
				{
					ItemName	"the phlogistinator"
					"airblast disabled"	0
				}
			}
		}
		WaveSpawn
		{
			Name	wave2b
			WaitForAllSpawned wave2a
			TotalCurrency	100
			TotalCount	20
			MaxActive	10
			SpawnCount	5
			WaitBeforeStarting	15
			WaitBetweenSpawns	3
			Where   spawnbot_carrier_1
			Where   spawnbot_carrier_2
			TFBot
			{
				Template T_TFBot_Demo_Burst
				Name "Burst Fire Demoman"
			}
		}
		WaveSpawn
		{
			Name	wave2b
			WaitForAllSpawned wave2a
			TotalCurrency	100
			TotalCount	8
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	15
			WaitBetweenSpawns	25
			Where   spawnbot_carrier_1
			Where   spawnbot_carrier_2
			Squad
			{
				TFBot
				{
					ClassIcon pyro_gascann
					Name "Giant Gaseous Pyro"
                    Template	T_TFBot_Giant_Pyro
                    Attributes AlwaysFireWeapon
                    WeaponRestrictions SecondaryOnly
                    Item  "employee of the mmmph"
					Item "the frymaster"
                    Item  "the gas passer"
                    ItemAttributes
					{
						ItemName "tf_weapon_flamethrower"
						"lunchbox adds minicrits" 2
					}
                    ItemAttributes
                    {
                        ItemName	"the gas passer"
                        "item_meter_charge_rate" 5
                        "weapon burn dmg increased" 2
                    }
                    CharacterAttributes
                    {
                        "deploy time increased" 0.5
                    }
				}
				TFBot
				{
					Template	T_TFBot_Medic_BigHeal
					Name   "Big Heal Medic"
					Item   "The Surgeon's Stahlhelm"
					Skill Expert
				}
				TFBot
				{
					Template	T_TFBot_Medic_BigHeal
					Name   "Big Heal Medic"
					Item   "The Surgeon's Stahlhelm"
					Skill Expert
				}
				TFBot
				{
					Template	T_TFBot_Medic_BigHeal
					Name   "Big Heal Medic"
					Item   "The Surgeon's Stahlhelm"
					Skill Expert
				}
			}
		}
		WaveSpawn
		{
			Name	wave2c
			WaitForAllSpawned wave2b
			TotalCurrency	200
			TotalCount	2
			MaxActive	2
			SpawnCount	2
			WaitBeforeStarting	0
			Where   spawnbot_mission_boss 
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Soldier_Burst2
					Tag big_giants
				}
				TFBot
				{
					Class Medic
					Name "Giant Uber Medic"
					ClassIcon medic_uber_giant
					Skill Expert
					Health 4500
					Attributes SpawnWithFullCharge
					Item "The Virus Doctor"
					WeaponRestrictions SecondaryOnly
					Attributes IgnoreEnemies
					Attributes MiniBoss
					Tag big_giants
					ItemAttributes
					{
						ItemName "TF_WEAPON_MEDIGUN"
						"ubercharge rate bonus" 3
					}
					CharacterAttributes
					{
						"move speed bonus"	0.5
						"damage force reduction" 0.6
						"airblast vulnerability multiplier" 0.6
						"heal rate bonus" 200
						"bot medic uber health threshold" 1000	
					}
				}
			}
		}
		WaveSpawn
		{
			Name	wave2support
			WaitForAllSpawned wave2a
			TotalCurrency	0
			TotalCount	2
			MaxActive	2
			SpawnCount	2
			WaitBeforeStarting	0
			Where   spawnbot_carrier_1
			Support Limited
			TFBot
			{
				Template T_TFBot_Engineer_Sentry_Battle
			}
		}
		WaveSpawn
		{
			Name	wave2support
			WaitForAllSpawned wave2a
			TotalCurrency	0
			TotalCount	2
			MaxActive	2
			SpawnCount	2
			WaitBeforeStarting	40
			Where   spawnbot_carrier_1
			Support Limited
			TFBot
			{
				Template T_TFBot_Engineer_Sentry_Battle
			}
		}
		WaveSpawn
		{
			Name	wave2csupport
			WaitForAllSpawned wave2b
			TotalCurrency	0
			TotalCount	40
			MaxActive	8
			SpawnCount	2
			WaitBeforeStarting	5
			WaitBetweenSpawns   0.5
			Where   spawnbot_carrier_1
			Support 1
			TFBot
			{
				Template T_TFBot_Sniper_Huntsman
			}
		}
	}
	//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
		}
		InitWaveOutput //forces bomb path
        {
            Target BigNet
            Action RunScriptCode
            Param "
			EntFire(`clearall_relay`,`Trigger`,null,0.78)
            EntFire(`arrows_clear_relay`,`Trigger`,null,0.78)
            EntFire(`robotpath_yellow_relay`,`Trigger`,null,0.78)
            "
        }
		WaveSpawn
		{
			Name	wave3a
			TotalCurrency	25
			TotalCount	1
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	0
			Where   spawnbot_carrier_2
			TFBot
			{
				Template T_TFBot_Giant_Demoman_Loch
				Tag big_giants
			}
		}
		WaveSpawn
		{
			Name	wave3a
			TotalCurrency	25
			TotalCount	1
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting 1
			Where   spawnbot_carrier_1
			TFBot
			{
				Template T_TFBot_Giant_Demoman_Loch
				Tag big_giants
			}
		}
		WaveSpawn
		{
			Name	wave3a
			TotalCurrency	50
			TotalCount	8
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	15
			WaitBetweenSpawns   18
			Where   spawnbot_carrier_2
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Demoman_Loch
					Tag big_giants
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Name  "Quick Uber Medic"
					Skill Expert
					Item   "Prussian Pickelhaube"
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Name  "Quick Uber Medic"
					Skill Expert
					Item   "Prussian Pickelhaube"
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Name  "Quick Uber Medic"
					Skill Expert
					Item   "Prussian Pickelhaube"
				}
			}
		}
		WaveSpawn
		{
			Name	wave3a2
			TotalCurrency	100
			TotalCount	2
			MaxActive	2
			SpawnCount	1
			WaitBeforeStarting	25
			WaitBetweenSpawns   16
			Where   spawnbot_carrier_1
			TFBot
			{
				Template T_TFBot_Giant_Scout_Fast
				Tag big_giants
			}
		}
		WaveSpawn
		{
			Name	wave3a
			TotalCurrency	100
			TotalCount	30
			MaxActive	9
			SpawnCount	3
			WaitBeforeStarting	4
			WaitBetweenSpawns   1
			Where   spawnbot_carrier_1
			Where   spawnbot_carrier_2
			TFBot
			{
				Class Heavyweapons
				Name "Heavy"
				Skill Easy
				MaxVisionRange 1200
			}
		}
		WaveSpawn
		{
			Name	wave3b
			WaitForAllSpawned wave3a
			TotalCurrency	100
			TotalCount	30
			MaxActive	10
			SpawnCount	5
			WaitBeforeStarting	4
			WaitBetweenSpawns   2
			Where   spawnbot_carrier_1
			Where   spawnbot_carrier_2
			TFBot
			{
				Class Soldier
				Skill Hard
			}
		}
		WaveSpawn
		{
			Name	wave3b
			WaitForAllSpawned wave3a
			TotalCurrency 100
			TotalCount	12
			MaxActive	6
			SpawnCount	4
			WaitBeforeStarting	4
			WaitBetweenSpawns   8
			Where   spawnbot_carrier_1
			Where   spawnbot_carrier_2
			TFBot
			{
				Template	T_TFBot_Heavy_IronFist_Airblast
			}
		}
		WaveSpawn
		{
			Name	wave3b
			WaitForAllSpawned wave3a
			TotalCurrency	50
			TotalCount	6
			MaxActive	6
			SpawnCount	3
			WaitBeforeStarting	15
			WaitBetweenSpawns   30
			Where   spawnbot_carrier_1
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Pyro_Dragon
				}
				TFBot
				{
					Template	T_TFBot_Medic_QuickUber
					Name   "Quick Uber Medic"
					Item   "Prussian Pickelhaube"
				}
				TFBot
				{
					Template	T_TFBot_Medic_QuickUber
					Name   "Quick Uber Medic"
					Item   "Prussian Pickelhaube"
				}
			}
		}
		WaveSpawn
		{
			Name	wave3c
			WaitForAllSpawned wave3b
			TotalCurrency	100
			TotalCount	18
			MaxActive	18
			SpawnCount	6
			WaitBeforeStarting	1
			WaitBetweenSpawns   0.5
			Where   spawnbot_carrier_1
			Where   spawnbot_carrier_2
			TFBot
			{
				Class Heavyweapons
				Name "Heavy"
				Skill Easy
				Attributes AlwaysCrit
				ClassIcon heavy_crit
				MaxVisionRange 1200
			}
		}
		WaveSpawn
		{
			Name	wave3c2
			WaitForAllSpawned wave3c
			TotalCurrency	50
			TotalCount	2
			MaxActive	2
			SpawnCount	2
			WaitBeforeStarting	0
			Where   spawnbot_carrier_1
			TFBot
			{
				Template T_TFBot_Giant_Scout_Fast
				Tag big_giants
			}
		}
		WaveSpawn
		{
			Name	wave3engi
			TotalCurrency	0
			TotalCount	2
			MaxActive	2
			SpawnCount	2
			WaitBeforeStarting	40
			WaitBetweenSpawns  35
			Where   spawnbot_carrier_1
			Support 1
			TFBot
			{
				Template T_TFBot_Engineer_Sentry_Battle
			}
		}

	}
	//Wave 4
	//Total Money: $1000, $900 with bonus from A+ rating
	Wave
	{
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
		InitWaveOutput //forces bomb path
        {
            Target BigNet
            Action RunScriptCode
            Param "
			EntFire(`clearall_relay`,`Trigger`,null,0.78)
            EntFire(`arrows_clear_relay`,`Trigger`,null,0.78)
            EntFire(`robotpath_green_relay`,`Trigger`,null,0.78)
            "
        }
		
		WaveSpawn
		{
			Name	wave4a1
			TotalCurrency	100
			TotalCount	8
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	0
			WaitBetweenSpawns   30
			Where   spawnbot_carrier_1
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Heavy_CritOnKill
					CharacterAttributes
					{
						"max health additive bonus" 4700
					}
				}
				TFBot
				{
					Template	T_TFBot_Medic_Overheal
				}
				TFBot
				{
					Template	T_TFBot_Medic_Overheal
				}
				TFBot
				{
					Template	T_TFBot_Medic_Overheal
				}
			}
		}
		WaveSpawn
		{
			Name	wave4a
			TotalCurrency	100
			TotalCount	36
			MaxActive	12
			SpawnCount	6
			WaitBeforeStarting	5
			WaitBetweenSpawns	1
			Where   spawnbot_carrier_1
			Where	spawnbot_carrier_2
			TFBot
			{
				Class Demoman
				Skill Hard
			}
		}
		WaveSpawn
		{
			Name	wave4b
			WaitForAllDead  wave4a
			TotalCurrency	100
			TotalCount	24
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	2
			WaitBetweenSpawns	1
			Where   spawnbot_carrier_1
			Where	spawnbot_carrier_2
			TFBot
			{
				Template T_TFBot_Demoknight_Persian
			}
		}
		WaveSpawn
		{
			Name	wave4b
			WaitForAllDead wave4a1
			TotalCurrency	100
			TotalCount	25
			MaxActive	10
			SpawnCount	5
			WaitBeforeStarting	2
			WaitBetweenSpawns	1
			Where   spawnbot_carrier_1
			Where	spawnbot_carrier_2
			TFBot
			{
				Class Scout
				Skill Normal
				ClassIcon 	scout_conch_lite
				Name "Extended Conch Scout"
				Item	"The Concheror"
				MaxVisionRange 750
				Attributes SpawnWithFullCharge
				CharacterAttributes
				{
					"increase buff duration"	9.0
					"deploy time increased"	0.5
				}
			}
		}
		WaveSpawn
		{
			Name	wave4b2
			WaitForAllDead  wave4a1
			TotalCurrency	100
			TotalCount	4
			MaxActive	4
			SpawnCount	2
			WaitBeforeStarting	15
			WaitBetweenSpawns	16
			Where   spawnbot_carrier_1
			TFBot
			{
				Template T_TFBot_Giant_Demo_Burst
				Name "Giant Burst Fire Demoman"
				Tag big_giants
				Attributes AlwaysCrit
			}
		}
		WaveSpawn
		{
			Name	wave4b3
			WaitForAllSpawned  wave4b2
			TotalCurrency	100
			TotalCount	4
			MaxActive	4
			SpawnCount	4
			WaitBeforeStarting	13
			Where   spawnbot_carrier_1
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Demo_Burst
					Name "Giant Burst Fire Demoman"
					Tag big_giants
					Attributes AlwaysCrit
					CharacterAttributes
					{
						"max health additive bonus" 3125
					}
				}
				TFBot
				{
					Template	T_TFBot_Medic_Overheal
				}
				TFBot
				{
					Template	T_TFBot_Medic_Overheal
				}
				TFBot
				{
					Template	T_TFBot_Medic_Overheal
				}
			}
		}
		WaveSpawn
		{
			Name	wave4c
			WaitForAllSpawned wave4b3
			TotalCurrency	50
			TotalCount	2
			MaxActive	2
			SpawnCount	1
			WaitBeforeStarting	15
			WaitBetweenSpawns   22
			Where   spawnbot_carrier_1
			TFBot
			{
				Template T_TFBot_Giant_Soldier_Spammer
				Tag big_giants
			}
		}
		WaveSpawn
		{
			Name	wave4c
			WaitForAllSpawned wave4b3
			TotalCurrency	50
			TotalCount	4
			MaxActive	4
			SpawnCount	1
			WaitBeforeStarting	15
			WaitBetweenSpawns   11
			Where   spawnbot_carrier_2
			TFBot
			{
				Template T_TFBot_Giant_Soldier_Spammer
				Tag big_giants
			}
		}
		WaveSpawn
		{
			Name	wave4tank
			WaitForAllSpawned wave4b3
			TotalCurrency	200
			TotalCount	1
			SpawnCount	1
			WaitBeforeStarting  15
			Tank
			{
				Health	25000
				Name	"tankboss"
				Speed	75
				StartingPathTrackNode	"tank_path_B"
				OnBombDroppedOutput
				{
					Target	boss_deploy_relay
					Action	Trigger
				}
				OnKilledOutput                                  
				{
					Target boss_dead_relay
					Action Trigger                         
				}
			}
			FirstSpawnOutput
			{
				Target	boss_spawn_relay
				Action	Trigger
			}
		}
		WaveSpawn
		{
			Name	wave4c
			WaitForAllSpawned wave4tank
			TotalCurrency	100
			TotalCount	3
			MaxActive	3
			SpawnCount	3
			WaitBeforeStarting	15
			Where   spawnbot_carrier_1
			Squad
			{
				FormationSize 300
				TFBot
				{
					Template T_TFBot_Giant_Heavy_CritOnKill
					Tag big_giants
				}
				TFBot
				{
					Template T_TFBot_Giant_Soldier_Spammer
					Tag big_giants
				}
				TFBot
				{
					Template T_TFBot_Giant_Soldier_Spammer
					Tag big_giants
				}
			}
		}

	}
	//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
		}
		InitWaveOutput //forces bomb path
        {
            Target BigNet
            Action RunScriptCode
            Param "
			EntFire(`clearall_relay`,`Trigger`,null,0.78)
            EntFire(`arrows_clear_relay`,`Trigger`,null,0.78)
            EntFire(`robotpath_yellow_relay`,`Trigger`,null,0.78)
            "
        }
		WaveSpawn
		{
			Name	wave5a
			TotalCurrency	100
			TotalCount	4
			MaxActive	4
			SpawnCount	2
			WaitBeforeStarting	0
			WaitBetweenSpawns   40
			Where   spawnbot_carrier_2
			TFBot
			{
				Template T_TFBot_Giant_Scout_Baseball
				Tag big_giants
			}
		}
		WaveSpawn
		{
			Name	wave5a
			TotalCurrency	100
			TotalCount	20
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	2
			WaitBetweenSpawns   3
			Where   spawnbot_carrier_1
			Squad
			{
				TFBot
				{
					Template T_TFBot_Soldier_Extended_Buff_Banner
					Skill Hard
					CharacterAttributes
					{
						"deploy time increased" 0.5
					}
				}
				TFBot
				{
					Template T_TFBot_Medic_Shield
				}
				TFBot
				{
					Class Heavyweapons
					Name "Heavy"
					Skill Normal
					MaxVisionRange 1200
				}
				TFBot
				{
					Class Heavyweapons
					Name "Heavy"
					Skill Normal
					MaxVisionRange 1200
				}
			}
		}
		WaveSpawn
		{
			Name	wave5a
			TotalCurrency	100
			TotalCount	27
			MaxActive	9
			SpawnCount	3
			WaitBeforeStarting	5
			WaitBetweenSpawns   1
			Where   spawnbot_carrier_1
			Where   spawnbot_carrier_2
			TFBot
			{
				Template T_TFBot_Soldier_Extended_Buff_Banner
				Skill Hard
				CharacterAttributes
				{
					"deploy time increased" 0.5
				}
			}
		}
		WaveSpawn
		{
			Name	wave5bscouts
			WaitForAllSpawned wave5a
			TotalCurrency	100
			TotalCount	4
			MaxActive	4
			SpawnCount	2
			WaitBeforeStarting	15
			WaitBetweenSpawns   50
			Where   spawnbot_carrier_1
			Where   spawnbot_carrier_2
			TFBot
			{
				Template T_TFBot_Giant_Scout_Baseball
				Tag big_giants
			}
		}
		WaveSpawn
		{
			Name	wave5b
			WaitForAllSpawned wave5a
			TotalCurrency	100
			TotalCount	4
			MaxActive	3
			SpawnCount	2
			WaitBeforeStarting	8
			WaitBetweenSpawns   2
			Where   spawnbot_carrier_1
			Where   spawnbot_carrier_2
			Squad
			{
				TFBot
				{
					//Full damage Giant Black Box Soldier but reduced heal on hit and projectile speed
					Class Soldier
					ClassIcon soldier_blackbox
					Name "Giant Crit Box Soldier"
					Health 4200
					Item "The Black Box"
					Skill Expert
					Attributes MiniBoss
					WeaponRestrictions PrimaryOnly
					Attributes HoldFireUntilFullReload
					Attributes AlwaysCrit
					Tag big_giants
					ItemAttributes
					{
						ItemName "The Black Box"
						"fire rate bonus" 0.001
						"clip size upgrade atomic" 0
						"faster reload rate" 1.6
						"blast radius increased" 1.25
						"Projectile speed increased" 0.65
						"projectile spread angle penalty" 4
						"heal on hit for rapidfire" 250
					}
					CharacterAttributes
					{
						"move speed bonus"	0.5
						"damage force reduction" 0.4
						"airblast vulnerability multiplier" 0.4
						"override footstep sound set" 3
					}
				}
				TFBot
				{
					Template T_TFBot_Giant_Medic_Regen
					Name "Giant Regen Medic"
					Attributes IgnoreEnemies
					Tag big_giants
				}
			}
		}
		WaveSpawn
		{
			Name	wave5c
			WaitForAllDead wave5b
			TotalCurrency	200
			TotalCount	3
			MaxActive	3
			SpawnCount	3
			WaitBeforeStarting	2
			Where   spawnbot_mission_boss
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Heavyweapons_Deflector
					Tag big_giants
					Attributes AlwaysCrit
					ItemAttributes
					{
						ItemName "Deflector"
						"killstreak tier" 1
					}
				}
				TFBot
				{
					Template T_TFBot_Giant_Medic_Regen
					Name "Giant Regen Medic"
					Attributes IgnoreEnemies
					Tag big_giants
					CharacterAttributes
					{
						"mod weapon blocks healing" 1
					}
				}
				TFBot
				{
					Template T_TFBot_Giant_Medic_Regen
					Name "Giant Regen Medic"
					Attributes IgnoreEnemies
					Tag big_giants
					CharacterAttributes
					{
						"mod weapon blocks healing" 1
					}
				}
			}
		}
		WaveSpawn
		{
			Name	wave5support
			TotalCurrency	50
			TotalCount	10
			MaxActive	2
			SpawnCount	2
			WaitBeforeStarting	10
			WaitBetweenSpawns   55
			Where   spawnbot_carrier_2
			Support 1
			TFBot
			{
				Template T_TFBot_Giant_Demo_RapidFire
				Name "Giant Demoman"
				Tag big_giants
			}
		}
		WaveSpawn
		{
			Name	wave5support2
			WaitForAllSpawned wave5a 
			TotalCurrency	50
			TotalCount	30
			MaxActive	6
			SpawnCount	2
			WaitBeforeStarting	0
			WaitBetweenSpawns   1
			Where   spawnbot_carrier_1
			Where   spawnbot_carrier_2
			Support 1
			TFBot
			{
				Class Pyro
				Skill Hard
				Attributes AlwaysFireWeapon
			}
		}
	}
	//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
		}
		InitWaveOutput
        {
            Target BigNet
            Action runscriptcode
            Param "
			EntFire(`clearall_relay`,`Trigger`,null,0.78)
			EntFire(`arrows_clear_relay`,`Trigger`,null,0.78)
            EntFire(`robotpath_red_relay`,`Trigger`,null,0.78)
            IncludeScript(`tankextensions_main`, getroottable())
            IncludeScript(`tankextensions/blimp`, getroottable())
			IncludeScript(`tankextensions/combattank`, getroottable())
    	    IncludeScript(`tankextensions/combattank_weapons/minigun`, getroottable())
                  "
        }
		WaveSpawn
		{
			Name	wave6a
			TotalCurrency	50
			TotalCount	40
			MaxActive	10
			SpawnCount	5
			WaitBeforeStarting	0
			WaitBetweenSpawns  0.5
			Where   spawnbot_carrier_1
			Where   spawnbot_carrier_2
			TFBot
			{
				Template T_TFBot_Demo_Burst
				Name "Burst Fire Demoman"
				Attributes AlwaysCrit
			}
		}
		WaveSpawn
		{
			Name	wave6a
			TotalCurrency	50
			TotalCount	40
			MaxActive	10
			SpawnCount	5
			WaitBeforeStarting	2
			WaitBetweenSpawns  0.5
			Where   spawnbot_carrier_1
			Where   spawnbot_carrier_2
			TFBot
			{
				Class Sniper
				Name "Penetrating Bowman"
				Skill Hard
				ClassIcon sniper_bow_penetrate
				WeaponRestrictions PrimaryOnly
				Item "The Huntsman"
				Item "The Cozy Camper"
				Attributes AlwaysCrit
				ItemAttributes
				{
					ItemName	"the huntsman"
					"projectile penetration" 1
					"damage penalty" 0.5
				}
			}
		}
		WaveSpawn
		{
			Name	wave6blimp
			TotalCurrency	100
			TotalCount	1
			SpawnCount	1
			WaitBeforeStarting  5
			FirstSpawnWarningSound	"misc\doomsday_lift_warning.wav"
			Tank
			{
				Health	15000
				Name	"blimp_customparticles"
				ClassIcon blimp2_lite  
				Speed	75
				StartingPathTrackNode	"blimp_path_A"	
				OnBombDroppedOutput
				{
					Target	boss_deploy_relay
					Action	Trigger
				}
				OnKilledOutput                                  
				{
					Target boss_dead_relay
					Action Trigger                         
				}
			}
		}
		WaveSpawn
		{
			Name	wave6b
			WaitForAllDead wave6blimp
			TotalCurrency	100
			TotalCount	10
			MaxActive	10
			SpawnCount	2
			WaitBeforeStarting	3
			WaitBetweenSpawns  8
			Where   spawnbot_carrier_2
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Heavyweapons
					Tag big_giants
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Name  "Quick Uber Medic"
					Skill Expert
					Item   "Prussian Pickelhaube"
				}
			}
		}
		WaveSpawn
		{
			Name	wave6b2
			WaitForAllDead wave6blimp
			TotalCurrency	100
			TotalCount	36
			MaxActive	12
			SpawnCount	6
			WaitBeforeStarting	6
			WaitBetweenSpawns   3
			Where   spawnbot_carrier_1
			Where   spawnbot_carrier_2
			TFBot
			{
				Class Soldier
				Skill Expert
				Item "the direct hit"
				ClassIcon soldier_directhit_lite
				Name "Direct Hit Soldier"
				Attributes AlwaysCrit
			}
		}
		WaveSpawn
		{
			Name	wave6c
			WaitForAllDead wave6b
			TotalCurrency	100
			TotalCount	20
			MaxActive	8
			SpawnCount	2
			WaitBeforeStarting	0
			WaitBetweenSpawns 2
			Where   spawnbot_carrier_2
			Squad
			{
				TFBot
				{
					Name "Dragon's Fury Pyro"
					Class Pyro
					Skill Hard
					Attributes AlwaysCrit
					MaxVisionRange	1000
					ClassIcon pyro_dragon_fury_swordstone
					Item "the dragon's fury"
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Name  "Quick Uber Medic"
					Skill Expert
					Item   "Prussian Pickelhaube"
				}
			}
		}
		WaveSpawn
		{
			Name	wave6final1
			WaitForAllDead wave6b
			TotalCurrency	100
			TotalCount	1
			SpawnCount	1
			WaitBeforeStarting  5
			Tank
			{
				Health	18000
				Name	"combattank_bomb|minigun|minigun"
				ClassIcon tank_combat_minigun  
				Skin 1
				Speed	65
				StartingPathTrackNode	"combat_tank_path_B"	
				OnBombDroppedOutput
				{
					Target	boss_deploy_relay
					Action	Trigger
				}
				OnKilledOutput                                  
				{
					Target boss_dead_relay
					Action Trigger                         
				}
			}
		}
		WaveSpawn
		{
			Name	wave6final2
			WaitForAllDead wave6b
			TotalCurrency	100
			TotalCount	1
			SpawnCount	1
			WaitBeforeStarting  15
			FirstSpawnWarningSound	"misc\doomsday_lift_warning.wav"
			Tank
			{
				Health	15000
				Name	"blimp_customparticles"
				ClassIcon blimp2_lite  
				Skin 1
				Speed	75
				StartingPathTrackNode	"blimp_path_B"	
				OnBombDroppedOutput
				{
					Target	boss_deploy_relay
					Action	Trigger
				}
				OnKilledOutput                                  
				{
					Target boss_dead_relay
					Action Trigger                         
				}
			}
		}
		WaveSpawn
		{
			Name	wave6c2
			WaitForAllSpawned wave6c
			TotalCurrency	100
			TotalCount	10
			MaxActive	10
			SpawnCount	10
			WaitBeforeStarting	15
			Where   spawnbot_carrier_1
			Squad
			{
				TFBot
				{
					Name "Dragon's Fury Pyro"
					Class Pyro
					Skill Hard
					Attributes AlwaysCrit
					MaxVisionRange	1000
					ClassIcon pyro_dragon_fury_swordstone
					Item "the dragon's fury"
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickUber
					Name  "Quick Uber Medic"
					Skill Expert
					Item   "Prussian Pickelhaube"
				}
			}
		}
		WaveSpawn
		{
			Name	wave6support
			TotalCurrency	50
			TotalCount	10
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	2
			WaitBetweenSpawnsAfterDeath  35
			Where   spawnbot_carrier_1
			Where   spawnbot_carrier_2
			Support 1
			TFBot
			{
				Template T_TFBot_Giant_Soldier_Burst2
				Tag big_giants
			}
		}
		WaveSpawn
		{
			Name	wave6support2
			WaitForAllSpawned wave6final1
			TotalCurrency	50
			TotalCount	10
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	3
			WaitBetweenSpawnsAfterDeath  35
			Where   spawnbot_carrier_1
			Support 1
			TFBot
			{
				Template T_TFBot_Giant_Soldier_Burst2
				Tag big_giants
			}
		}
	}
}
