//Drastic Dismantling
//An Advanced mission for the map Tensai by botrot. https://steamcommunity.com/id/BotRot

//Credits to Seelpit for the canteen robot icons and ammo canteen point template
					
//Wave 1: $900; Wave 2: $1000; Wave 3: $800; Wave 4: $1000; Wave 5: $800; Wave 6: $1300
//Total Mission Money (including starting money): $6700 ; $7200 with bonus from A+ rating

#base robot_giant.pop
#base robot_standard.pop
#base template_custom_canteen.pop
WaveSchedule
{
	LuaScriptFile "scripts/recall_canteen_royal.lua" //credits to royal for recall canteen script
    StartingCurrency	900
	RespawnWaveTime	4
	CanBotsAttackWhileInSpawnRoom	no
    Advanced   1

	PointTemplates  
	{
		CanteenIfClipSizeIsEmpty //credits to Seelpit for the code; uses ammo canteen if bot clip is empty
		{
			logic_relay
			{
				"targetname" "clipchecker_relay"
				"OnTrigger" "@e@m_hMyWeapons$0@!activator,$GetProp$m_iClip1,clipchecker_compare|SetValueCompare,0,-1"
				
				"OnUser1" "!activator,$GetItemAttribute,Battery Canteens|powerup charges|!activator|$SetVar$CanteenCount|1,0,-1"
			}
			logic_compare
			{
				"targetname" "clipchecker_compare"
				"comparevalue" "0"
				
				"OnEqualTo" "!activator,$ChangeAttributes,$$=?(!activator.CanteenCount > 0,'UseCanteen',''),-1,-1"
				"OnEqualTo" "!activator,$SetVar$CanteenCount,$$=?(!activator.CanteenCount >= 0, !activator.CanteenCount - 1, -1),0.03,-1"
			}
		}
	}
	
	//Sigsegv mod-exclusive
	ItemAttributes   //Adds attributes to specified item given to players
	{
		ItemName "The Gas Passer"
		"attach particle effect" 12 //Massed Flies Unusual effect
	}
	Templates
    {
		T_TFBot_Soldier_Crit
		{
			ClassIcon  soldier_crit
			Name   "Charged Soldier"
			Class 	Soldier
			Skill 	Normal
			Attributes	AlwaysCrit
			Attributes  HoldFireUntilFullReload
			Item  "the original"
			Item  "stout shako"
			ItemAttributes
			{
				ItemName "The Original"
				"damage bonus" 1.5
				"faster reload rate" 0.4
				"fire rate bonus" 1.25
				"projectile speed increased" 0.5
			}
		}
		T_TFBot_Giant_Soldier_Burst_AmmoCanteen
		{
			Class Soldier
			Name "Giant Burst Fire Soldier"
			ClassIcon soldier_burstfire_ammocan
			Health 3800
			Skill Expert
			WeaponRestrictions PrimaryOnly
			Attributes MiniBoss
			Attributes HoldFireUntilFullReload
			Item "Upgradeable TF_WEAPON_ROCKETLAUNCHER"
			ItemAttributes
			{
				ItemName "Upgradeable TF_WEAPON_ROCKETLAUNCHER"
				"faster reload rate" 0.6
				"fire rate bonus" 0.1
				"clip size bonus" 2.25
				"Projectile speed increased" 0.65
			}
			CharacterAttributes
			{
				"move speed bonus"	0.5
				"damage force reduction" 0.4
				"airblast vulnerability multiplier" 0.4
				"override footstep sound set" 3
			}
			Item "Battery Canteens"
			ExtAttr SuppressCanteenUse
			ItemAttributes
			{
				ItemName "Battery Canteens"
				"refill_ammo" 1
				"powerup charges" 3
			}
			FireInput
			{
				Target "clipchecker_relay"
				Action "FireUser1"
				Delay 1
				Repeats 1
			}
			EventChangeAttributes
			{
				Default
				{
					FireInput
					{
						Target "clipchecker_relay"
						Action Trigger
						Delay 3 //Changeable, but not too low.
						Cooldown 0.2
						IfSeeTarget 1
					}
				}
				UseCanteen
				{
					FireWeapon
					{
						Delay 0.01
						Repeats 1
						Type "Action"
					}
					ChangeAttributes
					{
						Name "Default"
						Repeats 1
						Delay 0.1
					}
				}
			}
		}
		T_TFBot_Giant_Soldier_Burst_CritCanteen
		{
			Class Soldier
			Name "Giant Crit Burst Soldier"
			ClassIcon soldier_burstfire_critcan
			Health 4200
			Skill Expert
			WeaponRestrictions PrimaryOnly
			Attributes MiniBoss
			Attributes HoldFireUntilFullReload
			Item "Steel Shako"
			Item "Battery Canteens"
			Item  "Upgradeable TF_WEAPON_ROCKETLAUNCHER"
			MaxVisionRange 1200
			ExtAttr SuppressCanteenUse
			ItemAttributes
			{
				ItemName "Battery Canteens"
				"critboost" 1
				"powerup charges" 2
			}
			FireWeapon // Activates Critboost Canteen 18 seconds after spawning
			{
				Delay 18
				Repeats 1
				IfSeeTarget 1
				Type "Action"
			}
			FireWeapon // Activates Critboost Canteen when moderately damaged
			{
				Delay 0
				Repeats 1
				IfHealthBelow 2100
				Type "Action"
			}
			ItemAttributes
			{
				ItemName  "Upgradeable TF_WEAPON_ROCKETLAUNCHER"
				"damage bonus" 1.5
				"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_Gas
		{
			Name "Gaseous Fury Pyro"
			Class Pyro
			Skill Normal
			MaxVisionRange	1000
			ClassIcon pyro_gascann
			Item "the dragon's fury"
			Item "the gas passer"
			Attributes AlwaysFireWeapon
			WeaponRestrictions SecondaryOnly
			ItemAttributes
			{
				ItemName	"the gas passer"
				"item_meter_charge_rate" 5
				"weapon burn dmg increased" 2
			}
			CharacterAttributes
			{
				"deploy time increased" 0
			}
		}
		T_TFBot_Pyro_Fury
		{
			Name "Dragon's Fury Pyro"
			Class Pyro
			Skill Normal
			MaxVisionRange	1000
			ClassIcon pyro_dragon_fury_swordstone
			Item "the dragon's fury"
		}
		T_TFBot_Giant_Pyro_Fury
        {
            UseMeleeThreatPrioritization 1   //Sigsegv-mod exclusive; will prioritize closest target
            ClassIcon pyro_dragon_fury_swordstone_giant
            Name "Giant Dragon's Fury Pyro"
            Health  3000
            Class Pyro
            Skill Expert
            MaxVisionRange	1000
            Item "the dragon's fury"
            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
            }
        }
		T_TFBot_Demoknight_Samurai_NoJump //based on Samurai Demoknight from Hamlet Hostility
		{
			Class Demoman
			Name "Samurai Demoknight"
			ClassIcon demoknight_samurai
			Skill Expert
			Item "The Half-Zatoichi"
			Item "The Splendid Screen"
			Attributes	DisableDodge
			Attributes AlwaysCrit
			ItemAttributes
			{
				ItemName "The Splendid Screen"
				"Attack not cancel charge" 1
			}
			ItemAttributes
			{
				ItemName "The Half-Zatoichi"
				"fire rate penalty" 1.2
			}
			Item "Demo Kabuto"
			Item "The Menpo"
			Scale "1.3"
			Health 650
			WeaponRestrictions MeleeOnly
			CharacterAttributes
			{
				"charge time increased" 6
			}
		}
		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 persian persuader"
				"critboost on kill" 3
			}
		}
		T_TFBot_Giant_Demo_Atomic //based on Sir Nukesalot boss but made into a regular Giant
		{
			Class Demoman
			Name "Sir Nukesalot Lite"
			ClassIcon demo_nuker_giant
			Health 3300
			Skill Expert
			WeaponRestrictions PrimaryOnly
			Item "The Loose Cannon"
			Attributes MiniBoss
			Attributes HoldFireUntilFullReload
			Attributes AlwaysFireWeapon
			Attributes AlwaysCrit
			ItemAttributes
			{
				ItemName "The Loose Cannon"
				"grenade launcher mortar mode" 0
				"faster reload rate" 1.8
				"fire rate bonus" 2
				"clip size penalty" 0.5
				"Projectile speed increased" 0.8
				"projectile spread angle penalty" 5
				"damage bonus" 7
				"damage causes airblast" 1
				"blast radius increased" 1.2
				"use large smoke explosion" 1
			}
			CharacterAttributes
			{
				"hand scale" 1.25
				"move speed bonus"	0.5
				"damage force reduction" 0.4
				"airblast vulnerability multiplier" 0.4
				"override footstep sound set" 4
				"rage giving scale" 0.1
			}
		}
		T_TFBot_Heavyweapons_Deflector
		{
			Name "Deflector Heavy"
            Class Heavyweapons
            Skill Hard
			MaxVisionRange 1200
			ClassIcon heavy_deflector
            ItemAttributes
			{
				ItemName	"deflector"
				"attack projectiles"	1
			}
			Item	"deflector"
			Item	"the u-clank-a"
		}
		T_TFBot_Giant_Heavyweapons_RapidFire
		{
			Class Heavyweapons
			Name   "Giant Rapid Fire Heavy"
			ClassIcon heavy_giant
			Skill Expert
			Health 5000
			WeaponRestrictions PrimaryOnly
			MaxVisionRange 1200
			Attributes MiniBoss
			Item  "Upgradeable tf_weapon_minigun"
			ItemAttributes
			{
				ItemName "Upgradeable TF_WEAPON_MINIGUN"
				"fire rate bonus" 0.8
			}
			CharacterAttributes
			{
				"move speed bonus"	0.5
				"damage force reduction" 0.3
				"airblast vulnerability multiplier" 0.3
				"override footstep sound set" 2
			}
		}
		T_TFBot_Medic_Kritz
		{
			Class Medic
			Name "Kritz Medic"
			Skill Expert
			ClassIcon medic_kritz
			WeaponRestrictions SecondaryOnly
			Attributes SpawnWithFullCharge
			Attributes IgnoreEnemies
			Item  "the kritzkrieg"
			Item "Titanium Tyrolean"
			ItemAttributes
			{
				ItemName "The Kritzkrieg"
				"ubercharge rate bonus" 999
				"uber duration bonus" 999
			}
			CharacterAttributes
			{
				"heal rate bonus" 2
				"bot medic uber health threshold" 999			
			}
		}
		T_TFBot_Sniper_Bow_Penetration
		{
			Class Sniper
			Name "Penetrating Bowman"
			Skill Hard
			ClassIcon sniper_bow
			WeaponRestrictions PrimaryOnly
			Item "The Huntsman"
			Item "The Cozy Camper"
			ItemAttributes
			{
				ItemName	"the huntsman"
				"damage penalty" 0.5
				"projectile penetration" 1
			}
		}
		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_Sniper_Silent
		{
			Name	"Urban Professional Sniper"
			Class	Sniper
			Skill	Expert
			MaxVisionRange 2500
			Item	"the hitman's heatmaker"
			Item	"the razorback"
			Item    "Liquidator's Lid"
			Item "the shahanshah"
			ItemAttributes
			{
				ItemName	"the shahanshah"
				"dmg bonus while half dead" 2
				"dmg penalty while half alive" 0.5
			}
			ItemAttributes
			{
				ItemName	"the hitman's heatmaker"
				"sniper fires tracer HIDDEN" 1
				"lunchbox adds minicrits" 3
				"damage penalty on bodyshot" 1
				"sniper charge per sec" 1.25
				"silent killer" 1
			}
		}
    }
    //Sentry Buster
    Mission
    {
        Objective	DestroySentries
		Where	spawnbot_invasion
		InitialCooldown	0
		CooldownTime	35
		DesiredCount	1
		BeginAtWave	1
		RunForThisManyWaves	6
		TFBot
		{
			Template	T_TFBot_SentryBuster
			Attributes  DisableDodge
			CharacterAttributes
			{
				"damage force reduction" 0
				"airblast vulnerability multiplier" 0
                "airblast vertical vulnerability multiplier" 0
				"rage giving scale"	0
			}
		}
    }
	Mission
	{
		Objective	Sniper
		Where	spawnbot_upper
		BeginAtWave	1
		RunForThisManyWaves	1
		InitialCooldown	40
		CooldownTime	50
		DesiredCount	2
		TFBot
		{
			Template T_TFBot_Sniper_Lawrence
		}
	}
	Mission
	{
		Objective	Spy
		Where	spawnbot_lower
		BeginAtWave	2
		RunForThisManyWaves	1
		InitialCooldown	10
		CooldownTime	60
		DesiredCount	2
		TFBot
		{
			Template	T_TFBot_Spy
			Item "The Stealth Steeler"
			Item       "the diamondback"
			ItemAttributes
			{
				ItemName	"the diamondback"
				"auto fires when full" 1
				"auto fires full clip" 1
				"reload time increased hidden" 1.5
			}
		}
	}
	Mission
	{
		Objective	Sniper
		Where	spawnbot_upper
		BeginAtWave	3
		RunForThisManyWaves	1
		InitialCooldown	40
		CooldownTime	50
		DesiredCount	1
		TFBot
		{
			Template T_TFBot_Sniper_Silent
		}
	}
	Mission
	{
		Objective	Spy
		Where	spawnbot_lower
		BeginAtWave	4
		RunForThisManyWaves	1
		InitialCooldown	20
		CooldownTime	60
		DesiredCount	2
		TFBot
		{
			Template	T_TFBot_Spy
			Item "The Stealth Steeler"
			Item       "the diamondback"
			ItemAttributes
			{
				ItemName	"the diamondback"
				"auto fires when full" 1
				"auto fires full clip" 1
				"reload time increased hidden" 1.5
			}
		}
	}
	Mission
	{
		Objective	Sniper
		Where	spawnbot_upper
		BeginAtWave 5
		RunForThisManyWaves	1
		InitialCooldown	30
		CooldownTime	60
		DesiredCount	2
		TFBot
		{
			Template T_TFBot_Sniper_Silent
		}
	}
	Mission
	{
		Objective	Spy
		Where	spawnbot_lower
		BeginAtWave 6
		RunForThisManyWaves	1
		InitialCooldown	60
		CooldownTime	50
		DesiredCount	2
		TFBot
		{
			Template	T_TFBot_Spy
			Item "The Stealth Steeler"
			Item       "the diamondback"
			ItemAttributes
			{
				ItemName	"the diamondback"
				"auto fires when full" 1
				"auto fires full clip" 1
				"reload time increased hidden" 1.5
			}
		}
	}
	//Wave 1: $900
    Wave
	{
		StartWaveOutput
		{
			Target	wave_start_relay_classic
			Action	Trigger
		}
		
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
        WaveSpawn
		{
			Name	wave1a1
			TotalCurrency	100
			TotalCount	19
			MaxActive	6
			SpawnCount	1
			WaitBetweenSpawns	0.5
			Where	spawnbot_left
			TFBot
			{
                Template	T_TFBot_Heavyweapons_Heavyweight_Champ_Fast
				Skill Hard
			}
		}
        WaveSpawn
		{
			Name	wave1a1
			TotalCurrency	100
			TotalCount	19
			MaxActive	6
			SpawnCount	1
			WaitBetweenSpawns	0.5
			Where	spawnbot_right
			TFBot
			{
				Template	T_TFBot_Heavyweapons_Heavyweight_Champ_Fast
				Skill Hard
			}
		}
        WaveSpawn
		{
			Name	wave1a2
			TotalCurrency	100
			TotalCount	24
			MaxActive	12
			SpawnCount	6
            WaitBeforeStarting  10
			WaitBetweenSpawns	6
			Where	spawnbot_center
			RandomChoice
			{
				TFBot
				{
					Class	Soldier
					Skill	Normal
					Name "Direct Hit Soldier"
					Item    "the direct hit"
					ClassIcon soldier_directhit
				}
				TFBot
				{
					Class	Soldier
					Skill	Normal
					Name "Direct Hit Soldier"
					Item    "the direct hit"
					ClassIcon soldier_directhit
				}
				TFBot
				{
					Class	Soldier
					Skill	Normal
					Name "Direct Hit Soldier"
					Item    "the direct hit"
					ClassIcon soldier_directhit
				}
				TFBot
				{
					Class	Soldier
					Skill	Normal
					Name "Direct Hit Soldier"
					Item    "the direct hit"
					ClassIcon soldier_directhit
				}
				TFBot
				{
					Class	Soldier
					Skill	Normal
					Name "Direct Hit Soldier"
					Item    "the direct hit"
					ClassIcon soldier_directhit
				}
				TFBot
				{
					Class	Soldier
					Skill	Hard
					Name "Direct Hit Soldier"
					Item    "the direct hit"
					ClassIcon soldier_directhit
				}
			}
		}
        WaveSpawn
		{
			Name	wave1b1
            WaitForAllDead  wave1a2
			TotalCurrency	100
			TotalCount	25
			MaxActive	10
			SpawnCount	5
            WaitBeforeStarting  2
            WaitBetweenSpawns   5
			Where	spawnbot_upper
			TFBot
			{
				Class	Pyro
				Skill	Easy
			}
		}
        WaveSpawn
		{
			Name	wave1b1
            WaitForAllDead  wave1a2
			TotalCurrency	100
			TotalCount	15
			MaxActive	6
			SpawnCount	3
            WaitBeforeStarting  2
            WaitBetweenSpawns   2
			Where	spawnbot_upper
			Squad
            {
				NoWaitForFormation 1   // Prevents squad leader from waiting for squad members
				TFBot
				{
					Template  T_TFBot_Soldier_Buff_Banner
					Skill	Normal
					Item    "the original"
					CharacterAttributes
					{
						"deploy time increased" 0.5
					}
				}
				TFBot
				{
					Class	Soldier
					Skill	Normal
					Item    "the original"
				}
                TFBot
				{
					Class	Soldier
					Skill	Normal
					Item    "the original"
				}
            }
		}
		WaveSpawn
		{
			Name	wave1b2
			WaitForAllDead	wave1a2
			TotalCurrency	100
			TotalCount	2
			MaxActive	2
			SpawnCount	1
			WaitBeforeStarting	25
			WaitBetweenSpawns	25
			Where	spawnbot_center
			TFBot
			{
				Template	T_TFBot_Giant_Scout
				MaxVisionRange  1200
				Item  "Upgradeable tf_weapon_scattergun"
				ItemAttributes
				{
					ItemName	"Upgradeable tf_weapon_scattergun"
					"faster reload rate" -0.8
					"fire rate penalty" 1.15
				}
			}
		}
		WaveSpawn
		{
			Name	wave1c2
			WaitForAllSpawned	wave1b1
			TotalCurrency	200
			TotalCount	6
			MaxActive	6
			SpawnCount	6
			WaitBeforeStarting	30
			Where	spawnbot_center
			Squad
			{
				FormationSize 300
				TFBot
				{
					Template T_TFBot_Giant_Heavyweapons_RapidFire
				}
				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"
				}
				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"
				}
				TFBot
				{
					Template	T_TFBot_Medic_BigHeal
					Name   "Big Heal Medic"
					Item   "The Surgeon's Stahlhelm"
				}
			}
		}
		WaveSpawn
		{
			Name	wave1c1
			WaitForAllSpawned	wave1b1
			TotalCurrency	100
			TotalCount	28
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	15
			WaitBetweenSpawns	5
			Where	spawnbot_invasion
			Support 1
			RandomChoice
			{
				TFBot
				{
					Template T_TFBot_Demoknight_Persian
				}
				TFBot
				{
					Template T_TFBot_Demoknight_Persian
				}
				TFBot
				{
					Template T_TFBot_Demoknight_Persian
				}
				TFBot
				{
					Template T_TFBot_Demoknight_Persian
					ItemAttributes
					{
						ItemName	"the splendid screen"
						"attack not cancel charge"	1
					}
				}
			}
		}
    }
	//Wave 2: $1000
    Wave
	{
		StartWaveOutput
		{
			Target	wave_start_relay_classic
			Action	Trigger
		}
		
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
		WaveSpawn
		{
			Name	wave2a1
			TotalCurrency	100
			TotalCount	3
			MaxActive	3
			SpawnCount	3
			WaitBeforeStarting	1
			Where	spawnbot_left
			Squad
			{
				TFBot
				{
					Name   "Giant Demoman"
					Template	T_TFBot_Giant_Demo_RapidFire
					Item "the tide turner"
				}
				TFBot
				{
					Template	T_TFBot_Medic_Kritz
				}
				TFBot
				{
					Template	T_TFBot_Medic_Kritz
				}
			}
		}
		WaveSpawn
		{
			Name	wave2a1
			TotalCurrency	100
			TotalCount	3
			MaxActive	3
			SpawnCount	3
			WaitBeforeStarting	1
			Where	spawnbot_right
			Squad
			{
				TFBot
				{
					Name   "Giant Demoman"
					Template	T_TFBot_Giant_Demo_RapidFire
					Item "the tide turner"
				}
				TFBot
				{
					Template	T_TFBot_Medic_Kritz
				}
				TFBot
				{
					Template	T_TFBot_Medic_Kritz
				}
			}
		}
		WaveSpawn
		{
			Name	wave2b1
			WaitForAllSpawned	wave2a1
			TotalCurrency	100
			TotalCount	48
			MaxActive	12
			SpawnCount	4
			WaitBeforeStarting	13
			WaitBetweenSpawns	2
			Where	spawnbot_upper
			RandomChoice
			{
				TFBot
				{
					Template	T_TFBot_Scout_Bonk
					Name "Bonk Scout"
					Item "the boston basher"
					ItemAttributes
					{
						ItemName "the boston basher"
						"hit self on miss" 0
					}
					CharacterAttributes
					{
						"deploy time increased"	0.5
					}
				}
				TFBot
				{
					Template	T_TFBot_Scout_Bonk
					Name "Bonk Scout"
					Item "the boston basher"
					ItemAttributes
					{
						ItemName "the boston basher"
						"hit self on miss" 0
					}
					CharacterAttributes
					{
						"deploy time increased"	0.5
					}
				}
				TFBot
				{
					Template	T_TFBot_Scout_Bonk
					Name "Bonk Scout"
					Skill Normal
					WeaponRestrictions PrimaryOnly
					Item "the back scatter"
					ItemAttributes
					{
						ItemName "the back scatter"
						"spread penalty" 1
					}
					CharacterAttributes
					{
						"deploy time increased"	0.5
					}
				}
			}
		}
		WaveSpawn
		{
			Name	wave2b1
			WaitForAllDead	wave2a1
			TotalCurrency	100
			TotalCount	24
			MaxActive	9
			SpawnCount	6
			WaitBeforeStarting	5
			WaitBetweenSpawns	5
			Where	spawnbot_upper
			RandomChoice
			{
				TFBot
				{
					Class	Heavyweapons
					Name "Heavy"
					Skill	Easy
				}
				TFBot
				{
					Class	Heavyweapons
					Name "Heavy"
					Skill	Easy
				}
				TFBot
				{
					Class	Heavyweapons
					Name "Heavy"
					Skill	Easy
				}
				TFBot
				{
					ClassIcon heavy_natascha_nys
					Class	Heavyweapons
					Name "Natascha Heavy"
					Skill	Normal
					MaxVisionRange 1200
					Item    "Natascha"
					Item	"The Katyusha"
				}
			}
		}
		WaveSpawn
		{
			Name	wave2b2
			WaitForAllDead	wave2a1
			TotalCurrency	100
			TotalCount	8
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	20
			WaitBetweenSpawns	30
			Where	spawnbot_upper
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Soldier_Spammer_Reload
				}
				TFBot
				{
					Class	Heavyweapons
					Name "Heavy"
					Skill	Easy
				}
				TFBot
				{
					Class	Heavyweapons
					Name "Heavy"
					Skill	Easy
				}
				TFBot
				{
					Class	Heavyweapons
					Name "Heavy"
					Skill	Easy
				}
			}
		}
		WaveSpawn
		{
			Name	wave2c1
			WaitForAllDead	wave2b2
			TotalCurrency	200
			TotalCount	1
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	10
			Tank
			{
				Health	22000
				Name	tankboss
				Speed	75
				StartingPathTrackNode	tank_path_1
				
				OnKilledOutput
				{
					Target	boss_dead_relay
					Action	Trigger
				}
				
				OnBombDroppedOutput
				{
					Target	boss_deploy_relay
					Action	Trigger
				}
			}
		}
		WaveSpawn
		{
			Name	wave2c2
			WaitForAllSpawned	wave2c1
			TotalCurrency	100
			TotalCount	3
			MaxActive	3
			SpawnCount	3
			WaitBeforeStarting	25
			Where	spawnbot_left
			Squad
			{
				TFBot
				{
					Name   "Giant Demoman"
					Template	T_TFBot_Giant_Demo_RapidFire
					Item "the tide turner"
				}
				TFBot
				{
					Template	T_TFBot_Medic_Kritz
				}
				TFBot
				{
					Template	T_TFBot_Medic_Kritz
				}
			}
		}
		WaveSpawn
		{
			Name	wave2c2
			WaitForAllSpawned	wave2c1
			TotalCurrency	100
			TotalCount	3
			MaxActive	3
			SpawnCount	3
			WaitBeforeStarting	25
			Where	spawnbot_right
			Squad
			{
				TFBot
				{
					Name   "Giant Demoman"
					Template	T_TFBot_Giant_Demo_RapidFire
					Item "the tide turner"
				}
				TFBot
				{
					Template	T_TFBot_Medic_Kritz
				}
				TFBot
				{
					Template	T_TFBot_Medic_Kritz
				}
			}
		}
		WaveSpawn
		{
			Name	wave2support
			TotalCurrency	0
			TotalCount	1
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	60
			WaitBetweenSpawnsAfterDeath   35
			Where	spawnbot_upper
			Support 1
			TFBot
			{
				Template T_TFBot_Engineer_Sentry_Battle_TeleIn
				Item  "the jag"
				Attributes  IgnoreFlag
				CharacterAttributes
				{
					"kill forces attacker to laugh"	1
				}
			}
		}
		WaveSpawn
		{
			Name	wave2support2
			WaitForAllDead	wave2b2
			TotalCurrency	100
			TotalCount	30
			MaxActive	8
			SpawnCount	2
			WaitBeforeStarting	3
			WaitBetweenSpawns   4
			Where	spawnbot_invasion
			Support 1
			RandomChoice
			{
				TFBot
				{
					Class Scout
					Name "Shortstop Scout"
					Skill Easy
					Item "the shortstop"
				}
				TFBot
				{
					Class Scout
					Name "Shortstop Scout"
					Skill Easy
					Item "the shortstop"
				}
				TFBot
				{
					Class Scout
					Name "Shortstop Scout"
					Skill Easy
					Item "the shortstop"
				}
				TFBot
				{
					Class Scout
					Name "Shortstop Scout"
					Skill Easy
					Item "the shortstop"
				}
				TFBot
				{
					Template T_TFBot_Pyro_Gas
				}
			}
		}
	}
	//Wave 3: $800
    Wave
	{
		StartWaveOutput
		{
			Target	wave_start_relay_classic
			Action	Trigger
		}
		
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
		WaveSpawn
		{
			Name	wave3a1
			TotalCurrency	150
			TotalCount	34
			MaxActive	16
			SpawnCount	2
			WaitBeforeStarting	1
			WaitBetweenSpawns   1
			Where	spawnbot_upper
			TFBot
			{
				Template	T_TFBot_Soldier_Extended_Battalion
				Health   220
				Item    "the black box"
                Item    "The Grenadier's Softcap"
                ItemAttributes
				{
					ItemName "the battalion's backup"
					"max health additive bonus" 0
				}
                CharacterAttributes
                {
                    "deploy time increased" 0.5
                }
			}
		}
		WaveSpawn
		{
			Name	wave3a1
			TotalCurrency	50
			TotalCount	2
			MaxActive	2
			SpawnCount	1
			WaitBeforeStarting	0
			WaitBetweenSpawns   25
			Where	spawnbot_upper
			TFBot
			{
				Template T_TFBot_Giant_Scout_Baseball
                ItemAttributes
				{
					ItemName    "the sandman"
					"effect bar recharge rate increased"    0.05
				}
			}
		}
		WaveSpawn
		{
			Name	wave3b
			WaitForAllDead	wave3a1
			TotalCurrency	100
			TotalCount	36
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	3
			WaitBetweenSpawns   2
			Where	spawnbot_upper
			RandomChoice
			{
				TFBot
				{
					//based from Cataclysm, Coaltown Expert mission
					Template T_TFBot_Sniper_Huntsman
					Name "Quick Draw Bowman"
					Item "the fruit shoot"
					ItemAttributes 
					{
						ItemName "The Huntsman"
						"damage penalty" 0.075
						"faster reload rate" 0.4	
					}
				}
				TFBot
				{
					Template T_TFBot_Sniper_Bow_Penetration
				}
			}
		}
		WaveSpawn
		{
			Name	wave3b
			WaitForAllDead	wave3a1
			TotalCurrency	100
			TotalCount	28
			MaxActive	7
			SpawnCount	7
			WaitBeforeStarting	3
			WaitBetweenSpawns   5
			Where	spawnbot_center
			TFBot
			{
				Template T_TFBot_Demoknight_Persian
				ItemAttributes
				{
					ItemName	"the splendid screen"
					"attack not cancel charge"	1
				}
			}
		}
		WaveSpawn
		{
			Name	wave3b
			WaitForAllDead	wave3a1
			TotalCurrency	100
			TotalCount	8
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	10
			WaitBetweenSpawns   30
			Where	spawnbot_center
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Heavyweapons_RapidFire
				}
				TFBot
				{
					Template	T_TFBot_Medic
					Skill Expert
				}
				TFBot
				{
					Template	T_TFBot_Medic
					Skill Expert
				}
				TFBot
				{
					Template	T_TFBot_Medic
					Skill Expert
				}
			}
		}
		WaveSpawn
		{
			Name	wave3c1
			WaitForAllDead	wave3b
			TotalCurrency	100
			TotalCount	30
			MaxActive	12
			SpawnCount	6
			WaitBeforeStarting	0
			WaitBetweenSpawns   5
			Where	spawnbot_center
			TFBot
			{
				Template T_TFBot_Soldier_Crit
			}
		}
		WaveSpawn
		{
			Name	wave3c2
			WaitForAllDead	wave3b
			TotalCurrency	100
			TotalCount	4
			MaxActive	4
			SpawnCount	2
			WaitBeforeStarting	15
			WaitBetweenSpawns   25
			Where	spawnbot_upper
			TFBot
			{
				Template T_TFBot_Giant_Pyro_Fury
			}
		}
		WaveSpawn
		{
			Name	wave3c2
			WaitForAllDead	wave3b
			TotalCurrency	100
			TotalCount	3
			MaxActive	3
			SpawnCount	1
			WaitBeforeStarting	10
			WaitBetweenSpawns   20
			Where	spawnbot_upper
			TFBot
			{
				Template T_TFBot_Giant_Scout_Baseball
                ItemAttributes
				{
					ItemName    "the sandman"
					"effect bar recharge rate increased"    0.05
				}
			}
		}
		WaveSpawn
		{
			Name	wave3support
			TotalCurrency	0
			TotalCount	1
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	45
			WaitBetweenSpawnsAfterDeath   35
			Where	spawnbot_upper
			Support 1
			TFBot
			{
				Template T_TFBot_Engineer_Sentry_Battle_TeleIn
				Item  "the jag"
				Attributes  IgnoreFlag
				CharacterAttributes
				{
					"kill forces attacker to laugh"	1
				}
			}
		}
	}
	//Wave 4: $1000
    Wave
	{
		Explanation   //Sigsegv mod-exclusive; displays a message before a wave starts
		{
			Line "{yellow}///NOTICE///"
			Line "{blue}Alert! Several Giants have been spotted with stolen Power Up Canteens!"
			Line "{blue}Intel says MOST Giants are programmed to use it when they take moderate damage."
			Line "{red}If they are taken down fast enough, they will not be able to use more than one Canteen!"
		}
		StartWaveOutput
		{
			Target	wave_start_relay_classic
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}

		SpawnTemplate CanteenIfClipSizeIsEmpty //enables ammo canteen logic that checks if bot clip is empty

		WaveSpawn
		{
			Name	wave4a1
			TotalCurrency	100
			TotalCount	24
			MaxActive	12
			SpawnCount	2
			WaitBetweenSpawns   2
			Where	spawnbot_lower
			Squad
			{
				TFBot
				{
					Template T_TFBot_Heavyweapons_Deflector
				}
				TFBot
				{
					Template	T_TFBot_Medic_Kritz
				}
			}
		}
		WaveSpawn
		{
			Name	wave4a1
			TotalCurrency	50
			TotalCount	3
			MaxActive	2
			SpawnCount	1
			WaitBeforeStarting  6
			WaitBetweenSpawns   9
			Where	spawnbot_upper
			TFBot
			{
				Template T_TFBot_Demoknight_Samurai_NoJump
			}
		}
		WaveSpawn
		{
			Name	wave4a2
			WaitForAllSpawned wave4a1
			TotalCurrency	50
			TotalCount	2
			MaxActive	2
			SpawnCount	2
			WaitBeforeStarting  10
			Where	spawnbot_upper
			TFBot
			{
				Template T_TFBot_Demoknight_Samurai_NoJump
			}
		}
		WaveSpawn
		{
			Name	wave4bpyro
			WaitForAllDead wave4a1
			TotalCurrency	100
			TotalCount	48
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	3
			WaitBetweenSpawns   3
			Where	spawnbot_lower
			TFBot
			{
				Template T_TFBot_Pyro_Fury
			}
		}
		WaveSpawn
		{
			Name	wave4b1
			WaitForAllDead wave4a1
			TotalCurrency	50
			TotalCount	3
			MaxActive	3
			SpawnCount	3
			WaitBeforeStarting  10
			Where	spawnbot_center
			Squad
			{
				NoWaitForFormation 1   // Prevents squad leader from waiting for squad members
				FormationSize 200
				TFBot
				{
					Template T_TFBot_Giant_Soldier_Burst_AmmoCanteen
				}
				TFBot
				{
					Template T_TFBot_Heavyweapons_Deflector
				}
				TFBot
				{
					Template T_TFBot_Heavyweapons_Deflector
				}
			}
		}
		WaveSpawn
		{
			Name	wave4b2
			WaitForAllDead wave4b1
			TotalCurrency	50
			TotalCount	6
			MaxActive	6
			SpawnCount	3
			WaitBeforeStarting  5
			WaitBetweenSpawns   20
			Where	spawnbot_left
			Squad
			{
				NoWaitForFormation 1   // Prevents squad leader from waiting for squad members
				FormationSize 200
				TFBot
				{
					Template T_TFBot_Giant_Soldier_Burst_AmmoCanteen
				}
				TFBot
				{
					Template T_TFBot_Heavyweapons_Deflector
				}
				TFBot
				{
					Template T_TFBot_Heavyweapons_Deflector
				}
			}
		}
		WaveSpawn
		{
			Name	wave4b2
			WaitForAllDead wave4b1
			TotalCurrency	50
			TotalCount	6
			MaxActive	6
			SpawnCount	3
			WaitBeforeStarting  5
			WaitBetweenSpawns   20
			Where	spawnbot_right
			Squad
			{
				NoWaitForFormation 1   // Prevents squad leader from waiting for squad members
				FormationSize 200
				TFBot
				{
					Template T_TFBot_Giant_Soldier_Burst_AmmoCanteen
				}
				TFBot
				{
					Template T_TFBot_Heavyweapons_Deflector
				}
				TFBot
				{
					Template T_TFBot_Heavyweapons_Deflector
				}
			}
		}
		WaveSpawn
		{
			Name	wave4b3
			WaitForAllSpawned wave4b2
			TotalCurrency	100
			TotalCount	6
			MaxActive	6
			SpawnCount	6
			WaitBeforeStarting  18
			Where	spawnbot_center
			Squad
			{
				NoWaitForFormation 1   // Prevents squad leader from waiting for squad members
				FormationSize 200
				TFBot
				{
					Template T_TFBot_Giant_Soldier_Burst_CritCanteen
				}
				TFBot
				{
					Template T_TFBot_Giant_Medic_Regen
                    Name "Giant Regen Medic"
				}
				TFBot
				{
					Template T_TFBot_Pyro_Fury
				}
				TFBot
				{
					Template T_TFBot_Pyro_Fury
				}
				TFBot
				{
					Template T_TFBot_Pyro_Fury
				}
				TFBot
				{
					Template T_TFBot_Pyro_Fury
				}
			}
		}
		WaveSpawn
		{
			Name	wave4c1
			WaitForAllDead	wave4b3
			TotalCurrency	100
			TotalCount	1
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	11
			Tank
			{
				Health	21000
				Name	tankboss
				Speed	75
				StartingPathTrackNode	tank_path_1
				
				OnKilledOutput
				{
					Target	boss_dead_relay
					Action	Trigger
				}
				
				OnBombDroppedOutput
				{
					Target	boss_deploy_relay
					Action	Trigger
				}
			}
		}
		WaveSpawn
		{
			Name	wave4c2
			WaitForAllDead	wave4b3
			TotalCurrency	250
			TotalCount	1
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	16
			Tank
			{
				Health	24000
				Name	tankboss
				Speed	75
				StartingPathTrackNode	tank_path_1
				
				OnKilledOutput
				{
					Target	boss_dead_relay
					Action	Trigger
				}
				
				OnBombDroppedOutput
				{
					Target	boss_deploy_relay
					Action	Trigger
				}
			}
		}
		WaveSpawn
		{
			Name	wave4support2
			WaitForAllSpawned wave4b3
			TotalCurrency	50
			TotalCount	20
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting	15
			WaitBetweenSpawns   3
			Where	spawnbot_invasion
			Support 1
			TFBot
			{
				Template T_TFBot_Sniper_Bow_Penetration
			}
		}
		WaveSpawn
		{
			Name	wave4support2
			WaitForAllDead wave4b3
			TotalCurrency	50
			TotalCount	20
			MaxActive	6
			SpawnCount	6
			WaitBeforeStarting	10
			WaitBetweenSpawns   4
			Where	spawnbot_invasion
			Support 1
			TFBot
			{
				ClassIcon	scout_cola_nys
				Name	"Cola Scout"
				Class	Scout
				Skill	Normal
				MaxVisionRange 750
				Item    "the soda popper"
				Item	"crit-a-cola"
				ItemAttributes
				{
					ItemName	"crit-a-cola"
					"charge recharge rate increased"	0.5
					"mod_mark_attacker_for_death" 0
				}
				CharacterAttributes
                {
                    "deploy time increased" 0.5
                }
			}
		}
		WaveSpawn
		{
			Name	wave4engi
			WaitForAllSpawned wave4b3
			TotalCurrency	0
			TotalCount	2
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting	30
			WaitBetweenSpawnsAfterDeath   35
			Where	spawnbot_center
			Support Limited
			TFBot
			{
				Class Engineer
				Name "Giant Engineer"
				Health 3000
				Skill Expert
				ClassIcon engineer_buildcan
				Attributes MiniBoss
				Attributes IgnoreFlag
				Attributes TeleportToHint
				Attributes AlwaysCrit
				TeleportWhere	spawnbot_upper
				TeleportWhere	spawnbot_center
				TeleportWhere	spawnbot_lower
				TeleportWhere	spawnbot_invasion
				TeleportWhere	spawnbot_right
				TeleportWhere	spawnbot_left
				Item  "the eureka effect"
				CharacterAttributes
				{
					"move speed bonus"	0.77
					"damage force reduction" 0.2
					"airblast vulnerability multiplier" 0.2
					"override footstep sound set" 4
					"kill forces attacker to laugh"	1
					"voice pitch scale" 0.75
				}
				Item "Battery Canteens"
				ExtAttr SuppressCanteenUse
                ItemAttributes
                {
                    ItemName "Battery Canteens"
                    "building instant upgrade" 1
                    "powerup charges" 1
                }
				FireWeapon // Activates Upgrade Buildings Canteen 7 seconds after spawning
				{
					Delay 7
					Repeats 1
					Type "Action"
				}
			}
		}
	}
	//Wave 5: $800
    Wave
	{
		StartWaveOutput
		{
			Target	wave_start_relay_classic
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
		WaveSpawn
		{
			Name	wave5a1
			TotalCurrency	100
			TotalCount	30
			MaxActive	6
			SpawnCount	3
			WaitBeforeStarting  5
			WaitBetweenSpawns   1
			Where	spawnbot_upper
			RandomChoice
			{
				TFBot
				{
					ClassIcon	pyro_phlog
					Name	"Phlogiston Pyro"
					Class	Pyro
					Skill	Expert
					Attributes	SpawnWithFullCharge
					Item	"the phlogistinator"
					Item	"pyro's boron beanie"
					ItemAttributes
					{
						ItemName	"the phlogistinator"
						"airblast disabled"	0
					}
				}
				TFBot
				{
					ClassIcon	pyro_phlog
					Name	"Phlogiston Pyro"
					Class	Pyro
					Skill	Expert
					Attributes	SpawnWithFullCharge
					Item	"the phlogistinator"
					Item	"pyro's boron beanie"
					ItemAttributes
					{
						ItemName	"the phlogistinator"
						"airblast disabled"	0
					}
				}
				TFBot
				{
					ClassIcon	pyro_phlog
					Name	"Phlogiston Pyro"
					Class	Pyro
					Skill	Expert
					Attributes	SpawnWithFullCharge
					Item	"the phlogistinator"
					Item	"pyro's boron beanie"
					Taunt    //Activates Mmph when moderately damaged
					{
						Delay 0
						Repeats 1 
						IfHealthBelow 100 
					}
					ItemAttributes
					{
						ItemName	"the phlogistinator"
						"airblast disabled"	0
					}
				}
			}
		}
		WaveSpawn
		{
			Name	wave5a1
			TotalCurrency	100
			TotalCount	30
			MaxActive	6
			SpawnCount	6
			WaitBeforeStarting  5
			WaitBetweenSpawns   0
			Where	spawnbot_upper
			TFBot
			{
				Name  "Rapid Fire Demoman"
				Class Demoman
				Skill Easy
				Item  "the iron bomber"
				Attributes HoldFireUntilFullReload
				ItemAttributes
				{
					ItemName "the iron bomber"
					"fire rate bonus" 0.5
					"clip size bonus" 1.5
            	}
			}
		}
		WaveSpawn
		{
			Name	wave5a1
			TotalCurrency	100
			TotalCount	4
			MaxActive	2
			SpawnCount	2
			WaitBeforeStarting  0
			WaitBetweenSpawns   40
			Where	spawnbot_upper
			Squad
			{
				FormationSize 200
				TFBot
				{
					Template T_TFBot_Giant_Soldier_Spammer
				}
				TFBot
				{
					UseMeleeThreatPrioritization 1   //Sigsegv-mod exclusive; will prioritize closest target
					Template T_TFBot_Giant_Pyro
					ClassIcon pyro_conch_giant
					Name "Giant Concheror Pyro"
					Item	"The Concheror"
					Attributes	SpawnWithFullCharge
					Attributes AlwaysCrit
					ItemAttributes
					{
						ItemName "tf_weapon_flamethrower"
						"lunchbox adds minicrits" 2
					}
					CharacterAttributes
					{
						"deploy time increased"	0.5
						"increase buff duration"	9.0
					}
				}
			}
		}
		WaveSpawn
		{
			Name	wave5b1
			WaitForAllDead wave5a1
			TotalCurrency	50
			TotalCount	26
			MaxActive	6
			SpawnCount	2
			WaitBeforeStarting  3
			WaitBetweenSpawns   1
			Where	spawnbot_left
			TFBot
			{
				Template T_TFBot_Soldier_Extended_Buff_Banner
				Skill	Hard
				Item    "the direct hit"
				ClassIcon soldier_directhit_buff
				CharacterAttributes
				{
					"deploy time increased"	0.5
				}
			}
		}
		WaveSpawn
		{
			Name	wave5b1
			WaitForAllDead wave5a1
			TotalCurrency	50
			TotalCount	26
			MaxActive	6
			SpawnCount	2
			WaitBeforeStarting  3
			WaitBetweenSpawns   1
			Where	spawnbot_right
			TFBot
			{
				Template T_TFBot_Soldier_Extended_Buff_Banner
				Skill	Hard
				Item    "the direct hit"
				ClassIcon soldier_directhit_buff
				CharacterAttributes
				{
					"deploy time increased"	0.5
				}
			}
		}
		WaveSpawn
		{
			Name	wave5b1
			WaitForAllDead wave5a1
			TotalCurrency	100
			TotalCount	24
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting  5
			WaitBetweenSpawns   8
			Where	spawnbot_upper
			Squad
			{
				TFBot
				{
					Template T_TFBot_Pyro_Gas
				}
				TFBot
				{
					Template	T_TFBot_Medic
					Skill Expert
				}
			}
		}
		WaveSpawn
		{
			Name	wave5c1
			WaitForAllDead wave5b1
			TotalCurrency	150
			TotalCount	6
			MaxActive	6
			SpawnCount	3
			WaitBetweenSpawns   20
			WaitBetweenSpawns   30
			Where	spawnbot_center
			Squad
			{
				FormationSize 300
				NoWaitForFormation 1   // Prevents squad leader from waiting for squad members
				TFBot
				{
					UseMeleeThreatPrioritization 1   //Sigsegv-mod exclusive; will prioritize closest target
					ClassIcon heavy_ubercan
					Template	T_TFBot_Giant_Heavyweapons_BrassBeast
					Name "Giant Brass Beast Heavy"
					MaxVisionRange 1000
					Item  "big chief"
					ItemAttributes
					{
						ItemName "the brass beast"
						"damage bonus" 1.7
						"spunup_damage_resistance" 0.5
					}
					CharacterAttributes
					{
						"move speed bonus"	0.35
					}	
					Item "Battery Canteens"
					ExtAttr SuppressCanteenUse
					ItemAttributes
					{
					    ItemName "Battery Canteens"
					    "ubercharge" 1
					    "powerup charges" 2
					}
					FireWeapon // Activates Uber Canteen when moderately damaged
					{
						Delay 0
						Cooldown 20
						Repeats 2
						IfHealthBelow 2500
						Type "Action"
					}	
				}
				TFBot
				{
					UseMeleeThreatPrioritization 1   //Sigsegv-mod exclusive; will prioritize closest target
					Template T_TFBot_Giant_Pyro
					ClassIcon pyro_conch_giant
					Name "Giant Concheror Pyro"
					Item	"The Concheror"
					Attributes	SpawnWithFullCharge
					Attributes AlwaysCrit
					ItemAttributes
					{
						ItemName "tf_weapon_flamethrower"
						"lunchbox adds minicrits" 2
					}
					CharacterAttributes
					{
						"deploy time increased"	0.5
						"increase buff duration"	9.0
					}
				}
				TFBot
				{
					UseMeleeThreatPrioritization 1   //Sigsegv-mod exclusive; will prioritize closest target
					Template T_TFBot_Giant_Pyro
					ClassIcon pyro_conch_giant
					Name "Giant Concheror Pyro"
					Item	"The Concheror"
					Attributes	SpawnWithFullCharge
					Attributes AlwaysCrit
					ItemAttributes
					{
						ItemName "tf_weapon_flamethrower"
						"lunchbox adds minicrits" 2
					}
					CharacterAttributes
					{
						"deploy time increased"	0.5
						"increase buff duration"	9.0
					}
				}
			}
		}
		WaveSpawn
		{
			Name	wave5giantscout
			WaitForAllDead wave5a1
			TotalCurrency	50
			TotalCount	5
			MaxActive	5
			SpawnCount	1
			WaitBeforeStarting  20
			WaitBetweenSpawns   30
			Where	spawnbot_upper
			RandomChoice
			{
				TFBot
				{
					Template	T_TFBot_Giant_Scout
					MaxVisionRange  1200
					Item  "Upgradeable tf_weapon_scattergun"
					ItemAttributes
					{
						ItemName	"Upgradeable tf_weapon_scattergun"
						"faster reload rate" -0.8
						"fire rate penalty" 1.15
					}
				}
				TFBot
				{
					Template	T_TFBot_Giant_Scout
					MaxVisionRange  1200
					Item  "Upgradeable tf_weapon_scattergun"
					ItemAttributes
					{
						ItemName	"Upgradeable tf_weapon_scattergun"
						"faster reload rate" -0.8
						"fire rate penalty" 1.15
					}
				}
				TFBot
				{
					Template	T_TFBot_Giant_Scout
					MaxVisionRange  1200
					Item  "Upgradeable tf_weapon_scattergun"
					ItemAttributes
					{
						ItemName	"Upgradeable tf_weapon_scattergun"
						"faster reload rate" -0.8
						"fire rate penalty" 1.15
					}
				}
				TFBot
				{
					Template	T_TFBot_Giant_Scout
					MaxVisionRange  1200
					Item  "Upgradeable tf_weapon_scattergun"
					ItemAttributes
					{
						ItemName	"Upgradeable tf_weapon_scattergun"
						"faster reload rate" -0.8
						"fire rate penalty" 1.15
					}
				}
				TFBot
				{
					Template	T_TFBot_Giant_Scout
					MaxVisionRange  1200
					Item  "Upgradeable tf_weapon_scattergun"
					Item "Battery Canteens"
					ItemAttributes
					{
						ItemName	"Upgradeable tf_weapon_scattergun"
						"faster reload rate" -0.8
						"fire rate penalty" 1.15
					}
					ExtAttr SuppressCanteenUse
					FireInput // Activates Recall Canteen when moderately damaged
					{
						Delay 0
						IfHealthBelow 900
						Repeats 1
						IfSeeTarget 0
						Target "popscript"
						Action "$ForceUseCanteen"
   						Param "RECALL"
					}
				}
			}
		}
		WaveSpawn
		{
			Name	wave5support
			WaitForAllDead wave5b1
			TotalCurrency	50
			TotalCount	50
			MaxActive	6
			SpawnCount	2
			WaitBeforeStarting	2
			WaitBetweenSpawns   3
			Where	spawnbot_invasion
			Support 1
			TFBot
			{
				Class	Soldier
				Skill	Normal
				Item    "the original"
			}
		}
		WaveSpawn
		{
			Name	wave5support
			WaitForAllDead wave5b1
			TotalCurrency	50
			TotalCount	50
			MaxActive	6
			SpawnCount	2
			WaitBeforeStarting	2
			WaitBetweenSpawns   3
			Where	spawnbot_invasion
			Support 1
			TFBot
			{
				Name  "Rapid Fire Demoman"
				Class Demoman
				Skill Easy
				Item  "the iron bomber"
				Attributes HoldFireUntilFullReload
				ItemAttributes
				{
					ItemName "the iron bomber"
					"fire rate bonus" 0.5
					"clip size bonus" 1.5
				}
			}
		}
	}
	//Wave 6: $1300
	Wave
	{
		StartWaveOutput
		{
			Target	wave_start_relay_classic
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}

		SpawnTemplate CanteenIfClipSizeIsEmpty //enables ammo canteen logic that checks if bot clip is empty

		WaveSpawn
		{
			Name	wave6a
			TotalCurrency	50
			TotalCount	4
			MaxActive	4
			SpawnCount	4
			WaitBeforeStarting  0
			Where	spawnbot_left
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Demo_Atomic
					Item	"the chargin' targe"
				}
				TFBot
				{
					Class Pyro
					Skill Hard
					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
				}
				TFBot
				{
					Class Pyro
					Skill Hard
					Name "Backburner Pyro"
					Item "the backburner"
					ClassIcon pyro_backburner_nys
				}
			}
		}
		WaveSpawn
		{
			Name	wave6a
			TotalCurrency	50
			TotalCount	4
			MaxActive	4
			SpawnCount	4
			WaitBeforeStarting  1
			Where	spawnbot_right
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Demo_Atomic
					Item	"the chargin' targe"
				}
				TFBot
				{
					Class Pyro
					Skill Hard
					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
				}
				TFBot
				{
					Class Pyro
					Skill Hard
					Name "Backburner Pyro"
					Item "the backburner"
					ClassIcon pyro_backburner_nys
				}
			}
		}
		WaveSpawn
		{
			Name	wave6a
			TotalCurrency	50
			TotalCount	10
			MaxActive	10
			SpawnCount	10
			WaitBeforeStarting  40
			Where	spawnbot_center
			TFBot
			{
				Class Pyro
				Skill Normal
				Name "Backburner Pyro"
				Item "the backburner"
				ClassIcon pyro_backburner_nys
				ItemAttributes
				{
					ItemName "the backburner"
					"airblast disabled"	1
				}
			}
		}
		WaveSpawn
		{
			Name	wave6a
			TotalCurrency	50
			TotalCount	2
			MaxActive	2
			SpawnCount	2
			WaitBeforeStarting  35
			Where	spawnbot_center
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_Demo_Atomic
					MaxVisionRange 1200
					Item "Battery Canteens"
					ExtAttr SuppressCanteenUse
					ItemAttributes
					{
						ItemName "Battery Canteens"
						"refill_ammo" 1
						"powerup charges" 3
					}
					FireWeapon // Activates Ammo Canteen 18 seconds after spawning
					{
						Delay 20
						Repeats 2
						IfSeeTarget 1
						Cooldown 7
						Type "Action"
					}	
					FireWeapon // Activates Ammo Canteen when moderately damaged
					{
						Delay 0
						Repeats 1
						IfHealthBelow 2500
						Type "Action"
					}	
				}		
				TFBot
				{
					Template T_TFBot_Giant_Medic_Regen
                    Name "Giant Regen Medic"
				}
			}
		}
		WaveSpawn
		{
			Name	wave6a
			TotalCurrency	100
			TotalCount	35
			MaxActive	10
			SpawnCount	5
			WaitBeforeStarting  5
			WaitBetweenSpawns   5
			Where	spawnbot_upper
			RandomChoice
			{
				TFBot
				{
					Class	Heavyweapons
					Name "Heavy"
					Skill	Normal
				}
				TFBot
				{
					Class	Heavyweapons
					Name "Heavy"
					Skill	Normal
				}
				TFBot
				{
					Class	Heavyweapons
					Name "Heavy"
					Skill	Hard
				}
			}
		}
		WaveSpawn
		{
			Name	wave6b
			WaitForAllDead wave6a
			TotalCurrency	100
			TotalCount	28
			MaxActive	7
			SpawnCount	7
			WaitBeforeStarting  2
			WaitBetweenSpawns   0
			Where	spawnbot_center
			TFBot
			{
				//Sigsegv-mod exclusive; this bot will lead grenades and aim at enemy's feet for increased accuracy
				AimLeadProjectileSpeed 1520  
				AimAt Feet  
				Name "Burst Fire Demoman"
				Class	Demoman
				Skill	Expert
				ClassIcon demo_burst
				Attributes HoldFireUntilFullReload
				Item   "the loch-n-load"
				Item   "the splendid screen"
				ItemAttributes
				{
					ItemName	"the loch-n-load"
					"projectile spread angle penalty" 3
					"fire rate bonus" 0.05
					"faster reload rate" 1.75
				}
			}
		}
		WaveSpawn
		{
			Name	wave6b
			WaitForAllDead wave6a
			TotalCurrency	100
			TotalCount	40
			MaxActive	8
			SpawnCount	4
			WaitBeforeStarting  2
			WaitBetweenSpawns   1
			Where	spawnbot_center
			RandomChoice
			{
				TFBot
				{
					Class Pyro
					Skill Normal
					Name "Backburner Pyro"
					Item "the backburner"
					ClassIcon pyro_backburner_nys
					ItemAttributes
					{
						ItemName "the backburner"
						"airblast disabled"	1
					}
				}
				TFBot
				{
					Class Pyro
					Skill Normal
					Name "Backburner Pyro"
					Item "the backburner"
					ClassIcon pyro_backburner_nys
					ItemAttributes
					{
						ItemName "the backburner"
						"airblast disabled"	1
					}
				}
				TFBot
				{
					Class Pyro
					Skill Hard
					Name "Backburner Pyro"
					Item "the backburner"
					ClassIcon pyro_backburner_nys
				}
			}
		}
		WaveSpawn
		{
			Name	wave6b
			WaitForAllDead wave6a
			TotalCurrency	100
			TotalCount	3
			MaxActive	3
			SpawnCount	1
			WaitBeforeStarting  3
			WaitBetweenSpawns   11
			Where	spawnbot_upper
			TFBot
			{
				Template T_TFBot_Giant_Soldier_Burst_CritCanteen
			}
		}
		WaveSpawn
		{
			Name	wave6b
			WaitForAllDead wave6a
			TotalCurrency	200
			TotalCount	2
			MaxActive	2
			SpawnCount	2
			WaitBeforeStarting  30
			Where	spawnbot_center
			Squad
			{
				FormationSize 300
				NoWaitForFormation 1   // Prevents squad leader from waiting for squad members
				TFBot
				{
					UseMeleeThreatPrioritization 1   //Sigsegv-mod exclusive; will prioritize closest target
					Template	T_TFBot_Giant_Heavyweapons_BrassBeast
					ClassIcon heavy_ubercan
					Name "Giant Brass Beast Heavy"
					MaxVisionRange 1000
					Item  "big chief"
					ExtAttr SuppressCanteenUse
					ItemAttributes
					{
						ItemName "the brass beast"
						"damage bonus" 1.7
						"spunup_damage_resistance" 0.5
					}
					CharacterAttributes
					{
						"move speed bonus"	0.35
					}	
					Item "Battery Canteens"
					ItemAttributes
					{
					    ItemName "Battery Canteens"
					    "ubercharge" 1
					    "powerup charges" 2
					}
					FireWeapon // Activates Uber Canteen when moderately damaged
					{
						Delay 0
						Cooldown 20
						Repeats 2
						IfHealthBelow 2500
						Type "Action"
					}	
				}
				TFBot
				{
					Template T_TFBot_Giant_Medic_Regen
                    Name "Giant Regen Medic"
				}
			}
		}
		WaveSpawn
		{
			Name	wave6c
			WaitForAllDead wave6b
			TotalCurrency	100
			TotalCount	10
			MaxActive	10
			SpawnCount	2
			WaitBeforeStarting  15
			WaitBetweenSpawns   12
			Where	spawnbot_upper
			Squad
			{
				FormationSize 200
				TFBot
				{
					//Sigsegv-mod exclusive; this bot will lead grenades and aim at enemy's feet for increased accuracy
					AimLeadProjectileSpeed 1825  
					AimAt Feet  
					UseMeleeThreatPrioritization 1  
					Class Demoman
					Name "Major Bomber Lite" //based on Major Bomber boss but made into a regular giant
					ClassIcon demo_burst_critcan
					Skill Expert
					Health 3300
					Item "Prince Tavish's Crown"
					Item  "Upgradeable TF_WEAPON_GRENADELAUNCHER"
					Item "the tide turner"
					WeaponRestrictions PrimaryOnly
					Attributes MiniBoss
					Attributes HoldFireUntilFullReload
					ExtAttr SuppressCanteenUse
					ItemAttributes
					{
						ItemName "Upgradeable TF_WEAPON_GRENADELAUNCHER"
						"fire rate bonus" 0.2
						"faster reload rate" 0.3
						"Projectile speed increased" 1.5
					}
					CharacterAttributes
					{
						"hand scale" 1.25
						"move speed bonus"	0.5
						"damage force reduction" 0
						"airblast vulnerability multiplier" 0
						"override footstep sound set" 4
						"airblast vertical vulnerability multiplier" 0
						"rage giving scale" 0.1
					}
					Item "Battery Canteens"
					ItemAttributes
					{
					    ItemName "Battery Canteens"
					    "critboost" 1
					    "powerup charges" 2
						"powerup duration" 8
					}
					FireWeapon // Activates Critboost Canteen 18 seconds after spawning
					{
						Delay 18
						Repeats 1
						IfSeeTarget 1
						Type "Action"
					}
					FireWeapon // Activates Critboost Canteen when moderately damaged
					{
						Delay 0
						Repeats 1
						IfHealthBelow 1650
						Type "Action"
					}	
				}
				TFBot
				{
					Template	T_TFBot_Medic_QuickUber
					Name  "Quick Uber Medic"
					Skill Expert
					Item   "Prussian Pickelhaube"
					ItemAttributes
					{
						ItemName "TF_WEAPON_MEDIGUN"
						"medigun passive attributes" "clip size penalty|3" //3x clip bonus active as long as the Medic is alive
					}
				}
			}
		}
		WaveSpawn
		{
			Name	wave6c
			WaitForAllDead wave6b
			TotalCurrency	200
			TotalCount	1
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting  30
			Tank
			{
				Health	40000
				Name	tankboss
				Speed	75
				Skin 1
				StartingPathTrackNode	tank_path_1
				
				OnKilledOutput
				{
					Target	boss_dead_relay
					Action	Trigger
				}
				
				OnBombDroppedOutput
				{
					Target	boss_deploy_relay
					Action	Trigger
				}
			}
		}
		WaveSpawn
		{
			Name	wave6support
			WaitForAllDead wave6b
			TotalCurrency	50
			TotalCount	25
			MaxActive	5
			SpawnCount	1
			WaitBeforeStarting  0
			WaitBetweenSpawns   3
			Where	spawnbot_upper
			Support 1
			TFBot
			{
				Template T_TFBot_Pyro_Fury
			}	
		}
		WaveSpawn
		{
			Name	wave6support
			WaitForAllDead wave6b
			TotalCurrency	100
			TotalCount	25
			MaxActive	5
			SpawnCount	5
			WaitBeforeStarting  0
			WaitBetweenSpawns   4
			Where	spawnbot_center
			Support 1
			RandomChoice
			{
				TFBot
				{
					Class Heavyweapons
					Skill Easy
					Name "Heavy"
				}
				TFBot
				{
					Class Heavyweapons
					Skill Easy
					Name "Heavy"
				}
				TFBot
				{
					Class Heavyweapons
					Skill Normal
					Name "Heavy"
				}
			}
		}
	}
}