;----------------------------
; Unfucks trigger disabling
;----------------------------
modify:
{
    match:
    {
        "classname" "logic_relay"
        "hammerid" "207562"
        "targetname" "Relay_Level1"
    }
    delete:
    {
        "Ontrigger" "blockrock_1_trigger,Disable,,5,-1"
    }
    insert:
    {
        "Ontrigger" "blockrock_1_trigger,Enable,,5,-1"
    }
}
;----------------------------
; Disables flashlight
;----------------------------
modify:
{
    match:
    {
        "classname" "logic_auto"
        "hammerid" "207550"
    }
    insert:
    {
        "OnMapSpawn" "Server,Command,mp_flashlight 0,1,1"
    }
}
;----------------------------
; Unfucks Chopper
;----------------------------
modify:
{
    match:
    {
        "classname" "trigger_hurt"
        "hammerid" "579624"
        "targetname" "chopper_spawn_hurt"
    }
    delete:
    {
        "OnStartTouch" "speedmod,ModifySpeed,4,1,-1"
    }
    insert:
    {
        "OnStartTouch" "speedmod,ModifySpeed,1,4,-1"
    }
}
;----------------------------
; Boost Boss Health
;----------------------------
modify:
{
    match:
    {
        "classname" "trigger_multiple"
        "hammerid" "878738"
        "targetname" "st3_boss_hp_giver"
    }
    delete:
    {
        "OnStartTouch" "boss_health_phase_1,Add,180,0,-1"
        "OnStartTouch" "boss_health_phase_2,Add,220,0,-1"
    }
    insert:
    {
        "OnStartTouch" "boss_health_phase_1,Add,200,0,-1"
        "OnStartTouch" "boss_health_phase_2,Add,240,0,-1"
    }
}
;----------------------------
; Boost Boss Damage
;----------------------------
modify:
{
    match:
    {
        "classname" "trigger_hurt"
        "hammerid" "667501"
        "targetname" "spawn_brand_pyroclasm_hurt"
    }
    replace:
    {
        "damage" "150"
    }
}
modify:
{
    match:
    {
        "classname" "trigger_hurt"
        "hammerid" "667144"
        "targetname" "spawn_brand_flamepillar_trigger"
    }
    replace:
    {
        "damage" "150"
    }
}
modify:
{
    match:
    {
        "classname" "trigger_hurt"
        "hammerid" "880353"
        "targetname" "boss_brand_hurt"
    }
    replace:
    {
        "damage" "80"
    }
}
modify:
{
    match:
    {
        "classname" "trigger_hurt"
        "hammerid" "667548"
        "targetname" "spawn_brand_frost_blast_trigger"
    }
    replace:
    {
        "damage" "200"
    }
}
modify:
{
    match:
    {
        "classname" "trigger_hurt"
        "hammerid" "667164"
        "targetname" "spawn_brand_sear_hurt"
    }
    replace:
    {
        "damage" "150"
    }
}
modify:
{
    match:
    {
        "classname" "trigger_hurt"
        "hammerid" "667851"
        "targetname" "spawn_brand_earth_rock_trigger"
    }
    replace:
    {
        "damage" "150"
    }
}
modify:
{
    match:
    {
        "classname" "math_counter"
        "hammerid" "878746"
        "targetname" "boss_health_phase_1"
    }
    replace:
    {
        "max" "20000"
    }
}
modify:
{
    match:
    {
        "classname" "math_counter"
        "hammerid" "878753"
        "targetname" "boss_health_phase_2"
    }
    replace:
    {
        "max" "20000"
    }
}
;----------------------------
; Optimize Boss
;----------------------------
modify:
{
    match:
    {
        "classname" "info_particle_system"
        "hammerid" "426299"
        "targetname" "boss_arena_elemental_core_particle"
    }
    replace:
    {
        "start_active" "0"
    }
}
;----------------------------
; Make Stage 2 Harder
;----------------------------
;----------------------------
; --Desert Fixes
;----------------------------
modify:
{
    match:
    {
        "classname" "trigger_once"
        "hammerid" "599248"
    }
    delete:
    {
        "OnStartTouch" "desert_blocker_mdl_1,DisableCollision,,15,1"
        "OnStartTouch" "desert_blocker_mdl_1,Alpha,0,15,1"
        "OnStartTouch" "maker_trigger_c4_1,ForceSpawn,,5,1"
        "OnStartTouch" "server,Command,say **Rigged for explosion! Cover for 15 seconds!**,0,1"
    }
    insert:
    {
        "OnStartTouch" "desert_blocker_mdl_1,DisableCollision,,25,1"
        "OnStartTouch" "desert_blocker_mdl_1,Alpha,0,25,1"
        "OnStartTouch" "maker_trigger_c4_1,ForceSpawn,,15,1"
        "OnStartTouch" "server,Command,say **Rigged for explosion! Cover for 25 seconds!**,0,1"
    }
}

modify:
{
    match:
    {
        "classname" "trigger_once"
        "hammerid" "599293"
    }
    delete:
    {
        "OnStartTouch" "maker_trigger_c4_2,ForceSpawn,,5,1"
        "OnStartTouch" "desert_blocker_mdl_2,Alpha,0,15,1"
        "OnStartTouch" "desert_blocker_mdl_2,DisableCollision,,15,1"
        "OnStartTouch" "server,Command,say **Rigged for explosion! Cover for 15 seconds!**,0,1"
    }
    insert:
    {
        "OnStartTouch" "maker_trigger_c4_2,ForceSpawn,,15,1"
        "OnStartTouch" "desert_blocker_mdl_2,Alpha,0,25,1"
        "OnStartTouch" "desert_blocker_mdl_2,DisableCollision,,25,1"
        "OnStartTouch" "server,Command,say **Rigged for explosion! Cover for 25 seconds!**,0,1"
    }
}

modify:
{
    match:
    {
        "classname" "trigger_once"
        "hammerid" "599304"
    }
    delete:
    {
        "OnStartTouch" "maker_trigger_c4_3,ForceSpawn,,5,1"
        "OnStartTouch" "desert_blocker_mdl_3,Alpha,0,15,1"
        "OnStartTouch" "desert_blocker_mdl_3,DisableCollision,,15,1"
        "OnStartTouch" "server,Command,say **Rigged for explosion! Cover for 15 seconds!**,0,1"
    }
    insert:
    {
        "OnStartTouch" "maker_trigger_c4_3,ForceSpawn,,15,1"
        "OnStartTouch" "desert_blocker_mdl_3,Alpha,0,25,1"
        "OnStartTouch" "desert_blocker_mdl_3,DisableCollision,,25,1"
        "OnStartTouch" "server,Command,say **Rigged for explosion! Cover for 25 seconds!**,0,1"
    }
}
;----------------------------
; --Jungle Fixes
;----------------------------
modify:
{
    match:
    {
        "classname" "trigger_once"
        "hammerid" "638344"
    }
    delete:
    {
        "OnStartTouch" "jungle_blocker_1_wall,Toggle,,15,1"
        "OnStartTouch" "jungle_blocker_1_mdl,Alpha,0,15,1"
        "OnStartTouch" "server,Command,say **The Chopper is cutting through! Cover for 15 seconds**,0,1"
    }
    insert:
    {
        "OnStartTouch" "jungle_blocker_1_wall,Toggle,,25,1"
        "OnStartTouch" "jungle_blocker_1_mdl,Alpha,0,25,1"
        "OnStartTouch" "server,Command,say **The Chopper is cutting through! Cover for 25 seconds**,0,1"
    }
}
modify:
{
    match:
    {
        "classname" "trigger_once"
        "hammerid" "638369"
    }
    delete:
    {
        "OnStartTouch" "jungle_blocker_2_mdl,Alpha,0,15,1"
        "OnStartTouch" "jungle_blocker_2_wall,Toggle,,15,1"
        "OnStartTouch" "server,Command,say **The Chopper is cutting through! Cover for 15 seconds**,0,1"
    }
    insert:
    {
        "OnStartTouch" "jungle_blocker_2_mdl,Alpha,0,25,1"
        "OnStartTouch" "jungle_blocker_2_wall,Toggle,,25,1"
        "OnStartTouch" "server,Command,say **The Chopper is cutting through! Cover for 25 seconds**,0,1"
    }
}
modify:
{
    match:
    {
        "classname" "trigger_once"
        "hammerid" "638384"
    }
    delete:
    {
        "OnStartTouch" "jungle_blocker_3_wall,Toggle,,15,1"
        "OnStartTouch" "jungle_blocker_3_mdl,Alpha,0,15,1"
        "OnStartTouch" "server,Command,say **The Chopper is cutting through! Cover for 15 seconds**,0,1"
    }
    insert:
    {
        "OnStartTouch" "jungle_blocker_3_wall,Toggle,,25,1"
        "OnStartTouch" "jungle_blocker_3_mdl,Alpha,0,25,1"
        "OnStartTouch" "server,Command,say **The Chopper is cutting through! Cover for 25 seconds**,0,1"
    }
}
;----------------------------
; --Frost Fixes
;----------------------------
modify:
{
    match:
    {
        "classname" "trigger_hurt"
        "hammerid" "563999"
    }
    replace:
    {
        "damage" "24"
    }

}
;----------------------------
; --AFK Teleport Stage 1 fix
;----------------------------
modify:
{
    match:
    {
        "targetname" "catacomb_lever_button_1"
        "classname" "func_button"
        "hammerid" "507262"
    }
    insert:
    {
        "OnPressed" "st1_afk_teleport_4,Enable,,5,1"
    }

}
;----------------------------
; --Zombie Boost Stage 3 
;----------------------------
modify:
{
    match:
    {
        "filtername" "team_zombies"
        "classname" "trigger_multiple"
        "hammerid" "876539"
    }
    delete:
    {
        "OnStartTouch" "!activator,AddOutput,gravity 0.75,0,-1"
        "OnEndTouch" "!activator,AddOutput,gravity 1,0.1,-1"
    }
    insert:
    {
        "OnStartTouch" "!activator,AddOutput,gravity 0.45,0,-1"
        "OnEndTouch" "!activator,AddOutput,gravity 1,0.1,-1"
    }

}
modify:
{
    match:
    {
        "filtername" "team_zombies"
        "classname" "trigger_multiple"
        "hammerid" "876552"
    }
    delete:
    {
        "OnStartTouch" "!activator,AddOutput,gravity 0.75,0,-1"
        "OnEndTouch" "!activator,AddOutput,gravity 1,0.1,-1"
    }
    insert:
    {
        "OnStartTouch" "!activator,AddOutput,gravity 0.45,0,-1"
        "OnEndTouch" "!activator,AddOutput,gravity 1,0.1,-1"
    }
}



;; _

;; stage 3 - possible playercrash fix (and animations for a "new" boss model)

modify:
{
	match:
	{
		"origin" "-11358 -12826 -8130"
		"targetname" "boss_brand_Model"
		"model" "models/planeshifter/boss/brand.mdl"
		"classname" "prop_dynamic"
	}
	replace:
	{
		"model" "models/gman.mdl"
		"DefaultAnim" "run_all"
	}
	delete:
	{
		"OnUser1" "boss_brand_Model,SetDefaultAnimation,run,0,-1"
		"OnUser1" "boss_brand_Model,SetAnimation,run,0,-1"
	}
	insert:
	{
		"disableshadows" "1"
		"disablereceiveshadows" "1"
		"OnUser1" "boss_brand_Model,SetDefaultAnimation,run_all,0,-1"
		"OnUser1" "boss_brand_Model,SetAnimation,run_all,0,-1"
	}
}

modify:
{
	match:
	{
		"targetname" "boss_brand_Rotate"
		"classname" "func_rotating"
		"hammerid" "667108"
	}
	replace:
	{
		"disableshadows" "1"
		"disablereceiveshadows" "1"
	}
}
modify:
{
	match:
	{
		"targetname" "boss_brand_Break"
		"classname" "func_physbox_multiplayer"
		"hammerid" "667131"
	}
	replace:
	{
		"disablereceiveshadows" "1"
	}
}

modify:
{
	match:
	{
		"targetname" "st3_boss_hp_giver"
		"classname" "trigger_multiple"
		"hammerid" "878738"
	}
	delete:
	{
		"OnStartTouch" "boss_brand_model,SetDefaultAnimation,idle1,1,1"
		"OnStartTouch" "boss_brand_model,SetAnimation,idle1,1,1"
		"OnStartTouch" "boss_brand_model,SetAnimation,laugh,30,1"
	}
	insert:
	{
		"OnStartTouch" "boss_brand_model,SetDefaultAnimation,idle,1,1"
		"OnStartTouch" "boss_brand_model,SetAnimation,idle,1,1"
		"OnStartTouch" "boss_brand_model,SetAnimation,Wave_close,30,1"
	}
}

modify:
{
	match:
	{
		"targetname" "boss_brand_animation_case"
		"classname" "logic_case"
		"hammerid" "667537"
	}
	delete:
	{
		"OnCase01" "boss_brand_model,SetAnimation,attack_1,0,-1"
		"OnCase02" "boss_brand_model,SetAnimation,attack_2,0,-1"
		"OnCase03" "boss_brand_model,SetAnimation,crit,0,-1"
	}
	insert:
	{
		"OnCase01" "boss_brand_model,SetAnimation,swing,0,-1"
		"OnCase02" "boss_brand_model,SetAnimation,throw1,0,-1"
		"OnCase03" "boss_brand_model,SetAnimation,MeleeAttack01,0,-1"
	}
}
modify:
{
	match:
	{
		"targetname" "boss_brand_attack_fire_case"
		"classname" "logic_case"
		"hammerid" "667237"
	}
	delete:
	{
		"OnCase01" "boss_brand_Model,SetAnimation,spell1,0,-1"
		"OnCase02" "boss_brand_model,SetAnimation,spell2,0,-1"
		"OnCase03" "boss_brand_Model,SetAnimation,spell3,0,-1"
		"OnCase04" "boss_brand_Model,SetAnimation,spell4,0,-1"
	}
	insert:
	{
		"OnCase01" "boss_brand_Model,SetAnimation,preSkewer,0,-1"
		"OnCase02" "boss_brand_model,SetAnimation,preSkewer,0,-1"
		"OnCase03" "boss_brand_Model,SetAnimation,tiefidget,0,-1"
		"OnCase04" "boss_brand_Model,SetAnimation,preSkewer,0,-1"
	}
}
modify:
{
	match:
	{
		"targetname" "boss_brand_attack_frost_case"
		"classname" "logic_case"
		"hammerid" "667623"
	}
	delete:
	{
		"OnCase01" "boss_brand_Model,SetAnimation,spell1,0,-1"
		"OnCase02" "boss_brand_model,SetAnimation,spell2,0,-1"
		"OnCase03" "boss_brand_Model,SetAnimation,spell3,0,-1"
	}
	insert:
	{
		"OnCase01" "boss_brand_Model,SetAnimation,preSkewer,0,-1"
		"OnCase02" "boss_brand_Model,SetAnimation,preSkewer,0,-1"
		"OnCase03" "boss_brand_Model,SetAnimation,preSkewer,0,-1"
	}
}
modify:
{
	match:
	{
		"targetname" "boss_brand_attack_earth_case"
		"classname" "logic_case"
		"hammerid" "667750"
	}
	delete:
	{
		"OnCase01" "boss_brand_Model,SetAnimation,spell1,0,-1"
		"OnCase02" "boss_brand_Model,SetAnimation,spell2,0,-1"
		"OnCase03" "boss_brand_Model,SetAnimation,spell3,0,-1"
		"OnCase04" "boss_brand_Model,SetAnimation,spell4,0,-1"
	}
	insert:
	{
		"OnCase01" "boss_brand_Model,SetAnimation,preSkewer,0,-1"
		"OnCase02" "boss_brand_model,SetAnimation,preSkewer,0,-1"
		"OnCase03" "boss_brand_Model,SetAnimation,preSkewer,0,-1"
		"OnCase04" "boss_brand_Model,SetAnimation,preSkewer,0,-1"
	}
}
modify:
{
	match:
	{
		"targetname" "boss_brand_attack_wind_case"
		"classname" "logic_case"
		"hammerid" "1051444"
	}
	delete:
	{
		"OnCase01" "boss_brand_Model,SetAnimation,spell3,0,-1"
		"OnCase02" "boss_brand_Model,SetAnimation,spell3,0,-1"
		"OnCase03" "boss_brand_Model,SetAnimation,spell4,0,-1"
	}
	insert:
	{
		"OnCase01" "boss_brand_Model,SetAnimation,preSkewer,0,-1"
		"OnCase02" "boss_brand_model,SetAnimation,preSkewer,0,-1"
		"OnCase03" "boss_brand_Model,SetAnimation,preSkewer,0,-1"
	}
}
modify:
{
	match:
	{
		"targetname" "relay_boss_brand_phase_2"
		"classname" "logic_relay"
		"hammerid" "667717"
	}
	delete:
	{
		"OnTrigger" "boss_brand_model,SetAnimation,powerup,0,-1"
	}
	insert:
	{
		"OnTrigger" "boss_brand_model,SetAnimation,jump_holding_glide,0,-1"
	}
}
modify:
{
	match:
	{
		"targetname" "boss_health_phase_2"
		"classname" "math_counter"
		"hammerid" "878753"
	}
	delete:
	{
		"OnHitMin" "boss_brand_model,SetAnimation,dance,17,-1"
		"OnHitMin" "boss_brand_model,SetDefaultAnimation,idle1,0,-1"
		"OnHitMin" "boss_brand_model,SetAnimation,powerup,21,-1"
	}
	insert:
	{
		"OnHitMin" "boss_brand_model,SetAnimation,death1,17,-1"
		"OnHitMin" "boss_brand_model,SetDefaultAnimation,walk_all_Moderate,0,-1"
		"OnHitMin" "boss_brand_model,SetAnimation,deathpose_back,21,-1"
	}
}

;; reset gravity on spawn

add:
{
	"model" "*145"
	"wait" "0.01"
	"StartDisabled" "0"
	"spawnflags" "1"
	"origin" "3584 -3584 -1972"
	"classname" "trigger_multiple"
	"OnStartTouch" "!activator,AddOutput,gravity 1,0,-1"
}


