add:
{
	"origin" "-896 192 320"
	"targetname" "TheCurrentLevelPlugin"
	"min" "1"
	"max" "3"
	"startvalue" "1"
	"classname" "math_counter"
}


modify:
{
	match:
	{
		"targetname" "Chapter1Relay"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "TheCurrentLevelPlugin,SetValue,1,0,1"
	}
}
modify:
{
	match:
	{
		"targetname" "Chapter2Relay"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "TheCurrentLevelPlugin,SetValue,2,0,1"
	}
}
modify:
{
	match:
	{
		"targetname" "Chapter3Relay"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "TheCurrentLevelPlugin,SetValue,3,0,1"
	}
}



;; _

;; stage 1 - players can't block doors

modify:
{
	match:
	{
		"targetname" "BridgeDoors"
		"classname" "func_door_rotating"
	}
	replace:
	{
		"dmg" "1000"
	}
}

;; stage 2 - fix issue with zombies respawning after nuke

modify:
{
	match:
	{
		"targetname" "C4Counter"
		"classname" "math_counter"
	}
	insert:
	{
		"OnHitMax" "Console,Command,zr_respawn 0,0,1"
	}
}
modify:
{
	match:
	{
		"targetname" "/Chapter[2,3]Relay/"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "Console,Command,zr_respawn 1,0,1"
	}
}

;; stage 3 - fix heli movement
;
;modify:
;{
;	match:
;	{
;		"targetname" "EndingHeli"
;		"classname" "func_tracktrain"
;	}
;	replace:
;	{
;		"orientationtype" "3"
;	}
;}
;modify:
;{
;	match:
;	{
;		"targetname" "/HeliTrack[24,25,26]/"
;		"classname" "path_track"
;	}
;	replace:
;	{
;		"speed" "0"
;	}
;}

;; separate the zr commands into the relay instead of cfg file
;; for cleanliness, editing the relay again separately from the StageDisplay plugin
modify:
{
	match:
	{
		"targetname" "BlizardModeRelay"
		"classname" "logic_relay"
	}
	delete:
	{
		"OnTrigger" "Console,Command,exec antartika/blizard_overwrite,6.2,-1"
		"OnTrigger" "Console,Command,exec antartika/blizard,6,-1"
	}
	insert:
	{
		"OnTrigger" "Console,Command,zr_respawn_delay 3,6,-1"
		"OnTrigger" "Console,Command,zr_class_modify zombies health 4 1,6,-1"
		"OnTrigger" "Console,Command,zr_class_modify zombies speed 1.05 1,6,-1"
		"OnTrigger" "Console,Command,zr_class_modify zombies knockback 0.8 1,6,-1"
		"OnTrigger" "Console,Command,zr_class_reload @all,6.2,-1"
	}
}

modify:
{
	match:
	{
		"targetname" "Chapter1Relay"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "Console,Command,zr_infect_mzombie_ratio 6,0,-1"
		"OnTrigger" "Console,Command,zr_infect_spawntime_max 15,0,-1"
		"OnTrigger" "Console,Command,zr_infect_spawntime_min 15,0,-1"
		"OnTrigger" "Console,Command,zr_respawn_delay 5,0,-1"
		"OnTrigger" "Console,Command,zr_class_modify zombies health 1.5 1,0,-1"
		"OnTrigger" "Console,Command,zr_class_reload @all,1,-1"
	}
}
modify:
{
	match:
	{
		"targetname" "Chapter2Relay"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "Console,Command,zr_infect_mzombie_ratio 5,0,-1"
		"OnTrigger" "Console,Command,zr_infect_spawntime_max 13,0,-1"
		"OnTrigger" "Console,Command,zr_infect_spawntime_min 13,0,-1"
		"OnTrigger" "Console,Command,zr_respawn_delay 5,0,-1"
		"OnTrigger" "Console,Command,zr_class_modify zombies health 1.5 1,0,-1"
		"OnTrigger" "Console,Command,zr_class_reload @all,1,-1"
	}
}
modify:
{
	match:
	{
		"targetname" "Chapter3Relay"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "Console,Command,zr_infect_mzombie_ratio 5,0,-1"
		"OnTrigger" "Console,Command,zr_infect_spawntime_max 14,0,-1"
		"OnTrigger" "Console,Command,zr_infect_spawntime_min 14,0,-1"
		"OnTrigger" "Console,Command,zr_respawn_delay 5,0,-1"
		"OnTrigger" "Console,Command,zr_class_modify zombies health 1.5 1,0,-1"
		"OnTrigger" "Console,Command,zr_class_reload @all,1,-1"
	}
}


