;----------------------------
; Last changed on 24-02-2023
;----------------------------

;------------------------------------------------------------------------
; Fixes a teleport which gets enabled too early compared to the message
;------------------------------------------------------------------------
modify:
{
	match:
	{
		"origin" "6395.81 -3872.82 4520"
		"targetname" "s1_button_collector"
		"classname" "math_counter"
	}
	delete:
	{
		"OnHitMax" "zombie_cage_teleporter,Enable,,30,1"
	}
	insert:
	{
		"OnHitMax" "zombie_cage_teleporter,Enable,,40,1"
	}
}
;----------------------------------------------
; Fixes hp bug for s1_sonic and s1_bullet_bill
;----------------------------------------------
modify:
{
	match:
	{
		"targetname" "s1_hp_add_bullet_and_sonic"
		"classname" "trigger_once"
	}
	replace:
	{
		"StartDisabled" "1"
	}
	delete:
	{
		"OnStartTouch" "s1_bullet_bill_counter,Add,800,3,-1"
		"OnStartTouch" "s1_sonic_counter,Add,1000,8,-1"
	}
	insert:
	{
		"OnStartTouch" "s1_bullet_bill_counter,Add,1200,0,-1"
		"OnStartTouch" "s1_sonic_counter,Add,800,0,-1"
	}
}
;--------------------------------------------------------
; Enables the hp trigger for s1_sonic and s1_bullet_bill
;--------------------------------------------------------
modify:
{
	match:
	{
		"origin" "6395.81 -3872.82 4520"
		"targetname" "s1_button_collector"
		"classname" "math_counter"
	}
	insert:
	{
		"OnHitMax" "s1_hp_add_bullet_and_sonic,Enable,,65,1"
	}
}
;--------------------------------------------------
; Adds another timer to spawn Wazoski_shrek at s5
;--------------------------------------------------
add:
{
	"origin" "-9936 10112 5184"
	"UseRandomTime" "0"
	"targetname" "s5_ending_timer_2"
	"StartDisabled" "1"
	"spawnflags" "0"
	"RefireTime" "1"
	"classname" "logic_timer"
	"OnTimer" "Wazoski_Shrek_maker,ForceSpawn,,0,-1"
}
;----------------------------------------------------
; Inserts the new timer values to the s5_alien path
;----------------------------------------------------
modify:
{
	match:
	{
		"origin" "-9952 10656 5178.79"
		"targetname" "last_alien_boss_path2"
		"classname" "path_track"
	}
	insert:
	{
		"OnPass" "s5_ending_timer_2,Enable,,6,1"
		"OnPass" "s5_ending_timer_2,Disable,,39,1"
		"OnPass" "s5_ending_timer_2,Kill,,40,1"
	}
}
;----------------------------------------------------------------------------------------
; Makes s3_shadow invisible attack max 3 times & starts his delection attack 1 sec later
;----------------------------------------------------------------------------------------
modify:
{
	match:
	{
		"origin" "12144 3904 6408"
		"targetname" "attack_case_shadow"
		"classname" "logic_case"
	}
	delete:
	{
		"OnCase02" "Shadow_Boss_Model,AddOutput,rendermode 10,1,-1"
		"OnCase02" "console,Command,say *** Shadow goes invisible ***,0,-1"
		"OnCase02" "Shadow_Boss_Model,AddOutput,rendermode 0,4,-1"
		"OnCase02" "Shadow_Boss_Model,AddOutput,rendermode 10,7,-1"
		"OnCase02" "Shadow_Boss_Model,AddOutput,rendermode 0,11,-1"
		"OnCase02" "Shadow_Boss_Model,AddOutput,rendermode 10,14,-1"
		"OnCase02" "Shadow_Boss_Model,AddOutput,rendermode 0,15,-1"
		"OnCase05" "console,Command,say *** Shadow deflects your bullets ***,0,-1"
		"OnCase05" "console,Command,say *** Shadows deflection stopped ***,6,-1"
		"OnCase05" "point_hurt_template,ForceSpawn,,1,-1"
		"OnCase05" "point_hurt,Kill,,6,-1"
		"OnCase05" "deflect_particle,Start,,0,-1"
		"OnCase05" "deflect_particle,Stop,,6,-1"
	}
	insert:
	{
		"OnCase02" "console,Command,say *** Shadow goes invisible ***,0,3"
		"OnCase02" "Shadow_Boss_Model,AddOutput,rendermode 10,1,3"
		"OnCase02" "Shadow_Boss_Model,AddOutput,rendermode 0,4,3"
		"OnCase02" "Shadow_Boss_Model,AddOutput,rendermode 10,7,3"
		"OnCase02" "Shadow_Boss_Model,AddOutput,rendermode 0,11,3"
		"OnCase02" "Shadow_Boss_Model,AddOutput,rendermode 10,14,3"
		"OnCase02" "Shadow_Boss_Model,AddOutput,rendermode 0,15,3"
		"OnCase05" "console,Command,say *** Shadow deflects your bullets ***,0,-1"
		"OnCase05" "point_hurt_template,ForceSpawn,,2,-1"
		"OnCase05" "console,Command,say *** Shadows deflection stopped ***,7,-1"
		"OnCase05" "point_hurt,Kill,,7,-1"
		"OnCase05" "deflect_particle,Start,,1,-1"
		"OnCase05" "deflect_particle,Stop,,7,-1"
	}
}
;---------------------------------------------------
; Slightly reduces s3_shadow boss the hp per player
;---------------------------------------------------
modify:
{
	match:
	{
		"targetname" "s3_boss_shadow_hp_add"
		"classname" "trigger_once"
	}
	delete:
	{
		"OnStartTouch" "s3_boss_shadow_counter,Add,800,0,-1"
	}
	insert:
	{
		"OnStartTouch" "s3_boss_shadow_counter,Add,650,0,-1"
	}
}
;--------------------------
; Fixes s5 skull slowness
;--------------------------
modify:
{
	match:
	{
		"origin" "4990.37 -13806.3 2568"
		"targetname" "s5_skull_counter"
		"classname" "math_counter"
	}
	delete:
	{
		"OnHitMax" "speed_back,Enable,,1,1"
		"OnHitMax" "Alien_Skull_deagle,Kill,,0.5,1"
	}
	insert:
	{
		"OnHitMax" "timer_speed,Enable,,0,-1"
	}
}
;------------------------------------------
; Adds a logic_timer to fix slowness issue
;------------------------------------------
add:
{
	"origin" "12696 3840 6408"
	"UseRandomTime" "0"
	"targetname" "timer_speed"
	"StartDisabled" "1"
	"spawnflags" "0"
	"RefireTime" "0.2"
	"classname" "logic_timer"
	"OnTimer" "speed_back,Enable,,0,-1"
	"OnTimer" "speed_back,Disable,,0.5,-1"
}
;------------------------------
; reparent the physbox for s5
;------------------------------
modify:
{
	match:
	{
		"targetname" "skull_physc_player"
		"classname" "func_physbox_multiplayer"
	}
	replace:
	{
		"parentname" "Alien_Skull_deagle" 
	}
}
;-----------------------------------------------
; gives the s5 trigger_multiple -1 instead of 1
;-----------------------------------------------
modify:
{
	match:
	{
		"targetname" "speed_back"
		"classname" "trigger_multiple"
	}
	delete:
	{
		"OnStartTouch" "speed,ModifySpeed,1,0,1"
	}
	insert:
	{
		"OnStartTouch" "speed,ModifySpeed,1,0,-1"
	}
}



























;-------------------------------------------------
; Adds a practice mode button for stage 2 ending
;-------------------------------------------------
add:
{
	"model" "*314"
	"wait" "4"
	"unlocked_sound" "0"
	"unlocked_sentence" "0"
	"targetname" "admin_room_practice_level_2"
	"speed" "5"
	"spawnflags" "1024"
	"sounds" "3"
	"rendermode" "0"
	"renderfx" "0"
	"rendercolor" "255 255 255"
	"renderamt" "255"
	"origin" "9647.99 -12984 6298"
	"movedir" "90 0 0"
	"locked_sound" "0"
	"locked_sentence" "0"
	"lip" "0"
	"health" "0"
	"disablereceiveshadows" "0"
	"classname" "func_button"
	"OnPressed" "math_counter_level,SetValueNoFire,6,0,-1"
	"OnPressed" "console,Command,say *** An admin have selected practice mode for level 2 ***,0,-1"
}
;-------------------------------------------------
; Adds a practice mode button for stage 3 ending
;-------------------------------------------------
add:
{
	"model" "*314"
	"wait" "4"
	"unlocked_sound" "0"
	"unlocked_sentence" "0"
	"targetname" "admin_room_practice_level_3"
	"speed" "5"
	"spawnflags" "1024"
	"sounds" "3"
	"rendermode" "0"
	"renderfx" "0"
	"rendercolor" "255 255 255"
	"renderamt" "255"
	"origin" "9463.99 -12984 6298"
	"movedir" "90 0 0"
	"locked_sound" "0"
	"locked_sentence" "0"
	"lip" "0"
	"health" "0"
	"disablereceiveshadows" "0"
	"classname" "func_button"
	"OnPressed" "math_counter_level,SetValueNoFire,7,0,-1"
	"OnPressed" "console,Command,say *** An admin have selected practice mode for level 3 ***,0,-1"
}
;-------------------------------------------------
; Adds a practice mode button for stage 4 ending
;-------------------------------------------------
add:
{
	"model" "*314"
	"wait" "4"
	"unlocked_sound" "0"
	"unlocked_sentence" "0"
	"targetname" "admin_room_practice_level_4"
	"speed" "5"
	"spawnflags" "1024"
	"sounds" "3"
	"rendermode" "0"
	"renderfx" "0"
	"rendercolor" "255 255 255"
	"renderamt" "255"
	"origin" "9255.99 -12984 6298"
	"movedir" "90 0 0"
	"locked_sound" "0"
	"locked_sentence" "0"
	"lip" "0"
	"health" "0"
	"disablereceiveshadows" "0"
	"classname" "func_button"
	"OnPressed" "math_counter_level,SetValueNoFire,8,0,-1"
	"OnPressed" "console,Command,say *** An admin have selected practice mode for level 4 ***,0,-1"
}
;----------------------------------------------------------
; Adds the new practive levels values to the stage counter
;----------------------------------------------------------
modify:
{
	match:
	{
		"origin" "9880 -13048 6281"
		"targetname" "logic_case_level"
		"classname" "logic_case"
	}
	insert:
	{
		"Case06" "6"
		"OnCase06" "stage_2_practice_relay,Trigger,,0,-1"
		"Case07" "7"
		"OnCase07" "stage_3_practice_relay,Trigger,,0,-1"
		"Case08" "8"
		"OnCase08" "stage_4_practice_relay,Trigger,,0,-1"
	}
}
;---------------------------------------------------
; Changes the max amount on the match_level counter
;---------------------------------------------------
modify:
{
	match:
	{
		"origin" "9896 -13048 6281"
		"targetname" "math_counter_level"
		"classname" "math_counter"
	}
	replace:
	{
		"max" "8"
	}
}
;----------------------------------------------------------------------------------
; Adds a new teleport destination inside boss arena in stage 2 - for practice mode
;----------------------------------------------------------------------------------
add:
{
    "targetname" "stage_2_destination_practice"
    "angles" "0 0 0"
    "spawnflags" "0"
    "origin" "11936 -9392 -1468"
    "classname" "info_target"
}
;----------------------------------------------------------------------------------
; Adds a new teleport destination inside boss arena in stage 3 - for practice mode
;----------------------------------------------------------------------------------
add:
{
    "targetname" "stage_3_destination_practice"
    "angles" "0 0 0"
    "spawnflags" "0"
    "origin" "12540 3928 6944"
    "classname" "info_target"
}
;-----------------------------------------------
; Adds a new stage_6_relay for stage s2 practice
;-----------------------------------------------
add:
{
	"origin" "9648 -12984 6280"
	"targetname" "stage_2_practice_relay"
	"StartDisabled" "0"
	"spawnflags" "0"
	"classname" "logic_relay"
	"OnTrigger" "game_text,Display,,5,-1"
	"OnTrigger" "game_text,AddOutput,message level 2 - The dark chambers - PRACTICE MODE ,0,-1"
	"OnTrigger" "stage_2_template,ForceSpawn,,0,-1"
	"OnTrigger" "main_trigger_1,Kill,,0,-1"
	"OnTrigger" "spawn_teleporter,Addoutput,target stage_2_destination_practice,2,-1"
	"OnTrigger" "spawn_teleporter,Enable,,10,-1"
	"OnTrigger" "spawn_teleporter,Disable,,12,-1"
	"OnTrigger" "spawn_teleporter,Addoutput,target s2_destination_4_cage,13,-1"
	"OnTrigger" "spawn_teleporter,Enable,,14,-1"
	"OnTrigger" "s2_hornet_intro_tracktrain,StartForward,,16,-1"
	"OnTrigger" "s2_trigger_hp_add_hornet,Enable,,18,-1"
	"OnTrigger" "s2_real_ending_relay,Kill,,16,-1"
}
;-----------------------------------------------
; Adds a new stage_7_relay for stage s3 practice
;-----------------------------------------------
add:
{
	"origin" "9648 -12984 6280"
	"targetname" "stage_3_practice_relay"
	"StartDisabled" "0"
	"spawnflags" "0"
	"classname" "logic_relay"
	"OnTrigger" "game_text,Display,,5,-1"
	"OnTrigger" "game_text,AddOutput,message level 3 - Metropolis zone - PRACTICE MODE ,0,-1"
	"OnTrigger" "stage_3_template,ForceSpawn,,0,-1"
	"OnTrigger" "main_trigger_1,Kill,,1,-1"
	"OnTrigger" "s3_real_ending_relay,Kill,,1,-1"
	"OnTrigger" "spawn_teleporter,Addoutput,target stage_3_destination_practice,2,-1"
	"OnTrigger" "spawn_teleporter,Enable,,10,-1"
	"OnTrigger" "spawn_teleporter,Disable,,14,-1"
	"OnTrigger" "spawn_teleporter,Addoutput,target s3_destination_3_cage,16,-1"
	"OnTrigger" "spawn_teleporter,Enable,,17,-1"
	"OnTrigger" "Boss_shadow_template,ForceSpawn,,19,-1"
	"OnTrigger" "Shadow_Boss_Model,FireUser1,,20,-1"
	"OnTrigger" "s3_boss_shadow_hp_add,Enable,,18,-1"
	"OnTrigger" "s3_stairs,Break,,8,-1"
	"OnTrigger" "Shadow_Boss_Model,SetAnimation,move,20,-1"
	"OnTrigger" "Shadow_Boss_Model,SetDefaultAnimation,move,20.01,-1"
	"OnTrigger" "s3_door_respawn_3,ForceSpawn,,0,-1"
	"OnTrigger" "s3_attack_timer,Enable,,22,-1"
	"OnTrigger" "s3_boss_music,PlaySound,,20,-1"
}
;-----------------------------------------------
; Adds a new stage_8_relay for stage s4 practice
;-----------------------------------------------
add:
{
	"origin" "9648 -12984 6280"
	"targetname" "stage_4_practice_relay"
	"StartDisabled" "0"
	"spawnflags" "0"
	"classname" "logic_relay"
	"OnTrigger" "game_text,Display,,5,-1"
	"OnTrigger" "game_text,AddOutput,message level 4 - The long awaited journey - PRACTICE MODE ,0,-1"
	"OnTrigger" "stage_4_template,ForceSpawn,,0,-1"
	"OnTrigger" "main_trigger_1,Kill,,0,-1"
	"OnTrigger" "main_fall_teleporter_1,AddOutput,target s4_destination_4,1,1"
	"OnTrigger" "large_teleporter_1,Addoutput,target s4_destination_4,2,-1"
	"OnTrigger" "large_teleporter_1,Enable,,6,-1"
	"OnTrigger" "s4_spawn_music,Volume,0,5,1"
	"OnTrigger" "s4_spongebobchill_music,PlaySound,,6,1"
	"OnTrigger" "large_teleporter_1,Disable,,8,-1"
	"OnTrigger" "spawn_teleporter,Addoutput,target s4_destination_4,9,-1"
	"OnTrigger" "spawn_teleporter,Enable,,10,-1"
	"OnTrigger" "s4_box_1,Break,,10,1"
	"OnTrigger" "s4_box_2,Break,,12,1"
	"OnTrigger" "s4_real_ending_relay,Kill,,6,1"
	"OnTrigger" "console,Command,say *** The patty boxes are broken run for the kitchen! ***,10,1"
	"OnTrigger" "console,Command,say *** Inside the next room you must press E on all props ***,25,1"
	"OnTrigger" "s4_teleporter_4,Enable,,20,1"
	"OnTrigger" "console,Command,say *** Zombies advance in 5 seconds ***,15,1"
}
;---------------------------------------------------------------
; Removes ending on the stag path into relays so practice works
;---------------------------------------------------------------
modify:
{
	match:
	{
		"targetname" "stage_2_relay"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "s2_practice_ending_relay,Kill,,10,-1"
	}
}
;---------------------------------------------------
; Removes s3 ending practice relay on s3 real stage
;---------------------------------------------------
modify:
{
	match:
	{
		"targetname" "stage_3_relay"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "s3_practice_relay,Kill,,10,-1"
	}
}
;---------------------------------------------------
; Removes s4 ending practice relay on s4 real stage
;---------------------------------------------------
modify:
{
	match:
	{
		"targetname" "stage_4_relay"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "s4_practice_relay,Kill,,10,-1"
	}
}
;---------------------------------------------------------------
; Removes ending on the stag path into relays so practice works
;---------------------------------------------------------------
modify:
{
	match:
	{
		"targetname" "s2_stag_path6"
		"classname" "path_track"
	}
	delete:
	{
		"OnPass" "s2_elevator_door_2,Open,,0,1"
	}
	insert:
	{
		"OnPass" "s2_real_ending_relay,Trigger,,0,1"
		"OnPass" "s2_practice_ending_relay,Trigger,,0,1"
	}
}
;-------------------------------------------------------
; Adds a logic_relay for s2 to trigger the real ending
;-------------------------------------------------------
add:
{
	"origin" "9648 -12984 6280"
	"targetname" "s2_real_ending_relay"
	"StartDisabled" "0"
	"spawnflags" "0"
	"classname" "logic_relay"
	"OnTrigger" "s2_elevator_door_2,Open,,0,1"
}
;-------------------------------------------------------
; Adds a logic_relay for s2 to trigger the real ending
;-------------------------------------------------------
add:
{
	"origin" "9648 -12984 6280"
	"targetname" "s2_practice_ending_relay"
	"StartDisabled" "0"
	"spawnflags" "0"
	"classname" "logic_relay"
	"OnTrigger" "console,Command,say *** Practice mode ends in 10 seconds ***,0,1"
	"OnTrigger" "console,Command,say *** Practice mode ends in 5 seconds ***,5,1"
	"OnTrigger" "console,Command,say *** Practice mode ended ***,10,1"
	"OnTrigger" "console,Command,say *** Practice mode 2 ended moving to Practice mode 3 ***,12,1"
	"OnTrigger" "s2_nuke,Enable,,15,1"
	"OnTrigger" "math_counter_level,SetValueNoFire,7,16,1"
}
;------------------------------------
; Adds a logic_relay for s3 practice
;------------------------------------
add:
{
	"origin" "9648 -12984 6280"
	"targetname" "s3_practice_relay"
	"StartDisabled" "0"
	"spawnflags" "0"
	"classname" "logic_relay"
	"OnTrigger" "s3_teleporter_4,Enable,,0,1"
	"OnTrigger" "console,Command,say *** Silver is preparing to throw rocks at you ***,5,1"
	"OnTrigger" "console,Command,say *** He is throwing them! ***,10,1"
	"OnTrigger" "s3_rock_throw_timer,Enable,,10,1"
	"OnTrigger" "s3_teleporter_5_falldown,Enable,,15,1"
	"OnTrigger" "console,Command,say *** Silver was defeated ***,60,1"
	"OnTrigger" "s3_rock_throw_timer,Disable,,60,1"
	"OnTrigger" "s3_escape_pod,Open,,60,1"
	"OnTrigger" "s3_silver_model,SetAnimation,stun,60,1"
	"OnTrigger" "s3_silver_model,SetDefaultAnimation,stun,60.01,1"
	"OnTrigger" "console,Command,say *** Practice mode ends in 10 seconds ***,61,1"
	"OnTrigger" "console,Command,say *** Practice mode ends in 5 seconds ***,66,1"
	"OnTrigger" "console,Command,say *** Practice mode ended humans ***,71,1"
	"OnTrigger" "console,Command,say *** Practice mode 3 ended moving to Practice mode 4 ***,72,1"
	"OnTrigger" "math_counter_level,SetValueNoFire,8,73,1"
	"OnTrigger" "s3_nuke,Enable,,73,1"
}
;---------------------------------------
; Adds a logic_relay for s3 real ending
;---------------------------------------
add:
{
	"origin" "9648 -12984 6280"
	"targetname" "s3_real_ending_relay"
	"StartDisabled" "0"
	"spawnflags" "0"
	"classname" "logic_relay"
	"OnTrigger" "s3_rock_throw_timer,Enable,,10,1"
	"OnTrigger" "s3_teleporter_4,Enable,,0,1"
	"OnTrigger" "console,Command,say *** Silver is preparing to throw rocks at you ***,5,1"
	"OnTrigger" "console,Command,say *** He is throwing them! ***,10,1"
	"OnTrigger" "s3_rock_throw_timer,Disable,,60,1"
	"OnTrigger" "s3_silver_model,SetAnimation,stun,60,1"
	"OnTrigger" "s3_silver_model,SetDefaultAnimation,stun,60.01,1"
	"OnTrigger" "s3_teleporter_5_falldown,Enable,,15,1"
	"OnTrigger" "math_counter_level,SetValueNoFire,4,70,1"
	"OnTrigger" "s3_nuke,Enable,,67,1"
	"OnTrigger" "round_end_music,PlaySound,,67,1"
	"OnTrigger" "round_fade,Fade,,69,1"
	"OnTrigger" "console,Command,say *** Map by Hobbitten & Sticky_Pg *** ,65,1"
	"OnTrigger" "console,Command,say *** You beat stage 3 - moving on to stage 4 ***,62,1"
	"OnTrigger" "console,Command,say *** Silver was defeated ***,60,1"
	"OnTrigger" "s3_escape_pod,Open,,60,1"
}
;------------------------------------
; Adds a logic_relay for s4 practice
;------------------------------------
add:
{
	"origin" "9648 -12984 6280"
	"targetname" "s4_practice_relay"
	"StartDisabled" "0"
	"spawnflags" "0"
	"classname" "logic_relay"
	"OnTrigger" "s4_patty_laser_timer,Enable,,5,1"
	"OnTrigger" "console,Command,say *** The burgers you fed patrick IS COMING BACK ***,0,1"
	"OnTrigger" "console,Command,say *** HE IS PUKING ***,5,1"
	"OnTrigger" "patrick_respawn_s4_ending,ForceSpawn,,0,1"
	"OnTrigger" "s4_patty_laser_timer,Disable,,65,1"
	"OnTrigger" "console,Command,say *** You survived Patricks dangerous burgers WELL DONE ***,65,1"
	"OnTrigger" "patty_laser_patrick_model,Kill,,65,1"
	"OnTrigger" "s4_patty_laser_timer,Kill,,65,1"
	"OnTrigger" "s4_patty_laser_case,Kill,,65,1"
	"OnTrigger" "math_counter_level,SetValueNoFire,1,79,1"
	"OnTrigger" "round_fade,Fade,,75,1"
	"OnTrigger" "round_end_music,PlaySound,,74,1"
	"OnTrigger" "s4_nuke,Enable,,77,1"
	"OnTrigger" "console,Command,say *** Practice mode 4 ended moving ***,67,1"
	"OnTrigger" "console,Command,say *** Map by Hobbitten & Sticky_Pg *** ,70,1"
	"OnTrigger" "console,Command,say *** YOU BEAT ALL PRACTICE LEVELS ASWELL WELL DONE! *** ,71,1"
}
;---------------------------------------
; Adds a logic_relay for s4 real ending
;---------------------------------------
add:
{
	"origin" "9648 -12984 6280"
	"targetname" "s4_real_ending_relay"
	"StartDisabled" "0"
	"spawnflags" "0"
	"classname" "logic_relay"
	"OnTrigger" "s4_patty_laser_timer,Enable,,5,1"
	"OnTrigger" "console,Command,say *** The burgers you fed patrick IS COMING BACK ***,0,1"
	"OnTrigger" "console,Command,say *** HE IS PUKING ***,5,1"
	"OnTrigger" "patrick_respawn_s4_ending,ForceSpawn,,0,1"
	"OnTrigger" "s4_patty_laser_timer,Disable,,65,1"
	"OnTrigger" "console,Command,say *** You survived Patricks dangerous burgers WELL DONE ***,65,1"
	"OnTrigger" "patty_laser_patrick_model,Kill,,65,1"
	"OnTrigger" "s4_patty_laser_timer,Kill,,65,1"
	"OnTrigger" "s4_patty_laser_case,Kill,,65,1"
	"OnTrigger" "math_counter_level,SetValueNoFire,5,79,1"
	"OnTrigger" "round_fade,Fade,,75,1"
	"OnTrigger" "round_end_music,PlaySound,,74,1"
	"OnTrigger" "s4_nuke,Enable,,77,1"
	"OnTrigger" "console,Command,say *** Map by Hobbitten & Sticky_Pg *** ,70,1"
	"OnTrigger" "console,Command,say *** You beat stage 4 - moving on to stage 5 ***,67,1"
}
;----------------------------------------
; Removes everything from the patty wagon
;-----------------------------------------
modify:
{
	match:
	{
		"targetname" "patty_mover"
		"classname" "func_movelinear"
		"origin" "7808 -2960 4456"
	}
	delete:
	{
		"OnFullyOpen" "s4_patty_laser_timer,Enable,,5,1"
		"OnFullyOpen" "console,Command,say *** The burgers you fed patrick IS COMING BACK ***,0,1"
		"OnFullyOpen" "console,Command,say *** HE IS PUKING ***,5,1"
		"OnFullyOpen" "patrick_respawn_s4_ending,ForceSpawn,,0,1"
		"OnFullyOpen" "s4_patty_laser_timer,Disable,,65,1"
		"OnFullyOpen" "console,Command,say *** You survived Patricks dangerous burgers WELL DONE ***,65,1"
		"OnFullyOpen" "patty_laser_patrick_model,Kill,,65,1"
		"OnFullyOpen" "s4_patty_laser_timer,Kill,,65,1"
		"OnFullyOpen" "s4_patty_laser_case,Kill,,65,1"
		"OnFullyOpen" "math_counter_level,SetValueNoFire,5,79,1"
		"OnFullyOpen" "round_fade,Fade,,75,1"
		"OnFullyOpen" "round_end_music,PlaySound,,74,1"
		"OnFullyOpen" "s4_nuke,Enable,,77,1"
		"OnFullyOpen" "console,Command,say *** Map by Hobbitten & Sticky_Pg *** ,70,1"
		"OnFullyOpen" "console,Command,say *** You beat stage 4 - moving on to stage 5 ***,67,1"
	}
	insert:
	{
		"OnFullyOpen" "s4_practice_relay,Trigger,0,-1"
		"OnFullyOpen" "s4_real_ending_relay,Trigger,0,-1"
	}
}
;-----------------------------------------------------------
; Removes everything from the glass breakable at spaceship
;-----------------------------------------------------------
modify:
{
	match:
	{
		"origin" "12779.5 12481 6983.97"
		"targetname" "s3_escape_pod_glass"
		"classname" "func_breakable"
	}
	delete:
	{
		"OnBreak" "s3_rock_throw_timer,Enable,,10,1"
		"OnBreak" "s3_teleporter_4,Enable,,0,1"
		"OnBreak" "console,Command,say *** Silver is preparing to throw rocks at you ***,5,1"
		"OnBreak" "console,Command,say *** He is throwing them! ***,10,1"
		"OnBreak" "s3_rock_throw_timer,Disable,,60,1"
		"OnBreak" "s3_silver_model,SetAnimation,stun,60,1"
		"OnBreak" "s3_silver_model,SetDefaultAnimation,stun,60.01,1"
		"OnBreak" "s3_teleporter_5_falldown,Enable,,15,1"
		"OnBreak" "math_counter_level,SetValueNoFire,4,70,1"
		"OnBreak" "s3_nuke,Enable,,67,1"
		"OnBreak" "round_end_music,PlaySound,,67,1"
		"OnBreak" "round_fade,Fade,,69,1"
		"OnBreak" "console,Command,say *** Map by Hobbitten & Sticky_Pg *** ,65,1"
		"OnBreak" "console,Command,say *** You beat stage 3 - moving on to stage 4 ***,62,1"
		"OnBreak" "console,Command,say *** Silver was defeated ***,60,1"
		"OnBreak" "s3_escape_pod,Open,,60,1"
	}
	insert:
	{
		"OnBreak" "s3_practice_relay,Trigger,0,-1"
		"OnBreak" "s3_real_ending_relay,Trigger,0,-1"
	}
}
;----------------------------------------------------------------
; After stage 5 beaten map gets set to practice mode for stage 2
;----------------------------------------------------------------
modify:
{
	match:
	{
		"targetname" "last_alien_boss_path2"
		"classname" "path_track"
	}
	delete:
	{
		"OnPass" "console,Command,say *** Resetting map back to level 1 ***,52,1"
		"OnPass" "math_counter_level,SetValueNoFire,1,63,1"
	}
	insert:
	{
		"OnPass" "console,Command,say *** Resetting map to stage 2 - PRACTICE MODE ***,52,1"
		"OnPass" "math_counter_level,SetValueNoFire,6,63,1"
	}
}
