#base robot_giant.pop
#base robot_standard.pop
#base robot_gatebot.pop
WaveSchedule
{
    StartingCurrency                      400
    RespawnWaveTime                       7
    CanBotsAttackWhileInSpawnRoom         No
    // Optional KeyValues
    AddSentryBusterWhenKillCountExceeds   15
    AddSentryBusterWhenDamageDealtExceeds 3000
    FixedRespawnWaveTime                  No
    Advanced                              0 // Only enable for Advanced/Expert missions (for achievements)
    EventPopFile                          Halloween // If you don't want this mission to be like wave 666 then delete this line
    IsEndless                             0 // Makes the waves spawn in continuously with no time between waves. Might be broken.


    PointTemplates
    {
        ringOwner
        {
            NoFixUp 1
            env_entity_maker
            {   
                "targetname" "ring_maker"
                "entitytemplate" "ringshottest"
            }
            OnSpawnOutput
            {
                target "!activator"
                action "RunScriptCode"
                param "ClaudzUtil.AddTracking(`ringOwner`, self)"
                delay 0.0
            }
            OnParentKilledOutput
            {
                target "ring_maker"
                action "RunScriptCode"
                param "ClaudzUtil.RemoveTracking(`ringOwner`)"
                delay 0.0
            }
        }
        ringshottest
        {
            KeepAlive 1
            // OnSpawnOutput
            // {
            //     target "tf_gamerules"
            //     action "PlayVO"
            //     Param "npc\combine_gunship\gunship_ping_search.wav"
            //     delay "0.0"
            // }
            OnSpawnOutput
            {
                target "ringmarkerone"
                action "kill"
                delay "5.5"
            }
            OnSpawnOutput
            {
                target "ringmarkertwo"
                action "kill"
                delay "5.5"
            }
            OnSpawnOutput
            {
                target "roundbeamtest"
                action "TurnOff"
                delay "4.5"
            }
            OnSpawnOutput
            {
                target "roundbeamtest"
                action "StrikeOnce"
                delay "0"
            }
            OnSpawnOutput
            {
                target "roundbeamtest"
                action "kill"
                delay "5.0"
            }
            OnSpawnOutput
            {
                target "ringmarkerone"
                action "RunScriptCode"
                param "SetMoveIgnoreSolid(self, 200)"
            }
            OnSpawnOutput
            {
                target "roundbeamtest"
                action "RunScriptCode"
                param "RingRegister(self,80,ClaudzUtil.GetTracking(`ringOwner`))"
                delay 0.0
            }
            OnSpawnOutput
            {
                target "ringmarkertwo"
                action "RunScriptCode"
                param "SetMoveIgnoreSolid(self, 200)"
                //delay 0.1
            }
            prop_dynamic
            {
                "parentname" ""
                "targetname" "ringmarkerone"
                "model" "models/empty.mdl"
                "solid" "0"
                "origin" "0 0 30"                
            }
            prop_dynamic
            {
                "parentname" ""
                "targetname" "ringmarkertwo"
                "model" "models/empty.mdl"
                "solid" "0"
                "angles" "0 180 0"
                "origin" "0 0 30"
            }	
            env_beam
            {
                "parentname" ""
                "targetname" "roundbeamtest"
                "BoltWidth" "6"
                "LightningStart" "ringmarkerone"
                "LightningEnd" "ringmarkertwo"
                "origin" "0 0 30"
                "renderamt" "200"
                "rendercolor" "100 255 255"
                "damage" "0"
                "NoiseAmplitude" "5"
                "dissolvetype" "1"
                "texture" "sprites/laserbeam.spr"
                "life" "4"
                "spawnflags" "8" //8
                "TouchType" "1"
            }
        }
    }

    // Wave 1 Sentry Busters
    Mission
    {
        Objective           DestroySentries
        Where               spawnbot
        BeginAtWave         1
        RunForThisManyWaves 1
        CooldownTime        70
        DesiredCount        1
        InitialCooldown     30
        TFBot
        {
            Template T_TFBot_SentryBuster
        }
    }

    // Wave 1 - X Currency
    Wave
    {

        StartWaveOutput
        {
            Target wave_start_relay // Replace with "Target wave_start_relay_classic" for Rottenburg
            Action Trigger
        }

        DoneOutput
        {
            Target wave_finished_relay
            Action Trigger
        }
        InitWaveOutput
        {
            Target wave_start_relay // gamerules or tf_gamerules, depending on the map
            Action RunScriptCode
            Param "
                // The original InitWaveOutput trigger if one exists, change if necessary
                //EntFire(wave_init_relay, Trigger)

                // Optional: Load any custom scripts you want
                IncludeScript(`claudz_logic`)
            "
        }
        // Subwave description here
        WaveSpawn
        {
            Name "wave1a"
            Where spawnbot
            TotalCount 1
            MaxActive 1
            SpawnCount 1
            WaitBeforeStarting 0
            WaitBetweenSpawns 10
            TotalCurrency 60
            TFBot
            {
                Class Scout
                Skill Hard
                SpawnTemplate ringOwner
                AutoJumpMin 4
                AutoJumpMax 4
                CharacterAttributes
                {
                    "move speed bonus" 0.7
                    "increased jump height" 1.5
                }
                FireInput
                {
                    Target "ring_maker"
                    Action "ForceSpawn"
                    Delay  2
                    Cooldown 2
                    Repeats 0 //0 is infinite
                }
            }
        }
    }
}