// Reverse MvM by Vernit
//
// Credits to:
// Nobo - made the map
// Royal - ambulance tank template
// Washy - payload logic
// Bazooks - fake wavespawns

#base robot_standard.pop
#base robot_giant.pop
#base robot_vernit.pop
#base robotize_lines.pop

WaveSchedule
{
    StartingCurrency 800
    CanBotsAttackWhileInSpawnRoom yes
    RespawnWaveTime 3
    RespawnWaveTimeBlue 3
	FixedRespawnWaveTimeBlue yes
    AddSentryBusterWhenDamageDealtExceeds 3000
    AddSentryBusterWhenKillCountExceeds 15
    Advanced 1
	// 	Essential stuff
	ReverseWinConditions 1  	 				 
	AllowJoinTeamBlueMax 6  				 
	AllowJoinTeamBlue 1  	 				 
	HumansMustJoinTeam Blue  	  	
	SetCreditTeam 3	 			
	SniperAllowHeadshots 1  	//sniper and amby un-exist without this	
	
	//	Optional stuff

	ImprovedAirblast 1  
	SendBotsToSpectatorImmediately 1  	//keeps the populator less clogged, bot projectiles vanish on death + causes weird killcams
	RobotLimit 26   //going higher will eat player slots
	BluHumanInfiniteAmmo 0  
	FlagCarrierMovementPenalty 1   // (default: 0.5)
	BluHumanFlagCapture 0  	 				 
	BluHumanFlagPickup 0  	 			 
	BluPlayersAreRobots 1  	
	ForceHoliday 2
	NoMvMDeathTune 1 
	NoHolidayPickups 1
	NoReanimators 1
	NoMissionInfo 0						  
	NoCreditsVelocity 1 				 
	NoRomevisionCosmetics 1 			 
	NoThrillerTaunt 1 			
	StuckTimeMultiplier 3.5	
	SentryBusterFriendlyFire 0 
	WaveStartCountdown 3
	MaxSpeedLimit 1800
	NoSapUnownedBuildings 1
	ForceRedMoney 1
	EnemyTeamForReverse red
	StealthDamageReduction 0.1
	MedigunShieldDamage 1
	NoRedBotsRandomCrit 1
	NoRedSniperBotHeadshots 1
	// GrapplingHook 1

	// 	Engi-bot style teleporter.  Not recommended for gatebot, highly recommended for non-gatebot
	//	Entrances will also act like bot tele exits

	BotTeleportUberDuration 1  		 
	BluHumanTeleportOnSpawn 1   			 
	BluHumanBotTeleporter 0 	
	SentryHintBombForwardRange 5000
	SentryHintBombBackwardRange 0
	SentryHintMinDistanceFromBomb 1300
    CustomNavFile "mvm_sand_b2_rev"

	LuaScriptFile "scripts/projectile_shield_damage.lua" 

	// PrecacheModel "models/bots/soldier/bot_soldier_gray.mdl"
	// PrecacheModel "models/bots/heavy/bot_heavy_gray.mdl"
	// PrecacheModel "models/bots/scout/bot_scout_gray.mdl"
	// PrecacheModel "models/bots/sniper/bot_sniper_gray.mdl"
	// PrecacheModel "models/bots/medic/bot_medic_gray.mdl"
	// PrecacheModel "models/bots/demo/bot_demo_gray.mdl"
	// PrecacheModel "models/bots/heavy_boss/bot_heavy_gray_boss.mdl"
	// PrecacheModel "models/bots/soldier_boss/bot_soldier_gray_boss.mdl"
	// PrecacheModel "models/weapons/c_models/c_minigun/c_minigun_that_goes_on_the_bunker.mdl"

	PrecacheModel "models/props_mvm/reversemvm_redwall_696x337.mdl"
    PrecacheModel "models/props_mvm/robot_spawnpoint.mdl"
	PrecacheModel "models/weapons/w_models/w_atomball.mdl"
	PrecacheModel "models/weapons/w_models/w_atomball_blu.mdl"
	PrecacheModel "models/weapons/c_models/c_atomball_blu.mdl"
	
	PrecacheModel "models/weapons/c_models/c_brick/c_brick.mdl"

	PrecacheModel "models/bots/soldier_boss/bot_soldier_boss_gibby.mdl"		
	PrecacheModel "models/bots/heavy_boss/bot_heavy_boss_gibby.mdl" 
	PrecacheModel "models/bots/heavy/bot_heavy_gibby.mdl"
	PrecacheModel "models/bots/demo_boss/bot_demo_boss_gibby.mdl"				

	PrecacheSound "weapons/grenade/tick1.wav"
	PrecacheSound "npc/env_headcrabcanister/explosion.wav"
	PrecacheSound "graybossfinale.mp3"

	PrecacheModel "models/weapons/c_models/c_demo_bot_arms.mdl"						 
	PrecacheModel "models/weapons/c_models/c_demo_bot_animations.mdl"				 
	PrecacheModel "models/weapons/c_models/c_engineer_bot_arms.mdl"					 
	PrecacheModel "models/weapons/c_models/c_engineer_bot_gunslinger.mdl"			 
	PrecacheModel "models/weapons/c_models/c_engineer_bot_animations.mdl"			 
	PrecacheModel "models/weapons/c_models/c_engineer_bot_gunslinger_animations.mdl"	 
	PrecacheModel "models/weapons/c_models/c_heavy_bot_arms.mdl"						 
	PrecacheModel "models/weapons/c_models/c_heavy_bot_animations.mdl"				 
	PrecacheModel "models/weapons/c_models/c_medic_bot_arms.mdl"						 
	PrecacheModel "models/weapons/c_models/c_medic_bot_animations.mdl"				 
	PrecacheModel "models/weapons/c_models/c_pyro_bot_arms.mdl"						 
	PrecacheModel "models/weapons/c_models/c_pyro_bot_animations.mdl"					 
	PrecacheModel "models/weapons/c_models/c_scout_bot_arms.mdl"						 
	PrecacheModel "models/weapons/c_models/c_scout_bot_animations.mdl"				 
	PrecacheModel "models/weapons/c_models/c_soldier_bot_arms.mdl"					 
	PrecacheModel "models/weapons/c_models/c_soldier_bot_animations.mdl"				 
	PrecacheModel "models/weapons/c_models/c_sniper_bot_arms.mdl"						 
	PrecacheModel "models/weapons/c_models/c_sniper_bot_animations.mdl"				 
	PrecacheModel "models/weapons/c_models/c_spy_bot_arms.mdl"						 
	PrecacheModel "models/weapons/c_models/c_spy_bot_animations.mdl"					 
	PrecacheModel "models/weapons/v_models/v_pda_spy_bot.mdl"							 
	PrecacheModel "models/weapons/v_models/v_ttg_watch_spy_bot.mdl"					 
	PrecacheModel "models/weapons/v_models/v_watch_leather_spy_bot.mdl"				 
	PrecacheModel "models/weapons/v_models/v_watch_pocket_spy_bot.mdl"				 
	PrecacheModel "models/weapons/v_models/v_watch_spy_bot.mdl"						 
	PrecacheModel "models/workshop_partner/weapons/v_models/v_hm_watch/v_hm_watch_bot.mdl"

    // Disable sounds
    DisableSound "Announcer.MVM_All_Dead"  						   
	DisableSound "Announcer.MVM_Bomb_Alert_Entered"	 			   
	DisableSound "Announcer.MVM_Bomb_Alert_Near_Hatch"  			   
	DisableSound "Announcer.MVM_Bomb_Alert_Deploying"  
    DisableSound "Announcer.MVM_Game_Over_Loss"  
    DisableSound "Announcer.MVM_Robots_Planted"  
    DisableSound "Announcer.MVM_Sentry_Buster_Alert"  
    DisableSound "Announcer.MVM_Sentry_Buster_Alert_Another"  
    DisableSound "Announcer.MVM_Tank_Alert_Spawn"  				    
	DisableSound "Announcer.MVM_Tank_Alert_Another"		   
	DisableSound "Announcer.MVM_Tank_Alert_Multiple"  	 		   		 
	DisableSound "Announcer.MVM_Tank_Alert_Halfway"	  			   			 
	DisableSound "Announcer.MVM_Tank_Alert_Halfway_Multiple"  	   	 
	DisableSound "Announcer.MVM_Tank_Alert_Near_Hatch"  			   		 
	DisableSound "Announcer.MVM_Tank_Alert_Deploying"  
    DisableSound "Announcer.MVM_First_Wave_Start"  
    DisableSound "Announcer.MVM_Wave_Start"  
    DisableSound "Announcer.MVM_Wave_End"  
    DisableSound "Announcer.MVM_Wave_Lose"  
    DisableSound "Announcer.MVM_Final_Wave_Start"  
    DisableSound "Announcer.MVM_Final_Wave_End"  
    DisableSound "music.mvm_end_last_wave"  						   
	DisableSound "music.mvm_end_mid_wave"  						   
	DisableSound "music.mvm_end_tank_wave"  						   
	DisableSound "music.mvm_end_wave"  							   
	DisableSound "music.mvm_lost_wave"  							   
	DisableSound "music.mvm_start_last_wave"  					   
	DisableSound "music.mvm_start_mid_wave"	 					   
	DisableSound "music.mvm_start_tank_wave"  					   
	DisableSound "music.mvm_start_wave"	 						   
	DisableSound "Announcer.MVM_Spy_Alert"  
	DisableSound "heavy_mvm_giant_robot01"
	DisableSound "heavy_mvm_giant_robot02"
	DisableSound "heavy_mvm_giant_robot03"
	DisableSound "heavy_mvm_giant_robot04"
	DisableSound "engineer_mvm_giant_robot01"
	DisableSound "engineer_mvm_giant_robot02"
	DisableSound "engineer_mvm_giant_robot03"
	DisableSound "soldier_mvm_giant_robot01"
	DisableSound "soldier_mvm_giant_robot02"
	DisableSound "soldier_mvm_giant_robot03"
	DisableSound "soldier_mvm_giant_robot04"
	DisableSound "soldier_mvm_sniper01"
	DisableSound "medic_mvm_giant_robot01"
	DisableSound "medic_mvm_giant_robot02"
	DisableSound "medic_mvm_giant_robot03"
	DisableSound "engineer_mvm_bomb_destroyed01"
	DisableSound "engineer_mvm_bomb_destroyed02"
	DisableSound "engineer_mvm_bomb_see01"
	DisableSound "engineer_mvm_bomb_see02"
	DisableSound "engineer_mvm_bomb_see03"
	DisableSound "engineer_mvm_bomb_upgrade01"
	DisableSound "engineer_mvm_bomb_upgrade02"
	DisableSound "engineer_mvm_tank_alert01"
	DisableSound "engineer_mvm_tank_dead01"
	DisableSound "engineer_mvm_tank_deploy01"
	DisableSound "engineer_mvm_sniper01"
	DisableSound "heavy_mvm_bomb_see01"
	DisableSound "heavy_mvm_bomb_see02"
	DisableSound "heavy_mvm_bomb_upgrade01"
	DisableSound "heavy_mvm_bomb_upgrade02"
	DisableSound "heavy_mvm_tank_alert01"
	DisableSound "heavy_mvm_tank_alert02"
	DisableSound "heavy_mvm_tank_alert03"
	DisableSound "heavy_mvm_tank_dead01"
	DisableSound "heavy_mvm_tank_deploy01"
	DisableSound "heavy_mvm_sniper01"
	DisableSound "medic_mvm_bomb_see01"
	DisableSound "medic_mvm_bomb_see02"
	DisableSound "medic_mvm_bomb_see03"
	DisableSound "medic_mvm_bomb_upgrade01"
	DisableSound "medic_mvm_bomb_upgrade02"
	DisableSound "medic_mvm_bomb_upgrade03"
	DisableSound "medic_mvm_sniper01"
	DisableSound "medic_mvm_tank_alert01"
	DisableSound "medic_mvm_tank_dead01"
	DisableSound "medic_mvm_tank_deploy01"

    OverrideSounds   
	{
		"MVM.BombWarning"	"common/null.wav"
		"MVM.GiantCommonExplodes"  "npc/env_headcrabcanister/explosion.wav"
		"MVM.GiantHeavyExplodes"  "npc/env_headcrabcanister/explosion.wav"
        "Announcer.MVM_Spy_Alert"	"common/null.wav"			 
		"Announcer.mvm_spybot_death" "common/null.wav"				 
		"Announcer.mvm_spybot_death_all" "common/null.wav"		
		"Announcer.MVM_All_Dead" "common/null.wav"
        "Flesh.BulletImpact" "MVM_Robot.BulletImpact"
		"Player.FallDamage" "MVM.RobotImpactHard"
		"Player.FallGib" "MVM.RobotImpactHard"
		"BaseCombatCharacter.CorpseGib" "grinder_bot"
		"Weapon_General.CritPower" "common/null.wav"
		
		"Scout.ReadyMvM" "Scout.MVM_BattleCry02"
		"Soldier.ReadyMvM" "Soldier.MVM_Go02"
		"Pyro.ReadyMvM" "Pyro.MVM_Go01"
		"Demoman.ReadyMvM" "Demoman.MVM_Go03"
		"Heavy.ReadyMvM" "Heavy.MVM_MoveUp02"
		"Engineer.ReadyMvM" "Engineer.MVM_MoveUp01"
		"Medic.ReadyMvM" "Medic.MVM_AutoCappedControlPoint03"
		"Sniper.ReadyMvM" "Sniper.MVM_Taunts39"
		"Spy.ReadyMVM" "Spy.MVM_DominationScout01"
	}

    HandModelOverride
	{
		Scout "models/weapons/c_models/c_scout_bot_arms.mdl"
		Soldier "models/weapons/c_models/c_soldier_bot_arms.mdl"
		Pyro "models/weapons/c_models/c_pyro_bot_arms.mdl"
		HeavyWeapons "models/weapons/c_models/c_heavy_bot_arms.mdl"
		Demoman "models/weapons/c_models/c_demo_bot_arms.mdl"
		Engineer "models/weapons/c_models/c_engineer_bot_arms.mdl"
		Medic "models/weapons/c_models/c_medic_bot_arms.mdl"
		Sniper "models/weapons/c_models/c_sniper_bot_arms.mdl"
		Spy "models/weapons/c_models/c_spy_bot_arms.mdl"
	}

    DisallowUpgrade	"engy disposable sentries"   //breaks mini drone template
	DisallowUpgrade	"recall"   //breaks res system

	PlayerAttributes  
	{
		"cannot pick up intelligence" 1
		"crit mod disabled" 0
		"increased air control" 4
		"cancel falling damage" 1
		"always allow taunt" 1
		"vision opt in flags" -34028234663852886000000000000000000000

		Engineer
		{
			"max health additive bonus" 150
			"mult dispenser rate" 2
		}

		Medic
		{
			"medic machinery beam" 4
		}
	}

	ItemBlackList
	{
		ItemName "rocket jumper"
		ItemName "zombie scout"
		ItemName "zombie soldier"
		ItemName "zombie pyro"
		ItemName "zombie demo"
		ItemName "zombie heavy"
		ItemName "zombie engineer"
		ItemName "zombie medic"
		ItemName "zombie sniper"
		ItemName "zombie spy"
		// Name "Kritz Or Treat Canteen"
		// Name "Default Power Up Canteen (MvM)"
		// Name "Power Up Canteen (MvM)"
		// Name "Battery Canteens"
	}

	CustomWeapon
	{
		Name "medfix"
		OriginalItemName "tf_weapon_syringegun_medic"
		"provide on active" 1
		"is suicide counter" 10
	}

	CustomWeapon
	{
		Name "FamilyHealer"
		OriginalItemName "The Family Business"
		"auto fires full clip" 1
		"auto fires when full" 1
		"heal on hit for rapidfire" 40
		"health regen" 10
		"heal on kill" 300
	}

	CustomWeapon
	{
		Name "Bombber_Boss"
		OriginalItemName "Mutated Milk"
		"override projectile type" 3
		"custom projectile model" "models/weapons/w_models/w_atomball.mdl"
		"custom item model" "models/weapons/w_models/w_atomball.mdl"
		"fuse bonus" 3
		"damage bonus" 20
		"blast radius increased" 2
		"custom kill icon" "taunt_soldier_lumbricus"
		"projectile trail particle" "~3rd_trail"
		"explosion particle" "fireSmokeExplosion"
		"effect bar recharge rate increased" 0.1
		"fire rate penalty" 4
	}

	CustomWeapon
	{
		Name "Bombber"
		OriginalItemName "Mutated Milk"
		"override projectile type" 3
		"custom projectile model" "models/weapons/w_models/w_atomball_blu.mdl"
		"custom item model" "models/weapons/c_models/c_atomball_blu.mdl"
		"grenade not explode on impact" 1
		"fuse bonus" 3
		"damage bonus" 20
		"blast radius increased" 2
		"grenade damage reduction on world contact" 2
		"single wep deploy time increased" 2
		"custom kill icon" "taunt_soldier_lumbricus"
		"explosion particle" "fireSmokeExplosion"
		"projectile sound" "weapons/grenade/tick1.wav"
		"fire rate penalty" 2.5
	}

	CustomWeapon
	{
		Name "Brick"
		OriginalItemName "Jarate"
		"use original class weapon animations" 1
		"override projectile type extra" "brick"
		"custom item model" "models/weapons/c_models/c_brick/c_brick.mdl" 
		"effect bar recharge rate increased" 0.2
		"dmg penalty vs players" 2.0
		"cannot be upgraded" 1
	}

	CustomWeapon
	{
		Name "Flying Guillotine for Sniper"
		OriginalItemName "The Flying Guillotine"
		"use original class weapon animations" 1
		"cannot be upgraded" 1
	}

	CustomWeapon 
    {
        Name "Bio-Breaker"
        OriginalItemName "TF_WEAPON_MINIGUN"
        "custom item model" "models/weapons/c_models/c_biobreaker/c_biobreaker.mdl"
        "special item description" "Drills through enemies, no bullets"
        "minigun spinup time decreased" 0.25
        "damage bonus hidden" 5
        "mult dmg vs tanks" 2
		"hidden primary max ammo bonus" 2
        "aiming movespeed decreased" 2.5
        "particle effect use head origin" 1
		"particle effect vertical offset" -5000
        "custom weapon fire sound" "misc/null.wav"
		"custom minigun spin sound" "misc/null.wav"
        "custom wind up sound" "=100|ambient/machines/spinup.wav"
        "custom wind down sound" "=100|ambient/machines/spindown.wav"
        "custom hit sound" "=70|ambient/grinder/grinderbot_01.wav"
        "custom impact sound" "SolidMetal.BulletImpact"
        "custom kill icon" "skull"
        "override projectile type" 2
		"projectile lifetime" 0.05
		// "projectile speed increased" 0.25
        "projectile no deflect" 1
        "stay after regenerate" 1
        "custom projectile size" 12
		"blast radius decreased" 0.25
		"no self blast dmg" 2
		"no explosion particles" 1
		"centerfire projectile" 1
		"custom projectile model" "models/empty.mdl"
        "add damage type" 128
		"remove damage type" 64   
        "weapon always gib" 1  
        "spunup_damage_resistance" 0.7
        "alt-fire disabled" 1
		"minigun full movement" 1
    }

	Extraloadoutitems
	{
		Scout
		{
			Secondary "Bombber"
			Secondary "Brick"
		}

		Sniper
		{
			Secondary "Flying Guillotine for Sniper"
		}
	}

	PlayerItemEquipSpawnTemplate
	{
		Name "test_mini"
		ItemName "The Gunslinger"
	}

	ExtraTankPath  
	{
		Name "tankhatch"
		Node "-5040 4112 657"
		Node "-5040 4056 657"
	}

    ExtraSpawnpoint
    {
        Name "redspawn_front1"
        Teamnum 2
        X -76
        Y 408
        Z 280
    }

	ExtraSpawnpoint
    {
        Name "redspawn_front2"
        Teamnum 2
        X -752
        Y 1456
        Z 283
    }

	ExtraSpawnpoint
    {
        Name "redspawn_tunnel1"
        Teamnum 2
        X 64
        Y 1624
        Z 283
    }

    ExtraSpawnpoint
    {
        Name "redspawn_biome1"
        Teamnum 2
        X -1408
        Y 1168
        Z 267.917
    }

    ExtraSpawnpoint
    {
        Name "redspawn_biome2"
        Teamnum 2
        StartDisabled 1
        X -1184
        Y 2308
        Z 408
    }

	ExtraSpawnpoint
    {
        Name "redspawn_tunnel2"
        Teamnum 2
        StartDisabled 1
        X 352
        Y 3932
        Z 280
    }

    ExtraSpawnpoint
    {
        Name "redspawn_mid1"
        Teamnum 2
        StartDisabled 1
        X 600
        Y 3992
        Z 456
    }

    ExtraSpawnpoint
    {
        Name "redspawn_mid2"
        Teamnum 2
        StartDisabled 1
        X -584
        Y 3976
        Z 368
    }

    ExtraSpawnpoint
    {
        Name "redspawn_mid3"
        Teamnum 2
        StartDisabled 1
        X -1488
        Y 4000
        Z 280
    }

    ExtraSpawnpoint
    {
        Name "redspawn_top"
        Teamnum 2
        StartDisabled 1
        X -1800
        Y 3712
        Z 568
    }

    ExtraSpawnpoint
    {
        Name "redspawn_close"
        Teamnum 2
        StartDisabled 1
        X -2696
        Y 3940
        Z 512
    }
    

    ExtraSpawnpoint
    {
        Name "barrierguard1"
        Teamnum 2
        StartDisabled 1
        X 76
        Y 1024
        Z 279.88
    }

    ExtraSpawnpoint
    {
        Name "barrierguard2"
        Teamnum 2
        StartDisabled 1
        X 108
        Y 2808
        Z 480
    }

    ExtraSpawnpoint
    {
        Name "barrierguard3"
        Teamnum 2
        StartDisabled 1
        X -1412
        Y 4076
        Z 568
    }

    ExtraSpawnpoint
    {
        Name "hatchspawn"
        Teamnum 2
        StartDisabled 1
        X -5032
        Y 4096
        Z 622.032
    }

    Pointtemplates
    {
        corelogic //all the things we want to automatically run when the popfile reloads.  Use this the most to avoid spaghetti
		{  
            NoFixup 1
			logic_auto 
			{
				"origin" "0 0 0" 
				"targetname" "mainrelay"		
				"OnMapSpawn" "tf_objective_resource,$SetClientProp$m_iszMvMPopfileName,Gridlock,0,-1" 
				// "OnMapSpawn" "item_ammopack*,Kill,,0,-1" //might want to comment this out if players have limited ammo	
				"OnMapSpawn" "tank_capalarm*,Kill,,0,-1" 
                
                "OnMapSpawn" "spawnbot_ambush,Disable,,0,-1" //disable bad spawns
				"OnMapSpawn" "spawnbot_ambush,SetTeam,2,0.01,-1"
				"OnMapSpawn" "spawnbot_ambush,Enable,,10,-1"  		 

				"OnMapSpawn" "move_rope,Kill,,0,-1"
				"OnMapSpawn" "keyframe_rope,Kill,,0,-1"
				"OnMapSpawn" "trigger_soundscape,Kill,,0,-1"
				"OnMapSpawn" "bombpath*,Kill,,0,-1"
				"OnMapSpawn" "func_respawnroomvisualizer,Kill,,0,-1"
				
		
				"OnMapSpawn" "wave_start_relay*,AddOutput,OnTrigger spawnbarrier*:Disable:0:-1"
				"OnMapSpawn" "wave_finished_relay,AddOutput,OnTrigger spawnbarrier*:Enable:0:-1"
				"OnMapSpawn" "antispawncamp,ForceSpawn,,0.1,-1"

				
				"OnMapSpawn" "hint,AddOutput,display_text test,10,-1" //change annotation text to test 10s after map spawn
				
				"OnMapSpawn" "tankpath1_1,AddOutput,OnPass red_tank_relay:Trigger:0:-1"
		
			}
            NoFixup 1
			logic_relay //trigger this to kill all players and buildings
			{
				"targetname" "kill_relay"
				"OnTrigger" "obj_dispenser,RemoveHealth,5000,0,-1"
				"OnTrigger" "obj_sentrygun,RemoveHealth,5000,0,-1"
				"OnTrigger" "obj_teleporter,RemoveHealth,5000,0,-1"
				"OnTrigger" "player,SetHealth,-10000,0,-1"
			}
            NoFixup 1
			logic_relay //trigger this to lose
			{
				"origin" "0 0 0"
				"targetname" "redwin_relay"
				"OnTrigger" "bots_win_red,RoundWin,,0,-1"
				"OnTrigger" "pit_explosion_wav,PlaySound,,0,-1" //map dependent
				"OnTrigger" "failuresound,PlaySound,,0,-1" //map dependent
			}	
            NoFixup 1
			game_round_win //do not interact with this
			{
				"origin" "0 0 0"
				"TeamNum" "2"
				"targetname" "bots_win_red"
				"switch_teams" "0"
				"force_map_reset" "1"
				"classname" "game_round_win"
			}
			ambient_generic
			{
				"targetname" "failuresound"
				"health" "10"
				"message" "vo/announcer_failure.mp3"
				"pitch" "100"
				"pitchstart" "100"
				"radius" "20000"
				"spawnflags" "49"
				"origin" "0 0 0"
			}
            logic_relay
            {
                "targetname" "pitstop_relay_one"
                "OnTrigger" "hint_pitstop,Show,,0,-1"
                "OnTrigger" "ambulancetank,SetSpeed,0,0,-1"
                "OnTrigger" "cart_area,Disable,,0.05,-1"
            }
            logic_relay
            {
                "targetname" "pitstop_relay_two"
                "OnTrigger" "hint_pitstop,Show,,0,-1"
                "OnTrigger" "ambulancetank,SetSpeed,0,0,-1"
                "OnTrigger" "cart_area,Disable,,0.05,-1"
            }
            logic_relay
            {
                "targetname" "pitstop_relay_three"
                "OnTrigger" "hint_pitstop,Show,,0,-1"
                "OnTrigger" "ambulancetank,SetSpeed,0,0,-1"
                "OnTrigger" "cart_area,Disable,,0.05,-1"
            }
            logic_relay
            {
                "targetname" "pitstop_relay_four"
                "OnTrigger" "hint_pitstop,Show,,0,-1"
                "OnTrigger" "ambulancetank,SetSpeed,0,0,-1"
                "OnTrigger" "cart_area,Disable,,0.05,-1"
            }
            logic_relay
            {
                "targetname" "barrier_1_relay"
                "OnTrigger" "player,$displaytextcenter,The barrier is down! Payload health restored.,0,-1"
                "OnTrigger" "redspawn_biome1,Disable,,0,-1"
				"OnTrigger" "redspawn_front1,Disable,,0,-1"
				"OnTrigger" "redspawn_front2,Disable,,0,-1"
				"OnTrigger" "redspawn_tunnel1,Disable,,0,-1"
                "OnTrigger" "redspawn_biome2,Enable,,0,-1"
				"OnTrigger" "redspawn_tunnel2,Enable,,0,-1"
                "OnTrigger" "barrier1*,Disable,,0,-1"
				"OnTrigger" "fieldprotection_front,Disable,,0,-1"
				"OnTrigger" "player,$removecond,51,0.05,-1"
				"OnTrigger" "fieldprotection_mid,Disable,0,0,-1"
				"OnTrigger" "fieldprotection_mid,Enable,0,0.2,-1"
                "OnTrigger" "ambulancetank,AddHealth,99999,0,-1"
                "OnTrigger" "pitstop_relay_one,Disable,,0.01,-1"
                "OnTrigger" "cart_area,Enable,,0.05,-1"
            }
            logic_relay
            {
                "targetname" "barrier_2_relay"
                "OnTrigger" "player,$displaytextcenter,The barrier is down! Payload health restored.,0,-1"
                "OnTrigger" "redspawn_front2,Disable,,0,-1"
				"OnTrigger" "redspawn_tunnel2,Disable,,0,-1"
                "OnTrigger" "redspawn_biome2,Disable,,0,-1"
                "OnTrigger" "redspawn_mid1,Enable,,0,-1"
                "OnTrigger" "redspawn_mid2,Enable,,0,-1"
                "OnTrigger" "redspawn_mid3,Enable,,0,-1"
                "OnTrigger" "barrier2*,Disable,,0,-1"
				"OnTrigger" "addtime,Enable,,0,-1"
				"OnTrigger" "addtime,Trigger,,0.01,-1"
				"OnTrigger" "player,$removecond,51,0.05,-1"
				"OnTrigger" "fieldprotection_mid,Disable,,0,-1"
				"OnTrigger" "fieldprotection_third,Disable,0,0,-1"
				"OnTrigger" "fieldprotection_third,Enable,0,0.2,-1"
                "OnTrigger" "ambulancetank,AddHealth,99999,0,-1"
                "OnTrigger" "pitstop_relay_two,Disable,,0.01,-1"
                "OnTrigger" "cart_area,Enable,,0.05,-1"
            }
            logic_relay
            {
                "targetname" "barrier_3_relay"
                "OnTrigger" "player,$displaytextcenter,The barrier is down! Payload health restored.,0,-1"
                "OnTrigger" "redspawn_mid1,Disable,,0,-1"
                "OnTrigger" "redspawn_mid2,Disable,,0,-1"
                "OnTrigger" "redspawn_mid3,Disable,,0,-1"
                "OnTrigger" "redspawn_top,Enable,,0,-1"
                "OnTrigger" "redspawn_close,Enable,,0,-1"
				"OnTrigger" "player,$removecond,51,0.05,-1"
                "OnTrigger" "barrier3*,Disable,,0,-1"
				"OnTrigger" "addtime,Enable,,0,-1"
				"OnTrigger" "addtime,Trigger,,0.01,-1"
				"OnTrigger" "fieldprotection_third,Disable,,0,-1"
                "OnTrigger" "ambulancetank,AddHealth,99999,0,-1"
                "OnTrigger" "pitstop_relay_three,Disable,,0.01,-1"
                "OnTrigger" "cart_area,Enable,,0.05,-1"
            }
            logic_relay
            {
                "targetname" "barrier_final_relay"
                "OnTrigger" "pitstop_relay_four,Disable,,0.01,-1"
                "OnTrigger" "cart_area,Enable,,0.05,-1"
            }
			logic_relay
			{
				"targetname" "addtime"
				"OnTrigger" "player,$DisplayTextChat,Extra time has been awarded!,0,-1"
				"OnTrigger" "player,$PlaySoundToSelf,Hud.PointCaptured,0,-1"
				"OnTrigger" "minutehand,add,2,0,-1"
				"OnTrigger" "!self,Disable,,0,-1"
			}
			logic_relay
			{
				"targetname" "hurryup_relay"
				"ontrigger" "player,$playsoundtoself,misc/doomsday_lift_warning.wav,0,-1"
				"ontrigger" "hurryup_music,playsound,0,0,-1"
				"ontrigger" "player,$playsoundtoself,vo/announcer_ends_60sec.mp3,0,-1"
				"ontrigger" "player,$playsoundtoself,vo/announcer_ends_5sec.mp3,55,-1"
				"ontrigger" "player,$$playsoundtoself,vo/announcer_ends_4sec.mp3,56,-1"
				"ontrigger" "player,$$playsoundtoself,vo/announcer_ends_3sec.mp3,57,-1"
				"ontrigger" "player,$$playsoundtoself,vo/announcer_ends_2sec,58,-1"
				"ontrigger" "player,$$playsoundtoself,vo/announcer_ends_1sec,59,-1"
			}
			ambient_generic
			{
				"targetname" "hurryup_music"
				"health" "10"
				"message" "graybossfinale.mp3"
				"spawnflags" "17"
			}
			ambient_generic
			{
				"targetname" "hurryup_music"
				"health" "10"
				"message" "graybossfinale.mp3"
				"spawnflags" "17"
			}
		}

        barriers //spawn blocker
		{
			NoFixup 1
			func_forcefield
			{
				
                "disablereceiveshadows" "0"
                "origin" "-228 -1088 758.5"
                "renderamt" "255"
                "rendercolor" "255 255 255"
                "renderfx" "0"
                "rendermode" "10"
                "TeamNum" "2"
                "targetname" "spawnbarrierA1"
				// "parentname" "spawnbarrierA"
                "mins" "-204 -8 -465"
                "maxs" "204 8 465"
				"StartDisabled" "0"
			}		
			prop_dynamic //prop for show
			{
				
				"targetname" "spawnbarrierA"
				"angles" "0 0 0"
				"DisableBoneFollowers" "1"
				"disablereceiveshadows" "1"
				"model" "models/props_doomsday/dd_woodfence_256.mdl"
				"disableshadows" "1"
				"ExplodeDamage" "0"
				"ExplodeRadius" "0"
				"fademaxdist" "0"
				"fademindist" "-1"
				"fadescale" "1"
				"MaxAnimTime" "10"
				"maxdxlevel" "0"
				"MinAnimTime" "5"
				"mindxlevel" "0"
				"modelscale" "1.5"
				"PerformanceMode" "0"
				"pressuredelay" "0"
				"RandomAnimation" "0"
				"renderamt" "0"
				"renderfx" "0"  
				"rendermode" "0"
				"SetBodyGroup" "0"
				"skin" "0" //set to 1 for red traincar, many props separate different variants this way
				"CollisionGroup" "0"
				"solid" "0"
				"spawnflags" "0"
				"StartDisabled" "0"
				"origin" "-200 -1080 420.652"	
			}
            func_forcefield
			{
				
                "disablereceiveshadows" "0"
                "origin" "1429.75 -377 1063.5"
                "renderamt" "255"
                "rendercolor" "255 255 255"
                "renderfx" "0"
                "rendermode" "10"
                "TeamNum" "2"
                "targetname" "spawnbarrierB1"
				// "parentname" "spawnbarrierA"
                "mins" "-8.5 -146.5 -984.5"
                "maxs" "8.5 146.5 984.5"
				"StartDisabled" "0"
			}		
			prop_dynamic //prop for show
			{
				
				"targetname" "spawnbarrierB"
				"angles" "0 90 0"
				"DisableBoneFollowers" "1"
				"disablereceiveshadows" "1"
				"model" "models/props_coalmines/wood_fence_256.mdl"
				"disableshadows" "1"
				"ExplodeDamage" "0"
				"ExplodeRadius" "0"
				"fademaxdist" "0"
				"fademindist" "-1"
				"fadescale" "1"
				"MaxAnimTime" "10"
				"maxdxlevel" "0"
				"MinAnimTime" "5"
				"mindxlevel" "0"
				"modelscale" "1.5"
				"PerformanceMode" "0"
				"pressuredelay" "0"
				"RandomAnimation" "0"
				"renderamt" "0"
				"renderfx" "0"  
				"rendermode" "0"
				"SetBodyGroup" "0"
				"skin" "0" //set to 1 for red traincar, many props separate different variants this way
				"CollisionGroup" "0"
				"solid" "0"
				"spawnflags" "0"
				"StartDisabled" "0"
				"origin" "1440 -504 392"	
			}	
		}

        station
		{
			NoFixup 1
			prop_dynamic //upgrade station
			{
				"targetname" "upgradestation"
				"angles" "0 0 0"
				"DisableBoneFollowers" "0"
				"disablereceiveshadows" "0"
				"disableshadows" "1"
				"ExplodeDamage" "0"
				"ExplodeRadius" "0"
				"fademaxdist" "0"
				"fademindist" "-1"
				"fadescale" "1"
				"MaxAnimTime" "10"
				"maxdxlevel" "0"
				"MinAnimTime" "5"
				"mindxlevel" "0"
				"model" "models/props_mvm/mvm_upgrade_blu.mdl"
				"modelscale" "1"
				"PerformanceMode" "0"
				"pressuredelay" "0"
				"RandomAnimation" "0"
				"renderamt" "255"
				"renderfx" "0"
				"rendermode" "0"
				"SetBodyGroup" "0"
				"skin" "0"
				"solid" "0"
				"spawnflags" "0"
				"origin" "0 0 0"
			}
			func_upgradestation
			{
				"mins" "-105 -100 0" 
				"maxs" "105 100 242"
			}
			prop_dynamic
			{
				
				"targetname" "shopcollision"
				"angles" "0 -90 0"
				"DisableBoneFollowers" "1"
				"disablereceiveshadows" "1"
				"model" "models/props_vehicles/train_flatcar_container.mdl"
				"disableshadows" "1"
				"ExplodeDamage" "0"
				"ExplodeRadius" "0"
				"fademaxdist" "0"
				"fademindist" "-1"
				"fadescale" "1"
				"MaxAnimTime" "10"
				"maxdxlevel" "0"
				"MinAnimTime" "5"
				"mindxlevel" "0"
				"modelscale" "1"
				"PerformanceMode" "0"
				"pressuredelay" "0"
				"RandomAnimation" "0"
				"renderamt" "0"
				"renderfx" "0"
				"rendermode" "10"
				"SetBodyGroup" "0"
				"skin" "0"
				"CollisionGroup" "5"
				"solid" "6"
				"spawnflags" "0"
				"StartDisabled" "0"
				"origin" "0 0 0"	
			}		
		}

		RotateShieldLvL1_Red
		{
			OnSpawnOutput
			{
				Target "rotate"
				Action "Start"
			}
			OnSpawnOutput
			{
				Target "rotate"
				Action "Start"
			}
			OnSpawnOutput
			{
				Target "rotate_position"
				Action "Trigger"
			}
			OnSpawnOutput
			{
				Target "rotate"
				Action "SetParent"
				Param ""
			}
			OnSpawnOutput
			{
				Target "popscript"
				Action "$registerShieldLvl1"
				param "projectile_shield"
				Delay 0.1
			}
			logic_relay
			{
				"targetname" "rotate_position"
				"spawnflags" "2"

				"OnTrigger" "rotate,$TeleportToEntity,!activator,0,-1"
				"OnTrigger" "!self,Trigger,,0.01,-1"
			}
			entity_medigun_shield
			{
				"parentname" "rotate"
				"targetname" "projectile_shield"
				"origin" "150 0 0"
				"spawnflags" "1"
				"teamnum" "2"
				"skin" "2"
			}
			func_rotating
			{
				"targetname" "rotate"
				"origin" "0 0 0"

				"mins" "-0.1 -0.1 -0.1"
				"maxs" "0.1 0.1 0.1"

				"dmg" "0"
				"fanfriction" "100" 
				"maxspeed" "60"
				"spawnflags" "64"
				"volume" "0"
			}
		}

		RotateShieldLvL2_Red
		{
			OnSpawnOutput
			{
				Target "rotate"
				Action "Start"
			}
			OnSpawnOutput
			{
				Target "rotate"
				Action "Start"
			}
			OnSpawnOutput
			{
				Target "rotate_position"
				Action "Trigger"
			}
			OnSpawnOutput
			{
				Target "rotate"
				Action "SetParent"
				Param ""
			}
			OnSpawnOutput
			{
				Target "popscript"
				Action "$registerShieldLvl2"
				param "projectile_shield"
				Delay 0.1
			}
			logic_relay
			{
				"targetname" "rotate_position"
				"spawnflags" "2"

				"OnTrigger" "rotate,$TeleportToEntity,!activator,0,-1"
				"OnTrigger" "!self,Trigger,,0.01,-1"
			}
			entity_medigun_shield
			{
				"parentname" "rotate"
				"targetname" "projectile_shield"
				"origin" "150 0 0"
				"spawnflags" "3"
				"teamnum" "2"
				"skin" "2"
			}
			func_rotating
			{
				"targetname" "rotate"
				"origin" "0 0 0"

				"mins" "-0.1 -0.1 -0.1"
				"maxs" "0.1 0.1 0.1"

				"dmg" "0"
				"fanfriction" "100" 
				"maxspeed" "60"
				"spawnflags" "64"
				"volume" "0"
			}
		}

		FakeIcon
		{
			NoFixup 1
			logic_auto
			{
				"OnMapSpawn" "!self,Kill,,0,-1"
				"targetname" "yes"
			}
		}

        ambulance_tank // inspired by royal
        {
            Nofixup 1
            prop_dynamic
            {
                "targetname" "ambulance"
                "angles" "0 0 0"
                "physdamagescale" "1.0"
                "model" "models/workshop/player/items/medic/taunt_the_mannbulance/taunt_the_mannbulance.mdl"
                "modelscale" "3"
                "skin" "1"
                "solid" "0"
            }
            prop_dynamic
			{
				"targetname" "fella"
                "parentname" "ambulance"
				"spawnflags" "0"
				"solid" "0"
				"physdamagescale" "1.0"
				"model" "models/bots/bot_worker/bot_worker.mdl"
				"origin" "16 0 52"
				"angles" "0 0 0"
				"DefaultAnim" "idle"
				"skin" "1"
			}
            prop_dynamic
			{
				"targetname" "boonie"
                "parentname" "ambulance"
				"model" "models/workshop/player/items/medic/fall17_battle_boonie/fall17_battle_boonie.mdl"
				"skin" "1"
				"origin" "12 0 -43"
				"angles" "0 0 0"
				"modelscale" "1.75"
				"solid" "0"
			}
            func_tracktrain
			{
				"dmg" "0"
				"height" "15"						//change this number to adjust the height of the paylaod from the ground, if you want people to jump on the payload, it shoudld be 72 units from the ground (this does not always accurately reflect the value shown here)
				"ManualAccelSpeed" "70"
				"ManualDecelSpeed" "150"
				"ManualSpeedChanges" "1"
				"MoveSound" "Cart.Roll"
				"MoveSoundMaxPitch" "200"
				"MoveSoundMaxTime" "0"
				"MoveSoundMinPitch" "60"
				"MoveSoundMinTime" "0"
				"orientationtype" "1"
				"origin" "0 0 16"
				"renderamt" "255"
				"rendercolor" "255 255 255"
				"renderfx" "0"
				"rendermode" "0"
				"spawnflags" "514"
				"speed" "0"							//this makes the cart stationary when it spawns
				"StartSound" "Cart.RollStart"
				"startspeed" "90"					//change this number to adjust the maximum speed of the payload, actual speed is determined by logic_case 
				"StopSound" "Cart.RollStop"
				"target" "tankpath_a1" 			//change the FIXME to the name of the path_track node you want to spawn at, different maps will have different names, if you are using a custom tank path you can use the name of the path to make it spawn there
				"targetname" "cart_tracktrain"
				"velocitytype" "1"
				"volume" "10"
				"wheels" "20"
				
				"mins" "-36 -25 -54"
				"maxs" "52 25 14"
			}
			// phys_constraint													//this is required, without this entity the model will be disjointed from the payload itself
			// {
			// 	"classname" "phys_constraint"
			// 	"angles" "0 270 0"
			// 	"attach1" "cart_tracktrain"
			// 	"attach2" "ambulance"
			// 	"forcelimit" "0"
			// 	"spawnflags" "1"
			// 	"targetname" "cart_constraint"
			// 	"teleportfollowdistance" "0"
			// 	"torquelimit" "0"
			// 	"origin" "-38 72 -18"
			// }
			trigger_capture_area
			{
				"area_cap_point" "cart_point"
				"area_time_to_cap" "999999"			//this is a very high number so that the control point cant be captured at any point, if it is capped, the payload will not move 
				"parentname" "ambulance"
				"StartDisabled" "0"
				"targetname" "cart_area"
				"team_cancap_2" "0"					//this makes it so that red team cannot push the payload
				"team_cancap_3" "1"
				"team_numcap_2" "1"					//you cant "finish" capturing a payload, so these keyvalues are ineffective
				"team_numcap_3" "1"
				"team_spawn_2" "0"
				"team_spawn_3" "0"
				"team_startcap_2" "1"				//this also is ineffective, as the logic_case entity is used to affect the cart speed depending on how many blu players are on it
				"team_startcap_3" "1"
				
				"OnNumCappersChanged" "cart_remap,InValue,,0,-1"
				"OnNumCappersChanged" "cart_watcher,SetNumTrainCappers,,0,-1"			
				"mins" "-256 -256 -256"				//trigger_capture_area and dispenser_touch_trigger should have the same mins and maxs
				"maxs" "256 256 256"
			}
			dispenser_touch_trigger
			{
				"parentname" "ambulance"
				"targetname" "cart_dispenser_trigger"			
				"mins" "-256 -256 -256"				//trigger_capture_area and dispenser_touch_trigger should have the same mins and maxs
				"maxs" "256 256 256"
			}
			mapobj_cart_dispenser									//spawning the payload in waveschedule will cause the dispenser to explode for some reason
			{
				"parentname" "ambulance"
				"spawnflags" "12"
				"targetname" "cart_dispenser"
				"TeamNum" "3"
				"$ratemult" "4"
				"touch_trigger" "cart_dispenser_trigger"
				"origin" "-31 -12 56"
			}
            env_spark
			{
				"angles" "0 0 0"
				"Magnitude" "1"
				"MaxDelay" "0"
				"parentname" "ambulance"
				"spawnflags" "0"
				"targetname" "cart_spark_left"
				"TrailLength" "2"
				"origin" "0.080101 14 -36"
			}
			env_spark
			{
				"angles" "0 0 0"
				"Magnitude" "1"
				"MaxDelay" "0"
				"parentname" "ambulance"
				"spawnflags" "0"
				"targetname" "cart_spark_right"
				"TrailLength" "2"
				"origin" "0.080101 -14 -36"
			}
			team_control_point								//this is a hidden control point that comes with the payload
			{												//you must have atleast one control point on the map in order for the trigger_capture_area to work, otherwise the payload will not operate in any capacity
				"classname" "team_control_point"			//the purpose of the placeholder control point is set here to enable the trigger_capture_area
				"angles" "0 0 0"
				"point_default_owner" "2"
				"point_group" "0"
				"point_index" "0"							//if you want to have multiple payloads on the map at the same time, make sure to change the index so each control point has a unique index, again having more than eight unique control points will crash the server
				"point_printname" "payload"
				"point_start_locked" "0"
				"point_warn_on_cap" "2"
				"point_warn_sound" "ControlPoint.CaptureWarn"
				"random_owner_on_restart" "0"
				"spawnflags" "14"							//this hides the model, disables sounds and disables shadows
				"StartDisabled" "0"
				"targetname" "cart_point"
				"team_bodygroup_0" "3"
				"team_bodygroup_2" "1"
				"team_bodygroup_3" "1"
				"team_icon_0" "sprites/obj_icons/icon_obj_neutral"
				"team_icon_2" "hud/leaderboard_class_tank_regen"
				"team_icon_3"  "hud/leaderboard_class_tank_regen"
				"team_model_0" "models/effects/cappoint_hologram.mdl"
				"team_model_2" "models/effects/cappoint_hologram.mdl"
				"team_model_3" "models/effects/cappoint_hologram.mdl"
				"team_previouspoint_3_0" "cart_point"		//this is required so the payload isnt "locked"
				"team_timedpoints_2" "0"
				"team_timedpoints_3" "0"
				"origin" "10 0 -42"
			}
			logic_case
			{
				"Case01" "0"								//you can add more cases here to raise the maximum number of players that can affect the payload, by default max speed is reached at three players
				"Case02" "1"								//these Case01, Case02, etc... keyvalues represents the outputs sent depending on how many players are pushing the payload at any given time
				"Case03" "2"
				"Case04" "3"
				"targetname" "cart_case"

                "OnCase01" "ambulancetank,SetSpeed,0,0,-1"			//change the first number here to adjust the speed per case as a percentage of "startspeed" defined in func_tracktrain, does not go below -1 or above 1, negative numbers roll backwards
				"OnCase02" "ambulancetank,SetSpeed,50,0,-1"
				"OnCase03" "ambulancetank,SetSpeed,75,0,-1"
				"OnCase04" "ambulancetank,SetSpeed,100,0,-1"
				
				"OnCase01" "cart_tracktrain,SetSpeedDirAccel,0,0,-1"			//change the first number here to adjust the speed per case as a percentage of "startspeed" defined in func_tracktrain, does not go below -1 or above 1, negative numbers roll backwards
				"OnCase02" "cart_tracktrain,SetSpeedDirAccel,0.5,0,-1"
				"OnCase03" "cart_tracktrain,SetSpeedDirAccel,0.75,0,-1"
				"OnCase04" "cart_tracktrain,SetSpeedDirAccel,1.0,0,-1"
				"OnCase01" "cart_spark_left,StopSpark,,0,-1"
				"OnCase01" "cart_spark_right,StopSpark,,0,-1"
				"OnCase02" "cart_spark_right,StopSpark,,0,-1"
				"OnCase02" "cart_spark_left,StopSpark,,0,-1"
				"OnCase03" "cart_spark_left,StopSpark,,0,-1"
				"OnCase03" "cart_spark_right,StopSpark,,0,-1"
				"OnCase04" "cart_spark_right,StopSpark,,0,-1"
				"OnCase04" "cart_spark_left,StopSpark,,0,-1"
				"OnCase01" "cart_particles,Stop,,0,-1"
				"OnCase02" "cart_particles,Start,,0,-1"
				"OnCase03" "cart_particles,Start,,0,-1"
				"OnCase04" "cart_particles,Start,,0,-1"
				
				"origin" "10 0 62"
			}
			math_remap
			{
				"in1" "0"									//make sure you also change the numbers if you introduce more cases in logic_case, in1/out1 represent the minimum amount of players on the cart and out1/out2 represents the maximum
				"in2" "3"									//if you want to raise the maximum amount of players on the cart, you would have to change the keyvalues here and add more cases to logic_case 
				"out1" "0"
				"out2" "3"
				"spawnflags" "2"
				"targetname" "cart_remap"
				
				"OutValue" "cart_case,InValue,,0,-1"
				
				"origin" "-14 0 62"
			}
			filter_activator_class									//this filter is used by the trigger_hurt entity to not affect players
			{
				"filterclass" "player"
				"Negated" "1"
				"targetname" "cart_filter_noplayers"
				"origin" "-70 72 -18"
			}
			team_control_point_master								//this entity is required to enable the control point
			{
				"caplayout" "3, 0 1 2"
				"cpm_restrict_team_cap_win" "2"						//probably ineffective
				"custom_position_x" "0.4"
				"custom_position_y" "-1"
				"partial_cap_points_rate" "0"						
				"score_style" "1"
				"switch_teams" "0"
				"targetname" "cart_master"
				"team_base_icon_2" "sprites/obj_icons/icon_base_red"
				"team_base_icon_3" "sprites/obj_icons/icon_base_blu"
				"origin" "-62 -40 -10"
			}
			team_train_watcher
			{
				"classname" "team_train_watcher"
				"goal_node" "tankpath_a41"							//this should be the final path_track node of the desired track, FIXME by default as different maps will have different names
				"hud_min_speed_level_1" "1"
				"hud_min_speed_level_2" "60"
				"hud_min_speed_level_3" "80"
				"linked_cp_1" "cart_point"							//placeholder control point set here to enable the trigger_capture_area
				"linked_pathtrack_1" "tankpath_a41"				//set this to the final path_track node, same as goal_node, to prevent the administrator from saying voice lines prematurely
				"speed_forward_modifier" "1"
				"start_node" "tank_path_1"						//this should be the path_track node of where the payload spawns, FIXME by default as different maps will have different names
				"targetname" "cart_watcher"
				"train" "cart_tracktrain"
				"train_can_recede" "1"								//set this to 0 to disable payload rolling backwards, 1 to enable
				
				"OnTrainStartRecede" "ambulancetank,SetSpeed,-10,0,-1"
				"OnTrainStartRecede" "cart_tracktrain,SetSpeedDirAccel,-0.1,0,-1"
				"OnTrainStartRecede" "cart_spark_left,StartSpark,,0,-1"
				"OnTrainStartRecede" "cart_spark_right,StartSpark,,0,-1"
				
				"origin" "-62 -56 -10"
			}
            training_annotation // Pitstop
			{
				"targetname" "hint_pitstop"
				"display_text" "Destroy the barrier bot to advance!"
				"lifetime" "10"
				"origin" "150 0 0"
			}
            OnSpawnOutput				//very important to keep these three outputs otherwise the payload will not function
			{
				Target cart_area
				Action SetControlPoint 
				Param cart_point
			}
			OnSpawnOutput
			{
				Target cart_watcher 
				Action RoundActivate 
			}
            OnSpawnOutput
			{
				Target ambulance
				Action SetParent
				Param "!activator"
			}
            
            ////////////////////////////////////////////editable output section//////////////////////////////////////////// 
			//note that editing outputs for the payload is very different, as you have to use OnSpawnOutput blocks, and use AddOutputs on specific path_track nodes in order to make things happen
			
			OnSpawnOutput 
			{
				Target "!activator"
				Action "AddOutput"
				Param "OnHealthBelow40Percent fella:SetAnimation:panic:0:-1"
			}
            OnSpawnOutput				
			{							
				Target tankpath_a3
				Action AddOutput
				Param "OnPass !activator:SetSpeed:0:0:-1"
			}
            OnSpawnOutput				
			{							
				Target tankpath_a7
				Action AddOutput
				Param "OnPass barrierguard1:Enable::0:-1"
			}
            OnSpawnOutput				
			{							
				Target tankpath_a7
				Action AddOutput
				Param "OnPass pitstop_relay_one:Trigger::0:-1"
			}
            OnSpawnOutput				
			{							
				Target tankpath_a15
				Action AddOutput
				Param "OnPass barrierguard2:Enable::0:-1"
			}
            OnSpawnOutput				
			{							
				Target tankpath_a15
				Action AddOutput
				Param "OnPass pitstop_relay_two:Trigger::0:-1"
			}
            OnSpawnOutput				
			{							
				Target tankpath_a23
				Action AddOutput
				Param "OnPass pitstop_relay_three:Trigger::0:-1"
			}
            OnSpawnOutput				
			{							
				Target tankpath_a23
				Action AddOutput
				Param "OnPass barrierguard3:Enable::0:-1"
			}
            OnSpawnOutput				
			{							
				Target tankpath_a36
				Action AddOutput
				Param "OnPass hatchspawn:Enable::0:-1"
			}
             OnSpawnOutput				
			{							
				Target tankpath_a40
				Action AddOutput
				Param "OnPass pitstop_relay_four:Trigger::0:-1"
			}
            OnSpawnOutput				//this makes blu team win when the payload reaches the last track, commented out as a more exciting payload deploying animation is provided
			{							
				Target tankpath_a41
				Action AddOutput
				Param "OnPass boss_deploy_relay:Trigger::0.6:-1"
			}
        }

        spawner
		{
			NoFixup 1
			prop_dynamic
			{
				"targetname" "spawnprop1"
				"classname" "prop_dynamic"
				"model" "models/props_mvm/robot_spawnpoint.mdl"
				"DefaultAnim" "idle"
				"disableshadows" "1"
				"DisableBoneFollowers" "1"
				"solid" "0"
				"spawnflags" "0"
			}
			prop_dynamic
			{
				"targetname" "spawnprop2"
				"classname" "prop_dynamic"
				"model" "models/buildables/teleporter_light.mdl"
				"DefaultAnim" "running"
				"rendercolor" "0 0 0"
				"disableshadows" "1"
				"DisableBoneFollowers" "1"
				"solid" "0"
				"spawnflags" "0"
			}
		}

        blockers
        {
            Nofixup 1
            // First barrier
            func_forcefield
            {
                "disablereceiveshadows" "0"
                "effects" "0"
                "origin" "104 1316 356"
                "renderamt" "255"
                "rendercolor" "255 255 255"
                "renderfx" "0"
                "rendermode" "0"
                "StartDisabled" "0"
                "mins" "-176 -4 -164"
                "maxs" "176 4 164"
                "targetname" "barrier1"
                "TeamNum" "2"
            }  
			func_forcefield
            {
                "disablereceiveshadows" "0"
                "effects" "0"
                "origin" "-748.01 1316 341.08"
                "renderamt" "255"
                "rendercolor" "255 255 255"
                "renderfx" "0"
                "rendermode" "0"
                "StartDisabled" "0"
                "mins" "-98 -4 -82.5"
                "maxs" "98 4 82.5"
                "targetname" "barrier1"
                "TeamNum" "2"
            } 
			func_forcefield
            {
                "disablereceiveshadows" "0"
                "effects" "0"
                "origin" "-1024 1104 368"
                "renderamt" "255"
                "rendercolor" "255 255 255"
                "renderfx" "0"
                "rendermode" "0"
                "StartDisabled" "0"
                "mins" "-4 -176 -112"
                "maxs" "4 176 112"
                "targetname" "barrier1"
                "TeamNum" "2"
            }  
            prop_dynamic
            {
                "angles" "0 180 0"
                "fademindist" "-1"
                "fadescale" "1"
                "MaxAnimTime" "10"
                "MinAnimTime" "5"
                "model" "models/props_mvm/reversemvm_redwall_696x337.mdl"
                "modelscale" "1.0"
                "renderamt" "255"
                "rendercolor" "255 255 255"
                "skin" "0"
                "solid" "0"
                "targetname" "barrier1_model"
                "origin" "100 1328 336"         
            }
			trigger_add_tf_player_condition
			{
				"targetname" "fieldprotection_front"
				"origin" "-1288 1112 344"
				"mins" "-248 -208 -112"
				"maxs" "248 208 112"
				"spawnflags" "1"
				"filtername" "filter_red"
				"condition" "51"
				"duration" "-1"
			}
			trigger_add_tf_player_condition
			{
				"targetname" "fieldprotection_front"
				"origin" "104 1640 356"
				"mins" "-176 -312 -115.5"
				"maxs" "176 312 115.5"
				"spawnflags" "1"
				"filtername" "filter_red"
				"condition" "51"
				"duration" "-1"
			}
            // Second barrier
            func_forcefield
            {
                "disablereceiveshadows" "0"
                "effects" "0"
                "origin" "-444 3825.5 436"
                "renderamt" "255"
                "rendercolor" "255 255 255"
                "renderfx" "0"
                "rendermode" "0"
                "StartDisabled" "0"
                "mins" "-1148 -2 -180"
                "maxs" "1148 2 180"
                "targetname" "barrier2"
                "TeamNum" "2"
            } 
			func_forcefield
            {
                "disablereceiveshadows" "0"
                "effects" "0"
                "origin" "-1598 3668 648"
                "renderamt" "255"
                "rendercolor" "255 255 255"
                "renderfx" "0"
                "rendermode" "0"
                "StartDisabled" "0"
                "mins" "-22 -148 -104"
                "maxs" "22 148 104"
                "targetname" "barrier2"
                "TeamNum" "2"
            } 
            prop_dynamic
            {
                "angles" "0 180 0"
                "fademindist" "-1"
                "fadescale" "1"
                "MaxAnimTime" "10"
                "MinAnimTime" "5"
                "model" "models/props_mvm/reversemvm_redwall_696x337.mdl"
                "modelscale" "1.0"
                "renderamt" "255"
                "rendercolor" "255 255 255"
                "skin" "0"
                "solid" "0"
                "targetname" "barrier2_model"
                "origin" "64 3824 352"         
            } 
			trigger_add_tf_player_condition
			{
				"targetname" "fieldprotection_mid"
				"origin" "-1351.5 2317.5 487"
				"mins" "-310.5 -243.5 -129"
				"maxs" "310.5 243.5 129"
				"spawnflags" "1"
				"filtername" "filter_red"
				"condition" "51"
				"duration" "-1"
			}
			trigger_add_tf_player_condition
			{
				"targetname" "fieldprotection_mid"
				"origin" "-188 4216 568"
				"mins" "-876 -384 -344"
				"maxs" "876 384 344"
				"spawnflags" "1"
				"filtername" "filter_red"
				"condition" "51"
				"duration" "-1"
			}
            // Third barrier
            func_forcefield
            {
                "disablereceiveshadows" "0"
                "effects" "0"
                "origin" "-1647 4588 366"
                "renderamt" "255"
                "rendercolor" "255 255 255"
                "renderfx" "0"
                "rendermode" "0"
                "StartDisabled" "0"
                "mins" "-2 -176 -110"
                "maxs" "2 176 110"
                "targetname" "barrier3"
                "TeamNum" "2"
            }  
			func_forcefield
            {
                "disablereceiveshadows" "0"
                "effects" "0"
                "origin" "-1424 4232 336"
                "renderamt" "255"
                "rendercolor" "255 255 255"
                "renderfx" "0"
                "rendermode" "0"
                "StartDisabled" "0"
                "mins" "-78 -2 -80"
                "maxs" "78 2 80"
                "targetname" "barrier3"
                "TeamNum" "2"
            }  
            prop_dynamic
            {
                "angles" "0 270 0"
                "fademindist" "-1"
                "fadescale" "1"
                "MaxAnimTime" "10"
                "MinAnimTime" "5"
                "model" "models/props_mvm/reversemvm_redwall_696x337.mdl"
                "modelscale" "1.0"
                "renderamt" "255"
                "rendercolor" "255 255 255"
                "skin" "0"
                "solid" "0"
                "targetname" "barrier3_model"
                "origin" "-1656 4496 328"     
            }
			trigger_add_tf_player_condition
			{
				"targetname" "fieldprotection_third"
				"origin" "-1472 4028 360"
				"mins" "-176 -196 -96"
				"maxs" "176 196 96"
				"spawnflags" "1"
				"filtername" "filter_red"
				"condition" "51"
				"duration" "-1"
			}    
        }

		filters_mini
		{
			NoFixup 1
			filter_activator_class
			{
				"targetname" "filter_sentrygun"
				"filterclass" "obj_sentrygun"
			}
		}

		test_mini
		{
			OnSpawnOutput
			{
				Target "triggerrefresh"
				Action Open
			}
			OnSpawnOutput
			{
				Target "convertmini"
				Action SetParent
				Param "!activator"
			}
			func_door
			{
				"targetname" "triggerrefresh"
				"rendermode" "10"
				"spawnflags" "4108"
				"speed" "1"
				"wait" "0.01"
				"onfullyclosed" "!self,open,,0,-1"
			}
			trigger_multiple
			{
				"targetname" "sentryDetect"
				"parentname" "triggerrefresh"
				"mins" "-96 -96 -96"
				"maxs" "96 96 96"
				"filtername" "filter_sentrygun"
				"spawnflags" "64"
				"onstarttouch" "convertmini,SetValueCompare,$$=?(!activator.m_bMiniBuilding == 1 && !activator.m_nSolidType > 0,1,0),0,-1"
			}
			logic_compare
			{
				"targetname" "convertmini"
				"comparevalue" "1"
				"onequalto" "!activator,SetParent,droneLocation,0.1,-1"
				"onequalto" "!activator,SetParentAttachment,head,0.15,-1"
				"onequalto" "!activator,$SetProp$m_iAmmoShells,99999999,0,-1" //gives them tons of ammo
				"onequalto" "!activator,$SetProp$m_iAmmoShells,99999999,5,-1" //gives them tons of ammo
				"onequalto" "!activator,$SetProp$m_nSolidType,0,0,-1" //stops them blocking the player, also used to detect if mini has been turned into a drone
				"onequalto" "!activator,$SetModelOverride,models/rcat/rcat_level2.mdl,0,-1" // sets model | make sure to precache
				"onequalto" "!activator,$SetProp$m_nSkin,1,0,-1"
			}
			prop_dynamic
			{
				"targetname" "droneLocation"
				// invisible engineer doomed to carry the drone for all eternity
				"model" "models/player/engineer.mdl"
				"origin" "40 -50 15"
				"disableshadows" "1"
				"rendermode" "9"
				"renderamt" "0"
			}
		}

		spawnsentry
		{
			NoFixup 1
			obj_sentrygun
			{
				"targetname" "turret1"
				"origin" "0 0 0"
				"teamnum" "2"
				"spawnflags" "10"
				"SolidToPlayer" "1"
				"defaultupgrade" "1"
				"modelscale" 1
			}
			OnSpawnOutput
            {
                Target "turret1"
                Action "sethealth"
                Param "99999"
			}
			OnSpawnOutput
			{
				Target "turret1"
				Action "$setmodeloverride"
				Param "models/buildables/sentry2_uber.mdl"
				Delay 0.01
			}
		}

		antispawncamp
		{
			NoFixup 1
			OnSpawnOutput
			{
				Target "ubersentry"
				Action "$setmodeloverride"
				Param "models/buildables/sentry1_uber.mdl"
				Delay 0.01
			}
			OnSpawnOutput
            {
                Target "ubersentry"
                Action "sethealth"
                Param "99999"
			}
			obj_sentrygun
			{
				"targetname" "ubersentry"
				"origin" "92 -1053 568"
				"angles" "22 94 0"
				"teamnum" "3"
				"spawnflags" "10"
			}
			obj_sentrygun
			{
				"targetname" "ubersentry"
				"origin" "1420 53 407"
				"angles" "36 -125 0"
				"teamnum" "3"
				"spawnflags" "10"
			}
		}

		textual_timer
		{
			nofixup 1
			OnSpawnOutput
			{
				Param 9

				Target minutehand
				Action SetValue
			}
			OnSpawnOutput
			{
				Param 30 

				Target secondhand
				Action SetValue
			}
			logic_relay
			{
				"targetname" "loserelay"
				"startdisabled" "1"
				"ontrigger" "bots_win_red,RoundWin,,2,-1"
				"ontrigger" "player,$DisplayTextChat,You lose homeboy!,2,-1"
				"ontrigger" "realtimer,cancelpending,,2,-1"
				"onspawn" "wave_start*,addoutput,ontrigger realtimer:trigger:0:-1,0,-1"
				"onspawn" "wave_finish*,addoutput,ontrigger realtimer:cancelpending:0:-1,0,-1"
				"onspawn" "bots_win,addoutput,onroundwin realtimer:cancelpending:0:-1,0,-1"
				"onspawn" "wave_finish*,addoutput,ontrigger loserelay:cancelpending:0:-1,0,-1"
			}

			NoFixup 1
			math_counter
			{
				"targetname" "minutehand"
				"max" "9999"
				"outvalue" "timerformat,$setkey$case01,,0,-1"
			//	"outValue" "player,$DisplayTextChat,,0,-1"
				"onhitmin" "loserelay,enable,,1,-1"
			}
			math_counter
			{
				"targetname" "secondhand"
				"max" "60"
				"outvalue" "timerformat,$setkey$case02,,0,-1"
				"outvalue" "zerocompare,setvaluecompare,,0,-1"
				"onhitmin" "loserelay,trigger,,0,-1"
				"onhitmin" "!self,setvalue,60,1,-1"
				"onhitmin" "minutehand,subtract,1,1,-1"
			}
			logic_compare
			{
				"targetname" "zerocompare"
				"comparevalue" "9"
				"onequalto" "timerformat,$setkey$case16,%:0%,0,-1"
				"ongreaterthan" "timerformat,$setkey$case16,%:%,0,-1"
			}
			logic_case
			{
				"targetname" "timerformat"
				"case16" "%:%"
				"ondefault" "timertext,$setkey$message,,0,-1"
				"ondefault" "timertext,display,0,0,-1"
			}
			game_text
			{
				"targetname" "timertext"
				"color" "65 155 255"
				"holdtime" "1"
				"spawnflags" "1"
                "channel" "2"
                "x" "0.48"
                "y" "-0.75"
			}
			logic_relay
			{
				"targetname" "realtimer"
				"spawnflags" "2"
				"ontrigger" "timerformat,$format,,0.01,-1"
				"ontrigger" "secondhand,subtract,1,0,-1"
				"ontrigger" "!self,trigger,,1,-1"
			}
		}

		namer
		{
			OnSpawnOutput
			{
				Target "!activator"
				Action AddOutput
				Param  "targetname torsogun"
				Delay 0.00
			}
			OnParentKilledOutput
			{
				Target "!activator"
				Action AddOutput
				Param "targetname "
			}
		}

		BossEntities
        {
            NoFixup 1
            KeepAlive 1
            OnSpawnOutput
			{
				Target scoutboss_relay
				Action FireUser1
			}
            OnSpawnOutput
			{
				Target "!activator"
				Action addoutput
				Param "targetname scoutbosstargetname"
			}
            OnParentKilledOutput
			{
				Target "!activator"
				Action addoutput
				Param "targetname "
			}
            logic_relay
            {
                "targetname" "scoutboss_relay"
                "OnUser1" "torsogun,$TeleportToEntity,origintargetT,0,-1"
                "OnUser1" "!self,FireUser1,,0.01,-1"
            }
        }

		givename1
		{
		    OnSpawnOutput
		    {
			    Target "!activator"
			    Action AddOutput
			    Param  "targetname bootbotR"
                Delay 0.00
		    }
		}

		givename2
		{
		    OnSpawnOutput
		    {
			    Target "!activator"
			    Action AddOutput
			    Param  "targetname bootbotL"
                Delay 0.00
		    }
		}

		titanfootl
        {
            OnSpawnOutput
			{
				Target origintargetFL
				Action SetParent
				Param !activator
			}
			OnSpawnOutput
			{
				Target origintargetFL
				Action SetParentAttachment
				Param foot_L
				Delay 0.03
			}
			info_target
			{
				"targetname" "origintargetFL"
			}
			logic_measure_movement
			{
				"measurereference" "origintargetFL"
				"measuretarget" "origintargetFL"
				"target" "bootbotL"
                "measuretype" "0"
				"targetreference" "origintargetFL"
			}
			OnSpawnOutput
			{
				Target "bootbotL"
				Action $SetProp$m_nSolidType
				Param 0
			}
			OnSpawnOutput
			{
				Target "origintargetFL"
				Action $setdata$m_vecOrigin
				Param "0 0 0"
				Delay 0.02
			}
        }

        titanfootr
        {
            OnSpawnOutput
			{
				Target origintargetFR
				Action SetParent
				Param !activator
			}
			OnSpawnOutput
			{
				Target origintargetFR
				Action SetParentAttachment
				Param foot_R
				Delay 0.01
			}
			info_target
			{
				"targetname" "origintargetFR"
			}
			logic_measure_movement
			{
				"measurereference" "origintargetFR"
				"measuretarget" "origintargetFR"
				"target" "bootbotR"
				"targetreference" "origintargetFR"
			}
			OnSpawnOutput
			{
				Target "bootbotR"
				Action $SetProp$m_nSolidType
				Param 0
			}
			OnSpawnOutput
			{
				Target "origintargetFR"
				Action $setdata$m_vecOrigin
				Param "0 0 0"
				Delay 0.02
			}
        }

		attach_thingy
		{
			OnSpawnOutput
			{
				Target origintargetT
				Action SetParent
				Param !activator
			}
			OnSpawnOutput
			{
				Target origintargetT
				Action SetParentAttachment
				Param back_lower
				Delay 0.01
			}
			info_target
			{
				"targetname" "origintargetT"
			}
			logic_measure_movement
			{
				"measurereference" "origintargetT"
				"measuretarget" "origintargetT"
				"target" "torsogun"
				"targetreference" "origintargetT"
			}
			OnSpawnOutput
			{
				Target "torsogun"
				Action $SetProp$m_nSolidType
				Param 0
			}
			OnSpawnOutput
			{
				Target "origintargetT"
				Action $setdata$m_vecOrigin
				Param "-61 0 386" //12 -15
				Delay 0.02
			}
		}

		BossDeathEntities
        {
            NoFixup 1
            KeepAlive 1
            OnParentKilledOutput
            {
                Target scout_death_relay
                Action Trigger
            }
            OnSpawnOutput
            {
                Target boss_death_anim
                Action SetPlaybackRate
                Param 0
            }
            logic_relay
            {
                "targetname" "scout_death_relay"
                "OnSpawn" "scoutmdl,Disable,,0,-1"
                "OnSpawn" "scoutmdl1,Disable,,0,-1"
                "OnSpawn" "scoutmdl2,Disable,,0,-1"
                "OnSpawn" "scoutmdl3,Disable,,0,-1"
                "OnTrigger" "boss_death_anim,Enable,,0,-1"
                "OnTrigger" "boss_death_anim,SetPlaybackRate,0,0.01,-1"
                "OnTrigger" "boss_death_anim,SetDefaultAnimation,primary_death_burning,0.02,-1"
                "OnTrigger" "boss_death_anim,SetPlaybackRate,0.6,0.02,-1"
                "OnTrigger" "scoutmdl,Enable,,0,-1"
                "OnTrigger" "scoutmdl1,Enable,,0,-1"
                "OnTrigger" "scoutmdl2,Enable,,0,-1"
                "OnTrigger" "scoutmdl3,Enable,,0,-1"
                "OnTrigger" "deathanim_scream_sound,PlaySound,,1,-1"
                "OnTrigger" "bootbotR,$Suicide,,0,-1"
				"OnTrigger" "bootbotL,$Suicide,,0,-1"
                "OnTrigger" "deathanim_bigexplosion_particle,Stop,,10,-1"
            }
            prop_dynamic
            {               
                "origin" "0 0 0"
                "targetname" "boss_death_anim"
                "DefaultAnim" "primary_death_headshot"
                "spawnflags" "0"
                "solid" "0"
                "rendercolor" "255 255 255"
                "renderamt" "255"
                "Rendermode" "10"
                "RandomAnimation" "0"
                "pressuredelay" "0"
                "physdamagescale" "1.0"
                "PerformanceMode" "0"
                "modelscale" "6"
                "DisableBoneFollowers" "1"
                "model" "models/player/scout.mdl"
                "MinAnimTime" "5"
                "MaxAnimTime" "10"
                "body" "0"
                "angles" "0 0 0"
                "StartDisabled" "1"
                "OnAnimationDone" "deathanim_bigexplosion_particle,Start,,0,-1"
                "OnAnimationDone" "deathanim_bigexplosion_sound,PlaySound,,0,-1"
                "OnAnimationDone" "deathanim_shaker,StartShake,,0,-1"
                "OnAnimationDone" "!self,BecomeRagdoll,,0,-1"
                "OnAnimationDone" "!self,Kill,2,-1"           
            }
            prop_dynamic_ornament
			{
				"targetname" "scoutmdl"
				"model" "models/bots/scout_boss/bot_scout_boss.mdl"
                "modelscale" "6"
				"StartDisabled" "1"
				"solid" "0"
				"disablebonefollowers" "1"
				"disableshadows" "1"
                "lightingorigin" "hatchspawn"
				"initialowner" "boss_death_anim"
			}
            prop_dynamic_ornament
			{
				"targetname" "scoutmdl1"
				"model" "models/workshop/player/items/scout/hwn2015_death_racer_helmet/hwn2015_death_racer_helmet.mdl"
				"StartDisabled" "1"
				"solid" "0"
				"disablebonefollowers" "1"
				"disableshadows" "1"
                "lightingorigin" "hatchspawn"
				"initialowner" "boss_death_anim"
			}
            prop_dynamic_ornament
			{
				"targetname" "scoutmdl2"
				"model" "models/workshop/player/items/engineer/hwn2015_iron_lung/hwn2015_iron_lung.mdl"
				"StartDisabled" "1"
				"solid" "0"
				"disablebonefollowers" "1"
				"disableshadows" "1"
                "lightingorigin" "hatchspawn"
				"initialowner" "boss_death_anim"
			}
            prop_dynamic_ornament
			{
				"targetname" "scoutmdl3"
				"model" "models/workshop/player/items/demo/dec15_shin_shredders/dec15_shin_shredders.mdl"
				"StartDisabled" "1"
				"solid" "0"
				"disablebonefollowers" "1"
				"disableshadows" "1"
                "lightingorigin" "hatchspawn"
				"initialowner" "boss_death_anim"
			}
            info_particle_system
            {
                "origin" "0 0 0"
                "targetname" "deathanim_bigexplosion_particle"
                "start_active" "0"
                "flag_as_weather" "0"
                "effect_name" "mvm_tank_destroy"
            }
			info_particle_system
            {
                "origin" "0 0 0"
                "targetname" "deathanim_bigexplosion_particle"
                "start_active" "0"
                "flag_as_weather" "0"
                "effect_name" "explosionTrail_seeds_mvm"
            }
            info_particle_system
            {
                "origin" "0 0 0"
                "targetname" "deathanim_bigexplosion_particle"
                "start_active" "0"
                "flag_as_weather" "0"
                "effect_name" "cinefx_goldrush"
            }
			ambient_generic
            {
                "targetname" "deathanim_bigexplosion_sound"
                "message" "mvm/mvm_tank_explode.wav"
                "health" "10"
                "radius" "2100"
                "spawnflags" "49"
                "origin" "0 0 100"
            }
            ambient_generic
            {
                "targetname" "deathanim_bigexplosion_sound"
                "message" "mvm/mvm_tank_explode.wav"
                "health" "10"
                "radius" "2100"
                "spawnflags" "49"
                "origin" "0 0 100"
            }
            ambient_generic
            {
                "targetname" "deathanim_scream_sound"
                "message" "vo/mvm/mght/scout_mvm_m_paincrticialdeath01.mp3"
                "health" "10"
                "radius" "2100"
                "spawnflags" "49"
                "origin" "0 0 100"
            }
            ambient_generic
            {
                "targetname" "deathanim_scream_sound"
                "message" "vo/mvm/mght/scout_mvm_m_paincrticialdeath01.mp3"
                "health" "10"
                "radius" "2100"
                "spawnflags" "49"
                "origin" "0 0 100"
            }
            env_shake
            {
                "targetname" "deathanim_shaker"
                "amplitude" "255"
                "radius" "9999"
                "duration" "3"
                "frequency" "70"
            }
        }

		combo_pyro
		{
			NoFixup 1
			logic_relay // Pyro bot uses his Melee once it hits target with his primary
      		{
        		"targetname" "combo_primary_to_melee"
        		"spawnflags" "2"

        		"OnTrigger" "!self,EnableRefire,,0,-1"
        		"OnTrigger" "!activator,$RemoveItemAttribute,fire input on hit|0,0,-1"
        		"OnTrigger" "!activator,$WeaponSwitchSlot,2,0,-1"
        		"OnTrigger" "!activator,$AddPlayerAttribute,disable weapon switch|1,0.01,-1"
        		"OnTrigger" "!activator,$RemovePlayerAttribute,disable weapon switch,0.6,-1"
        		"OnTrigger" "!activator,$WeaponSwitchSlot,0,0.61,-1"
        		"OnTrigger" "!activator,$AddItemAttribute,fire input on hit|combo_primary_to_melee^Trigger^|0,0.62,-1"
      		}
            logic_relay
            {
                "targetname" "combo_primary_to_secondary"
                "spawnflags" "2"

                "OnTrigger" "!self,EnableRefire,,0,-1"
                "OnTrigger" "!activator,$RemoveItemAttribute,fire input on hit|0,0,-1"
                "OnTrigger" "!activator,$WeaponSwitchSlot,1,0,-1"
                "OnTrigger" "!activator,$AddPlayerAttribute,disable weapon switch|1,0.01,-1"
                "OnTrigger" "!activator,$RemovePlayerAttribute,disable weapon switch,0.6,-1"
                "OnTrigger" "!activator,$WeaponSwitchSlot,0,0.61,-1"
                "OnTrigger" "!activator,$AddItemAttribute,fire input on hit|combo_primary_to_secondary^Trigger^|0,0.62,-1"
            }
            logic_relay // Recommended for Giants
            {
                "targetname" "combo_primary_to_secondary_longhold"
                "spawnflags" "2"

                "OnTrigger" "!self,EnableRefire,,0,-1"
                "OnTrigger" "!activator,$RemoveItemAttribute,fire input on hit|0,0,-1"
                "OnTrigger" "!activator,$WeaponSwitchSlot,1,0,-1"
                "OnTrigger" "!activator,$AddPlayerAttribute,disable weapon switch|1,0.01,-1"
                "OnTrigger" "!activator,$RemovePlayerAttribute,disable weapon switch,1.5,-1"
                "OnTrigger" "!activator,$WeaponSwitchSlot,0,1.51,-1"
                "OnTrigger" "!activator,$AddItemAttribute,fire input on hit|combo_primary_to_secondary_longhold^Trigger^|0,1.52,-1"
            }
		}

		texttimerv2_simple
		{
			NoFixup 1
			logic_compare { "targetname" "addtime" }
			logic_compare { "targetname" "settime" }
			game_text
			{
				"targetname" "timerdisplay"
				"channel" "4"
				"color" "0 255 255"
				"holdtime" "0.5"
				"spawnflags" "1"
				"x" "0.7"
				"y" "0.9"
			}
			game_round_win
			{
				"teamnum" "2"
				"targetname" "bots_win_red"
				"force_map_reset" "1"
			}
			logic_relay
			{
				"onspawn" "wave_start*,addoutput,ontrigger timerdisplay:runscriptcode:AddThinkToSelf(`timerthink`):0:-1,0,-1"
				"onspawn" "wave_finish*,addoutput,ontrigger timerdisplay:runscriptcode:AddThinkToSelf(null):0:-1,0,-1"

				"targetname" "timerpause"
				"ontrigger" "timerdisplay,callscriptfunction,timerpause,0,-1"
			}
			OnSpawnOutput
			{
				Target timerdisplay
				Action runscriptfile
				Param "textualtimer_simple"
			}
		}

		texttimerv2_setup
		{
			OnSpawnOutput
			{
				Target timerdisplay
				Action runscriptcode
				Param "timer(10,00)" // timer(minutes,seconds)
			}
		}
    }
	
    Spawntemplate "corelogic"
    Spawntemplate "barriers"
    SpawnTemplate "blockers"
	SpawnTemplate "filters_mini"
	SpawnTemplate "textual_timer"
	Spawntemplate "combo_pyro"

	Spawntemplate
	{
		Name "spawnsentry"
		Origin "-5688 4820 576"
		Angles "10 90 0"
	}

	Spawntemplate
	{
		Name "spawnsentry"
		Origin "-5062 5100 576"
		Angles "3 -112 0"
	}

	Spawntemplate
	{
		Name "spawnsentry"
		Origin "-5088 3132 576"
		Angles "7 96 0"
	}

	Spawntemplate
	{
		Name "spawnsentry"
		Origin "-5747 3749 576"
		Angles "4 -17 0"
	}

    Spawntemplate
    {
        Name "station"
        Origin "128 -1232 417.425"
        Angles "0 270 0"
    }

    Spawntemplate
    {
        Name "station"
        Origin "1448 -1224 406.178"
        Angles "0 0 0"
    }

    Spawntemplate
    {
        Name "spawner"
        Origin "108 2808 456"
    }

    Spawntemplate
    {
        Name "spawner"
        Origin "-76 408 256"
    }

    Spawntemplate
    {
        Name "spawner"
        Origin "-1408 1168 243.917"
    }

    Spawntemplate
    {
        Name "spawner"
        Origin "-752 1456 259"
    }

    Spawntemplate
    {
        Name "spawner"
        Origin "-1184 2112 384"
    }

    Spawntemplate
    {
        Name "spawner"
        Origin "600 3992 432"
    }

    Spawntemplate
    {
        Name "spawner"
        Origin "76 1024 255.928"
    }

    Spawntemplate
    {
        Name "spawner"
        Origin "-584 3976 344"
    }

    Spawntemplate
    {
        Name "spawner"
        Origin "-1488 4000 256"
    }

    Spawntemplate
    {
        Name "spawner"
        Origin "-1800 3712 544"
    }

    Spawntemplate
    {
        Name "spawner"
        Origin "-1412 4076 544"
    }

    Spawntemplate
    {
        Name "spawner"
        Origin "-2696 3940 488"
    }

	Spawntemplate
    {
        Name "spawner"
        Origin "352 3932 256"
    }

    Templates 
    {
        Red
		{
			Addcond { Name "TF_COND_REPROGRAMMED" }
			Attributes DisableDodge
			Action Mobber
			CustomEyeGlowColor "227 66 32"
			AdditionalStepSound "MVM.BotStep"
			CharacterAttributes
			{
                "ammo regen" 1
				"metal regen" 200
				"crit mod disabled" 0
				"increase player capture value" -1
			}
		}

		Red_Easy
		{
			Addcond { Name "TF_COND_REPROGRAMMED" }
			Attributes DisableDodge
			Action Mobber
			CustomEyeGlowColor "0 255 255"
			AdditionalStepSound "MVM.BotStep"
			CharacterAttributes
			{
                "ammo regen" 1
				"metal regen" 200
				"crit mod disabled" 0
				"increase player capture value" -1
			}
		}

		Red_Giant
		{
			AdditionalStepSound "common/null.wav"
			CharacterAttributes
			{
				"health from packs decreased" 0.05
				"voice pitch scale" 0
			}
			AddTemplate Red
		}

		Red_Guard
		{
			Addcond { Name "TF_COND_REPROGRAMMED" }
			Attributes DisableDodge
			Attributes IgnoreFlag
			BehaviorModifiers Push
			CustomEyeGlowColor "255 0 0"
			AdditionalStepSound "common/null.wav"
			CharacterAttributes
			{
				"health from packs decreased" 0.05
				"voice pitch scale" 0
				"maxammo metal increased" 10
                "ammo regen" 1
				"metal regen" 1000
				"crit mod disabled" 0
				"mult credit collect range" 0
				"no resupply" 1
				"increase player capture value" -2
			}
		}

		T_TFBot_Engineer_Pomson
		{
			Name "Pomson Engineer"
			Class Engineer
			ClassIcon engineer_pomson
			Skill Hard
			MaxVisionRange 700
			WeaponRestrictions PrimaryOnly
			Item "The Pomson 6000"
			Item "Clockwerk's Helm"
		}

		T_TFBot_Sniper_Bushwacka
		{
			Class Sniper
			ClassIcon sniper_bushwacka
            Name "Bushwacka Sniper"
            Skill Expert
            WeaponRestrictions MeleeOnly
            Item "The Bushwacka"
		}

		T_TFBot_Pyro_ComboShotgun_Large
		{
			Name "Large Combo Pyro"
			Class Pyro
			ClassIcon pyro_degreaser_shotgun_red
			Scale 1.4
			Health 650
			Skill Hard
			Item "The Degreaser"
			ItemAttributes
			{
				ItemName "The Degreaser"
				"fire input on hit" "combo_primary_to_secondary^Trigger^"
				"airblast disabled" 1
				"damage bonus" 1.1
			}
			CharacterAttributes 
			{
				"health regen" 1
				"head scale" 0.7
			}
		}

		T_TFBot_Red_Medic_Critcan
		{
			Template T_TFBot_Medic
			Name "Crit Uber Medic"
			ClassIcon medic_uber_critcan
			Attributes IgnoreFlag
			ExtAttr SuppressCanteenUse
			AddCond { Name "TF_COND_REPROGRAMMED" }
			Item "Battery Canteens"
			ItemAttributes
			{
				ItemName "Battery Canteens"
				"critboost" 1
				"powerup charges" 3
				"powerup duration" 5
			}
			CharacterAttributes
			{
				"canteen specialist" 3
			}
			FireWeapon // Extra Canteen trolling
			{
				IfHealthBelow 100
				Delay 0
				Repeats 0
				IfSeeTarget 0
				Duration 0.1
				Type "Action"
			}
		}
		

        T_TFBot_Red_Medic_Kritz
        {
            Name "Kritz Medic"
            Class Medic
            ClassIcon medic_kritz_red
            Attributes SpawnWithFullCharge
			Attributes DisableDodge
			Attributes IgnoreFlag
            Skill Normal
            AddCond { Name "TF_COND_REPROGRAMMED" }
            Item "medfix"
            Item "The Kritzkrieg"
            Item "The Weather Master"
            ItemAttributes
            {
                ItemName "The Kritzkrieg"
                "ubercharge rate bonus" 200
                "uber duration bonus" -10
            }
            CharacterAttributes 
            {
                "bot medic uber health threshold" 999
                "heal rate bonus" 10
            }
        }

		T_TFBot_Red_Giant_Medic_Kritz
		{
			Name "Giant Kritz Medic"
			Class Medic
			ClassIcon medic_kritz_red_giant
			Health 4500
			Attributes MiniBoss
			Attributes SpawnWithFullCharge
			Attributes DisableDodge
			Attributes IgnoreFlag
			Skill Expert
			AddCond { Name "TF_COND_REPROGRAMMED" }
			Item "The Kritzkrieg"
			Item "The Weather Master"
			ItemAttributes
            {
                ItemName "The Kritzkrieg"
                "ubercharge rate bonus" 200
                "uber duration bonus" -10
				"heal rate bonus" 200
            }
			CharacterAttributes
			{
				"move speed bonus" 0.5
				"damage force reduction" 0
				"airblast vulnerability multiplier" 0
				"bot medic uber health threshold" 9999
			}
		}
	
		T_TFBot_Test_Subject_1
		{
			Name "Test Subject"
			Class Sniper
			ClassIcon random_lite
			Health 200
			Skill Hard
			MaxVisionRange	169
			WeaponRestrictions PrimaryOnly	
			UseHumanModel 1
			Item "TF_WEAPON_GRENADELAUNCHER"
			Item "Necro Smasher"
			Item "ozfortress Winter League Division 1 1st Place 2021" 
			ItemAttributes
			{
				ItemName "TF_WEAPON_GRENADELAUNCHER"
				"is invisible" 1
				"blast dmg to self increased" 30
				"explosion particle" "asplode_hoodoo"
				"custom kill icon" "skull"
				"fuse bonus" 0.0001
				"blast radius increased" 3
				"damage bonus" 2
				"projectile speed decreased" 0.0001
			}
			ItemAttributes
			{
				ItemName "Necro Smasher"
				"is_passive_weapon" 1
				"is invisible" 1
				"custom kill icon" "fists"
			}
			CharacterAttributes 
			{
				"move speed bonus" 0.7
				"voice pitch scale" 0
				"torso scale" 0.5
				"bombinomicon effect on death" 1
			}
			ItemModel
			{
				ItemName "ozfortress Winter League Division 1 1st Place 2021" 
				Model "models/workshop/player/items/demo/tw_sentrybuster/tw_sentrybuster.mdl"
			}
		}

		T_TFBot_Test_Subject_2
		{
			Name "Test Subject"
			Class Heavyweapons
			ClassIcon random_lite
			Health 200
			Skill Normal
			MaxVisionRange 169
			WeaponRestrictions MeleeOnly
			UseHumanModel 1
			Item "The Trepanabotomizer"
			ItemAttributes
			{
				ItemName "TF_WEAPON_FISTS"
				"damage penalty" 0.3
				"fire rate bonus" 0.6
				"gesture speed increase" 1.25
				"damage all connected" 1
				"ragdolls plasma effect" 1
			}
			CharacterAttributes 
			{
				"move speed bonus" 1.5
				"voice pitch scale" 0
				"bombinomicon effect on death" 1
				"cannot taunt" 1
			}
			ItemAttributes
            {
                ItemName "The Trepanabotomizer"
                "attach particle effect" 67
            }
		}

		T_TFBot_Giant_Heavy_Orb
		{
			Name "Electric Grenadier"
			Class Heavyweapons
			ClassIcon shotgun_plasma
			Health 5000
			Attributes MiniBoss
			Skill Expert
			WeaponRestrictions SecondaryOnly
			Item "The Eliminators Safeguard"
			ItemAttributes
			{
				ItemName "TF_WEAPON_SHOTGUN_HWG"
				"fire rate penalty" 3
				"faster reload rate" -0.8
				"override projectile type extra" "mechanicalarmorb"
				// "mult projectile count" 3
				"damage bonus" 2
				"ragdolls become ash" 1
				"projectile spread angle penalty" 8
			}
			CharacterAttributes
			{
				"move speed bonus" 0.7
				"damage force reduction" 0
				"airblast vulnerability multiplier" 0.2
				"override footstep sound set" 2
			}
			ItemModel 
			{
				ItemName "TF_WEAPON_SHOTGUN_HWG"
				Model "models/workshop/weapons/c_models/c_drg_pomson/c_drg_pomson.mdl"
			}
		}
    }


    Wave // Wave 1
    {
        WaitWhenDone 65
        Checkpoint Yes
        StartWaveOutput
        {
            Target wave_start_relay
            Action Trigger
        }
        DoneOutput
        {
            Target wave_finished_relay
            Action Trigger
        }
        InitWaveOutput
        {
            Target holograms_3way_relay
            Action Trigger
        }

		Explanation
		{
			Line "{66abff}Our intelligence forces indicate RED has been working on a top secret project."
			Line "{f5c542}Whatever that project is, we don't know. What we do know is that we need to take it down quick!"
			Line "{f5c542}We will be using a tank disguised as an ambulance to infiltrate this facility."
			Line "{f5c542}It's set to explode prematurely, so be sure to escort it quickly."
		}

		WaveSpawn
		{
			Where spawnbot_ambush
			TotalCount 1
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 999999
			WaitBetweenSpawns 0
			TotalCurrency 0
			HideIcon 1   // Hides icons from the wave bar. Should use a ClassIcon different from visible ones 
			TFBot
			{  
				Class Scout
				ClassIcon red2_lite
			}
		}
        WaveSpawn // Tank 30K HP
        {
            Name "payload"
            TotalCount 1
            MaxActive 1
            SpawnCount 1
            WaitBeforeStarting 0
            WaitBetweenSpawns 0   
            TotalCurrency 0
            Support Limited
            Tank
            {
                Name "ambulancetank"
                StartingPathTrackNode "tankpath_a1"
                Health 55000
                Speed 100
                Skin 0
				ClassIcon tank_regen
				SpawnTemplate "ambulance_tank"
                Model "models/empty.mdl"
                StartSound "misc/null.wav"
				PingSound "misc/null.wav"
				EngineLoopSound "Taunt.TankForward"
				DisableTracks 1  
				DisableSmokestack 1  
				DisableChildModels 1
                OnBombDroppedOutput
                {
                    Target boss_deploy_relay
                    Action Trigger
                }
            }
        }
		WaveSpawn // Dummy
		{
			WaitForAllDead "payload"
			TotalCount 0
			SpawnCount 0
			WaitBeforeStarting 0.5
			Support Limited
			FirstSpawnOutput
			{
				Target redwin_relay
				Action Trigger
			}
		}
        WaveSpawn
        {
            Name "guard1"
            Where barrierguard1
            TotalCount 1
            MaxActive 1
            SpawnCount 1
            WaitBeforeStarting 0
            WaitBetweenSpawns 0
            TotalCurrency 100  
            DoneOutput
            {
                Target barrier_1_relay
                Action Trigger
            }
            TFBot
            { 
                Template T_TFBot_Giant_Soldier_Spammer_Hatted
                Item "MvM Gatebot Light Soldier"
                AddTemplate Red_Giant
            }
        }
        WaveSpawn
        {
            Name "guard2"
            Where barrierguard2
            TotalCount 1
            MaxActive 1
            SpawnCount 1
            WaitBeforeStarting 2
            WaitBetweenSpawns 0
            TotalCurrency 100
            DoneOutput
            {
                Target barrier_2_relay
                Action Trigger
            }
            TFBot
            { 
                Template T_TFBot_Giant_Pyro
				Name "Giant Dragon's Fury Pyro"
				ClassIcon pyro_dragon_fury_swordstone
				Item "The Dragon's Fury"
                Item "MvM Gatebot Light Pyro"
				ItemAttributes
				{
					ItemName "The Dragon's Fury"
					"damage bonus" 1.2
				}
				CharacterAttributes { "airblast disabled" 1 }
                AddTemplate Red_Giant
            }
        }
        WaveSpawn
        {
            Name "guard3"
            Where barrierguard3
            TotalCount 1
            MaxActive 1
            SpawnCount 1
            WaitBeforeStarting 2
            WaitBetweenSpawns 0
            TotalCurrency 100
            DoneOutput
            {
                Target barrier_3_relay
                Action Trigger
            }
            TFBot
            {
                Template T_TFBot_Giant_Soldier_RocketShotgun_Improved
				Item "MvM Gatebot Light Soldier"
                AddTemplate Red_Giant
            }
        }
        WaveSpawn
        {
            Name "guard4"
            Where hatchspawn
            TotalCount 1
            MaxActive 1
            SpawnCount 1
            WaitBeforeStarting 2
            WaitBetweenSpawns 0
            TotalCurrency 100
            DoneOutput
            {
                Target barrier_final_relay
                Action Trigger
            }
            TFBot
            {
                Name "Giant Skullcutter Demoknight"
                Class Demoman
                ClassIcon demoknight_skullcutter_lite
                Health 3300
                Attributes MiniBoss
                Skill Expert
                ExtAttr IgnoreNPC
                WeaponRestrictions MeleeOnly   
				SpawnTemplate "RotateShieldLvL1_Red"         
                Item "The Scotsman's Skullcutter"
                Item "The Chargin' Targe"
                Item "Ali Baba's Wee Booties"
                Item "MvM Gatebot Light Demoman"
                ItemAttributes
                {
                    ItemName "The Scotsman's Skullcutter"
                    "critboost on kill" 3
                }
                CharacterAttributes
                {
                    "move speed bonus" 0.5
                    "damage force reduction" 0
                    "airblast vulnerability multiplier" 0
                    "override footstep sound set" 4
                }
                AddTemplate Red_Giant
            }
        }
		WaveSpawn
		{
			Name "FakeSpawn"
			WaitForAllDead "guard1"
			Where spawnbot_ambush
			TotalCount 30
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 0	
			PointTemplate   // PointTemplate spawner. Counts as alive until all entites in the template are removed
			{
				SpawnAtEntity Where // Entity to spawn the template at, "Where" spawns at the bot spawn as indicated by where. If omitted, spawns at world origin
				IsCrit 0 // Shows icon as critical (Default: 0)
				IsMiniBoss 0 // Shows icon as mini boss (Default: 0)
				ClassIcon pyro // ClassIcon to use
				Name "FakeIcon" // Template name to use
				Origin "0 0 0" // Position where to spawn the template. If SpawnAtEntity is specified, relative to entity
				Angles "0 0 0" // Rotation of the template
				SpawnCurrencyPack "yes"
			}
		}
		WaveSpawn
		{
			Name "part01"
			Where redspawn_biome1
			Where redspawn_tunnel1
			TotalCount 30
			MaxActive 8
			SpawnCount 1
			WaitBeforeStarting 5
			WaitBetweenSpawns 2
			TotalCurrency 50
			Support Limited
			RandomSpawn 1
			RandomChoice
			{
				RandomChoice
				{
					TFBot
					{
						Class Pyro
						Skill Normal
						CharacterAttributes { "airblast disabled" 1 }
						AddTemplate Red_Easy
					}
					TFBot
					{
						Class Pyro
						Skill Normal
						ExtAttr IgnoreNPC
						CharacterAttributes { "airblast disabled" 1 }
						AddTemplate Red_Easy
					}
					TFBot
					{
						Class Pyro
						Skill Normal
						ExtAttr IgnoreNPC
						CharacterAttributes { "airblast disabled" 1 }
						AddTemplate Red_Easy
					}
				}
			}
		}
		WaveSpawn
		{
			Name "FakeSpawn"
			WaitForAllDead "guard1"
			Where spawnbot_ambush
			TotalCount 96
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 0	
			PointTemplate   // PointTemplate spawner. Counts as alive until all entites in the template are removed
			{
				SpawnAtEntity Where // Entity to spawn the template at, "Where" spawns at the bot spawn as indicated by where. If omitted, spawns at world origin
				IsCrit 0 // Shows icon as critical (Default: 0)
				IsMiniBoss 0 // Shows icon as mini boss (Default: 0)
				ClassIcon demoknight_bottle_lite // ClassIcon to use
				Name "FakeIcon" // Template name to use
				Origin "0 0 0" // Position where to spawn the template. If SpawnAtEntity is specified, relative to entity
				Angles "0 0 0" // Rotation of the template
				SpawnCurrencyPack "yes"
			}
		}
		WaveSpawn
		{
			Name "part01"
			Where redspawn_biome1
			Where redspawn_tunnel1
			TotalCount 96
			MaxActive 8
			SpawnCount 1
			WaitBeforeStarting 30
			WaitBetweenSpawns 1
			TotalCurrency 100
			Support Limited
			RandomSpawn 1
			RandomChoice
			{
				RandomChoice
				{
					TFBot
					{
						Template T_TFBot_Demoman_Bottle
						ExtAttr IgnoreNPC
						AddTemplate Red
					}
					TFBot
					{
						Template T_TFBot_Demoman_Bottle
						ExtAttr IgnoreNPC
						AddTemplate Red
					}
					TFBot
					{
						Template T_TFBot_Demoman_Bottle
						Interruptaction
						{
							Target "tank_boss"
							Aimtarget "tank_boss"
							KillAimTarget 1
							Delay 5
							Cooldown 2
							Repeats 0
							Duration 10
						}
						AddTemplate Red
					}
				}
			}
		}
		WaveSpawn
		{
			Name "FakeSpawn"
			WaitForAllDead "guard2"
			Where spawnbot_ambush
			TotalCount 2
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 0	
			PointTemplate   // PointTemplate spawner. Counts as alive until all entites in the template are removed
			{
				SpawnAtEntity Where // Entity to spawn the template at, "Where" spawns at the bot spawn as indicated by where. If omitted, spawns at world origin
				IsCrit 0 // Shows icon as critical (Default: 0)
				IsMiniBoss 1 // Shows icon as mini boss (Default: 0)
				ClassIcon heavy_shotgun_red // ClassIcon to use
				Name "FakeIcon" // Template name to use
				Origin "0 0 0" // Position where to spawn the template. If SpawnAtEntity is specified, relative to entity
				Angles "0 0 0" // Rotation of the template
				SpawnCurrencyPack "yes"
			}
		}
		WaveSpawn
		{
			Name "part02"
			Where redspawn_tunnel2
			TotalCount 2
			MaxActive 2
			SpawnCount 1
			WaitBeforeStarting 20
			WaitBetweenSpawns 12
			TotalCurrency 50
			Support Limited
			RandomSpawn 1
			RandomChoice
			{
				RandomChoice
				{
					TFBot
					{
						Template T_TFBot_Giant_Heavyweapons_Shotgun
						ExtAttr IgnoreNPC
						ClassIcon heavy_shotgun_red
						AddTemplate Red_Giant
					}
					TFBot
					{
						Template T_TFBot_Giant_Heavyweapons_Shotgun
						ExtAttr IgnoreNPC
						ClassIcon heavy_shotgun_red
						AddTemplate Red_Giant
					}
					TFBot
					{
						Template T_TFBot_Giant_Heavyweapons_Shotgun
						ClassIcon heavy_shotgun_red
						Interruptaction
						{
							Target "tank_boss"
							Aimtarget "tank_boss"
							KillAimTarget 1
							Delay 5
							Cooldown 2
							Repeats 0
							Duration 10
						}
						AddTemplate Red_Giant
					}
				}
			}
		}
		WaveSpawn
		{
			Name "FakeSpawn"
			WaitForAllDead "guard2"
			Where spawnbot_ambush
			TotalCount 60
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 0	
			PointTemplate   // PointTemplate spawner. Counts as alive until all entites in the template are removed
			{
				SpawnAtEntity Where // Entity to spawn the template at, "Where" spawns at the bot spawn as indicated by where. If omitted, spawns at world origin
				IsCrit 0 // Shows icon as critical (Default: 0)
				IsMiniBoss 0 // Shows icon as mini boss (Default: 0)
				ClassIcon sniper_bow // ClassIcon to use
				Name "FakeIcon" // Template name to use
				Origin "0 0 0" // Position where to spawn the template. If SpawnAtEntity is specified, relative to entity
				Angles "0 0 0" // Rotation of the template
				SpawnCurrencyPack "yes"
			}
		}
		WaveSpawn
		{
			Name "part02"
			Where redspawn_biome2
			Where redspawn_tunnel2
			TotalCount 60
			MaxActive 10
			SpawnCount 1
			WaitBeforeStarting 12
			WaitBetweenSpawns 2
			TotalCurrency 100
			Support Limited
			RandomSpawn 1
			RandomChoice
			{
				RandomChoice
				{
					TFBot
					{
						Template T_TFBot_Sniper_Huntsman
						ExtAttr IgnoreNPC
						AddTemplate Red
					}
					TFBot
					{
						Template T_TFBot_Sniper_Huntsman
						ExtAttr IgnoreNPC
						AddTemplate Red
					}
					TFBot
					{
						Template T_TFBot_Sniper_Huntsman
						ExtAttr IgnoreNPC
						AddTemplate Red
					}
					TFBot
					{
						Template T_TFBot_Sniper_Huntsman
						Interruptaction
						{
							Target "tank_boss"
							Aimtarget "tank_boss"
							KillAimTarget 1
							Delay 5
							Cooldown 2
							Repeats 0
							Duration 10
						}
						AddTemplate Red
					}
				}
			}
		}
		WaveSpawn
		{
			Name "FakeSpawn"
			WaitForAllDead "guard2"
			Where spawnbot_ambush
			TotalCount 35
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 0	
			PointTemplate   // PointTemplate spawner. Counts as alive until all entites in the template are removed
			{
				SpawnAtEntity Where // Entity to spawn the template at, "Where" spawns at the bot spawn as indicated by where. If omitted, spawns at world origin
				IsCrit 0 // Shows icon as critical (Default: 0)
				IsMiniBoss 0 // Shows icon as mini boss (Default: 0)
				ClassIcon heavy_champ_red // ClassIcon to use
				Name "FakeIcon" // Template name to use
				Origin "0 0 0" // Position where to spawn the template. If SpawnAtEntity is specified, relative to entity
				Angles "0 0 0" // Rotation of the template
				SpawnCurrencyPack "yes"
			}
		}
		WaveSpawn
		{
			Name "part02"
			Where redspawn_tunnel2
			TotalCount 35
			MaxActive 7
			SpawnCount 1
			WaitBeforeStarting 12
			WaitBetweenSpawns 1
			TotalCurrency 50
			Support Limited
			RandomSpawn 1
			RandomChoice
			{
				RandomChoice
				{
					TFBot
					{
						Template T_TFBot_Heavyweapons_Heavyweight_Champ_Hard
						Extattr IgnoreNPC
						AddTemplate Red
					}
					TFBot
					{
						Template T_TFBot_Heavyweapons_Heavyweight_Champ_Hard
						Extattr IgnoreNPC
						AddTemplate Red
					}
					TFBot
					{
						Template T_TFBot_Heavyweapons_Heavyweight_Champ_Hard
						Extattr IgnoreNPC
						AddTemplate Red
					}
					TFBot
					{
						Template T_TFBot_Heavyweapons_Heavyweight_Champ_Hard
						Interruptaction
						{
							Target "tank_boss"
							Aimtarget "tank_boss"
							KillAimTarget 1
							Delay 5
							Cooldown 2
							Repeats 0
							Duration 10
						}
						AddTemplate Red
					}
				}
			}
		}
		WaveSpawn
		{
			Name "FakeSpawn"
			WaitForAllDead "guard3"
			Where spawnbot_ambush
			TotalCount 48
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 0	
			PointTemplate   // PointTemplate spawner. Counts as alive until all entites in the template are removed
			{
				SpawnAtEntity Where // Entity to spawn the template at, "Where" spawns at the bot spawn as indicated by where. If omitted, spawns at world origin
				IsCrit 0 // Shows icon as critical (Default: 0)
				IsMiniBoss 0 // Shows icon as mini boss (Default: 0)
				ClassIcon demo // ClassIcon to use
				Name "FakeIcon" // Template name to use
				Origin "0 0 0" // Position where to spawn the template. If SpawnAtEntity is specified, relative to entity
				Angles "0 0 0" // Rotation of the template
				SpawnCurrencyPack "yes"
			}
		}
		WaveSpawn
		{
			Name "part03"
			Where redspawn_mid2
			Where redspawn_mid3
			TotalCount 48
			MaxActive 12
			SpawnCount 1
			WaitBeforeStarting 12
			WaitBetweenSpawns 2
			TotalCurrency 100
			Support Limited
			RandomSpawn 1
			RandomChoice
			{
				RandomChoice
				{
					TFBot
					{
						Template T_TFBot_Demoman
						Skill Normal
						AddTemplate Red
					}
				}
			}
		}
		WaveSpawn
		{
			Name "FakeSpawn"
			WaitForAllDead "guard3"
			Where spawnbot_ambush
			TotalCount 4
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 0	
			PointTemplate   // PointTemplate spawner. Counts as alive until all entites in the template are removed
			{
				SpawnAtEntity Where // Entity to spawn the template at, "Where" spawns at the bot spawn as indicated by where. If omitted, spawns at world origin
				IsCrit 0 // Shows icon as critical (Default: 0)
				IsMiniBoss 1 // Shows icon as mini boss (Default: 0)
				ClassIcon scout_pistol_nys_giant // ClassIcon to use
				Name "FakeIcon" // Template name to use
				Origin "0 0 0" // Position where to spawn the template. If SpawnAtEntity is specified, relative to entity
				Angles "0 0 0" // Rotation of the template
				SpawnCurrencyPack "yes"
			}
		}
		WaveSpawn
		{
			Name "part03"
			Where redspawn_mid3
			TotalCount 4
			MaxActive 4
			SpawnCount 1
			WaitBeforeStarting 3
			WaitBetweenSpawns 10
			TotalCurrency 50
			Support Limited
			RandomSpawn 1
			RandomChoice
			{
				RandomChoice
				{
					TFBot
					{
						Template T_TFBot_Giant_Scout_Pistol
						AddTemplate Red_Giant
					}
				}
			}
		}
		WaveSpawn
		{
			Name "FakeSpawn"
			WaitForAllDead "guard4"
			Where spawnbot_ambush
			TotalCount 3
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 0	
			PointTemplate   // PointTemplate spawner. Counts as alive until all entites in the template are removed
			{
				SpawnAtEntity Where // Entity to spawn the template at, "Where" spawns at the bot spawn as indicated by where. If omitted, spawns at world origin
				IsCrit 0 // Shows icon as critical (Default: 0)
				IsMiniBoss 1 // Shows icon as mini boss (Default: 0)
				ClassIcon soldier_spammer // ClassIcon to use
				Name "FakeIcon" // Template name to use
				Origin "0 0 0" // Position where to spawn the template. If SpawnAtEntity is specified, relative to entity
				Angles "0 0 0" // Rotation of the template
				SpawnCurrencyPack "yes"
			}
		}
		WaveSpawn
		{
			Name "part04"
			Where redspawn_close
			Where redspawn_top
			TotalCount 3
			MaxActive 3
			SpawnCount 1
			WaitBeforeStarting 5
			WaitBetweenSpawns 12
			TotalCurrency 100
			Support Limited
			RandomSpawn 1
			RandomChoice
			{
				RandomChoice
				{
					TFBot
					{
						Template T_TFBot_Giant_Soldier_Spammer_Hatted
						AddTemplate Red_Giant
					}
				}
			}
		}
		WaveSpawn
		{
			Name "infinite"
			WaitForAllSpawned "part04"
			Where ""
			TotalCount 999
			MaxActive 12
			SpawnCount 1
			WaitBeforeStarting 10
			WaitBetweenSpawns 1
			TotalCurrency 0
			Support 1
			RandomSpawn 1
			TFBot
			{ 
				Template T_TFBot_Sniper_SMG
				Skill Easy
				// ExtAttr IgnoreNPC
				AddTemplate Red_Easy
			}
		}
    }

	Wave // Wave 2
	{
		WaitWhenDone 65
        Checkpoint Yes
		StartWaveOutput
		{
			Target wave_start_relay
			Action Trigger
		}
		DoneOutput
		{
			Target wave_finished_relay
			Action Trigger
		}
		InitWaveOutput
		{
			Target holograms_3way_relay
			Action Trigger
		}

		WaveSpawn
		{
			Where spawnbot_ambush
			TotalCount 1
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 999999
			WaitBetweenSpawns 0
			TotalCurrency 0
			HideIcon 1   // Hides icons from the wave bar. Should use a ClassIcon different from visible ones 
			TFBot
			{  
				Class Scout
				ClassIcon red2_lite
			}
		}
        WaveSpawn // Tank 35K HP
        {
            Name "payload"
            TotalCount 1
            MaxActive 1
            SpawnCount 1
            WaitBeforeStarting 0
            WaitBetweenSpawns 0   
            TotalCurrency 0
            Support Limited
            Tank
            {
                Name "ambulancetank"
                StartingPathTrackNode "tankpath_a1"
                Health 35000
                Speed 100
                Skin 0
				ClassIcon tank_regen
				SpawnTemplate "ambulance_tank"
                Model "models/empty.mdl"
                StartSound "misc/null.wav"
				PingSound "misc/null.wav"
				EngineLoopSound "Taunt.TankForward"
				DisableTracks 1  
				DisableSmokestack 1  
				DisableChildModels 1
                OnBombDroppedOutput
                {
                    Target boss_deploy_relay
                    Action Trigger
                }
            }
        }
		WaveSpawn // Dummy
		{
			WaitForAllDead "payload"
			TotalCount 0
			SpawnCount 0
			WaitBeforeStarting 0.5
			Support Limited
			FirstSpawnOutput
			{
				Target redwin_relay
				Action Trigger
			}
		}
		WaveSpawn
		{
			Name "guard1"
			Where barrierguard1
			TotalCount 1
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 2
			TotalCurrency 100
			DoneOutput
            {
                Target barrier_1_relay
                Action Trigger
            }
			TFBot
			{ 
				Template T_TFBot_Giant_Heavy_Orb
				AddTemplate Red_Giant
			}
		}
		WaveSpawn
		{
			Name "guard2"
			Where barrierguard2
			TotalCount 1
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 2
			TotalCurrency 100
			DoneOutput
            {
                Target barrier_2_relay
                Action Trigger
            }
			TFBot
			{ 
				Template T_TFBot_Giant_Soldier_Spammer_Reload_Hatted
				Item "MvM Gatebot Light Soldier"
				AddTemplate Red_Giant
			}
		}
		WaveSpawn
		{
			Name "guard3"
			Where barrierguard3
			TotalCount 1
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 2
			TotalCurrency 100
			DoneOutput
            {
                Target barrier_3_relay
                Action Trigger
            }
			TFBot
			{
				Name "Giant Laser Wall Soldier"
				Class Soldier
				ClassIcon soldier_bison_rng
				Health 3800
				Attributes MiniBoss
				Attributes HoldFireUntilFullReload
				Skill Expert
				WeaponRestrictions PrimaryOnly
				Item "Upgradeable TF_WEAPON_ROCKETLAUNCHER"
				Item "MvM Gatebot Light Soldier"
				ItemAttributes
				{
					ItemName "Upgradeable TF_WEAPON_ROCKETLAUNCHER"
					"set item tint RGB"	16514816
					"attach particle effect" 3097
					"clip size upgrade atomic"	26.0
					"fire rate bonus"	0.001
					"faster reload rate"	0.18
					"energy weapon penetration" 1
					"override projectile type" 13
					"ragdolls become ash" 1
					"custom kill icon" "righteous_bison"
					"projectile spread angle penalty" 6
					"projectile speed decreased" 1.2
					"dmg penalty vs players" 3.5
					"dmg bonus vs buildings" 0.1
					"particle color rainbow" 200
				}
				CharacterAttributes
				{
					"move speed bonus" 0.5
					"damage force reduction" 0
					"airblast vulnerability multiplier" 0.5
					"override footstep sound set" 3
				}
				AddTemplate Red_Giant
			}
		}
		WaveSpawn
		{
			Name "guard4"
			Where hatchspawn
			TotalCount 1
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 2
			TotalCurrency 100
			DoneOutput
            {
                Target barrier_final_relay
                Action Trigger
            }
			TFBot
			{ 
				Template T_TFBot_Giant_Pyro
				Name "Giant Ricochet Pyro"
				ClassIcon pyro_ricochet_nys_giant
				Health 3500
				Item "The Nostromo Napalmer"
				Item "MvM Gatebot Light Pyro"
				ItemAttributes
				{
					ItemName "The Nostromo Napalmer"
					"flame_drag" 4.25
					"flame_spread_degree" 5
					"max_flame_reflection_count" 800
					"flame_reflect_on_collision" 800
					// "damage bonus" 1.5
					"airblast disabled" 1
					"flame_up_speed" -25
				}
				Interruptaction
				{
					Target "RandomEnemy"
					Delay 5
					Cooldown 12
					Repeats 0
					Duration 10
				}
				AddTemplate Red_Guard
			}
		}
		WaveSpawn
		{
			Name "FakeSpawn"
			WaitForAllDead "guard1"
			Where spawnbot_ambush
			TotalCount 40
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 0	
			PointTemplate   // PointTemplate spawner. Counts as alive until all entites in the template are removed
			{
				SpawnAtEntity Where // Entity to spawn the template at, "Where" spawns at the bot spawn as indicated by where. If omitted, spawns at world origin
				IsCrit 0 // Shows icon as critical (Default: 0)
				IsMiniBoss 0 // Shows icon as mini boss (Default: 0)
				ClassIcon soldier_bison  // ClassIcon to use
				Name "FakeIcon" // Template name to use
				Origin "0 0 0" // Position where to spawn the template. If SpawnAtEntity is specified, relative to entity
				Angles "0 0 0" // Rotation of the template
				SpawnCurrencyPack "yes"
			}
		}
		WaveSpawn
		{
			Name "part01"
			Where redspawn_biome1
			Where redspawn_tunnel1
			TotalCount 40
			MaxActive 8
			SpawnCount 1
			WaitBeforeStarting 5
			WaitBetweenSpawns 1
			TotalCurrency 50
			Support Limited
			RandomSpawn 1
			RandomChoice
			{
				RandomChoice
				{
					TFBot
					{
						Template T_TFBot_Soldier_Bison
						ExtAttr IgnoreNPC
						DesiredAttackRange 80
						AddTemplate Red
					}
					TFBot
					{
						Template T_TFBot_Soldier_Bison
						ExtAttr IgnoreNPC
						DesiredAttackRange 80
						AddTemplate Red
					}
					TFBot
					{
						Template T_TFBot_Soldier_Bison
						ExtAttr IgnoreNPC
						DesiredAttackRange 80
						AddTemplate Red
					}
					TFBot
					{
						Template T_TFBot_Soldier_Bison
						Interruptaction
						{
							Target "tank_boss"
							Aimtarget "tank_boss"
							KillAimTarget 1
							Delay 5
							Cooldown 2
							Repeats 0
							Duration 10
						}
						AddTemplate Red
					}
				}
			}
		}
		WaveSpawn
		{
			Name "FakeSpawn"
			WaitForAllDead "guard1"
			Where spawnbot_ambush
			TotalCount 66
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 0	
			PointTemplate   // PointTemplate spawner. Counts as alive until all entites in the template are removed
			{
				SpawnAtEntity Where // Entity to spawn the template at, "Where" spawns at the bot spawn as indicated by where. If omitted, spawns at world origin
				IsCrit 0 // Shows icon as critical (Default: 0)
				IsMiniBoss 0 // Shows icon as mini boss (Default: 0)
				ClassIcon engineer_pomson // ClassIcon to use
				Name "FakeIcon" // Template name to use
				Origin "0 0 0" // Position where to spawn the template. If SpawnAtEntity is specified, relative to entity
				Angles "0 0 0" // Rotation of the template
				SpawnCurrencyPack "yes"
			}
		}
		WaveSpawn
		{
			Name "part01"
			Where redspawn_biome1
			Where redspawn_tunnel1
			TotalCount 66
			MaxActive 12
			SpawnCount 1
			WaitBeforeStarting 5
			WaitBetweenSpawns 2
			TotalCurrency 100
			Support Limited
			RandomSpawn 1
			RandomChoice
			{
				RandomChoice
				{
					TFBot
					{
						Template T_TFBot_Engineer_Pomson
						ExtAttr IgnoreNPC
						DesiredAttackRange 80
						AddTemplate Red
					}
					TFBot
					{
						Template T_TFBot_Engineer_Pomson
						ExtAttr IgnoreNPC
						DesiredAttackRange 80
						AddTemplate Red
					}
					TFBot
					{
						Template T_TFBot_Engineer_Pomson
						Interruptaction
						{
							Target "tank_boss"
							Aimtarget "tank_boss"
							KillAimTarget 1
							Delay 5
							Cooldown 2
							Repeats 0
							Duration 10
						}
						AddTemplate Red
					}
				}
			}
		}
		WaveSpawn
		{
			Name "FakeSpawn"
			WaitForAllDead "guard2"
			Where spawnbot_ambush
			TotalCount 36
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 0	
			PointTemplate   // PointTemplate spawner. Counts as alive until all entites in the template are removed
			{
				SpawnAtEntity Where // Entity to spawn the template at, "Where" spawns at the bot spawn as indicated by where. If omitted, spawns at world origin
				IsCrit 0 // Shows icon as critical (Default: 0)
				IsMiniBoss 0 // Shows icon as mini boss (Default: 0)
				ClassIcon medic_syringe // ClassIcon to use
				Name "FakeIcon" // Template name to use
				Origin "0 0 0" // Position where to spawn the template. If SpawnAtEntity is specified, relative to entity
				Angles "0 0 0" // Rotation of the template
				SpawnCurrencyPack "yes"
			}
		}
		WaveSpawn
		{
			Name "part02"
			Where redspawn_tunnel2
			Where redspawn_biome2
			TotalCount 36
			MaxActive 12
			SpawnCount 1
			WaitBeforeStarting 8
			WaitBetweenSpawns 2
			TotalCurrency 50
			Support Limited
			RandomSpawn 1
			RandomChoice
			{
				RandomChoice
				{
					TFBot
					{
						Name "Syringe Medic"
						Class Medic
						ClassIcon medic_syringe
						WeaponRestrictions PrimaryOnly
						Skill Hard
						ExtAttr IgnoreNPC
						AddTemplate Red
					}
					TFBot
					{
						Name "Syringe Medic"
						Class Medic
						ClassIcon medic_syringe
						WeaponRestrictions PrimaryOnly
						Skill Hard
						ExtAttr IgnoreNPC
						AddTemplate Red
					}
					TFBot
					{
						Name "Syringe Medic"
						Class Medic
						ClassIcon medic_syringe
						WeaponRestrictions PrimaryOnly
						Skill Hard
						Interruptaction
						{
							Target "tank_boss"
							Aimtarget "tank_boss"
							KillAimTarget 1
							Delay 5
							Cooldown 2
							Repeats 0
							Duration 10
						}
						AddTemplate Red
					}
				}
			}
		}
		WaveSpawn
		{
			Name "FakeSpawn"
			WaitForAllDead "guard2"
			Where spawnbot_ambush
			TotalCount 4
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 0	
			PointTemplate   // PointTemplate spawner. Counts as alive until all entites in the template are removed
			{
				SpawnAtEntity Where // Entity to spawn the template at, "Where" spawns at the bot spawn as indicated by where. If omitted, spawns at world origin
				IsCrit 0 // Shows icon as critical (Default: 0)
				IsMiniBoss 1 // Shows icon as mini boss (Default: 0)
				ClassIcon heavy_steelfist // ClassIcon to use
				Name "FakeIcon" // Template name to use
				Origin "0 0 0" // Position where to spawn the template. If SpawnAtEntity is specified, relative to entity
				Angles "0 0 0" // Rotation of the template
				SpawnCurrencyPack "yes"
			}
		}
		WaveSpawn
		{
			Name "part02"
			Where redspawn_tunnel2
			TotalCount 4
			MaxActive 2
			SpawnCount 1
			WaitBeforeStarting 12
			WaitBetweenSpawns 10
			TotalCurrency 100
			Support Limited
			RandomSpawn 1
			RandomChoice
			{
				RandomChoice
				{
					TFBot
					{
						Template T_TFBot_Giant_Heavyweapons_Fist
						ExtAttr IgnoreNPC
						AddTemplate Red_Giant
					}
					TFBot
					{
						Template T_TFBot_Giant_Heavyweapons_Fist
						Interruptaction
						{
							Target "tank_boss"
							Aimtarget "tank_boss"
							KillAimTarget 1
							Delay 5
							Cooldown 2
							Repeats 0
							Duration 10
						}
						AddTemplate Red_Giant
					}
				}
			}
		}
		WaveSpawn
		{
			Name "FakeSpawn"
			WaitForAllDead "guard3"
			Where spawnbot_ambush
			TotalCount 36
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 0	
			PointTemplate   // PointTemplate spawner. Counts as alive until all entites in the template are removed
			{
				SpawnAtEntity Where // Entity to spawn the template at, "Where" spawns at the bot spawn as indicated by where. If omitted, spawns at world origin
				IsCrit 0 // Shows icon as critical (Default: 0)
				IsMiniBoss 0 // Shows icon as mini boss (Default: 0)
				ClassIcon soldier_mangler // ClassIcon to use
				Name "FakeIcon" // Template name to use
				Origin "0 0 0" // Position where to spawn the template. If SpawnAtEntity is specified, relative to entity
				Angles "0 0 0" // Rotation of the template
				SpawnCurrencyPack "yes"
			}
		}
		WaveSpawn
		{
			Name "part03"
			Where redspawn_mid3
			TotalCount 36
			MaxActive 6
			SpawnCount 1
			WaitBeforeStarting 4
			WaitBetweenSpawns 2
			TotalCurrency 100
			Support Limited
			RandomSpawn 1
			RandomChoice
			{
				RandomChoice
				{
					TFBot
					{
						Template T_TFBot_Soldier_Mangler
						Skill Normal
						ExtAttr IgnoreNPC
						AimAt Feet
						AddTemplate Red_Easy
					}
					TFBot
					{
						Template T_TFBot_Soldier_Mangler
						Skill Normal
						Interruptaction
						{
							Target "tank_boss"
							Aimtarget "tank_boss"
							KillAimTarget 1
							Delay 5
							Cooldown 2
							Repeats 0
							Duration 10
						}
						AddTemplate Red_Easy
					}
				}
			}
		}
		WaveSpawn
		{
			Name "FakeSpawn"
			WaitForAllDead "guard3"
			Where spawnbot_ambush
			TotalCount 42
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 0	
			PointTemplate   // PointTemplate spawner. Counts as alive until all entites in the template are removed
			{
				SpawnAtEntity Where // Entity to spawn the template at, "Where" spawns at the bot spawn as indicated by where. If omitted, spawns at world origin
				IsCrit 0 // Shows icon as critical (Default: 0)
				IsMiniBoss 0 // Shows icon as mini boss (Default: 0)
				ClassIcon pyro_phlog // ClassIcon to use
				Name "FakeIcon" // Template name to use
				Origin "0 0 0" // Position where to spawn the template. If SpawnAtEntity is specified, relative to entity
				Angles "0 0 0" // Rotation of the template
				SpawnCurrencyPack "yes"
			}
		}
		WaveSpawn
		{
			Name "part03"
			Where redspawn_mid3
			TotalCount 42
			MaxActive 6
			SpawnCount 1
			WaitBeforeStarting 8
			WaitBetweenSpawns 2
			TotalCurrency 100
			Support Limited
			RandomSpawn 1
			RandomChoice
			{
				RandomChoice
				{
					TFBot
					{
						Template T_TFBot_Pyro_Phlog_Mmph
						Interruptaction
						{
							Target "tank_boss"
							Aimtarget "tank_boss"
							KillAimTarget 1
							Delay 5
							Cooldown 2
							Repeats 0
							Duration 10
						}
						AddTemplate Red
					}
				}
			}
		}
		WaveSpawn
		{
			Name "FakeSpawn"
			WaitForAllDead "guard4"
			Where spawnbot_ambush
			TotalCount 60
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 0	
			PointTemplate   // PointTemplate spawner. Counts as alive until all entites in the template are removed
			{
				SpawnAtEntity Where // Entity to spawn the template at, "Where" spawns at the bot spawn as indicated by where. If omitted, spawns at world origin
				IsCrit 0 // Shows icon as critical (Default: 0)
				IsMiniBoss 0 // Shows icon as mini boss (Default: 0)
				ClassIcon pyro_flare_red // ClassIcon to use
				Name "FakeIcon" // Template name to use
				Origin "0 0 0" // Position where to spawn the template. If SpawnAtEntity is specified, relative to entity
				Angles "0 0 0" // Rotation of the template
				SpawnCurrencyPack "yes"
			}
		}
		WaveSpawn
		{
			Name "part04"
			Where redspawn_top
			TotalCount 60
			MaxActive 8
			SpawnCount 1
			WaitBeforeStarting 4
			WaitBetweenSpawns 1.5
			TotalCurrency 100
			Support Limited
			RandomSpawn 1
			RandomChoice
			{
				RandomChoice
				{
					TFBot
					{
						Template T_TFBot_Pyro_Flaregun_Hard
						ExtAttr IgnoreNPC
						AddTemplate Red
					}
				}
			}
		}
		WaveSpawn
		{
			Name "FakeSpawn"
			WaitForAllDead "guard4"
			Where spawnbot_ambush
			TotalCount 2
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 0	
			PointTemplate   // PointTemplate spawner. Counts as alive until all entites in the template are removed
			{
				SpawnAtEntity Where // Entity to spawn the template at, "Where" spawns at the bot spawn as indicated by where. If omitted, spawns at world origin
				IsCrit 0 // Shows icon as critical (Default: 0)
				IsMiniBoss 1 // Shows icon as mini boss (Default: 0)
				ClassIcon heavy_heater_giant // ClassIcon to use
				Name "FakeIcon" // Template name to use
				Origin "0 0 0" // Position where to spawn the template. If SpawnAtEntity is specified, relative to entity
				Angles "0 0 0" // Rotation of the template
				SpawnCurrencyPack "yes"
			}
		}
		WaveSpawn
		{
			Name "part04"
			Where redspawn_close
			TotalCount 2
			MaxActive 2
			SpawnCount 1
			WaitBeforeStarting 4
			WaitBetweenSpawns 12
			TotalCurrency 100
			Support Limited
			RandomSpawn 1
			RandomChoice
			{
				RandomChoice
				{
					TFBot
					{
						Template T_TFBot_Giant_Heavyweapons_Heater
						AddTemplate Red_Giant
					}
				}
			}
		}
		WaveSpawn
		{
			Name "infinite"
			WaitForAllSpawned "part04"
			Where ""
			TotalCount 9999
			MaxActive 16
			SpawnCount 1
			WaitBeforeStarting 15
			WaitBetweenSpawns 2
			TotalCurrency 0
			Support 1
			RandomSpawn 1
			TFBot
			{ 
				Class Engineer
				ClassIcon engineer_jag_lite
				Skill Hard
				WeaponRestrictions MeleeOnly
				Attributes AlwaysCrit
				ExtAttr IgnoreNPC
				DesiredAttackRange 80
				Item "The Jag"
				AddTemplate Red
			}
		}				
	}

	Wave // Wave 3
	{
		WaitWhenDone 65
		Checkpoint Yes
		StartWaveOutput
		{
			Target wave_start_relay
			Action Trigger
		}
		DoneOutput
		{
			Target wave_finished_relay
			Action Trigger
		}
		InitWaveOutput
		{
			Target holograms_3way_relay
			Action Trigger
		}

		WaveSpawn
		{
			Where spawnbot_ambush
			TotalCount 1
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 999999
			WaitBetweenSpawns 0
			TotalCurrency 0
			HideIcon 1   // Hides icons from the wave bar. Should use a ClassIcon different from visible ones 
			TFBot
			{  
				Class Scout
				ClassIcon red2_lite
			}
		}
		WaveSpawn // Tank 30K HP
        {
            Name "payload"
            TotalCount 1
            MaxActive 1
            SpawnCount 1
            WaitBeforeStarting 0
            WaitBetweenSpawns 0   
            TotalCurrency 0
            Support Limited
            Tank
            {
                Name "ambulancetank"
                StartingPathTrackNode "tankpath_a1"
                Health 35000
                Speed 100
                Skin 0
				ClassIcon tank_regen
				SpawnTemplate "ambulance_tank"
                Model "models/empty.mdl"
                StartSound "misc/null.wav"
				PingSound "misc/null.wav"
				EngineLoopSound "Taunt.TankForward"
				DisableTracks 1  
				DisableSmokestack 1  
				DisableChildModels 1
                OnBombDroppedOutput
                {
                    Target boss_deploy_relay
                    Action Trigger
                }
            }
        }
		WaveSpawn // Dummy
		{
			WaitForAllDead "payload"
			TotalCount 0
			SpawnCount 0
			WaitBeforeStarting 0.5
			Support Limited
			FirstSpawnOutput
			{
				Target redwin_relay
				Action Trigger
			}
		}
		WaveSpawn 
		{
			Name "guard1"
			where barrierguard1
			TotalCount 1
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 100
			DoneOutput
			{
				Target barrier_1_relay
				Action Trigger
			}
			TFBot
			{
				Name "Rebuilt Crits"
				Class Soldier
				ClassIcon soldier_sergeant_crits_red
				Health 25000
				Attributes MiniBoss
				Attributes UseBossHealthBar
				Attributes HoldFireUntilFullReload
				Skill Expert
				WeaponRestrictions PrimaryOnly
				AddTemplate Red_Giant
				ExtAttr IgnoreNPC
				UseCustomModel "models/bots/soldier_boss/bot_soldier_boss_gibby.mdl"
				Item "Upgradeable TF_WEAPON_ROCKETLAUNCHER"
				Item "Tyrant's Helm"
				ItemAttributes
				{
					ItemName "Upgradeable TF_WEAPON_ROCKETLAUNCHER"
					"faster reload rate" 0.6
					"fire rate bonus" 0.2
					"clip size upgrade atomic" 7.0
					"projectile speed increased" 1.3
					"critboost on kill" 3
				}
				CharacterAttributes
				{
					"move speed bonus" 0.5
					"damage force reduction" 0
					"airblast vulnerability multiplier" 0
					"override footstep sound set" 3
				}
			}
		}
		WaveSpawn 
		{
			Name "guard2"
			Where barrierguard2
			TotalCount 1
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 1
			WaitBetweenSpawns 0
			TotalCurrency 100
			DoneOutput
			{
				Target barrier_2_relay
				Action Trigger
			}
			TFBot
			{
				Name "Rebuilt Bomber"
				Class Demoman
				ClassIcon demo_bomber
				Health 20000
				Attributes MiniBoss
				Attributes UseBossHealthBar
				Attributes HoldFireUntilFullReload
				Skill Expert
				WeaponRestrictions PrimaryOnly
				AddTemplate Red_Giant
				ExtAttr IgnoreNPC
				UseCustomModel "models/bots/demo_boss/bot_demo_boss_gibby.mdl"
				Item "Upgradeable TF_WEAPON_GRENADELAUNCHER"
				Item "Prince Tavish's Crown"
				ItemAttributes
				{
					ItemName "Upgradeable TF_WEAPON_GRENADELAUNCHER"
					"fire rate bonus" 0.2
					"faster reload rate" 0.3
					"clip size bonus" 3.0
					"projectile speed increased" 1.5
					"damage bonus" 1.25
					"critboost on kill" 3
				}
				CharacterAttributes
				{
					"move speed bonus" 0.5
					"damage force reduction" 0
					"airblast vulnerability multiplier" 0
					"override footstep sound set" 4
				}
			}
		}
		WaveSpawn 
		{
			Name "guard3"
			where barrierguard3
			TotalCount 1
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 1
			WaitBetweenSpawns 0
			TotalCurrency 100
			DoneOutput
			{
				Target barrier_3_relay
				Action Trigger
			}
			TFBot
			{
				Name "Chief Hipfire Sniper"
				Class Sniper
				ClassIcon sniper_alwaysfire
				Health 20000
				Attributes MiniBoss
				Attributes UseBossHealthBar
				Attributes AlwaysFireWeapon
				Skill Expert
				WeaponRestrictions PrimaryOnly
				AddTemplate Red_Giant
				ExtAttr IgnoreNPC
				UseCustomModel "models/bots/sniper_boss/bot_sniper_boss.mdl"
				Item "Shooting Star"
				Item "Corona Australis"
				Item "Starduster"
				ItemAttributes
				{
					ItemName "Shooting Star"
					"sniper only fire zoomed" 0
					"faster reload rate" 1.15
					"damage bonus" 2
				}
				CharacterAttributes
				{
					"move speed bonus" 0.5
					"damage force reduction" 0
					"airblast vulnerability multiplier" 0
					"override footstep sound set" 7
				}
			}
		}
		WaveSpawn
		{
			Name "guard4"
			Where hatchspawn
			TotalCount 1
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 1
			WaitBetweenSpawns 0
			TotalCurrency 200
			DoneOutput
			{
				Target barrier_final_relay
				Action Trigger
			}
			TFBot
			{
				Name "Chief Super-Regen Heavy"
				Class Heavyweapons
				ClassIcon heavy_healonkill
				Health 20000
				Attributes MiniBoss
				Attributes UseBossHealthBar
				Skill Expert
				MaxVisionRange 1200
				AddTemplate Red_Giant
				ExtAttr IgnoreNPC
				Item "Iron Curtain"
				Item "The Family Business"
				Item "The Tungsten Toque"
				ItemAttributes
				{
					ItemName "Iron Curtain"
					"damage bonus" 1.2
					"heal on kill" 2000
					"heal on hit for rapidfire" 80
					"mod minigun can holster while spinning" 1
				}
				ItemAttributes
				{
					ItemName "The Family Business"
					"fire rate bonus" 1.5
					"bullets per shot bonus" 10
					"heal on hit for rapidfire" 1000
					"damage penalty" 0.6
					"faster reload rate" 0.1
				}
				CharacterAttributes
				{
					"move speed bonus" 0.5
					"damage force reduction" 0
					"airblast vulnerability multiplier" 0
					"override footstep sound set" 2
					"deploy time decreased" 0.0025
					"health regen" 250
				}
				WeaponSwitch
				{
					Delay 20
					Cooldown 10
					Repeats 0
					Type "Secondary"
				}
				WeaponSwitch
				{
					Delay 25
					Cooldown 10
					Repeats 0
					Type "Primary"
				}
			}	
		}
		WaveSpawn
		{
			Name "FakeSpawn"
			WaitForAllDead "guard1"
			Where spawnbot_ambush
			TotalCount 90
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 0	
			PointTemplate   // PointTemplate spawner. Counts as alive until all entites in the template are removed
			{
				SpawnAtEntity Where // Entity to spawn the template at, "Where" spawns at the bot spawn as indicated by where. If omitted, spawns at world origin
				IsCrit 0 // Shows icon as critical (Default: 0)
				IsMiniBoss 0 // Shows icon as mini boss (Default: 0)
				ClassIcon sniper_bushwacka_buff // ClassIcon to use
				Name "FakeIcon" // Template name to use
				Origin "0 0 0" // Position where to spawn the template. If SpawnAtEntity is specified, relative to entity
				Angles "0 0 0" // Rotation of the template
				SpawnCurrencyPack "yes"
			}
		}
		WaveSpawn 
		{
			Name "part01"
			where redspawn_biome1
			where redspawn_tunnel1
			TotalCount 90
			MaxActive 9
			SpawnCount 1
			WaitBeforeStarting 1
			WaitBetweenSpawns 1
			TotalCurrency 100
			Support Limited
			RandomSpawn 1
			RandomChoice
			{
				RandomChoice
				{
					TFBot
					{
						Template T_TFBot_Sniper_Bushwacka
						ClassIcon sniper_bushwacka_buff
						Attributes SpawnWithFullCharge
						Item "The Buff Banner"
						DesiredAttackRange 80
						ExtAttr IgnoreNPC
						CharacterAttributes
						{
							"increase buff duration" 20
							"deploy time decreased" 0.5
						}
						AddTemplate Red
					}
					TFBot
					{
						Template T_TFBot_Sniper_Bushwacka
						ClassIcon sniper_bushwacka_buff
						Attributes SpawnWithFullCharge
						Item "The Buff Banner"
						DesiredAttackRange 80
						ExtAttr IgnoreNPC
						CharacterAttributes
						{
							"increase buff duration" 20
							"deploy time decreased" 0.5
						}
						AddTemplate Red
					}
					TFBot
					{
						Template T_TFBot_Sniper_Bushwacka
						ClassIcon sniper_bushwacka_buff
						Attributes SpawnWithFullCharge
						Item "The Buff Banner"
						DesiredAttackRange 80
						Interruptaction
						{
							Target "tank_boss"
							Aimtarget "tank_boss"
							KillAimTarget 1
							Delay 5
							Cooldown 2
							Repeats 0
							Duration 10
						}
						CharacterAttributes
						{
							"increase buff duration" 20
							"deploy time decreased" 0.5
						}
						AddTemplate Red
					}
				}
			}
		}
		WaveSpawn
		{
			Name "FakeSpawn"
			WaitForAllDead "guard1"
			Where spawnbot_ambush
			TotalCount 30
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 0	
			PointTemplate   // PointTemplate spawner. Counts as alive until all entites in the template are removed
			{
				SpawnAtEntity Where // Entity to spawn the template at, "Where" spawns at the bot spawn as indicated by where. If omitted, spawns at world origin
				IsCrit 0 // Shows icon as critical (Default: 0)
				IsMiniBoss 0 // Shows icon as mini boss (Default: 0)
				ClassIcon scout_winger_lite // ClassIcon to use
				Name "FakeIcon" // Template name to use
				Origin "0 0 0" // Position where to spawn the template. If SpawnAtEntity is specified, relative to entity
				Angles "0 0 0" // Rotation of the template
				SpawnCurrencyPack "yes"
			}
		}
		WaveSpawn 
		{
			Name "part01"
			where redspawn_biome1
			where redspawn_tunnel1
			TotalCount 30
			MaxActive 4
			SpawnCount 1
			WaitBeforeStarting 1
			WaitBetweenSpawns 4
			TotalCurrency 100
			Support Limited
			RandomSpawn 1
			RandomChoice
			{
				RandomChoice
				{
					TFBot
					{
						Class Scout
						Name "Winger Scout"
						ClassIcon scout_winger_lite
						Skill Normal
						WeaponRestrictions SecondaryOnly
						ExtAttr IgnoreNPC
						Item "The Winger"
						ItemAttributes
						{
							ItemName "The Winger"
							"damage bonus" 0.75
							"faster reload rate" 5.0
							"fire rate bonus" 0.3
						}
						AddTemplate Red_Easy
					}
					TFBot
					{
						Class Scout
						Name "Winger Scout"
						ClassIcon scout_winger_lite
						Skill Normal
						WeaponRestrictions SecondaryOnly
						ExtAttr IgnoreNPC
						Item "The Winger"
						ItemAttributes
						{
							ItemName "The Winger"
							"damage bonus" 0.75
							"faster reload rate" 5.0
							"fire rate bonus" 0.3
						}
						AddTemplate Red_Easy
					}
					TFBot
					{
						Class Scout
						Name "Winger Scout"
						ClassIcon scout_winger_lite
						WeaponRestrictions SecondaryOnly
						Item "The Winger"
						Interruptaction
						{
							Target "tank_boss"
							Aimtarget "tank_boss"
							KillAimTarget 1
							Delay 5
							Cooldown 2
							Repeats 0
							Duration 10
						}
						ItemAttributes
						{
							ItemName "The Winger"
							"damage bonus" 0.75
							"faster reload rate" 5.0
							"fire rate bonus" 0.3
						}
						AddTemplate Red
					}
				}
			}
		}
		WaveSpawn
		{
			Name "FakeSpawn"
			WaitForAllDead "guard2"
			Where spawnbot_ambush
			TotalCount 40
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 0	
			PointTemplate   // PointTemplate spawner. Counts as alive until all entites in the template are removed
			{
				SpawnAtEntity Where // Entity to spawn the template at, "Where" spawns at the bot spawn as indicated by where. If omitted, spawns at world origin
				IsCrit 0 // Shows icon as critical (Default: 0)
				IsMiniBoss 0 // Shows icon as mini boss (Default: 0)
				ClassIcon soldier // ClassIcon to use
				Name "FakeIcon" // Template name to use
				Origin "0 0 0" // Position where to spawn the template. If SpawnAtEntity is specified, relative to entity
				Angles "0 0 0" // Rotation of the template
				SpawnCurrencyPack "yes"
			}
		}
		WaveSpawn 
		{
			Name "part02"
			where redspawn_tunnel2
			where redspawn_biome2
			TotalCount 40
			MaxActive 8
			SpawnCount 1
			WaitBeforeStarting 1
			WaitBetweenSpawns 1
			TotalCurrency 100
			Support Limited
			RandomSpawn 1
			RandomChoice
			{
				RandomChoice
				{
					TFBot
					{
						Class Soldier
						Skill Normal
						ExtAttr IgnoreNPC
						AddTemplate Red_Easy
					}
					TFBot
					{
						Class Soldier
						Skill Normal
						ExtAttr IgnoreNPC
						AddTemplate Red_Easy
					}
					TFBot
					{
						Class Soldier
						Skill Normal
						Interruptaction
						{
							Target "tank_boss"
							Aimtarget "tank_boss"
							KillAimTarget 1
							Delay 5
							Cooldown 2
							Repeats 0
							Duration 10
						}
						AddTemplate Red_Easy
					}
				}
			}
		}
		WaveSpawn
		{
			Name "FakeSpawn"
			WaitForAllDead "guard2"
			Where spawnbot_ambush
			TotalCount 1
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 0	
			PointTemplate   // PointTemplate spawner. Counts as alive until all entites in the template are removed
			{
				SpawnAtEntity Where // Entity to spawn the template at, "Where" spawns at the bot spawn as indicated by where. If omitted, spawns at world origin
				IsCrit 0 // Shows icon as critical (Default: 0)
				IsMiniBoss 1 // Shows icon as mini boss (Default: 0)
				ClassIcon demo_scatter_red_giant // ClassIcon to use
				Name "FakeIcon" // Template name to use
				Origin "0 0 0" // Position where to spawn the template. If SpawnAtEntity is specified, relative to entity
				Angles "0 0 0" // Rotation of the template
				SpawnCurrencyPack "yes"
			}
		}
		WaveSpawn
		{
			Name "FakeSpawn"
			WaitForAllDead "guard2"
			Where spawnbot_ambush
			TotalCount 1
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 0	
			PointTemplate   // PointTemplate spawner. Counts as alive until all entites in the template are removed
			{
				SpawnAtEntity Where // Entity to spawn the template at, "Where" spawns at the bot spawn as indicated by where. If omitted, spawns at world origin
				IsCrit 0 // Shows icon as critical (Default: 0)
				IsMiniBoss 1 // Shows icon as mini boss (Default: 0)
				ClassIcon medic_kritz_red_giant // ClassIcon to use
				Name "FakeIcon" // Template name to use
				Origin "0 0 0" // Position where to spawn the template. If SpawnAtEntity is specified, relative to entity
				Angles "0 0 0" // Rotation of the template
				SpawnCurrencyPack "yes"
			}
		}
		WaveSpawn
		{
			Name "part02"
			Where redspawn_tunnel2
			TotalCount 2
			MaxActive 2
			SpawnCount 2
			WaitBeforeStarting 1
			WaitBetweenSpawns 0
			TotalCurrency 100
			Support Limited
			RandomChoice
			{
				Squad
				{
					TFBot
					{
						Template T_TFBot_Giant_Demo_Barrage
						ClassIcon demo_scatter_red_giant
						ExtAttr IgnoreNPC
						AddTemplate Red_Giant
					}
					TFBot
					{
						Template T_TFBot_Red_Giant_Medic_Kritz
					}
				}
			}
		}
		WaveSpawn
		{
			Name "FakeSpawn"
			WaitForAllDead "guard3"
			Where spawnbot_ambush
			TotalCount 64
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 0	
			PointTemplate   // PointTemplate spawner. Counts as alive until all entites in the template are removed
			{
				SpawnAtEntity Where // Entity to spawn the template at, "Where" spawns at the bot spawn as indicated by where. If omitted, spawns at world origin
				IsCrit 0 // Shows icon as critical (Default: 0)
				IsMiniBoss 0 // Shows icon as mini boss (Default: 0)
				ClassIcon heavy_shotgun_red // ClassIcon to use
				Name "FakeIcon" // Template name to use
				Origin "0 0 0" // Position where to spawn the template. If SpawnAtEntity is specified, relative to entity
				Angles "0 0 0" // Rotation of the template
				SpawnCurrencyPack "yes"
			}
		}
		WaveSpawn 
		{
			Name "part02"
			where redspawn_mid2
			where redspawn_mid3
			TotalCount 64
			MaxActive 8
			SpawnCount 1
			WaitBeforeStarting 1
			WaitBetweenSpawns 1
			TotalCurrency 100
			Support Limited
			RandomSpawn 1
			RandomChoice
			{
				RandomChoice
				{
					TFBot
					{
						Template T_TFBot_Heavyweapons_Shotgun
						ClassIcon heavy_shotgun_red
						ExtAttr IgnoreNPC
						AddTemplate Red
					}
					TFBot
					{
						Template T_TFBot_Heavyweapons_Shotgun
						ClassIcon heavy_shotgun_red
						ExtAttr IgnoreNPC
						AddTemplate Red
					}
					TFBot
					{
						Template T_TFBot_Heavyweapons_Shotgun
						ClassIcon heavy_shotgun_red
						Interruptaction
						{
							Target "tank_boss"
							Aimtarget "tank_boss"
							KillAimTarget 1
							Delay 5
							Cooldown 2
							Repeats 0
							Duration 10
						}
						AddTemplate Red
					}
					TFBot
					{
						Template T_TFBot_Heavyweapons_Shotgun
						ClassIcon heavy_shotgun_red
						ExtAttr IgnoreNPC
						Name "Healvy Shotgun"
						Item "The Family Business"
						Item "The Tungsten Toque"
						ItemAttributes
						{
							ItemName "The Family Business"
							"heal on hit for rapidfire" 40
							"health regen" 10
							"heal on kill" 300
						}
						AddTemplate Red
					}
					TFBot
					{
						Template T_TFBot_Heavyweapons_Shotgun
						ClassIcon heavy_shotgun_red
						ExtAttr IgnoreNPC
						Name "Healvy Shotgun"
						Item "The Family Business"
						Item "The Tungsten Toque"
						ItemAttributes
						{
							ItemName "The Family Business"
							"heal on hit for rapidfire" 40
							"health regen" 10
							"heal on kill" 300
						}
						AddTemplate Red
					}
					TFBot
					{
						Template T_TFBot_Heavyweapons_Shotgun
						ClassIcon heavy_shotgun_red
						Name "Healvy Shotgun"
						Interruptaction
						{
							Target "tank_boss"
							Aimtarget "tank_boss"
							KillAimTarget 1
							Delay 5
							Cooldown 2
							Repeats 0
							Duration 10
						}
						Item "The Family Business"
						Item "The Tungsten Toque"
						ItemAttributes
						{
							ItemName "The Family Business"
							"heal on hit for rapidfire" 40
							"health regen" 10
							"heal on kill" 300
						}
						AddTemplate Red
					}		
				}
			}
		}
		WaveSpawn
		{
			Name "FakeSpawn"
			WaitForAllDead "guard3"
			Where spawnbot_ambush
			TotalCount 3
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 0	
			PointTemplate   // PointTemplate spawner. Counts as alive until all entites in the template are removed
			{
				SpawnAtEntity Where // Entity to spawn the template at, "Where" spawns at the bot spawn as indicated by where. If omitted, spawns at world origin
				IsCrit 0 // Shows icon as critical (Default: 0)
				IsMiniBoss 1 // Shows icon as mini boss (Default: 0)
				ClassIcon pyro_dragon_fury_swordstone_giant // ClassIcon to use
				Name "FakeIcon" // Template name to use
				Origin "0 0 0" // Position where to spawn the template. If SpawnAtEntity is specified, relative to entity
				Angles "0 0 0" // Rotation of the template
				SpawnCurrencyPack "yes"
			}
		}
		WaveSpawn
		{
			Name "FakeSpawn"
			WaitForAllDead "guard3"
			Where spawnbot_ambush
			TotalCount 9
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 0	
			PointTemplate   // PointTemplate spawner. Counts as alive until all entites in the template are removed
			{
				SpawnAtEntity Where // Entity to spawn the template at, "Where" spawns at the bot spawn as indicated by where. If omitted, spawns at world origin
				IsCrit 0 // Shows icon as critical (Default: 0)
				IsMiniBoss 0 // Shows icon as mini boss (Default: 0)
				ClassIcon medic_uber_critcan // ClassIcon to use
				Name "FakeIcon" // Template name to use
				Origin "0 0 0" // Position where to spawn the template. If SpawnAtEntity is specified, relative to entity
				Angles "0 0 0" // Rotation of the template
				SpawnCurrencyPack "yes"
			}
		}
		WaveSpawn
		{
			Name "part02"
			Where redspawn_mid3
			TotalCount 12
			MaxActive 8
			SpawnCount 4
			WaitBeforeStarting 1
			WaitBetweenSpawns 0
			TotalCurrency 100
			Support Limited
			RandomChoice
			{
				Squad
				{
					TFBot
					{
						Template T_TFBot_Giant_Pyro_Fury
						ExtAttr IgnoreNPC
						AddTemplate Red_Giant
					}
					TFBot
					{
						Template T_TFBot_Red_Medic_Critcan
					}
					TFBot
					{
						Template T_TFBot_Red_Medic_Critcan
					}
					TFBot
					{
						Template T_TFBot_Red_Medic_Critcan
					}
				}
			}
		}
		WaveSpawn
		{
			Name "FakeSpawn"
			WaitForAllDead "guard4"
			Where spawnbot_ambush
			TotalCount 16
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 0
			TotalCurrency 0	
			PointTemplate   // PointTemplate spawner. Counts as alive until all entites in the template are removed
			{
				SpawnAtEntity Where // Entity to spawn the template at, "Where" spawns at the bot spawn as indicated by where. If omitted, spawns at world origin
				IsCrit 0 // Shows icon as critical (Default: 0)
				IsMiniBoss 0 // Shows icon as mini boss (Default: 0)
				ClassIcon heavy_steelfist_pusher // ClassIcon to use
				Name "FakeIcon" // Template name to use
				Origin "0 0 0" // Position where to spawn the template. If SpawnAtEntity is specified, relative to entity
				Angles "0 0 0" // Rotation of the template
				SpawnCurrencyPack "yes"
			}
		}
		WaveSpawn 
		{
			Name "part03"
			where redspawn_top
			TotalCount 20
			MaxActive 4
			SpawnCount 2
			WaitBeforeStarting 1
			WaitBetweenSpawns 4
			TotalCurrency 100
			Support Limited
			RandomSpawn 1
			RandomChoice
			{
				RandomChoice
				{
					TFBot
					{
						Template T_TFBot_Heavy_IronFist_Airblast
						ClassIcon heavy_steelfist_pusher
						ExtAttr IgnoreNPC
						AddTemplate Red
					}
					TFBot
					{
						Template T_TFBot_Heavy_IronFist_Airblast
						ClassIcon heavy_steelfist_pusher
						ExtAttr IgnoreNPC
						AddTemplate Red
					}
					TFBot
					{
						Template T_TFBot_Heavy_IronFist_Airblast
						ClassIcon heavy_steelfist_pusher
						Interruptaction
						{
							Target "tank_boss"
							Aimtarget "tank_boss"
							KillAimTarget 1
							Delay 5
							Cooldown 2
							Repeats 0
							Duration 10
						}
						AddTemplate Red
					}
				}
			}
		}
	}

	// Wave // Wave #
	// {
	// 	WaitWhenDone 65
    //     Checkpoint Yes
	// 	StartWaveOutput
	// 	{
	// 		Target wave_start_relay
	// 		Action Trigger
	// 	}
	// 	DoneOutput
	// 	{
	// 		Target wave_finished_relay
	// 		Action Trigger
	// 	}
	// 	InitWaveOutput
	// 	{
	// 		Target holograms_3way_relay
	// 		Action Trigger
	// 	}

	// 	WaveSpawn // Dummy
	// 	{
	// 		TotalCount 0
	// 		SpawnCount 0
	// 		WaitBeforeStarting 0
	// 		FirstSpawnWarningSound "mvm/giant_heavy/giant_heavy_entrance.wav"
	// 		FirstSpawnOutput
	// 		{
	// 			Target hatchspawn
	// 			Action Enable
	// 		}
	// 	}
	// 	WaveSpawn
	// 	{
	// 		Where spawnbot_ambush
	// 		TotalCount 1
	// 		MaxActive 1
	// 		SpawnCount 1
	// 		WaitBeforeStarting 999999
	// 		WaitBetweenSpawns 0
	// 		TotalCurrency 0
	// 		HideIcon 1   // Hides icons from the wave bar. Should use a ClassIcon different from visible ones 
	// 		TFBot
	// 		{  
	// 			Class Scout
	// 			ClassIcon red2_lite
	// 		}
	// 	}
	// 	WaveSpawn
	// 	{
	// 		Name "final"
	// 		Where hatchspawn
	// 		TotalCount 1
	// 		MaxActive 1
	// 		SpawnCount 1
	// 		WaitBeforeStarting 1
	// 		WaitBetweenSpawns 0
	// 		TotalCurrency 0
	// 		TFBot
	// 		{
	// 			Name "The Ultimate League"
	// 			Class Scout
	// 			ClassIcon scout_rng
	// 			Scale 6
	// 			Health 200000
	// 			Attributes MiniBoss
	// 			Attributes DisableDodge
	// 			Attributes Parachute
	// 			Attributes AlwaysCrit
	// 			Attributes UseBossHealthBar
	// 			Skill Expert
	// 			MaxVisionRange -1
	// 			Tag bot_giant
	// 			Action Mobber
	// 			AddCond { Name "TF_COND_REPROGRAMMED" }
	// 			ExtAttr IgnoreBuildings
	// 			ExtAttr IgnoreNPC
	// 			NoPushaway 1
	// 			SpawnTemplate BossEntities
	// 			SpawnTemplate BossDeathEntities
	// 			Item "powerhouse_scattergun_currentevent"
	// 			Item "Death Racer's Helmet"
	// 			Item "Iron Lung"
	// 			Item "Shin Shredders"
	// 			ChangeAttributes
	// 			{
	// 				Delay 0.1
	// 				Repeats 1
	// 				IfHealthBelow 200001
	// 				Name "phase1"
	// 			}
	// 			ChangeAttributes
	// 			{
	// 				Delay 0
	// 				Repeats 1
	// 				IfHealthBelow 100000
	// 				Name "phase2"
	// 			}
	// 			ChangeAttributes
	// 			{
	// 				Delay 0
	// 				Repeats 1
	// 				IfHealthBelow 50000
	// 				Name "phase3"
	// 			}
	// 			ChangeAttributes
	// 			{
	// 				Delay 0
	// 				Repeats 1
	// 				IfHealthBelow 10000
	// 				Name "phase4"
	// 			}
	// 			EventChangeAttributes
	// 			{
	// 				phase1
	// 				{
	// 					WeaponRestrictions PrimaryOnly
	// 					Attributes HoldFireUntilFullReload
	// 					ItemAttributes
	// 					{
	// 						ItemName "powerhouse_scattergun_currentevent"
	// 						"override projectile type" 2
	// 						"damage bonus" 5
	// 						"projectile trail particle" "eyeboss_projectile"
	// 						"custom projectile model" "models/weapons/w_models/w_rocketbullet.mdl"
	// 						"set_item_texture_wear" 0
	// 						"faster reload rate" 0.1
	// 						"fire rate bonus" 0.05
	// 						"projectile spread angle penalty" 360
	// 						"clip size bonus" 6.67
	// 						"projectile lifetime" 6
	// 						"gesture speed increase" 0.25
	// 					}
	// 					CharacterAttributes
	// 					{
	// 						"move speed bonus" 1.75
	// 						// "increased jump height" 2.5
	// 						"no_jump" 1
	// 						"no double jump" 1
	// 						"damage force reduction" 0
	// 						"airblast vulnerability multiplier" 0
	// 						"airblast vertical vulnerability multiplier" 0
	// 						"override footstep sound set" 7
	// 						"ignore player clip" 1
	// 						"cannot be sapped" 1
	// 						"voice pitch scale" 0
	// 						"self dmg push force decreased" 0
	// 						"blast dmg to self increased" 0
	// 						"not solid to players" 1
	// 						"health from packs decreased" 0.01
	// 						"crit mod disabled" 0
	// 						"cancel falling damage"	1
	// 					}
	// 					HomingRockets  
	// 					{
	// 						Enable	1
	// 						IgnoreDisguisedSpies 1
	// 						IgnoreStealthedSpies 1
	// 						TurnPower 150
	// 						MaxAimError 150
	// 						RocketSpeed 0.5
	// 					}
	// 				}
	// 				phase2
	// 				{
	// 					WeaponRestrictions PrimaryOnly
	// 					ItemAttributes
	// 					{
	// 						ItemName "powerhouse_scattergun_currentevent"
	// 						"override projectile type" 13
	// 						"energy weapon penetration" 1
	// 						"set item tint RGB"	10027263
	// 						"damage bonus" 0.5
	// 						"projectile trail particle" "eyeboss_projectile"
	// 						"custom projectile model" "models/weapons/w_models/w_rocketbullet.mdl"
	// 						"set_item_texture_wear" 0
	// 						"faster reload rate" 0.001
	// 						"fire rate bonus" 0.05
	// 						// "hand scale" 4
	// 						"projectile spread angle penalty" 4
	// 						"gesture speed increase" 0.25
	// 					}
	// 					CharacterAttributes
	// 					{
	// 						"move speed bonus" 1.75
	// 						// "increased jump height" 2.5
	// 						"no_jump" 1
	// 						"no double jump" 1
	// 						"damage force reduction" 0
	// 						"airblast vulnerability multiplier" 0
	// 						"airblast vertical vulnerability multiplier" 0
	// 						"override footstep sound set" 7
	// 						"ignore player clip" 1
	// 						"cannot be sapped" 1
	// 						"voice pitch scale" 0
	// 						"self dmg push force decreased" 0
	// 						"blast dmg to self increased" 0
	// 						"not solid to players" 1
	// 						"health from packs decreased" 0.01
	// 						"crit mod disabled" 0
	// 						"cancel falling damage"	1
	// 					}
	// 				}
	// 				phase3
	// 				{
	// 					WeaponRestrictions SecondaryOnly
	// 					AimAt Feet
	// 					Item "The C.A.P.P.E.R"
	// 					Item "The B.A.S.E Jumper"
	// 					ItemAttributes
	// 					{
	// 						ItemName "powerhouse_scattergun_currentevent"
	// 						"override projectile type" 13
	// 						"energy weapon penetration" 1
	// 						"set item tint RGB"	10027263
	// 						"damage bonus" 0.5
	// 						"projectile trail particle" "eyeboss_projectile"
	// 						"custom projectile model" "models/weapons/w_models/w_rocketbullet.mdl"
	// 						"set_item_texture_wear" 0
	// 						"faster reload rate" 0.001
	// 						"fire rate bonus" 0.05
	// 						// "hand scale" 4
	// 						"projectile spread angle penalty" 4
	// 						"gesture speed increase" 0.25
	// 					}
	// 					ItemAttributes
	// 					{
	// 						ItemName "The C.A.P.P.E.R"
	// 			            "damage bonus" 5.2
	// 				        "sniper fires tracer" 1
    //                         "projectile penetration" 1
	// 				        "fire rate penalty" 10
	// 						"reload time decreased" 0.01
	// 				        "explosive bullets" 147
	// 					}
	// 					CharacterAttributes
	// 					{
	// 						"move speed bonus" 1.75
	// 						// "increased jump height" 2.5
	// 						"no double jump" 1
	// 						"no_jump" 1
	// 						"damage force reduction" 0
	// 						"airblast vulnerability multiplier" 0
	// 						"airblast vertical vulnerability multiplier" 0
	// 						"override footstep sound set" 7
	// 						"ignore player clip" 1
	// 						"cannot be sapped" 1
	// 						"voice pitch scale" 0
	// 						"self dmg push force decreased" 0
	// 						"blast dmg to self increased" 0
	// 						"not solid to players" 1
	// 						"health from packs decreased" 0.01
	// 						"crit mod disabled" 0
	// 						"cancel falling damage"	1
	// 					}
	// 				}
	// 				phase4
	// 				{
	// 					WeaponRestrictions SecondaryOnly
	// 					Attributes AlwaysFireWeapon
	// 					Item "Bombber_Boss"
	// 					Item "The B.A.S.E Jumper"
	// 					ItemAttributes
	// 					{
	// 						ItemName "powerhouse_scattergun_currentevent"
	// 						"override projectile type" 13
	// 						"energy weapon penetration" 1
	// 						"set item tint RGB"	10027263
	// 						"damage bonus" 0.5
	// 						"projectile trail particle" "eyeboss_projectile"
	// 						"custom projectile model" "models/weapons/w_models/w_rocketbullet.mdl"
	// 						"set_item_texture_wear" 0
	// 						"faster reload rate" 0.001
	// 						"fire rate bonus" 0.05
	// 						// "hand scale" 4
	// 						"projectile spread angle penalty" 4
	// 						"gesture speed increase" 0.25
	// 					}
	// 					CharacterAttributes
	// 					{
	// 						"move speed bonus" 1.75
	// 						// "increased jump height" 2.5
	// 						"no double jump" 1
	// 						"no_jump" 1
	// 						"damage force reduction" 0
	// 						"airblast vulnerability multiplier" 0
	// 						"airblast vertical vulnerability multiplier" 0
	// 						"override footstep sound set" 7
	// 						"ignore player clip" 1
	// 						"increased air control" 100
	// 						"cannot be sapped" 1
	// 						"voice pitch scale" 0
	// 						"self dmg push force decreased" 0
	// 						"blast dmg to self increased" 0
	// 						"not solid to players" 1
	// 						"health from packs decreased" 0.01
	// 						"crit mod disabled" 0
	// 						"cancel falling damage"	1
	// 					}
	// 				}
	// 			}	
	// 		}
	// 	}
	// }
}