add:
{
	"origin" "-1321 2262 98"
	"targetname" "TheCurrentLevelPlugin"
	"min" "0"
	"max" "6"
	"startvalue" "0"
	"classname" "math_counter"
}

modify:
{
	match:
	{
		"targetname" "level1_relay"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "TheCurrentLevelPlugin,SetValue,1,0,1"
	}
}
modify:
{
	match:
	{
		"targetname" "level2_relay"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "TheCurrentLevelPlugin,SetValue,2,0,1"
	}
}
modify:
{
	match:
	{
		"targetname" "level3_relay"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "TheCurrentLevelPlugin,SetValue,3,0,1"
	}
}

modify:
{
	match:
	{
		"targetname" "relay_xtrem"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "TheCurrentLevelPlugin,Add,3,0,1"
	}
}


;-----------
; MAP FIXES
;-----------

modify:
{
	match:
	{
		"targetname" "level1_kill_fin"
		"classname" "trigger_hurt"
	}
	replace:
	{
		"damage" "99999"
	}
}
modify:
{
	match:
	{
		"targetname" "level2_kill_fin"
		"classname" "trigger_hurt"
	}
	replace:
	{
		"damage" "99999"
	}
}
modify:
{
	match:
	{
		"targetname" "level3_kill_fin"
		"classname" "trigger_hurt"
	}
	replace:
	{
		"damage" "99999"
	}
}
;
;		STRIPPER BY ENCAP
;
;disabled gate loop sound and removed chat spam on first hold
 
modify:
{
	match:
	{
		"targetname" "level1_etage1_porte"
		"classname" "func_door"
		"origin" "-2434 6021.5 432.5"
	}
	replace:
	{
		"loopmovesound" "0"
	}
}
 
modify:
{
	match:
	{
		"targetname" "level1_etage1_mur_push"
		"origin" "-3230.5 6672 464"
		"classname" "trigger_push"
	}
	delete:
	{
		"OnStartTouch" "cmd,Command,say >> RETURN TO COVER THE DOOR <<<,0,-1"
	}
}
 
modify:
{
	add:
	{
		"model" "*239"
		"targetname" "level1_etage1_mur_msg"
		"StartDisabled" "0"
		"spawnflags" "1"
		"origin" "-3230.5 6669 464"
		"classname" "trigger_once"
		"OnTrigger" "cmd,Command,say >> RETURN TO COVER THE DOOR <<<,0,-1"
	}
}

;; remove stage checkpoints

; stage 1

modify:
{
	match:
	{
		"targetname" "level1_trigfin_ct"
		"classname" "trigger_once"
	}
	replace:
	{
		"StartDisabled" "1"
	}
}

modify:
{
	match:
	{
		"targetname" "level1_trigfin_ct_win"
		"classname" "trigger_multiple"
	}
	insert:
	{
		"OnStartTouch" "level1_relay_fin,Trigger,,0,1"
	}
}

; stage 2

modify:
{
	match:
	{
		"targetname" "level2_triggerfin"
		"classname" "trigger_once"
	}
	delete:
	{
		"OnStartTouch" "level2_relay_fin,Trigger,,0,1"
	}
}

modify:
{
	match:
	{
		"targetname" "level2_win_ct"
		"classname" "trigger_multiple"
	}
	insert:
	{
		"OnStartTouch" "level2_relay_fin,Trigger,,0,1"
	}
}

; stage 3

modify:
{
	match:
	{
		"targetname" "level3_toit_trigger"
		"classname" "trigger_once"
	}
	delete:
	{
		"OnStartTouch" "level3_relay_fin,Trigger,,0,1"
	}
}

modify:
{
	match:
	{
		"targetname" "level3_trigfin_ct_win"
		"classname" "trigger_multiple"
	}
	insert:
	{
		"OnStartTouch" "level3_relay_fin,Trigger,,0,1"
	}
}

;; fix afk teleport glitch spot

add:
{
	"targetname" "level1_teleport"
	"target" "level1_desti_tp"
	"StartDisabled" "1"
	"spawnflags" "1"
	"origin" "-2744 6888 256"
	"classname" "trigger_teleport"
	"OnUser1" "!self,AddOutput,solid 2,0,1"
	"OnUser1" "!self,AddOutput,mins -608 -112 -96,0.1,1"
	"OnUser1" "!self,AddOutput,maxs 608 112 96,0.1,1"
}

modify:
{
	match:
	{
		"classname" "logic_auto"
		"hammerid" "1195"
	}
	insert:
	{
		"OnMapSpawn" "level1_teleport,FireUser1,,0,-1"
	}
}

;; reduce warmup duration

modify:
{
	match:
	{
		"targetname" "zm_round_trigger1"
		"classname" "trigger_once"
	}
	delete:
	{
		"OnStartTouch" "zm_round_trigger,Enable,,150,-1"
		"OnStartTouch" "cmd,Command,say >>WARMUP ROUND<< >>ENDING IN 5s<<,145,-1"
		"OnStartTouch" "cmd,Command,say >>WARMUP ROUND<< >>ENDING IN 1 min30<<,60,-1"
		"OnStartTouch" "cmd,Command,say >>WARMUP ROUND<< >>ENDING IN 2 min30 <<,5,-1"
		"OnStartTouch" "cmd,Command,say >>WARMUP ROUND<< >>ENDING IN 30s<<,120,-1"
		"OnTrigger" "level2_shakefin,StopShake,,153,1"
		"OnTrigger" "fin_fadeout,Fade,,153,1"
		"OnTrigger" "level2_explofin,Start,,149,1"
		"OnTrigger" "level2_shakefin,StartShake,,149,1"
		"OnTrigger" "fin_fade,Fade,,149,1"
		"OnTrigger" "level2_explosion,PlaySound,,149,1"
		"OnTrigger" "level2_explofin,Stop,,152,1"
	}
	insert:
	{
		"OnStartTouch" "cmd,Command,say >>WARMUP ROUND<< >>ENDING IN 60 s<<,0,1"
		"OnStartTouch" "cmd,Command,say >>WARMUP ROUND<< >>ENDING IN 30 s<<,30,1"
		"OnStartTouch" "cmd,Command,say >>WARMUP ROUND<< >>ENDING IN 5 s<<,55,1"
		"OnStartTouch" "cmd,Command,mp_restartgame 3,60,1"
		"OnTrigger" "level2_explofin,Start,,59,1"
		"OnTrigger" "level2_shakefin,StartShake,,59,1"
		"OnTrigger" "fin_fade,Fade,,59,1"
		"OnTrigger" "level2_explosion,PlaySound,,59,1"
		"OnTrigger" "level2_explofin,Stop,,62,1"
		"OnTrigger" "level2_shakefin,StopShake,,63,1"
		"OnTrigger" "fin_fadeout,Fade,,63,1"
	}
}


