//remedic but its actually reverse 
//collab between colonel and stardust

//zombies need to aquire the n word pass so they can say the n word 
//but red has it
//fuck red
//they go get it
#base robot_standard.pop
#base robot_giant.pop
//#base robot_stardust.pop // do we want my templates?

WaveSchedule
{
    StartingCurrency 1000
    CanBotsAttackWhileInSpawnRoom no
    RespawnWaveTime 5
    // FixedRespawnWaveTime 1
    // AddSentryBusterWhenDamageDealtExceeds 3000
    // AddSentryBusterWhenKillCountExceeds 15
    // Advanced 1
    // EventPopfile Halloween

    ReverseWinConditions 1 		 
	AllowJoinTeamBlue 1 				 
	HumansMustJoinTeam Blue	
	SetCreditTeam 3	
	SniperAllowHeadshots 1 
	SendBotsToSpectatorImmediately 1 
    FixedRespawnWaveTimeBlue 1
    RespawnWaveTimeBlue 5
    MaxSpectators 0
    NoRomevisionCosmetics 1
    RemoveBluVelocityLimit 1
    NoBluHumanFootsteps 1
    FixedBuybacks 1   
	BuybacksPerWave 0
    SniperHideLasers 1
    //BluHumanInfiniteAmmo 1 // do we want this
    RestoreNegativeDamageHealing 1
    HealOnKillOverhealMelee 1
    FlagCarrierMovementPenalty 1 
    NoRedBotsRandomCrit 1   
    FixHuntsmanDamageBonus 1
    RobotLimit 26
	ExtraBotSlotsNoDeathcam 0 
    EnemyTeamForReverse Red
    NoRedSniperBotHeadshots 1
    ExtendedUpgradesOnly 1
    ForceHoliday 2

    PrecacheModel "models/props_mvm/mvm_upgrade_blu.mdl"
    PrecacheModel "models/props_mvm/reversemvm_redwall_352x256.mdl"
    PrecacheModel "models/props_mvm/reversemvm_redwall.mdl"

    ClassLimit 
	{
		Heavyweapons 0
		Medic 0
		Sniper 0
        Spy 0
        Medic 6
        Scout 0 
        Soldier 0
        Pyro 0
        Engineer 0
	}

    ForceItem "Zombie Medic"

    ///////////////////////////////////////BALANCING
    ////////////////////////////////////////////////////////
    ItemAttributes   //Adds attributes to specified item given to players
	{
		SimilarToItem "The Ubersaw"
		"add uber charge on hit" 0.1
		"special item description" "Less uber per hit."
	}

    ///////////////////////////////////////EXTENDED UPGRADES (make them zombie themed or smth idk)
    ////////////////////////////////////////////////////////
    ExtendedUpgrades
    {
        HealthUpgrade
		{
			Name "+50 max health" 
			Attribute "max health additive bonus" 
			Cap 200
			Increment 50
			Cost 600 
			PlayerUpgrade 1 
			AllowPlayerClass Medic
            Description "+50 health"
		}
        VampireUpgrade
		{
			Name "Vampire" 
			Attribute "bleeding duration" 
			Cap 9
			Increment 3
			Cost 600 
			AllowPlayerClass Medic
            Description "Leech Life off of enemies."
            AllowedWeapons 
			{
				Slot "melee"
			}
            DisallowedWeapons
            {
                Itemname "The Ubersaw"
                Itemname "Festive Ubersaw"
            }
            SecondaryAttributes
            {
                "heal on hit for slowfire" 5
            }
		}
        DamageUpgrade
		{
			Name "Added Hunger" 
			Attribute "damage bonus" 
			Cap 1.6
			Increment 0.2
			Cost 300 
			AllowPlayerClass Medic
            Description "+20% damage bonus"
            AllowedWeapons 
			{
				Slot "melee"
                Slot "Primary"
			}
		}
        CritUpgrade
		{
			Name "Anger Point" 
			Attribute "speed_boost_on_kill" 
			Cap 3
			Increment 3
			Cost 700
			AllowPlayerClass Medic
            Description "Speed Boost and Minicrits on kill"
            SecondaryAttributes
            {
                "minicritboost on kill" 3
            }
            AllowedWeapons
            {
                Slot "melee"
            }
		}
    }

    ///////////////////////////////////////POINT TEMPLATES
    ////////////////////////////////////////////////////////
    PointTemplates 
    {
        //NOTES
        //Use init_wave_output to disable and enable logic
        core_logic
        {
            logic_auto
            {
                "targetname" "auto_setup"
                "OnMapSpawn" "func_respawnroomvisualizer*,Disable,,0,-1"
                "OnMapSpawn" "spawnbot*,Disable,,0,-1"
                "OnMapSpawn" "intel*,Disable,,0,-1"
                // "OnMapSpawn" "wave_start*,AddOutput,OnTrigger func_respawnroomvisualizer*:SetTeam:3:0:-1,0,-1" // 
                // "OnMapSpawn" "wave_finish*,AddOutput,OnTrigger func_respawnroomvisualizer*:SetTeam:2:0:-1,0,-1"
            }
        }
        Point_A
        {
            NoFixup 1
            //BLU spawn POINT A
            info_player_teamspawn
            {
                "angles" "0 90 0"
                "spawnflags" "511"
                "targetname" "blu_spawn"
                "TeamNum" "3"
                "origin" "-2872 -328 -1636"
            }
            //RED medic spawn point A
            info_player_teamspawn
            {
                "angles" "0 0 0"
                "spawnflags" "511"
                "targetname" "redmed_boss_pointA"
                "origin" "-4454 910 -1294.7"
            }
            //Upgrade station
            prop_dynamic
            {
                "angles" "0 90 0"
                "model" "models/props_mvm/mvm_upgrade_blu.mdl"
                "modelscale" "1.0"
                "skin" "0"
                "solid" "6"
                "spawnflags" "0"
                "origin" "-2880 -985 -1641"
                "targetname" "UpgradeStationPointA"
            }
            func_upgradestation
			{
				"mins" "-216 -237 -83" 
				"maxs" "216 237 83"
                "origin" "-2880 -985 -1641"
				"parentname" "UpgradeStationPointA"
			}
            //Spawn Force Fields and Walls
            prop_dynamic
            {
                "angles" "0 90 0"
                "model" "models/props_mvm/reversemvm_redwall_352x256.mdl"
                "solid" "0"
                "spawnflags" "0"
                "targetname" "point_a_wall_spawn_prop"
                "origin" "-2569 -840 -1535"
            }
            func_forcefield
            {
                "origin" "-2570.5 -852 -1535"
                "StartDisabled" "0"
                "targetname" "point_a_wall_spawn"
                "TeamNum" "2"
                "mins" "-11 -159 -128"
                "maxs" "11 159 128"
            }
            prop_dynamic
            {
                "angles" "0 180 0"
            
                "model" "models/props_mvm/reversemvm_redwall_352x256.mdl"
                "modelscale" "1.0"
                "skin" "0"
                "solid" "0"
                "spawnflags" "0"
                "targetname" "point_a_wall_spawn_prop_2"
                "origin" "-3283 -701.286 -1619"
            }
            func_forcefield
            {
                "origin" "-3245 -690 -1526"
                "renderfx" "0"
                "rendermode" "0"
                "StartDisabled" "0"
                "targetname" "point_a_wall_spawn_2"
                "TeamNum" "2"

                "mins" "-159 -11 -128"
                "maxs" "159 11 128"
            }
            //ForceFields near point A
            func_forcefield
            {
                "origin" "-4409.45 1346.49 -1200"
                "rendermode" "0"
                "StartDisabled" "0"
                "targetname" "point_a_wall_point"
                "TeamNum" "2"

                "mins" "-159 -12 -128"
                "maxs" "159 12 128"
            }
            prop_dynamic
            {
                "angles" "0 180 0"
            
                "model" "models/props_mvm/reversemvm_redwall_352x256.mdl"
                "modelscale" "1.0"
                "skin" "0"
                "solid" "0"
                "spawnflags" "0"
                "targetname" "point_a_wall_point_prop"
                "origin" "-4409.45 1346.49 -1250"
            }
            func_forcefield
            {
                "origin" "-3724.8 843.15 -1271"
                "StartDisabled" "0"
                "targetname" "point_a_wall_point_2"
                "TeamNum" "2"
                "mins" "-11 -159 -128"
                "maxs" "11 159 128"
            }
            prop_dynamic
            {
                "angles" "0 90 0"
            
                "model" "models/props_mvm/reversemvm_redwall_352x256.mdl"
                "modelscale" "1.0"
                "skin" "0"
                "solid" "0"
                "spawnflags" "0"
                "targetname" "point_a_wall_point_prop"
                "origin" "-3724.8 843.15 -1340"
            }
            func_forcefield
            {
                "origin" "-3739.32 1231.7 -1088"
                "StartDisabled" "0"
                "targetname" "point_a_wall_point_2"
                "TeamNum" "2"
                "mins" "-11 -159 -128"
                "maxs" "11 159 128"
            }
            prop_dynamic
            {
                "angles" "0 90 0"
                "mindxlevel" "0"
                "model" "models/props_mvm/reversemvm_redwall.mdl"
                "solid" "0"
                "spawnflags" "0"
                "targetname" "wall2"
                "origin" "-3732 1236 -1162"
            }
            //Spawn ForceFields and its logic
            func_forcefield
            {
                "origin" "-3727 -601 -1569"
                "renderfx" "0"
                "rendermode" "0"
                "StartDisabled" "0"
                "targetname" "point_a_wall_deactive"
                "teamnum" "2"
                "mins" "-140 -90 -128"
                "maxs" "140 90 128"
            }
            prop_dynamic
            {
                "angles" "0 195 0"
                "model" "models/props_mvm/reversemvm_redwall_352x256.mdl"
                "skin" "0"
                "solid" "0"
                "spawnflags" "0"
                "targetname" "drop_wall"
                "origin" "-3657.82 -668.469 -1591"
            }
            logic_auto
            {
                "targetname" "wave1_setup"
                "OnMapSpawn" "wave_start*,AddOutput,OnTrigger drop_wall*:Disable::0:-1,0,-1"
                "OnMapSpawn" "wave_start*,AddOutput,OnTrigger point_a_wall_deactive*:SetTeam:3:0:-1,0,-1"

                "OnMapSpawn" "wave_finish*,AddOutput,OnTrigger drop_wall*:Enable::0:-1,0,-1"
                "OnMapSpawn" "wave_finish*,AddOutput,OnTrigger point_a_wall_deactive*:SetTeam:2:0:-1,0,-1"
            }
        }
    }

    SpawnTemplate core_logic
    SpawnTemplate Point_A

    Wave // Wave 1
    {
        StartWaveOutput
        {
            Target wave_start_relay
            Action Trigger
        }
        DoneOutput
        {
            Target wave_finished_relay
            Action Trigger
        }
        InitWaveOutput
        {
            Target holograms_3way_relay
            Action Trigger
        }

        WaveSpawn
        {
            Name "example"
            Where redmed_boss_pointA
            TotalCount 1
            MaxActive 1
            SpawnCount 1
            WaitBeforeStarting 0
            WaitBetweenSpawns 0
            TotalCurrency 0
        
            TFBot
            {
                ClassIcon medic_armored_lite
                Health	30000
                Name	"Chief Medic"
                Action fetchflag
                Scale	1.7
                AlwaysGlow 1
                Attributes UseBossHealthBar
                Class Medic
                Attributes Miniboss
                Skill Expert
                WeaponRestrictions	MeleeOnly
                Item "the amputator"
                Item "modest metal pile of scrap"
                item "Coldfront Carapace"
                ItemAttributes
                {
                    itemname "the amputator"
                    "damage bonus" 1.25
                    "damage force reduction" 0.0001
                    "melee range multiplier" 1.25
                    "mult_health_fromhealers_penalty_active" "0.55"
                }
                CharacterAttributes
                {
                    "dmg taken increased" 2
                    "not solid to players" 1
                }
                Taunt    //Taunt periodically
                {
                    Delay 1
                    Cooldown 25
                }
				AddCond  
				{
					Name "TF_COND_REPROGRAMMED"
				}
            }
        }
    }
}