;------------------------------------------------------------
; Keeps server updated with stripper version
;------------------------------------------------------------
modify:
{
	match:
	{
		"origin" "-10255.6 -15154 -456"
		"classname" "logic_auto"
	}
	insert:
	{
		"OnMapSpawn" "console,Command,say *** Stripper 8 loaded ***,7,-1"
	}
}

;--------------------------
; Prologue CHANGES/FIXES
;--------------------------
; Extends the zombie teleport from maradox into the mike room
modify:
{
	match:
	{
		"origin" "-12755 -6454 310.53"
		"classname" "trigger_once"
	}
	delete:
	{
		"OnStartTouch" "teleport_maradox_ending_zombie,Enable,,8,-1"
		"OnStartTouch" "console,Command,say < Zombies teleport in 8 seconds >,0,-1"
	}
	insert:
	{
		"OnStartTouch" "teleport_maradox_ending_zombie,Enable,,15,-1"
		"OnStartTouch" "console,Command,say < Zombies teleport in 15 seconds >,0,-1"
	}
}

; Removes useless feedback messages from maradox room
modify:
{
	match:
	{
		"targetname" "ending_push_zm"
		"origin" "10265.7 12830 -11056"
		"classname" "trigger_push"
	}
	delete:
	{
		"OnStartTouch" "console,Command,say < Barrier Breaks in 20s >,0,-1"
		"OnStartTouch" "ending_barrier,Break,,20,-1"
	}
}

; Removes the fade it blocks players view on the first jump
modify:
{
	match:
	{
		"targetname" "ending_trigger"
		"origin" "10201.7 12830 -11056"
		"classname" "trigger_once"
	}
	delete:
	{
		"OnStartTouch" "white_fade,Fade,,21,-1"
	}
}

; Decreases door timers on mikes room
modify:
{
	match:
	{
		"targetname" "button_1"
		"origin" "-14770.3 -3574 322.53"
		"classname" "func_button"
	}
	delete:
	{
		"OnPressed" "wall_1,break,,25,-1"
		"OnPressed" "console,Command,say < Defend for 25 seconds >,0,-1"
		"OnPressed" "mike_zm_tp_afk_1,Enable,,40,-1"
	}
	insert:
	{
		"OnPressed" "wall_1,break,,15,-1"
		"OnPressed" "console,Command,say < Defend for 15 seconds >,0,-1"
		"OnPressed" "mike_zm_tp_afk_1,Enable,,50,-1"
	}
}
modify:
{
	match:
	{
		"targetname" "button_2"
		"origin" "-10834.3 74 322.53"
		"classname" "func_button"
	}
	delete:
	{
		"OnPressed" "wall_2,break,,25,-1"
		"OnPressed" "console,Command,say < Defend for 25 seconds >,0,-1"
		"OnPressed" "mike_zm_tp_afk_2,Enable,,40,-1"
	}
	insert:
	{
		"OnPressed" "wall_2,break,,15,-1"
		"OnPressed" "console,Command,say < Defend for 15 seconds >,0,-1"
		"OnPressed" "mike_zm_tp_afk_2,Enable,,50,-1"
	}
}
modify:
{
	match:
	{
		"targetname" "button_3"
		"origin" "-13396.6 3335.73 320.73"
		"classname" "func_button"
	}
	delete:
	{
		"OnPressed" "wall_3,break,,25,-1"
		"OnPressed" "console,Command,say < Defend for 25 seconds >,0,-1"
		"OnPressed" "mike_zm_tp_afk_3,Enable,,40,-1"
	}
	insert:
	{
		"OnPressed" "wall_3,break,,15,-1"
		"OnPressed" "console,Command,say < Defend for 15 seconds >,0,-1"
		"OnPressed" "mike_zm_tp_afk_3,Enable,,50,-1"
	}
}
modify:
{
	match:
	{
		"targetname" "button_4"
		"origin" "-14674.3 8858 322.53"
		"classname" "func_button"
	}
	delete:
	{
		"OnPressed" "wall_4,Open,,25,-1"
		"OnPressed" "console,Command,say < Defend for 25 seconds >,0,-1"
		"OnPressed" "console,Command,say < > ITEMS ARE NOW LOCKED <>,30,-1"
		"OnPressed" "disable_all_zombie_items,Trigger,,25,-1"
		"OnPressed" "disable_all_human_items,Trigger,,25,-1"
		"OnPressed" "random_npc_spawner_timer,Disable,,25,1"
	}
	insert:
	{
		"OnPressed" "wall_4,Open,,15,-1"
		"OnPressed" "console,Command,say < Defend for 15 seconds >,0,-1"
		"OnPressed" "console,Command,say < > ITEMS ARE NOW LOCKED <>,20,-1"
		"OnPressed" "disable_all_zombie_items,Trigger,,15,-1"
		"OnPressed" "disable_all_human_items,Trigger,,15,-1"
		"OnPressed" "random_npc_spawner_timer,Disable,,15,1"
	}
}

; Moves the trigger_teleport from maradox room closer to the final door opening for faster transition
modify:
{
	match:
	{
		"targetname" "teleport_maradox_ending_human"
		"origin" "8064 12832 -10984"
		"classname" "trigger_teleport"
	}
	replace:
	{
		"origin" "9344 12832 -10984"
	}
}

; Fixes a message bug on maradoxs room
modify:
{
	match:
	{
		"targetname" "s1_gate_move"
		"origin" "14089.7 6846 -13632"
		"classname" "func_movelinear"
	}
	insert:
	{
		"OnFullyOpen" "maradox_relay_trigger_1,Kill,,0,-1"
	}
}

; Delays a teleporter at the push part of maradoxes room
modify:
{
	match:
	{
		"targetname" "s1_trigger_once_3"
		"origin" "11561.7 10142 -11776"
		"classname" "trigger_once"
	}
	delete:
	{
		"OnStartTouch" "platform_spawn_maker,ForceSpawn,,7,-1"
	}
	insert:
	{
		"OnStartTouch" "platform_spawn_maker,ForceSpawn,,14,-1"
	}
}

; Changes a gameplay on Uverins room so humans only can use the trigger_push that is spawned on that room
modify:
{
	match:
	{
		"targetname" "uverin_cybergrind_trampolinepush"
		"origin" "-2448 9504 10068"
		"classname" "trigger_push"
	}
	insert:
	{
		"filtername" "MapFilterCT"
	}
}

; Reduces hp on the zombies during the ending of Uverins room
modify:
{
	match:
	{
		"targetname" "uverin_hpgive"
		"origin" "-2384 9440 9776"
		"classname" "trigger_multiple"
	}
	delete:
	{
		"OnStartTouch" "!activator,AddOutput,health 1000,0.01,-1"
		"OnEndTouch" "!activator,AddOutput,health 1000,0,-1"
	}
	insert:
	{
		"OnStartTouch" "!activator,AddOutput,health 100,0.01,-1"
		"OnEndTouch" "!activator,AddOutput,health 100,0,-1"
	}
}

; Makes a fix so zombies are not infinitely teleported down to round 2 on uverins room
modify:
{
	match:
	{
		"origin" "-3151.3 10272 9968"
		"targetname" "uverin_cybergrind_layoutcase"
		"classname" "logic_case"
	}
	delete:
	{
		"OnCase02" "uverin_TELEPORT*,AddOutput,target uverin_destination_to_cyber_layout2,0,-1"
		"OnCase01" "uverin_TELEPORT*,AddOutput,target uverin_destination_to_cyber_layout1,0,-1"
	}
}

; Adjusts uverins math_counter
modify:
{
	match:
	{
		"origin" "-3663.3 8160 10800"
		"targetname" "uverin_zmcheckercounter"
		"classname" "math_counter"
	}
	replace:
	{
		"startvalue" "1"
		"min" "1"
		"max" "4"
	}
}

; Fixing Uverin zombie detetection system
add:
{
	"origin" "-2384 9441 9876"
	"targetname" "uverin_zmchecker_touchtest"
	"StartDisabled" "1"
	"spawnflags" "0"
	"RefireTime" "0.2"
	"classname" "logic_timer"
	"OnTimer" "uverin_zmchecker,TouchTest,,0,-1"
	"OnTimer" "uverin_zmchecker2,TouchTest,,0,-1"
}
add:
{
	"origin" "-2384 9441 9826"
	"targetname" "uverin_zmchecker_layout"
	"StartDisabled" "1"
	"spawnflags" "0"
	"angles" "0 0 0"
	"classname" "logic_relay"
	"OnTrigger" "uverin_zmcheckercounter,FireUser1,,0,1"
	"OnTrigger" "!self,Kill,,0,1"
}
add:
{
	"origin" "-2384 9441 9806"
	"targetname" "uverin_zmchecker_layout2"
	"StartDisabled" "1"
	"spawnflags" "0"
	"angles" "0 0 0"
	"classname" "logic_relay"
	"OnTrigger" "uverin_zmcheckercounter,FireUser1,,0,1"
	"OnTrigger" "!self,Kill,,0,1"
}
add:
{
	"model" "*569"
	"wait" "1"
	"targetname" "uverin_zmchecker2"
	"StartDisabled" "1"
	"spawnflags" "1"
	"origin" "-2384 9441 9856"
	"filtername" "MapFilterT"
	"classname" "trigger_multiple"
	"OnNotTouching" "!self,Kill,,0,-1"
	"OnNotTouching" "uverin_zmchecker_layout2,Trigger,,0.01,1"
	"OnNotTouching" "uverin_zmchecker_touchtest,Disable,,0,-1"
}
modify:
{
	match:
	{
		"targetname" "uverin_zmchecker"
		"classname" "trigger_multiple"
	}
	delete:
	{
		"OnEndTouchAll" "uverin_human_checker_template,ForceSpawn,,0,-1"
		"OnEndTouchAll" "!self,Disable,,0.01,-1"
	}
	insert:
	{
		"OnNotTouching" "!self,Kill,,0,-1"
		"OnNotTouching" "uverin_zmchecker_layout,Trigger,,0.01,1"
		"OnNotTouching" "uverin_zmchecker_touchtest,Disable,,0,-1"
	}
}
modify:
{
	match:
	{
		"targetname" "uverin_cybergrind_layoutcase"
		"classname" "logic_case"
	}
	insert:
	{
		"OnCase01" "uverin_zmchecker_layout,Enable,,6,-1"
		"OnCase01" "uverin_zmchecker,Enable,,6.01,-1"
		"OnCase01" "uverin_zmchecker_touchtest,Enable,,6.01,-1"
		"OnCase02" "uverin_zmchecker_layout2,Enable,,3,-1"
		"OnCase02" "uverin_zmchecker2,Enable,,3.01,-1"
		"OnCase02" "uverin_zmchecker_touchtest,Enable,,3.01,-1"
	}
}
modify:
{
	match:
	{
		"targetname" "uverin_start"
		"classname" "trigger_once"
	}
	delete:
	{
		"OnStartTouch" "uverin_zmchecker,Enable,,16.9,1"
	}
}
modify:
{
	match:
	{
		"targetname" "uverin_zmcheckercounter"
		"classname" "math_counter"
	}
	insert:
	{
		"OnHitMax" "uverin_zmchecker_touchtest,Kill,,0,-1"
	}
}

;--------------------------
; Stage 1 CHANGES/FIXES
;--------------------------
; Removes a few laser NPC spawns from the boat part on hobgoblins room 
modify:
{
	match:
	{
		"origin" "-10576 -14808 -456"
		"targetname" "hobgoblin_npc_relay"
		"classname" "logic_relay"
	}
	delete:
	{
		"OnTrigger" "Temp_NPC_Special,AddOutput,origin 41.59 -6419.12 -5831.38,5,1"
		"OnTrigger" "Temp_NPC_Special,ForceSpawn,,46.5,1"
		"OnTrigger" "Temp_NPC_Special,AddOutput,origin 76.96 -5692.74 -5947.52,22,1"
		"OnTrigger" "Temp_NPC_Special,ForceSpawn,,22.5,1"
		"OnTrigger" "Temp_NPC_Special,AddOutput,origin -79.57 -5881.23 -5623.38,20,1"
		"OnTrigger" "Temp_NPC_Special,ForceSpawn,,20.5,1"
		"OnTrigger" "Temp_NPC_Special,AddOutput,origin 254.94 -5772.39 -5255.38,6,1"
		"OnTrigger" "Temp_NPC_Special,ForceSpawn,,6.5,1"
		"OnTrigger" "Temp_NPC_Special,ForceSpawn,,45.5,1"
		"OnTrigger" "Temp_NPC_Special,AddOutput,origin 76.96 -5692.74 -5947.52,45,1"
		"OnTrigger" "Temp_NPC_Special,ForceSpawn,,5.5,1"
		"OnTrigger" "Temp_NPC_Special,AddOutput,origin 41.59 -6419.12 -5831.38,46,1"
	}
	insert:
	{
		"OnTrigger" "Temp_NPC_Special,AddOutput,origin 41.59 -6419.12 -5831.38,15,1"
		"OnTrigger" "Temp_NPC_Special,ForceSpawn,,15.5,1"
		"OnTrigger" "Temp_NPC_Special,AddOutput,origin 254.94 -5772.39 -5255.38,30,1"
		"OnTrigger" "Temp_NPC_Special,ForceSpawn,,30.5,1"
		"OnTrigger" "Temp_NPC_Special,AddOutput,origin -79.57 -5881.23 -5623.38,40,1"
		"OnTrigger" "Temp_NPC_Special,ForceSpawn,,40.5,1"
	}
}

; Adds more teleporters in 4echos room to prevent people from making user errors when they hug the back of the rocks
add:
{
	"model" "*552"
	"targetname" "4e_teleport_exit"
	"target" "destination_pasas"
	"StartDisabled" "1"
	"spawnflags" "1"
	"origin" "-4727 -10473 2765.53"
	"filtername" "MapFilterCT"
	"classname" "trigger_teleport"
}
add:
{
	"model" "*552"
	"targetname" "4e_teleport_exit"
	"target" "destination_pasas"
	"StartDisabled" "1"
	"spawnflags" "1"
	"origin" "-4619 -10390 2765.53"
	"filtername" "MapFilterCT"
	"classname" "trigger_teleport"
}
add:
{
	"model" "*552"
	"targetname" "4e_teleport_exit"
	"target" "destination_pasas"
	"StartDisabled" "1"
	"spawnflags" "1"
	"origin" "-4424 -10427 2765.53"
	"filtername" "MapFilterCT"
	"classname" "trigger_teleport"
}

; Fixes heavys room with multiple issues
modify:
{
	match:
	{
		"origin" "-11936 -13947 6864"
		"classname" "func_breakable"
	}
	delete:
	{
		"OnBreak" "heavy_tp_trig1,Enable,,5,1"
		"OnBreak" "console,Command,say >ZM TP IN 5s<,5,1"
		"OnBreak" "heavy_fac_dorr,Close,,5,1"
	}
	insert:
	{
		"OnBreak" "heavy_tp_trig1,Enable,,15,1"
		"OnBreak" "console,Command,say >ZM TP IN 10s<,5,1"
		"OnBreak" "heavy_fac_dorr,Close,,15,1"
	}
}
modify:
{
	match:
	{
		"targetname" "heavy_box2"
		"origin" "-11129.1 -12868.1 7168"
		"classname" "func_breakable"
	}
	delete:
	{
		"OnBreak" "console,Command,say >ZM TP IN 15s<,0,1"
		"OnBreak" "heavy_tp_trig3,Enable,,15,1"
	}
}
filter:
{
	"targetname" "heavy_tp_trig3"
	"origin" "-11624 -13475 7280"
	"classname" "trigger_teleport"
}

; Removes the teleport trigger from this trigger and places it onto the elevator because of the spiral item
modify:
{
	match:
	{
		"targetname" "bridge_xd"
		"origin" "-12392 -13315 7248"
		"classname" "trigger_once"
	}
	delete:
	{
		"OnStartTouch" "heavy_tp_trig2,Enable,,5,1"
		"OnStartTouch" "console,Command,say >ZM TP IN 5s<,0.7,1"
	}
}
modify:
{
	match:
	{
		"targetname" "heavy_elev"
		"origin" "-12272 -12811 6800"
		"classname" "func_door"
	}
	replace:
	{
		"forceclosed" "1"
		"wait" "-1"
	}
	insert:
	{
		"OnFullyOpen" "heavy_tp_trig2,Enable,,15,1"
		"OnFullyOpen" "console,Command,say >ZM TP IN 15s<,0,1"
	}
}

; Removes a feature from Heavys room where zombies are sped up at the truck part & fixes other issues
filter:
{
	"targetname" "heavy_zm_speeder"
	"origin" "-9272 -14267 7144"
	"classname" "trigger_multiple"
}
modify:
{
	match:
	{
		"origin" "-10552 -14307 6856"
		"classname" "trigger_once"
	}
	delete:
	{
		"OnStartTouch" "heavy_zm_speeder,Enable,,65.7,1"
		"OnStartTouch" "console,Command,say ZM SPEED SET TO 1.2,65.7,1"
		"OnStartTouch" "heavy_tp_trig4,Enable,,25,1"
		"OnStartTouch" "console,Command,say >ZM TP IN 10s<,15,1"
	}
	insert:
	{
		"OnStartTouch" "heavy_tp_trig4,Enable,,35,1"
		"OnStartTouch" "console,Command,say >ZM TP IN 10s<,25,1"
	}
}


; Massively reduces fireball damage on chartas room 40 < 15
modify:
{
	match:
	{
		"targetname" "laser_hurt"
		"origin" "-7175 -4416 1283.09"
		"classname" "trigger_hurt"
	}
	replace:
	{
		"damagecap" "99999"
		"damage" "15"
	}
}

; Fixes malgos detection system for how many humans are left to get transported
modify:
{
	match:
	{
		"origin" "2343.71 -14115 -1553"
		"targetname" "concert_start_relay"
		"classname" "logic_relay"
	}
	delete:
	{
		"OnTrigger" "concert_player_counter,Disable,,0.03,-1"
		"OnTrigger" "concert_player_counter,Enable,,0.04,-1"
	}
	insert:
	{
		"OnTrigger" "concert_player_counter,Disable,,1,-1"
		"OnTrigger" "concert_player_counter,Enable,,2,-1"
	}
}

; Reduces the amount of time you have to hold the final door when all humans are in for malgos room
modify:
{
	match:
	{
		"origin" "2331.7 -14134 -1553"
		"targetname" "concert_allIN_relay"
		"classname" "logic_relay"
	}
	delete:
	{
		"OnTrigger" "concert_door_002,Open,,20,-1"
		"OnTrigger" "console,Command,say **The Gate will open in 14 seconds!**,6,-1"
		"OnTrigger" "concert_door_001,Kill,,4,-1"
		"OnTrigger" "console,Command,say **Now Zombies Can Cross the barricade!**,4,-1"
		"OnTrigger" "concert_wall,Kill,,4,-1"
		"OnTrigger" "concert_break,Break,,4,-1"
	}
	insert:
	{
		"OnTrigger" "concert_door_002,Open,,14,-1"
		"OnTrigger" "console,Command,say **The Gate will open in 10 seconds!**,6,-1"
		"OnTrigger" "console,Command,say **Now Zombies Can Cross the barricade!**,4,-1"
		"OnTrigger" "concert_wall,Kill,,5,-1"
		"OnTrigger" "concert_break,Break,,5,-1"
		"OnTrigger" "concert_door_001,Kill,,5,-1"
	}
}

;--------------------------
; Stage 2 CHANGES/FIXES
;--------------------------
; Removes existing NPC locations that I forgot to remove
filter:
{
	"targetname" "dsv_npc_location"
	"classname" "func_breakable"
}
filter:
{
	"targetname" "andrew_npc_location"
	"classname" "func_breakable"
}

; Massive teleport changes to fucksys room
modify:
{
	match:
	{
		"origin" "2952.71 -8997.54 -13900"
		"targetname" "f4_zm_des1"
		"classname" "info_teleport_destination"
	}
	replace:
	{
		"origin" "2953 -9613 -13864"
	}
}
modify:
{
	match:
	{
		"targetname" "f4_house"
		"origin" "3024 -8532 -13863"
		"classname" "trigger_once"
	}
	delete:
	{
		"OnStartTouch" "f4_trig1,Enable,,5,1"
	}
	insert:
	{
		"OnStartTouch" "f4_trig1,Enable,,15,1"
	}
}
modify:
{
	match:
	{
		"targetname" "f4_insidehouse"
		"origin" "3136 -6848 -13467.4"
		"classname" "trigger_once"
	}
	delete:
	{
		"OnStartTouch" "f4_trig2,Enable,,5,1"
	}
	insert:
	{
		"OnStartTouch" "f4_trig2,Enable,,15,1"
	}
}

; Fixes a cleanup relay on hobbitten room that kills the afk teleports
modify:
{
	match:
	{
		"origin" "-10640 -14944 -456"
		"targetname" "hobbitten_cleanup_relay"
		"classname" "logic_relay"
	}
	delete:
	{
		"OnTrigger" "dragon_finish_teleport,Kill,,5,-1"
		"OnTrigger" "dragon_finish_zombie_teleport,Kill,,5,-1"
	}
}

; Delays the cage opening by 5 seconds on dsvdsvd room
modify:
{
	match:
	{
		"origin" "11840.7 6968 3697"
		"targetname" "MSom_ending_relay"
		"classname" "logic_relay"
	}
	delete:
	{
		"OnTrigger" "MSom_jail_grate,Break,,12,1"
		"OnTrigger" "console,Command,say Zombies released in 5 sec,7,1"
	}
	insert:
	{
		"OnTrigger" "MSom_jail_grate,Break,,17,1"
		"OnTrigger" "console,Command,say Zombies released in 10 sec,7,1"
	}
}

; Increases human speed slightly from 0.325 to 0.5 in dsv room
modify:
{
	match:
	{
		"targetname" "MSom_drugged_slow_CT"
		"origin" "11840 7112 3792"
		"classname" "trigger_multiple"
	}
	delete:
	{
		"OnStartTouch" "speed,ModifySpeed,0.325,0,-1"
	}
	insert:
	{
		"OnStartTouch" "speed,ModifySpeed,0.5,0,-1"
	}
}

; Reworks how the teleporters work in dsvs room from progression incase someone uses the shortcut and skips the first log trigger
modify:
{
	match:
	{
		"targetname" "MSom_town_trigger"
		"origin" "9920 6072 3936"
		"classname" "trigger_once"
	}
	insert:
	{
		"OnStartTouch" "MSom_forest_treeblock,Break,,5,1"
	}
}
modify:
{
	match:
	{
		"targetname" "dsvdsv_trigger"
		"origin" "10688 4600 3728"
		"classname" "trigger_once"
	}
	delete:
	{
		"OnStartTouch" "console,Command,say AFK Teleport in 10 sec,2,1"
		"OnStartTouch" "MSom_TP1_forest_ALL,Enable,,12,1"
	}
	insert:
	{
		"OnStartTouch" "console,Command,say AFK Teleport in 10 sec,6,1"
		"OnStartTouch" "MSom_TP1_forest_ALL,Enable,,16,1"
	}
}

; Increases HP of the boxes appearing inside the small room on lardys room
modify:
{
	match:
	{
		"targetname" "1_room"
		"origin" "-12731.3 -2560.19 3552"
		"classname" "func_breakable"
	}
	replace:
	{
		"health" "150"
	}
}
modify:
{
	match:
	{
		"targetname" "5_room"
		"origin" "-12667.3 -2560.19 3552"
		"classname" "func_breakable"
	}
	replace:
	{
		"health" "250"
	}
}

; Disables Human, Zombie and NPC spawning when this trigger is touched for lardys room
modify:
{
	match:
	{
		"targetname" "lardy_trigger_2"
		"origin" "-11676 -1744.19 3816"
		"classname" "trigger_once"
	}
	insert:
	{
		"OnStartTouch" "random_npc_spawner_timer,Disable,,10,-1"
		"OnStartTouch" "disable_all_zombie_items_timer,Enable,,10,-1"
		"OnStartTouch" "disable_all_human_items_timer,Enable,,10,-1"
		"OnStartTouch" "console,Command,say <> ITEMS ARE NOW LOCKED <>,10,1"
	}
}
; Enables Human, Zombie and NPC spawning when this trigger is touched for lardys room
modify:
{
	match:
	{
		"targetname" "door_final"
		"origin" "-14203.3 -3284.19 3624"
		"classname" "func_movelinear"
	}
	insert:
	{
		"OnFullyClosed" "random_npc_spawner_timer,Enable,,14,-1"
		"OnFullyClosed" "enable_all_zombie_items,Trigger,,8,-1"
		"OnFullyClosed" "enable_all_human_items,Trigger,,8,-1"
		"OnFullyClosed" "console,Command,say <> ITEMS ARE NOW UNLOCKED <>,8,1"
	}
}

; Reduces all holds on Fucksy rooom by 10 seconds
modify:
{
	match:
	{
		"targetname" "f4_fence"
		"origin" "2992 -9992 -13912"
		"classname" "trigger_once"
	}
	delete:
	{
		"OnStartTouch" "console,Command,say *** 30 *** ,0,1"
		"OnStartTouch" "f4_gate1,Break,,30,1"
		"OnStartTouch" "console,Command,say *** 30 *** ,1,1"
		"OnStartTouch" "console,Command,say *** 30 *** ,2,1"
	}
	insert:
	{
		"OnStartTouch" "console,Command,say *** FENCE BREAKS IN 20 SEC *** ,0,1"
		"OnStartTouch" "f4_gate1,Break,,20,1"
	}
}
modify:
{
	match:
	{
		"targetname" "f4_house"
		"origin" "3024 -8532 -13863"
		"classname" "trigger_once"
	}
	delete:
	{
		"OnStartTouch" "console,Command,say *** 30 sec ***,1,1"
		"OnStartTouch" "f4_human_door,Break,,32,1"
		"OnStartTouch" "console,Command,say *** 30 sec ***,2,1"
		"OnStartTouch" "console,Command,say *** 30 sec ***,3,1"
	}
	insert:
	{
		"OnStartTouch" "console,Command,say *** WINDOW BREAKS IN 20 sec ***,0,1"
		"OnStartTouch" "f4_human_door,Break,,20,1"
	}
}
modify:
{
	match:
	{
		"targetname" "f4_insidehouse"
		"origin" "3136 -6848 -13467.4"
		"classname" "trigger_once"
	}
	delete:
	{
		"OnStartTouch" "console,Command,say *** 30 ***,0,1"
		"OnStartTouch" "f4_rock_door,Break,,31,1"
		"OnStartTouch" "console,Command,say *** 30 ***,1,1"
		"OnStartTouch" "console,Command,say *** 30 ***,2,1"
	}
	insert:
	{
		"OnStartTouch" "console,Command,say *** WALL BREAKS IN 20 ***,0,1"
		"OnStartTouch" "f4_rock_door,Break,,20,1"
	}
}
modify:
{
	match:
	{
		"targetname" "f4_house2"
		"origin" "3072 -5344 -13452"
		"classname" "trigger_once"
	}
	delete:
	{
		"OnStartTouch" "console,Command,say *** 30 ***,0,1"
		"OnStartTouch" "f4_human_last_ele,Open,,30,1"
		"OnStartTouch" "console,Command,say *** 5 ***,25,1"
		"OnStartTouch" "console,Command,say *** 30 ***,1,1"
		"OnStartTouch" "console,Command,say *** 30 ***,2,1"
	}
	insert:
	{
		"OnStartTouch" "f4_human_last_ele,Open,,20,1"
		"OnStartTouch" "console,Command,say *** ELEVATOR GOES UP IN 20 ***,0,1"
		"OnStartTouch" "console,Command,say *** ELEVATOR IS GOING UP ***,20,1"
		"OnStartTouch" "console,Command,say *** STAY ON ELEVATOR DO NOT JUMP ***,25,1"
	}
}

; Makes a safe trigger if items were not enabled again after Xehanorts room
modify:
{
	match:
	{
		"origin" "-9509.3 -9769 -1944"
		"targetname" "xehanort_greencounter_compare"
		"classname" "logic_compare"
	}
	delete:
	{
		"OnEqualTo" "console,Command,say *** TELEPORTING AWAY IN 3 SECONDS ***,5,-1"
		"OnEqualTo" "xehanort_puzzlewin_tpct,Enable,,8,-1"
		"OnEqualTo" "xehanort_puzzlewin_tpzm,Enable,,15,-1"
		"OnEqualTo" "xeha_cleanup_relay,Trigger,,15,-1"
		"OnEqualTo" "console,Command,say < > ITEMS ARE NOW UNLOCKED <>,8,1"
	}
	insert:
	{
		"OnEqualTo" "console,Command,say *** TELEPORTING AWAY IN 8 SECONDS ***,5,-1"
		"OnEqualTo" "xehanort_puzzlewin_tpct,Enable,,13,-1"
		"OnEqualTo" "xehanort_puzzlewin_tpzm,Enable,,20,-1"
		"OnEqualTo" "xeha_cleanup_relay,Trigger,,25,-1"
		"OnEqualTo" "console,Command,say <> ITEMS ARE NOW UNLOCKED <>,18,-1"
		"OnEqualTo" "enable_all_human_items,Trigger,,8,-1"
		"OnEqualTo" "enable_all_zombie_items,Trigger,,8,-1"
	}
}

; The puzzle part on Vndrew/Andrew will get a 30 seconds automation solve to kill the trigger_teleports 
add:
{
	"model" "*272"
	"targetname" "Andrew_auto_solve"
	"StartDisabled" "0"
	"spawnflags" "1"
	"origin" "5348.5 -1851 675"
	"filtername" "MapFilterCT"
	"classname" "trigger_once"
	"OnStartTouch" "puzzle_teleportering,Kill,,35,1"
	"OnStartTouch" "console,Command,say Disabling puzzle teleporters in 30 seconds,5,1"
}

; Removes specific things on the trigger from start of andrews room onto the trigger_push you doorhug at
modify:
{
	match:
	{
		"targetname" "Start_trigger"
		"origin" "-643 -2549 360.5"
		"classname" "trigger_once"
	}
	delete:
	{
		"OnStartTouch" "zm_teleport1,Enable,,45,1"
		"OnStartTouch" "push1,Kill,,37,1"
		"OnStartTouch" "particle_push1_sound,PlaySound,,37,1"
		"OnStartTouch" "push_particle1,Kill,,37,1"
	}
}

; Adds feedback messages on Andrew room part as it is hard to tell when the door is open / push clears
modify:
{
	match:
	{
		"targetname" "push1"
		"origin" "-706 -577 726"
		"classname" "trigger_push"
	}
	insert:
	{
		"OnStartTouch" "zm_teleport1,Enable,,45,1"
		"OnStartTouch" "push1,Kill,,45,1"
		"OnStartTouch" "console,Command,say WALL CLEARS IN 25 SECONDS,0,1"
		"OnStartTouch" "push1,Disable,,25,1"
		"OnStartTouch" "push_particle1,Kill,,25,1"
		"OnStartTouch" "particle_push1_sound,PlaySound,,25,1"
	}
}
modify:
{
	match:
	{
		"targetname" "push2"
		"origin" "2708.5 1026 653"
		"classname" "trigger_push"
	}
	insert:
	{
		"OnStartTouch" "console,Command,say WALL CLEARS IN 25 SECONDS,0,1"
	}
}

; Adds a invisible breakable on pasas stage because of a prop_static that blocks peoples jump
add:
{
	"model" "*349"
	"targetname" "pasas_prop_safe_break"
	"spawnobject" "0"
	"spawnflags" "1"
	"rendermode" "0"
	"renderfx" "0"
	"rendercolor" "255 255 255"
	"renderamt" "255"
	"propdata" "0"
	"pressuredelay" "0"
	"physdamagescale" "1.0"
	"PerformanceMode" "0"
	"origin" "-1872.09 6513.72 -8717.61"
	"nodamageforces" "0"
	"minhealthdmg" "0"
	"material" "8"
	"health" "0"
	"gibdir" "0 0 0"
	"explosion" "0"
	"ExplodeRadius" "0"
	"explodemagnitude" "0"
	"ExplodeDamage" "0"
	"disableshadows" "0"
	"disablereceiveshadows" "0"
	"classname" "func_breakable"
}

; Reduces the damage done by nutwoomys balls so they are no longer insta kill
modify:
{
	match:
	{
		"targetname" "rxa_hurt"
		"origin" "-15815 2142 -13185.6"
		"classname" "trigger_hurt"
	}
	replace:
	{
		"damagecap" "80"
		"damage" "80"
	}
}



;--------------------------
; NPC GUARD CHANGES
;--------------------------
; Reduces damage dealt from the npc
modify:
{
	match:
	{
		"targetname" "NPC_Guard_Hurt"
		"origin" "-12696 -9344 -7"
		"classname" "trigger_hurt"
	}
	replace:
	{
		"damagecap" "99999"
		"damage" "10"
	}
}

; Makes the guard NPCs spawn less frequently
modify:
{
	match:
	{
		"origin" "-10448 -14976 -456"
		"targetname" "random_npc_spawner_timer"
		"classname" "logic_timer"
	}
	replace:
	{
		"UpperRandomBound" "120"
		"LowerRandomBound" "60"
	}
}

;--------------------------
; NPC LASER CHANGES
;--------------------------
; Reduces damage dealt from the npc
modify:
{
	match:
	{
		"targetname" "NPC_Laser_Hurt"
		"origin" "-12293.4 -9535.99 -19"
		"classname" "trigger_hurt"
	}
	replace:
	{
		"damagecap" "99999"
		"damage" "10"
	}
}
; Reduces laser distance
modify:
{
	match:
	{
		"targetname" "NPC_Laser_Move"
		"origin" "-12364 -9535.99 -19"
		"classname" "func_door"
	}
	replace:
	{
		"lip" "-2250"
	}
}

;--------------------------
; HUMAN ITEM FIXES
;--------------------------
; Downwards spiral fixes
add:
{
	"model" "*28"
	"targetname" "insta_break_staircase_trigger"
	"StartDisabled" "0"
	"spawnflags" "1"
	"filtername" "MapFilterT"
	"origin" "-15448 -13260 -332"
	"classname" "trigger_once"
	"OnStartTouch" "itemextra4human1breakable1,Break,,0,-1"
	"OnStartTouch" "item4human1sound1,StopSound,,0,-1"
	"OnStartTouch" "!self,Kill,,0.1,-1"
}
add:
{
	"model" "*28"
	"targetname" "insta_break_staircase_trigger"
	"StartDisabled" "0"
	"spawnflags" "1"
	"filtername" "MapFilterT"
	"origin" "-15448 -13260 -140"
	"classname" "trigger_once"
	"OnStartTouch" "itemextra4human1breakable1,Break,,0,-1"
	"OnStartTouch" "item4human1sound1,StopSound,,0,-1"
	"OnStartTouch" "!self,Kill,,0.1,-1"
}
add:
{
	"model" "*28"
	"targetname" "insta_break_staircase_trigger"
	"StartDisabled" "0"
	"spawnflags" "1"
	"filtername" "MapFilterT"
	"origin" "-15448 -13260 52"
	"classname" "trigger_once"
	"OnStartTouch" "itemextra4human1breakable1,Break,,0,-1"
	"OnStartTouch" "item4human1sound1,StopSound,,0,-1"
	"OnStartTouch" "!self,Kill,,0.1,-1"
}
modify:
{
	match:
	{
		"origin" "-15449 -13260 -162"
		"targetname" "itemextra4humantemplate1"
		"classname" "point_template"
	}
	insert:
	{
		"Template02" "insta_break_staircase_trigger"
	}
}

; Sacrifice fixes
filter:
{
	"classname" "logic_measure_movement"
	"targetname" "item1human1measuremovement1"
}
modify:
{
	match:
	{
		"classname" "filter_multi"
		"targetname" "item1human1filter2"
	}
	delete:
	{
		"OnPass" "item1human1multiple2,Enable,,0,-1"
		"OnPass" "item1human1multiple2,Disable,,30,-1"
	}
	insert:
	{
		"OnPass" "item1human1timer1,Enable,,0,-1"
		"OnPass" "item1human1timer1,Disable,,30,-1"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_multiple"
		"targetname" "item1human1multiple2"
	}
	replace:
	{
		"parentname" "item1human1weapon1"
	}
	insert:
	{
		"OnStartTouch" "item1human1equip1,Use,,,-1"
	}
}
add:
{
	"classname" "logic_timer"
	"targetname" "item1human1timer1"
	"StartDisabled" "1"
	"RefireTime" "1"
	"OnTimer" "item1human1multiple2,Enable,,,-1"
	"OnTimer" "item1human1multiple2,Disable,,.01,-1"
}
modify:
{
	match:
	{
		"classname" "game_player_equip"
		"targetname" "item1human1equip1"
	}
	replace:
	{
		"spawnflags" "1"
	}
}

; Belmont / Tyler1 fixes
add:
{
	"origin" "-6544 -14240 3336"
	"weapon_p90" "1"
	"weapon_hegrenade" "1"
	"weapon_elite" "1"
	"item_assaultsuit" "1"
	"targetname" "map_loadout_belmont"
	"spawnflags" "1"
	"classname" "game_player_equip"
}
modify:
{
	match:
	{
		"targetname" "s_belmont_button"
		"origin" "-1747 1352.46 4082.61"
		"classname" "func_button"
	}
	insert:
	{
		"OnPressed" "map_loadout_belmont,USE,,0.3,1"
	}
}

;--------------------------
; ZOMBIE ITEM FIXES
;--------------------------
; LNS Fixes
modify:
{
	match:
	{
		"origin" "-12860 -13086.4 -4690.02"
		"targetname" "LNS_CUTSCENE_Knife"
		"classname" "weapon_knife"
	}
	delete:
	{
		"OnPlayerPickup" "!activator,AddOutput,rendermode 6,0,-1"
	}
}
modify:
{
	match:
	{
		"origin" "-12853.7 -13084 -4684.8"
		"targetname" "LNSTEmplate"
		"classname" "point_template"
	}
	delete:
	{
		"OnPlayerPickup" "zsmessage_human,message,Car has been picked!,0,1"
		"OnPlayerPickup" "GlobalSpeedMod,ModifySpeed,1.4,0,1"
		"OnPlayerPickup" "!activator,AddOutput,gravity 0.8,0,1"
	}
}
modify:
{
	match:
	{
		"origin" "-12861.5 -13040 -4705.02"
		"targetname" "LNS_CUTSCENE_Relay2"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "spawn_afk_teleporter,Disable,,0,1"
	}
}
modify:
{
	match:
	{
		"origin" "-12949.3 -11804 -3762"
		"targetname" "LMSTroll"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "spawn_afk_teleporter,Enable,,35,1"
	}
}

; Dreamy Bull fixes
modify:
{
	match:
	{
		"origin" "-12386.3 -13343.9 -4690.48"
		"targetname" "BB_DreamyBull_Knife"
		"classname" "weapon_knife"
	}
	delete:
	{
		"OnPlayerPickup" "!activator,AddOutput,rendermode 6,0,-1"
	}
}

; Zombie boot soundboard fix
modify:
{
	match:
	{
		"origin" "-12860 -13342.4 -4690.02"
		"targetname" "DD_TrollSFX_Knife"
		"classname" "weapon_knife"
	}
	delete:
	{
		"OnPlayerPickup" "!activator,AddOutput,rendermode 6,0,-1"
	}
}

; Jihad John fixes
modify:
{
	match:
	{
		"origin" "-12386.3 -13103.8 -4690.48"
		"targetname" "SS_BomberGuy_Knife"
		"classname" "weapon_knife"
	}
	delete:
	{
		"OnPlayerPickup" "!activator,AddOutput,rendermode 6,0,-1"
	}
}

; Mohammed goat fixes
modify:
{
	match:
	{
		"origin" "-12767.6 -12885.5 -4728.96"
		"targetname" "WTCS_ITEM_Knife"
		"classname" "weapon_knife"
	}
	delete:
	{
		"OnPlayerPickup" "!activator,AddOutput,rendermode 6,0,-1"
	}
}

; Fix zombies picking up multiple items
modify:
{
	match:
	{
		"classname" "logic_auto"
	}
	insert:
	{
		"OnMapSpawn" "player,ClearContext,,0,-1"
	}
}
add:
{
	"classname" "filter_activator_context"
	"targetname" "pickup_filter"
	"ResponseContext" "zitem_pickup"
	"Negated" "1"
}
add:
{
	"classname" "filter_multi"
	"targetname" "zitem_filter"
	"Negated" "0"
	"filtertype" "0"
	"Filter01" "MapFilterT"
	"Filter02" "pickup_filter"
}
modify:
{
	match:
	{
		"targetname" "weapon_ladder_mapbase"
		"classname" "weapon_knife"
	}
	insert:
	{
		"OnPlayerPickup" "!activator,AddContext,zitem_pickup:1,0,1"
	}
}
modify:
{
	match:
	{
		"targetname" "weapon_ladder_once"
		"classname" "trigger_once"
	}
	replace:
	{
		"filtername" "zitem_filter"
	}
}
modify:
{
	match:
	{
		"targetname" "SS_Skibidi_Knife"
		"classname" "weapon_knife"
	}
	insert:
	{
		"OnPlayerPickup" "!activator,AddContext,zitem_pickup:1,0,-1"
	}
}
modify:
{
	match:
	{
		"targetname" "SS_Skibidi_Once"
		"classname" "trigger_once"
	}
	replace:
	{
		"filtername" "zitem_filter"
	}
}
modify:
{
	match:
	{
		"targetname" "WTCS_ITEM_Knife"
		"classname" "weapon_knife"
	}
	insert:
	{
		"OnPlayerPickup" "!activator,AddContext,zitem_pickup:1,0,-1"
	}
}
modify:
{
	match:
	{
		"targetname" "WTCS_ITEM_Once"
		"classname" "trigger_once"
	}
	replace:
	{
		"filtername" "zitem_filter"
	}
}
modify:
{
	match:
	{
		"targetname" "LNS_CUTSCENE_Knife"
		"classname" "weapon_knife"
	}
	insert:
	{
		"OnPlayerPickup" "!activator,AddContext,zitem_pickup:1,0,-1"
	}
}
modify:
{
	match:
	{
		"targetname" "LNS_CUTSCENE_Once"
		"classname" "trigger_once"
	}
	replace:
	{
		"filtername" "zitem_filter"
	}
}
modify:
{
	match:
	{
		"targetname" "SS_BomberGuy_Knife"
		"classname" "weapon_knife"
	}
	insert:
	{
		"OnPlayerPickup" "!activator,AddContext,zitem_pickup:1,0,-1"
	}
}
modify:
{
	match:
	{
		"targetname" "SS_BomberGuy_Once"
		"classname" "trigger_once"
	}
	replace:
	{
		"filtername" "zitem_filter"
	}
}
modify:
{
	match:
	{
		"targetname" "DD_TrollSFX_Knife"
		"classname" "weapon_knife"
	}
	insert:
	{
		"OnPlayerPickup" "!activator,AddContext,zitem_pickup:1,0,-1"
	}
}
modify:
{
	match:
	{
		"targetname" "DD_TrollSFX_Once"
		"classname" "trigger_once"
	}
	replace:
	{
		"filtername" "zitem_filter"
	}
}
modify:
{
	match:
	{
		"targetname" "w_car"
		"classname" "weapon_knife"
	}
	insert:
	{
		"OnPlayerPickup" "!activator,AddContext,zitem_pickup:1,0,-1"
	}
}
modify:
{
	match:
	{
		"targetname" "w_car2"
		"classname" "trigger_once"
	}
	replace:
	{
		"filtername" "zitem_filter"
	}
}
modify:
{
	match:
	{
		"targetname" "BB_DreamyBull_Knife"
		"classname" "weapon_knife"
	}
	insert:
	{
		"OnPlayerPickup" "!activator,AddContext,zitem_pickup:1,0,-1"
	}
}
modify:
{
	match:
	{
		"targetname" "BB_DreamyBull_Once"
		"classname" "trigger_once"
	}
	replace:
	{
		"filtername" "zitem_filter"
	}
}