;---------------------------------------------------------
; Removing the function that set the money to the players
;---------------------------------------------------------
modify:
{
	match:
	{
		"targetname" "to_start"
		"classname" "trigger_once"
	}
	delete:
	{
		"OnTrigger" "shop_script,RunScriptCode,SetCTsMoneyTo6000(),20.01,-1"
	}
}

;-------------------------------------------
; Adding more zombies to the boss fight (4)
;-------------------------------------------
modify:
{
	match:
	{
		"targetname" "boss_arena_teleport_relay"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "temp_zm_to_boss_attack,ForceSpawn,,5.21,-1"
		"OnTrigger" "temp_zm_to_boss_attack,ForceSpawn,,5.42,-1"
		"OnTrigger" "temp_zm_to_boss_attack,ForceSpawn,,5.63,-1"
	}
}

;------------------------------------
; Increasing the zombie regeneration
;------------------------------------
modify:
{
	match:
	{
		"classname" "logic_auto"
		"origin" "849 3793 104"
	}
	delete:
	{
		"OnMapSpawn" "cmd,Command,zr_class_modify zombies health_regen_amount 50,0.01,-1"
	}
	insert:
	{
		"OnMapSpawn" "cmd,Command,zr_class_modify zombies health_regen_amount 200,0.01,-1"
	}
}

;-------------------------------------------
; Killing zombies shop lately if overdefend
;-------------------------------------------
modify:
{
	match:
	{
		"origin" "-1448 568 1368"
		"targetname" "case_time1"
		"classname" "logic_case"
		"hammerid" "535984"
	}
	delete:
	{
		"OnCase01" "dyn_1,Kill,,0,-1"
		"OnCase01" "button_shop_zm_1,Kill,,0,-1"
	}
	insert:
	{
		"OnCase01" "dyn_1,Kill,,15,-1"
		"OnCase01" "button_shop_zm_1,Kill,,15,-1"
		"OnCase01" "part_shop_zm_1,Kill,,15,-1"
	}
}

;
;shop zm 2
;
modify:
{
	match:
	{
		"origin" "1672 936 72"
		"targetname" "case_time2"
		"classname" "logic_case"
		"hammerid" "765327"
	}
	delete:
	{
		"OnCase01" "dyn_2,Kill,,0,-1"
		"OnCase01" "button_shop_zm_2,Kill,,0,-1"
		"OnCase01" "part_shop_zm_2,Kill,,0,-1"
	}
	insert:
	{
		"OnCase01" "dyn_2,Kill,,15,-1"
		"OnCase01" "button_shop_zm_2,Kill,,15,-1"
		"OnCase01" "part_shop_zm_2,Kill,,15,-1"
	}
}

;
;shop zm 3
;
modify:
{
	match:
	{
		"origin" "5368 504 -376"
		"targetname" "case_time3"
		"classname" "logic_case"
		"hammerid" "765538"
	}
	delete:
	{
		"OnCase01" "dyn_3,Kill,,0,-1"
		"OnCase01" "button_shop_zm_3,Kill,,0,-1"
		"OnCase01" "part_shop_zm_3,Kill,,0,-1"
	}
	insert:
	{
		"OnCase01" "dyn_3,Kill,,15,-1"
		"OnCase01" "button_shop_zm_3,Kill,,15,-1"
		"OnCase01" "part_shop_zm_3,Kill,,15,-1"
	}
}

;
;shop zm 4
;
modify:
{
	match:
	{
		"origin" "4920 -2328 -824"
		"targetname" "case_time4"
		"classname" "logic_case"
		"hammerid" "767050"
	}
	delete:
	{
		"OnCase01" "dyn_4,Kill,,0,-1"
		"OnCase01" "button_shop_zm_4,Kill,,0,-1"
		"OnCase01" "part_shop_zm_4,Kill,,0,-1"
	}
	insert:
	{
		"OnCase01" "dyn_4,Kill,,15,-1"
		"OnCase01" "button_shop_zm_4,Kill,,15,-1"
		"OnCase01" "part_shop_zm_4,Kill,,15,-1"
	}
}

;---------------------------------------
; Increasing the number of zombie items
;---------------------------------------
modify:
{
	match:
	{
		"targetname" "counter_zm_items"
		"origin" "-3018 596.075 1347.48"
		"classname" "math_counter"
	}
	replace:
	{
		"max" "20"
	}
}

;---------------------------------------------------
; Increasing the time to defend on all counter time
;---------------------------------------------------
modify:
{
	match:
	{
		"targetname" "counter_time1"
		"classname" "math_counter"
	}
	replace:
	{
		"startvalue" "22"
	}
}
modify:
{
	match:
	{
		"targetname" "counter_time2"
		"classname" "math_counter"
	}
	replace:
	{
		"startvalue" "22"
	}
}
modify:
{
	match:
	{
		"targetname" "counter_time3"
		"classname" "math_counter"
	}
	replace:
	{
		"startvalue" "22"
	}
}
modify:
{
	match:
	{
		"targetname" "counter_time4"
		"classname" "math_counter"
	}
	replace:
	{
		"startvalue" "22"
	}
}
modify:
{
	match:
	{
		"targetname" "counter_time5"
		"classname" "math_counter"
	}
	replace:
	{
		"startvalue" "22"
	}
}

;---------------------
; Fixing glitch arena
;---------------------
modify:
{
	match:
	{
		"targetname" "tm_testing_boss_or_not"
		"classname" "trigger_multiple"
		"origin" "4704 -5344 1308"
	}
	replace:
	{
		"origin" "4704 -5472 1308"
	}
}

;-------------------------
; Fixing elevator knifing
;-------------------------
add:
{
"model" "*56"
"targetname" "elevator_1_top_break"
"spawnobject" "0"
"spawnflags" "1"
"rendermode" "0"
"renderfx" "0"
"rendercolor" "255 255 255"
"renderamt" "255"
"propdata" "0"
"pressuredelay" "0"
"physdamagescale" "1.0"
"PerformanceMode" "0"
"parentname" "elevator_1"
"origin" "-1168 704 1468z"
"nodamageforces" "0"
"minhealthdmg" "0"
"material" "0"
"health" "1"
"gibdir" "0 0 0"
"explosion" "0"
"ExplodeRadius" "0"
"explodemagnitude" "0"
"ExplodeDamage" "0"
"disableshadows" "0"
"disablereceiveshadows" "0"
"classname" "func_breakable"
}
add:
{
"model" "*56"
"targetname" "elevator_1_top_break"
"spawnobject" "0"
"spawnflags" "1"
"rendermode" "0"
"renderfx" "0"
"rendercolor" "255 255 255"
"renderamt" "255"
"propdata" "0"
"pressuredelay" "0"
"physdamagescale" "1.0"
"PerformanceMode" "0"
"parentname" "elevator_1"
"origin" "-1168 704 1476"
"nodamageforces" "0"
"minhealthdmg" "0"
"material" "0"
"health" "1"
"gibdir" "0 0 0"
"explosion" "0"
"ExplodeRadius" "0"
"explodemagnitude" "0"
"ExplodeDamage" "0"
"disableshadows" "0"
"disablereceiveshadows" "0"
"classname" "func_breakable"
}

;--------------------------------
; Fix incorrect targetname usage
;--------------------------------
modify:
{
	match:
	{
		"hammerid" "/777383|798601/"
		"classname" "trigger_teleport"
	}
	delete:
	{
		"OnStartTouch" "!activator,AddOutput,targetname player,0,-1"
	}
	insert:
	{
		"OnStartTouch" "!activator,AddOutput,targetname player_none,0,-1"
	}
}

modify:
{
	match:
	{
		"hammerid" "1838075"
		"classname" "trigger_multiple"
	}
	delete:
	{
		"OnStartTouch" "!activator,AddOutput,targetname player,0,-1"
	}
	insert:
	{
		"OnStartTouch" "!activator,AddOutput,targetname player_none,0,-1"
	}
}

modify:
{
	match:
	{
		"targetname" "player"
		"classname" "filter_activator_name"
	}
	replace:
	{
		"filtername" "player"
	}
}