; fix modify speed on laser gun

modify:
{
    match:
    {
        "targetname" "u_projectile_hurt_1"
        "classname" "trigger_hurt"
    }
    insert:
    {
    "OnHurtPlayer" "speed,ModifySpeed,1,0.5,-1"
    }
}

;fix npc

modify:
{
    match:
    {
        "targetname" "xyz_trooper_thrust1"
        "classname" "phys_thruster"
    }
    replace:
    {
	"force" "4000"
    }
}

modify:
{
    match:
    {
        "targetname" "xyz_trooper_thrust2"
        "classname" "phys_thruster"
    }
    replace:
    {
	"force" "800"
    }
}

; fix stage 1 ending message / kill zm trigger

modify:
{
    match:
    {
        "targetname" "s1_door07"
        "classname" "func_door"
    }
    delete:
    {
		"OnFullyClosed" "s1_end_nuke,Enable,,126,1"
    }
}

modify:
{
    match:
    {
        "targetname" "s1_human_win_once"
        "classname" "trigger_once"
    }
    insert:
    {
		"OnStartTouch" "s1_end_nuke,Enable,,1.5,1"
    }
}

; modify origin of last path track elevator

modify:
{
    match:
    {
        "targetname" "s2_path3"
        "classname" "path_track"
    }
    replace:
    {
	"origin" "-4768 -480 -288"
    }
}

; stage 2 zombie push wrong direction

modify:
{
    match:
    {
        "targetname" "s2_steam_push_zombies"
        "classname" "trigger_push"
    }
    replace:
    {
	"pushdir" "0 180 0"
    }
}

; stage 2 zm cage break bit later

modify:
{
    match:
    {
        "targetname" "st2_once_break"
        "classname" "trigger_once"
    }
    delete:
    {
		"OnStartTouch" "s2_return_break,Break,,5,-1"
    }
    insert:
    {
		"OnStartTouch" "s2_return_break,Break,,8,1"
    }
}

; stage 2 ending exit club nerf

modify:
{
    match:
    {
        "targetname" "st2_but_club_ent"
        "classname" "func_button"
    }
    delete:
    {
		"OnPressed" "CMD,Command,say *** GALAXY NIGHT CLUB DOOR OPENS IN 30 SECONDS ***,0,1"
		"OnPressed" "s2_door_nightclub_ent,Open,,30,1"
		"OnPressed" "s2_break_door_return,Break,,30,1"
		"OnPressed" "CMD,Command,say *** FIND BUNKER BUTTON ***,30,1"
    }
    insert:
    {
		"OnPressed" "CMD,Command,say *** GALAXY NIGHT CLUB DOOR OPENS IN 20 SECONDS ***,0,1"
		"OnPressed" "s2_door_nightclub_ent,Open,,20,1"
		"OnPressed" "s2_break_door_return,Break,,20,1"
		"OnPressed" "CMD,Command,say *** FIND BUNKER BUTTON ***,20,1"
    }
}

; Plasma cannon rework and fix

modify:
{
    match:
    {
        "targetname" "z_explosion_hurt"
        "classname" "trigger_hurt"
    }
    insert:
    {
		"OnStartTouch" "speed,ModifySpeed,0.7,0,-1"
		"OnStartTouch" "speed,ModifySpeed,1,1.5,-1"
    }
}

; cat launcher onpickedup wrong message
modify:
{
    match:
    {
        "targetname" "cat_launcher_holder_1"
        "classname" "weapon_elite"
    }
    delete:
    {
"OnPlayerPickup" "CMD,Command,say ***PLAYER PICKED UP PLASMA CANON ***,0,1"
    }
    insert:
    {
	"OnPlayerPickup" "CMD,Command,say *** PLAYER PICKED UP CAT LAUNCHER ***,0,1"
    }
}

; Fix club door touch opens
modify:
{
    match:
    {
        "targetname" "s2_door_club_2"
        "classname" "func_door"
    }
    replace:
    {
	"spawnflags" "0"
    }
}



; bhop is the key but its to hard for us
modify:
{
    match:
    {
        "hammerid" "125366"
        "classname" "logic_auto"
    }
    delete:
    {
	"OnMapSpawn" "cmd,Command,sv_airaccelerate 20,0,-1"
    }
  insert:
    {
	"OnMapSpawn" "cmd,Command,sv_airaccelerate 16,0,-1"
    }
}


; Fix unblockable tracktrain making players passing through. Changing speed aswell
modify:
{
    match:
    {
        "targetname" "s2_tracktrain_ele"
        "classname" "func_tracktrain"
    }
    replace:
    {
	"spawnflags" "18"
        "startspeed" "70"
    }
}

; Delaying teleport before elevator so players can overdefend
modify:
{
    match:
    {
        "targetname" "s2_counter_start"
        "classname" "math_counter"
    }
    delete:
    {
"OnHitMax" "s2_tp02,Enable,,48,1"
"OnHitMax" "s2_door_01_a,Close,,45,1"
"OnHitMax" "s2_door_01_b,Close,,45,1"
"OnHitMax" "s2_door_01_c,Close,,45,1"
"OnHitMax" "s2_door_01_d,Close,,45,1"
    }
  insert:
    {
	"OnHitMax" "s2_tp02,Enable,,54,1"
"OnHitMax" "s2_door_01_a,Close,,50,1"
"OnHitMax" "s2_door_01_b,Close,,50,1"
"OnHitMax" "s2_door_01_c,Close,,50,1"
"OnHitMax" "s2_door_01_d,Close,,50,1"
    }
}

; Fix bomb elevator blockable
modify:
{
    match:
    {
        "targetname" "stage2_bomb_elevator"
        "classname" "func_movelinear"
    }
    replace:
    {
"blockdamage" "99999"
    }
}

; Modify door speed making it easier on the way back
modify:
{
    match:
    {
        "targetname" "s2_door_club_2"
        "classname" "func_door"
    }
    replace:
    {
"speed" "30"
    }
}

; stage 1 teleport delay making the split easier
modify:
{
    match:
    {
        "targetname" "s1_button04"
        "classname" "func_button"
    }
    delete:
    {
"OnPressed" "s1_door05,Close,,36,1"
"OnPressed" "s1_tpbig_room,Enable,,38,1"
    }
  insert:
    {
"OnPressed" "s1_door05,Close,,43,1"
"OnPressed" "s1_tpbig_room,Enable,,45,1"
    }
}

; Adding messages through the map

modify:
{
    match:
    {
        "targetname" "klm_but"
        "classname" "func_button"
    }
  insert:
    {
"OnPressed" "cmd,Command,say *** 15 SECONDS LEFT ***,20,1"
"OnPressed" "cmd,Command,say *** 5 SECONDS LEFT ***,30,1"
    }
}

; sewer exit + delay tp to allow overdefending

modify:
{
    match:
    {
        "targetname" "s2_once_city_door"
        "classname" "trigger_once"
    }
    delete:
    {
"OnStartTouch" "s2_city_door01,Close,,27,1"
"OnStartTouch" "s2_tp06,Enable,,29,1"
    }
  insert:
    {
"OnStartTouch" "CMD,Command,say *** PRESS THE RED CONSOLE NEAR THE CLUB ***,15,1"
"OnStartTouch" "CMD,Command,say *** KEEP DEFENDING THE STAIRS UNTIL BOTH DOORS OPENS ***,16,1"
"OnStartTouch" "s2_city_door01,Close,,33,1"
"OnStartTouch" "s2_tp06,Enable,,35,1"
    }
}

; plasma cannon particle origin and sound fix
modify:
{
    match:
    {
        "targetname" "plasma_canon_particle_1"
        "classname" "info_particle_system"
    }
    replace:
    {
"origin" "-1704 -1448 52"
    }
}

{
    match:
    {
        "targetname" "plasma_canon_s_1"
        "classname" "ambient_generic"
    }
    replace:
    {
"message" "ambient/energy/weld2.wav"
    }
}

