;; _

;; remove broken particle
 
filter:
{
	"hammerid" "420114"
}
 
;; stage 1 - disable elevator anti-glitch teleport a bit earlier
 
modify:
{
	match:
	{
		"targetname" "jungle_elevator_lin"
		"classname" "func_movelinear"
	}
	insert:
	{
		"OnFullyOpen" "jungle_elevator_tele,Disable,,0,1"
	}
}

;; stage 3 - add zm mode

modify:
{
	match:
	{
		"targetname" "stage3_relay"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "command_point2,Command,say >>>THIS STAGE IS UNFINISHED<<<,32,1"
		"OnTrigger" "command_point2,Command,say >>>SO FOR NOW IT'S JUST ZM STAGE<<<,34,1"
		"OnTrigger" "command_point2,Command,say >>>SURVIVE FOR 3 MINUTES<<<,50,1"
		"OnTrigger" "stage3_afktp,Enable,,60,1"
		"OnTrigger" "command_point2,Command,say >>>2 MINUTES LEFT<<<,110,1"
		"OnTrigger" "command_point2,Command,say >>>1 MINUTE LEFT<<<,170,1"
		"OnTrigger" "command_point2,Command,say >>>30 SECONDS<<<,200,1"
		"OnTrigger" "command_point2,Command,say >>>STAGE 3 - COMPLETED<<<,228,1"
		"OnTrigger" "end_fade2,Fade,,228,1"
		"OnTrigger" "base_endsnd,PlaySound,,228,1"
		"OnTrigger" "stage3_nuke,Enable,,230,1"
		"OnTrigger" "stage3_score,Enable,,230,1"
	}
}

add:
{
	"targetname" "stage3_nuke"
	"StartDisabled" "1"
	"spawnflags" "1"
	"origin" "-13840 13056 -9040"
	"nodmgforce" "0"
	"damagetype" "0"
	"damagemodel" "0"
	"damagecap" "20"
	"damage" "999999"
	"filtername" "zombie_filter"
	"classname" "trigger_hurt"
	"OnUser1" "!self,AddOutput,solid 2,0,1"
	"OnUser1" "!self,AddOutput,mins -1008 -1024 -336,0.1,1"
	"OnUser1" "!self,AddOutput,maxs 1008 1024 336,0.1,1"
}
add:
{
	"wait" "1"
	"targetname" "stage3_score"
	"StartDisabled" "1"
	"spawnflags" "1"
	"origin" "-13840 13056 -9040"
	"filtername" "human_filter"
	"classname" "trigger_multiple"
	"OnUser1" "!self,AddOutput,solid 2,0,1"
	"OnUser1" "!self,AddOutput,mins -1008 -1024 -336,0.1,1"
	"OnUser1" "!self,AddOutput,maxs 1008 1024 336,0.1,1"
	"OnStartTouch" "game_points,ApplyScore,,0,-1"
	"OnStartTouch" "!self,Kill,,0.01,1"
}

modify:
{
	match:
	{
		"classname" "logic_auto"
		"hammerid" "816608"
	}
	insert:
	{
		"OnMapSpawn" "stage3_nuke,FireUser1,,0,-1"
		"OnMapSpawn" "stage3_score,FireUser1,,0,-1"
	}
}

add:
{
	"model" "*238"
	"targetname" "stage3_afktp"
	"target" "stage3_testdest"
	"StartDisabled" "1"
	"spawnflags" "1"
	"origin" "10888 -10778 -2169.5"
	"classname" "trigger_teleport"
}

;; remove invalid prop_physics

filter:
{
	"hammerid" "114102"
}

;; stage 1 - prevent zombies from getting out of elevator shaft early

add:
{
	"targetname" "jungle_elevator_push"
	"StartDisabled" "0"
	"speed" "600"
	"spawnflags" "1"
	"pushdir" "0 0 0"
	"origin" "-881.5 9216 76"
	"angles" "0 0 0"
	"alternateticksfix" "0"
	"classname" "trigger_push"
	"OnUser1" "!self,AddOutput,solid 2,0,1"
	"OnUser1" "!self,AddOutput,mins -8 -40 -52,0.1,1"
	"OnUser1" "!self,AddOutput,maxs 8 40 52,0.1,1"
}
modify:
{
	match:
	{
		"classname" "logic_auto"
		"hammerid" "816608"
	}
	insert:
	{
		"OnMapSpawn" "jungle_elevator_push,FireUser1,,0,-1"
	}
}

modify:
{
	match:
	{
		"targetname" "jungle_elevator_lin"
		"classname" "func_movelinear"
	}
	insert:
	{
		"OnFullyOpen" "jungle_elevator_push,Disable,,0,1"
	}
}

;; stage 2 - fix winning score

modify:
{
	match:
	{
		"targetname" "base_score"
		"classname" "trigger_multiple"
	}
	delete:
	{
		"OnStartTouch" "game_points,ApplyScore,,0,1"
	}
	insert:
	{
		"OnStartTouch" "game_points,ApplyScore,,0,-1"
	}
}

;; stage 3 - block unfair spot

add:
{
	"origin" "-12865 13728 -9344"
	"solid" "6"
	"skin" "0"
	"SetBodyGroup" "0"
	"rendermode" "0"
	"renderfx" "0"
	"rendercolor" "255 255 255"
	"renderamt" "255"
	"RandomAnimation" "0"
	"pressuredelay" "0"
	"PerformanceMode" "0"
	"model" "models/props/cs_assault/barrelwarning.mdl"
	"mindxlevel" "0"
	"MinAnimTime" "5"
	"maxdxlevel" "0"
	"MaxAnimTime" "10"
	"health" "0"
	"fadescale" "1"
	"fademindist" "-1"
	"fademaxdist" "0"
	"ExplodeRadius" "0"
	"ExplodeDamage" "0"
	"disableshadows" "1"
	"disablereceiveshadows" "1"
	"DisableBoneFollowers" "1"
	"angles" "0 0 0"
	"classname" "prop_dynamic_override"
}
add:
{
	"origin" "-12941 13728 -9344"
	"solid" "6"
	"skin" "0"
	"SetBodyGroup" "0"
	"rendermode" "0"
	"renderfx" "0"
	"rendercolor" "255 255 255"
	"renderamt" "255"
	"RandomAnimation" "0"
	"pressuredelay" "0"
	"PerformanceMode" "0"
	"model" "models/props/cs_assault/barrelwarning.mdl"
	"mindxlevel" "0"
	"MinAnimTime" "5"
	"maxdxlevel" "0"
	"MaxAnimTime" "10"
	"health" "0"
	"fadescale" "1"
	"fademindist" "-1"
	"fademaxdist" "0"
	"ExplodeRadius" "0"
	"ExplodeDamage" "0"
	"disableshadows" "1"
	"disablereceiveshadows" "1"
	"DisableBoneFollowers" "1"
	"angles" "0 0 0"
	"classname" "prop_dynamic_override"
}
add:
{
	"origin" "-13017 13728 -9344"
	"solid" "6"
	"skin" "0"
	"SetBodyGroup" "0"
	"rendermode" "0"
	"renderfx" "0"
	"rendercolor" "255 255 255"
	"renderamt" "255"
	"RandomAnimation" "0"
	"pressuredelay" "0"
	"PerformanceMode" "0"
	"model" "models/props/cs_assault/barrelwarning.mdl"
	"mindxlevel" "0"
	"MinAnimTime" "5"
	"maxdxlevel" "0"
	"MaxAnimTime" "10"
	"health" "0"
	"fadescale" "1"
	"fademindist" "-1"
	"fademaxdist" "0"
	"ExplodeRadius" "0"
	"ExplodeDamage" "0"
	"disableshadows" "1"
	"disablereceiveshadows" "1"
	"DisableBoneFollowers" "1"
	"angles" "0 0 0"
	"classname" "prop_dynamic_override"
}
add:
{
	"origin" "-13093 13728 -9344"
	"solid" "6"
	"skin" "0"
	"SetBodyGroup" "0"
	"rendermode" "0"
	"renderfx" "0"
	"rendercolor" "255 255 255"
	"renderamt" "255"
	"RandomAnimation" "0"
	"pressuredelay" "0"
	"PerformanceMode" "0"
	"model" "models/props/cs_assault/barrelwarning.mdl"
	"mindxlevel" "0"
	"MinAnimTime" "5"
	"maxdxlevel" "0"
	"MaxAnimTime" "10"
	"health" "0"
	"fadescale" "1"
	"fademindist" "-1"
	"fademaxdist" "0"
	"ExplodeRadius" "0"
	"ExplodeDamage" "0"
	"disableshadows" "1"
	"disablereceiveshadows" "1"
	"DisableBoneFollowers" "1"
	"angles" "0 0 0"
	"classname" "prop_dynamic_override"
}
add:
{
	"origin" "-13169 13728 -9344"
	"solid" "6"
	"skin" "0"
	"SetBodyGroup" "0"
	"rendermode" "0"
	"renderfx" "0"
	"rendercolor" "255 255 255"
	"renderamt" "255"
	"RandomAnimation" "0"
	"pressuredelay" "0"
	"PerformanceMode" "0"
	"model" "models/props/cs_assault/barrelwarning.mdl"
	"mindxlevel" "0"
	"MinAnimTime" "5"
	"maxdxlevel" "0"
	"MaxAnimTime" "10"
	"health" "0"
	"fadescale" "1"
	"fademindist" "-1"
	"fademaxdist" "0"
	"ExplodeRadius" "0"
	"ExplodeDamage" "0"
	"disableshadows" "1"
	"disablereceiveshadows" "1"
	"DisableBoneFollowers" "1"
	"angles" "0 0 0"
	"classname" "prop_dynamic_override"
}

;; stage 2 - disable boss attacks on death

modify:
{
	match:
	{
		"targetname" "base_boss_sys_counter_hp"
		"classname" "math_counter"
	}
	insert:
	{
		"OnHitMin" "base_boss_electrictrigg2,Kill,,0,1"
		"OnHitMin" "base_boss_electrictrigg1,Kill,,0,1"
		"OnHitMin" "base_boss_firetrigg1,Kill,,0,1"
		"OnHitMin" "base_boss_firetrigg2,Kill,,0,1"
		"OnHitMin" "base_boss_windpush,Kill,,0,1"
	}
}

;; stage 1 - spawn afk teleport

modify:
{
	match:
	{
		"targetname" "start_trigg"
		"classname" "trigger_once"
	}
	insert:
	{
		"OnStartTouch" "stage3_afktp,AddOutput,target start_teledestzombie,14.5,1"
		"OnStartTouch" "stage3_afktp,Enable,,15,1"
	}
}

;; prevent players from blocking doors

modify:
{
	match:
	{
		"targetname" "/[a-z]_enddoor\d?/"
		"classname" "func_movelinear"
	}
	replace:
	{
		"blockdamage" "1000"
	}
}

;; fix spawnpoint origin

modify:
{
	match:
	{
		"origin" "10874 -9697 -2599"
		"classname" "info_player_counterterrorist"
		"hammerid" "817085"
	}
	replace:
	{
		"origin" "10876 -10058 -2599"
	}
}

;; stage 2 - bossfight afk teleport

add:
{
	"targetname" "stage2_bosstele"
	"target" "base_spawntele1_dest"
	"StartDisabled" "1"
	"spawnflags" "1"
	"origin" "7232.5 8337.5 -312.5"
	"classname" "trigger_teleport"
	"OnUser1" "!self,AddOutput,solid 2,0,1"
	"OnUser1" "!self,AddOutput,mins -2511.5 -1517.5 -1206.5,0.1,1"
	"OnUser1" "!self,AddOutput,maxs 2511.5 1517.5 1206.5,0.1,1"
}

modify:
{
	match:
	{
		"classname" "logic_auto"
		"hammerid" "816608"
	}
	insert:
	{
		"OnMapSpawn" "stage2_bosstele,FireUser1,,0,-1"
	}
}
modify:
{
	match:
	{
		"targetname" "boss_door01"
		"classname" "func_movelinear"
	}
	insert:
	{
		"OnFullyOpen" "base_spawntele1,Kill,,0,1"
		"OnFullyOpen" "base_spawntele1_dest,AddOutput,origin 10215 8651 -468,0.5,1"
		"OnFullyOpen" "stage3_afktp,AddOutput,target base_spawntele1_dest,0.6,1"
		"OnFullyOpen" "stage2_bosstele,Enable,,1,1"
		"OnFullyOpen" "stage3_afktp,Enable,,1,1"
	}
}

;; stage 2 - close hangar door on afk teleport

modify:
{
	match:
	{
		"targetname" "base_bossbutton01"
		"classname" "func_button"
	}
	insert:
	{
		"OnPressed" "base_hangerdoor04a,Close,,5,1"
		"OnPressed" "base_hangerdoor04b,Close,,5,1"
	}
}
modify:
{
	match:
	{
		"targetname" "/base_hangerdoor04[a,b]/"
		"classname" "func_movelinear"
	}
	replace:
	{
		"blockdamage" "1000"
	}
}


