// Firefreight (Advanced)
// Written by Pont
// Based off of a popfile written by Startacker! https://steamcommunity.com/id/startacker/

// Valve base bots
#base robot_standard.pop
#base robot_giant.pop


// Available spawnpoints:
// spawnbot: 						spawns behind the blue shipping crates to the right of the track
// spawnbot_left:					spawns behind the train on the left with the three small shipping containers.
// spawnbot_right:					spawns close to the exit, in an alleyway immediately to the right of the door the train enters through. CAN'T FIT GIANTS!
// spawnbot_mission_sentrybuster:	spawns near spawnbot and spawnbot_left
// spawnbot_mission_sniper:			spawns near spawnbot, closer to the building
// spawnbot_mission_spy:			spawns at various points around the gameplay space
// spawnbot_support:				spawns bots and teleports them onto a second train that brings them in. if the main train gets pushed far in, the support train drops bots off further into the map. this spawn is limited by train movement time - spawnpoints get disabled when the train is deployed. it usually takes around 30-40s for the support train to be ready again.
// spawnbot_support_giant:			see spawnbot_support. teleports the (giant) bot onto the middle of the flatcar.


// NAV PRESETS:
	// Bots **will not move** without one set of bot_* nav tags and the following:
	//BehaviorModifiers		Push
	//Attributes			IgnoreFlag
	// 

	// Stand on the train:
		//Tag nav_prefer_gate1_flank
		//Tag bot_gatebot
				
	// Stand nearby the train, hold the area around it ('hover' around a bit):
		//Tag bot_hoverbot
		
	// Prefer leaving the warehouse on the support train side
		//Tag boss
		
	// Standard giant bot tag will make bots avoid low clearance areas, like the open container and inner-curve shortcut
		//Tag bot_giant
		
WaveSchedule
{
	StartingCurrency 800
	CanBotsAttackWhileInSpawnRoom No
	RespawnWaveTime 1
	//AddSentryBusterWhenDamageDealtExceeds 3000	//default
	//AddSentryBusterWhenKillCountExceeds 15		//default
	//Advanced 1
	
	Templates
	{
	// BOT templates
		// Scout. Nothing special
		FastenerBot_Scout
		{
				Class Scout
				Skill Normal
				BehaviorModifiers	Push
				Attributes			IgnoreFlag
				//Tag nav_prefer_gate1_flank
				//Tag bot_gatebot
		}
		// Scout. Melee only.
		FastenerBot_ScoutMelee
		{
				Class Scout
				//ClassIcon scout_bat
				ClassIcon scout
				Skill Hard
				WeaponRestrictions MeleeOnly
				BehaviorModifiers	Push
				Attributes			IgnoreFlag
				//Tag nav_prefer_gate1_flank
				//Tag bot_gatebot
		}
		FastenerBot_ScoutShortstop
		{
				Template T_TFBot_Scout_Shortstop
				BehaviorModifiers	Push
				Attributes			IgnoreFlag
		}
		// Scout. Melee only. Tiny mosquito swarming motherfucker
		FastenerBot_ScoutMosquito
		{
				Class Scout
				ClassIcon scout_bat
				//ClassIcon scout
				Name "Mosqouto"
				//Name "Moscouto"		// how the fuck does this pun work
				// have to be expert or they literally cannot hit anything
				Skill Expert
				WeaponRestrictions MeleeOnly
				BehaviorModifiers	Push
				Attributes			IgnoreFlag
				Health 75
				Attributes DisableDodge
				// Tiny
				Scale 0.8
				//Item "Frontier Flyboy"
				Item "The Flight of the Monarch"
				Item "Flunkyware"
				CharacterAttributes
				{
					// Goes flying when hit
					"damage force reduction" 3
					// FAST
					"move speed bonus" 2
					"gesture speed increase" 2
					"increased jump height" 2
					// this is stupid
					"speed_boost_on_hit" 2
					// HIHG SPEED bat swing
					"fire rate bonus" 2
					// melee hitreg lenience
					"melee bounds multiplier" 2
					
					"head scale" 1.2
					"hand scale" 1.2
				}
				//Tag nav_prefer_gate1_flank
				//Tag bot_gatebot
		}
		// Scout. Sun-on-a-stick.
		FastenerBot_ScoutSunOnAStick
		{
				Class Scout
				//ClassIcon scout_bat
				ClassIcon scout
				Skill Hard
				WeaponRestrictions MeleeOnly
				BehaviorModifiers	Push
				Attributes			IgnoreFlag
				//Tag nav_prefer_gate1_flank
				//Tag bot_gatebot
				Item "Sun-on-a-Stick"
				ItemAttributes
				{
					ItemName "Sun-on-a-Stick"
					"damage bonus vs burning" 2
				}
		}
		// Scout. Melee only. Train pushing fodder. Bad aim.
		FastenerBot_ScoutPushFodder
		{
				Class Scout
				ClassIcon Scout
				Skill Normal
				BehaviorModifiers	Push
				Attributes			IgnoreFlag
				//Tag nav_prefer_gate1_flank
				//Tag bot_gatebot
				WeaponRestrictions MeleeOnly
				Name "Secondmann"
				Item "Engineer's Cap"
				// fucking RIP allclass melees ig. item class "saxxy" is not allowed on bots
				//Item "The Crossing Guard"
				//Item "weapon_wrench"
		}
		// Soldier.
		FastenerBot_Soldier
		{
				Class Soldier
                Skill Normal
				BehaviorModifiers	Push
				Attributes			IgnoreFlag
				//Tag nav_prefer_gate1_flank
				//Tag bot_gatebot
		}
		// Soldier. Burst fire.
		FastenerBot_SoldierBurstEasy
		{
				Class Soldier
                Skill Easy
				BehaviorModifiers	Push
				Attributes			IgnoreFlag
				//Tag nav_prefer_gate1_flank
				//Tag bot_gatebot
				Attributes HoldFireUntilFullReload
				ItemAttributes
				{
					ItemName "Rocket Launcher"
					"fire rate penalty" 0.5
					"faster reload rate" 0.5
				}
		}
		FastenerBot_SoldierConch
		{
				Template T_TFBot_Soldier_Extended_Concheror
				BehaviorModifiers	Push
				Attributes			IgnoreFlag
		}
		// Soldier. Giant.
		FastenerBot_SoldierGiant
		{
                Template T_TFBot_Giant_Soldier
				BehaviorModifiers	Push
				Attributes			IgnoreFlag
				//Tag nav_prefer_gate1_flank
				//Tag bot_gatebot
		}
		// Soldier. Boss! Fires a constant stream of slow instakill small-blast-radius rockets.
		FastenerBot_SoldierBulletHellBoss
		{
			Class Soldier
			//Name "Giant Bullet Hell Soldier"
			Name "The Conductor"
			//ClassIcon soldier_giant
			ClassIcon soldier_spammer
			// Hard instead of Expert to miss a *few* rockets
			Skill Hard
			Health 10000
			WeaponRestrictions PrimaryOnly
			Attributes AlwaysFireWeapon
			Attributes AlwaysCrit
			Attributes MiniBoss
			Attributes UseBossHealthBar
			Scale 1.9
			BehaviorModifiers	Push
			Attributes			IgnoreFlag
			Item "The Lucky Shot"
			Item "The Diplomat"
			Item "Soldier's Sparkplug"
			Item "The Original"
			ItemAttributes
			{
				ItemName "The Original"
				"damage bonus" 2
				// very fast reload
				"faster reload rate" 0.05
				// slow rockets
				"projectile speed decreased" 0.25
				"no self blast dmg" 1
				// no blast radius
				"blast radius decreased" 1
				// yeet
				"apply look velocity on damage" 1
				"apply z velocity on damage" 1
			}
			CharacterAttributes
			{
				"move speed bonus"	0.4
				"damage force reduction" 0.4
				"airblast vulnerability multiplier" 0.1
				"airblast vertical vulnerability multiplier" 0.1
				"override footstep sound set" 3
				
				"rage giving scale" 0.2
			}
		}
		// Pyro. Always fires flamethrower.
		FastenerBot_PyroWM1
		{
                Class Pyro
				Skill Normal
                BehaviorModifiers	Push
				Attributes			IgnoreFlag
				//Tag nav_prefer_gate1_flank
				//Tag bot_gatebot
				Attributes AlwaysFireWeapon
		}
		// Pyro. Uses the backburner.
		FastenerBot_PyroBackburner
		{
                Class Pyro
				Skill Hard
                BehaviorModifiers	Push
				Attributes			IgnoreFlag
				Item "The Backburner"
				Item "Rail Spikes"
		}
		// Pyro. Degreaser. Fast as fuck
		FastenerBot_PyroFast
		{
                Class Pyro
				Skill Normal
                BehaviorModifiers	Push
				Attributes			IgnoreFlag
				//Tag nav_prefer_gate1_flank
				//Tag bot_gatebot
				Name "Axlebox Greaser"
				Item "The Degreaser"
				Item "The Attendant"
				Attributes AlwaysFireWeapon
				ItemAttributes
				{
					ItemName "The Degreaser"
					"airblast disabled" 1
				}
				CharacterAttributes
				{
					"move speed bonus"	1.2
				}
		}
		// Pyro. Flaregun. Nothing special.
		FastenerBot_PyroFlaregun
		{
                Template T_TFBot_Pyro_Flaregun
                BehaviorModifiers	Push
				Attributes			IgnoreFlag
				//Tag nav_prefer_gate1_flank
				//Tag bot_gatebot
		}
		// Pyro. Scorch shot.
		FastenerBot_PyroScorchShotLongRange
		{
				Class Pyro
				Name "Scorch Shot Pyro"
				Skill Expert
				ClassIcon pyro_scorch
                BehaviorModifiers	Push
				Attributes			IgnoreFlag
				//Tag nav_prefer_gate1_flank
				//Tag bot_gatebot
				Item "The Special Eyes"
				Item "The Scorch Shot"
				WeaponRestrictions SecondaryOnly
				//Attributes AlwaysCrit
				Attributes AlwaysFireWeapon
				ItemAttributes
				{
					ItemName "The Scorch Shot"
					"damage bonus"	1
					"fire rate bonus" 0.75
					"faster reload rate" 1.25
					"Projectile speed increased" 1.35
				}
				CharacterAttributes
				{
					"no self blast dmg" 1
				}
		}
		// Pyro. Giant. Flare gun. Can rack up crit damage on repeat hits.
		FastenerBot_PyroGiantFlareRapidfire
		{
				Class Pyro
				Name "Giant Rapid Flare Pyro"
				ClassIcon pyro_flare_giant
				Skill Expert
                BehaviorModifiers	Push
				Attributes			IgnoreFlag
				Health 3000
				Item "The Flare Gun"
				Item "Skullbrero"
				WeaponRestrictions SecondaryOnly
				Attributes MiniBoss
				ItemAttributes
				{
					ItemName "The Flare Gun"
					"fire rate bonus" 0.3
				}
				CharacterAttributes
				{
					"move speed bonus"	0.5
					"damage force reduction" 0.6
					"airblast vulnerability multiplier" 0.6
					"override footstep sound set" 6
				}
		}
		// Demoman. Bad aim. Fires slowly.
		FastenerBot_DemoSlowfire
		{
                Template T_TFBot_Demoman
				Skill Easy
				BehaviorModifiers	Push
				Attributes			IgnoreFlag
				//Tag nav_prefer_gate1_flank
				//Tag bot_gatebot
				ItemAttributes
				{
					ItemName "Grenade Launcher"
					"fire rate penalty" 0.5
					"faster reload rate" 0.5
				}
		}
		// Demoman. Loose Cannon. LOTS of knockback, low fire rate
		FastenerBot_DemoLooseCannon
		{
                Template T_TFBot_Demoman
				Skill Hard
				BehaviorModifiers	Push
				Attributes			IgnoreFlag
				Name "Knockback Demoman"
				Item "The Bomber Knight"
				Item "The Loose Cannon"
				ItemAttributes
				{
					ItemName "The Loose Cannon"
					// don't blow yourself up - override GL mode
					"grenade launcher mortar mode" -1
					"faster reload rate" 0.1
					"damage bonus" 0
				}
		}
		// Demoman. Loose Cannon. LOTS of knockback, burst fire
		FastenerBot_DemoLooseCannonBurst
		{
                Template T_TFBot_Demoman
				Skill Hard
				BehaviorModifiers	Push
				Attributes			IgnoreFlag
				Name "Knockback Burst Demoman"
				Item "The Bomber Knight"
				Item "The Loose Cannon"
				ItemAttributes
				{
					ItemName "The Bomber Knight"
					"set item tint rgb" 5801378
				}
				ItemAttributes
				{
					ItemName "The Loose Cannon"
					// don't blow yourself up - override GL mode
					"grenade launcher mortar mode" -1
					"faster reload rate" 0.1
					"damage bonus" 0
					// burst fire
					"auto fires full clip"  1
					"auto fires when full"  1
				}
		}
		// Demoman. Giant. Four-pill burst
		FastenerBot_DemoGiantBurst
		{
				Template T_TFBot_Giant_Demo_RapidFire
                BehaviorModifiers	Push
				Attributes			IgnoreFlag
		}
		// Heavy. Nothing special. Terrible aim.
		FastenerBot_Heavy
		{
                Class Heavy
                Skill Easy
                BehaviorModifiers	Push
				Attributes			IgnoreFlag
				//Tag nav_prefer_gate1_flank
				//Tag bot_gatebot
		}
		// Heavy, with a shotgun. Good aim.
		FastenerBot_HeavyShotgun
		{
				Template T_TFBot_Heavyweapons_Shotgun
				BehaviorModifiers	Push
				Attributes			IgnoreFlag
		}
		// Heavy, with a shotgun. Good aim. Bullet-hose burst fire.
		FastenerBot_HeavyShotgunBurst
		{
				Template T_TFBot_Heavyweapons_Shotgun
				Skill Hard
				BehaviorModifiers	Push
				Attributes			IgnoreFlag
				Item "The Borscht Belt"
				Item "Graybanns"
				//ClassIcon heavy_shotgun_burst_lite
				Scale 1.1
				CharacterAttributes
				{
					"head scale" 0.9
					"hand scale" 1.1
					"move speed bonus"	0.85
				}
				ItemAttributes
				{
					ItemName "TF_WEAPON_SHOTGUN_HWG"
					"faster reload rate" 0.6
					"fire rate bonus" 4
					"bullets per shot bonus" 3
					"damage bonus" 0.2
					"clip size bonus" 2.5
				}
		}
		// Heavy, with the GRU. Bat scout deluxe.
		FastenerBot_HeavyGRU
		{
				Template T_TFBot_Heavyweapons_Heavyweight_Champ_Fast
				BehaviorModifiers	Push
				Attributes			IgnoreFlag
				//Tag nav_prefer_gate1_flank
				//Tag bot_gatebot
		}
		// Heavy, KGB
		FastenerBot_HeavyKGB
		{
				Template T_TFBot_Heavyweapons_Heavyweight_Champ
				BehaviorModifiers	Push
				Attributes			IgnoreFlag
		}
		// Heavy, giant. KGB. tanky
		FastenerBot_HeavyGiantKGB
		{
				Template T_TFBot_Giant_Boxing_Heavy
				BehaviorModifiers	Push
				Attributes			IgnoreFlag
				Tag bot_giant
		}
		// Heavy. Big boy with a natascha. Slow move speed and fire rate, sets targets alight. Low dps for a heavy, though!
		FastenerBot_HeavyGiantFreightTrain
		{
				Class Heavy
				Skill Easy
				BehaviorModifiers	Push
				Attributes			IgnoreFlag
				Name "Freight Train"
				Attributes MiniBoss
				Health 5000
				MaxVisionRange 1200
				Item "The Huo Long Heatmaker"
				// looks like a firebox.
				// filamental painted orange looks fiery
				Item "The Filamental"
				//Item "The Bunsen Brave"
				Item "The Dark Falkirk Helm"
				Item "Blast Blocker"
				Item "Steel Pipes"
				ItemAttributes
				{
					ItemName "The Filamental"
					// mann co orange
					"set item tint rgb" 13595446
					// burning flames
					"attach particle effect" 3
				}
				//ItemAttributes
				//{
				//	ItemName "The Bunsen Brave"
				//	// mann co orange
				//	"set item tint rgb" 13595446
				//}
				ItemAttributes
				{
					ItemName "The Dark Falkirk Helm"
					// visor down style
					"item style override" 1
				}
				CharacterAttributes
				{
					"move speed bonus"	0.5
				}
				ItemAttributes
				{
					ItemName "The Huo Long Heatmaker"
					"fire rate bonus" 0.5
					"spread penalty" 1.5
					"minigun spinup time increased" 2
					"ring of fire while aiming" 24
					"Set DamageType Ignite" 1
					"damage bonus" 0.5
				}
		}
		// Medic, starts with full Ubercharge and level 1 Damage Shield. cannot build second charges!
		FastenerBot_MedicShield
		{
				Name "Shield Medic"
				Class Medic
				// idk dude this "_qf" one is what i have in my files from potatoTF fastdl i hope this isn't theft
				ClassIcon    medic_shield_ala
				Skill Expert
				Attributes   SpawnWithFullCharge
				Attributes   ProjectileShield 
				Attributes   IgnoreEnemies
				WeaponRestrictions    SecondaryOnly
				//Item "Das Hazmattenhatten"
				Item "Das Metalmeatencasen"
				ItemAttributes
				{
					ItemName "TF_WEAPON_MEDIGUN"
					// projectile shield is technically a banner
					"generate rage on heal"  1
					"increase buff duration" 2
					// never build Uber (no invuln)
					"ubercharge rate penalty" 1
				}
		}
		// Sniper
		FastenerBot_Sniper
		{
				Class Sniper
				Skill Hard
				Name "Sniper"
				MaxVisionRange 3000
		}
		// Sentry Buster, but reclassed to a heavy for the huo.
		// I'm broken!! Minigun spin-up overrides is_passive_weapon animation forcing. fuck!
		FastenerBot_SentryBuster_Fire
		{
				Class Heavy
				Name "Spicy Buster"
				Skill Expert
				Health 2500
				//WeaponRestrictions MeleeOnly
				ClassIcon sentry_buster
				Attributes MiniBoss
				Attributes DisableDodge
				Item "The Ullapool Caber"
				Item "The Huo Long Heatmaker"
				Item "EOTL_demopants"
				Attributes AlwaysFireWeapon
				ItemAttributes
				{
					ItemName "The Ullapool Caber"
					// force using default anims
					"is_passive_weapon"     1
				}
				ItemAttributes
				{
					ItemName "The Huo Long Heatmaker"
					// must be spun-up to emit fire ring
					"minigun spinup time decreased" 1
					//"fire rate penalty" 99999	// fire ring depends on shooting
					"damage penalty" 0
					"minigun no spin sounds" 1
					"ring of fire while aiming" 12
					"aiming movespeed increased" 1
				}
				CharacterAttributes
				{
					"move speed bonus" 2
					"damage force reduction" 0.5
					"airblast vulnerability multiplier" 0.5
					"override footstep sound set" 7
					"cannot be backstabbed" 1
				}
		}
	//WAVESPAWN templates
		// Dumb melee scouts that mainly exist to push the train out of spawn before other bots arrive. Slowly feed in one-by-one.
		FastenerWave_Support_ScoutPushers_Trickle
		{
			Name "support_scoutPushers"
            SpawnCount 1
            MaxActive 3
            WaitBeforeStarting 0
            WaitBetweenSpawns 3
            Where spawnbot
            TotalCurrency 0
			Support 1
		
            TFBot
            {
				Template FastenerBot_ScoutPushFodder
				
				// go to train
				Tag nav_prefer_gate1_flank
				Tag bot_gatebot
            }
		}
		// Dumb melee scouts that mainly exist to push the train out of spawn before other bots arrive. Arrive in small groups.
		FastenerWave_Support_ScoutPushers_Groups
		{
			Name "support_scoutPushers"
            SpawnCount 3
            MaxActive 3
            WaitBeforeStarting 0
            WaitBetweenSpawns 9
            Where spawnbot
            TotalCurrency 0
			Support 1
		
            TFBot
            {
				Template FastenerBot_ScoutPushFodder
				
				// go to train
				Tag nav_prefer_gate1_flank
				Tag bot_gatebot
            }
		}
	}
		
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	
	// Support missions
	// Sentry busters (wave 1)
	Mission
	{
		Objective DestroySentries
		InitialCooldown 20
		Where spawnbot
		BeginAtWave 1
		RunForThisManyWaves 1
		CooldownTime 40            
            TFBot
			{
				Template T_TFBot_SentryBuster
            }
	}
	// Sentry busters (wave 2). enters on support train
	Mission
	{
		Objective DestroySentries
		InitialCooldown 20
		Where spawnbot_support_giant
		BeginAtWave 2
		RunForThisManyWaves 1
		CooldownTime 40            
            TFBot
			{
				Template T_TFBot_SentryBuster
            }
	}
	// Sentry busters (waves 3 - 4)
	Mission
	{
		Objective DestroySentries
		InitialCooldown 20
		Where spawnbot
		BeginAtWave 3
		RunForThisManyWaves 2
		CooldownTime 40            
            TFBot
			{
				Template T_TFBot_SentryBuster
            }
	}
	// Sentry busters (wave 5). enters on support train
	Mission
	{
		Objective DestroySentries
		InitialCooldown 20
		Where spawnbot_support_giant
		BeginAtWave 5
		RunForThisManyWaves 1
		CooldownTime 40            
            TFBot
			{
				Template T_TFBot_SentryBuster
            }
	}
	
	// Snipers (waves 4 - 5)
	// very few and infrequent - these things are fucking nasty and fastener is WIDE open
	Mission
	{
		Objective Sniper
	
		InitialCooldown 60
		Where spawnbot_mission_sniper
		BeginAtWave 4
		RunForThisManyWaves 9
		CooldownTime 30
		DesiredCount 2
	
		TFBot
		{
			Template FastenerBot_Sniper
		}
	}
		
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	
    // Wave 1
	// Mix of flare pyros and scouts, with some shotgun and minigun heavies on the train.
	// Trickle of support fodder scouts.
    Wave
	{
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
        InitWaveOutput
		{
			Target wave_reset_relay
			Action Trigger
		}

        WaveSpawn //startacker says no touchy
		{
			Name "wave_1_dynamic_element"
			TotalCount 0
			SpawnCount 0
			WaitBeforeStarting 0
			FirstSpawnOutput
			{
				Target wave_start_events_1
				Action Trigger
			}
        }
		// Support
		// Pusher scouts
		WaveSpawn
		{
			Template FastenerWave_Support_ScoutPushers_Trickle
		}
		
		// Wave proper
		// 01a part one - Flare pyros (go to train)
        WaveSpawn
        {
            Name "wave01a"
            TotalCount 8
            SpawnCount 3
            MaxActive 6
            WaitBeforeStarting 20
            WaitBetweenSpawns 10
            Where spawnbot
            Where spawnbot_left
            TotalCurrency 80
		
            TFBot
            {
				Template FastenerBot_PyroFlaregun
				
				// go to train
				Tag nav_prefer_gate1_flank
				Tag bot_gatebot
            }
        }
		// 01a part two - Flare pyros (supporting role)
        WaveSpawn
        {
            Name "wave01a"
            TotalCount 7
            SpawnCount 3
            MaxActive 6
            WaitBeforeStarting 20
            WaitBetweenSpawns 10
            Where spawnbot
            Where spawnbot_left
            TotalCurrency 70
		
            TFBot
            {
				Template FastenerBot_PyroFlaregun
				
				// go nearby the train
				Tag bot_hoverbot
            }
        }
		// 01a part three - Melee scouts
        WaveSpawn
        {
            Name "wave01a"
            TotalCount 30
            SpawnCount 4
            MaxActive 8
            WaitBeforeStarting 30
            WaitBetweenSpawns 4
            Where spawnbot
            Where spawnbot_left
            TotalCurrency 200
		
            TFBot
            {
				Template FastenerBot_ScoutMelee
				
				// go nearby the train
				Tag bot_hoverbot
            }
        }
		// 01a part three - a handful of shotgun heavies, brought in on the support train.
        WaveSpawn
        {
            Name "wave01a"
            TotalCount 10
            SpawnCount 5
            MaxActive 5
            WaitBeforeStarting 50
            WaitBetweenSpawns 50
            Where spawnbot_support
            //TotalCurrency 250
			TotalCurrency 100
		
			Squad
			{
				TFBot
				{
					Template FastenerBot_Heavy
					Skill Hard
					
					// go nearby the train
					Tag bot_hoverbot
				}
				TFBot
				{
					Template FastenerBot_HeavyShotgun
					// Shotguns have a *lot* of burst damage potential - best to tone it down for just wave one
					Skill Easy
					
					// go nearby the train
					Tag bot_hoverbot
				}
				TFBot
				{
					Template FastenerBot_HeavyShotgun
					Skill Easy
					
					// go nearby the train
					Tag bot_hoverbot
				}
				TFBot
				{
					Template FastenerBot_HeavyShotgun
					Skill Normal
					
					// go nearby the train
					Tag bot_hoverbot
				}
				TFBot
				{
					Template FastenerBot_HeavyShotgun
					Skill Normal
					
					// go nearby the train
					Tag bot_hoverbot
				}
			}
		}
    }
	// Wave 1 end
	
	// Wave 2
	// Start with a bunch of shotgun/melee heavies
	// Follow with two sets of giant soldiers with burstfire soldier lackeys, and a few demomen.
	// Small groups of support fodder scouts.
	// Sentry busters arrive via the support train for this one! Try keep bots off of it so they have room to spawn.
    Wave
	{
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
        InitWaveOutput
		{
			Target wave_reset_relay
			Action Trigger
		}

        WaveSpawn //startacker says no touchy
		{
			Name "wave_2_dynamic_element"
			TotalCount 0
			SpawnCount 0
			WaitBeforeStarting 0
			FirstSpawnOutput
			{
				Target wave_start_events_2
				Action Trigger
			}
        }
		
		// Support
		// Pusher scouts
		WaveSpawn
		{
			Template FastenerWave_Support_ScoutPushers_Groups
		}
		
		// Wave proper
		// 02a - Mixed bag of heavies - mostly shotguns, some melee fodder for cover.
        WaveSpawn
        {
            Name "wave02a"
            TotalCount 30
            SpawnCount 10
            MaxActive 10
            WaitBeforeStarting 10
            WaitBetweenSpawns 20
            Where spawnbot
            Where spawnbot_left
            TotalCurrency 300
		
			RandomChoice
			{
				TFBot
				{
					Template FastenerBot_HeavyShotgun
					// Bad aim! work in tandem
					Skill Easy
				
					// go nearby the train
					Tag bot_hoverbot
				}
				TFBot
				{
					Template FastenerBot_HeavyShotgun
					// Decent aim! pew pew
					Skill Hard
				
					// go nearby the train
					Tag bot_hoverbot
				}
				TFBot
				{
					Template FastenerBot_HeavyGRU
				
					// go nearby the train
					Tag bot_hoverbot
				}
			}
        }
		
		// 02b part one - Giant soldier and some backup burst soldiers. Spawns twice
        WaveSpawn
        {
            Name "wave02b"
			WaitForAllDead wave02a
            TotalCount 8
            SpawnCount 4
            MaxActive 4
            WaitBeforeStarting 3
            WaitBetweenSpawns 40
            Where spawnbot
            TotalCurrency 400
			Squad
			{
				TFBot
				{
					Template FastenerBot_SoldierGiant
				
					// go nearby the train
					Tag bot_hoverbot
				}
				TFBot
				{
					Template FastenerBot_SoldierBurstEasy
				
					// go nearby the train
					Tag bot_hoverbot
				}
				TFBot
				{
					Template FastenerBot_SoldierBurstEasy
				
					// go nearby the train
					Tag bot_hoverbot
				}
				TFBot
				{
					Template FastenerBot_SoldierBurstEasy
				
					// go nearby the train
					Tag bot_hoverbot
				}
			}
        }
		// 02b part two - some support demomen for each soldier group.
        WaveSpawn
        {
            Name "wave02b"
			WaitForAllDead wave02a
            TotalCount 12
            SpawnCount 3
            MaxActive 3
            WaitBeforeStarting 0
            WaitBetweenSpawns 30
            Where spawnbot_left
            TotalCurrency 120

            TFBot
            {
				Template FastenerBot_DemoSlowfire
				
				// go nearby the train
				Tag bot_hoverbot
            }
        }
		
	}
	// Wave 2 end
	
    // Wave 3
	// BURN, BABY!
	// Start with the same mix of flare pyros that Wave 1 started with, with WM1 pyros on top.
	// Follow with squads of fast degreaser pyros, with sun-on-a-stick scout lackeys. Also has long range scorch shot pyros on support.
	// Small groups of support fodder scouts.
    Wave
	{
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
        InitWaveOutput
		{
			Target wave_reset_relay
			Action Trigger
		}

        WaveSpawn //startacker says no touchy
		{
			Name "wave_3_dynamic_element"
			TotalCount 0
			SpawnCount 0
			WaitBeforeStarting 0
			FirstSpawnOutput
			{
				Target wave_start_events_3
				Action Trigger
			}
        }
		// Support
		// Pusher scouts
		WaveSpawn
		{
			Template FastenerWave_Support_ScoutPushers_Groups
		}
		
		// Wave proper
		// 03a part one - Flare pyros (go to train)
        WaveSpawn
        {
            Name "wave03a"
            TotalCount 8
            SpawnCount 3
            MaxActive 6
            WaitBeforeStarting 10
            WaitBetweenSpawns 3
            Where spawnbot
            Where spawnbot_left
            TotalCurrency 80
		
            TFBot
            {
				Template FastenerBot_PyroFlaregun
				
				// go to train
				Tag nav_prefer_gate1_flank
				Tag bot_gatebot
            }
        }
		// 03a part two - Flare pyros (supporting role)
        WaveSpawn
        {
            Name "wave03a"
            TotalCount 7
            SpawnCount 3
            MaxActive 6
            WaitBeforeStarting 10
            WaitBetweenSpawns 3
            Where spawnbot
            Where spawnbot_left
            TotalCurrency 70
		
            TFBot
            {
				Template FastenerBot_PyroFlaregun
				Tag boss
				
				// go nearby the train
				Tag bot_hoverbot
            }
        }
		// 03a part three - WM1 pyros
		WaveSpawn
        {
            Name "wave03a"
            TotalCount 15
            SpawnCount 3
            MaxActive 6
            WaitBeforeStarting 20
            WaitBetweenSpawns 6
            Where spawnbot
            Where spawnbot_left
            TotalCurrency 150
		
            TFBot
            {
				Template FastenerBot_PyroWM1
				Name "Firebox Igniter"
				
				// go nearby the train
				Tag bot_hoverbot
            }
        }
		
		// 03b part one - fast degreaser pyros with sun-on-a-stick scout lackeys.
		WaveSpawn
        {
            Name "wave03b"
			WaitForAllDead wave03a
            TotalCount 20
            SpawnCount 4
            MaxActive 12
            WaitBeforeStarting 2
            WaitBetweenSpawns 9
            Where spawnbot
            Where spawnbot_left
            TotalCurrency 200
			
			Squad
			{
				TFBot
				{
					Template FastenerBot_PyroFast
				
					// go nearby the train
					Tag bot_hoverbot
				}
				TFBot
				{
					Template FastenerBot_ScoutSunOnAStick
				
					// go nearby the train
					Tag bot_hoverbot
				}
				TFBot
				{
					Template FastenerBot_ScoutSunOnAStick
				
					// go nearby the train
					Tag bot_hoverbot
				}
				TFBot
				{
					Template FastenerBot_ScoutSunOnAStick
				
					// go nearby the train
					Tag bot_hoverbot
				}
			}
        }
		// 03b part three - supporting long range scorch shot pyros
		WaveSpawn
        {
            //Name "wave03b"
			WaitForAllDead wave03a
            SpawnCount 4
            MaxActive 4
            WaitBeforeStarting 2
            WaitBetweenSpawns 8
            Where spawnbot
            Where spawnbot_left
			Support 1
			
			TFBot
			{
				Template FastenerBot_PyroScorchShotLongRange
				Item "The Special Eyes"
				Item "The Well-Rounded Rifleman"
				
				// go nearby the train
				Tag bot_hoverbot
			}
		}
		// 03c part one - giant flare spammer pyros
		// previous scorch shot pyros stack onto here!
		WaveSpawn
        {
            Name "wave03c"
			WaitForAllDead wave03b
            TotalCount 2
            SpawnCount 2
            MaxActive 2
            WaitBeforeStarting 2
            WaitBetweenSpawns 40
            Where spawnbot
            TotalCurrency 200
			
			TFBot
			{
				Template FastenerBot_PyroGiantFlareRapidfire
				
				// go nearby the train
				Tag bot_hoverbot
			}
		}
		// 03c part two - WM1 pyros in supporting role
		// previous scorch shot pyros stack onto here!
		WaveSpawn
        {
            Name "wave03c"
			WaitForAllDead wave03b
            SpawnCount 2
            MaxActive 6
            WaitBeforeStarting 2
            WaitBetweenSpawns 8
            //Where spawnbot
            Where spawnbot_left
            //TotalCurrency 150
			Support 1
		
            TFBot
            {
				Template FastenerBot_PyroWM1
				//Name "Firebox Igniter"
				
				// go nearby the train
				Tag bot_hoverbot
            }
        }
    }
	// Wave 3 end
	
	// Wave 4
	// Start with squads of soldiers, one with conch, and supporting scouts.
	// Follow with some shortstop scouts, awash in a swarm of moscoutos. Also a few giant KGB heavies.
	// Small groups of support fodder scouts.
    Wave
	{
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
        InitWaveOutput
		{
			Target wave_reset_relay
			Action Trigger
		}

        WaveSpawn //startacker says no touchy
		{
			Name "wave_4_dynamic_element"
			TotalCount 0
			SpawnCount 0
			WaitBeforeStarting 0
			FirstSpawnOutput
			{
				Target wave_start_events_4
				Action Trigger
			}
        }
		// Support
		// Pusher scouts
		WaveSpawn
		{
			Template FastenerWave_Support_ScoutPushers_Groups
		}
		
		// Wave proper
		// 04a part one - Soldier squads
        WaveSpawn
        {
            Name "wave04a"
            TotalCount 12
            SpawnCount 4
            MaxActive 4
            WaitBeforeStarting 0
            WaitBetweenSpawns 20
            //Where spawnbot
            Where spawnbot_left
            TotalCurrency 240
		
			Squad
			{
				TFBot
				{
					Template FastenerBot_SoldierConch
					
					// go nearby the train
					Tag bot_hoverbot
				}
				TFBot
				{
					Template FastenerBot_Soldier
					Tag bot_squad_member
					
					// go nearby the train
					Tag bot_hoverbot
				}
				TFBot
				{
					Template FastenerBot_Soldier
					Tag bot_squad_member
					
					// go nearby the train
					Tag bot_hoverbot
				}
				TFBot
				{
					Template FastenerBot_Soldier
					Tag bot_squad_member
					
					// go nearby the train
					Tag bot_hoverbot
				}
			}
        }
		// 04a part two - supporting scouts
        WaveSpawn
        {
            Name "wave04a"
            TotalCount 12
            SpawnCount 3
            MaxActive 3
            WaitBeforeStarting 0
            WaitBetweenSpawns 10
            Where spawnbot_left
            TotalCurrency 60
			//Support Limited
		
			TFBot
			{
				Template FastenerBot_Scout
				
				// go nearby the train
				Tag bot_hoverbot
			}
		}
		
		// 04b part one - shortstop scouts
        WaveSpawn
        {
            Name "wave04b"
			WaitForAllDead "wave04a"
            TotalCount 12
            SpawnCount 3
            MaxActive 6
            WaitBeforeStarting 8
            WaitBetweenSpawns 6
            Where spawnbot_left
            TotalCurrency 240
		
			TFBot
			{
				Template FastenerBot_ScoutShortstop
				
				// go nearby the train
				Tag bot_hoverbot
			}
		}
		// 04b part two - moscouto swarm
        WaveSpawn
        {
            Name "wave04b"
			WaitForAllDead "wave04a"
            //TotalCount 48
            SpawnCount 4
            MaxActive 16
            WaitBeforeStarting 8
            WaitBetweenSpawns 4
            Where spawnbot_left
			Where spawnbot
			Where spawnbot_right
			Support 1
		
			TFBot
			{
				Template FastenerBot_ScoutMosquito
				
				// go nearby the train
				Tag bot_hoverbot
			}
		}
		
		// 04b part three - big punchy heavies.
		// 04b pt3 hoverbot heavies
        WaveSpawn
        {
            Name "wave04b"
			WaitForAllDead "wave04a"
            TotalCount 2
            SpawnCount 1
            MaxActive 2
            WaitBeforeStarting 40
            WaitBetweenSpawns 30
            Where spawnbot_right
            TotalCurrency 100
			
			TFBot
			{
				Template FastenerBot_HeavyGiantKGB
				
				// go nearby the train
				Tag bot_hoverbot
			}
		}
		// 04b pt3 gatebot heavy
        WaveSpawn
        {
            Name "wave04b"
			WaitForAllDead "wave04a"
            TotalCount 1
            SpawnCount 1
            MaxActive 1
            WaitBeforeStarting 10
            WaitBetweenSpawns 30
            Where spawnbot_right
            TotalCurrency 60
		
			TFBot
			{
				Template FastenerBot_HeavyGiantKGB
				
				// go nearby the train
				//Tag bot_hoverbot
				
				// go to train
				Tag nav_prefer_gate1_flank
				Tag bot_gatebot
			}
		}
		
	}
	// Wave 4 end
	
	// Wave 5
	// Start with squads of freight train heavies and backup.
	// Follow with boss bullet hell soldier! With some shield medic lackeys. Backup support KGB heavies and Loose Cannon demomen.
	// Modest groups of support fodder scouts.
	// Sentry busters arrive via the support train for this one! Try keep bots off of it so they have room to spawn.
    Wave
	{
		StartWaveOutput
		{
			Target	wave_start_relay
			Action	Trigger
		}
		
		DoneOutput
		{
			Target	wave_finished_relay
			Action	Trigger
		}
        InitWaveOutput
		{
			Target wave_reset_relay
			Action Trigger
		}

        WaveSpawn //startacker says no touchy
		{
			Name "wave_5_dynamic_element"
			TotalCount 0
			SpawnCount 0
			WaitBeforeStarting 0
			FirstSpawnOutput
			{
				Target wave_start_events_5
				Action Trigger
			}
        }
		// Support
		// Pusher scouts (but more than usual)
		WaveSpawn
		{
			Template FastenerWave_Support_ScoutPushers_Groups
            MaxActive 5
		}
		
		// Wave proper
		// 05a part one - squad led by Freight Train heavy with two quick fix medic pockets, and shotgun heavies up front.
		WaveSpawn
        {
            Name "wave05a"
            TotalCount 5
            SpawnCount 5
            MaxActive 5
            WaitBeforeStarting 0
            WaitBetweenSpawns 60
            Where spawnbot
            TotalCurrency 400
		
			Squad
			{
				TFBot
				{
					Template FastenerBot_HeavyGiantFreightTrain
					
					// prefer leaving warehouse on support train side
					Tag boss
				
					// go nearby the train
					Tag bot_hoverbot
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickFix
					Tag bot_squad_member
				}
				TFBot
				{
					Template T_TFBot_Medic_QuickFix
					Tag bot_squad_member
				}
				// shotty squad
				TFBot
				{
					Template FastenerBot_HeavyShotgunBurst
					Tag bot_squad_member
				
					// go nearby the train
					Tag bot_hoverbot
				}
				TFBot
				{
					Template FastenerBot_HeavyShotgunBurst
					Tag bot_squad_member
				
					// go nearby the train
					Tag bot_hoverbot
				}
				TFBot
				{
					Template FastenerBot_HeavyShotgun
					Tag bot_squad_member
				
					// go nearby the train
					Tag bot_hoverbot
				}
				TFBot
				{
					Template FastenerBot_HeavyShotgun
					Tag bot_squad_member
				
					// go nearby the train
					Tag bot_hoverbot
				}
				TFBot
				{
					Template FastenerBot_HeavyShotgun
					Tag bot_squad_member
				
					// go nearby the train
					Tag bot_hoverbot
				}
				// too much hp for two players to chew through
				//TFBot
				//{
				//	Template FastenerBot_DemoGiantBurst
				//	Tag bot_squad_member
				//
				//	// go nearby the train
				//	Tag bot_hoverbot
				//}
				//TFBot
				//{
				//	Template FastenerBot_DemoGiantBurst
				//	Tag bot_squad_member
				//
				//	// go nearby the train
				//	Tag bot_hoverbot
				//}
			}
        }
		// 05a part two - supporting soldiers
        WaveSpawn
        {
            //Name "wave05a"
			TotalCount 15
            SpawnCount 3
            MaxActive 3
            WaitBeforeStarting 0
            WaitBetweenSpawns 20
			Where spawnbot
            TotalCurrency 150
			//Support Limited
		
			TFBot
			{
				Template FastenerBot_Soldier
				
				// go nearby the train
				Tag bot_hoverbot
			}
		}
		
		// 05b part one - Soldier boss, and shield medic lackeys to lengthen the start of the fight.
        WaveSpawn
        {
            Name "wave05b"
			WaitForAllDead wave05a
            TotalCount 4
            SpawnCount 4
            MaxActive 4
            WaitBeforeStarting 0
            WaitBetweenSpawns 10
            Where spawnbot
            TotalCurrency 0
		
			Squad
			{
				TFBot
				{
					Template FastenerBot_SoldierBulletHellBoss
					
					// prefer leaving warehouse on support train side
					Tag boss
				
					// go nearby the train
					Tag bot_hoverbot
				}
				TFBot
				{
					Template FastenerBot_MedicShield
					Tag bot_squad_member
					
					// go nearby the train
					//Tag bot_hoverbot
				}
				TFBot
				{
					Template FastenerBot_MedicShield
					Tag bot_squad_member
					
					// go nearby the train
					//Tag bot_hoverbot
				}
				TFBot
				{
					Template FastenerBot_MedicShield
					Tag bot_squad_member
					
					// go nearby the train
					//Tag bot_hoverbot
				}
			}
			
			FirstSpawnOutput
			{
				// set up soldier robot voice responses on player death
				Target boss_relay
				Action Trigger
			}
			
        }
		// 05b part two - supporting melee KGB heavies
        WaveSpawn
        {
            Name "wave05b"
			WaitForAllDead wave05a
            SpawnCount 3
            MaxActive 3
            WaitBeforeStarting 25
            WaitBetweenSpawns 50
            Where spawnbot_left
			Where spawnbot
			Where spawnbot_right
			Support 1
		
			TFBot
			{
				Template FastenerBot_HeavyKGB
				
				// go nearby the train
				Tag bot_hoverbot
			}
		}
		// 05b part three - loose cannon demomen
        WaveSpawn
        {
            Name "wave05b"
			WaitForAllDead wave05a
            SpawnCount 3
            MaxActive 3
            WaitBeforeStarting 0
            WaitBetweenSpawns 50
            Where spawnbot_left
			Support 1
			
			Squad
			{
				TFBot
				{
					Template FastenerBot_DemoLooseCannonBurst
					
					// go nearby the train
					Tag bot_hoverbot
				}
				TFBot
				{
					Template FastenerBot_DemoLooseCannon
					Tag bot_squad_member
					
					// go nearby the train
					Tag bot_hoverbot
				}
				TFBot
				{
					Template FastenerBot_DemoLooseCannon
					Tag bot_squad_member
					
					// go nearby the train
					Tag bot_hoverbot
				}
			}
		}
	}
	// Wave 5 end
}
// WaveSchedule end