#base       robot_standard.pop
#base       robot_giant.pop

//WELCOME TO SHENANIGANS MADE BY SNURPER-BOB

// X = LEFT RIGHT Y = FORWARD BACKWARD Z = UP DOWN
// X = Positive Left, Negative Right
// Y = Positive Forward, Negative Backward

// That Guy Mike - RCAT
// https://steamcommunity.com/id/electronicfox
//HATSUNE MIKU MODEL
//https://gamebanana.com/mods/594632

// Some Codes:
// Shock Wave Shield LUA by ROYAL
// Ring Attack Wave from TERMINATION by CLAUDZ
 
WaveSchedule
{
    StartingCurrency                    900
    CanBotsAttackWhileInSpawnRoom       no
    RespawnWaveTime                     1
    WaveStartCountdown                  5
    AllowBotExtraSlots                  1
    MaxSpectators 0
    RobotLimit 32
    NoJoinMidwave 1


    ForceRedMoney 1
    // FixedRespawnWaveTime 1
    // AddSentryBusterWhenDamageDealtExceeds 3000
    // AddSentryBusterWhenKillCountExceeds 15
    Advanced                            1
    // EventPopfile Halloween
    LuaScriptFile                       scripts\shenanigans.lua
    LuaScriptFile                       scripts\shenanigans_enemy.lua
    LuaScriptFile                       scripts\shockwave_shields_modified.lua
    
    PrecacheSound                       choose_your_shenanigans.mp3
    PrecacheSound                       mvm/midnight/preposterous_future_intro.mp3
    PrecacheSound                       mvm/midnight/preposterous_future_loop.mp3
    PrecacheSound                       mvm/midnight/electrifying_future_ahead.mp3
    PrecacheSound                       mvm/midnight/theatre_future.mp3
    
    PrecacheSound                       kilometerious.mp3
    PrecacheSound                       pianofall.mp3
    PrecacheSound                       merasmus_summoned.mp3
    PrecacheSound                       merasmus_helps.mp3
    PrecacheSound                       merasmus_attacks.mp3
    PrecacheSound                       chicken_boom.mp3
    PrecacheSound                       mikuring.mp3 
    PrecacheSound                       miku_taunt1.mp3
    PrecacheSound                       miku_taunt2.mp3
    PrecacheSound                       miku_taunt3.mp3
    PrecacheSound                       miku_taunt4.mp3
    PrecacheSound                       miku_tank_phase.mp3
    PrecacheSound                       miku_phase2.mp3
    PrecacheSound                       wave3_intro_shenanigans.mp3
    PrecacheSound                       intermissionbeforethefuture.mp3
    PrecacheSound                       piano_ding.mp3
    PrecacheSound piano_rockets_ding.mp3

    PrecacheGeneric                     materials/shenanigans1_02.vtf
    PrecacheGeneric                     materials/shenanigans1_02.vmt
    PrecacheGeneric                     materials/shenanigans2_01.vtf
    PrecacheGeneric                     materials/shenanigans2_01.vmt

    // PrecacheModel                       "models/midnightmodels/scout.mdl"
    // PrecacheModel                       "models/midnightmodels/player/engineer.mdl"
    PrecacheModel                       "models/rcat/rcat_level2.mdl"
    PrecacheModel                       "models/props_mvm/indicator/indicator_circle_long.mdl"
    PrecacheModel                       "models/bots/merasmus/merasmus.mdl"

    PrecacheSound	"earthmover_strike_incoming.mp3"
	PrecacheSound	"earthmover_strike_initiated.mp3"

    // ExtraTankPath	// actually normal non-gate path //FROM LIGHT UP THE NIGHT!
	// {
	// 	Name	"this_fucking_sucks_actually" //but does it really?
	// 	Node	"2192 -6200 336"
	// 	Node	"1720 -6200 464"
	// 	Node	"1640 -6200 464"
	// 	Node	"1576 -6192 464"
	// 	Node	"1536 -6176 464"
	// 	Node	"1512 -6152 464"
	// 	Node	"1496 -6112 464"
	// 	Node	"1488 -6048 464"
	// 	Node	"1488 -5728 464"	// tank door bust relay here
	// 	Node	"1488 -4976 408"	// quite literally cutting corners here to save ent space
	// 	Node	"1336 -4824 408"
	// 	Node	"680 -4784 376"
	// 	Node	"528 -4632 376"
	// 	Node	"536 -4344 376"
	// 	Node	"656 -3912 376"
	// 	Node	"656 -3216 456"
	// 	Node	"435 -2928 456"
	// 	Node	"387 -2800 456"
	// 	Node	"387 -2704 456"
	// 	Node	"387 -1488 272"
	// 	Node	"484 -1360 272"
	// 	Node	"784 -1344 272"
	// 	Node	"864 -1272 272"
	// 	Node	"864 -1024 272"
	// 	Node	"616 -856 272"
	// 	Node	"304 -856 192"
	// 	Node	"80 -848 192"
	// 	Node	"32 -800 192"
	// 	Node	"32 -448 136"
	// 	Node	"-128 -336 136"
	// 	Node	"-888 -336 136"
	// 	Node	"-1696 -416 136"
	// 	Node	"-2496 -416 432"
	// 	Node	"-2600 -568 432"
	// 	Node	"-2600 -920 504"
	// 	Node	"-2600 -1224 504"
	// 	Node	"-2512 -1392 504"
	// }
    ExtraSpawnPoint  
    {
        Name "spawnred"
		// StartDisabled 1 // If the spawn point starts disabled (Default: 0)
        TeamNum 3 // 2 - Red team 3 - Robots. If you are adding spawn for reprogrammed robots, use team 3
        X	"-3709"                     
        Y	"-1810"                  
        Z	"280"        

    }

    Mission	// sentry buster
    {
        Objective               DestroySentries
        InitialCooldown         5
        Where                   spawnbot
        Where                   flankers
        BeginAtWave             1
        RunForThisManyWaves     6
        CooldownTime            40

        TFBot
        {
            Template        T_TFBot_SentryBuster
            Tag             boss
            // AddTemplate     T_TFBOT_CARDBOARD_MODULE
            CharacterAttributes
            {
                "head scale" 2.2
            }
        }
    }
    Mission // For Wave #
    {
        Where spawnbot_mission_spy
        Objective spy // Engineer,Sniper,Spy,DestroySentries
        BeginAtWave 2
        RunForThisManyWaves 1
        DesiredCount 2
    
        InitialCooldown 50
        CooldownTime 45
    
        TFBot
        {
            Class Spy
            Skill Normal
            Attributes IgnoreFlag
            Tag miku	
        }
    }

    CustomWeapon
    {
        baller
        {
            OriginalItemName                "The Loose Cannon"
            "damage penalty"                1
            "projectile trail particle"     stunballtrail_red
            "no self blast dmg"             2
            "Projectile speed increased"    1.76
            "custom projectile model"       models/passtime/ball/passtime_ball.mdl
        }
        telsaweapon
        {
            OriginalItemName "The Cow Mangler 5000"
            "damage penalty" 0.25
            "blast radius increased" 1.75
            "projectile detonate time" 0.05
            "weapon burn time reduced"  0.25
            "weapon burn dmg reduced" 0.5


            // "fire input on hit" "popscript^$skeleton"
        }
        spotlightminion
        {
            OriginalItemName "The Cow Mangler 5000"
            "damage bonus" 1.1
            "blast radius increased" 1.75
            "projectile detonate time" 0.05
            "weapon burn time reduced"  0.25
            "weapon burn dmg reduced" 0.5

            "explosion particle" "drg_cow_explosioncore_charged_blue"

            "no self blast dmg" 2

            // "fire input on hit" "popscript^$skeleton"
        }
    }
    CustomWeapon
	{
        //FROM LIGHT OF THE NIGHT
		Name	"MikuJudgement"
		OriginalItemName	"Panic Attack Shotgun"
		"damage bonus"				0
		"no damage falloff"			1
		"explosive bullets"			200
		"explosion particle"		"skull_island_explosion"
		"custom weapon fire sound"	"common/null.wav"
		"bullets per shot bonus"	0.15
		"override projectile type"	1
		"custom kill icon"			"megaton"
		"mod no reload DISPLAY ONLY"	1
		"mod max primary clip override"	-1
		"sniper fires tracer"			1
		"dmg taken from self reduced" 0.00001
	}
    CustomWeapon
	{
		Name	"Merasmus_STRIKE" //FROM LIGHT UP THE NIGHT
		OriginalItemName	"Panic Attack Shotgun"
		"damage bonus"				12.5
		"no damage falloff"			1
		"explosive bullets"			200
		"explosion particle"		"merasmus_dazed_explosion"
		"custom weapon fire sound"	"common/null.wav"
		"bullets per shot bonus"	0.15
		"override projectile type"	1
		"mod no reload DISPLAY ONLY"	1
		"mod max primary clip override"	-1
		"sniper fires tracer"			1
		"dmg taken from self reduced" 0.00001
	}
    //Wave 3 weapons
    CustomWeapon
    {
        demozart_projectile
        {
            OriginalItemName "The Air Strike"

            "add cond when active" 36
            "fire rate bonus" 0.001
            "faster reload rate" 0.5

            "projectile trail particle" "halloween_rockettrail"
            "projectile no deflect" 1

            "mod projectile heat aim start time" 0.1
            "mod projectile heat aim time" 3
            "mod projectile heat seek power" 360
            "mod projectile heat aim error" 500
            "projectile acceleration start time" 3.5
            "projectile acceleration time" 99
            "projectile acceleration" 9999
            "projectile spread angle penalty" 30

            "Projectile speed decreased" 0.10
            "mult projectile scale" 0.40
            "mod projectile heat no predict target speed" 1

            "custom projectile model" "models/props_manor/baby_grand_01.mdl"
            "ignores other projectiles" 1
        }
    }

    Templates
    {
        T_TFBot_Heavyweapons_Armored
        {
            Class           HeavyWeapons
            Scale           1.4
            Health          900
            Name            "Armored Heavy"
            Skill           Easy
            // maxvisionrange      800
            ClassIcon       heavy_armored
            Tag             bot
        }
        T_TFBOT_PIANO_BUSTER
        {
            Class Demoman
			Name "Piano-Buster"
            Action Mobber
			Skill Expert
			Health 2500
            Scale 1.5
			Item "The Ullapool Caber"
			WeaponRestrictions MeleeOnly
            UseBusterModel 1
			ClassIcon piano
			Attributes DisableDodge
            Attributes IgnoreFlag
            Attributes SuppressFire
            Item "The Man in Slacks"
            SpawnTemplate piano_buster
            Tag Miku
			CharacterAttributes
			{
				"move speed bonus" 1.75
				"damage force reduction" 0.5
				"airblast vulnerability multiplier" 0.5
				"override footstep sound set" 7
			}
        }
        T_TFBOT_CARDBOARD_MODULE
        {
            // FireInput
            // {
            //     Target      popscript
            //     Action      $cardboard
            //     Delay       0.1
            //     Repeats     1
            // }
            Name    "Cut-Out"

            Item "Idiot Box"
            Item "Shoestring Budget"
            // UseCustomModel "models/props_training/target_pyro.mdl"
            // SpawnTemplate Cardboard
            CharacterAttributes
            {
                "always gib"            1
                "voice pitch scale"     0
            }
        }

        // Chickens
        // {
        //     Class               Heavyweapons
        //     Name "I Was Birthed"
        //     Item                "The Chicken Kiev"
        //     Item                Yeti_Arms
        //     Item                Yeti_Legs
        //     UseHumanModel       1
        //     Item                "The Sandvich"
        //     Scale               0.90
        //     Attributes          IgnoreFlag
        //     StripItemSlot 0
        //     StripItemSlot 1
        //     StripItemSlot 2
        //     Action Mobber
        //     WeaponRestrictions MeleeOnly
        //     Attributes DisableDodge
        //     Tag chicken

        //     SpawnTemplate chicken_boom

        //     AddCond
        //     {
        //         Index       43
        //     }

        //     CharacterAttributes
        //     {
        //         "voice pitch scale"     1.85
        //     }

        //     ItemAttributes
        //     {
        //         ItemName                                "The Sandvich"
        //         "effect bar recharge rate increased"    0.5
        //     }

        //     VoiceCommand  	// Periodacally uses voice commands
        //     {
        //         Delay       4
        //         Cooldown    2.5
        //         Repeats     0
        //         Type        "Dispenser here"
        //     }
        // }

        Chickens_Pool
        {
            Class               Heavyweapons
            Name "Friendly Chicken"
            Item                "The Chicken Kiev"
            Item                Yeti_Arms
            Item                Yeti_Legs
            UseHumanModel       1
            // Item                "The Sandvich"
            Scale               0.90
            Attributes          IgnoreFlag
            StripItemSlot 0
            StripItemSlot 1
            StripItemSlot 2
            Action Mobber
            WeaponRestrictions MeleeOnly
            Attributes DisableDodge
            Tag chicken
            ClassIcon chicken_pool_friendly //doesnt exist

            CharacterAttributes
            {
                "voice pitch scale"     1.85
                // "move speed bonus" 1.50
            }

            // ItemAttributes
            // {
            //     ItemName                                "The Sandvich"
            //     // "effect bar recharge rate increased"    0.5
            // }

            VoiceCommand  	// Periodacally uses voice commands
            {
                Delay       4
                Cooldown    2.5
                Repeats     0
                Type        "Dispenser here"
            }
        }

        Chickens_Evil_Pool
        {
            Class               Heavyweapons
            Name "Evil Ass Chicken"
            Item                "The Chicken Kiev"
            Item                Yeti_Arms
            Item                Yeti_Legs
            UseHumanModel       1
            Scale               0.9
            Health 250
            Attributes          IgnoreFlag
            WeaponRestrictions MeleeOnly
            StripItemSlot 0
            StripItemSlot 1
            StripItemSlot 2
            Action Idle
            Tag evilchicken
            ClassIcon chicken_pool_evil //doesnt exist
            Attributes DisableDodge
            AddCond
            {
                Index 32
            }
            CharacterAttributes
            {
                "voice pitch scale"     1.85
                "move speed bonus" 1.50
            }
        }

        // Chickens_Evil
        // {
        //     Class               Heavyweapons
        //     Name "Evil Fuckass Chicken"
        //     Item                "The Chicken Kiev"
        //     Item                Yeti_Arms
        //     Item                Yeti_Legs
        //     UseHumanModel       1
        //     Scale               0.9
        //     Health 250
        //     Attributes          IgnoreFlag
        //     SpawnTemplate chicken_boom_evil
        //     WeaponRestrictions MeleeOnly
        //     StripItemSlot 0
        //     StripItemSlot 1
        //     StripItemSlot 2
        //     Action Mobber
        //     Attributes DisableDodge
        //     AddCond
        //     {
        //         Index 32
        //     }
        //     AddCond
        //     {
        //         Index 17
        //         Duration 1
        //     }

        //     CharacterAttributes
        //     {
        //         "voice pitch scale"     1.85
        //         "move speed bonus" 1.50
        //     }
        // }

        Giant_Demoman_Baller
        {
            Template                T_TFBot_Giant_Demoman
            Skill Normal
            Name                    "Giant Balling Demoman"
            ClassIcon               jackball
            WeaponRestrictions      MeleeOnly
            UseHumanAnimations      1
            Item                    "The Eyelander"
            Item                    EOTL_demopants
            Item                    "The Hawaiian Hangover"
            Item                    "Demoman's Fro"
            DesiredAttackRange      600

            FireInput
            {
                Target      popscript
                Action      $ballerEnemy
                Delay       0.1
                Repeats     1
            }

            FireWeapon  	// Periodically fires weapon
            {
                Delay       5.5
                Cooldown    5.5
                Repeats     0
                Duration    0.1
                Type        Jump
            }
            Tag                     miku
        }
        T_TFBot_Demoman_Stickybomb
        {
            Class Demoman
            ClassIcon demo_sticky_daan
            Name "Stickybomb Demoman"
            Skill Hard
            WeaponRestrictions SecondaryOnly
            ItemAttributes                  // Makes them not spin around, since they use the Grenade Launcher's animations
			{
				ItemName "TF_WEAPON_GRENADELAUNCHER"
				"is_passive_weapon" 1
				"override projectile type" 27.0
			}
        }
        T_TFBOT_GIANT_SPEAKERMAN
        {
            Template T_TFBot_Giant_Scout_Fast
            Tag miku
            Name "Speaker-Mann"
            WeaponRestrictions PrimaryOnly
            ClassIcon speakerman
            // SpawnTemplate speaker_function
            Action Medic
            Item "The Concheror"
            Attributes SpawnWithFullCharge

            CharacterAttributes
            {
                "increase buff duration"	9.0
            }
        }
    }

    PointTemplates
    {
        bossintrowave
        {
            //Wave 1
            logic_relay
            {
                "targetname" "wave1bossintro"

                ontrigger player,$playsoundtoself,vo\heavy_item_birdhead_domination01.mp3,5,-1
                ontrigger player,$playsoundtoself,vo\heavy_item_birdhead_domination01.mp3,5,-1

                ontrigger "player,$DisplayTextChat,{CBC3E3}As Promised... Heavy will now lay egg. In your mouth.,5,-1"

                OnTrigger  upper_text1,Display,,0,-1
                OnTrigger  middle_text1,Display,,0.2,-1

                Ontrigger popscript,$stopchickens,,0,1

                OnTrigger upper_text,Kill,,7,-1
                OnTrigger middle_text,Kill,,7,-1
                OnTrigger !self,Kill,,7,-1
            }
            //WAVE1
            game_text
			{
				"origin" "1984 1984 0"
				"targetname" "upper_text1"
				"message" "THE ENDLESS-CHICKEN GENERAL"
				"x" "-1"
				"y" "0.4"
				"spawnflags" "1"
				"effect" "2"
				"channel" "2"
				"color" "255 255 255"
				"fxtime" "0.2"
				"fadeout" "1"
				"fadein" "0.2"
				"holdtime" "5"
			}
            game_text
			{
				"origin" "1984 1984 0"
				"targetname" "middle_text1"
				"message" "CAPTAIN KIEV"
				"x" "-1"
				"y" "0.45"
				"channel" "4"
				"spawnflags" "1"
				"color" "255 255 255"
				"fadein" "0.2"
				"fadeout" "1"
				"holdtime" "4.8"
			}
            //---------------WAVE 2
            logic_relay
            {
                "targetname" "wave2bossintro"

                ontrigger pop_handle,$PauseWaveSpawn,teslatank*,0,-1
                ontrigger pop_handle,$PauseWaveSpawn,spotsoflight*,0,-1

                ontrigger player,$PlaySoundToSelf,ambient_mp3\lightsoff.mp3,0,-1
                ontrigger player,$PlaySoundToSelf,ambient_mp3\lightsoff.mp3,0,-1

                ontrigger player,$playsoundtoself,miku_intro.mp3,5,-1
                ontrigger "player,$DisplayTextChat,{CBC3E3}Hu hu hu! Hope you're ready. because I'm gonna put on a show!,5,-1"
                ontrigger "player,$playsoundtoself,mvm\mvm_deploy_giant.wav,10,-1"
                ontrigger "player,$playsoundtoself,items\pumpkin_explode3.wav,10,-1"

                "OnTrigger"  "pop_handle,$KillWavespawn,THEMIKU,0,-1"
                OnTrigger  upper_text,Display,,0,-1
                OnTrigger  middle_text,Display,,0.2,-1

            }
            game_text
			{
				"origin" "1984 1984 0"
				"targetname" "upper_text"
				"message" "THE ELECTRICAL WONDER"
				"x" "-1"
				"y" "0.4"
				"spawnflags" "1"
				"effect" "2"
				"channel" "2"
				"color" "255 255 255"
				"fxtime" "0.2"
				"fadeout" "1"
				"fadein" "0.2"
				"holdtime" "5"
			}
            game_text
			{
				"origin" "1984 1984 0"
				"targetname" "middle_text"
				"message" "HATSUNE-M1KU"
				"x" "-1"
				"y" "0.45"
				"channel" "4"
				"spawnflags" "1"
				"color" "255 255 255"
				"fadein" "0.2"
				"fadeout" "1"
				"holdtime" "4.8"
			}
            //Wave 3... Jesus theres gonna be alot
            game_text
			{
				"origin" "1984 1984 0"
				"targetname" "wave3_act0.5"
				"message" "ACT 0.5 | THE CALM"
				"x" "-1"
				"y" "0.4"
				"spawnflags" "1"
				"effect" "2"
				"channel" "2"
				"color" "255 255 255"
				"fxtime" "0.2"
				"fadeout" "1"
				"fadein" "0.2"
				"holdtime" "5"
			}
            game_text
			{
				"origin" "1984 1984 0"
				"targetname" "wave3_act1"
				"message" "ACT 1 | BEAUTIFUL CRESCENDO"
				"x" "-1"
				"y" "0.4"
				"spawnflags" "1"
				"effect" "2"
				"channel" "2"
				"color" "255 255 255"
				"fxtime" "0.2"
				"fadeout" "1"
				"fadein" "0.2"
				"holdtime" "5"
			}
            //--------------------
            point_spotlight
            {
                targetname "bossintro"

                origin "854 -5028 1532"
                angles "90 0 0"

                SpotlightLength 9000
                SpotlightWidth 800
                "HDRColorScale" 1
                "IgnoreSolid" 1
                "rendercolor" "241 229 172"

                // "$OnKilled" popscript,$killcheck,,-1,1
            }
            info_particle_system
            {
                "targetname"   "herewearehuzz"
                "parentname"   ""
                "origin"       "854 -5028 309"
                "effect_name"  "halloween_boss_summon"
                "start_active" "0"
            }
            env_shake
            { //inputs: StartShake, StopShake
                "targetname" "urmamajoke"
                "spawnflags" "5" //1 global, 4 players in air, 8 phys obj, 16 ropes
                "amplitude"  "5"
                "duration"   "3"
                "frequency"  "30"
                "origin"     "0 0 0"
            }
            logic_relay
            {
                "targetname" "showvibes"
                "OnTrigger"  bossintro,lightOn,,3,-1
                OnTrigger    urmamajoke,StartShake,,5,-1
                "OnTrigger"  bossintro,lightOff,,10,-1

                ontrigger herewearehuzz,Start,,5,-1
                ontrigger player,$playsoundtoself,ui\halloween_boss_summoned_fx.wav,5,-1
                ontrigger herewearehuzz,Stop,,10,-1
                ontrigger wave3_act1,Display,,10,-1
                ontrigger music3,trigger,,9.5,-1

                ontrigger player,$PlaySoundToSelf,ambient_mp3\lightsoff.mp3,3,-1
                ontrigger player,$PlaySoundToSelf,ambient_mp3\lightsoff.mp3,3,-1
            }
        }
        logicShenanigans
        {
            NoFixup     1
            OnSpawnOutput
            {
                Target tank_bust_fix_relay
                Action Trigger
                Delay 0.5
            }
            OnSpawnOutput
            {
                Target gate_relay
                Action Kill
                Delay 0.0
            }
            OnSpawnOutput
            {
                Target zingles
                Action AddOutput
                Param "targetname gate_relay"
                Delay 1
            }
            
            point_populator_interface
            {
                targetname      pop_handle
                origin      "1110 0 0"
            }

            filter_activator_tfteam
            {
                targetname      blurobots
                teamnum         3
            }

            filter_activator_tfteam
            {
                targetname      reds
                teamnum         2
            }
            filter_tf_bot_has_tag
            {
                "targetname" "bottags"
                "tags" "bot"
            }
            filter_tf_bot_has_tag
            {
                "targetname" "lmao"
                "tags" "boss"
                "negated" 1
            }
            logic_relay	// ensures tank barricade breaks but really I could just remove the tank barricade
			{
				"targetname"	"tank_bust_fix_relay"
				"OnTrigger"		"this_fucking_sucks_actually_9,AddOutput,OnPass tank_bust_relay:Trigger:0:0:-1,0,-1"
			}
            info_target
            {
                "targetname" "goherebosses"
                "origin"     "770 -5514 416"
            }
            logic_relay
            {
                "targetname" "zingles"

                "OnTrigger" "midPortcullis,Open,,0,-1"
                "OnTrigger" "capture_prerequisite,Disable,,0,-1"
                "OnTrigger" "capture_prerequisite_zone,Disable,,0,-1"
                "OnTrigger" "gateBlocker,Disable,,0,-1"
                "OnTrigger" "pop_interface,ChangeBotAttributes,RevertGateBotsBehavior,0.1,-1"
                "OnTrigger" "pop_interface,ChangeDefaultEventAttributes,RevertGateBotsBehavior,0.1,-1"
                "OnTrigger" "gate_capture_trigger,Disable,,0,-1"
                "OnTrigger" "midPortcullisCap,SetOwner,3,0,-1"
                "OnTrigger" "gate1_capped,PlaySound,,0,-1"
                "OnTrigger" "gate1_alarm_timer_relay,Trigger,,0,-1"
                "OnTrigger" "gate_relay,Disable,,5,-1"
            }
            logic_relay
            {
                "targetname" "menagery"
                // "OnTrigger"  popscript,$clearTesla,,0,-1
            }
            filter_activator_class
            {
                "targetname" "flagger"
                "filterclass" "item_teamflag"
            }
            trigger_catapult
            {
                targetname flings
                origin "-840 -332 270"
                "playerSpeed" "600"
                "launchTarget" "goherestupid"
                "mins" "-100 -250 0"
                "maxs" "100 250 100"
                "spawnflags" 1
            }
            trigger_multiple
            {
                origin "-840 -332 270"
                "mins"	   "-100 -250 -10"
                "maxs"	   "100 250 100"
                "spawnflags" "64" //1: players; 64 everything
                "wait"	   "0.2"
                "filtername" blurobots
                "OnStartTouch"  intel,$TeleportToEntity,stupidy,0.2,-1
                "OnStartTouch"  Player,$DisplayTextChat,Found,0.4,-1
            }
            info_target
            {
                targetname stupidy
                origin "-840 -374 -11"
            }
            info_target
            {
                "targetname" "goherestupid"
                "origin"     "-450 -313 169"
            }
        }

        ostHandler
        {
            OnSpawnOutput
            {
                Target      wave_finished_relay
                Action      AddOutput
                Param       "ontrigger stopMusic:trigger::0:-1"
                Delay       0.0
            }

            ambient_generic
            {
                targetname      chooseyourshenanigans
                message         #choose_your_shenanigans.mp3
                fadeoutsecs     4
                health          9
                pitch           100
                spawnflags      17
            }
            ambient_generic
            {
                targetname      inbetweenthetheatre
                message         #intermissionbeforethefuture.mp3
                fadeoutsecs     4
                health          10
                pitch           100
                spawnflags      17
            }
            ambient_generic
            {
                targetname      timeforaplay
                message         #wave3_intro_shenanigans.mp3
                fadeoutsecs     4
                health          10
                pitch           100
                spawnflags      17
            }

            ambient_generic
            {
                targetname      wavetrack1intro
                message         #mvm/midnight/preposterous_future_intro.mp3
                health          8
                pitch           100
                spawnflags      17
            }

            ambient_generic
            {
                targetname      wavetrack1
                message         #mvm/midnight/preposterous_future_loop.mp3
                health          8
                pitch           100
                spawnflags      17
            }

            ambient_generic
            {
                targetname      wavetrack2
                message         #mvm/midnight/electrifying_future_ahead.mp3
                health          8
                pitch           100
                spawnflags      17
            }
            ambient_generic
            {
                targetname      wavetrack3
                message         #mvm/midnight/theatre_future.mp3
                health          8
                pitch           100
                spawnflags      17
            }

            // ----------------------------------
            logic_timer
            {
                targetname          waveOST1_Play
                RefireTime          136
                StartDisabled       1
                OnTimer             wavetrack1,PlaySound,,0,-1
                OnTimer             wavetrack1,StopSound,,135,-1
                OnTimer             waveOST1_Play,ResetTimer,,0,-1
            }

            logic_timer
            {
                targetname          waveOST2_Play
                RefireTime          251
                StartDisabled       1
                OnTimer             wavetrack2,PlaySound,,0,-1
                OnTimer             wavetrack2,StopSound,,250,-1
                OnTimer             waveOST2_Play,ResetTimer,,0,-1
            }

            logic_timer
            {
                targetname          waveOST3_Play
                RefireTime          238
                StartDisabled       1
                OnTimer             wavetrack3,PlaySound,,0,-1
                OnTimer             wavetrack3,StopSound,,237,-1
                OnTimer             waveOST2_Play,ResetTimer,,0,-1
            }

            // -----------------------------------
            logic_relay
            {
                targetname      stopMusic
                OnTrigger       waveOST*,CancelPending,,0,-1
                OnTrigger       waveOST*,Disable,,0,-1
                OnTrigger       waveOST*,ResetTimer,,0,-1
                OnTrigger       wavetrack*,StopSound,,0,-1
                OnTrigger       music*,CancelPending,,0,-1

            }

            logic_relay
            {
                targetname      music1
                OnTrigger       wavetrack1intro,PlaySound,,1,-1
                OnTrigger       "player,$DisplayTextChat,{99C2D8}NOW PLAYING: A PREPOSTEROUS FUTURE AHEAD,1,-1"
                OnTrigger       waveOST1_Play,Enable,,182,-1
                OnTrigger       waveOST1_Play,FireTimer,,182.02,-1
            }
            logic_relay
            {
                targetname      music2
                OnTrigger       "player,$DisplayTextChat,{99C2D8}NOW PLAYING: AN ELECTRIFYING FUTURE AHEAD,1,-1"
                OnTrigger       hi,Show,,2,-1
                OnTrigger       waveOST2_Play,Enable,,1,-1
                OnTrigger       waveOST2_Play,FireTimer,,1.02,-1
            }
            logic_relay
            {
                targetname      music3
                OnTrigger       "player,$DisplayTextChat,{99C2D8}NOW PLAYING: A THEATRICAL FUTURE AHEAD,1,-1"
                OnTrigger       waveOST3_Play,Enable,,1,-1
                OnTrigger       waveOST3_Play,FireTimer,,1.02,-1
            }
            training_annotation
            {
                "targetname"   "hi"
                "display_text" "TAUNT TO ACTIVATE YOUR ULTS!"
                "lifetime"     "4"
                "origin"       "793 -5481 416"
            }
        }

        PVZcamera
        {
            point_viewcontrol
            {
                acceleration                    150
                deceleration                    300
                interpolatepositiontoplayer     0
                wait                            30
                targetname                      cameraPVZ
                origin                          "588 -5247 733"
                angles                          "19 -2 0"
                target                          lookhere
                spawnflags                      4
            }

            env_fade
            {
                targetname      noob
                duration        1
                holdtime        0.2
                rendercolor     "0 0 0"
                spawnflags      0
            }

            env_fade
            {
                targetname      theatricalfade
                duration        0.02
                holdtime        3
                rendercolor     "0 0 0"
                spawnflags      0
            }
            // env_fade
            // {
            //     targetname      othersidefade
            //     duration        0.05
            //     holdtime        0.05
            //     rendercolor     "0 0 0"
            //     spawnflags      1
            // }

            env_fade
            {
                targetname      noob2
                duration        0.7
                holdtime        0.2
                rendercolor     "0 0 0"
                spawnflags      1
            }

            prop_dynamic
            {
                targetname          lookhere
                parentname          camera_move
                model               models/empty.mdl
                origin              "1144 -4382 400"
                disableshadows      1
            }

            logic_relay
            {
                targetname      pvzfade
                OnTrigger       noob,fade,,0,-1
                OnTrigger       cameraPVZ,$EnableAll,,1,-1
                OnTrigger       noob2,fade,,1,-1
                Ontrigger       popscript,$showplayer,,1,-1
                OnTrigger       Player,SetHUDVisibility,0,1,-1
                OnTrigger       chooseyourshenanigans,PlaySound,,4.5,-1
                OnTrigger       "lookhere,$SetLocalOrigin,909 -5410 687,5,-1"
                OnTrigger       popscript,$shenanigans1,,6.2,-1
                OnTrigger       Player,SetHUDVisibility,1,6.2,-1
            }

            logic_relay
            {
                targetname theatrefade

                OnTrigger       noob,fade,,0,-1
                OnTrigger       cameraPVZ,$EnableAll,,1,-1
                OnTrigger       noob2,fade,,1,-1
                Ontrigger       popscript,$showplayer,,1,-1
                OnTrigger       Player,SetHUDVisibility,0,1,-1
                OnTrigger       timeforaplay,PlaySound,,3,-1
                OnTrigger       theatricalfade,fade,,3.6,-1
                ontrigger       player,$PlaySoundToSelf,ambient_mp3\lightsoff.mp3,3.6,-1
                ontrigger       player,$PlaySoundToSelf,ambient_mp3\lightsoff.mp3,3.6,-1

                // ontrigger      "cameraPVZ,AddOutput,trackspeed 999,4.1,-1"

                OnTrigger       "lookhere,$SetLocalOrigin,909 -5410 687,3.5,-1"
                // OnTrigger       othersidefade,fade,,6.5,-1

                OnTrigger       showthestars,lightOn,,6.5,-1
                ontrigger       player,$PlaySoundToSelf,ambient_mp3\lightsoff.mp3,6.5,-1
                ontrigger       player,$PlaySoundToSelf,ambient_mp3\lightsoff.mp3,6.5,-1
                OnTrigger       popscript,$shenanigans1,,6.5,-1
                OnTrigger       Player,SetHUDVisibility,1,6.7,-1
            }

            logic_relay
            {
                targetname      picked
                // ontrigger       "player,$displaytextchat,EVERYONE HAS CHOSEN A SHENANIGAN CARD,-1,0"
                OnTrigger       noob,fade,,0,-1
                OnTrigger       noob2,fade,,1,-1
                OnTrigger       cameraPVZ,$DisableAll,,1,-1
                Ontrigger       popscript,$powerup,,1,-1
                OnTrigger       chooseyourshenanigans,StopSound,,0,-1
                OnTrigger       timeforaplay,StopSound,,0,-1
                Ontrigger       "lookhere,$SetLocalOrigin,1144 -4382 400,3,-1"
                // ontrigger      "cameraPVZ,AddOutput,trackspeed 100,4.1,-1"

                
            }
            point_spotlight
            {
                targetname showthestars

                origin "838 -6084 1532"
                angles "90 0 0"

                SpotlightLength 9000
                SpotlightWidth 800
                "HDRColorScale" 1
                "IgnoreSolid" 1
                "rendercolor" "241 229 172"

                // "$OnKilled" popscript,$killcheck,,-1,1
            }
        }

        ballerattack
        {
            OnSpawnOutput
            {
                Target      triggerhappy
                Action      Trigger
                Delay       0.04
            }

            trigger_hurt
            {
                targetname          pow
                origin              "0 0 0"
                mins                "-250 -250 -300"
                maxs                "250 250 150"
                spawnflags          1	// 1: players; 64 everything
                damage              150
                damagetype          4
                StartDisabled       1
                filtername          blurobots
                OnHurtPlayer        buffs,Enable,,0,-1
                OnHurtPlayer        popscript,$GIZMOCOUNT_OTHER,,0,-1
            }

            info_particle_system
            {
                targetname      boom
                parentname      ""
                origin          "0 0 0"
                effect_name     rd_robot_explosion
                start_active    0
            }

            ambient_generic
            {
                targetname      baller
                message         balling.mp3
                health          10
                pitch           100
                radius          1500
                spawnflags      32
                origin          "0 0 0"
            }

            trigger_once
            {
                targetname      hi
                origin          "0 0 0"
                mins            "-64 -64 -64"
                maxs            "64 64 64"
                spawnflags      1	// 1: players; 64 everything
                filtername      reds
                OnTrigger       pow,$SetOwner,!activator,0.02,1
            }

            trigger_once
            {
                targetname          buffs
                origin              "0 0 0"
                mins                "-64 -64 -64"
                maxs                "64 64 64"
                spawnflags          1	// 1: players; 64 everything
                StartDisabled       1
                filtername          reds
                OnTrigger           "!activator,$addcond,57 0.6,0,1"
                OnTrigger           "!activator,$addcond,61 4,0,1"
                OnTrigger           "!activator,$addcond,62 4,0,1"
                OnTrigger           "!activator,$addcond,63 4,0,1"
                OnTrigger           "!activator,$addcond,29 4,0,1"
                OnTrigger           "!activator,$addcond,16 4,0,1"
                OnTrigger           popscript,$GIZMOCOUNT,,0,1
            }

            logic_relay
            {
                targetname      triggerhappy
                OnTrigger       pow,Enable,,0,-1
                OnTrigger       boom,Start,,0,-1
                OnTrigger       baller,PlaySound,,0,-1
                OnTrigger       pow,Disable,,0.1,-1
                OnTrigger       boom,Stop,,0.1,-1
                OnTrigger       pow,Kill,,0.2,-1
                OnTrigger       boom,Kill,,0.2,-1
                OnTrigger       !self,Kill,,0.2,-1
                OnTrigger       baller,Kill,,0.2,-1
            }
        }
        chicken_boom
        {
            OnSpawnOutput
            {
                Target chicken_point
                Action SetParent
                Param !activator
                Delay 0.1
            }
            OnSpawnOutput
            {
                Target chicken_killbill
                Action Enable
                Delay 3
            }
            OnParentKilledOutput
            {
                Target chicken_killbill
                Action Trigger
                Delay 0.1
            }
            OnParentKilledOutput
            {
                Target chicken_bkawks
                Action Trigger
                Delay 0.1
            }
            info_target
            {
                "targetname" "chicken_point"
                "origin"     "0 0 0"
            }
            info_particle_system
            {
                "targetname"   "chicken_death"
                "parentname"   "chicken_point"
                "origin"       "0 0 0"
                "effect_name"  "rd_robot_explosion"
                "start_active" "0"
            }
            trigger_multiple
            {
                "targetname" "chicken_killbill"
                "parentname" "chicken_point"
                "origin"	 "0 0 0"
                "mins"	   "-100 -100 -100"
                "maxs"	   "100 100 100"
                "spawnflags" "1" //1: players; 64 everything
                "wait"	   "0.2"
                "StartDisabled" "1"
                "filtername" blurobots
                "OnTrigger"  chicken_bkawks,Enable,,0,1
                OnTrigger !self,Kill,,0.2,1
            }
            trigger_multiple
            {
                "targetname" "chicken_bkawks"
                "parentname" "chicken_point"
                "origin"	 "0 0 0"
                "mins"	   "-200 -200 -100"
                "maxs"	   "200 200 100"
                "spawnflags" "1" //1: players; 64 everything
                "wait"	   "0.2"
                "StartDisabled" "1"
                "filtername" "blurobots"
                "OnStartTouch"  "!activator,$AddCond,27 8,0.1,1"
                "OnStartTouch" "!activatorRunScriptCodeself.TakeDamage(110,2,self)0.1-1"

                OnTrigger Player,$PlaySoundToSelf,chicken_boom.mp3,0,1
                OnTrigger chicken_death,Start,,0,1
                OnTrigger !self,Kill,,0.22,1
                OnTrigger chicken_point,Kill,,0.2,1
                OnTrigger chicken_death,Kill,,0.2,1
                OnTrigger @p@chicken_point,$Suicide,,0.2,1
            }
        }
        //----PLAYER ULTS HERE----///
        riku_power
        {
            trigger_multiple
            {
                targetname parent
                spawnflags 1
                filtername reds
                mins "-65 -65 -50"
                maxs "65 65 50"

                OnTrigger healzonerange,$SetFakeParent,!activator,0,1
                OnTrigger healzone,$SetFakeParent,!activator,0,1

                OnTrigger STUNNED,Kill,,0.2,1
                OnTrigger itspartytime,Kill,,3,1
                "OnTrigger" "healzone,Kill,,20,1"
                "OnTrigger" "healzonerange,Kill,,20,1"

                OnTrigger !self,Kill,,15,1
            }

            info_particle_system
            {
                "targetname"   "itspartytime"
                "parentname"   ""
                "origin"       "0 0 2"
                "effect_name"  "bl_killtaunt"
                "start_active" "1"
            }
            info_particle_system
            {
                "targetname"   "itspartytime"
                "parentname"   ""
                "origin"       "0 0 45"
                "effect_name"  "hammer_bell_ring_shockwave"
                "start_active" "1"
            }
            trigger_multiple
            {
                "targetname" "STUNNED"
                "origin"	 "0 0 0"
                "mins"	   "-9999 -9999 -9999"
                "maxs"	   "9999 9999 9999"
                "spawnflags" "1" //1: players; 64 everything
                "filtername" blurobots

                "OnStartTouch"  "popscript,$rikuPOWER,,0,-1"
            }
            dispenser_touch_trigger
            {
                "targetname" "healzonerange"
                "origin" "0 0 0"
                "mins" "-650 -650 -50"
                "maxs" "650 650 50"
            }
            mapobj_cart_dispenser
            {
                "targetname" "healzone"
                "origin" "-30 0 50"
                "defaultupgrade" "0"
                "spawnflags" "14"
                "SolidToPlayer" "0"
                "touch_trigger" "healzonerange"
                "TeamNum" "2"
                "renderamt" "255"
                "rendercolor" "255 255 255"
            }
        }
        kilometer_power
        {
            trigger_multiple
            {
                targetname parent
                spawnflags 1
                filtername reds
                mins "-40 -40 -50"
                maxs "40 40 50"


                OnTrigger     letsfuckinggo,PlaySound,,0,1

                OnTrigger    itspartytime,Kill,,5,1
                OnTrigger    letsfuckinggo,Kill,,5,1
                OnTrigger    !self,Kill,,5,1
            }
            ambient_generic
            {
                "targetname" "letsfuckinggo"
                "message"    "kilometerious.mp3"
                "health"     "10"
                "pitch"      "100"
                "spawnflags" "17"
            }
            info_particle_system
            {
                "targetname"   "itspartytime"
                "parentname"   ""
                "origin"       "0 0 0"
                "angles"       "0 0 0"
                "effect_name"  "drg_cow_explosioncore_charged"
                "start_active" "1"
            }
            info_particle_system
            {
                "targetname"   "itspartytime"
                "parentname"   ""
                "origin"       "0 0 2"
                "angles"       "0 0 0"
                "effect_name"  "bl_killtaunt"
                "start_active" "1"
            }
        }
        //----WILD CARD ABILITIES--//
        wildcard_duplicator
        {
            OnSpawnOutput
            {
                Target "duplicator"
                Action "$SetVar$duplicounts"
                Param 1
                Delay 3
            }
            // Allow the teleporter to finish its three-second warmup.
            OnSpawnOutput
            {
                Target "duplicator"
                Action Enable
                Delay 3
            }
            OnSpawnOutput
            {
                Target "itspartytime"
                Action Start
                Delay 3
            }
            OnSpawnOutput
            {
                target justamodel
                Action SetParent
                Param duplicator
                Delay 0.1
            }
            OnSpawnOutput
            {
                target booster
                Action $ShowToAll
                Delay 0
            }

            OnSpawnOutput
            {
                Target spawnfx
                Action Start
                Delay 0
            }
            OnSpawnOutput
            {
                Target "justamodel"
                Action SetHealth
                Param  300
                Delay  0.0
            }
            OnSpawnOutput
            {
                Target "justamodel"
                Action AddOutput
                Param "solid 0"
                Delay 0.1
            }
            OnSpawnOutput
            {
                Target "booster"
                Action AddOutput
                Param "solid 0"
                Delay 0.1
            }

            OnSpawnOutput
            {
                Target "duplicator"
                Action Disable
                Delay 8
            }
            OnSpawnOutput
            {
                Target "duplicator"
                Action Kill
                Delay 8
            }
            OnSpawnOutput
            {
                Target "booster"
                Action Kill
                Delay 8
            }
            OnSpawnOutput
            {
                Target "spawnfx"
                Action Stop
                Delay 8
            }
            OnSpawnOutput
            {
                Target "spawnfx"
                Action Kill
                Delay 8
            }
            OnSpawnOutput
            {
                Target "itspartytime"
                Action Stop
                Delay 8
            }
            OnSpawnOutput
            {
                Target "itspartytime"
                Action Kill
                Delay 8
            }
            OnSpawnOutput
            {
                Target "justamodel"
                Action Kill
                Delay 8
            }
            //-----------------------
            //-----------------------
            //-----------------------
            obj_teleporter
            {
                targetname "justamodel"
                teamnum 2
                defaultupgrade 2
                SolidToPlayer 0

                OnDestroyed booster,kill,,0,-1
                OnDestroyed duplicator,kill,,0,-1
                OnDestroyed itspartytime,kill,,0,-1
                OnDestroyed itspartytime,Stop,,0,-1
                OnDestroyed spawnfx,kill,,0,-1
            }
            prop_dynamic
            {
                "targetname" "booster"
                "parentname" ""
                "model"      "models/pickups/pickup_powerup_agility.mdl"
                "origin"     "0 0 0"
                SolidToPlayer 0
                "disableshadows" "1"
                "DefaultAnim" "spin"
            }
            trigger_multiple
            {
                "targetname" "duplicator"
                "origin"	 "0 0 0"
                "mins"	   "-35 -35 -0"
                "maxs"	   "35 35 75"
                "spawnflags" "1" //1: players; 64 everything
                "filtername" "reds"
                "wait" 1
                "StartDisabled" "1"

                OnTrigger popscript,$duplicator,,0,1
                OnTrigger !self,Disable,,0,1
                OnTrigger spawnfx,Start,,0,-1
                OnTrigger itspartytime,Stop,,0,-1

                Ontrigger booster,SetPlaybackRate,0.1,0,-1
                Ontrigger booster,SetPlaybackRate,1,5,-1
                Ontrigger spawnfx,Stop,,1,-1
                Ontrigger itspartytime,Start,,5,-1
            }
            info_particle_system
            {
                "targetname"   "itspartytime"
                "parentname"   ""
                "origin"       "0 0 0"
                "effect_name"  "teleporter_red_exit"
                "start_active" "0"
            }
            info_particle_system
            {
                "targetname"   "spawnfx"
                "parentname"   ""
                "origin"       "0 0 0"
                "effect_name"  "merasmus_object_spawn"
                "start_active" "0"
            }
        }
        wildcard_banana
        {
            OnSpawnOutput
            {
                Target "banana"
                Action SetParent
                Param  triggername
                Delay  0.0
            }
            OnSpawnOutput
            {
                Target triggername
                Action $SetVar$banana
                Param  4
                Delay  0.0
            }
            prop_dynamic
            {
                "targetname" "banana"
                "model"      "models/props_farm/scenes/bananana_peel.mdl"
                "origin"     "0 0 0"
                "disableshadows" "1"
            }
            trigger_multiple
            {
                "targetname" "triggername"
                "origin"	 "0 0 0"
                "mins"	   "-35 -35 -20"
                "maxs"	   "35 35 100"
                "spawnflags" "1" //1: players; 64 everything
                "wait"	   "2"
                "filtername" "blurobots" 

                "OnStartTouch" popscript,$banana,,0,-1
            }
        }
        wildcard_piano
        {
            OnSpawnOutput
            {
                Target "test"
                Action Trigger
                Delay 0.0
            }
            OnSpawnOutput
            {
                Target pianomodel
                Action $HideToAll
                Delay 0.0
            }
            path_track
            {
                targetname path_1
                target path_2
                orientationtype 0
                origin "0 0 500"
            }
            path_track
            {
                targetname path_2
                orientationtype 0
                origin "0 0 -65"

                OnPass owch,Enable,,0,-1
                OnPass paino,Start,,0,-1
                OnPass Player,$PlaySoundToSelf,pianofall.mp3,0,-1
                
                OnPass path_1,Kill,,0.2,-1
                OnPass path_2,Kill,,0.2,-1
                OnPass oopspiano,Kill,,0.2,-1
                OnPass pianomodel,Kill,,0.2,-1
                OnPass piano,Kill,,0.2,-1
                OnPass test,Kill,,0.2,-1
                OnPass area_indicate,Kill,,0.2,-1
                OnPass amongusser,Kill,,0.2,-1
                OnPass owch,Kill,,0.2,-1

            }

            func_tracktrain
			{
				"targetname" "oopspiano"
				"target" "path_1" 
               // "spawnflags" "1"
				"velocitytype" "1"
                "orientationtype" "2"
				"startspeed" "700"
			    "speed" "0"
                "height" "0"
            }
            prop_dynamic
            {
                "targetname" "pianomodel"
                "parentname" "oopspiano"
                "model"      "models/props_manor/baby_grand_01.mdl"
                "origin"     "0 0 0"
                "angles"     "-90 0 0"
                solid 0
                "disableshadows" "1"
            }
            trigger_hurt
            {
                targetname          owch
                origin              "0 0 0"
                mins                "-250 -250 -300"
                maxs                "250 250 200"
                spawnflags          1	// 1: players; 64 everything
                damage              300
                damagetype          4
                StartDisabled       1
                filtername          blurobots

                OnHurtPlayer        "!activator,$IgnitePlayerDuration,10,0,-1"
                OnHurtPlayer        "!activator,$Stun,1.5,0,-1"
            }

            info_particle_system
            {
                targetname      paino
                origin          "0 0 0"
                effect_name     hightower_explosion
                start_active    0
            }
            //--------------------------//
            logic_relay
            {
                "targetname" "test"
                "origin" "0 0 0"
                
                Ontrigger amongusser,PlaySound,,0,-1

                OnTrigger area_indicate,Enable,,0,-1
                OnTrigger oopspiano,SetSpeed,700,1.5,-1
                OnTrigger pianomodel,$ShowToAll,,1.5,-1

                Ontrigger "pianomodelRunScriptCodeself.EmitSound(`Player.FallDamageIndicator`)1.5-1"
            }
            prop_dynamic
            {
                targetname              area_indicate
                model                   models/props_mvm/indicator/indicator_circle_long.mdl
                origin                  "0 0 3"
                Skin                    4
                modelscale              3.9
                solid                   0
                defaultanim             start
                disablebonefollowers    1
                StartDisabled           1
                disableshadows          1
            }
            ambient_generic
            {
                "targetname" "amongusser"
                "message"    "ui/rd_2base_alarm.wav"
                "health"     "10"
                "pitch"      "100"
                "radius"     "2000"
                "spawnflags" "32"
                "origin"     "0 0 0"
            }
        }
        wildcard_merasmus
        {
            OnSpawnOutput
            {
                Target firetheairstrikes
                Action RunScriptCode
                Param "self.EmitSound(`merasmus_summoned.mp3`)"
            }
            OnSpawnOutput
            {
                Target merasmus
                Action SetAnimation
                Param teleport_in
                Delay 0
            }
            OnSpawnOutput
            {
                Target "thechecker"
                Action Enable
                Delay  5
            }
            OnSpawnOutput
            {
                Target thecircle
                Action AddOutput
                Param "Skin 0"
                Delay  5
            }

            prop_dynamic
            {
                "targetname" "merasmus"
                "parentname" thedrag
                "model"      "models/bots/merasmus/merasmus.mdl"
                "origin"     "0 0 0"
                modelscale 0.7
                "disableshadows" "1"
                "DefaultAnim" "ragdollspawn"
                "$fakeparentoffset" "-75 -90 0"
            }
            prop_dynamic
            {
                "targetname" "thecircle"
                "model"      "models/props_gameplay/cap_circle_320.mdl"
                skin 1
                "origin"     "0 0 0"
                "disableshadows" "1"
                "$fakeparentoffset" "0 0 6"
            }
            trigger_once
            {
                "targetname" "thechecker"
                "parentname" ""
                "origin"	 "0 0 0"
                "mins"	   "-160 -160 -100"
                "maxs"	   "160 160 100"
                "spawnflags" "1" //1: players; 64 everything
                "wait"	   "0.2"
                "StartDisabled" "1"
                "filtername" "reds"

                OnTrigger merasmus,$SetFakeParent,!activator,,0,1
                OnTrigger byebye,$SetFakeParent,!activator,,0,1
                OnTrigger "!activator,$PlaySoundToSelf,misc\halloween\spell_pickup.wav,0,1"
                OnTrigger merasmus,SetDefaultAnimation,Run_MELEE,,0,1
                OnTrigger thecircle,Kill,,,0,1
                OnTrigger firetheairstrikes,$SetFakeParent,!activator,,0.2,1
                OnTrigger firetheairstrikes,Enable,,6,1
                OnTrigger "thecircle,AddOutput,Skin 2,0,1"
                Ontrigger "merasmusRunScriptCodeself.EmitSound(`merasmus_helps.mp3`)0.11"

                OnTrigger clear,Trigger,,30,1
            }

            logic_timer
            {
                "targetname"    "firetheairstrikes"
                "RefireTime"    "2"
                "origin" "0 0 0"
                "StartDisabled" 1
                "OnTimer"       "merasmus,SetAnimation,zap_attack,0,-1"
                "OnTimer"       "merasmusRunScriptCodeself.EmitSound(`merasmus_attacks.mp3`)0.9-1"

                "OnTimer"       "popscript,$merasmusAttack,,0.9,-1"
                OnTimer         !self,ResetTimer,,1,-1
            }
            info_particle_system
            {
                "targetname"   "byebye"
                "parentname"   ""
                "origin"       "0 0 0"
                "effect_name"  "merasmus_object_spawn"
                "start_active" "0"
                "$fakeparentoffset" "-75 -90 0"
            }
            logic_relay
            {
                "targetname" "clear"

                "OnTrigger"  "Player,$PlaySoundToSelf,vo\halloween_merasmus\sf12_leaving11.mp3,0,1"
                Ontrigger firetheairstrikes,Disable,,0,1
                Ontrigger firetheairstrikes,$CancelPending,,0,1

                OnTrigger merasmus,SetAnimation,teleport_out,4.5,1
                OnTrigger byebye,Start,,5.2,1

                Ontrigger firetheairstrikes,kill,,5.2,1
                "OnTrigger"  merasmus,Kill,,5.2,1
                ontrigger  !self,Kill,,5.2,1
                ontrigger byebye,Kill,,5.2,1

            }
        }
        merasmus_airstrike
        {
            OnSpawnOutput
            {
                Target huzzah
                Action FireOnce
                Delay 0.04
            }
            OnSpawnOutput
            {
                Target huzzah
                Action Kill
                Delay 0.1
            }
            tf_point_weapon_mimic
			{
				"targetname"   "huzzah"
				"$weaponname"	"Merasmus_STRIKE"
				"teamnum"		"2"
				"damage"		"100"
				"splashradius" "137"
				"origin"       "0 0 900"
				"angles"       "90 0 0"
			}
        }
        //--------------------------------
        //NEUTRAL PERKS HERE
        //--------------------------------
        taunt_aggro
        {
            trigger_multiple
            {
                targetname parent
                spawnflags 1
                filtername reds
                mins "-50 -50 -50"
                maxs "50 50 50"

                OnTrigger cumlaude,SetParent,!activator,0.02,1
                // OnTrigger detection_circle,SetParent,cumlaude,0.04,1
                // OnTrigger taunt_detection,SetParent,cumlaude,0.04,1

                OnTrigger Player,$DisplayTextChat,weballer,0,1


                OnTrigger taunt_detection,Kill,,15,1
                OnTrigger !self,Kill,,15,1
                OnTrigger popscript,$clearAggro,,15,1

            }
            info_target
            {
                "targetname" "cumlaude"
                "origin"     "0 0 5"
            }

            trigger_multiple
            {
                "targetname" "taunt_detection"
                "parentname" "cumlaude"
                "origin"	 "0 0 0"
                "mins"	   "-800 -800 -500"
                "maxs"	   "800 800 100"
                "spawnflags" "1" //1: players; 64 everything
                "wait"	   "0.2"
                "StartDisabled" "0"
                "filtername" "lmao"


                OnStartTouch "!activator,$BotCommand,switch_action mobber,0.1,-1"
                OnStartTouch "!activator,SpeakResponseConcept,TLK_PLAYER_JEERS,0,-1"
                OnStartTouch Player,$DisplayTextChat,Found_Enemy,0,-1
                OnStartTouch !activator,$SetVar$isAngry,1,0,-1

                OnEndTouch "!activator,$BotCommand,switch_action Default,0.1,-1"
                OnEndTouch !activator,$SetVar$isAngry,0,0,-1
                OnStartTouch Player,$DisplayTextChat,Enemy_Lost,0,-1
            }
        }
        //--------------------------------
        //DECORATION
        //--------------------------------
        miku_spotlights
        {

            point_spotlight
            {
                targetname bgspot1

                origin "0 0 0"
                angles "-60 30 30"

                SpotlightLength 9000
                SpotlightWidth 300
                "HDRColorScale" 1
                "IgnoreSolid" 1
                "rendercolor" "0 255 255"
            }
            point_spotlight
            {
                targetname bgspot2

                origin "0 0 0"
                angles "-90 30 30"

                SpotlightLength 9000
                SpotlightWidth 300
                "HDRColorScale" 1
                "IgnoreSolid" 1
                "rendercolor" "0 255 255"
            }
            point_spotlight
            {
                targetname bgspot3

                origin "0 0 0"
                angles "-120 30 30"

                SpotlightLength 9000
                SpotlightWidth 300
                "HDRColorScale" 1
                "IgnoreSolid" 1
                "rendercolor" "0 255 255"
            }
            logic_relay
            {
                "targetname" "background_spotlights"
                "spawnflags" "2"

                "OnTrigger"  "bgspot3*,lightOff,,1,-1"
                "OnTrigger"  "bgspot1*,lightOn,,1,-1"
                "OnTrigger"  "bgspot1*,LightOff,,2,-1"
                "OnTrigger"  "bgspot2*,lightOn,,2,-1"
                "OnTrigger"  "bgspot2*,lightOff,,3,-1"
                "OnTrigger"  "bgspot3*,lightOn,,3,-1"
                "OnTrigger"  "!self,Trigger,,3.2,-1"

            }
        }
        //--------------------------------
        //ENEMY FUNCTIONS
        //--------------------------------
        chicken_boom_evil
        {
            OnSpawnOutput
            {
                Target chicken_point
                Action SetParent
                Param !activator
                Delay 0.1
            }
            OnSpawnOutput
            {
                Target chicken_killbill
                Action Enable
                Delay 0.5
            }
            info_target
            {
                "targetname" "chicken_point"
                "origin"     "0 0 0"
            }
            info_particle_system
            {
                "targetname"   "chicken_death"
                "parentname"   "chicken_point"
                "origin"       "0 0 0"
                "effect_name"  "rd_robot_explosion"
                "start_active" "0"
            }
            trigger_multiple
            {
                "targetname" "chicken_killbill"
                "parentname" "chicken_point"
                "origin"	 "0 0 0"
                "mins"	   "-100 -100 -100"
                "maxs"	   "100 100 100"
                "spawnflags" "1" //1: players; 64 everything
                "wait"	   "0.2"
                "StartDisabled" "1"
                "filtername" reds
                "OnTrigger"  chicken_bkawks,Enable,,0,1
                OnTrigger !self,Kill,,0.2,1
                
            }
            trigger_multiple
            {
                "targetname" "chicken_bkawks"
                "parentname" "chicken_point"
                "origin"	 "0 0 0"
                "mins"	   "-200 -200 -100"
                "maxs"	   "200 200 100"
                "spawnflags" "1" //1: players; 64 everything
                "wait"	   "0.2"
                "StartDisabled" "1"
                "filtername" reds
                "OnStartTouch"  "!activator,$AddCond,27 8,0.1,1"
                "OnStartTouch" "!activatorRunScriptCodeself.TakeDamage(45,2,self)0.1-1"

                OnTrigger Player,$PlaySoundToSelf,chicken_boom.mp3,0,1
                OnTrigger chicken_death,Start,,0,1
                OnTrigger !self,Kill,,0.2,1
                OnTrigger chicken_point,Kill,,0.2,1
                OnTrigger chicken_death,Kill,,0.2,1
                OnTrigger @p@chicken_point,$Suicide,,0.2,1
            }
        }
        teslatank
        {
            OnParentKilledOutput
            {
                Target fakemodel*
                Action Kill
                Delay 0.02
            }
            KeepAlive 1
            OnSpawnOutput
			{
				Target "rotateTesla"
				Action "Start"
                Delay 0.4
			}
            OnSpawnOutput
            {
                Target "rotateTesla"
                Action $SetFakeParent
                Action !activator
                Delay 0.2
            }
            OnSpawnOutput
            {
                Target boltstart
                Action "$RotateTowards"
                Param boltend
                Delay 0.4
            }
            OnSpawnOutput
            {
                Target boltstart
                Action "$HideToAll"
                Param boltend
                Delay 0.2
            }
            OnSpawnOutput
            {
                Target teslatank*
                Action AddOutput
                Param "OnHealthBelow90Percent teslaMODE:trigger"
                Delay 0.1
            }
            logic_relay
            {
                "targetname" "teslaMODE"
                "OnTrigger"  popscript,$teslaSetUp,,0,1
                OnTrigger    boltstart,$ShowToAll,,5,1
                OnTrigger    player,$PlaySoundToSelf,tanktesladeploy.mp3,2.1,1
                OnTrigger    chapachapca,Enable,,5,1
                OnTrigger    chapachapca,FireTimer,,5.2,1
            }
            logic_timer
            {
                "targetname"    "chapachapca"
                "RefireTime"    "5.0"
                "StartDisabled" 1

                "OnTimer"       "teslaAttack,trigger,,0,-1"
            }
            logic_relay
            {
                "targetname" "teslaAttack"

                OnTrigger    chargeup,PlaySound,,0,-1
                OnTrigger    chargeFX,Start,,0,-1
                OnTrigger    chargeup,AddOutput,"pitch 145",0.5,-1
                OnTrigger    chargeFX,Stop,,0.5,-1
                OnTrigger    chargeup,PlaySound,,1,-1
                OnTrigger    chargeFX,Start,,1,-1
                OnTrigger    chargeup,AddOutput,"pitch 235",1.5,-1
                OnTrigger    chargeFX,Stop,,1.5,-1
                OnTrigger    chargeup,PlaySound,,2,-1
                OnTrigger    chargeFX,Start,,2,-1

                "OnTrigger"  lightningbolt,StrikeOnce,,3,-1
                "OnTrigger"  teslabang,$StartFiring,40,3,-1

                "OnTrigger"  teslabang,$StopFiring,,13,-1
                "OnTrigger"  lightningbolt,TurnOff,,13,-1
                OnTrigger    popscript,$clearTesla,,13,-1

                ontrigger    attack,ResetTimer,,13,-1
            }
            info_particle_system
            {
                "targetname"   "chargeFX"
                "origin"       "0 0 350"
                "effect_name"  "drg_cow_explosioncore_charged_blue"
                "start_active" "0"
            }
            ambient_generic
            {
                "targetname" "chargeup"
                "message"    "teslacharge.mp3"
                "health"     "10"
                "pitch"      "100"
                "radius"     "2050"
                "spawnflags" "32"
                "origin"     "0 0 0"
            }
            prop_dynamic
            {
                "targetname" "boltstart"
                "origin" "0 0 300"
                "model" "models/bots/heavy/bot_heavy.mdl"


                "$modules" "rotator"

                "$rotationspeedx" "120"
                "$rotationspeedy" "120"
                "$rotationlimitx" "360"
                "$rotationlimity" "360"

                "rendermode" "10"
            }
            info_target
            {
                "targetname" "boltend"
                "parentname" "rotateTesla"
                "model" "models/empty.mdl"
                "origin"     "450 0 0"
                "disableshadows" "1"
            }
            prop_dynamic
            {
                "targetname" "fixthebolt"
                "model" "models/empty.mdl"
                "origin"     "0 0 0"
                "disableshadows" "1"
            }
            tf_point_weapon_mimic
            {
                "targetname"       "teslabang"
                "origin"           "0 0 10"
                "angles"           "0 0 0"
                "teamnum"          "3"

                "$weaponname"    "telsaweapon"
                "$firetime"      "0.3" //Delay between shots for $StartFiring input
                "$OnFire" popscript,$teslaAttack,,0,-1
            }
            func_rotating
			{
                "targetname" "rotateTesla"
				"origin" "0 0 0"
				"maxs" "0.1 0.1 0.1"

				"dmg" "0"
				"fanfriction" "100"
				"maxspeed" "60"
				"spawnflags" "64"
				"volume" "0"
			}
            env_beam
            {
                "targetname" "lightningbolt"
                "BoltWidth" "11"
                "LightningStart" "boltstart"
                "life" "10"
                "origin" "0 0 30"
                "renderamt" "255"
                "rendercolor" "173 216 230"
                "damage" "0"

                "NoiseAmplitude" "7"
                "dissolvetype" "1"
                "LightningEnd" "fixthebolt"

                "texture" "sprites/laserbeam.spr"
                "spawnflags" "560" //48 //512 <--ripped right out from contact. Based mission btw go play it
            } 
        }
        ballerattack_enemy
        {
            OnSpawnOutput
            {
                Target      triggerhappy
                Action      Trigger
                Delay       0.04
            }

            trigger_hurt
            {
                targetname          pow
                origin              "0 0 0"
                mins                "-250 -250 -300"
                maxs                "250 250 150"
                spawnflags          1	// 1: players; 64 everything
                damage              150
                damagetype          4
                StartDisabled       1
                filtername          reds
                OnHurtPlayer        buffs,Enable,,0,-1
            }

            info_particle_system
            {
                targetname      boom
                parentname      ""
                origin          "0 0 0"
                effect_name     rd_robot_explosion
                start_active    0
            }

            ambient_generic
            {
                targetname      baller
                message         balling.mp3
                health          10
                pitch           100
                radius          1500
                spawnflags      32
                origin          "0 0 0"
            }

            trigger_once
            {
                targetname      hi
                origin          "0 0 0"
                mins            "-64 -64 -64"
                maxs            "64 64 64"
                spawnflags      1	// 1: players; 64 everything
                filtername      blurobots
                OnTrigger       pow,$SetOwner,!activator,0.02,1
            }

            trigger_once
            {
                targetname          buffs
                origin              "0 0 0"
                mins                "-64 -64 -64"
                maxs                "64 64 64"
                spawnflags          1	// 1: players; 64 everything
                StartDisabled       1
                filtername          blurobots

                OnTrigger           "!activator,$addcond,29 4,0,1"
            }

            logic_relay
            {
                targetname      triggerhappy
                OnTrigger       pow,Enable,,0,-1
                OnTrigger       boom,Start,,0,-1
                OnTrigger       baller,PlaySound,,0,-1
                OnTrigger       pow,Disable,,0.1,-1
                OnTrigger       boom,Stop,,0.1,-1
                OnTrigger       pow,Kill,,0.2,-1
                OnTrigger       boom,Kill,,0.2,-1
                OnTrigger       !self,Kill,,0.2,-1
                OnTrigger       baller,Kill,,0.2,-1
            }

            // -- Oops in the air
            trigger_multiple
            {
                targetname          pow
                origin              "0 0 0"
                mins                "-450 -450 -50"
                maxs                "450 450 50"
                spawnflags          1	// 1: players; 64 everything
                wait                0.2
                StartDisabled       1
                filtername          reds
                OnStartTouch        "!activator,$PlaySoundToSelf,=40|player\doubledonk.wav,0,1"
                OnStartTouch        "!activatorRunScriptCodeself.ApplyAbsVelocityImpulse(Vector(0,0,1000))01"
            }
        }
        pianoenemy
        {
            OnSpawnOutput
            {
                Target "test"
                Action Trigger
                Delay 0.0
            }
            OnSpawnOutput
            {
                Target pianomodel
                Action $HideToAll
                Delay 0.0
            }
            path_track
            {
                targetname path_1
                target path_2
                orientationtype 0
                origin "0 0 500"
            }
            path_track
            {
                targetname path_2
                orientationtype 0
                origin "0 0 -65"

                OnPass owch,Enable,,0,-1
                OnPass paino,Start,,0,-1
                OnPass Player,$PlaySoundToSelf,pianofall.mp3,0,-1
                
                OnPass path_1,Kill,,0.2,-1
                OnPass path_2,Kill,,0.2,-1
                OnPass oopspiano,Kill,,0.2,-1
                OnPass pianomodel,Kill,,0.2,-1
                OnPass piano,Kill,,0.2,-1
                OnPass test,Kill,,0.2,-1
                OnPass area_indicate,Kill,,0.2,-1
                OnPass amongusser,Kill,,0.2,-1
                OnPass owch,Kill,,0.4,-1

            }

            func_tracktrain
			{
				"targetname" "oopspiano"
				"target" "path_1" 
               // "spawnflags" "1"
				"velocitytype" "1"
                "orientationtype" "2"
				"startspeed" "700"
			    "speed" "0"
                "height" "0"
            }
            prop_dynamic
            {
                "targetname" "pianomodel"
                "parentname" "oopspiano"
                "model"      "models/props_manor/baby_grand_01.mdl"
                "origin"     "0 0 0"
                "angles"     "-90 0 0"
                solid 0
                "disableshadows" "1"
            }
            trigger_hurt
            {
                targetname          owch
                origin              "0 0 0"
                mins                "-300 -300 -300"
                maxs                "300 300 200"
                spawnflags          1	// 1: players; 64 everything
                damage              175
                damagetype          4
                StartDisabled       1
                filtername          reds

                OnHurtPlayer        "!activatorRunScriptCodeself.ApplyAbsVelocityImpulse(Vector(0,0,700))0.1-1"

                
            }

            info_particle_system
            {
                targetname      paino
                origin          "0 0 0"
                effect_name     hightower_explosion
                start_active    0
            }
            //--------------------------//
            logic_relay
            {
                "targetname" "test"
                "origin" "0 0 0"
                
                Ontrigger amongusser,PlaySound,,0,-1

                OnTrigger area_indicate,Enable,,0,-1
                OnTrigger oopspiano,SetSpeed,700,1.5,-1
                OnTrigger pianomodel,$ShowToAll,,1.5,-1

                Ontrigger "pianomodelRunScriptCodeself.EmitSound(`Player.FallDamageIndicator`)1.5-1"
            }
            prop_dynamic
            {
                targetname              area_indicate
                model                   models/props_mvm/indicator/indicator_circle_long.mdl
                origin                  "0 0 3"
                Skin                    1
                modelscale              1
                solid                   0
                defaultanim             start
                disablebonefollowers    1
                StartDisabled           1
                disableshadows          1
            }
            ambient_generic
            {
                "targetname" "amongusser"
                "message"    "ui/rd_2base_alarm.wav"
                "health"     "10"
                "pitch"      "100"
                "radius"     "2000"
                "spawnflags" "32"
                "origin"     "0 0 0"
            }
        }
        piano_buster
        {
            OnSpawnOutput
            {
                Target header
                Action SetParent
                Param !activator
                Delay 0.02
            }
            OnSpawnOutput
            {
                Target helo
                Action SetParent
                Param !activator
                Delay 0.04
            }
            info_target
            {
                "targetname" "header"
                "origin"     "0 0 0"
            }
            trigger_multiple
            {
                "targetname" "helo"
                "parentname" ""
                "origin"	 "0 0 0"
                "mins"	   "-80 -80 -100"
                "maxs"	   "80 80 100"
                "spawnflags" "1" //1: players; 64 everything
                "wait"	   "0.2"
                "filtername" reds

                "OnStartTouch" pianotime,ForceSpawn,,0,1
                "OnStartTouch" "@p@header,$AddPlayerAttribute,move speed penalty|0.005,0,1"
                "OnStartTouch" "@p@header,$PlaySequence,primary_death_backstab,0.8,1"
                "OnStartTouch" "@p@header,$Suicide,,2.25,1"
                "OnStartTouch" "header,Kill,,2.3,1"
                "OnStartTouch" "pianotime,Kill,,2.4,1"
                "OnStartTouch" "!self,Kill,,3,1"

            }
            env_entity_maker
            {   
                "targetname" "pianotime"
                "entitytemplate" "pianoenemy"
            }
        }
        //--------------------------------
        //BOSS FUNCTIONS
        //--------------------------------
        chickenbossAttack
        {
            OnSpawnOutput
            {
                Target chickensSpawnHere
                Action SetParent
                Param !activator
                Delay 0.02
            }
            info_target
            {
                "targetname" "chickensSpawnHere"
                "origin"     "0 0 0"
            }
            logic_relay
            {
                "targetname" "chickenRelay"
                "OnTrigger"  popscript,$chickenSpawn,,0,-1
                "OnTrigger"  popscript,$chickenSpawn,,1,-1
                "OnTrigger"  popscript,$chickenSpawn,,2,-1
            }
        }
        //Miku
        spotlights_attack
        {
            OnSpawnOutput
            {
                Target attackSpotlight
                Action Trigger
                Delay 0.0
            }
            logic_relay
            {
                targetname attackSpotlight

				"OnTrigger"		incoming,PlaySound,,1,-1
				"OnTrigger"		STRIKE,PlaySound,,2,-1

                ontrigger player,$PlaySoundToSelf,ambient_mp3\lightsoff.mp3,0,-1
                ontrigger area_indicate,Enable,,0,-1
                ontrigger spot,lightOn,,0,-1

                ontrigger mikubang,FireOnce,,2,-1
                ontrigger flunged,Enable,,2,-1
                ontrigger mikubang,Kill,,2.5,-1
                ontrigger spot,Kill,,2,-1
                ontrigger spot,lightOff,,2,-1
                ontrigger area_indicate,Kill,,2,-1
                ontrigger !self,Kill,,2,-1
                ontrigger flunged,Kill,,2.1,-1

                "OnTrigger"		incoming,Kill,,2.5,-1
				"OnTrigger"		STRIKE,Kill,,2.5,-1

                // "$OnKilled" popscript,$killcheck,,-1,1

            }
            ambient_generic
            {
                "targetname" "incoming"
                "message"    "earthmover_strike_incoming.mp3"
                "health"     "10"
                "pitch"      "100"
                "radius"     "4500"
                "spawnflags" "32"
                "origin"     "0 0 0"

                // "$OnKilled" popscript,$killcheck,,-1,1
            }
            ambient_generic
            {
                "targetname" "STRIKE"
                "message"    "earthmover_strike_initiated.mp3"
                "health"     "10"
                "pitch"      "100"
                "radius"     "4500"
                "spawnflags" "32"
                "origin"     "0 0 0"

                // "$OnKilled" popscript,$killcheck,,-1,1
            }
            point_spotlight
            {
                targetname spot

                origin "0 0 600"
                angles "90 0 0"

                SpotlightLength 9000
                SpotlightWidth 300
                "HDRColorScale" 1
                "IgnoreSolid" 1
                "rendercolor" "0 255 255"

                // "$OnKilled" popscript,$killcheck,,-1,1
            }
            prop_dynamic
            {
                targetname              area_indicate
                model                   models/props_mvm/indicator/indicator_circle_long.mdl
                origin                  "0 0 3"
                Skin                    1
                modelscale              4
                solid                   0
                defaultanim             start
                disablebonefollowers    1
                StartDisabled           1
                disableshadows          1
            }
            trigger_multiple
            {
                "targetname" "flunged"
                "parentname" ""
                "origin"	 "0 0 0"
                "mins"	   "-125 -125 -50"
                "maxs"	   "125 125 150"
                "spawnflags" "1" //1: players; 64 everything
                "wait"	   "0.2"
                "StartDisabled" "1"
                "filtername" reds

                "OnStartTouch" "!activatorRunScriptCodeself.TakeDamage(65,1,self)0.11"
                "OnStartTouch" "!activatorRunScriptCodeself.ApplyAbsVelocityImpulse(Vector(0,0,500))0.1-1"
            }
            tf_point_weapon_mimic
            {
                "targetname"       "mikubang"
                "origin"           "0 0 600"
                "angles"           "90 0 0"
                "teamnum"          "3"

                "$weaponname"    MikuJudgement
                "$firetime"      "0.25" //Delay between shots for $StartFiring input
            }
        }
        spotlights_attack_minion
        {
            OnSpawnOutput
            {
                Target mikubang
                Action $SetOwner
                Param !activator
                Delay 0.02
            }
            OnParentKilledOutput
            {
                Target thehuz
                Action Kill
                Delay 0.02
            }
            logic_timer
            {
                "targetname"    "based"
                "RefireTime"    "3.0"
                "StartDisabled" 0
                "OnTimer"       minionlight,Trigger,,0,-1
            }
            logic_relay
            {
                targetname minionlight

                ontrigger player,$PlaySoundToSelf,ambient_mp3\lightsoff.mp3,0,1
                ontrigger area_indicate,Enable,,0,1

				"OnTrigger"		incoming,PlaySound,,0,-1
                ontrigger       minionbang,FireOnce,,1,-1
                ontrigger       based,ResetTimer,,1,-1

            }
            info_target
            {
                "targetname" "beampoint"
                "origin"     "0 0 600"
            }
            ambient_generic
            {
                "targetname" "incoming"
                "message"    "earthmover_strike_incoming.mp3"
                "health"     "10"
                "pitch"      "100"
                "radius"     "4500"
                "spawnflags" "32"
                "origin"     "0 0 0"
            }
            prop_dynamic
            {
                targetname              area_indicate
                model                   models/props_mvm/indicator/indicator_circle_long.mdl
                origin                  "0 0 3"
                Skin                    1
                modelscale              4
                solid                   0
                defaultanim             start
                disablebonefollowers    1
                StartDisabled           1
                disableshadows          1

                // "$OnKilled" popscript,$killcheck,,-1,1
            }

            tf_point_weapon_mimic
            {
                "targetname"       "minionbang"
                "origin"           "0 0 0"
                "angles"           "90 0 0"
                "teamnum"          "3"

                "$weaponname"    spotlightminion
                "$firetime"      "0.25" //Delay between shots for $StartFiring input
            }
        }
        spotlights_attack_singular_miku
        {
            OnSpawnOutput
            {
                Target attackSpotlight
                Action Trigger
                Delay 0.0
            }
            logic_relay
            {
                targetname attackSpotlight

				"OnTrigger"		incoming,PlaySound,,5,-1
				"OnTrigger"		STRIKE,PlaySound,,6,-1

                ontrigger player,$PlaySoundToSelf,ambient_mp3\lightsoff.mp3,0,-1
                ontrigger player,$PlaySoundToSelf,ambient_mp3\lightsoff.mp3,0,-1

                ontrigger area_indicate,Enable,,0,-1
                ontrigger spot,lightOn,,0,-1

                ontrigger mikubang,FireOnce,,6,-1
                ontrigger flunged,Enable,,6,-1
                ontrigger mikubang,Kill,,6.5,-1
                ontrigger spot,Kill,,6,-1
                ontrigger spot,lightOff,,6,-1
                ontrigger area_indicate,Kill,,6,-1
                ontrigger !self,Kill,,6,-1
                ontrigger flunged,Kill,,6.2,-1

                "OnTrigger"		incoming,Kill,,6.5,-1
				"OnTrigger"		STRIKE,Kill,,6.5,-1

            }
            ambient_generic
            {
                "targetname" "incoming"
                "message"    "earthmover_strike_incoming.mp3"
                "health"     "10"
                "pitch"      "100"
                "radius"     "4500"
                "spawnflags" "32"
                "origin"     "0 0 0"
            }
            ambient_generic
            {
                "targetname" "STRIKE"
                "message"    "earthmover_strike_initiated.mp3"
                "health"     "10"
                "pitch"      "100"
                "radius"     "4500"
                "spawnflags" "32"
                "origin"     "0 0 0"
            }
            point_spotlight
            {
                targetname spot

                origin "0 0 600"
                angles "90 0 0"

                SpotlightLength 9000
                SpotlightWidth 300
                "HDRColorScale" 1
                "IgnoreSolid" 1
                "rendercolor" "0 255 255"
            }
            prop_dynamic
            {
                targetname              area_indicate
                model                   models/props_mvm/indicator/indicator_circle_long.mdl
                origin                  "0 0 3"
                Skin                    1
                modelscale              4
                solid                   0
                defaultanim             start
                disablebonefollowers    1
                StartDisabled           1
                disableshadows          1
            }
            trigger_multiple
            {
                "targetname" "flunged"
                "parentname" ""
                "origin"	 "0 0 0"
                "mins"	   "-125 -125 -50"
                "maxs"	   "125 125 150"
                "spawnflags" "1" //1: players; 64 everything
                "wait"	   "0.2"
                "StartDisabled" "1"
                "filtername" reds

                "OnStartTouch" "!activatorRunScriptCodeself.TakeDamage(65,1,self)0.11"
                "OnStartTouch" "!activatorRunScriptCodeself.ApplyAbsVelocityImpulse(Vector(0,0,500))0.1-1"
            }
            tf_point_weapon_mimic
            {
                "targetname"       "mikubang"
                "origin"           "0 0 600"
                "angles"           "90 0 0"
                "teamnum"          "3"

                "$weaponname"    MikuJudgement
                "$firetime"      "0.25" //Delay between shots for $StartFiring input
            }
        }
        //<FROM TERMINATION! PLAY IT FR FR>
        MikuRingAttackMaker
        {
            NoFixUp 1

            OnSpawnOutput
            {
                Target mikuboss
                Action SetParent
                Param "!activator"
                Delay 0.1
            }
            OnSpawnOutput // Sets RingMaker Owner
            {
                target "!activator"
                action "RunScriptCode"
                param "CzUtil.AddTracking(`MikuRingAttackMaker`, self)"
                delay 0.0
            }
            OnParentKilledOutput // Removes RingMaker Owner
            {
                target "ring_maker"
                action "RunScriptCode"
                param "CzUtil.RemoveTracking(`MikuRingAttackMaker`)"
                delay 0.0
            }
            env_entity_maker // RingMaker Entity
            {   
                "targetname" "ring_maker"
                "entitytemplate" "MikuRingAttackLogic"
            }
            env_entity_maker // RingMaker Entity
            {   
                "targetname" "ring_maker2"
                "entitytemplate" "MikuRingAttackLogic"
                "origin" "0 0 50"
            }
            env_entity_maker // RingMaker Entity
            {   
                "targetname" "ring_maker3"
                "entitytemplate" "MikuRingAttackLogic"
                "origin" "0 0 80"
            }
            env_entity_maker // RingMaker Entity
            {   
                "targetname" "spotlightsforher"
                "entitytemplate" "spotlights_attack_singular_miku"
            }
            info_target
            {
                "targetname" "mikuboss"
                "origin"     "0 0 50"
            }
            logic_timer
            {
                "targetname"    "attack_intervals_miku"
                "RefireTime"    "15.0"
                "StartDisabled" 0
                "OnTimer"       miku_abilities,PickRandomShuffle,,0,-1
                "OnTimer"       !self,ResetTimer,,3,-1
            }

            logic_case
            {
                "targetname" "miku_abilities"

                "OnCase01" @p@mikuboss,$ChangeAttributes,miku_spotlights_alltogether,0.0,-1
                OnCase01 mikutauntnoise,PickRandomShuffle,,0,-1
                "OnCase02" @p@mikuboss,$ChangeAttributes,miku_ringattack,0.0,-1
                OnCase02 mikutauntnoise,PickRandomShuffle,,0,-1

            }
            logic_case
            {
                "targetname" "mikutauntnoise"

                "OnCase01" Player,$PlaySoundToSelf,miku_taunt1.mp3,1.5,-1
                "OnCase02" Player,$PlaySoundToSelf,miku_taunt2.mp3,1.5,-1
                "OnCase03" Player,$PlaySoundToSelf,miku_taunt3.mp3,1.5,-1
                "OnCase04" Player,$PlaySoundToSelf,miku_taunt4.mp3,1.5,-1
            }
            logic_relay
            {
                "targetname" "ringattacklogic"
                ontrigger ring_maker,ForceSpawn,,0,-1
                ontrigger ring_maker2,ForceSpawn,,2,-1
                ontrigger ring_maker3,ForceSpawn,,4,-1

            }
            logic_relay
            {
                "targetname" "backinthefight"
                // "OnTrigger"  @p@mikuboss,$RemoveCond,7,0,-1
                "OnTrigger"  @p@mikuboss,$ChangeAttributes,phase2time,0.1,-1
            }
        }
        MikuRingAttackLogic
        {
            KeepAlive 1

            env_beam // Ring Attack Indicator Beam
            {
                "parentname" ""
                "targetname" "roundbeamtest"
                "BoltWidth" "5"
                "LightningStart" "ringmarkerone"
                "LightningEnd" "ringmarkertwo"
                "origin" "0 0 35"
                "renderamt" "200"
                "rendercolor" "200 200 255"
                "damage" "0"
                "NoiseAmplitude" "3"
                "dissolvetype" "1"
                "texture" "sprites/laserbeam.spr"
                "life" "4"
                "spawnflags" "8" //8
                "TouchType" "1"
            }
            prop_dynamic // Ring Attack Bounding Prop
            {
                "parentname" ""
                "targetname" "ringmarkerone"
                "model" "models/empty.mdl"
                "solid" "0"
                "origin" "0 0 35"                
            }
            prop_dynamic // Ring Attack Bounding Prop
            {
                "parentname" ""
                "targetname" "ringmarkertwo"
                "model" "models/empty.mdl"
                "solid" "0"
                "angles" "0 180 0"
                "origin" "0 0 35"
            }
            OnSpawnOutput // Ring Attack Firing Sound
            {
                target "tf_gamerules"
                action "PlayVO"
                Param "mikuring.mp3"
                delay "0.0"
            }
            OnSpawnOutput // ???
            {
                target "roundbeamtest"
                action "StrikeOnce"
                delay "0"
            }
            OnSpawnOutput // Registers RingMaker Owner
            {
                target "roundbeamtest"
                action "RunScriptCode"
                param "RingRegister(self,80,CzUtil.GetTracking(`MikuRingAttackMaker`))"
                delay 0.0
            }
            OnSpawnOutput // Sets Bounding Prop to be Non-Solid?
            {
                target "ringmarkerone"
                action "RunScriptCode"
                param "SetMoveIgnoreSolid(self, 120)"
            }
            OnSpawnOutput // Sets Bounding Prop to be Non-Solid?
            {
                target "ringmarkertwo"
                action "RunScriptCode"
                param "SetMoveIgnoreSolid(self, 120)"
            }
            OnSpawnOutput // Turns Off Ring Beam Entity
            {
                target "roundbeamtest"
                action "TurnOff"
                delay "4.5"
            }
            OnSpawnOutput // Despawns Ring Beam Entity
            {
                target "roundbeamtest"
                action "kill"
                delay "5.0"
            }
            OnSpawnOutput // Despawns Bounding Prop
            {
                target "ringmarkerone"
                action "kill"
                delay "5.5"
            }
            OnSpawnOutput // Despawns Bounding Prop
            {
                target "ringmarkertwo"
                action "kill"
                delay "5.5"
            }
        }
        tpmikuhere
        {
            KeepAlive 1
            NoFixUp 1
            OnSpawnOutput
            {
                Target getoverhere
                Action SetParent
                Param !activator
                Delay 0.02
            }
            info_target
            {
                "targetname" "getoverhere"
                "origin"     "0 0 70"
            }
        }

        //
        //
        //----------------------------------------//
        //
        //WAVE 3 ABILITY
        demozart_logic
        {
            // NoFixUp 1
            OnSpawnOutput
            {
                Target normalspot
                Action SetParent
                Param !activator
                Delay 0.1
            }
            OnSpawnOutput
            {
                Target elegancespot
                Action SetParent
                Param !activator
                Delay 0.1
            }
            OnSpawnOutput
            {
                Target zazspys1
                Action $SetFakeParent
                Param !activator
                Delay 0.2
            }
            OnSpawnOutput
            {
                Target zazspys2
                Action $SetFakeParent
                Param !activator
                Delay 0.22
            }
            OnSpawnOutput
            {
                Target zazspys3
                Action $SetFakeParent
                Param !activator
                Delay 0.24
            }
            OnSpawnOutput
            {
                Target zazspys4
                Action $SetFakeParent
                Param !activator
                Delay 0.26
            }
            info_target
            {
                "targetname" "normalspot"
                "origin"     "0 0 0"
            }
            info_target
            {
                "targetname" "elegancespot"
                "origin"     "0 0 500"
            }

            env_entity_maker
            {   
                "targetname" "chromatics1"
                "entitytemplate" "demozart_ability1"
                // "$autoparent" 0 // for use with ForceSpawnAtEntityOrigin
                "origin" "0 0 0"
            }
            env_entity_maker
            {   
                "targetname" "scaleofpianos"
                "entitytemplate" "demozart_ability2"
                // "$autoparent" 0 // for use with ForceSpawnAtEntityOrigin
                "origin" "65 0 225"
            }
            env_entity_maker
            {   
                "targetname" "chromatics2"
                "entitytemplate" "demozart_ability1"
                // "$autoparent" 0 // for use with ForceSpawnAtEntityOrigin
                "origin" "275 0 0"
            }
            env_entity_maker
            {   
                "targetname" "chromatics3"
                "entitytemplate" "demozart_ability1"
                // "$autoparent" 0 // for use with ForceSpawnAtEntityOrigin
                "origin" "525 0 0"
            }
            env_entity_maker
            {   
                "targetname" "chromatics4"
                "entitytemplate" "demozart_ability1"
                // "$autoparent" 0 // for use with ForceSpawnAtEntityOrigin
                "origin" "775 0 0"
            }
            //Logics Itself
            logic_relay
            {
                "targetname" "fallingpianos"
                "OnTrigger"  chromatics1,ForceSpawn,,0.8,-1
                "OnTrigger"  chromatics2,ForceSpawn,,1.6,-1
                "OnTrigger"  chromatics3,ForceSpawn,,2.4,-1
                "OnTrigger"  chromatics4,ForceSpawn,,3.2,-1

            }
            //Ability Choosing
            logic_timer
            {
                "targetname"    "likemusictotherain"
                "RefireTime"    "15.0"
                "StartDisabled" "0"
                "OnTimer"       "ability_randomize,PickRandomShuffle,,0,-1" 
                "OnTimer"       "!self,ResetTimer,,3,-1"
            }
            logic_case
            {
                "targetname" "ability_randomize"

                "OnCase01" "@p@normalspot,$ChangeAttributes,clapthatshit,0.0,-1"
                "OnCase01" "fallingpianos,Trigger,,0,-1"
                "OnCase01" "popscript,$piano_attack,,0,-1"

                "OnCase02" "@p@normalspot,$ChangeAttributes,rocketsaway,0.0,-1"
                "OnCase02"  scaleofpianos,ForceSpawn,,0,-1


            }
            ambient_generic
            {
                "targetname" "pitcher"
                "message"    "piano_ding.mp3"
                "health"     "10"
                "pitch"      "80"
                "spawnflags" "17"
            }
            ambient_generic
            {
                "targetname" "ding" 
                "message"    "piano_rockets_ding.mp3"
                "health"     "10"
                "pitch"      "80"
                "spawnflags" "17"
            }
        }
        //DEMOZART
        demozart_ability1
        {
            OnSpawnOutput
            {
                Target "test"
                Action Trigger
                Delay 0.0
            }
            OnSpawnOutput
            {
                Target pianomodel
                Action $HideToAll
                Delay 0.0
            }

            path_track
            {
                targetname path_1
                target path_2
                orientationtype 0
                origin "0 0 500"
            }
            path_track
            {
                targetname path_2
                orientationtype 0
                origin "0 0 -65"

                OnPass owch,Enable,,0,-1
                OnPass paino,Start,,0,-1
                OnPass Player,$PlaySoundToSelf,pianofall.mp3,0,-1
                
                OnPass path_1,Kill,,0.2,-1
                OnPass path_2,Kill,,0.2,-1
                OnPass oopspiano,Kill,,0.2,-1
                OnPass pianomodel,Kill,,0.2,-1
                OnPass piano,Kill,,0.2,-1
                OnPass test,Kill,,0.2,-1
                OnPass area_indicate,Kill,,0.2,-1
                OnPass amongusser,Kill,,0.2,-1
                OnPass owch,Kill,,0.4,-1

                // OnPass minipianos,FireOnce,,0,-1
                // OnPass minipianos,FireOnce,,0.05,-1
                // OnPass minipianos,FireOnce,,0.1,-1

                // OnPass minipianos,Kill,,0.2,-1

            }

            func_tracktrain
			{
				"targetname" "oopspiano"
				"target" "path_1" 
               // "spawnflags" "1"
				"velocitytype" "1"
                "orientationtype" "2"
				"startspeed" "700"
			    "speed" "0"
                "height" "0"
            }
            prop_dynamic
            {
                "targetname" "pianomodel"
                "parentname" "oopspiano"
                "model"      "models/props_manor/baby_grand_01.mdl"
                "origin"     "0 0 0"
                "angles"     "-90 0 0"
                solid 0
                "disableshadows" "1"
            }
            trigger_hurt
            {
                targetname          owch
                origin              "0 0 0"
                mins                "-300 -300 -300"
                maxs                "300 300 200"
                spawnflags          1	// 1: players; 64 everything
                damage              175
                damagetype          4
                StartDisabled       1
                filtername          reds

                OnHurtPlayer        "!activatorRunScriptCodeself.ApplyAbsVelocityImpulse(Vector(0,0,700))0.1-1"

                
            }

            info_particle_system
            {
                targetname      paino
                origin          "0 0 0"
                effect_name     hightower_explosion
                start_active    0
            }
            //--------------------------//
            logic_relay
            {
                "targetname" "test"
                "origin" "0 0 0"
                

                OnTrigger area_indicate,Enable,,0,-1
                OnTrigger oopspiano,SetSpeed,700,1.5,-1
                OnTrigger pianomodel,$ShowToAll,,1.5,-1

                Ontrigger "pianomodelRunScriptCodeself.EmitSound(`Player.FallDamageIndicator`)1.5-1"
            }
            prop_dynamic
            {
                targetname              area_indicate
                model                   models/props_mvm/indicator/indicator_circle_long.mdl
                origin                  "0 0 15"
                Skin                    1
                modelscale              3.5
                solid                   0
                defaultanim             start
                disablebonefollowers    1
                StartDisabled           1
                disableshadows          1
            }
            // tf_point_weapon_mimic
            // {
            //     "targetname"       "minipianos" 
            //     "origin"           "0 0 15"
            //     "angles"           "-90 0 0"
            //     "teamnum"          "3"
            //     "$weaponname"    "demozart_pianos"
            // }
        }
        demozart_ability2
        {
            // NoFixUp 1
            // OnSpawnOutput
            // {
            //     Target popscript
            //     Action $piano_rockets
            //     Delay 0.8
            // }
            NoFixUp 1
            tf_point_weapon_mimic
            {
                "targetname"       "funnybusiness"
                "origin"           "0 0 0"
                "angles"           "-15 0 0"
                "teamnum"          "3"
                "$weaponname"     "demozart_projectile"
                "$preventshootparent" 1
                // "$weaponnosound" "1"
            }
        }
    }
    SpawnTemplate                       PVZcamera
    SpawnTemplate                       ostHandler
    SpawnTemplate                       logicShenanigans
    SpawnTemplate bossintrowave

    // SpawnTemplate
    // {
    //     Name spotlights_attack
    //     Origin "-2378 -1357 360"
    // }
    // SpawnTemplate
    // {
    //     Name miku_spotlights
    //     Origin "-319 -3526 1009"
    // }
    // SpawnTemplate
    // {
    //     Name miku_spotlights
    //     Origin "3615 -3197 745"
    //     Angles "0 90 0"
    // }
    // SpawnTemplate
    // {
    //     Name miku_spotlights
    //     Origin "-147 -6482 858"
    // }
    // SpawnTemplate
    // {
    //     Name miku_spotlights
    //     Origin "1928 -6367 891"
    //     Angles "0 -180 0"
    // }
    // SpawnTemplate
    // {
    //     Name miku_spotlights
    //     Origin "1163 -5491 416"
    //     Angles "0 -180 0"
    // }
    // SpawnTemplate
    // {
    //     Name miku_spotlights
    //     Origin "492 -5510 416"
    // }

    Wave	// Wave 1
    {
        // precooked in MVM instead of LUA cause fucking $TF_BOT
        WaveSpawn
        {
            Name PlayerChickenCooker
            Where spawnred
            TotalCount 999
            MaxActive 3
            SpawnCount 1
            WaitBeforeStarting 0
            WaitBetweenSpawns 0.25
            TotalCurrency 0
            Support Limited
            HideIcon 1
            WaitForAllDead wave1display

            TFBot
            {
                Template Chickens_Pool
            }
        }

        WaveSpawn
        {
            Name KievEvilChickenCooker
            Where spawnbot
            TotalCount 999
            MaxActive 3
            SpawnCount 1
            WaitBeforeStarting 0
            WaitBetweenSpawns 0.25
            TotalCurrency 0
            Support Limited
            HideIcon 1
            WaitForAllDead 4

            TFBot
            {
                Template Chickens_Evil_Pool
            }
        }

        StartWaveOutput
        {
            Target      wave_start_relay
            Action      Trigger
        }

        DoneOutput
        {
            Target      wave_finished_relay
            Action      Trigger
        }

        InitWaveOutput
        {
            Target      wave_start_relay
            Action      RunScriptCode
            Param       "

            ClientPrint(null,3,`\x07C3B1E1 WARNING: THIS MISSION CONTAINTS CUSTOM OVERLAYS. PROBLEMS WILL ARISE IF YOU DON'T HAVE IT DOWNLOADED!`)
            ClientPrint(null,3,` `)
            ClientPrint(null,3,`\x078ff347 THIS MISSION CONTAINS ACTUAL WAVES SO BETTER LOCK IN`)
            ClientPrint(null,3,`\x078ff347 THIS MISSION ALSO USES RED MONEY SO ITS AUTO COLLECTED`)

            // EntFire(`wave_init_relay_route_r`, `Trigger`, null, 0.5)
            "
        }

        // Fake Wave
        WaveSpawn
        {
            Name                    wave1display
            Where                   spawnbot
            HideIcon                1
            TotalCount              9
            MaxActive               9
            SpawnCount              1
            WaitBeforeStarting      6
            WaitBetweenSpawns       0.1
            TotalCurrency           0

            StartWaveOutput
            {
                Target      pvzfade
                Action      Trigger
            }
            DoneOutput
            {
                Target music1
                Action Trigger
            }

            Squad
            {
                TFBot
                {
                    Class Heavyweapons
                    Scale 1.5
                    UseHumanAnimations 1
                    Item "The Chicken Kiev"
                    Item "The Team Captain"
                    Item "Commissar's Coat"
                    Action          Idle
                    ClassIcon agentbomb
                    Tag miku
                    NoPushaway 1

                    FireInput
                    {
                        Target      !self
                        Action      $SetLocalOrigin
                        Param       "827 -5890 632"
                        Delay       0.1
                        Repeats     1
                    }

                    Taunt
                    {
                        Delay       1
                        Duration    99
                        Cooldown    1
                        Name        "Taunt: Flying Colors"
                    }
                }
                TFBot
                {
                    Class Scout
                    Item "The Soda Popper"
                    ClassIcon               agentbomb
                    Tag                     bot
                    UseHumanAnimations      1
                    Action                  Idle

                    FireInput
                    {
                        Target      !self
                        Action      $SetLocalOrigin
                        Param       "795 -5882 632"
                        Delay       0.1
                        Repeats     1
                    }
                }

                TFBot
                {
                    Template                T_TFBot_Heavyweapons_Shotgun
                    ClassIcon               agentbomb
                    Tag                     bot
                    UseHumanAnimations      1
                    Action                  Idle

                    FireInput
                    {
                        Target      !self
                        Action      $SetLocalOrigin
                        Param       "890 -6006 693"
                        Delay       0.1
                        Repeats     1
                    }
                }

                TFBot
                {
                    Template                T_TFBot_Demoman
                    Tag                     bot
                    UseHumanAnimations      1
                    Action                  Idle
                    ClassIcon               agentbomb

                    FireInput
                    {
                        Target      !self
                        Action      $SetLocalOrigin
                        Param       "953 -6006 693"
                        Delay       0.1
                        Repeats     1
                    }
                }

                TFBot
                {
                    Template                T_TFBot_Demoman
                    Action                  Idle
                    AddTemplate             T_TFBOT_CARDBOARD_MODULE
                    Tag                     miku
                    UseHumanAnimations      1
                    ClassIcon               agentbomb

                    FireInput
                    {
                        Target      !self
                        Action      $SetLocalOrigin
                        Param       "948 -5918 632"
                        Delay       0.1
                        Repeats     1
                    }
                }

                TFBot
                {
                    Template                T_TFBot_Demoman
                    Action                  Idle
                    tag                     bot
                    UseHumanAnimations      1
                    ClassIcon               agentbomb

                    FireInput
                    {
                        Target      !self
                        Action      $SetLocalOrigin
                        Param       "863 -6006 693"
                        Delay       0.1
                        Repeats     1
                    }
                }

                TFBot
                {
                    Class                   Heavyweapons
                    Scale                   1.5
                    Tag                     miku
                    // UseCustomModel          "models/bots/heavy_boss/bot_heavy_boss.mdl"
                    AddTemplate             T_TFBOT_CARDBOARD_MODULE
                    UseHumanAnimations      1
                    ClassIcon               agentbomb

                    FireInput
                    {
                        Target      !self
                        Action      $SetLocalOrigin
                        Param       "810 -6126 632"
                        Delay       0.1
                        Repeats     1
                    }
                }

                TFBot
                {
                    Class           Medic
                    Scale           1.65
                    Tag             giant
                    Action          Idle
                    ClassIcon       agentbomb
                    UseHumanAnimations 1

                    FireInput
                    {
                        Target      !self
                        Action      $SetLocalOrigin
                        Param       "880 -6086 694"
                        Delay       0.1
                        Repeats     1
                    }
                }

                TFBot
                {
                    Class           Soldier
                    Scale           1.5
                    Tag             giant
                    Action          Idle
                    UseHumanAnimations 1
                    ClassIcon       agentbomb

                    FireInput
                    {
                        Target      !self
                        Action      $SetLocalOrigin
                        Param       "970 -6066 693"
                        Delay       0.1
                        Repeats     1
                    }
                }

                TFBot
                {
                    Class                   Demoman
                    Scale                   1.5
                    UseCustomModel          models/bots/demo_boss/bot_demo_boss.mdl
                    WeaponRestrictions      MeleeOnly
                    UseHumanAnimations      1
                    Item                    "The Eyelander"
                    Item                    EOTL_demopants
                    Item                    "The Hawaiian Hangover"
                    Item                    "Demoman's Fro"
                    DesiredAttackRange      600

                    FireInput
                    {
                        Target      popscript
                        Action      $ballerEnemy
                        Delay       0.1
                        Repeats     1
                    }
                    Tag                     miku
                    Action                  Idle
                    ClassIcon               agentbomb

                    CharacterAttributes
                    {
                        no_jump     1
                    }

                    Taunt
                    {
                        Delay       1
                        Duration    99
                        Cooldown    1
                        Name        "Taunt: Flying Colors"
                    }

                    FireInput
                    {
                        Target      !self
                        Action      $SetLocalOrigin
                        Delay       0.1
                        Repeats     1
                        Param       "740 -6038 693"
                    }
                }
            }
        }

        // ----------------------------------------
        // START WAVE
        // ----------------------------------------
        WaveSpawn
        {
            Name                    yeehaw
            WaitForAllDead          wave1display
            Where                   spawnbot
            TotalCount              20
            MaxActive               10
            SpawnCount              1
            WaitBeforeStarting      2
            WaitBetweenSpawns       1.2
            TotalCurrency           50

            TFBot
            {
                Class Scout
                Item "The Soda Popper"
                ClassIcon scout_popper
                Skill                   Easy
                Tag bot
                UseHumanAnimations      1
            }
        }

        WaveSpawn
        {
            WaitForAllSpawned       yeehaw
            Where                   spawnbot
            Where                   flankers
            TotalCount              20
            MaxActive               10
            SpawnCount              1
            WaitBeforeStarting      2
            WaitBetweenSpawns       1.2
            TotalCurrency           50

            TFBot
            {
                Class Scout
                Item "The Soda Popper"
                ClassIcon scout_popper
                Skill                   Easy
                AddTemplate             T_TFBOT_CARDBOARD_MODULE
                Tag                     miku
                UseHumanAnimations      1
            }
        }

        WaveSpawn
        {
            Name                    1a
            WaitForAllDead          wave1display
            Where                   flankers
            TotalCount              1
            MaxActive               1
            SpawnCount              1
            WaitBeforeStarting      6
            WaitBetweenSpawns       0
            TotalCurrency           50

            TFBot
            {
                Template    T_TFBot_Giant_Soldier_Spammer_Reload
                Skill       Easy
                Tag         giant
                UseHumanAnimations 1
            }
        }

        WaveSpawn
        {
            WaitForAllSpawned       1b
            Where                   spawnbot
            TotalCount              10
            MaxActive               10
            SpawnCount              1
            WaitBeforeStarting      12
            WaitBetweenSpawns       1.2
            TotalCurrency           50

            TFBot
            {
                Template                T_TFBot_Demoman
                Skill                   Easy
                tag                     bot
                UseHumanAnimations      1
            }
        }

        WaveSpawn
        {
            Name                    1b
            WaitForAllDead          1a
            Where                   flankers
            TotalCount              6
            MaxActive               6
            SpawnCount              6
            WaitBeforeStarting      4
            WaitBetweenSpawns       0
            TotalCurrency           50

            Squad
            {
                TFBot
                {
                    Template    T_TFBot_Giant_Soldier_Spammer_Reload
                    UseHumanAnimations 1
                    Skill       Easy
                    Tag         giant
                }

                TFBot
                {
                    Template                T_TFBot_Demoman
                    Skill                   Easy
                    tag                     bot
                    UseHumanAnimations      1
                }

                TFBot
                {
                    Template                T_TFBot_Demoman
                    Skill                   Easy
                    tag                     bot
                    UseHumanAnimations      1
                }

                TFBot
                {
                    Template                T_TFBot_Demoman
                    Skill                   Easy
                    tag                     bot
                    UseHumanAnimations      1
                }

                TFBot
                {
                    Template                T_TFBot_Demoman
                    Skill                   Easy
                    tag                     bot
                    UseHumanAnimations      1
                }

                TFBot
                {
                    Template                T_TFBot_Demoman
                    Skill                   Easy
                    tag                     bot
                    UseHumanAnimations      1
                }
            }
        }

        WaveSpawn
        {
            Name                    2
            WaitForAllDead          1b
            Where                   flankers
            TotalCount              5
            MaxActive               5
            SpawnCount              5
            WaitBeforeStarting      0
            WaitBetweenSpawns       10
            TotalCurrency           100

            Squad
            {
                TFBot
                {
                    Template    T_TFBot_Giant_Soldier_Spammer_Reload
                    Skill       Normal
                    Tag         bot
                    Item "The Surgeon's Stahlhelm"
                    UseHumanAnimations 1
                }

                TFBot
                {
                    Template    T_TFBot_Medic_BigHeal
                    Skill       Normal
                    Tag         bot
                    UseHumanAnimations 1
                    Item "The Surgeon's Stahlhelm"
                }

                TFBot
                {
                    Template    T_TFBot_Medic_BigHeal
                    Skill       Normal
                    Tag         bot
                    UseHumanAnimations 1
                    Item "The Surgeon's Stahlhelm"
                }

                TFBot
                {
                    Template    T_TFBot_Medic_BigHeal
                    Skill       Normal
                    Tag         bot
                    UseHumanAnimations 1
                    Item "The Surgeon's Stahlhelm"
                }

                TFBot
                {
                    Template    T_TFBot_Medic_BigHeal
                    Skill       Normal
                    Tag         bot
                    UseHumanAnimations 1
                    Item "The Surgeon's Stahlhelm"
                }
            }
        }

        WaveSpawn
        {
            Name                    2
            WaitForAllDead          1b
            Where                   spawnbot
            TotalCount              10
            MaxActive               10
            SpawnCount              5
            WaitBeforeStarting      0
            WaitBetweenSpawns       10
            TotalCurrency           100

            Squad
            {
                TFBot
                {
                    Template    Giant_Demoman_Baller
                    Skill       Normal
                    Tag         miku
                    UseHumanAnimations 1
                }

                TFBot
                {
                    Template    T_TFBot_Medic_BigHeal
                    Skill       Normal
                    Tag         bot
                    UseHumanAnimations 1
                    Item "The Surgeon's Stahlhelm"
                }

                TFBot
                {
                    Template    T_TFBot_Medic_BigHeal
                    Skill       Normal
                    Tag         bot
                    UseHumanAnimations 1
                    Item "The Surgeon's Stahlhelm"
                }

                TFBot
                {
                    Template    T_TFBot_Medic_BigHeal
                    Skill       Normal
                    Tag         bot
                    UseHumanAnimations 1
                    Item "The Surgeon's Stahlhelm"
                }

                TFBot
                {
                    Template    T_TFBot_Medic_BigHeal
                    Skill       Normal
                    Tag         bot
                    UseHumanAnimations 1
                    Item "The Surgeon's Stahlhelm"
                }
            }
        }

        WaveSpawn
        {
            WaitForAllDead          1b
            Where                   spawnbot
            TotalCount              20
            MaxActive               8
            SpawnCount              1
            WaitBeforeStarting      0
            WaitBetweenSpawns       1
            TotalCurrency           50

            TFBot
            {
                Template                T_TFBot_Sniper_Sydney_Sleeper
                Name                    "Piss Up Your Ass"
                Action                  Sniper
                Skill                   Hard
                Tag                     bot
                UseHumanAnimations      1

                CharacterAttributes
                {
                    "damage penalty"    0.1
                }
            }
        }
        WaveSpawn
        {
            WaitForAllSpawned          2
            Where                   spawnbot
            Where                   flankers
            TotalCount              10
            MaxActive               5
            SpawnCount              1
            WaitBeforeStarting      6
            WaitBetweenSpawns       2.5
            TotalCurrency           50

            TFBot
            {
                Template                T_TFBot_Demoman
                Skill                   Normal
                AddTemplate             T_TFBOT_CARDBOARD_MODULE
                Tag                     miku
                UseHumanAnimations      1
            }
        }
        WaveSpawn
        {
            Name                    3a
            WaitForAllDead          2
            Where                   spawnbot
            Where                   flankers
            TotalCount              15
            MaxActive               15
            SpawnCount              1
            WaitBeforeStarting      0
            WaitBetweenSpawns       1.5
            TotalCurrency           100

            TFBot
            {
                Template                T_TFBot_Demoman
                Skill                   Normal
                AddTemplate             T_TFBOT_CARDBOARD_MODULE
                Tag                     miku
                UseHumanAnimations      1
            }
        }

        WaveSpawn
        {
            Name                    3b
            WaitForAllSpawned       3a
            Where                   spawnbot
            TotalCount              2
            MaxActive               2
            SpawnCount              2
            WaitBeforeStarting      0
            WaitBetweenSpawns       0
            TotalCurrency           100

            TFBot
            {
                Template                T_TFBot_Demoman
                Skill                   Normal
                AddTemplate             T_TFBOT_CARDBOARD_MODULE
                Tag                     miku
                UseHumanAnimations      1
            }
        }

        WaveSpawn
        {
            Name                    4
            WaitForAllDead          3b
            Where                   spawnbot
            TotalCount              5
            MaxActive               5
            SpawnCount              5
            WaitBeforeStarting      0
            WaitBetweenSpawns       6.5
            TotalCurrency           50

            Squad
            {
                TFBot
                {
                    Template        T_TFBot_Giant_Heavyweapons
                    Skill           Normal
                    AddTemplate     T_TFBOT_CARDBOARD_MODULE
                    Tag                     miku
                    UseHumanAnimations 1
                }

                TFBot
                {
                    Template                T_TFBot_Medic_BigHeal
                    Tag         bot
                    Item "The Surgeon's Stahlhelm"
                    UseHumanAnimations      1
                }

                TFBot
                {
                    Template                T_TFBot_Medic_BigHeal
                    Tag         bot
                    Item "The Surgeon's Stahlhelm"
                    UseHumanAnimations      1
                }

                TFBot
                {
                    Template                T_TFBot_Medic_BigHeal
                    Tag         bot
                    Item "The Surgeon's Stahlhelm"
                    UseHumanAnimations      1
                }

                TFBot
                {
                    Template                T_TFBot_Medic_BigHeal
                    Tag         bot
                    Item "The Surgeon's Stahlhelm"
                    UseHumanAnimations      1
                }
            }
        }

        WaveSpawn
        {
            Name                    4
            WaitForAllDead          3b
            Where                   flankers
            Where                   spawnbot
            TotalCount              3
            MaxActive               3
            SpawnCount              3
            WaitBeforeStarting      0
            WaitBetweenSpawns       8.5
            TotalCurrency           50

            Squad
            {
                TFBot
                {
                    Template    Giant_Demoman_Baller
                    Tag         miku
                    Skill       Normal
                }

                TFBot
                {
                    Template                T_TFBot_Medic_BigHeal
                    Tag         bot
                    Item "The Surgeon's Stahlhelm"
                    UseHumanAnimations      1
                }

                TFBot
                {
                    Template                T_TFBot_Medic_BigHeal
                    Tag         bot
                    Item "The Surgeon's Stahlhelm"
                    UseHumanAnimations      1
                }
            }
        }

        WaveSpawn
        {
            // Name                    4
            WaitForAllDead          3b
            Where                   spawnbot
            Where                   flankers
            TotalCount              15
            MaxActive               5
            SpawnCount              1
            WaitBeforeStarting      0
            WaitBetweenSpawns       2.5
            TotalCurrency           50
            Support                 Limited

            TFBot
            {
                Template                T_TFBot_Heavyweapons_Shotgun
                Skill                   Easy
                Tag                     bot
                UseHumanAnimations      1
            }
        }

        WaveSpawn
        {
            WaitForAllDead          3a
            Where                   spawnbot
            Where                   flankers
            TotalCount              10
            MaxActive               10
            SpawnCount              1
            WaitBeforeStarting      0
            WaitBetweenSpawns       2.5
            TotalCurrency           100

            TFBot
            {
                Template                T_TFBot_Demoman
                Skill                   Normal
                AddTemplate             T_TFBOT_CARDBOARD_MODULE
                Tag                     miku
                UseHumanAnimations      1
            }
        }

        WaveSpawn
        {
            WaitForAllDead          2
            Where                   spawnbot
            TotalCount              15
            MaxActive               3
            SpawnCount              3
            WaitBeforeStarting      5
            WaitBetweenSpawns       10
            TotalCurrency           50
            Support                 Limited

            TFBot
            {
                Template                T_TFBot_Heavyweapons_Shotgun
                Skill                   Easy
                Tag                     bot
                UseHumanAnimations      1
            }
        }
        WaveSpawn
        {
            Name Boss
            Where spawnbot
            WaitForAllDead 4
            TotalCount 1
            MaxActive 1
            SpawnCount 1
            WaitBeforeStarting 1
            WaitBetweenSpawns 1
            TotalCurrency 201

            DoneOutput
            {
                Target chicken_*
                Action Kill
            }

            StartWaveOutput
            {
                Target wave1bossintro
                Action Trigger
            }

            TFBot
            {
                Template T_TFBot_Giant_Heavyweapons
                Name "Captain Kiev"
                ClassIcon captainkiev
                Skill Expert
                Health 20000
                UseHumanAnimations 1
                Tag miku
                Item "The Chicken Kiev"
                Item "The Team Captain"
                Item "Commissar's Coat"
                Attributes UseBossHealthBar
                WeaponRestrictions SecondaryOnly
                Attributes HoldFireUntilFullReload
                SpawnTemplate chickenbossAttack

                CharacterAttributes
                {
                    "move speed bonus" 0.6
                }
                FireInput
                {
                    Target popscript
                    Action $bossChicken
                    Delay  0.02
                    Repeats 1
                }
                AddCond
                {
                    Index 26
                    Duration 25
                }

                ItemAttributes
                {
                    ItemName "TF_WEAPON_SHOTGUN_HWG"
                    "faster reload rate" -0.8
                }
                // FireInput
                // {
                //     Target !self
                //     Action $ChangeAttributes
                //     Param  switchtoprimary
                //     Delay  0.1
                //     IfHealthBelow 5500
                //     Repeats 1
                // }

                FireInput
                {
                    Target popscript
                    Action $clearChicenBossAbility
                    Repeats 1
                    Delay  0.1
                    IfHealthBelow 3500
                }
                EventChangeAttributes
                {
                    switchtoprimary
                    {
                        AddCond
                        {
                            Index 14
                            Duration 3
                        }
                        WeaponRestrictions PrimaryOnly
                        Skill Normal

                        FireInput
                        {
                            Target !self
                            Action "$AddCond"
                            Param  "16 15"
                            Delay  0.1
                            Repeats 1
                        }
                        FireInput
                        {
                            Target Player
                            Action $PlaySoundToSelf
                            Param  "vo\heavy_item_birdhead_uber02.mp3"
                            Repeats 1
                            Cooldown 0.1
                            Delay  0.2
                        }
                    }
                }
            }
        }
    }

    Wave	// Wave 2
    {
        // Chicken Cooker: ordinary MvM wavespawn owns all bot creation.
        // Lua only registers, teleports and activates tagged standbys.
        WaveSpawn
        {
            Name PlayerChickenCooker
            Where spawnbot
            TotalCount 999
            MaxActive 3
            SpawnCount 1
            WaitBeforeStarting 0
            WaitBetweenSpawns 0.25
            TotalCurrency 0
            Support Limited
            HideIcon 1
            WaitForAllDead wave1display

            TFBot
            {
                Template Chickens_Pool
            }
        }

        StartWaveOutput
        {
            Target      wave_start_relay
            Action      Trigger
        }

        DoneOutput
        {
            Target      wave_finished_relay
            Action      Trigger
        }
        InitWaveOutput
        {
            Target      wave_start_relay
            Action      RunScriptCode
            Param       "
			IncludeScript(`claudz_logic_v3_modified`)

            // EntFire(`wave_init_relay_route_r`, `Trigger`, null, 0.5)
            "
        }
        //DISPLAY BOTS HERE
        WaveSpawn
        {
            Name THEMIKU
            Where spawnbot
            TotalCount 1
            MaxActive 1
            SpawnCount 1
            WaitBeforeStarting 0
            WaitBetweenSpawns 0
            TotalCurrency 1
            HideIcon 1
        
            TFBot
            {
                Class Scout
                Scale 1.65
                UseCustomModel "models/midnightmodels/scout.mdl"
                Item "The Soda Popper"
                ClassIcon               agentbomb
                Tag                     miku
                UseHumanAnimations      1
                Action                  Idle
                NoPushaway 1
                AddCond
                {
                    Index 49
                }

                FireInput
                {
                    Target      !self
                    Action      $SetLocalOrigin
                    Param       "827 -5854 632"
                    Delay       0.1
                    Repeats     1
                }

                Taunt
                {
                    Delay       3
                    Duration    600
                    Cooldown    1
                    Name        "Taunt: Flying Colors"
                    Repeats 1
                }
            }
        }
        WaveSpawn
        {
            Name wave1display
            // WaitForAllDead ""
            Where                   spawnbot
            TotalCount              8
            MaxActive               8
            SpawnCount              8
            WaitBeforeStarting      6
            WaitBetweenSpawns       5
            TotalCurrency           0
            HideIcon 1

            StartWaveOutput
            {
                Target      pvzfade
                Action      Trigger
            }
            FirstSpawnOutput
            {
                Target background_spotlights
                Action Trigger
            }
            DoneOutput
            {
                Target music2
                Action Trigger
            }
            Squad
            {
                TFBot
                {
                    Template T_TFBot_Soldier_Extended_Concheror
                    ClassIcon               agentbomb
                    Tag                     bot
                    UseHumanAnimations      1
                    Action                  Idle
                    NoPushaway 1
                    CharacterAttributes
                    {
                        "move speed penalty" 0.05
                    }

                    FireInput
                    {
                        Target      !self
                        Action      $SetLocalOrigin
                        Param       "795 -5882 632"
                        Delay       0.1
                        Repeats     1
                    }
                }

                TFBot
                {
                    Template T_TFBot_Heavyweapons_Shotgun
                    AddTemplate T_TFBOT_CARDBOARD_MODULE
                    ClassIcon               agentbomb
                    Tag                     miku
                    UseHumanAnimations      1
                    Action                  Idle
                    NoPushaway 1

                    FireInput
                    {
                        Target      !self
                        Action      $SetLocalOrigin
                        Param       "890 -6006 693"
                        Delay       0.1
                        Repeats     1
                    }
                    CharacterAttributes
                    {
                        "move speed penalty" 0.05
                    }
                }

                TFBot
                {
                    Template T_TFBot_Heavyweapons_Armored
                    WeaponRestrictions SecondaryOnly
                    Tag                     bot
                    UseHumanAnimations      1
                    Action                  Idle
                    ClassIcon               agentbomb

                    FireInput
                    {
                        Target      !self
                        Action      $SetLocalOrigin
                        Param       "953 -6006 693"
                        Delay       0.1
                        Repeats     1
                    }
                    CharacterAttributes
                    {
                        "move speed penalty" 0.05
                    }
                }

                TFBot
                {
                    Template                T_TFBot_Scout_FAN
                    Action                  Idle
                    Tag                     bot
                    UseHumanAnimations      1
                    ClassIcon               agentbomb

                    FireInput
                    {
                        Target      !self
                        Action      $SetLocalOrigin
                        Param       "948 -5918 632"
                        Delay       0.1
                        Repeats     1
                    }
                    CharacterAttributes
                    {
                        "move speed penalty" 0.05
                    }
                }

                TFBot
                {
                    Class Demoman
                    Action                  Idle
                    tag                     bot
                    ClassIcon               agentbomb

                    FireInput
                    {
                        Target      !self
                        Action      $SetLocalOrigin
                        Param       "863 -6006 693"
                        Delay       0.1
                        Repeats     1
                    }
                    CharacterAttributes
                    {
                        "move speed penalty" 0.05
                    }
                }

                TFBot
                {
                    Class           Medic
                    Scale           1.65
                    Tag             giant
                    Action          Idle
                    ClassIcon       agentbomb
                    UseHumanAnimations 1

                    FireInput
                    {
                        Target      !self
                        Action      $SetLocalOrigin
                        Param       "880 -6086 694"
                        Delay       0.1
                        Repeats     1
                    }
                    CharacterAttributes
                    {
                        "move speed penalty" 0.05
                    }
                }

                TFBot
                {
                    Template T_TFBot_Heavyweapons_Shotgun
                    Tag             bot
                    Action          Idle
                    UseHumanAnimations 1
                    ClassIcon       agentbomb

                    FireInput
                    {
                        Target      !self
                        Action      $SetLocalOrigin
                        Param       "970 -6066 693"
                        Delay       0.1
                        Repeats     1
                    }
                    CharacterAttributes
                    {
                        "move speed penalty" 0.05
                    }
                }

                TFBot
                {
                    Class                   Demoman
                    Scale                   1.5
                    WeaponRestrictions      MeleeOnly
                    UseHumanAnimations      1
                    Tag                     bot
                    Action                  Idle
                    ClassIcon               agentbomb
                    CharacterAttributes
                    {
                        "move speed penalty" 0.05
                    }
                }
            }
            //
        }
        //WAVE START
        WaveSpawn
        {
            Name w2a
            WaitForAllDead wave1display
            Where spawnbot
            Where flankers
            TotalCount 20
            MaxActive 12
            SpawnCount 2
            WaitBeforeStarting 0
            WaitBetweenSpawns 0.15
            TotalCurrency 50
        
            RandomChoice
            {
                TFBot
                {
                    Template T_TFBot_Heavyweapons_Heavyweight_Champ_Fast
                    Name "Ult Tutorial"
                    ClassIcon soldier_robot_nys
                    Tag bot	
                    UseHumanAnimations 1
                }
                TFBot
                {
                    Class Pyro
                    WeaponRestrictions MeleeOnly
                    Name "Ult Tutorial"
                    ClassIcon soldier_robot_nys
                    Tag bot	
                    UseHumanAnimations 1
                }
                TFBot
                {
                    Class Soldier
                    Item "The Escape Plan"
                    Name "Ult Tutorial"
                    ClassIcon soldier_robot_nys
                    WeaponRestrictions MeleeOnly
                    Tag bot	
                    UseHumanAnimations 1
                }
            }
        }
        WaveSpawn
        {
            Name w2b
            WaitForAllDead w2a
            Where spawnbot
            TotalCount 12
            MaxActive 12
            SpawnCount 3
            WaitBeforeStarting 0
            WaitBetweenSpawns 5
            TotalCurrency 50
        
            Squad
            {
                TFBot
                {
                    Template	T_TFBot_Heavyweapons_Armored
                    WeaponRestrictions SecondaryOnly
                    Attributes HoldFireUntilFullReload
                    ClassIcon heavy_armored_shotgun
                    Skill Easy
                    Tag bot
                    UseHumanAnimations 1
                }
                TFBot
                {
                    Template	T_TFBot_Medic_BigHeal
                    Item "The Surgeon's Stahlhelm"
                    Tag bot
                    UseHumanAnimations 1
                }
                TFBot
                {
                    Template	T_TFBot_Medic_BigHeal
                    Tag bot
                    UseHumanAnimations 1
                    Item "The Surgeon's Stahlhelm"
                }
            }
        }
        WaveSpawn
        {
            WaitForAllDead w2a
            Where spawnbot
            Where flankers
            TotalCount 30
            MaxActive 10
            SpawnCount 2
            WaitBeforeStarting 0
            WaitBetweenSpawns 1
            TotalCurrency 50
        
            TFBot
            {
                Template T_TFBot_Scout_Sandman_FastCharge
                Attributes AlwaysCrit
                Tag bot
                UseHumanAnimations 1
            }
        }
        WaveSpawn
        {
            Name w2c_a
            WaitForAllDead w2b
            Where flankers
            TotalCount 8
            MaxActive 8
            SpawnCount 8
            WaitBeforeStarting 0
            WaitBetweenSpawns 0
            TotalCurrency 50
        
            TFBot
            {
                Template	T_TFBot_Demoman
                Skill Easy
                Tag bot
                UseHumanAnimations 1
            }
        }
        WaveSpawn
        {
            WaitForAllSpawned w2c_a
            Where flankers
            TotalCount 12
            MaxActive 4
            SpawnCount 1
            WaitBeforeStarting 0
            WaitBetweenSpawns 0
            TotalCurrency 50
        
            TFBot
            {
                Template	T_TFBot_Heavyweapons_Shotgun
                Skill Easy
                Tag bot
                UseHumanAnimations 1
            }
        }
        WaveSpawn
        {
            Name w2c_b
            WaitForAllDead w2c_a
            Where flankers
            TotalCount 8
            MaxActive 8
            SpawnCount 8
            WaitBeforeStarting 0
            WaitBetweenSpawns 0
            TotalCurrency 50
        
            TFBot
            {
                Template	T_TFBot_Demoman
                Skill Easy
                Tag bot
                UseHumanAnimations 1
            }
        }
        WaveSpawn
        {
            WaitForAllDead w2c_b
            Where spawnbot
            TotalCount 4
            MaxActive 4
            SpawnCount 2
            WaitBeforeStarting 0
            WaitBetweenSpawns 20
            TotalCurrency 50
            Support 1
        
            TFBot
            {
                Template T_TFBot_Demoman
                Skill Easy
                Tag bot
                UseHumanAnimations 1	
            }
        }
        WaveSpawn
        {
            WaitForAllDead w2c_a
            Where flankers
            Where spawnbot
            TotalCount 6
            MaxActive 6
            SpawnCount 3
            WaitBeforeStarting 0
            WaitBetweenSpawns 0
            TotalCurrency 50
        
            Squad
            {
                TFBot
                {
                    Template	T_TFBot_Giant_Soldier
                    Skill Expert
                    Tag giant
                    UseHumanAnimations 1
                }
                TFBot
                {
                    Template	T_TFBot_Soldier_Extended_Concheror
                    Skill Easy
                    Tag bot
                    UseHumanAnimations 1
                }
                TFBot
                {
                    Template	T_TFBot_Soldier_Extended_Concheror
                    Skill Easy
                    Tag bot
                    UseHumanAnimations 1
                }
            }
        }
        WaveSpawn // Tank # HP
        {
            Name tankparty
            WaitForAllDead w2c_b
            TotalCount 4
            MaxActive 4
            SpawnCount 1
            WaitBeforeStarting 0
            WaitBetweenSpawns 5.5
        
            TotalCurrency 100
        
            Tank
            {
                Name "tankboss"
                StartingPathTrackNode "boss_path_1"
                Health 5000
                Speed 95
                Skin 0
                IsMiniBoss 0
                Scale 0.6
        
                OnKilledOutput {}
                OnBombDroppedOutput
                {
                    Target boss_deploy_relay
                    Action Trigger
                }
            }
        }
        WaveSpawn
        {
            WaitForAllSpawned tankparty
            Where flankers
            Where spawnbot
            TotalCount 4
            MaxActive 4
            SpawnCount 2
            WaitBeforeStarting 0
            WaitBetweenSpawns 10
            TotalCurrency 50
        
            TFBot
            {
                Template	T_TFBot_Heavyweapons_Armored
                ClassIcon heavy_armored_shotgun
                WeaponRestrictions SecondaryOnly
                Attributes HoldFireUntilFullReload
                Skill Easy
                Tag bot
                UseHumanAnimations 1
            }
        }
        WaveSpawn
        {
            WaitForAllSpawned tankparty
            Where flankers
            Where spawnbot
            TotalCount 18
            MaxActive 5
            SpawnCount 1
            WaitBeforeStarting 0
            WaitBetweenSpawns 1
            TotalCurrency 50
        
            TFBot
            {
                Template	T_TFBot_Heavyweapons_Shotgun
                Skill Easy
                AddTemplate T_TFBOT_CARDBOARD_MODULE
                Tag bot
                UseHumanAnimations 1
            }
        }
        WaveSpawn
        {
            Name w2d
            WaitForAllDead tankparty
            Where spawnbot
            Where flankers
            TotalCount 6
            MaxActive 6
            SpawnCount 3
            WaitBeforeStarting 8
            WaitBetweenSpawns 0
            TotalCurrency 100
        
            Squad
            {
                TFBot
                {
                    Template	T_TFBot_Giant_Demoman
                    Skill Normal
                    Tag giant
                    UseHumanAnimations 1
                }
                TFBot
                {
                    Template	T_TFBot_Medic_BigHeal
                    Tag bot
                    UseHumanAnimations 1
                    Item "The Surgeon's Stahlhelm"
                }
                TFBot
                {
                    Template	T_TFBot_Medic_BigHeal
                    Tag bot
                    UseHumanAnimations 1
                    Item "The Surgeon's Stahlhelm"
                }
            }
        }
        WaveSpawn
        {
            WaitForAllDead tankparty
            Where spawnbot
            Where flankers
            TotalCount 20
            MaxActive 8
            SpawnCount 1
            WaitBeforeStarting 0
            WaitBetweenSpawns 0.25
            TotalCurrency 50
        
            TFBot
            {
                Template T_TFBot_Soldier_Extended_Concheror
                Skill Easy
                Tag bot
                UseHumanAnimations 1
            }
        }
        WaveSpawn
        {
            Name Boss
            Where spawnbot
            WaitForAllDead w2d
            TotalCount 1
            MaxActive 1
            SpawnCount 1
            WaitBeforeStarting 1
            WaitBetweenSpawns 1
            TotalCurrency 1

            
            StartWaveOutput
            {
                Target wave2bossintro
                Action Trigger
            }

            TFBot
            {
                Class Spy
                Name "HASTUNE FOCKEN MIKU"
                ClassIcon miku_boss
                UseCustomModel "models/midnightmodels/scout.mdl"
                Attributes MiniBoss
                Scale 1.5
                Skill Normal
                Attributes UseBossHealthBar
                UseHumanAnimations 1
                Health 18000
                StripItemSlot 3
                StripItemSlot 4
                StripItemSlot 5
                StripItemSlot 6
                Action Mobber
                WeaponRestrictions MeleeOnly
                Item "The Holy Mackerel"
                SpawnTemplate MikuRingAttackMaker
                Tag miku
                FireInput
                {
                    Target "teleportfx"
                    Action Trigger
                    Delay  1.1
                    Repeats 1
                }
                FireInput
                {
                    Target !self
                    Action $TeleportToEntity
                    Param  goherebosses
                    Delay  1
                    Repeats 1
                }
                FireInput
                {
                    Target !self
                    Action $ChangeAttributes
                    Param  mikuPAUSE
                    Delay  0.02
                    Cooldown 1
                    Repeats 1 //0 is infinite
                    IfHealthBelow 9000
                }

                ItemAttributes
                {
                    Itemname "The Holy Mackerel"
                    "fire rate bonus" 0.5
                }

                CharacterAttributes
                {
                    "voice pitch scale" 0.0
                    "move speed bonus"	0.5
                    "damage force reduction" 0.4
                    "airblast vulnerability multiplier" 0.4
                    "override footstep sound set" 4
                }

                //Abilities Here
                EventChangeAttributes
                {
                    miku_spotlights_alltogether
                    {
                        Taunt
                        {
                            Delay 1.15 
                            Cooldown 1 
                            Repeats 1 
                            Name "Taunt: Curtain Call" 
                        }
                        FireInput
                        {
                            Target Player
                            Action $PlaySoundToSelf
                            Param "mvm\mvm_revive.wav"
                            Delay  1.6
                            Repeats 1
                        }
                        FireInput
                        {
                            Target popscript
                            Action $CreateShockwave
                            Delay  1.6
                            Repeats 1
                        }
                    }
                    miku_ringattack
                    {
                        Taunt
                        {
                            Delay 1 
                            Cooldown 1 
                            Repeats 1 
                            Name "Taunt: Disco Fever" 
                        }
                        FireInput
                        {
                            Target "ringattacklogic"
                            Action Trigger
                            Delay  2
                            Repeats 1
                        }
                        FireInput
                        {
                            Target "spotlightsforher"
                            Action ForceSpawn
                            Delay  2
                            Repeats 1
                        }
                    }
                    mikuPAUSE
                    {
                        FireInput
                        {
                            Target Player
                            Action $DisplayTextChat
                            Param  "{CBC3E3} Hey! Tough crowd huh? Alright then. Time to pull out the tank!"
                            Delay  0
                            Repeats 1
                        }
                        FireInput
                        {
                            Target Player
                            Action $playsoundtoself
                            Param  miku_tank_phase.mp3
                            Delay  0
                            Repeats 1
                        }
                        FireInput
                        {
                            Target attack_intervals_miku
                            Action Disable
                            Delay 0
                            Repeats 1
                        }
                        FireInput
                        {
                            Target attack_intervals_miku
                            Action $CancelPending
                            Delay 0
                            Repeats 1
                        }
                        FireInput
                        {
                            Target miku_abilities
                            Action Disable
                            Delay 0
                            Repeats 1
                        }
                        FireInput
                        {
                            Target miku_abilities
                            Action $CancelPending
                            Delay 0
                            Repeats 1
                        }
                        AddCond
                        {
                            Index 14
                            Duration 99
                        }
                        Taunt
                        {
                            Delay 0.2
                            Cooldown 1 
                            Repeats 1 
                            Name "Taunt: The Scaredy-Cat!" 
                        }
                        
                        FireInput
                        {
                            Target      !self
                            Action      $SetLocalOrigin
                            Param       "748 -5668 497"
                            Delay       4.2
                            Repeats     1
                        }
                        FireInput
                        {
                            Target      pop_handle
                            Action      $ResumeWaveSpawn
                            Param       teslatank*
                            Delay       4.2
                            Repeats     1
                        }
                        Taunt
                        {
                            Delay       5
                            Duration    600
                            Cooldown    1
                            Name        "Taunt: Flying Colors"
                            Repeats 1
                        }
                        CharacterAttributes
                        {
                            "move speed bonus" 0.005
                            "no_attack" 1
                        }
                    }
                    phase2time
                    {
                        // ActionOverride FetchFlag
                        FireInput
                        {
                            Target Player
                            Action $DisplayTextChat
                            Param  "{CBC3E3} Well this is some unfortunate circumstances on my end. Time to dance one last time! SPOTLIGHTS GO!"
                            Delay  0
                            Repeats 1
                        }
                        FireInput
                        {
                            Target Player
                            Action $playsoundtoself
                            Param  miku_phase2.mp3
                            Delay  0
                            Repeats 1
                        }
                        Taunt
                        {
                            Delay       1
                            Name        "Taunt: Commending Clap"
                            Repeats 1
                        }
                        AddCond
                        {
                            Index 14
                            Duration 4
                        }
                        FireInput
                        {
                            Target !self
                            Action $RemoveCond
                            Param  5
                            Delay  0.02
                            Repeats 1
                        }
                        FireInput
                        {
                            Target attack_intervals_miku
                            Action Enable
                            Delay 4.5
                            Repeats 1
                        }
                        FireInput
                        {
                            Target attack_intervals_miku
                            Action FireTimer
                            Delay 10
                            Repeats 1
                        }
                        FireInput
                        {
                            Target attack_intervals_miku
                            Action ResetTimer
                            Delay 11
                            Repeats 1
                        }
                        FireInput
                        {
                            Target miku_abilities
                            Action Enable
                            Delay 4.8
                            Repeats 1
                        }
                        FireInput
                        {
                            Target pop_handle
                            Action $ResumeWaveSpawn
                            Param  spotsoflight*
                            Delay  4.5
                            Repeats 1
                        }
                        // FireInput
                        // {
                        //     Target !self
                        //     Action $BotCommand
                        //     Param  "switch_action FetchFlag"
                        //     Delay  6
                        // }
                        FireInput
                        {
                            Target !self
                            Action $TeleportToEntity
                            Param  getoverhere
                            Delay  0.02
                            Repeats 1
                        }
                        CharacterAttributes
                        {
                            "move speed bonus" 0.65
                            "no_attack" 0
                        }
                    }
                }
            }
        }
        WaveSpawn // Tank # HP
        {
            Name teslatank
            WaitForAllSpawned Boss
            TotalCount 1
            MaxActive 1
            SpawnCount 1
            WaitBeforeStarting 3
            WaitBetweenSpawns 0
        
            TotalCurrency 150

            DoneOutput
            {
                Target backinthefight
                Action Trigger
            }
        
            Tank
            {
                Name "teslatank"
                StartingPathTrackNode boss_path_1
                DisableBomb 1
                Health 17000
                Speed 80
                Skin 0
                SpawnTemplate teslatank
                SpawnTemplate tpmikuhere
                ClassIcon tank_tesla
        
                OnKilledOutput {}
                OnBombDroppedOutput
                {
                    Target boss_deploy_relay
                    Action Trigger
                }
            }
        }
        WaveSpawn
        {
            Name spotsoflight //not actually lol, THE SPOTLIGHTS
            WaitForAllSpawned Boss
            Where spawnbot
            TotalCount 2
            MaxActive 2
            SpawnCount 1
            WaitBeforeStarting 0
            WaitBetweenSpawns 3
            TotalCurrency 0
            Support 1
            HideIcon 1
            TFBot
            {
                Name "Spotlight"
                Class Heavyweapons
                Health 40000
                UseCustomModel models/empty.mdl
                Scale 0.3
                Action Mobber
                WeaponRestrictions MeleeOnly
                Attributes SuppressFire
                WeaponResist
                {
                    "TF_WEAPON_KNIFE"	0.025	// makes it so that you can't just instakill him with a backstab but still do SOMETHING as spy
                }
                SpawnTemplate spotlights_attack_minion
                FireInput
                {
                    Target !self
                    Action $TeleportToEntity
                    Param  @p@mikuboss
                    Delay  0
                    Repeats 1
                }

                CharacterAttributes
                {
                    "not solid to players" 1
                    "voice pitch scale" 0.0
                    "move speed bonus" 0.9
                }
            }
        }
        //REGULAR SUPPORTS
        WaveSpawn
        {
            WaitForAllSpawned Boss
            Where spawnbot
            TotalCount 3
            MaxActive 3
            SpawnCount 1
            WaitBeforeStarting 0
            WaitBetweenSpawns 2.5
            TotalCurrency 50
            Support 1
        
            TFBot
            {
                Template	T_TFBot_Scout_FAN
                Action Mobber
                UseHumanAnimations 1
                Tag bot
            }
        }
        WaveSpawn
        {
            WaitForAllSpawned Boss
            Where spawnbot
            TotalCount 2
            MaxActive 2
            SpawnCount 2
            WaitBeforeStarting 10
            WaitBetweenSpawns 10
            TotalCurrency 50
            Support 1
        
            TFBot
            {
                Class Soldier
                // Action Mobber
                Skill Easy
                UseHumanAnimations 1
                Tag bot
            }
        }
    }

    Wave	// Wave #
    {
        // Chicken Cooker: ordinary MvM wavespawn owns all bot creation.
        // Lua only registers, teleports and activates tagged standbys.
        WaveSpawn
        {
            Name PlayerChickenCooker
            Where spawnbot
            TotalCount 999
            MaxActive 3
            SpawnCount 1
            WaitBeforeStarting 0
            WaitBetweenSpawns 0.25
            TotalCurrency 0
            Support Limited
            HideIcon 1
            WaitForAllDead wave1display

            TFBot
            {
                Template Chickens_Pool
            }
        }

        StartWaveOutput
        {
            Target      wave_start_relay
            Action      Trigger
        }

        DoneOutput
        {
            Target      wave_finished_relay
            Action      Trigger
        }
        InitWaveOutput
        {
            Target      wave_start_relay
            Action      RunScriptCode
            Param       "
			IncludeScript(`claudz_logic_v3_modified`)

            // EntFire(`wave_init_relay_route_r`, `Trigger`, null, 0.5)
            ClientPrint(null,3,`\x07C3B1E1 WARNING : IN THIS WAVE. A RED TEAM WIPE WILL LEAD TO FAILURE!`)
            "
        }
        RedTeamWipeCausesWaveLoss 1
        // Fake Wave
        WaveSpawn
        {
            Name                    wave1display
            Where                   spawnbot
            HideIcon                1
            TotalCount              2
            MaxActive               2
            SpawnCount              1
            WaitBeforeStarting      5
            WaitBetweenSpawns       0.1
            TotalCurrency           0

            StartWaveOutput
            {
                Target      theatrefade
                Action      Trigger
            }
            // DoneOutput
            // {
            //     Target music1
            //     Action Trigger
            // }

            Squad
            {
                TFBot
                {
                    Class Heavyweapons
                    Name "Demozart"
                    Scale 1.65
                    UseHumanAnimations 1
                    Item "The Brawling Buccaneer"
                    Item "The Man in Slacks"
                    Item "The Lordly Lapels"
                    Item "The Horsemann's Hand-Me-Down"
                    Item "Horseless Headless Horseman's Head"
                    Action          Idle
                    ClassIcon agentbomb
                    UseCustomModel "models/player/demo.mdl"
                    Skin 5
                    Tag miku
                    NoPushaway 1

                    InterruptAction
                    {
                        AimTarget cameraPVZ
                        Delay 1
                        Cooldown 1
                        Duration 99
                    }

                    FireInput
                    {
                        Target      !self
                        Action      $SetLocalOrigin
                        Param       "790 -5890 632"
                        Delay       0.1
                        Repeats     1
                    }
                    FireInput
                    {
                        Target popscript
                        Action $hhh_cosmeticfix
                        Delay 0.1
                        Repeats 1
                    }

                    Taunt
                    {
                        Delay       2
                        Duration    99
                        Cooldown    1
                        Name        "Taunt: Flying Colors"
                    }
                }
                TFBot
                {
                    Class Heavyweapons
                    Scale 1.5
                    Tag miku
                    UseHumanModel 1
                    Skin 5
                    Action Idle
                    Item "Rogue's Col Roule"
                    Item "Black Tie Affair"
                    Item "The Wilson Weave"
                    Item "Esprit de Corps"
                    Item "The Man in Slacks"

                    FireInput
                    {
                        Target      !self
                        Action      $SetLocalOrigin
                        Param       "760 -5938 632"
                        Delay       0.1
                        Repeats     1
                    }
                    FireInput
                    {
                        Target popscript
                        Action $hhh_cosmeticfix
                        Delay 0.1
                        Repeats 1
                    }

                    Taunt
                    {
                        Delay       2
                        Duration    99
                        Cooldown    1
                        Name        "Taunt: The Fist Bump"
                    }

                    CharacterAttributes
                    {
                        "item color rgb" 000000
                    }
                }
                TFBot
                {
                    Class Pyro
                    Scale 1.85
                    Tag miku
                    UseHumanModel 1
                    Skin 5
                    Action Idle
                    Item "The Wilson Weave"
                    Item "Black Tie Affair"
                    Item "The Dapper Dickens"

                    FireInput
                    {
                        Target      !self
                        Action      $SetLocalOrigin
                        Param       "922 -5895 632"
                        Delay       0.1
                        Repeats     1
                    }
                    FireInput
                    {
                        Target popscript
                        Action $hhh_cosmeticfix
                        Delay 0.1
                        Repeats 1
                    }

                    Taunt
                    {
                        Delay       2
                        Duration    99
                        Cooldown    1
                        Name        "Taunt: Scorcher's Solo"
                    }

                }
                TFBot
                {
                    Class Sniper
                    // Scale 1.65
                    Tag miku
                    UseCustomModel "models/bots/merasmus/merasmus.mdl"
                    UseHumanAnimations 1
                    Skin 1
                    Action Idle
                    Item "The Misdirector"
                    Item "Sleight of Hand"

                    FireInput
                    {
                        Target      !self
                        Action      $SetLocalOrigin
                        Param       "1005 -6078 679"
                        Delay       0.1
                        Repeats     1
                    }
                    FireInput
                    {
                        Target popscript
                        Action $hhh_cosmeticfix
                        Delay 0.1
                        Repeats 1
                    }

                    Taunt
                    {
                        Delay       2
                        Duration    99
                        Cooldown    1
                        Name        "Taunt: Kazotsky Kick"
                    }

                }
            }
        }

        // ----------------------------------------
        // START WAVE
        // ----------------------------------------
        WaveSpawn
        {
            Name w3_a
            WaitForAllDead wave1display
            Where spawnbot
            Where flankers
            TotalCount 9
            MaxActive 9
            SpawnCount 3
            WaitBeforeStarting 5
            WaitBetweenSpawns 10
            TotalCurrency 50

            StartWaveOutput
            {
                Target "wave3_act0.5"
                Action Display
            }
            FirstSpawnOutput
            {
                Target inbetweenthetheatre
                Action PlaySound
            }
        
            Squad
            {
                TFBot
                {
                    Template T_TFBot_Giant_Demoman
                    Skill Hard
                    Tag giant
                    UseHumanAnimations 1
                    Item "Fizzy Pharmacist"
                    Item "Soda Cap"
                    Name "Giant Fizz-Vendor"
                    // ClassIcon soldier_robot_nys

                    ItemAttributes
                    {
                        ItemName TF_WEAPON_GRENADELAUNCHER
                        "custom projectile model" "models/weapons/c_models/c_energy_drink/c_energy_drink.mdl"
                        "mult projectile scale" 1.35
                    }
                }
                TFBot
                {
                    Class Pyro
                    Skill Easy
                    ClassIcon soldier_robot_nys
                    UseHumanAnimations 1
                    Item "Sleight of Hand"
                    Item "Scrub Stompers"
                    Name "Critic"
                    Tag bot
                }
                TFBot
                {
                    Class Pyro
                    Skill Easy
                    ClassIcon soldier_robot_nys
                    UseHumanAnimations 1
                    Item "Sleight of Hand"
                    Item "Scrub Stompers"
                    Name "Critic"
                    Tag bot
                }
            }
        }
        WaveSpawn
        {
            Where flankers
            Where spawnbot
            WaitForAllDead wave1display
            TotalCount 30
            MaxActive 10
            SpawnCount 1
            WaitBeforeStarting 2
            WaitBetweenSpawns 0.1
            TotalCurrency 0
        
            TFBot
            {
                Class Heavyweapons
                ClassIcon soldier_robot_nys
                Tag bot
                UseHumanAnimations 1
                WeaponRestrictions MeleeOnly
                Item "Sleight of Hand"
                Item "Scrub Stompers"
                Name "Critic"
                Item "Memory Maker"
            }
        }
        WaveSpawn
        {
            Name w3_b
            WaitForAllDead w3_a
            Where spawnbot
            Where flankers
            TotalCount 2
            MaxActive 2
            SpawnCount 1
            WaitBeforeStarting 5
            WaitBetweenSpawns 10
            TotalCurrency 50

            DoneOutput
            {
                Target inbetweenthetheatre
                Action StopSound
            }
        
            Squad
            {
                TFBot
                {
                    Template T_TFBot_Giant_Heavyweapons_Shotgun
                    Skill Easy 
                    Tag miku
                    UseCustomModel "models/bots/medic/bot_medic.mdl"
                    UseHumanAnimations 1
                    Item "Fizzy Pharmacist"
                    Item "Soda Cap"
                    Name "Giant Fizz-Vendor"
                    // ClassIcon soldier_robot_nys
                }
                TFBot
                {
                    Template T_TFBot_Giant_Medic_Regen
                    Tag miku
                    UseCustomModel "models/bots/heavy_boss/bot_heavy_boss.mdl"
                    UseHumanAnimations 1
                    Item "Clown's Cover-Up"
                    Item "Pestering Jester"
                    Item "Esprit de Corps"

                    Name "Giant Fizz-Vendor"
                    // ClassIcon soldier_robot_nys
                }
            }
        }
        WaveSpawn
        {
            WaitForAllDead w3_a
            Where spawnbot
            TotalCount 10
            MaxActive 10
            SpawnCount 1
            WaitBeforeStarting 0
            WaitBetweenSpawns 2
            TotalCurrency 50
        
            TFBot
            {
                Class Soldier
                Skill Easy
                Tag bot
                Item "Sleight of Hand"
                Item "Scrub Stompers"
                Name "Critic"
                UseHumanAnimations 1
                Attributes HoldFireUntilFullReload
                ClassIcon soldier_robot_nys
            }
        }
        //---------==
        //HERE WE GO!
        //---------==
        WaveSpawn
        {
            Name w3_boss1
            Where spawnbot
            WaitForAllDead w3_b
            TotalCount 1
            MaxActive 1
            SpawnCount 1
            WaitBeforeStarting 10
            WaitBetweenSpawns 0
            TotalCurrency 100
            StartWaveOutput
            {
                Target showvibes
                Action Trigger
            }
            TFBot
            {
                Template	T_TFBot_Giant_Demoman
                WeaponRestrictions MeleeOnly
                Item "The Eyelander"
                Health 24000
                Name "Demozart"
                Scale 1.65
                UseHumanAnimations 1
                Item "The Brawling Buccaneer"
                Item "The Man in Slacks"
                Item "The Lordly Lapels"
                Item "The Horsemann's Hand-Me-Down"
                Item "Horseless Headless Horseman's Head"
                UseHumanModel 1
                Skin 5
                Tag miku
                Action Mobber
                ClassIcon agentbomb
                Attributes UseBossHealthBar
                SpawnTemplate demozart_logic

                FireInput
                {
                    Target "!self"
                    Action      $SetLocalOrigin
                    Param       "854 -5028 309"
                    Delay       0.02
                    Repeats     1
                } 
                Taunt
                {
                    Delay       0.5
                    Duration    10
                    Cooldown    10
                    Repeats 1
                    Name        "Oblooterated Taunt"
                }
                AddCond
                {
                    Index 14
                    Duration 5
                }
                CharacterAttributes
                {
                    "hand scale" 1.55
                }

                EventChangeAttributes
                {
                    clapthatshit
                    {
                        // WeaponRestrictions PrimaryOnly
                        Taunt
                        {
                            Delay 0.2
                            Cooldown 1 
                            Repeats 1 
                            Name "Taunt: Commending Clap"
                        }
                    }
                    rocketsaway
                    {
                        
                        Taunt
                        {
                            Delay       0.5
                            Duration    10
                            Cooldown    10
                            Repeats 1
                            Name        "Replay Taunt"
                        }
                        FireInput
                        {
                            Target popscript
                            Action $piano_rockets
                            Delay 0.8
                            Repeats 1
                        }
                    }
                }
            }
        }
    }

    Wave	// Wave #
    {
        // Chicken Cooker: ordinary MvM wavespawn owns all bot creation.
        // Lua only registers, teleports and activates tagged standbys.
        WaveSpawn
        {
            Name PlayerChickenCooker
            Where spawnbot
            TotalCount 999
            MaxActive 3
            SpawnCount 1
            WaitBeforeStarting 0
            WaitBetweenSpawns 0.25
            TotalCurrency 0
            Support Limited
            HideIcon 1

            TFBot
            {
                Template Chickens_Pool
            }
        }

        StartWaveOutput
        {
            Target      wave_start_relay
            Action      Trigger
        }

        DoneOutput
        {
            Target      wave_finished_relay
            Action      Trigger
        }

        InitWaveOutput
        {
            Target      holograms_3way_relay
            Action      Trigger
        }
        WaveSpawn
        {
            Name w3_boss1
            Where spawnbot
            // WaitForAllDead w3_b
            TotalCount 1
            MaxActive 1
            SpawnCount 1
            WaitBeforeStarting 10
            WaitBetweenSpawns 0
            TotalCurrency 100
            StartWaveOutput
            {
                Target showvibes
                Action Trigger
            }
            TFBot
            {
                Template	T_TFBot_Giant_Demoman
                WeaponRestrictions MeleeOnly
                Item "The Eyelander"
                Health 24000
                Name "Demozart"
                Scale 1.65
                UseHumanAnimations 1
                Item "The Brawling Buccaneer"
                Item "The Man in Slacks"
                Item "The Lordly Lapels"
                Item "The Horsemann's Hand-Me-Down"
                Item "Horseless Headless Horseman's Head"
                UseHumanModel 1
                Skin 5
                Tag miku
                Action Mobber
                ClassIcon agentbomb
                Attributes UseBossHealthBar
                SpawnTemplate demozart_logic

                FireInput
                {
                    Target "!self"
                    Action      $SetLocalOrigin
                    Param       "854 -5028 309"
                    Delay       0.02
                    Repeats     1
                } 
                Taunt
                {
                    Delay       0.5
                    Duration    10
                    Cooldown    10
                    Repeats 1
                    Name        "Oblooterated Taunt"
                }
                AddCond
                {
                    Index 14
                    Duration 5
                }
                CharacterAttributes
                {
                    "hand scale" 1.55
                }

                EventChangeAttributes
                {
                    clapthatshit
                    {
                        // WeaponRestrictions PrimaryOnly
                        Taunt
                        {
                            Delay 0.2
                            Cooldown 1 
                            Repeats 1 
                            Name "Taunt: Commending Clap"
                        }
                    }
                    rocketsaway
                    {
                        
                        Taunt
                        {
                            Delay       0.5
                            Duration    10
                            Cooldown    10
                            Repeats 1
                            Name        "Replay Taunt"
                        }
                        FireInput
                        {
                            Target popscript
                            Action $piano_rockets
                            Delay 0.8
                            Repeats 1
                        }
                    }
                }
            }
        }
    }
}


/// TO DO LIST:
//General : Add the vtf upgrades.
//General : Make waves smaller to bring in the bosses.
// WAVE 1 : Add Chicken Kiev Boss.
// WAVE 2 : Add Hatsune Miku boss.
//FUTURE PLANS
// WAVE 3 : Music boss that has dynamic music throughout the wave by adding an instrument after each important subwave defeated