// Int Camo Computing
// Created by JaidenDestroyer:
// https://steamcommunity.com/id/jaidendestroyer/

#base robot_giant.pop
#base robot_standard.pop

// Wave 1
// ($100) 30 ShortStop Scouts
// ($100) 10 Soldiers + 20 Pyros
// Sentry busters

// Wave 2
// ($100) 20 Shotgun Heavys
// ($200) 20k HP Tank
// (-) Soldier support for tank
// ($200) Giant Heavy + Medic
// (-) Infinite Demoman support
// Sentry busters

// Wave 3
// 20 Demos
// 1 Giant superscout
// 15 Demoknights
// 30 Scouts
// 1 Giant Soldier + 2 medics
// Infinite support scouts

// Wave 4
// 10 Jumping sandman scouts
// 10 Samurai demoman

// Infinite Pyro Support
// 2 Giant Demo RapidFire
// 2 Bigheal medic

// Wave 5
// 40 loose cannon demos
// 20 huntsman snipers
// 2 superscouts
// 15 minigun heavys
// 20 shotgun heavys
// 2 Giant Pyro Flare Spammer w/ 2 bigheals each
// Infinite support shortstop scouts

// New Wave 6
// 40k tank
// Giant Heavyweapons
// Giant soldier
// Infinite support pyros

WaveSchedule
{
    StartingCurrency 600
    RespawnWaveTime 6 // wave 1 has 6 second respawn time, wave 2 has 8, wave 3 has 10 etc.
    CanBotsAttackWhileInSpawnRoom no

    Templates
    {
        JD_Scout_ShortStop
        {
            Class Scout
            Skill Easy
            ClassIcon scout_shortstop
            Item "The Shortstop"
            Item "The Milkman"
            Name "Shortstop Scout"
            Health 125
        }

        JD_Demoman_LooseCannon
        {
            Name "Cannon Demoman"
            Class Demoman
            Skill Normal
            ClassIcon demo_cannon

            Item "The Loose Cannon"

            ItemAttributes
            {
                ItemName "The Loose Cannon"
                "grenade launcher mortar mode" 0
                "fire rate penalty" 1.25
            }
        }

        JD_Pyro
        {
            Class Pyro
            Skill Easy
            WeaponRestrictions PrimaryOnly
        }

        JD_Heavyweapons_Shotgun
        {
            Template T_TFBot_Heavyweapons_Shotgun
            Skill Easy
        }

        JD_Heavyweapons
        {
                Class Heavyweapons
                Skill Easy
                WeaponRestrictions PrimaryOnly
        }

        JD_Demoman_Samurai
        {
            Template T_TFBot_Demoman_Samurai
            ItemAttributes
            {
                ItemName "The Splendid Screen"
                "Attack not cancel charge" 0 // cant attack while charging
            }
            CharacterAttributes
            {
                "charge time increased" 1.5
                "damage bonus" 1 // no damage bonus
            }
        }

        JD_Soldier
        {
            Class Soldier
            Skill Normal
            WeaponRestrictions PrimaryOnly
        }
    }

    Mission
    {
        Objective DestroySentries
        InitialCooldown 30
        Where spawnbot
        BeginAtWave 1
        RunForThisManyWaves 4
        CoolDownTime 30
        DesiredCount 1
        TFBot
        {
            Template T_TFBot_SentryBuster
        }
    }

    Mission
    {
        Objective Spy
        InitialCooldown 60
        Where spawnbot_mission_spy
        BeginAtWave 3
        RunForThisManyWaves 3
        CoolDownTime 60
        DesiredCount 3
        TFBot
        {
            Template T_TFBot_Spy
        }
    }

    // Wave 1
    Wave
    {
        // wave is first loaded
        StartWaveOutput
        {
            Target wave_start_relay
            Action Trigger
        }
        // wave is completed
        DoneOutput
        {
            Target wave_finished_relay
            Action Trigger
        }

        // 30 scouts ($100)
        WaveSpawn
        {
            Name "wave1a"
            Where spawnbot
            TotalCount 30
            MaxActive 10
            SpawnCount 5
            WaitBeforeStarting 0
            WaitBetweenSpawns 3
            TotalCurrency 200
            TFBot
            {
                Template JD_Scout_ShortStop
            }
        }

        WaveSpawn
        {
            Name "wave1b"
            WaitForAllDead "wave1a"
            WaitBeforeStarting 0
            WaitBetweenSpawns 6
            Where spawnbot
            TotalCount 20
            MaxActive 4
            SpawnCount 4
            TotalCurrency 100
            TFBot
            {
                Template JD_Pyro
            }
        }

        WaveSpawn
        {
            Name "wave1b"
            WaitForAllDead "wave1a"
            WaitBeforeStarting 0
            WaitBetweenSpawns 6
            Where spawnbot
            TotalCount 10
            MaxActive 2
            SpawnCount 2
            TotalCurrency 100
            TFBot
            {
                Template JD_Soldier
            }
        }
    }

    // Wave 2
    Wave
    {
        // wave is first loaded
        StartWaveOutput
        {
            Target wave_start_relay
            Action Trigger
        }
        // wave is completed
        DoneOutput
        {
            Target wave_finished_relay
            Action Trigger
        }

        // 20 heavys
        Wavespawn
        {
            Name "wave2a"
            where spawnbot
            TotalCount 20
            MaxActive 10
            SpawnCount 5
            WaitBetweenSpawns 3
            TotalCurrency 150
            TFBot
            {
                Template JD_Heavyweapons_Shotgun
            }
        }

        // Tank
        WaveSpawn
        {
            Name "wave2b"
            WaitForAllDead "wave2a"
            TotalCount 1
            TotalCurrency 250
            Tank
            {
                Name "TankBoss"
                Health 12000
                Speed 75
                StartingPathTrackNode "boss_path_1"

                OnBombDroppedOutput
                {
                    Target boss_deploy_relay
                    Action Trigger
                }
            }
        }

        // Limited Soldier Support
        WaveSpawn
        {
            Name "wave2c"
            WaitForAllSpawned "wave2b"
            where spawnbot
            SpawnCount 5
            MaxActive 5
            Support Limited
            TotalCount 10
            WaitBetweenSpawns 25
            TFBot
            {
                Class Soldier
                Skill Normal
            }
        }

        // Giant heavy with medic
        WaveSpawn
        {
            Name "wave2d"
            WaitForAllDead "wave2b"
            where spawnbot
            TotalCount 2
            MaxActive 2
            SpawnCount 2
            WaitBeforeStarting 5
            TotalCurrency 200
            Squad
            {
                TFBot
                {
                    Template T_TFBot_Giant_Heavyweapons
                }
                TFBot
                {
                    Template T_TFBot_Medic_BigHeal
                }
            }
        }

        // Infinite demoman support
        WaveSpawn
        {
            Name "wave2e"
            WaitForAllSpawned "wave2d"
            where spawnbot
            Support 1
            MaxActive 6
            SpawnCount 3
            WaitBeforeStarting 10
            WaitBetweenSpawns 10
            TFBot
            {
                Template T_TFBot_Demoman
            }
        }
    }

    // Wave 3
    Wave
    {
        // wave is first loaded
        StartWaveOutput
        {
            Target wave_start_relay
            Action Trigger
        }
        // wave is completed
        DoneOutput
        {
            Target wave_finished_relay
            Action Trigger
        }

        WaveSpawn
        {
            Name "wave3a"
            TotalCount 24
            SpawnCount 6
            MaxActive 12
            WaitBetweenSpawns 3
            Where spawnbot

            TotalCurrency 100

            Squad
            {
                TFBot
                {
                    Template T_TFBot_Demoman
                }
                TFBot
                {
                    Template T_TFBot_Scout_Melee
                }
                TFBot
                {
                    Template T_TFBot_Scout_Melee
                }
            }
        }

        WaveSpawn
        {
            Name "wave3b"
            Where spawnbot
            TotalCount 1
            SpawnCount 1
            MaxActive 1
            WaitForAllDead "wave3a"
            WaitBeforeStarting 5
            TotalCurrency 100
            TFBot
            {
                Template T_TFBot_Giant_Scout
            }
        }

        WaveSpawn
        {
            Name "wave3c"
            Where spawnbot
            WaitForAllSpawned "wave3b"
            WaitBeforeStarting 5
            TotalCount 15
            SpawnCount 5
            MaxActive 10
            WaitBetweenSpawns 3
            TotalCurrency 100
            TFBot
            {
                Template T_TFBot_Demoman_Knight
            }
        }

        WaveSpawn
        {
            Name "wave3d"
            Where spawnbot
            WaitForAllSpawned "wave3c"
            WaitBeforeStarting 5
            WaitBetweenSpawns 5
            TotalCount 30
            MaxActive 15
            SpawnCount 5
            TotalCurrency 100
            TFBot
            {
                Class Scout
                Skill Easy
            }
        }

        WaveSpawn
        {
            Name "wave3e"
            Where spawnbot
            WaitForAllDead "wave3d"
            WaitBeforeStarting 5
            TotalCount 3
            MaxActive 3
            SpawnCount 3
            TotalCurrency 200
            Squad
            {
                TFBot
                {
                    Template T_TFBot_Giant_Soldier
                }
                TFBot
                {
                    Template T_TFBot_Medic_QuickUber
                }
                TFBot
                {
                    Template T_TFBot_Medic_QuickUber
                }
            }
        }

        // infinite support scouts for giant
        WaveSpawn
        {
            Name "wave3f"
            Where spawnbot
            WaitForAllSpawned "wave3e"
            WaitBeforeStarting 10
            WaitBetweenSpawns 5
            MaxActive 8
            SpawnCount 4
            Support 1
            TFBot
            {
                Class Scout
                Skill Easy
            }
        }
    }

    // Wave 4
    Wave
    {
        // wave is first loaded
        StartWaveOutput
        {
            Target wave_start_relay
            Action Trigger
        }
        // wave is completed
        DoneOutput
        {
            Target wave_finished_relay
            Action Trigger
        }

        WaveSpawn
        {
            Name "wave4a"
            Where spawnbot
            TotalCount 20
            MaxActive 10
            SpawnCount 5
            TotalCurrency 250
            WaitBetweenSpawns 5
            TFBot
            {
                Template JD_Demoman_Samurai
                Health 150
                Scale 1
            }
        }

        WaveSpawn
        {
            Name "wave4a"
            Where spawnbot
            TotalCount 20
            MaxActive 10
            SpawnCount 5
            TotalCurrency 250
            WaitBetweenSpawns 5
            TFBot
            {
                Template T_TFBot_Scout_Sandman
            }
        }

        WaveSpawn
        {
            Name "wave4b"
            Where spawnbot
            WaitForAllDead "wave4a"
            TotalCount 6
            SpawnCount 3
            MaxActive 6
            TotalCurrency 300
            WaitBetweenSpawns 5
            WaitBeforeStarting 10
            Squad
            {
                TFBot
                {
                    Template T_TFBot_Giant_Demo_Burst
                }
                TFBot
                {
                    Template T_TFBot_Medic_BigHeal
                }
                TFBot
                {
                    Template T_TFBot_Medic_BigHeal
                }
            }
        }

        WaveSpawn
        {
            Name "wave4c"
            Where spawnbot
            WaitForAllSpawned "wave4b"
            MaxActive 5
            SpawnCount 5
            Support 1
            WaitBetweenSpawns 10
            TFBot
            {
                Template T_TFBot_Pyro_Flaregun
            }
        }
    }

    // Wave 5
    Wave
    {
        // wave is first loaded
        StartWaveOutput
        {
            Target wave_start_relay
            Action Trigger
        }
        // wave is completed
        DoneOutput
        {
            Target wave_finished_relay
            Action Trigger
        }

        WaveSpawn
        {
            Name "wave5a"
            Where spawnbot
            TotalCount 20
            MaxActive 10
            SpawnCount 10
            WaitBetweenSpawns 8
            TotalCurrency 100
            TFBot
            {
                Template JD_Demoman_LooseCannon
            }
        }

        WaveSpawn
        {
            Name "wave5a"
            Where spawnbot
            TotalCount 20
            MaxActive 10
            SpawnCount 5
            WaitBetweenSpawns 8
            WaitBeforeStarting 10
            TotalCurrency 100
            TFBot 
            {
                Template T_TFBot_Sniper_Huntsman
            }
        }

        WaveSpawn
        {
            Name "wave5b"
            Where spawnbot
            WaitForAllDead "wave5a"
            TotalCount 2
            MaxActive 2
            SpawnCount 2
            WaitBeforeStarting 5
            TotalCurrency 100
            TFBot
            {
                Template T_TFBot_Giant_Scout
            }
        }

        WaveSpawn
        {
            Name "wave5c"
            Where spawnbot_right
            WaitForAllDead "wave5b"
            TotalCount 15
            MaxActive 5
            SpawnCount 5
            WaitBeforeStarting 10
            WaitBetweenSpawns 4
            TotalCurrency 100
            TFBot
            {
                Template JD_Heavyweapons
            }
        }

        WaveSpawn
        {
            Name "wave5c"
            Where spawnbot
            WaitForAllDead "wave5b"
            TotalCount 20
            MaxActive 10
            SpawnCount 5
            WaitBetweenSpawns 4
            WaitBeforeStarting 10
            TotalCurrency 100
            TFBot
            {
                Template JD_Heavyweapons_Shotgun
            }
        }

        WaveSpawn
        {
            Name "wave5d"
            Where spawnbot
            WaitForAllDead "wave5c"
            WaitBeforeStarting 10
            WaitBetweenSpawns 3
            TotalCount 6
            MaxActive 6
            SpawnCount 3
            TotalCurrency 100
            Squad
            {
                TFBot
                {
                    Template T_TFBot_Giant_Pyro_Flare_Spammer
                }
                TFBot
                {
                    Template T_TFBot_Medic_BigHeal
                }
                TFBot
                {
                    Template T_TFBot_Medic_BigHeal
                }
            }
        }

        WaveSpawn
        {
            Name "wave5e"
            Where spawnbot
            WaitForAllSpawned "wave5d"
            WaitBeforeStarting 10
            WaitBetweenSpawns 10
            MaxActive 10
            SpawnCount 5
            Support 1
            TFBot
            {
                Template JD_Scout_ShortStop
            }
        }
    }

    // Wave 6
    Wave
    {
        // wave is first loaded
        StartWaveOutput
        {
            Target wave_start_relay
            Action Trigger
        }
        // wave is completed
        DoneOutput
        {
            Target wave_finished_relay
            Action Trigger
        }

        // Giant heavyweapons
        WaveSpawn
        {
            Name "wave6a"
            Where spawnbot
            TotalCurrency 200
            TotalCount 2
            MaxActive 1
            SpawnCount 1
            TFBot
            {
                Template T_TFBot_Giant_Heavyweapons
            }
        }

        // Giant soldier
        WaveSpawn
        {
            Name "wave6a"
            Where spawnbot
            TotalCurrency 200
            TotalCount 2
            MaxActive 1
            SpawnCount 1
            TFBot
            {
                Template T_TFBot_Giant_Soldier_Spammer_Reload
            }
        }

        // 40k HP Tank
        WaveSpawn
        {
            Name "wave6b"
            WaitBeforeStarting 6
            TotalCount 1
            TotalCurrency 200
            WaitBeforeStarting 10

            Tank
            {
                Name "TankBoss"
                Health 25000
                Speed 75
                StartingPathTrackNode "boss_path_1"

                OnBombDroppedOutput
                {
                    Target boss_deploy_relay
                    Action Trigger
                }
            }
        }

        // Infinite support pyros
        WaveSpawn
        {
            Name "wave6c"
            Where spawnbot
            WaitForAllSpawned "wave6a"
            WaitBeforeStarting 10
            WaitBetweenSpawns 12
            SpawnCount 5
            MaxActive 5
            Support 1
            TFBot
            {
                Template JD_Pyro
            }
        }
    }
}