//Made by Wacev
//Concept: Start with 0 destruction in the facility, there are events each wave that can destory parts of the facility
//Damage is carried between wave losses and can be prevented if the team is good enough
//Waves and paths adapt to the damage
//Targe tank breaking through a wall and fucking dies
//Singal jammer bot that shoots an EMP laser and opens the A doors
//!!All doors that aren't along the bomb path will be disabled at wave start!!
//Relays:
//
 // B1_wall_break_relay
 // B1_wall_fix_relay
 // B1_wall_drill_relay
 // C1_wall_break_relay
 // C1_wall_fix_relay
 // C1_wall_drill_relay
 // C1_door_lock_relay
 // C1_door_unlock_relay
 // A1_door_lock_relay
 // A1_door_unlock_relay
 // A2_door_lock_relay
 // A2_door_unlock_relay
 // A_route_wall_3_break_relay
 // A_route_wall_3_fix_relay
 // A_route_wall_2_break_relay
 // A_route_wall_2_fix_relay
 // relay_A
 // relay_B
 // relay_C
 // relay_D
 // relay_E
 // relay_A_flank
 // relay_B_flank
 // relay_C_flank
 // relay_D_flank
 // relay_E_flank
 // relay_tank_hologram_A
 // relay_tank_hologram_B
 // relay_tank_hologram_C
 // relay_tank_hologram_D
 // relay_tank_hologram_E
 // relay_monorail_hologram_B
 // relay_monorail_hologram_C
 // relay_monorail_hologram_D
 // relay_monorail_hologram_E
 // bombpath_holograms_clear_relay
 // tank_holograms_clear_relay
 // monorail_holograms_clear_relay
//
//Spawns and Paths:
//
 // spawnbot_right
 // spawnbot_right_tank
 // spawnbot_left
 // spawnbot_left_tank
 // spawnbot_A_route_giant
 // spawnbot_A_route
 // spawnbot_B2 //Spawns in front of B1 door
 // tube_bot_spawn
 // tank_path_A //Spawns left, goes far right
 // tank_path_B //Spawns left, goes middle then right
 // tank_path_C //Spawns left, goes middle
 // tank_path_D //Spawns right, goes straight then right
 // tank_path_E //Spawns right, goes straight then middle
 // tank_path_A_forward //Spawns in route A
 // tank_path_D_forward //Spawns in front of B1 door
 // tank_path_E_forward //Spawns in front of B1 door
 // monorail_path_b //Path of tank_path_B
 // monorail_path_c //Path of tank_path_C
 // monorail_path_d //Path of tank_path_D
 // monorail_path_e //Path of tank_path_E
 
#base robot_giant.pop
#base robot_standard.pop
#base robot_extras_revamped.pop
#base overclocks_wacev.pop 

WaveSchedule
{
	StartingCurrency 1500
	CanBotsAttackWhileInSpawnRoom No
	RespawnWaveTime 6
	
	PrecacheParticle drg_cow_rockettrail_burst_charged_blue
	PrecacheParticle drg_cow_explosioncore_charged_blue
	
	PrecacheGeneric "materials/colorcorrection/cc_system_fragmentation_explosion.raw"
	
	PointTemplates
	{
		FX
		{
			NoFixup 1
			color_correction
			{
				targetname "A_route_wall_Explode_cc"
				minfalloff 750
				maxfalloff 3000
				maxweight 0.67
				fadeInDuration 0
				fadeOutDuration 2
				startdisabled 1
				origin "480 629 52"
				filename "materials/colorcorrection/cc_system_fragmentation_explosion.raw"
			}
			
			info_particle_system
			{
				targetname "A_route_wall_3_Explode_Particle"
				angles "0 0 0"
				effect_name hightower_explosion
				start_active 0
				origin "480 629 52"
			}
			info_particle_system
			{
				targetname "A_route_wall_3_Explode_Particle"
				angles "0 0 0"
				effect_name fluidSmokeExpl_ring_mvm
				start_active 0
				origin "480 629 52"
			}
			info_particle_system
			{
				targetname "A_route_wall_3_Explode_Particle"
				angles "0 180 0"
				effect_name hightower_explosion
				start_active 0
				origin "632 616 184"
			}
			info_particle_system
			{
				targetname "A_route_wall_3_Explode_Particle"
				angles "0 180 0"
				effect_name fluidSmokeExpl_ring_mvm
				start_active 0
				origin "632 632 184"
			}
			ambient_generic
			{
				targetname A_route_wall_3_Explode_Sound
				spawnflags 49
				message "ambient\explosions\exp4.wav"
				health 10
				origin "565 816 164"
				radius 2000
			}
			ambient_generic
			{
				targetname A_route_wall_3_Explode_Sound
				spawnflags 49
				message "ambient\explosions\exp2.wav"
				health 10
				origin "565 816 164"
				radius 2000
			}
			ambient_generic
			{
				targetname A_route_wall_3_Explode_Sound
				spawnflags 49
				message "ambient\explosions\explode_5.wav"
				health 10
				origin "565 816 164"
				radius 2000
			}
			env_shake
			{
				targetname A_route_wall_3_Explode_Shake
				amplitude 20
				duration 6
				frequency 8
				spawnflags 28
				radius 3000
				origin "480 629 52"
			}
			logic_relay
			{
				targetname "A_route_wall_3_Explode_relay"
				OnTrigger "A_route_wall_3_Explode_Sound,playsound,,0,-1"
				OnTrigger "A_route_wall_3_break_relay,trigger,,0,-1"
				OnTrigger "A_route_wall_3_Explode_Particle,start,,0,-1"
				OnTrigger "A_route_wall_Explode_cc,$SetLocalOrigin,480 629 52,0,-1"
				OnTrigger "A_route_wall_Explode_cc,enable,,0.01,-1"
				OnTrigger "A_route_wall_Explode_cc,disable,,0.51,-1"
				OnTrigger "A_route_wall_3_Explode_Shake,startshake,,0,-1"
				
				OnTrigger "bignetRunScriptCodeSFR.SetProgress(`A_route_wall_3`,false)0-1"
			}
			
			info_particle_system
			{
				targetname "A_route_wall_2_Explode_Particle"
				angles "0 -90 0"
				effect_name hightower_explosion
				start_active 0
				origin "1400 -576 80"
			}
			info_particle_system
			{
				targetname "A_route_wall_2_Explode_Particle"
				angles "0 -90 0"
				effect_name fluidSmokeExpl_ring_mvm
				start_active 0
				origin "1400 -576 80"
			}
			info_particle_system
			{
				targetname "A_route_wall_2_Explode_Particle"
				angles "0 90 0"
				effect_name hightower_explosion
				start_active 0
				origin "1457 -832 14"
			}
			info_particle_system
			{
				targetname "A_route_wall_2_Explode_Particle"
				angles "0 90 0"
				effect_name fluidSmokeExpl_ring_mvm
				start_active 0
				origin "1457 -832 14"
			}
			ambient_generic
			{
				targetname A_route_wall_2_Explode_Sound
				spawnflags 49
				message "ambient\explosions\exp4.wav"
				health 10
				origin "1386 -695 51"
				radius 2000
			}
			ambient_generic
			{
				targetname A_route_wall_2_Explode_Sound
				spawnflags 49
				message "ambient\explosions\exp2.wav"
				health 10
				origin "1386 -695 51"
				radius 2000
			}
			ambient_generic
			{
				targetname A_route_wall_2_Explode_Sound
				spawnflags 49
				message "ambient\explosions\explode_5.wav"
				health 10
				origin "1386 -695 51"
				radius 2000
			}
			env_shake
			{
				targetname A_route_wall_2_Explode_Shake
				amplitude 20
				duration 6
				frequency 8
				spawnflags 28
				radius 3000
				origin "1386 -695 51"
			}
			logic_relay
			{
				targetname "A_route_wall_2_Explode_relay"
				OnTrigger "A_route_wall_2_Explode_Sound,playsound,,0,-1"
				OnTrigger "A_route_wall_2_break_relay,trigger,,0,-1"
				OnTrigger "A_route_wall_2_Explode_Particle,start,,0,-1"
				OnTrigger "A_route_wall_Explode_cc,$SetLocalOrigin,1386 -695 51,0,-1"
				OnTrigger "A_route_wall_Explode_cc,enable,,0.01,-1"
				OnTrigger "A_route_wall_Explode_cc,disable,,0.51,-1"
				OnTrigger "A_route_wall_2_Explode_Shake,startshake,,0,-1"
				
				OnTrigger "bignetRunScriptCodeSFR.SetProgress(`A_route_wall_2`, false )0-1"
			}
			
			logic_relay
			{
				targetname "b1_wall_break"
				OnTrigger "b1_wall_destroy_animation,enable,,0,-1"
				OnTrigger "b1_wall_destroy_animation,setanimation,drill_break,0,-1"
				OnTrigger "b1_wall_destroy_animation,disable,,16.67,-1"
				OnTrigger "b1_wall_destroy_animation,setanimation,idle,17,-1"
				OnTrigger "B1_wall_break_relay,trigger,,0,-1"
				
				OnTrigger "bignetRunScriptCodeSFR.SetProgress(`B1_wall`, false )0-1"
			}
			logic_relay
			{
				targetname "c1_wall_break"
				OnTrigger "c1_wall_destroy_animation,enable,,1.25,-1"
				OnTrigger "c1_wall_destroy_animation,setanimation,drill_break,0,-1"
				OnTrigger "c1_wall_destroy_animation,disable,,16.67,-1"
				OnTrigger "c1_wall_destroy_animation,setanimation,idle,17,-1"
				OnTrigger "C1_wall_break_relay,trigger,,1.25,-1"
				
				OnTrigger "bignetRunScriptCodeSFR.SetProgress(`C1_wall`, false )1.25-1"
			}
			
			info_particle_system
			{
				targetname "A_route_wall_4_Explode_Particle"
				angles "0 0 0"
				effect_name hightower_explosion
				start_active 0
				origin "432 -644 304"
			}
			info_particle_system
			{
				targetname "A_route_wall_4_Explode_Particle"
				angles "0 0 0"
				effect_name ExplosionCore_MidAir
				start_active 0
				origin "432 -644 304"
			}
			ambient_generic
			{
				targetname A_route_wall_4_Explode_Sound
				spawnflags 49
				message "ambient\explosions\exp4.wav"
				health 10
				origin "432 -644 368"
				radius 2000
			}
			ambient_generic
			{
				targetname A_route_wall_4_Explode_Sound
				spawnflags 49
				message "ambient\explosions\exp2.wav"
				health 10
				origin "432 -644 368"
				radius 2000
			}
			ambient_generic
			{
				targetname A_route_wall_4_Explode_Sound
				spawnflags 49
				message "ambient\explosions\explode_5.wav"
				health 10
				origin "432 -644 368"
				radius 2000
			}
			ambient_generic
			{
				targetname A_route_wall_4_Explode_Sound
				spawnflags 49
				message "ambient\explosions\explode_2.wav"
				health 10
				origin "432 -644 368"
				radius 2000
			}
			env_shake
			{
				targetname A_route_wall_4_Explode_Shake
				amplitude 10
				duration 6
				frequency 8
				spawnflags 28
				radius 3000
				origin "432 -644 368"
			}
			
			info_particle_system
			{
				targetname "A_route_wall_4_Explode_fire"
				angles "0 0 0"
				effect_name m_brazier_flame
				start_active 1
				origin "441 -638 311"
				parentname "A_route_wall_4_Explode_barrel_explosive"
			}
			prop_physics_override
			{
				targetname "A_route_wall_4_Explode_barrel_explosive"
				model "models/props_frontline/splosivebarrel.mdl"
				angles "0 300 0"
				skin 1
				solid 6
				origin "432 -644 256"
				ExplodeDamage 200
				ExplodeRadius 1000
				massscale 150
				minhealthdmg 5
				health 150
				max_health 150
				
				OnBreak "A_route_wall_4_Explode_Relay,trigger,,0,-1"
			}
			prop_physics_override
			{
				targetname "A_route_wall_4_Explode_barrel"
				model "models/props_frontline/splosivebarrel.mdl"
				angles "0 75 0"
				skin 0
				solid 6
				origin "400 -672 256"
				ExplodeDamage 200
				ExplodeRadius 100
				massscale 150
				minhealthdmg 100
				health 50
				max_health 50
			}
			prop_physics_override
			{
				targetname "A_route_wall_4_Explode_barrel"
				model "models/props_frontline/splosivebarrel.mdl"
				angles "0 180 0"
				skin 0
				solid 6
				origin "384 -640 256"
				ExplodeDamage 200
				ExplodeRadius 100
				massscale 150
				minhealthdmg 100
				health 50
				max_health 50
			}
			
			logic_relay
			{
				targetname "A_route_wall_4_Explode_Relay"
				// OnTrigger "A_route_wall_4_Explode_barrel,disable,,0,-1"
				OnTrigger "A_route_wall_4_Explode_Sound,playsound,,0,-1"
				OnTrigger "A_route_wall_4_break_relay,trigger,,0,-1"
				OnTrigger "A_route_wall_4_Explode_fire,stop,,0,-1"
				OnTrigger "A_route_wall_4_Explode_Particle,start,,0,-1"
				OnTrigger "A_route_wall_Explode_cc,$SetLocalOrigin,432 -644 368,0,-1"
				OnTrigger "A_route_wall_Explode_cc,enable,,0.01,-1"
				OnTrigger "A_route_wall_Explode_cc,disable,,0.11,-1"
				OnTrigger "A_route_wall_4_Explode_Shake,startshake,,0,-1"
				
				OnTrigger "bignetRunScriptCodeSFR.SetProgress(`A_route_wall_4`, false )0-1"
			}
		}
		
		New_Nav_Avoids
		{
			NoFixup 1
			func_nav_avoid
			{
				targetname "D_E_blocker_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "bomb_carrier common"
				origin "-1684 848 -128"
				maxs "496 208 64"
				mins "-496 -208 -64"
			}
			func_nav_avoid
			{
				targetname "D_E_blocker_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "bomb_carrier common"
				origin "-1776 -384 -96"
				maxs "368 256 96"
				mins "-368 -256 -96"
			}
			func_nav_avoid
			{
				targetname "A_B_C_blocker_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "bomb_carrier common"
				origin "-896 1328 -32"
				maxs "416 272 160"
				mins "-416 -272 -160"
			}
			func_nav_avoid
			{
				targetname "B_C_blocker_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "bomb_carrier common"
				origin "0 0 64"
				maxs "512 384 64"
				mins "-512 -384 -64"
			}
			func_nav_avoid
			{
				targetname "A_blocker_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "bomb_carrier common"
				origin "1280 -416 144"
				maxs "512 288 64"
				mins "-512 -288 -64"
			}
			func_nav_avoid
			{
				targetname "B_D_blocker_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "bomb_carrier common"
				origin "960 -1448 64"
				maxs "448 340 64"
				mins "-448 -340 -64"
			}
			func_nav_avoid
			{
				targetname "C_E_blocker_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "bomb_carrier common"
				origin "384 -2880 64"
				maxs "640 448 128"
				mins "-640 -448 -128"
			}
			func_nav_avoid
			{
				targetname "A_B_C_blocker_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "bomb_carrier common"
				origin "-896 1328 -32"
				maxs "416 272 320"
				mins "-416 -272 -320"
			}
			func_nav_avoid
			{
				targetname "A_B_D_blocker_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "bomb_carrier common"
				origin "1824 -2784 64"
				maxs "288 544 64"
				mins "-288 -544 -64"
			}
			func_nav_avoid
			{
				targetname "D_E_blocker_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "bomb_carrier common"
				origin "-1684 848 -128"
				maxs "496 208 64"
				mins "-496 -208 -64"
			}
			func_nav_avoid
			{
				targetname "D_E_blocker_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "bomb_carrier common"
				origin "-1776 -384 -96"
				maxs "368 256 96"
				mins "-368 -256 -96"
			}
			func_nav_avoid
			{
				targetname "A_B_C_blocker_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "bomb_carrier common"
				origin "-896 1328 -32"
				maxs "416 272 160"
				mins "-416 -272 -160"
			}
			func_nav_avoid
			{
				targetname "B_C_blocker_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "bomb_carrier common"
				origin "0 0 64"
				maxs "512 384 64"
				mins "-512 -384 -64"
			}
			func_nav_avoid
			{
				targetname "A_blocker_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "bomb_carrier common"
				origin "1280 -416 144"
				maxs "512 288 64"
				mins "-512 -288 -64"
			}
			func_nav_avoid
			{
				targetname "B_D_blocker_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "bomb_carrier common"
				origin "960 -1448 64"
				maxs "448 340 64"
				mins "-448 -340 -64"
			}
			func_nav_avoid
			{
				targetname "C_E_blocker_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "bomb_carrier common"
				origin "384 -2880 64"
				maxs "640 448 128"
				mins "-640 -448 -128"
			}
			func_nav_avoid
			{
				targetname "A_B_C_blocker_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "bomb_carrier common"
				origin "-896 1328 -32"
				maxs "416 272 320"
				mins "-416 -272 -320"
			}
			func_nav_avoid
			{
				targetname "A_B_D_blocker_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "bomb_carrier common"
				origin "1824 -2784 64"
				maxs "288 544 64"
				mins "-288 -544 -64"
			}
			
			func_nav_avoid
			{
				targetname "D_E_blocker_custom_main"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "-1684 848 -128"
				maxs "496 208 64"
				mins "-496 -208 -64"
			}
			func_nav_avoid
			{
				targetname "D_E_blocker_custom_main"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "-1776 -384 -96"
				maxs "368 256 96"
				mins "-368 -256 -96"
			}
			func_nav_avoid
			{
				targetname "A_B_C_blocker_custom_main"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "-896 1328 -32"
				maxs "416 272 160"
				mins "-416 -272 -160"
			}
			func_nav_avoid
			{
				targetname "B_C_blocker_custom_main"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "0 0 64"
				maxs "512 384 64"
				mins "-512 -384 -64"
			}
			func_nav_avoid
			{
				targetname "A_blocker_custom_main"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "1280 -416 144"
				maxs "512 288 64"
				mins "-512 -288 -64"
			}
			func_nav_avoid
			{
				targetname "B_D_blocker_custom_main"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "960 -1448 64"
				maxs "448 340 64"
				mins "-448 -340 -64"
			}
			func_nav_avoid
			{
				targetname "C_E_blocker_custom_main"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "384 -2880 64"
				maxs "640 448 128"
				mins "-640 -448 -128"
			}
			func_nav_avoid
			{
				targetname "A_B_C_blocker_custom_main"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "-896 1328 -32"
				maxs "416 272 320"
				mins "-416 -272 -320"
			}
			func_nav_avoid
			{
				targetname "A_B_D_blocker_custom_main"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "1824 -2784 64"
				maxs "288 544 64"
				mins "-288 -544 -64"
			}
			func_nav_avoid
			{
				targetname "D_E_blocker_custom_main"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "-1684 848 -128"
				maxs "496 208 64"
				mins "-496 -208 -64"
			}
			func_nav_avoid
			{
				targetname "D_E_blocker_custom_main"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "-1776 -384 -96"
				maxs "368 256 96"
				mins "-368 -256 -96"
			}
			func_nav_avoid
			{
				targetname "A_B_C_blocker_custom_main"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "-896 1328 -32"
				maxs "416 272 160"
				mins "-416 -272 -160"
			}
			func_nav_avoid
			{
				targetname "B_C_blocker_custom_main"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "0 0 64"
				maxs "512 384 64"
				mins "-512 -384 -64"
			}
			func_nav_avoid
			{
				targetname "A_blocker_custom_main"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "1280 -416 144"
				maxs "512 288 64"
				mins "-512 -288 -64"
			}
			func_nav_avoid
			{
				targetname "B_D_blocker_custom_main"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "960 -1448 64"
				maxs "448 340 64"
				mins "-448 -340 -64"
			}
			func_nav_avoid
			{
				targetname "C_E_blocker_custom_main"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "384 -2880 64"
				maxs "640 448 128"
				mins "-640 -448 -128"
			}
			func_nav_avoid
			{
				targetname "A_B_C_blocker_custom_main"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "-896 1328 -32"
				maxs "416 272 320"
				mins "-416 -272 -320"
			}
			func_nav_avoid
			{
				targetname "A_B_D_blocker_custom_main"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "1824 -2784 64"
				maxs "288 544 64"
				mins "-288 -544 -64"
			}
			
			func_nav_prefer
			{
				TeamNum -2
				tags "bot_goto_a1door"
				origin "-896 1328 -32"
				maxs "416 272 320"
				mins "-416 -272 -320"
			}
			func_nav_prefer
			{
				TeamNum -2
				tags "bot_goto_a1door"
				origin "-896 1328 -32"
				maxs "416 272 320"
				mins "-416 -272 -320"
			}
			func_nav_prefer
			{
				TeamNum -2
				tags "bot_goto_a1door"
				origin "-896 1328 -32"
				maxs "416 272 320"
				mins "-416 -272 -320"
			}
			func_nav_prefer
			{
				TeamNum -2
				tags "bot_goto_a1door"
				origin "-896 1328 -32"
				maxs "416 272 320"
				mins "-416 -272 -320"
			}
			
			func_nav_avoid
			{
				targetname "blocker_flank_custom"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot bomb_carrier common"
				origin "3024 -2304 272"
				maxs "528 384 192"
				mins "-528 -384 -192"
			}
			func_nav_avoid
			{
				targetname "blocker_flank_custom"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot bomb_carrier common"
				origin "1984 -1696 64"
				maxs "216 192 96"
				mins "-216 -192 -96"
			}
			func_nav_avoid
			{
				targetname "blocker_flank_custom"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot bomb_carrier common"
				origin "1816 68 144"
				maxs "528 282 96"
				mins "-528 -282 -96"
			}
			func_nav_avoid
			{
				targetname "blocker_flank_custom"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot bomb_carrier common"
				origin "-288 -1712 32"
				maxs "384 216 128"
				mins "-384 -216 -128"
			}
			func_nav_avoid
			{
				targetname "blocker_flank_custom"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot bomb_carrier common"
				origin "-1216 64 -128"
				maxs "480 288 96"
				mins "-480 -288 -96"
			}
			func_nav_prefer
			{
				targetname "prefer_flank_custom"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot bomb_carrier common"
				origin "2440 -1852 64"
				maxs "468 282 96"
				mins "-468 -282 -96"
			}
			func_nav_prefer
			{
				targetname "prefer_flank_custom"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot bomb_carrier common"
				origin "1152 444 144"
				maxs "468 282 96"
				mins "-468 -282 -96"
			}
			func_nav_prefer
			{
				targetname "prefer_flank_custom"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot bomb_carrier common"
				origin "-1712 448 -128"
				maxs "264 288 64"
				mins "-264 -288 -64"
			}
			
			func_nav_prefer
			{
				targetname "D_E_prefer_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "-1684 848 -128"
				maxs "496 208 64"
				mins "-496 -208 -64"
			}
			func_nav_prefer
			{
				targetname "D_E_prefer_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "-1776 -384 -96"
				maxs "368 256 96"
				mins "-368 -256 -96"
			}
			func_nav_prefer
			{
				targetname "A_B_C_prefer_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "-896 1328 -32"
				maxs "416 272 160"
				mins "-416 -272 -160"
			}
			func_nav_prefer
			{
				targetname "B_C_prefer_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "0 0 64"
				maxs "512 384 64"
				mins "-512 -384 -64"
			}
			func_nav_prefer
			{
				targetname "A_prefer_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "1280 -416 144"
				maxs "512 288 64"
				mins "-512 -288 -64"
			}
			func_nav_prefer
			{
				targetname "B_D_prefer_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "960 -1448 64"
				maxs "448 340 64"
				mins "-448 -340 -64"
			}
			func_nav_prefer
			{
				targetname "C_E_prefer_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "384 -2880 64"
				maxs "640 448 128"
				mins "-640 -448 -128"
			}
			func_nav_prefer
			{
				targetname "A_B_D_prefer_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "1824 -2784 64"
				maxs "288 544 64"
				mins "-288 -544 -64"
			}
			func_nav_prefer
			{
				targetname "D_E_prefer_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "-1684 848 -128"
				maxs "496 208 64"
				mins "-496 -208 -64"
			}
			func_nav_prefer
			{
				targetname "D_E_prefer_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "-1776 -384 -96"
				maxs "368 256 96"
				mins "-368 -256 -96"
			}
			func_nav_prefer
			{
				targetname "A_B_C_prefer_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "-896 1328 -32"
				maxs "416 272 160"
				mins "-416 -272 -160"
			}
			func_nav_prefer
			{
				targetname "B_C_prefer_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "0 0 64"
				maxs "512 384 64"
				mins "-512 -384 -64"
			}
			func_nav_prefer
			{
				targetname "A_prefer_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "1280 -416 144"
				maxs "512 288 64"
				mins "-512 -288 -64"
			}
			func_nav_prefer
			{
				targetname "B_D_prefer_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "960 -1448 64"
				maxs "448 340 64"
				mins "-448 -340 -64"
			}
			func_nav_prefer
			{
				targetname "C_E_prefer_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "384 -2880 64"
				maxs "640 448 128"
				mins "-640 -448 -128"
			}
			func_nav_prefer
			{
				targetname "A_B_D_prefer_custom_flank"
				StartDisabled 1
				TeamNum -2
				tags "flank flank_bot"
				origin "1824 -2784 64"
				maxs "288 544 64"
				mins "-288 -544 -64"
			}
			
			func_nav_avoid
			{
				TeamNum -2
				tags "common bomb_carrier flank A_tag B_tag C_tag D_tag E_tag"
				origin "-1008 -512 280"
				maxs "752 768 96"
				mins "-752 -768 -96"
			}
			func_nav_avoid
			{
				TeamNum -2
				tags "common bomb_carrier flank A_tag B_tag C_tag D_tag E_tag"
				origin "-1008 -512 280"
				maxs "752 768 96"
				mins "-752 -768 -96"
			}
			func_nav_avoid
			{
				TeamNum -2
				tags "common bomb_carrier flank A_tag B_tag C_tag D_tag E_tag"
				origin "-1008 -512 280"
				maxs "752 768 96"
				mins "-752 -768 -96"
			}
			func_nav_avoid
			{
				TeamNum -2
				tags "common bomb_carrier flank A_tag B_tag C_tag D_tag E_tag"
				origin "-1008 -512 280"
				maxs "752 768 96"
				mins "-752 -768 -96"
			}
			func_nav_avoid
			{
				TeamNum -2
				tags "common bomb_carrier flank A_tag B_tag C_tag D_tag E_tag"
				origin "-1008 -512 280"
				maxs "752 768 96"
				mins "-752 -768 -96"
			}
		}
		CoreLogic
		{
			NoFixup 1
			point_populator_interface //this can do a lot of cool stuff like stopping unlimited support wavespawn with $FinishWavespawn or kill all active enemies from a wavespawn with $KillWavespawn
			//this can also stop wavespawn spawning with $PauseWavespawn and resume it with $ResumeWavespawn, this also doesn't take up bot slots :D
			{
				targetname "interface"
			}
			logic_auto
			{
				OnMapSpawn "container_lift_siren_sound,Volume,0,1,-1"
				OnMapSpawn "carrier_lift_siren_sound,Volume,0,1,-1"
				
				OnMapSpawn "tank_path_E_20AddOutputOnPass bignet:RunScriptCode:SFR.BreakWallB1( activator ):6:-10-1"
				OnMapSpawn "tank_path_D_20AddOutputOnPass bignet:RunScriptCode:SFR.BreakWallB1( activator ):6:-10-1"
				
				OnMapSpawn "tank_path_B_C1_wall_fixed_3AddOutputOnPass bignet:RunScriptCode:SFR.BreakWallC1( activator ):2:-10-1"
				
				OnMapSpawn "tank_path_A_20AddOutputOnPass bignet:RunScriptCode:SFR.BreakWallARoute3( activator ):0:-10-1"
				OnMapSpawn "tank_path_A_30AddOutputOnPass bignet:RunScriptCode:SFR.BreakWallARoute2( activator ):0:-10-1"
				
				OnMapSpawn "wave_finished_relayAddOutputOnTrigger bignet:RunScriptCode:SFR.SetRecallProgress():0:-10-1"
			}
		}
	}
	
	SpawnTemplate FX
	SpawnTemplate New_Nav_Avoids
	SpawnTemplate CoreLogic
	
	Templates
	{
		Sig_Add_PushToIntersection
		{
			InterruptAction
			{
				AlwaysLook 0
				Distance 50 
				Target "2 -1237 0"
				Delay 0.1
				Repeats 1
				Duration 0.1
				WaitUntilDone 1
			}
		}
		Sig_Add_EMPER_Door
		{
			Tag bot_goto_a1door
			InterruptAction
			{
				AlwaysLook 0
				Distance 50 
				Target "0 798 0"
				// AimTarget "0 392 242"
				Delay 0.1
				Repeats 1
				Duration 1
				WaitUntilDone 1
				AddToQueue 1
			}
			InterruptAction
			{
				AlwaysLook 1
				Distance 50 
				Target "0 798 0"
				AimTarget "0 392 242"
				Delay 0.2
				Repeats 1
				Duration 6
				WaitUntilDone 1
				AddToQueue 1
				OnDoneChangeAttributes "A1"
			}
			EventChangeAttributes
			{
				A1
				{
					InterruptAction
					{
						AlwaysLook 0
						Distance 50 
						Target "-4 -63 0"
						Delay 0.1
						Repeats 1
						Duration 1
						WaitUntilDone 1
						AddToQueue 1
					}
					InterruptAction
					{
						AlwaysLook 1
						Distance 50 
						Target "-4 -63 0"
						AimTarget "-3 -375 243"
						Delay 0.2
						Repeats 1
						Duration 6
						WaitUntilDone 1
						AddToQueue 1
						OnDoneChangeAttributes "Done"
					}
					FireInput
					{
						Delay 0.1
						Repeats 1
						Target bignet
						Action RunScriptCode
						Param "if( SFR.Global_Progress_READONLY.A2_door_locked == true )
								SFR.SetProgress(`A2_door_locked`,false)
						"
					}
				}
				Done
				{
					FireInput
					{
						Delay 0.1
						Repeats 1
						Target bignet
						Action RunScriptCode
						Param "if( SFR.Global_Progress_READONLY.A1_door_locked == true )
								SFR.SetProgress(`A1_door_locked`,false)
						"
					}
				}
			}
		}
		T_TFBot_Giant_Engineer_EMP
		{
			Template T_TFBot_Giant_Engineer_Battle
			Health 2775
			ClassIcon engineer_wrangler_giger_lite
			Item "The Giger Counter"
			WeaponRestrictions SecondaryOnly
			Tag "bot_laservision"
			Item "The Cow Mangler 5000"
			Attributes AlwaysFireWeapon
			Name "Giant EMP Beam"
			ItemAttributes
			{
				ItemName "the cow mangler 5000"
				"fire rate penalty" 2
				"faster reload rate" -0.8
				"is_passive_weapon"	1
				"projectile trail particle" ~drg_cow_rockettrail_burst_charged_blue
				"explosion particle" drg_cow_explosioncore_charged_blue
				"explosion particle on direct hit" drg_cow_explosioncore_charged_blue
				"Set DamageType Ignite" 1
				"disable buildings on hit" 5
				"Projectile speed decreased" 0.2
				"projectile acceleration" 1760
				"projectile acceleration time" 0.5
			}	
			ItemAttributes
			{
				ItemName "The Giger Counter"
				"add cond when active" 19
			}
		}
	}
	
	Mission
	{
		Objective DestroySentries
		Where spawnbot_right
		CooldownTime 30
		InitialCooldown 30
		
		TFBot
		{
			Template T_TFBot_SentryBuster
		}
	}
	
	Wave // Wave 1 // $1500
	{
		WaitWhenDone	65
		Checkpoint	Yes
		
		StartWaveOutput
		{
			Target wave_start_relay
			Action Trigger
		}
		DoneOutput
		{
			Target wave_finished_relay
			Action Trigger
		}
		InitWaveOutput
		{
			Target bignet
			Action RunScriptCode
			Param "
				EntFire(`bombpath_holograms_clear_relay`, `Trigger`, null, 0)
				EntFire(`tank_holograms_clear_relay`, `Trigger`, null, 0)
				EntFire(`monorail_holograms_clear_relay`, `Trigger`, null, 0)
				EntFire(`use_resetable_bomb`, `Trigger`, null, 0)
				
				IncludeScript(`tankextensions_main`, getroottable())
				IncludeScript(`tankextensions/hammertank`, getroottable())
				
				IncludeScript(`system_fragmentation_remember`, getroottable())
				EntFire(`bignet`, `RunScriptCode`, `SFR.ResetProgress()`, 1)
				EntFire(`bignet`, `RunScriptCode`, SFR.SetPath( [`E`], [`E`], [`E`], [] ), 1.5)
				// EntFire(`bignet`, `RunScriptCode`, `SFR.PrintProgress()`, 3)
			"
		}
		
		Explanation  
		{
			Line "{bed4ed}The facility will start with minimal destruction"
			Line "{bed4ed}After each wave: the state of the facility will {red}remain for ever subsequent wave"
			Line "{f0c3a3}The bomb, tank, and monorail paths will change depending on facility integrity"
			Line "{f0c3a3}Enemy composition and spawns may also change slightly"
			Line "{a3f0c2}Green paths are flank paths"
		}
		
		WaveSpawn
		{
			Name w1_a1
			TotalCount	72
			MaxActive	18
			SpawnCount	1
			WaitBeforeStarting 6
			WaitBetweenSpawns 1
			TotalCurrency 100
			Where spawnbot_left
			
			TFBot
			{
				Class Scout
				Skill Hard
			}	
		}
		WaveSpawn
		{
			Name w1_a1
			TotalCount	4
			MaxActive	4
			SpawnCount	1
			WaitBeforeStarting 0
			WaitBetweenSpawns 15
			TotalCurrency 150
			Where spawnbot_right
			
			TFBot
			{
				Template T_TFBot_Giant_Engineer_EMP
			}	
		}
		
		WaveSpawn
		{
			Name w1_b1
			WaitForAllSpawned w1_a1
			TotalCount	3
			MaxActive	3
			SpawnCount	1
			WaitBeforeStarting 10
			WaitBetweenSpawns 20
			TotalCurrency 150
			
			Tank
            {
                Name "hammertank"
                StartingPathTrackNode "tank_path_E"
                Health 12000
                Speed 75
				ClassIcon tank_mallet
				
                OnBombDroppedOutput
                {
                    Target boss_deploy_relay
                    Action Trigger
                }
            }
		}
		WaveSpawn
		{
			Name w1_b1
			WaitForAllSpawned w1_a1
			TotalCount	6
			MaxActive	6
			SpawnCount	1
			WaitBeforeStarting 10
			WaitBetweenSpawns 10
			TotalCurrency 200
			Where spawnbot_left
			
			TFBot
			{
				Template T_TFBot_Giant_Demoknight_DualWeild
			}	
		}
		
		WaveSpawn
		{
			Name w1_c1
			WaitForAllDead w1_b1
			TotalCount	5
			MaxActive	3
			SpawnCount	1
			WaitBeforeStarting 10
			WaitBetweenSpawns 20
			TotalCurrency 100
			Where spawnbot_right
			
			TFBot
			{
				Template T_TFBot_Giant_Heavy_KGB_Boost
			}	
		}
		WaveSpawn
		{
			Name w1_c1
			WaitForAllDead w1_b1
			TotalCount	80
			MaxActive	16
			SpawnCount	4
			WaitBeforeStarting 10
			WaitBetweenSpawns 4
			TotalCurrency 150
			Where spawnbot_left_tank
			Where spawnbot_right_tank
			
			TFBot
			{
				Template T_TFBot_Heavyweapons_Gnome
			}	
		}
		WaveSpawn
		{
			Name w1_c1
			WaitForAllDead w1_b1
			TotalCount	32
			MaxActive	12
			SpawnCount	4
			WaitBeforeStarting 20
			WaitBetweenSpawns 10
			TotalCurrency 100
			Where spawnbot_left
			
			TFBot
			{
				Class Demoman
				Skill Easy
			}	
		}
		
		WaveSpawn
		{
			Name w1_d2
			WaitForAllSpawned w1_c1
			TotalCount	1
			MaxActive	1
			SpawnCount	1
			WaitBeforeStarting 20
			WaitBetweenSpawns 20
			TotalCurrency 50
			Where spawnbot_right
			
			TFBot
			{
				Template T_TFBot_Giant_Engineer_EMP
			}	
		}
		WaveSpawn
		{
			Name w1_d1
			WaitForAllSpawned w1_d2
			TotalCount	3
			MaxActive	3
			SpawnCount	1
			WaitBeforeStarting 15
			WaitBetweenSpawns 15
			TotalCurrency 200
			Where spawnbot_right
			
			TFBot
			{
				Template T_TFBot_Giant_Engineer_EMP
				AddTemplate Sig_Add_EMPER_Door
			}	
		}
		WaveSpawn
		{
			Name w1_d1
			WaitForAllSpawned w1_c1
			TotalCount	6
			MaxActive	6
			SpawnCount	3
			WaitBeforeStarting 20
			WaitBetweenSpawns 25
			TotalCurrency 100
			Where spawnbot_left
			
			Squad
			{
				TFBot
				{
					Template T_TFBot_Giant_HeavyWeapons
				}
				TFBot
				{
					Template T_TFBot_Medic
				}
				TFBot
				{
					Template T_TFBot_Medic
				}
			}
		}
		WaveSpawn
		{
			Name w1_d1
			WaitForAllSpawned w1_c1
			TotalCount	10
			MaxActive	6
			SpawnCount	1
			WaitBeforeStarting 20
			WaitBetweenSpawns 4.5
			TotalCurrency 100
			Where spawnbot_left_tank
			
			TFBot
			{
				Template T_TFBot_Heavy_IronFist_Airblast
			}
		}
	}
	
	Wave
	{
		WaitWhenDone	65
		Checkpoint	Yes
		
		StartWaveOutput
		{
			Target bignet
			Action RunScriptCode
			Param "
				EntFire( `wave_start_relay`, `Trigger`, null, 0 )
				if( SFR.Global_Progress_READONLY.A2_door_locked == true )
				{
					TankExt.DelayFunction( self, this, 0.5, function(){ 
						NetProps.SetPropInt( Entities.FindByClassname(null,`tf_objective_resource`), `m_nMannVsMachineWaveEnemyCount`, NetProps.GetPropInt( Entities.FindByClassname(null,`tf_objective_resource`), `m_nMannVsMachineWaveEnemyCount` ) + 2 )
					} )
				}
				else
				{
					TankExt.DelayFunction( self, this, 0.5, function(){ 
						NetProps.SetPropInt( Entities.FindByClassname(null,`tf_objective_resource`), `m_nMannVsMachineWaveEnemyCount`, NetProps.GetPropInt( Entities.FindByClassname(null,`tf_objective_resource`), `m_nMannVsMachineWaveEnemyCount` ) + 20 )
					} )
				}
			"
		}
		DoneOutput
		{
			Target wave_finished_relay
			Action Trigger
		}
		InitWaveOutput
		{
			Target bignet
			Action RunScriptCode
			Param "
				EntFire(`bombpath_holograms_clear_relay`, `Trigger`, null, 0)
				EntFire(`tank_holograms_clear_relay`, `Trigger`, null, 0)
				EntFire(`monorail_holograms_clear_relay`, `Trigger`, null, 0)
				EntFire(`use_resetable_bomb`, `Trigger`, null, 0)
				
				IncludeScript(`tankextensions_main`, getroottable())
				IncludeScript(`tankextensions/hammertank`, getroottable())
				IncludeScript(`tankextensions/tankdozer`, getroottable())
				IncludeScript(`tankextensions/targetank`, getroottable())
				TankExt.SetValueOverrides({ 
					TARGETANK_RECHARGE_DURATION = 7.5
				})
				
				IncludeScript(`seel_ins`, getroottable())
				IncludeScript(`system_fragmentation_remember`, getroottable())
				
				EntFire(`bignet`, `RunScriptCode`, `SFR.ProgressCheck()`, 1)
				EntFire(`bignet`, `RunScriptCode`, SFR.SetPath( [`E`], [`C`, `E`], [], [`C`, `E`] ), 1.5)
				
				if( SFR.Global_Progress_READONLY.B1_wall == true )
				{
					EntFire(`relay_tank_hologram_D`, `Trigger`, null, 0 )
					TankExt.DelayFunction( self, this, 0.1, function(){ SINS.SetIconCountByName( `tank_targe`, 2, false ) } )
					TankExt.DelayFunction( self, this, 0.1, function(){ SINS.ChangeIconByName( `tank_targe`, `tankdozer_lite` ) } )
					
					TankExt.DelayFunction( self, this, 0.1, function(){ EntFire( `interface`, `$ResumeWavespawn`, `w2_a1_DPATH`, 0 ) } )
					TankExt.DelayFunction( self, this, 0.1, function(){ EntFire( `interface`, `$PauseWavespawn`, `w2_a1_APATH`, 0 ) } )
					TankExt.DelayFunction( self, this, 0.1, function(){ EntFire( `interface`, `$KillWavespawn`, `w2_a1_APATH`, 0 ) } )
					
					NetProps.SetPropInt( Entities.FindByClassname(null,`tf_objective_resource`), `m_nMannVsMachineWaveEnemyCount`, NetProps.GetPropInt( Entities.FindByClassname(null,`tf_objective_resource`), `m_nMannVsMachineWaveEnemyCount` ) - 4 )
				}
				else
				{
					EntFire(`relay_tank_hologram_A`, `Trigger`, null, 0 )
					TankExt.DelayFunction( self, this, 0.1, function(){ EntFire( `interface`, `$KillWavespawn`, `w2_a1_DPATH`, 0 ) } )
				}
				if( SFR.Global_Progress_READONLY.A2_door_locked == true )
				{
					TankExt.DelayFunction( self, this, 0.1, function(){ SINS.SetIconCountByName( `scout_backscatter_lite`, 40, false ) } )
					TankExt.DelayFunction( self, this, 0.1, function(){ SINS.SetIconCountByName( `soldier_blackbox_giant`, 4, false ) } )
					TankExt.DelayFunction( self, this, 0.1, function(){ SINS.ChangeIconByName( `soldier_blackbox_giant`, `engineer_wrangler_giger_lite` ) } )
					
					TankExt.DelayFunction( self, this, 0.1, function(){ EntFire( `interface`, `$ResumeWavespawn`, `w2_b1_Secondary_Pair`, 0 ) } )
					TankExt.DelayFunction( self, this, 0.1, function(){ EntFire( `interface`, `$ResumeWavespawn`, `w2_b1_Giant_ADoors`, 0 ) } )
					TankExt.DelayFunction( self, this, 0.1, function(){ EntFire( `interface`, `$ResumeWavespawn`, `w2_b1_Scout_Short`, 0 ) } )
					TankExt.DelayFunction( self, this, 0.1, function(){ EntFire( `interface`, `$PauseWavespawn`, `w2_b1_Giant_EPath`, 0 ) } )
					TankExt.DelayFunction( self, this, 0.1, function(){ EntFire( `interface`, `$PauseWavespawn`, `w2_b1_Scout_Long`, 0 ) } )
					TankExt.DelayFunction( self, this, 0.1, function(){ EntFire( `interface`, `$KillWavespawn`, `w2_b1_Giant_EPath`, 0 ) } )
					TankExt.DelayFunction( self, this, 0.1, function(){ EntFire( `interface`, `$KillWavespawn`, `w2_b1_Scout_Long`, 0 ) } )
					
					NetProps.SetPropInt( Entities.FindByClassname(null,`tf_objective_resource`), `m_nMannVsMachineWaveEnemyCount`, NetProps.GetPropInt( Entities.FindByClassname(null,`tf_objective_resource`), `m_nMannVsMachineWaveEnemyCount` ) - 20 )
				}
				else
				{
					TankExt.DelayFunction( self, this, 0.1, function(){ SINS.SetIconCountByName( `pyro_backburner_nys`, 0, false ) } )
					TankExt.DelayFunction( self, this, 0.1, function(){ EntFire( `interface`, `$KillWavespawn`, `w2_b1_Giant_ADoors`, 0 ) } )
					TankExt.DelayFunction( self, this, 0.1, function(){ EntFire( `interface`, `$KillWavespawn`, `w2_b1_Secondary_Pair`, 0 ) } )
				}
			"
		}
		// Debug CMDs: 
		// Everything Lost: sm_script SFR.SetProgress( "A1_door_locked", false ); sm_script SFR.SetProgress( "A2_door_locked", false ); sm_script SFR.SetProgress( "B1_wall", false ); wait 100; sm_script SFR.SetRecallProgress()
		// A doors lost: sm_script SFR.SetProgress( "A1_door_locked", false ); sm_script SFR.SetProgress( "A2_door_locked", false ); wait 100; sm_script SFR.SetRecallProgress()
		// B1 wall lost: sm_script SFR.SetProgress( "B1_wall", false ); wait 100; sm_script SFR.SetRecallProgress()
		
		WaveSpawn
		{
			Name w2_a1
			TotalCount	3
			MaxActive	3
			SpawnCount	1
			WaitBeforeStarting 2.5
			WaitBetweenSpawns 20
			TotalCurrency 100
			Where spawnbot_left
			
			TFBot
			{
				Template T_TFBot_Giant_Soldier_Nuke
			}	
		}
		WaveSpawn
		{
			Name w2_a1
			TotalCount	3
			MaxActive	3
			SpawnCount	1
			WaitBeforeStarting 0
			WaitBetweenSpawns 20
			TotalCurrency 100
			Where spawnbot_right
			
			TFBot
			{
				Template T_TFBot_Giant_Soldier_Nuke
			}	
		}
		WaveSpawn
		{
			Name w2_a1_APATH
			TotalCount	6
			MaxActive	6
			SpawnCount	1
			WaitBeforeStarting 0
			WaitBetweenSpawns 7
			TotalCurrency 150
			Where spawnbot_right
			
			DoneOutput
			{
				Target interface
				Action $ResumeWavespawn
				Param "w2_a1_TankSync"
			}
			Tank
            {
                Name "targetank"
                StartingPathTrackNode "tank_path_A"
                Health 10000
                Speed 75
                Skin 0
				ClassIcon tank_targe
				
                OnBombDroppedOutput
                {
                    Target boss_deploy_relay
                    Action Trigger
                }
            }
		}
		WaveSpawn
		{
			Name w2_a1_DPATH
			TotalCount	2
			MaxActive	2
			SpawnCount	1
			WaitBeforeStarting 0
			WaitBetweenSpawns 30
			TotalCurrency 150
			Where spawnbot_right
			StartDisabled 1
			HideIcon 1
			
			LastSpawnOutput
			{
				Target interface
				Action $ResumeWavespawn
				Param "w2_a1_TankSync"
			}
			Tank
            {
                Name "tankdozer_nosentry"
                StartingPathTrackNode "tank_path_D"
                Health 25000
                Speed 75
                Skin 0
				ClassIcon tankdozer_lite
				
                OnBombDroppedOutput
                {
                    Target boss_deploy_relay
                    Action Trigger
                }
            }
		}
		WaveSpawn
		{
			Name w2_a1_TankSync
			StartDisabled 1
			WaitBeforeStarting 2
		}
		WaveSpawn
		{
			Name w2_a1
			WaitForAllDead w2_a1_TankSync
		}
		
		WaveSpawn
		{
			Name w2_b1_Scout_Long
			WaitForAllSpawned w2_a1
			TotalCount	60
			MaxActive	18
			SpawnCount	3
			WaitBeforeStarting 5
			WaitBetweenSpawns 2
			TotalCurrency 150
			Where spawnbot_right
			
			DoneOutput
			{
				Target bignet
				Action RunScriptCode
				Param "EntFire( `interface`, `$ResumeWavespawn`, `w2_b1_CommonSync_Scout`, 0 ); EntFire( `interface`, `$ResumeWavespawn`, `w2_b1_CommonSync_Pyro`, 0 )"
			}
			
			RandomChoice
			{
				Shuffle 1
				
				TFBot
				{
					Template T_TFBot_Scout_Backscatter
					Tag flank
					AddTemplate Sig_Add_PushToIntersection
				}	
				TFBot
				{
					Template T_TFBot_Scout_Backscatter
					Tag flank
					AddTemplate Sig_Add_PushToIntersection
				}
				TFBot
				{
					Template T_TFBot_Scout_Backscatter
					Tag flank
					AddTemplate Sig_Add_PushToIntersection
				}
				TFBot
				{
					Template T_TFBot_Scout_Backscatter
					Tag flank
				}
			}
		}
		WaveSpawn
		{
			Name w2_b1_Scout_Short
			WaitForAllSpawned w2_a1
			TotalCount	40
			MaxActive	16
			SpawnCount	2
			WaitBeforeStarting 15
			WaitBetweenSpawns 3
			TotalCurrency 150
			Where spawnbot_right
			HideIcon 1
			StartDisabled 1
			
			DoneOutput
			{
				Target bignet
				Action RunScriptCode
				Param "EntFire( `interface`, `$ResumeWavespawn`, `w2_b1_CommonSync_Scout`, 0 )"
			}
			
			TFBot
			{
				Template T_TFBot_Scout_Backscatter
				Tag flank
			}	
		}
		WaveSpawn
		{
			Name w2_b1_Secondary_Pair
			WaitForAllSpawned w2_a1
			TotalCount	20
			MaxActive	8
			SpawnCount	1
			WaitBeforeStarting 15
			WaitBetweenSpawns 3
			TotalCurrency 50
			Where spawnbot_right
			StartDisabled 1
			// HideIcon 1
			
			DoneOutput
			{
				Target bignet
				Action RunScriptCode
				Param "EntFire( `interface`, `$ResumeWavespawn`, `w2_b1_CommonSync_Pyro`, 0 )"
			}
			
			TFBot
			{
				Template T_TFBot_Pyro_Back_Burner
				Attributes AlwaysFireWeapon
				Skill Hard
			}	
		}
		WaveSpawn
		{
			Name w2_b1_Giant_EPath
			WaitForAllSpawned w2_a1
			TotalCount	6
			MaxActive	4
			SpawnCount	1
			WaitBeforeStarting 5
			WaitBetweenSpawns 10
			TotalCurrency 200
			Where spawnbot_right
			
			DoneOutput
			{
				Target bignet
				Action RunScriptCode
				Param "EntFire( `interface`, `$ResumeWavespawn`, `w2_b1_GiantSync`, 0 )"
			}
			
			TFBot
			{
				Template T_TFBot_Giant_Soldier_RocketShotgun  
			}	
		}
		WaveSpawn
		{
			Name w2_b1_Giant_ADoors
			WaitForAllSpawned w2_a1
			TotalCount	4
			MaxActive	4
			SpawnCount	1
			WaitBeforeStarting 12.5
			WaitBetweenSpawns 12.5
			TotalCurrency 150
			Where spawnbot_right
			StartDisabled 1
			HideIcon 1
			
			DoneOutput
			{
				Target bignet
				Action RunScriptCode
				Param "EntFire( `interface`, `$ResumeWavespawn`, `w2_b1_GiantSync`, 0 )"
			}
			
			TFBot
			{
				Template T_TFBot_Giant_Engineer_EMP
				AddTemplate Sig_Add_EMPER_Door
			}	
		}
		
		WaveSpawn
		{
			Name w2_b1_CommonSync_Scout
			StartDisabled 1
			WaitBeforeStarting 2
		}
		WaveSpawn
		{
			Name w2_b1_CommonSync_Pyro
			StartDisabled 1
			WaitBeforeStarting 2
		}
		WaveSpawn
		{
			Name w2_b1_GiantSync
			StartDisabled 1
			WaitBeforeStarting 2
		}
	}
}