;StageDisplay
add:
{
	"origin" "-356 752 8"
	"targetname" "TheCurrentLevelPlugin"
	"min" "1"
	"max" "4"
	"startvalue" "1"
	"classname" "math_counter"
}

modify:
{
	match:
	{
		"targetname" "relay_easy_start"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "TheCurrentLevelPlugin,SetValue,1,0,1"
	}
}
modify:
{
	match:
	{
		"targetname" "relay_hard_start"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "TheCurrentLevelPlugin,SetValue,2,0,1"
	}
}
modify:
{
	match:
	{
		"targetname" "relay_extreme_start"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "TheCurrentLevelPlugin,SetValue,3,0,1"
	}
}
modify:
{
	match:
	{
		"targetname" "relay_zm_start"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "TheCurrentLevelPlugin,SetValue,4,0,1"
	}
}

;Buff Bosses Stage 3
modify:
{
	match:
	{
		"classname"		"trigger_multiple"
		"targetname"	"Proto_filter_health"
	}
	delete:
	{
		"OnStartTouch"	"Prototype_health,Add,100,0,-1"
	}
	insert:
	{
		"OnStartTouch"	"Prototype_health,Add,200,0,-1"
	}
}

;Make the last prototype HP scaling on number of humans
;add:
;{
;	"model"			"*269"
;	"classname"		"trigger_multiple"
;	"targetname"	"final_proto_addhealth"
;	"origin"		"2688 10652 -832"
;	"spawnflags"	"1"
;	"StartDisabled"	"1"
;	"wait"			"1"
;	"filtername"		"ct_filter"
;	"OnStartTouch"	"stop_if_zombies_make_it,AddHealth,300,0,-1"
;}
;
;modify:
;{
;	match:
;	{
;		"classname"		"trigger_once"
;		"hammerid"		"696047"
;	}
;	insert:
;	{
;		"OnStartTouch"	"final_proto_addhealth,Enable,,0,1"
;	}
;}


;------------------------------------------------
;------Stripper sent by encapsulation_dot1q------
;------------------------------------------------
modify:
{
	match:
	{
		"classname" "prop_dynamic"
		"hammerid" "564307"
		"model" "models/props/de_train/utility_truck.mdl"
	}
	replace:
	{
		"solid" "0"
		"origin" "2872 5280 -459.672"
	}
}
 
modify:
{
	match:
	{
		"classname" "prop_dynamic"
		"hammerid" "564319"
		"model" "models/props/de_train/utility_truck_windows.mdl"
	}
	replace:
	{
		"solid" "0"
		"origin" "2872 5280 -459.672"
	}
}
 
modify:
{
	match:
	{
		"classname" "prop_dynamic"
		"hammerid" "564350"
		"model" "models/props/de_train/utility_truck.mdl"
	}
	replace:
	{
		"solid" "0"
		"origin" "2872 5408 -459.672"
	}
}
 
modify:
{
	match:
	{
		"classname" "prop_dynamic"
		"hammerid" "564354"
		"model" "models/props/de_train/utility_truck_windows.mdl"
	}
	replace:
	{
		"solid" "0"
		"origin" "2872 5408 -459.672"
	}
}
 
modify:
{
	match:
	{
		"classname" "func_tracktrain"
		"hammerid" "564613"
		"targetname" "Escape_trucks"
	}
	replace:
	{
		"origin" "2872 5344 -434"
		"orientationtype" "3"
	}
}
;; stage 1 - fix early nuke glitch
 
modify:
{
	match:
	{
		"targetname" "Endgame_01"
		"classname" "trigger_once"
	}
	delete:
	{
		"OnStartTouch" "Nuke,Enable,,0,1"
	}
	insert:
	{
		"OnStartTouch" "Nuke,Enable,,3,1"
	}
}

;stripper by encap

;; increase nuke damage
 
modify:
{
	match:
	{
		"targetname" "Nuke"
		"classname" "trigger_hurt"
	}
	replace:
	{
		"damage" "100000"
	}
}
modify:
{
	match:
	{
		"targetname" "Nuke2"
		"classname" "trigger_hurt"
	}
	replace:
	{
		"damage" "100000"
	}
}
;; fix afk teleport/nuke evading spots
 
add:
{
	"model" "*207"
	"targetname" "Bigtele_hard"
	"target" "Level_2_afk_telepoint"
	"StartDisabled" "1"
	"spawnflags" "1"
	"origin" "8272 1680 -1954"
	"classname" "trigger_teleport"
}
add:
{
	"model" "*326"
	"targetname" "Bigtele_hard"
	"target" "Level_2_afk_telepoint"
	"StartDisabled" "1"
	"spawnflags" "1"
	"origin" "9180 1775 -1856"
	"classname" "trigger_teleport"
}
add:
{
	"model" "*326"
	"targetname" "Bigtele_hard"
	"target" "Level_2_afk_telepoint"
	"StartDisabled" "1"
	"spawnflags" "1"
	"origin" "9180 2481 -1856"
	"classname" "trigger_teleport"
}
add:
{
	"model" "*97"
	"targetname" "z_takingtoolong"
	"target" "space_telepoint"
	"StartDisabled" "1"
	"spawnflags" "1"
	"origin" "13312 2496 -1920"
	"classname" "trigger_teleport"
}
add:
{
	"model" "*207"
	"targetname" "AFK_extreme_tele"
	"target" "AFK_extreme"
	"StartDisabled" "1"
	"spawnflags" "1"
	"origin" "1983 6001 -126"
	"classname" "trigger_teleport"
}

;; stage 1 - bosshp push only for humans

modify:
{
	match:
	{
		"targetname" "ZM_disable1"
		"classname" "trigger_push"
	}
	replace:
	{
		"speed" "400"
	}
	insert:
	{
		"filtername" "ct_filter"
	}
}

;; stage 2 - decrease speed of final zm push

modify:
{
	match:
	{
		"targetname" "Final_push"
		"classname" "trigger_push"
	}
	replace:
	{
		"speed" "400"
	}
}

;; stage 3 - last boss hp scaling rework

add:
{
	"model" "*279"
	"StartDisabled" "1"
	"spawnflags" "1"
	"targetname" "bosshp_last"
	"filtername" "ct_filter"
	"origin" "2688 9472 -444"
	"classname" "trigger_once"
	"OnStartTouch"	"stop_if_zombies_make_it,AddHealth,250,0,-1"
}
add:
{
	"model" "*269"
	"targetname" "Proto_push_down"
	"StartDisabled" "1"
	"speed" "2000"
	"spawnflags" "1"
	"pushdir" "90 0 0"
	"origin" "2688 10652 -832"
	"alternateticksfix" "0"
	"classname" "trigger_push"
}

modify:
{
	match:
	{
		"targetname" "Proto_push"
		"classname" "trigger_push"
	}
	replace:
	{
		"speed" "105"
	}
}
modify:
{
	match:
	{
		"targetname" "Prototype_health"
		"classname" "math_counter"
	}
	delete:
	{
		"OnHitMin" "Exit_prop,SetAnimation,Open,0,1"
		"OnHitMin" "Final_door,Open,,0,1"
		"OnHitMin" "Final_blocker,Toggle,,0,1"
	}
	insert:
	{
		"OnHitMin" "Exit_prop,SetAnimation,Open,5,1"
		"OnHitMin" "Final_door,Open,,5,1"
		"OnHitMin" "Final_blocker,Toggle,,5,1"
		"OnHitMin" "bosshp_last,Enable,,0,1"
		"OnHitMin" "Proto_push_down,Enable,,0,1"
	}
}
modify:
{
	match:
	{
		"targetname" "stop_if_zombies_make_it"
		"classname" "func_breakable"
	}
	insert:
	{
		"OnBreak" "Proto_push_down,Disable,,0,1"
	}
}

;; zm - fix nuke glitch spot

add:
{
	"model" "*184"
	"targetname" "Nuke2"
	"StartDisabled" "1"
	"spawnflags" "1"
	"origin" "7234 -2026 120"
	"filtername" "t_filter"
	"nodmgforce" "0"
	"damagetype" "0"
	"damagemodel" "0"
	"damagecap" "20"
	"damage" "100000"
	"classname" "trigger_hurt"
}


