;---------------------------------------------------------------------------
; Add stripper status message & small fixes in the logic_auto
;---------------------------------------------------------------------------
modify:
{
	match:
	{
		"origin" "-3968 112 -1618"
		"classname" "logic_auto"
	}
	delete:
	{
		"OnMapSpawn" "cmd_svCommandsay >> Nide mapping contest 2025 << 11"
		"OnMapSpawn" "cmd_svCommandsay >> ze_tomb_raider_legacy_v1f << 21"
		"OnMapSpawn" "cmd_svCommandsay >> Map by F$cKxy <<31"
		"OnMapSpawn" "cmd_svCommandmp_roundtime 22.501"
		"OnMapSpawn" "spawn_door_ROpen81"
		"OnMapSpawn" "spawn_door_LOpen81"
		"OnMapSpawn" "cmd_svCommandsay >> The teleportation port is 1 way and only available for zombies <<71"
		"OnMapSpawn" "cmd_svCommandsay >> The teleportation port is 1 way and only available for zombies <<51"
		"OnMapSpawn" "cmd_svCommandsay >> The teleportation port is 1 way and only available for zombies <<61"
		"OnMapSpawn" "spawn_door_LKill101"
		"OnMapSpawn" "spawn_door_RKill101"
	}
	insert:
	{
		"OnMapSpawn" "cmd_svCommandsay >> Nide mapping contest 2025 << 11"
		"OnMapSpawn" "cmd_svCommandsay >> ze_tomb_raider_legacy_v1f << 21"
		"OnMapSpawn" "cmd_svCommandsay >> Map by F$cKxy <<31"
		"OnMapSpawn" "cmd_svCommandsay >> Stripper 1 loaded <<51"
		"OnMapSpawn" "cmd_svCommandmp_roundtime 3001"
		"OnMapSpawn" "spawn_door_ROpen81"
		"OnMapSpawn" "spawn_door_LOpen81"
		"OnMapSpawn" "spawn_door_LKill101"
		"OnMapSpawn" "spawn_door_RKill101"
	}
}

;---------------------------------------------------------------
; Make the starting gameplay more smooth and faster
;---------------------------------------------------------------
modify:
{
	match:
	{
		"origin" "-3584 -512 -1763.2"
		"classname" "trigger_teleport"
		"hammerid" "107702"
	}
	delete:
	{
		"OnStartTouch" "s1_gametext_cavesDisplay01"
		"OnStartTouch" "s1_ice1_hurtEnable31"
		"OnStartTouch" "s1_ice1_fxStart31"
		"OnStartTouch" "cmd_svCommandsay >> Defend here before all trap clear <<31"
		"OnStartTouch" "s1_ice2_fxStart41"
		"OnStartTouch" "s1_ice2_fxStop201"
		"OnStartTouch" "s1_ice1_fxStop201"
		"OnStartTouch" "s1_ice1_hurtKill201"
		"OnStartTouch" "cmd_svCommandsay >> All trap are clear  <<191"
		"OnStartTouch" "s1_ice1_fxKill251"
		"OnStartTouch" "s1_ice2_fxKill251"
		"OnStartTouch" "s1_tp_afk_spawnEnable61"
		"OnStartTouch" "!selfKill301"
		"OnStartTouch" "secret_ambientPlaySound11"
		"OnStartTouch" "secret_ambientKill51"
		"OnStartTouch" "cave_ambientPlaySound21"
	}
	insert:
	{
		"OnStartTouch" "s1_gametext_cavesDisplay01"
		"OnStartTouch" "s1_ice1_hurtEnable31"
		"OnStartTouch" "s1_ice1_fxStart31"
		"OnStartTouch" "cmd_svCommandsay >> WAIT UNTIL THE ICE TRAP IS CLEARED ! <<31"
		"OnStartTouch" "s1_ice2_fxStart41"
		"OnStartTouch" "s1_ice2_fxStop131"
		"OnStartTouch" "s1_ice1_fxStop131"
		"OnStartTouch" "s1_ice1_hurtKill131"
		"OnStartTouch" "cmd_svCommandsay >> THE TRAP IS NOW CLEARED ! <<131"
		"OnStartTouch" "s1_ice1_fxKill131"
		"OnStartTouch" "s1_ice2_fxKill131"
		"OnStartTouch" "s1_tp_afk_spawnEnable61"
		"OnStartTouch" "secret_ambientPlaySound11"
		"OnStartTouch" "secret_ambientKill51"
		"OnStartTouch" "cave_ambientPlaySound21"
	}
}

;-------------------------------------------------------------------------------------------
; Fix a teleportation destination that is named wrong & Edit teleporter for shortcut
;-------------------------------------------------------------------------------------------
filter:
{
	"origin" "-9272 7496 -808"
	"targetname" "s1_tp9_des"
	"classname" "info_teleport_destination"
}
add:
{
	"origin" "-9272 7496 -808"
	"targetname" "s1_tp10_des_zm"
	"angles" "0 0 0"
	"classname" "info_teleport_destination"
}
modify:
{
	match:
	{
		"targetname" "s1_door10_sc_zm"
		"origin" "-9480 8360 -544"
		"classname" "trigger_teleport"
	}
	replace:
	{
		"target" "s1_tp10_des_zm"
	}
}

;--------------------------------------------
; Fix statues being added too much HP to
;--------------------------------------------
modify:
{
	match:
	{
		"targetname" "s1_door1_break"
		"origin" "-176 2000 432"
		"classname" "func_breakable"
	}
	delete:
	{
		"OnBreak" "s1_door2_move_platformOpen51"
	}
	insert:
	{
		"OnBreak" "s1_door2_move_platformOpen01"
		"OnBreak" "hp_statues_fixEnable81"
	}
}
filter:
{
	"targetname" "s1_door2_6_fall"
	"origin" "-176 2464 320"
	"classname" "trigger_multiple"
	"hammerid" "251525"
}
add:
{
	"model" "*21"
	"targetname" "hp_statues_fix"
	"StartDisabled" "1"
	"spawnflags" "1"
	"filtername" "team_human"
	"origin" "-128 1728 368.01"
	"classname" "trigger_once"
	"OnStartTouch" "s1_door2_6_breakAddHealth1250-1"
	"OnStartTouch" "s1_door2_4_breakAddHealth1500-1"
	"OnStartTouch" "s1_door2_2_breakAddHealth2250-1"
	"OnStartTouch" "s1_door2_6Open61"
	"OnStartTouch" "s1_door2_5Open51"
	"OnStartTouch" "s1_door2_4Open41"
	"OnStartTouch" "s1_door2_3Open31"
	"OnStartTouch" "s1_door2_2Open1.51"
	"OnStartTouch" "s1_door2_1Open0.51"
	"OnStartTouch" "cmd_svCommandsay >> Break the statues on the door << 51"
}

;-------------------------------------------
; Delay a zombie shortcut for 5 seconds
;-------------------------------------------
modify:
{
	match:
	{
		"targetname" "s1_door5_trigger"
		"origin" "-2784 4240 -244"
		"classname" "trigger_multiple"
	}
	delete:
	{
		"OnStartTouch" "s1_door5_sc2Open51"
		"OnStartTouch" "cmd_svCommandsay >> 20 seconds << 11"
		"OnStartTouch" "s1_door5Open211"
		"OnStartTouch" "s1_door5_breakBreak221"
		"OnStartTouch" "s1_door5_sc_zmBreak81"
	}
	insert:
	{
		"OnStartTouch" "s1_door5_sc2Open101"
		"OnStartTouch" "cmd_svCommandsay >> 10 seconds << 01"
		"OnStartTouch" "s1_door5Open101"
		"OnStartTouch" "s1_door5_breakBreak111"
		"OnStartTouch" "s1_door5_sc_zmBreak51"
	}
}

;--------------------------------------------
; Adds more feedback messages - room 7
;--------------------------------------------
modify:
{
	match:
	{
		"targetname" "s1_door7_brk_trigger"
		"origin" "-4448 4192 -448"
		"classname" "trigger_multiple"
	}
	insert:
	{
		"OnStartTouch" "cmd_svCommandsay >> STAY DEFEND ! - The team needs to split for the trigger << 31"
		"OnStartTouch" "cmd_svCommandsay >> STAY DEFEND ! - First trigger at the top of ladder and then the bottom side door << 41"
		"OnStartTouch" "cmd_svCommandsay >> STAY DEFEND ! - Second trigger the the bottom side door << 51"
	}
}

;--------------------------------
; Edit messages for room 11
;--------------------------------
modify:
{
	match:
	{
		"origin" "-7568 8096 -480"
		"classname" "trigger_multiple"
		"targetname" "s1_door11_trigger"
		"hammerid" "457582"
	}
	delete:
	{
		"OnStartTouch" "s1_tp_afk_5Enable51"
		"OnStartTouch" "cmd_svCommandsay >> 20 seconds and zombie teleport in 5 seconds << 01"
		"OnStartTouch" "s1_door11Open201"
	}
	insert:
	{
		"OnStartTouch" "cmd_svCommandsay >> Zombie teleport in 5 seconds << 01"
		"OnStartTouch" "s1_tp_afk_5Enable51"
		"OnStartTouch" "cmd_svCommandsay >> Door opens in 25 seconds << 51"
		"OnStartTouch" "s1_door11Open301"
	}
}

;-----------------------------------------------------
; Adjust a trigger_teleports... and name reference
;-----------------------------------------------------
filter:
{
	"targetname" "s1_tp_afk_5"
	"origin" "-9630 5438.73 -255.99"
	"classname" "trigger_teleport"
}
add:
{
	"model" "*89"
	"targetname" "s1_tp_afk_6"
	"target" "s1_tp10_des"
	"StartDisabled" "1"
	"spawnflags" "1"
	"origin" "-9630 5438.73 -255.99"
	"classname" "trigger_teleport"
}
modify:
{
	match:
	{
		"targetname" "s1_door9"
		"origin" "-8528 4064 -96"
		"classname" "func_breakable"
	}
	insert:
	{
		"OnBreak" "s1_tp_afk_5Enable151"
	}
}
modify:
{
	match:
	{
		"targetname" "s1_door11_trigger"
		"origin" "-7568 8096 -480"
		"classname" "trigger_multiple"
	}
	delete:
	{
		"OnStartTouch" "s1_tp_afk_5Enable51"
	}
	insert:
	{
		"OnStartTouch" "s1_tp_afk_6Enable51"
	}
}

;-----------------------------------------------------
; Adjust a way a trigger_teleport is enabled
;-----------------------------------------------------
modify:
{
	match:
	{
		"origin" "-8444 3472 -128"
		"classname" "func_button"
		"hammerid" "393965"
	}
	delete:
	{
		"OnPressed" "cmd_svCommandsay >> Zombie shortcuts open  <<31"
		"OnPressed" "s1_door9_zombie_scEnable31"
		"OnPressed" "s1_gravity3_fxStart31"
	}
}
modify:
{
	match:
	{
		"origin" "-6816 3552 -144.01"
		"classname" "trigger_once"
		"hammerid" "384882"
	}
	insert:
	{
		"OnStartTouch" "cmd_svCommandsay >> Zombie shortcut opens in 10 seconds!  <<101"
		"OnStartTouch" "s1_door9_zombie_scEnable201"
		"OnStartTouch" "s1_gravity3_fxStart201"
	}
}

;-----------------------------------------------------
; Reduce a door hold after elevator part
;-----------------------------------------------------
modify:
{
	match:
	{
		"targetname" "s1_door6_but"
		"origin" "-3840 4378 -558"
		"classname" "func_button"
	}
	delete:
	{
		"OnPressed" "cmd_svCommandsay >> Door open in 20 seconds <<31"
		"OnPressed" "s1_door6_moveOpen01"
		"OnPressed" "s1_door6Open231"
		"OnPressed" "s1_door6Kill251"
		"OnPressed" "s1_door7_fire_door_hurtEnable11"
	}
	insert:
	{
		"OnPressed" "cmd_svCommandsay >> Door open in 7 seconds <<01"
		"OnPressed" "s1_door6_moveOpen01"
		"OnPressed" "s1_door6Open71"
		"OnPressed" "s1_door6Kill91"
		"OnPressed" "s1_door7_fire_door_hurtEnable11"
	}
}

;-----------------------------------------------------
; Reduce the second hold in the map
;-----------------------------------------------------
modify:
{
	match:
	{
		"origin" "-176 1960 312"
		"classname" "trigger_multiple"
		"hammerid" "168622"
	}
	delete:
	{
		"OnStartTouch" "s1_door1_breakBreak201"
		"OnStartTouch" "cmd_svCommandsay >> Door break in 20 seconds <<11"
	}
	insert:
	{
		"OnStartTouch" "s1_door1_breakBreak111"
		"OnStartTouch" "cmd_svCommandsay >> Door break in 10 seconds <<11"
	}
}

;-----------------------------
; Add a missing teleporter
;-----------------------------
add:
{
	"model" "*21"
	"targetname" "s1_tp_afk_2"
	"target" "s1_tp4_des"
	"StartDisabled" "1"
	"spawnflags" "1"
	"origin" "-512 1728 368.01"
	"classname" "trigger_teleport"
}

;-------------------------------------------
; Fix timers so they are correct
;-------------------------------------------
modify:
{
	match:
	{
		"origin" "-9099 7091 -439"
		"targetname" "s1_door10_count"
		"classname" "math_counter"
	}
	delete:
	{
		"OnHitMax" "cmd_svCommandsay >> The main door open in 15 seconds << 41"
		"OnHitMax" "s1_door10Break151"
		"OnHitMax" "s1_door10_scBreak51"
		"OnHitMax" "cmd_svCommandsay >> Shortcuts open << 31"
		"OnHitMax" "!selfKill201"
		"OnHitMax" "s1_sprt_3ToggleSprite131"
		"OnHitMax" "s1_torch_ptc_bossStart131"
		"OnHitMax" "s1_torch_spr_bossToggleSprite131"
		"OnHitMax" "s1_torch_mdl_bossEnable131"
	}
	insert:
	{
		"OnHitMax" "cmd_svCommandsay >> The main door open in 15 seconds << 01"
		"OnHitMax" "s1_door10Break151"
		"OnHitMax" "s1_door10_scBreak101"
		"OnHitMax" "cmd_svCommandsay >> Shortcuts open << 51"
		"OnHitMax" "s1_sprt_3ToggleSprite131"
		"OnHitMax" "s1_torch_ptc_bossStart131"
		"OnHitMax" "s1_torch_spr_bossToggleSprite131"
		"OnHitMax" "s1_torch_mdl_bossEnable131"
	}
}
modify:
{
	match:
	{
		"targetname" "s1_door3"
		"origin" "-592 5168 384"
		"classname" "func_door"
	}
	delete:
	{
		"OnOpen" "s1_door4Open201"
		"OnOpen" "cmd_svCommandsay >> Second gate open in 20 seconds << 41"
	}
	insert:
	{
		"OnOpen" "s1_door4Open101"
		"OnOpen" "cmd_svCommandsay >> Second gate opens in 10 seconds << 01"
	}
}

;-----------------------------------------------------
; Adjust ending so it makes more sense
;-----------------------------------------------------

; Fix the ending health being scaled propperly
filter:
{
	"targetname" "s1_last_trex_addhp"
	"origin" "-4704 5600 -328"
	"classname" "trigger_multiple"
}
add:
{
	"model" "*101"
	"targetname" "s1_last_trex_addhp"
	"StartDisabled" "1"
	"spawnflags" "1"
	"filtername" "team_human"
	"origin" "-4720 5816 -256"
	"classname" "trigger_once"
	"OnStartTouch" "s1_last_trex_hitboxAddHealth1500-1"
}

; Adds more triggers for teleportation to prevent humans delaying
add:
{
	"model" "*115"
	"targetname" "s1_tp_human_zm_trex_cage_des_trigger"
	"target" "s1_tp_zm_last_room_des"
	"StartDisabled" "1"
	"spawnflags" "1"
	"origin" "-4720 5840 -160"
	"filtername" "team_human"
	"classname" "trigger_teleport"
}

; Adds more triggers for teleportation to prevent zombies getting infront
add:
{
	"model" "*112"
	"targetname" "s1_tp_human_zm_trex_cage_des_trigger"
	"target" "s1_tp_zm_trex_cage_des"
	"StartDisabled" "1"
	"spawnflags" "1"
	"origin" "-4720 5824 -48"
	"filtername" "team_zm"
	"classname" "trigger_teleport"
}
add:
{
	"model" "*112"
	"targetname" "s1_tp_human_zm_trex_cage_des_trigger"
	"target" "s1_tp_zm_trex_cage_des"
	"StartDisabled" "1"
	"spawnflags" "1"
	"origin" "-4720 7040 -432"
	"filtername" "team_zm"
	"classname" "trigger_teleport"
}

; Edits the final button to trigger the ending
modify:
{
	match:
	{
		"origin" "-4076.02 6634 -262"
		"classname" "func_button"
		"hammerid" "461528"
	}
	delete:
	{
		"OnPressed" "cmd_svCommandsay >> 20 seconds << 11"
		"OnPressed" "cmd_svCommandsay >> Stay defend and wait for event << 21"
		"OnPressed" "cmd_svCommandsay >> Last event start << 151"
	}
	insert:
	{
		"OnPressed" "cmd_svCommandsay >> Survive for 20 seconds until the event appears! << 11"
		"OnPressed" "cmd_svCommandsay >> THE EVENT STARTS NOW << 151"
		"OnPressed" "cmd_svCommandsay >> SHOOT THE DINOSAURS!!! << 181"
	}
}

; Edits a few messages to keep it simple
modify:
{
	match:
	{
		"origin" "-5328 6288 -240"
		"classname" "trigger_multiple"
		"hammerid" "463321"
	}
	delete:
	{
		"OnStartTouch" "cmd_svCommandsay >> The main door is locked << 11"
		"OnStartTouch" "cmd_svCommandsay >>  Run to the other side to trigger << 31"
		"OnStartTouch" "cmd_svCommandsay >> You need to defend in this room and wait for the next event << 51"
		"OnStartTouch" "cmd_svCommandsay >> Defend 30 seconds  << 61"
	}
	insert:
	{
		"OnStartTouch" "cmd_svCommandsay >> STAY TOP DO NOT JUMP DOWN YET ! << 01"
		"OnStartTouch" "cmd_svCommandsay >> STAY TOP DO NOT JUMP DOWN YET ! << 11"
		"OnStartTouch" "cmd_svCommandsay >> Run to the other side! << 21"
	}
}

; Makes a new direction to the dest for easier navigation
modify:
{
	match:
	{
		"target" "s1_tp_last_room_des"
		"origin" "-6336 6592 -208"
		"classname" "trigger_teleport"
	}
	replace:
	{
		"angles" "0 270 0"
	}
}

; Adjust the AFK timer a bit
modify:
{
	match:
	{
		"targetname" "s1_lastdoor_afk_tp_trigger"
		"origin" "-4336 5072 -224"
		"classname" "trigger_once"
	}
	delete:
	{
		"OnStartTouch" "cmd_svCommandsay >> Last AFK teleport in 5 seconds << 01"
		"OnStartTouch" "s1_tp_afk_last_zmEnable51"
	}
	insert:
	{
		"OnStartTouch" "cmd_svCommandsay >> Last AFK teleport in 5 seconds << 51"
		"OnStartTouch" "s1_tp_afk_last_zmEnable101"
	}
}