// Now it's for rottenburg night.
//
// Spawnbots:
// -spawnbot 左侧入口
// -flankers 右侧入口
// -spawnbot_chief 右侧入口
//
// tank: tank_path_b_10/tank_path_a_10 - A=进门左转,B=进门右转
//
// Starting Currency: 500

// Advanced - for 'vanilla' enjoyers again!

// +----------+----------+----------+
// | Wave     | Currency | A+       |
// +----------+----------+----------+
// | Wave 1   | 700      | 800      |
// | Wave 2   | 1400     | 1500     |
// | Wave 3   | 1200     | 1300     |
// | Wave 4   | 1000     | 1100     |
// +----------+----------+----------+
// | Total    | 4300     | 4700     |
// +----------+----------+----------+
//

#base robot_standard.pop
#base robot_giant.pop
//#base custom_robot_spec_redux.pop
//#base custom_robot_spec_redux_raf.pop
//#base custom_weapon_spadmin.pop
#base rottenburg_cc.pop
#base custom_weapon_support_medieval.pop

WaveSchedule
{
    StartingCurrency 500 
	RespawnWaveTime 3
	CanBotsAttackWhileInSpawnRoom no
    FixedRespawnWaveTime Yes

	//JUDGE
	MaxRedplayers 5
	DisallowUpgrade	"ubercharge"  
	DisallowUpgrade	"critboost"  
	ClassLimit
	{
		Scout 1
		Soldier 1
		Pyro 1
		Demoman 1
		Heavyweapons 1
		Engineer 1
		Medic 1
		Sniper 1
		Spy 1
	}
	//JUDGE

    PointTemplates
	{
		missionname
    	{  
	    	logic_auto
	    	{
		    	"origin" "0 0 0" 
		    	"targetname" "missionname"				
		    	"OnMapSpawn" "tf_objective_resource,$SetClientProp$m_iszMvMPopfileName,(ADV) CHIVLARY CONFRONTATION,0,-1"
	    	}
   	 	}
	}

	SpawnTemplate "missionname"

	WaveStartCountdown 5
	//MedievalMode 1

    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// WAVE 1 - $800 - Full with bonus: $1400/////////////////////////////////////////////////////////////////////////////////////////
	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

	// 关于本回合:以近战兵为主。速成班搭配,佐以一些有力的小巨型和军队支援。
	
	Wave // WAVE 1
	{
		Explanation  
		{
			Line "{FFD700}> ADV-Judge version 1.0"
			Line "{Green}+Pyro can equip the gas passer with a 30 dmg explode-on-ignite, and has 50% dmg bonus towards burning enemies."
			Line "{Yellow}+Engineer has a 50% dmg bonus towards tanks, and he can build a bomb shooting sentry with wrangler to aim accurately."
			Line "{Green}+Sniper can equip the jarate."
			Line "{Yellow}Besides, it's medieval mode! Some upgrades have been balanced or sorted, pls do check the Extend Upgrade Menu!"
			Line "{Red}!-WARNING- Robots on this map optimizes almost all paths to attack you! Stay your eyes on the bomb!"
			//Line "{FFD700}<任务 - 骑士对决>" //独特黄
            //Line "{FFD700}<难度 - 高级>"
            //Line "{FFD700}<任务作者 - Spectλtor™>"
			//Line ""
			//Line "{FFD700}>该任务正在编写中。"
		}
		InitWaveOutPut
		{
			Target medi_sound_renable_relay
			Action Trigger
		}
		StartWaveOutput
		{
			Target wave_start_relay_classic
			Action Trigger
		}
		DoneOutput
		{
			Target wave_finished_relay
			Action Trigger
		}
		WaveSpawn // 奇数回合音乐
		{
			TotalCount 0
			SpawnCount 0
			WaitBeforeStarting 0
		
			FirstSpawnWarningSound "sp/medieval/mvmmedievaltheme1.mp3"

			FirstSpawnOutput
			{
				Target medi_sound_stop_relay
				Action Trigger
			}
		}
		WaveSpawn // totally not crash course reference
		{
			Name "1a"
			Where spawnbot
			TotalCount 12
			MaxActive 8
			SpawnCount 2
			WaitBeforeStarting 2
			WaitBetweenSpawns 2

			FirstSpawnWarningSound "vo/mvm/norm/heavy_mvm_meleeing04.mp3"
		
			TotalCurrency 25

			TFBot
			{
				Template T_TFBot_Heavy_kgb
			}
		}
		WaveSpawn
		{
			Name "1a"
			Where spawnbot
			TotalCount 14
			MaxActive 8
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 2
		
			TotalCurrency 25

			TFBot
			{
				Template T_TFBot_Heavy_gru
			}
		}
		WaveSpawn
		{
			Name "1a"
			Where spawnbot
			TotalCount 12
			MaxActive 6
			SpawnCount 6
			WaitBeforeStarting 10
			WaitBetweenSpawns 1.5
		
			TotalCurrency 50

			TFBot
			{
				Template T_TFBot_Scout_bat
			}
		}
		WaveSpawn // giants strike
		{
			Name "1b"
			Where spawnbot
			TotalCount 8
			MaxActive 8
			SpawnCount 4
			WaitBeforeStarting 8
			WaitBetweenSpawns 16
			WaitForAllSpawned "1a"
		
			TotalCurrency 50

			FirstSpawnWarningSound "vo/mvm/norm/sniper_mvm_cartstoppedoffensesoft04.mp3"

			Squad
			{
				ShouldPreserveSquad 1
				TFBot
				{
					Template T_TFBot_Giant_Sniper_bow
				}
				TFBot
				{
					Template T_TFBot_Heavy_kgb
				}
				TFBot
				{
					Template T_TFBot_Heavy_kgb
				}
				TFBot
				{
					Template T_TFBot_Heavy_kgb
				}
			}
		}
		WaveSpawn
		{
			Name "1b"
			Where spawnbot
			TotalCount 12
			MaxActive 6
			SpawnCount 6
			WaitBeforeStarting 10
			WaitBetweenSpawns 1
			WaitForAllSpawned "1a"
		
			TotalCurrency 25

			TFBot
			{
				Template T_TFBot_Heavy_gru
			}
		}
		WaveSpawn
		{
			Name "1b"
			Where spawnbot
			TotalCount 12
			MaxActive 6
			SpawnCount 1
			WaitBeforeStarting 13
			WaitBetweenSpawns 2
			WaitForAllSpawned "1a"
		
			TotalCurrency 25

			TFBot
			{
				Template T_TFBot_Heavy_kgb
			}
		}
		WaveSpawn // oh no it's battalion + gru
		{
			Name "1c"
			Where spawnbot
			TotalCount 6
			MaxActive 6
			SpawnCount 1
			WaitBeforeStarting 7
			WaitBetweenSpawns 4
			WaitForAllSpawned "1b"
		
			TotalCurrency 50

			FirstSpawnWarningSound "vo/mvm/norm/soldier_mvm_battlecry03.mp3"

			TFBot
			{
				Template T_TFBot_Soldier_backup_pickaxe
			}
		}
		WaveSpawn
		{
			Name "1c"
			Where spawnbot
			TotalCount 14
			MaxActive 10
			SpawnCount 2
			WaitBeforeStarting 10
			WaitBetweenSpawns 2
			WaitForAllSpawned "1b"
		
			TotalCurrency 50

			FirstSpawnWarningSound "weapons/buff_banner_horn_blue.wav"

			TFBot
			{
				Template T_TFBot_Heavy_gru
			}
		}
		WaveSpawn
		{
			Name "1c"
			Where spawnbot
			TotalCount 6
			MaxActive 4
			SpawnCount 1
			WaitBeforeStarting 12
			WaitBetweenSpawns 6
			WaitForAllSpawned "1b"
		
			TotalCurrency 50

			TFBot
			{
				Template T_TFBot_Pyro_SG_powerjack
			}
		}
		WaveSpawn // more commons flooding
		{
			Name "1d"
			Where spawnbot
			TotalCount 10
			MaxActive 10
			SpawnCount 1
			WaitBeforeStarting 16
			WaitBetweenSpawns 1.5
			WaitForAllSpawned "1c"
		
			TotalCurrency 50

			TFBot
			{
				Template T_TFBot_Scout_bat
			}
		}
		WaveSpawn
		{
			Name "1d"
			Where spawnbot
			TotalCount 10
			MaxActive 10
			SpawnCount 1
			WaitBeforeStarting 12
			WaitBetweenSpawns 1.2
			WaitForAllSpawned "1c"
		
			TotalCurrency 50

			TFBot
			{
				Template T_TFBot_Heavy_kgb
			}
		}
		WaveSpawn // is this long enough for an 'endurance'?
		{
			Name "1e"
			Where spawnbot
			TotalCount 2
			MaxActive 2
			SpawnCount 1
			WaitBeforeStarting 2
			WaitBetweenSpawns 10
			WaitForAllSpawned "1d"
		
			TotalCurrency 100

			TFBot
			{
				Template T_TFBot_Giant_Sniper_bow_buff
			}
		}
		WaveSpawn
		{
			Name "1e"
			Where spawnbot
			TotalCount 12
			MaxActive 12
			SpawnCount 2
			WaitBeforeStarting 13
			WaitBetweenSpawns 3
			WaitForAllSpawned "1d"
		
			TotalCurrency 50

			FirstSpawnWarningSound "vo/mvm/norm/pyro_mvm_autocappedcontrolpoint01.mp3"

			Squad
			{
				ShouldPreserveSquad 1
				TFBot
				{
					Template T_TFBot_Pyro_SG_powerjack
				}
				TFBot
				{
					Template T_TFBot_Scout_bat
				}
			}
		}
		WaveSpawn
		{
			Name "1f"
			Where spawnbot
			TotalCount 12
			MaxActive 6
			SpawnCount 1
			WaitBeforeStarting 14
			WaitBetweenSpawns 6
			WaitForAllSpawned "1e"
			Support 1
		
			TotalCurrency 50

			TFBot
			{
				Template T_TFBot_Scout_bat_crit
			}
		}
		WaveSpawn // how about that
		{
			Name "1support"
			Where spawnbot
			TotalCount 12
			MaxActive 2
			SpawnCount 1
			WaitBeforeStarting 14
			WaitBetweenSpawns 10
			WaitForAllSpawned "1c"
			Support 1
		
			TotalCurrency 50

			TFBot
			{
				Template T_TFBot_Demo_targe_push
			}
		}
    }

	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// WAVE 2 - $1400 - Full with bonus: $2900////////////////////////////////////////////////////////////////////////////////////////
	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

	// 关于本回合:以更有威胁的近战兵为主,补充远程兵。巨型组成强力小队。

	Wave // WAVE 2
	{
		InitWaveOutPut
		{
			Target medi_sound_stop_relay
			Action Trigger
		}
		StartWaveOutput
		{
			Target wave_start_relay_classic
			Action Trigger
		}
		DoneOutput
		{
			Target wave_finished_relay
			Action Trigger
		}
		WaveSpawn // 偶数回合音乐
		{
			TotalCount 0
			SpawnCount 0
			WaitBeforeStarting 0
		
			FirstSpawnWarningSound "sp/medieval/mvmmedievaltheme2.mp3"

			FirstSpawnOutput
			{
				Target medi_sound_stop_relay
				Action Trigger
			}
		}
		WaveSpawn // 提示玩家上方的重生点
		{
			TotalCount 0
			SpawnCount 0
			WaitBeforeStarting 0
		
			FirstSpawnWarningSound "coach/coach_attack_here.wav"
		
			FirstSpawnOutput
			{
				Target upspawn_hint_relay
				Action Trigger
			}
		}
		WaveSpawn // actually dont spawn the bomb on top since players can bodyblock it, resulting unforseen consequences...
		{
			Name "2bomb"
			//WaitForAllDead ""
			//WaitForAllSpawned ""
			Where flankers
			TotalCount 1
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 1
			WaitBetweenSpawns 0
			//WaitBetweenSpawnsAfterDeath 0
		
			//Support 0
		
			//StartWaveWarningSound ""
			//FirstSpawnWarningSound ""
			//LastSpawnWarningSound ""
			//DoneWarningSound ""
		
			TotalCurrency 0

			TFBot
			{ 
				Template T_TFBot_Pyro_backscratcher
			}
		}
		WaveSpawn // vanilla template DK, but it is alone
		{
			Name "2a"
			Where spawnbot
			TotalCount 1
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 2

			FirstSpawnWarningSound "vo/mvm/mght/demoman_mvm_m_dominationspy03.mp3"
		
			TotalCurrency 50

			TFBot
			{
				Template T_TFBot_Giant_DemoMan_PrinceTavish
			}
		}
		WaveSpawn
		{
			Name "2a"
			Where spawnbot
			TotalCount 16
			MaxActive 12
			SpawnCount 1
			WaitBeforeStarting 2
			WaitBetweenSpawns 1
		
			TotalCurrency 25

			TFBot
			{
				Template T_TFBot_Pyro_backscratcher
			}
		}
		WaveSpawn
		{
			Name "2a"
			Where spawnbot
			TotalCount 12
			MaxActive 8
			SpawnCount 1
			WaitBeforeStarting 2
			WaitBetweenSpawns 2.5
		
			TotalCurrency 25

			TFBot
			{
				Template T_TFBot_Sniper_Huntsman
			}
		}
		WaveSpawn // vanilla template DK, but it's a squad
		{
			Name "2b"
			Where spawnbot
			TotalCount 6
			MaxActive 6
			SpawnCount 6
			WaitBeforeStarting 2
			WaitBetweenSpawns 1
			WaitForAllSpawned "2a"
		
			TotalCurrency 100

			Squad
			{
				ShouldPreserveSquad 1
				TFBot
				{
					Template T_TFBot_Giant_DemoMan_PrinceTavish
				}
				TFBot
				{
					Template T_TFBot_Sniper_Huntsman
				}
				TFBot
				{
					Template T_TFBot_Sniper_Huntsman
				}
				TFBot
				{
					Template T_TFBot_Sniper_Huntsman
				}
				TFBot
				{
					Template T_TFBot_Sniper_Huntsman
				}
				TFBot
				{
					Template T_TFBot_Sniper_Huntsman
				}
			}
		}
		WaveSpawn // flankers
		{
			Name "2b"
			Where flankers
			TotalCount 8
			MaxActive 4
			SpawnCount 1
			WaitBeforeStarting 15
			WaitBetweenSpawns 2
			WaitForAllSpawned "2a"
		
			TotalCurrency 100

			FirstSpawnWarningSound "vo/mvm/norm/spy_mvm_battlecry01.mp3"

			TFBot
			{
				Template T_TFBot_Spy_dagger_thrower
			}
		}
		WaveSpawn
		{
			Name "2b"
			Where spawnbot
			TotalCount 12
			MaxActive 5
			SpawnCount 1
			WaitBeforeStarting 15
			WaitBetweenSpawns 2
			WaitForAllSpawned "2a"
		
			TotalCurrency 100

			TFBot
			{
				Template T_TFBot_Scout_fanowar
			}
		}
		WaveSpawn
		{
			Name "2b"
			Where spawnbot
			TotalCount 12
			MaxActive 5
			SpawnCount 1
			WaitBeforeStarting 20
			WaitBetweenSpawns 1.5
			WaitForAllSpawned "2a"
		
			TotalCurrency 100

			TFBot
			{
				Template T_TFBot_Sniper_kukri
			}
		}
		WaveSpawn
		{
			Name "2ctank"
			WaitForAllSpawned "2b"
			TotalCount 1
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 12
			WaitBetweenSpawns 0
		
			TotalCurrency 100
		
			Tank
			{
				Name "tankboss"
				StartingPathTrackNode "tank_path_a_10"
				Health 13000
				Speed 75
				Skin 0
		
				OnKilledOutput
				{
					Target boss_dead_relay
					Action Trigger
				}
				OnBombDroppedOutput
				{
					Target boss_deploy_relay
					Action Trigger
				}
			}
		}
		WaveSpawn // speed up!
		{
			Name "2c"
			Where spawnbot
			TotalCount 8
			MaxActive 4
			SpawnCount 1
			WaitBeforeStarting 4
			WaitBetweenSpawns 3
			WaitForAllSpawned "2b"
		
			TotalCurrency 100

			TFBot
			{
				Template T_TFBot_Soldier_conch_samurai
			}
		}
		WaveSpawn
		{
			Name "2c"
			Where spawnbot
			TotalCount 12
			MaxActive 6
			SpawnCount 1
			WaitBeforeStarting 4
			WaitBetweenSpawns 2
			WaitForAllSpawned "2b"
		
			TotalCurrency 100

			TFBot
			{
				Template T_TFBot_Sniper_Huntsman
			}
		}
		WaveSpawn
		{
			Name "2c"
			Where spawnbot
			TotalCount 14
			MaxActive 8
			SpawnCount 2
			WaitBeforeStarting 4
			WaitBetweenSpawns 2.5
			WaitForAllSpawned "2b"
		
			TotalCurrency 100

			Squad
			{
				ShouldPreserveSquad 1
				TFBot
				{
					Template T_TFBot_Spy_dagger_thrower
				}
				TFBot
				{
					Template T_TFBot_Medic_crossbow
				}
			}
		}
		WaveSpawn // Dk again again, with strong supports
		{
			Name "2d"
			Where spawnbot
			TotalCount 4
			MaxActive 4
			SpawnCount 4
			WaitBeforeStarting 15
			WaitBetweenSpawns 3
			WaitForAllSpawned "2c"
		
			TotalCurrency 100

			Squad
			{
				ShouldPreserveSquad 1
				TFBot
				{
					Template T_TFBot_Giant_DemoMan_PrinceTavish
				}
				TFBot
				{
					Template T_TFBot_Sniper_SG_bow_multi_ignite
				}
				TFBot
				{
					Template T_TFBot_Sniper_SG_bow_multi_ignite
				}
				TFBot
				{
					Template T_TFBot_Sniper_SG_bow_multi_ignite
				}
			}
		}
		WaveSpawn // magicians!
		{
			Name "2d"
			Where spawnbot
			TotalCount 8
			MaxActive 5
			SpawnCount 1
			WaitBeforeStarting 12
			WaitBetweenSpawns 3
			WaitForAllSpawned "2c"
		
			TotalCurrency 100

			FirstSpawnWarningSound "vo/mvm/norm/pyro_mvm_autoonfire01.mp3"

			TFBot
			{
				Template T_TFBot_Pyro_spell_fireball
			}
		}
		WaveSpawn
		{
			Name "2d"
			Where spawnbot
			Where flankers
			TotalCount 16
			MaxActive 10
			SpawnCount 1
			WaitBeforeStarting 12
			WaitBetweenSpawns 1
			WaitForAllSpawned "2c"
		
			TotalCurrency 100

			TFBot
			{
				Template T_TFBot_Scout_rune
				Action Mobber
			}
		}
		WaveSpawn // a grand push of w2
		{
			Name "2e"
			Where spawnbot
			TotalCount 6
			MaxActive 6
			SpawnCount 3
			WaitBeforeStarting 14
			WaitBetweenSpawns 12
			WaitForAllSpawned "2d"
		
			TotalCurrency 50

			FirstSpawnWarningSound "vo/mvm/mght/scout_mvm_m_revenge03.mp3"

			Squad
			{
				ShouldPreserveSquad 1
				TFBot
				{
					Template T_TFBot_Giant_Scout_bat
					Attributes AlwaysCrit
				}
				TFBot
				{
					Template T_TFBot_Sniper_SG_bow_multi_ignite
				}
				TFBot
				{
					Template T_TFBot_Sniper_SG_bow_multi_ignite
				}
			}
		}
		WaveSpawn
		{
			Name "2e"
			Where spawnbot
			TotalCount 4
			MaxActive 3
			SpawnCount 1
			WaitBeforeStarting 12
			WaitBetweenSpawns 1
			WaitForAllSpawned "2d"
		
			TotalCurrency 25

			TFBot
			{
				Template T_TFBot_Sniper_kukri
			}
		}
		WaveSpawn
		{
			Name "2e"
			Where spawnbot
			TotalCount 4
			MaxActive 3
			SpawnCount 1
			WaitBeforeStarting 12
			WaitBetweenSpawns 1
			WaitForAllSpawned "2d"
		
			TotalCurrency 25

			TFBot
			{
				Template T_TFBot_Pyro_spell_fireball
			}
		}
		WaveSpawn
		{
			Name "2e"
			Where spawnbot
			TotalCount 4
			MaxActive 3
			SpawnCount 1
			WaitBeforeStarting 12
			WaitBetweenSpawns 1
			WaitForAllSpawned "2d"
		
			TotalCurrency 25

			TFBot
			{
				Template T_TFBot_Soldier_conch_samurai
			}
		}
		WaveSpawn
		{
			Name "2e"
			Where spawnbot
			TotalCount 4
			MaxActive 3
			SpawnCount 1
			WaitBeforeStarting 12
			WaitBetweenSpawns 1
			WaitForAllSpawned "2d"
		
			TotalCurrency 25

			TFBot
			{
				Template T_TFBot_Medic_crossbow
			}
		}
		WaveSpawn // how about that
		{
			Name "2support"
			Where spawnbot
			TotalCount 12
			MaxActive 2
			SpawnCount 1
			WaitBeforeStarting 14
			WaitBetweenSpawns 15
			WaitForAllSpawned "2b"
			Support 1
		
			TotalCurrency 50

			FirstSpawnWarningSound "vo/mvm/norm/demoman_mvm_battlecry04.mp3"

			TFBot
			{
				Template T_TFBot_Demo_horse_buff
				Action Mobber
			}
		}
    }

	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// WAVE 3 - $1200 - Full with bonus: $4100////////////////////////////////////////////////////////////////////////////////////////
	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

	// 关于本回合:兼有强力近战巨型和远程巨型;偷袭更加频繁;机器人更加致命。
	
	Wave // WAVE 3
	{
		InitWaveOutPut
		{
			Target medi_sound_stop_relay
			Action Trigger
		}
		StartWaveOutput
		{
			Target wave_start_relay_classic
			Action Trigger
		}
		DoneOutput
		{
			Target wave_finished_relay
			Action Trigger
		}
		WaveSpawn // 奇数回合音乐
		{
			TotalCount 0
			SpawnCount 0
			WaitBeforeStarting 0
		
			FirstSpawnWarningSound "sp/medieval/mvmmedievaltheme1.mp3"

			FirstSpawnOutput
			{
				Target medi_sound_stop_relay
				Action Trigger
			}
		}
		WaveSpawn // anti-zatoichi DK
		{
			Name "3a"
			Where spawnbot
			TotalCount 6
			MaxActive 6
			SpawnCount 6
			WaitBeforeStarting 0
			WaitBetweenSpawns 1.5
		
			TotalCurrency 25

			Squad
			{
				ShouldPreserveSquad 1
				TFBot
				{
					Template T_TFBot_Soldier_conch_samurai
				}
				TFBot
				{
					Template T_TFBot_Soldier_conch_samurai
				}
				TFBot
				{
					Template T_TFBot_Soldier_samurai
				}
				TFBot
				{
					Template T_TFBot_Soldier_samurai
				}
				TFBot
				{
					Template T_TFBot_Soldier_samurai
				}
				TFBot
				{
					Template T_TFBot_Soldier_samurai
				}
			}
		}
		WaveSpawn
		{
			Name "3a"
			Where spawnbot
			Where flankers
			TotalCount 12
			MaxActive 8
			SpawnCount 1
			WaitBeforeStarting 2
			WaitBetweenSpawns 1.5
		
			TotalCurrency 25

			TFBot
			{
				Template T_TFBot_Soldier_samurai
			}
		}
		WaveSpawn
		{
			Name "3a"
			Where spawnbot
			TotalCount 6
			MaxActive 4
			SpawnCount 1
			WaitBeforeStarting 2.1
			WaitBetweenSpawns 1.5
		
			TotalCurrency 25

			TFBot
			{
				Template T_TFBot_Soldier_conch_samurai
			}
		}
		WaveSpawn
		{
			Name "3a"
			Where spawnbot
			TotalCount 2
			MaxActive 2
			SpawnCount 1
			WaitBeforeStarting 2.1
			WaitBetweenSpawns 12
		
			TotalCurrency 25

			TFBot
			{
				Template T_TFBot_Giant_Pyro_powerjack_hok
			}
		}
		WaveSpawn // horses follow up!
		{
			Name "3b"
			Where spawnbot
			TotalCount 6
			MaxActive 6
			SpawnCount 6
			WaitBeforeStarting 15
			WaitBetweenSpawns 3
			WaitForAllSpawned "3a"
		
			TotalCurrency 100

			Squad
			{
				TFBot
				{
					Template T_TFBot_Demo_horse_buff
				}
				TFBot
				{
					Template T_TFBot_Demo_horse_buff
				}
				TFBot
				{
					Template T_TFBot_Demo_horse_basher
				}
				TFBot
				{
					Template T_TFBot_Demo_horse_basher
				}
				TFBot
				{
					Template T_TFBot_Demo_horse_basher
				}
				TFBot
				{
					Template T_TFBot_Demo_horse_basher
				}
			}
		}
		WaveSpawn
		{
			Name "3b"
			Where spawnbot
			TotalCount 1
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 30
			WaitBetweenSpawns 3
			WaitForAllSpawned "3a"
		
			TotalCurrency 75

			TFBot
			{
				Template T_TFBot_Giant_Scout_bat
				Attributes AlwaysCrit
			}
		}
		WaveSpawn
		{
			Name "3b"
			Where flankers
			TotalCount 16
			MaxActive 12
			SpawnCount 1
			WaitBeforeStarting 18
			WaitBetweenSpawns 1.25
			WaitForAllSpawned "3a"
		
			TotalCurrency 50

			TFBot
			{
				Template T_TFBot_Sniper_bushwacka
			}
		}
		WaveSpawn
		{
			Name "3b"
			Where flankers
			TotalCount 6
			MaxActive 4
			SpawnCount 1
			WaitBeforeStarting 20
			WaitBetweenSpawns 3
			WaitForAllSpawned "3a"
		
			TotalCurrency 50

			TFBot
			{
				Template T_TFBot_Demo_horse_buff
			}
		}
		WaveSpawn // solidarity!
		{
			Name "3c"
			Where spawnbot
			TotalCount 4
			MaxActive 4
			SpawnCount 4
			WaitBeforeStarting 8
			WaitBetweenSpawns 3
			WaitForAllSpawned "3b"
		
			TotalCurrency 100

			FirstSpawnWarningSound "vo/mvm/mght/soldier_mvm_m_dominationpyro03.mp3"

			Squad
			{
				ShouldPreserveSquad 1
				TFBot
				{
					Template T_TFBot_Giant_Soldier_escape_backup
				}
				TFBot
				{
					Template T_TFBot_Pyro_SG_homewrecker
				}
				TFBot
				{
					Template T_TFBot_Pyro_SG_homewrecker
				}
				TFBot
				{
					Template T_TFBot_Soldier_conch_samurai
				}
			}
		}
		WaveSpawn
		{
			Name "3c"
			Where spawnbot
			Where flankers
			TotalCount 7
			MaxActive 7
			SpawnCount 1
			WaitBeforeStarting 12
			WaitBetweenSpawns 2
			WaitForAllSpawned "3a"
		
			TotalCurrency 50

			TFBot
			{
				Template T_TFBot_Soldier_conch_samurai
			}
		}
		WaveSpawn
		{
			Name "3c"
			Where spawnbot
			Where flankers
			TotalCount 8
			MaxActive 8
			SpawnCount 1
			WaitBeforeStarting 12
			WaitBetweenSpawns 2
			WaitForAllSpawned "3a"
		
			TotalCurrency 50

			TFBot
			{
				Template T_TFBot_Sniper_bow_ignite
			}
		}
		WaveSpawn
		{
			Name "3dtank"
			WaitForAllSpawned "3c"
			TotalCount 1
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 18
			WaitBetweenSpawns 0
		
			TotalCurrency 100
		
			Tank
			{
				Name "tankboss"
				StartingPathTrackNode "tank_path_b_10"
				Health 11000
				Speed 75
				Skin 0
		
				OnKilledOutput
				{
					Target boss_dead_relay
					Action Trigger
				}
				OnBombDroppedOutput
				{
					Target boss_deploy_relay
					Action Trigger
				}
			}
		}
		WaveSpawn // unleash the horses... again!
		{
			Name "3d"
			Where spawnbot
			TotalCount 8
			MaxActive 8
			SpawnCount 8
			WaitBeforeStarting 12
			WaitBetweenSpawns 3
			WaitForAllSpawned "3c"
		
			TotalCurrency 100

			Squad
			{
				TFBot
				{
					Template T_TFBot_Demo_horse_buff
				}
				TFBot
				{
					Template T_TFBot_Demo_horse_buff
				}
				TFBot
				{
					Template T_TFBot_Demo_horse_basher
				}
				TFBot
				{
					Template T_TFBot_Demo_horse_basher
				}
				TFBot
				{
					Template T_TFBot_Demo_horse_basher
				}
				TFBot
				{
					Template T_TFBot_Demo_horse_basher
				}
				TFBot
				{
					Template T_TFBot_Demo_horse_basher
				}
				TFBot
				{
					Template T_TFBot_Demo_horse_basher
				}
				TFBot
				{
					Template T_TFBot_Demo_horse_basher
				}
				TFBot
				{
					Template T_TFBot_Demo_horse_basher
				}
			}
		}
		WaveSpawn
		{
			Name "3d"
			Where spawnbot
			TotalCount 2
			MaxActive 2
			SpawnCount 1
			WaitBeforeStarting 20
			WaitBetweenSpawns 15
			WaitForAllSpawned "3a"
		
			TotalCurrency 100

			TFBot
			{
				Template T_TFBot_Giant_Scout_bat
				Attributes AlwaysCrit
			}
		}
		WaveSpawn
		{
			Name "3d"
			Where spawnbot
			TotalCount 12
			MaxActive 9
			SpawnCount 1
			WaitBeforeStarting 12
			WaitBetweenSpawns 1.5
			WaitForAllSpawned "3c"
		
			TotalCurrency 50

			TFBot
			{
				Template T_TFBot_Sniper_bow_ignite
			}
		}
		WaveSpawn // mini giants strikes
		{
			Name "3e"
			Where spawnbot
			TotalCount 4
			MaxActive 4
			SpawnCount 1
			WaitBeforeStarting 13
			WaitBetweenSpawns 4
			WaitForAllSpawned "3d"
		
			TotalCurrency 25

			TFBot
			{
				Template T_TFBot_Pyro_SG_homewrecker
			}
		}
		WaveSpawn
		{
			Name "3e"
			Where spawnbot
			TotalCount 6
			MaxActive 4
			SpawnCount 1
			WaitBeforeStarting 14
			WaitBetweenSpawns 3
			WaitForAllSpawned "3d"
		
			TotalCurrency 50

			TFBot
			{
				Template T_TFBot_Demo_horse_buff
			}
		}
		WaveSpawn
		{
			Name "3e"
			Where flankers
			TotalCount 12
			MaxActive 10
			SpawnCount 1
			WaitBeforeStarting 16
			WaitBetweenSpawns 1
			WaitForAllSpawned "3d"
		
			TotalCurrency 50

			TFBot
			{
				Template T_TFBot_Soldier_samurai
			}
		}
		WaveSpawn
		{
			Name "3e"
			Where flankers
			TotalCount 8
			MaxActive 4
			SpawnCount 1
			WaitBeforeStarting 16
			WaitBetweenSpawns 4
			WaitForAllSpawned "3d"
			Support 1
		
			TotalCurrency 50

			TFBot
			{
				Template T_TFBot_Demo_horse
			}
		}
		WaveSpawn
		{
			Name "3e"
			Where flankers
			TotalCount 6
			MaxActive 4
			SpawnCount 1
			WaitBeforeStarting 16
			WaitBetweenSpawns 5
			WaitForAllSpawned "3c"
		
			TotalCurrency 50

			FirstSpawnWarningSound "vo/mvm/mght/pyro_mvm_m_laughevil01.mp3"

			TFBot
			{
				Template T_TFBot_Pyro_spell_meteor
			}
		}
		WaveSpawn
		{
			Name "3support"
			Where spawnbot
			TotalCount 12
			MaxActive 2
			SpawnCount 1
			WaitBeforeStarting 14
			WaitBetweenSpawns 15
			WaitForAllSpawned "3a"
			Support 1
		
			TotalCurrency 50

			RandomChoice
			{
				TFBot
				{
					Template T_TFBot_Medic_amputator
				}
				TFBot
				{
					Template T_TFBot_Spy_dagger_thrower
					Attributes AlwaysCrit
				}
			}
		}
	}

	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// WAVE 4 - $1000 - Full with bonus: $5200////////////////////////////////////////////////////////////////////////////////////////
	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

	// 关于本回合:巨型接力回合。

	Wave // WAVE 4
	{
		InitWaveOutPut
		{
			Target medi_sound_stop_relay
			Action Trigger
		}
		StartWaveOutput
		{
			Target wave_start_relay_classic
			Action Trigger
		}
		DoneOutput
		{
			Target wave_finished_relay
			Action Trigger
		}
		WaveSpawn // 偶数回合音乐
		{
			TotalCount 0
			SpawnCount 0
			WaitBeforeStarting 0
		
			FirstSpawnWarningSound "sp/medieval/mvmmedievaltheme2.mp3"

			FirstSpawnOutput
			{
				Target medi_sound_stop_relay
				Action Trigger
			}
		}
		WaveSpawn  // actually dont spawn the bomb on top since players can bodyblock it, resulting unforseen consequences...
		{
			Name "4bomb"
			Where spawnbot
			TotalCount 1
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 0
			WaitBetweenSpawns 1.5
		
			TotalCurrency 0

			Support Limited

			TFBot
			{
				Template T_TFBot_Scout_rune
				Attributes AlwaysCrit
			}
		}
		WaveSpawn // bunch of small robots
		{
			Name "4a-support"
			Where flankers
			Where spawnbot
			TotalCount 16
			MaxActive 14
			SpawnCount 1
			WaitBeforeStarting 1
			WaitBetweenSpawns 1.5
		
			TotalCurrency 50

			Support Limited

			RandomChoice
			{
				TFBot
				{
					Template T_TFBot_Scout_rune
					Attributes AlwaysCrit
				}
				TFBot
				{
					Template T_TFBot_Scout_rune
					Attributes AlwaysCrit
				}
				TFBot
				{
					Template T_TFBot_Scout_rune
					Attributes AlwaysCrit
				}
				TFBot
				{
					Template T_TFBot_Heavy_gnome_deadly
					Action Mobber
				}
			}
		}
		WaveSpawn // giant squad A
		{
			Name "4b"
			Where spawnbot
			TotalCount 4
			MaxActive 4
			SpawnCount 2
			WaitBeforeStarting 1
			WaitBetweenSpawns 10
			WaitForAllSpawned "4a-support"
		
			TotalCurrency 100

			FirstSpawnWarningSound "vo/mvm/mght/heavy_mvm_m_medicfollow02.mp3"

			Squad
			{
				ShouldPreserveSquad 1
				TFBot
				{
					Template T_TFBot_Giant_Medic_amputator
				}
				TFBot
				{
					Template T_TFBot_Giant_Heavy_gru  
				}
			}
		}
		WaveSpawn
		{
			Name "4b-support"
			Where spawnbot
			TotalCount 16
			MaxActive 10
			SpawnCount 1
			WaitBeforeStarting 1
			WaitBetweenSpawns 1.2
			WaitForAllSpawned "4a-support"
		
			TotalCurrency 100

			Support Limited

			RandomChoice
			{
				TFBot
				{
					Template T_TFBot_Scout_rune
					Attributes AlwaysCrit
				}
				TFBot
				{
					Template T_TFBot_Scout_rune
					Attributes AlwaysCrit
				}
				TFBot
				{
					Template T_TFBot_Heavy_gnome_deadly
					Action Mobber
				}
				TFBot
				{
					Template T_TFBot_Scout_rune
					Attributes AlwaysCrit
				}
				TFBot
				{
					Template T_TFBot_Sniper_bow_ignite
				}
				TFBot
				{
					Template T_TFBot_Demo_horse_conch
				}
				TFBot
				{
					Template T_TFBot_Sniper_bow_ignite
				}
				TFBot
				{
					Template T_TFBot_Demo_horse_conch
				}
			}
		}
		WaveSpawn // giant squad B
		{
			Name "4c"
			Where spawnbot
			TotalCount 10
			MaxActive 10
			SpawnCount 5
			WaitBeforeStarting 15
			WaitBetweenSpawns 15
			WaitForAllSpawned "4b"
		
			TotalCurrency 100

			FirstSpawnWarningSound "vo/mvm/norm/sniper_mvm_domination19.mp3"

			Squad
			{
				ShouldPreserveSquad 1
				TFBot
				{
					Template T_TFBot_Giant_Sniper_bow_barrage
				}
				TFBot
				{
					Template T_TFBot_Giant_Sniper_bow_buff
				}
				TFBot
				{
					Template T_TFBot_Demo_SG_knight
				}
				TFBot
				{
					Template T_TFBot_Demo_SG_knight
				}
				TFBot
				{
					Template T_TFBot_Demo_SG_knight
				}
			}
		}
		WaveSpawn // giants not in squad
		{
			Name "4c"
			Where spawnbot
			TotalCount 3
			MaxActive 3
			SpawnCount 1
			WaitBeforeStarting 10
			WaitBetweenSpawns 15
			WaitForAllSpawned "4b"
		
			TotalCurrency 100

			TFBot
			{
				Template T_TFBot_Giant_Pyro_axtinguisher
			}
		}
		WaveSpawn
		{
			Name "4c-support"
			Where spawnbot
			Where flankers
			TotalCount 22
			MaxActive 10
			SpawnCount 1
			WaitBeforeStarting 6
			WaitBetweenSpawns 1.2
			WaitForAllSpawned "4b-support"
		
			TotalCurrency 100

			Support Limited

			RandomChoice
			{
				TFBot
				{
					Template T_TFBot_Scout_rune
					Attributes AlwaysCrit
				}
				TFBot
				{
					Template T_TFBot_Demo_horse_conch
				}
				TFBot
				{
					Template T_TFBot_Sniper_bow_ignite
				}
			}
		}
		WaveSpawn // giant squad C
		{
			Name "4d"
			Where spawnbot
			TotalCount 5
			MaxActive 5
			SpawnCount 5
			WaitBeforeStarting 1
			WaitBetweenSpawns 15
			WaitForAllSpawned "4c"
		
			TotalCurrency 100

			Squad
			{
				ShouldPreserveSquad 1
				TFBot
				{
					Template T_TFBot_Giant_Medic_amputator
				}
				TFBot
				{
					Template T_TFBot_Giant_Heavy_gru
				}
				TFBot
				{
					Template T_TFBot_Demo_SG_knight
				}
				TFBot
				{
					Template T_TFBot_Demo_SG_knight
				}
				TFBot
				{
					Template T_TFBot_Demo_SG_knight
				}
			}
		}
		WaveSpawn
		{
			Name "4dtank"
			WaitForAllSpawned "4c"
			TotalCount 1
			MaxActive 1
			SpawnCount 1
			WaitBeforeStarting 22
			WaitBetweenSpawns 0
		
			TotalCurrency 100
		
			Tank
			{
				Name "tankboss"
				StartingPathTrackNode "tank_path_a_10"
				Health 15000
				Speed 75
				Skin 1
		
				OnKilledOutput
				{
					Target boss_dead_relay
					Action Trigger
				}
				OnBombDroppedOutput
				{
					Target boss_deploy_relay
					Action Trigger
				}
			}
		}
		WaveSpawn // arrows rain
		{
			Name "4d"
			Where spawnbot
			TotalCount 16
			MaxActive 12
			SpawnCount 4
			WaitBeforeStarting 10
			WaitBetweenSpawns 2
			WaitForAllSpawned "4c"
		
			TotalCurrency 50
			
			Squad
			{
				ShouldPreserveSquad 1
				TFBot
				{
					Template T_TFBot_Demo_SG_knight
				}
				TFBot
				{
					Template T_TFBot_Sniper_bow_burst_parabola
				}
				TFBot
				{
					Template T_TFBot_Sniper_bow_burst_parabola
				}
				TFBot
				{
					Template T_TFBot_Sniper_bow_burst_parabola
				}
			}
		}
		WaveSpawn
		{
			Name "4d-support"
			Where spawnbot
			Where flankers
			TotalCount 12
			MaxActive 6
			SpawnCount 1
			WaitBeforeStarting 6
			WaitBetweenSpawns 1.5
			WaitForAllSpawned "4c-support"
		
			TotalCurrency 50

			Support Limited

			RandomChoice
			{
				TFBot
				{
					Template T_TFBot_Scout_rune
					Attributes AlwaysCrit
				}
				TFBot
				{
					Template T_TFBot_Heavy_gnome_deadly
					Action Mobber
				}
				TFBot
				{
					Template T_TFBot_Demo_horse_conch
				}
				TFBot
				{
					Template T_TFBot_Demo_horse_conch
				}
				TFBot
				{
					Template T_TFBot_Demo_horse_conch
				}
			}
		}
		WaveSpawn // giant squad D
		{
			Name "4e"
			Where spawnbot
			TotalCount 6
			MaxActive 6
			SpawnCount 3
			WaitBeforeStarting 2
			WaitBetweenSpawns 18
			WaitForAllSpawned "4d"
		
			TotalCurrency 50

			FirstSpawnWarningSound "vo/mvm/norm/sniper_mvm_domination18.mp3"

			Squad
			{
				ShouldPreserveSquad 1
				TFBot
				{
					Template T_TFBot_Giant_Sniper_bow_barrage
				}
				TFBot
				{
					Template T_TFBot_Giant_Pyro_spell_fireball_burst
				}
				TFBot
				{
					Template T_TFBot_Giant_DemoMan_PrinceTavish
					Attributes AlwaysCrit
				}
			}
		}
		WaveSpawn // giant squad D
		{
			Name "4e"
			Where spawnbot
			TotalCount 4
			MaxActive 3
			SpawnCount 1
			WaitBeforeStarting 16
			WaitBetweenSpawns 12
			WaitForAllSpawned "4d"
		
			TotalCurrency 50

			TFBot
			{
				Template T_TFBot_Giant_Scout_bat
				Attributes AlwaysCrit
			}
		}
		WaveSpawn
		{
			Name "4e-support"
			Where spawnbot
			Where flankers
			TotalCount 36
			MaxActive 14
			SpawnCount 1
			WaitBeforeStarting 6
			WaitBetweenSpawns 1.5
			WaitForAllSpawned "4d-support"
		
			TotalCurrency 50

			Support 1

			RandomChoice
			{
				TFBot
				{
					Template T_TFBot_Scout_rune
					Attributes AlwaysCrit
				}
				TFBot
				{
					Template T_TFBot_Heavy_gnome_deadly
					Action Mobber
				}
				TFBot
				{
					Template T_TFBot_Sniper_bow_burst_parabola
				}
				TFBot
				{
					Template T_TFBot_Sniper_bow_burst_parabola
				}
			}
		}
	}
}