add:
{
	"origin" "5325.2 -712.196 -4647"
	"targetname" "TheCurrentLevelPlugin"
	"min" "1"
	"max" "3"
	"startvalue" "1"
	"classname" "math_counter"
}

modify:
{
	match:
	{
		"targetname" "faciltriggeractivador"
		"classname" "trigger_multiple"
	}
	insert:
	{
		"OnStartTouch" "TheCurrentLevelPlugin,SetValue,1,0,1"
	}
}
modify:
{
	match:
	{
		"targetname" "normaltriggeractivador"
		"classname" "trigger_multiple"
	}
	insert:
	{
		"OnStartTouch" "TheCurrentLevelPlugin,SetValue,2,0,1"
	}
}
modify:
{
	match:
	{
		"targetname" "dificiltriggeractivador"
		"classname" "trigger_multiple"
	}
	insert:
	{
		"OnStartTouch" "TheCurrentLevelPlugin,SetValue,3,0,1"
	}
}

;Helicopter not controllable anymore by players (stages 1 & 2 ending)

modify:
{
	match:
	{
		"classname"		"func_tracktrain"
		"targetname"	"hydra_track"
	}
	replace:
	{
		"spawnflags"	"515"
	}
}

;Disable all shadows. Fix crash maybe

modify:
{
	match:
	{
		"classname" "func_door"
	}
	replace:
	{
		 "disablereceiveshadows" "1"
         "disableshadows" "1"
	}
}
modify:
{
	match:
	{
		"classname" "func_button"
	}
	replace:
	{
		 "disablereceiveshadows" "1"
         "disableshadows" "1"
	}
}
modify:
{
	match:
	{
		"classname" "func_breakable"
	}
	replace:
	{
		 "disablereceiveshadows" "1"
         "disableshadows" "1"
	}
}
modify:
{
	match:
	{
		"classname" "func_brush"
	}
	replace:
	{
		 "disablereceiveshadows" "1"
         "disableshadows" "1"
	}
}
modify:
{
	match:
	{
		"classname" "func_tracktrain"
	}
	replace:
	{
		 "disablereceiveshadows" "1"
         "disableshadows" "1"
	}
}
modify:
{
	match:
	{
		"classname" "func_illusionary"
	}
	replace:
	{
		 "disablereceiveshadows" "1"
         "disableshadows" "1"
	}
}
modify:
{
	match:
	{
		"classname" "func_physbox_multiplayer"
	}
	replace:
	{
		 "disablereceiveshadows" "1"
         "disableshadows" "1"
	}
}
modify:
{
	match:
	{
		"classname" "func_wall_toggle"
	}
	replace:
	{
		 "disablereceiveshadows" "1"
         "disableshadows" "1"
	}
}
modify:
{
	match:
	{
		"classname" "func_tanktrain"
	}
	replace:
	{
		 "disablereceiveshadows" "1"
         "disableshadows" "1"
	}
}
modify:
{
	match:
	{
		"classname" "func_rotating"
	}
	replace:
	{
		 "disablereceiveshadows" "1"
         "disableshadows" "1"
	}
}
modify:
{
	match:
	{
		"classname" "func_movelinear"
	}
	replace:
	{
		 "disablereceiveshadows" "1"
         "disableshadows" "1"
	}
}
modify:
{
	match:
	{
		"classname" "func_physbox"
	}
	replace:
	{
		 "disablereceiveshadows" "1"
         "disableshadows" "1"
	}
}



;; _

;; stage 3 - fix afk teleport glitch spot

add:
{
	"targetname" "tele_explosion"
	"target" "tele_agua"
	"StartDisabled" "1"
	"spawnflags" "1"
	"origin" "7784.5 -3520.5 932.5"
	"classname" "trigger_teleport"
	"OnUser1" "!self,AddOutput,solid 2,0,1"
	"OnUser1" "!self,AddOutput,mins -387.5 -980.5 -211.5,0.1,1"
	"OnUser1" "!self,AddOutput,maxs 387.5 980.5 211.5,0.1,1"
}
modify:
{
	match:
	{
		"classname" "logic_auto"
		"hammerid" "4561"
	}
	insert:
	{
		"OnMapSpawn" "tele_explosion,FireUser1,,0,-1"
	}
}

;; stage 3 - ending balance

modify:
{
	match:
	{
		"targetname" "tele_explosion"
		"classname" "trigger_teleport"
	}
	replace:
	{
		"target" "tele_agua"
	}
}
modify:
{
	match:
	{
		"targetname" "boton_ascensor_extremo"
		"classname" "func_button"
	}
	insert:
	{
		"OnPressed" "tele_ascensor_tri_2,ClearParent,,13,1"
	}
}
modify:
{
	match:
	{
		"targetname" "ascensorfinal_3"
		"classname" "path_track"
	}
	delete:
	{
		"OnPass" "tele_ascensor_tri_2,ClearParent,,0,-1"
	}
}
modify:
{
	match:
	{
		"targetname" "ascensorfinal_4"
		"classname" "path_track"
	}
	delete:
	{
		"OnPass" "tele_ascensor_tri_2,Kill,,14,-1"
	}
}

;; stage 3 - fix hoverboat pathing

filter:
{
	"targetname" "/hover_((12)|(14)|(32)|(34)|(33)|(21)|(25)|(16)|(24)|(26)|(30))/"
	"classname" "path_track"
}

modify:
{
	match:
	{
		"targetname" "hover_20"
		"classname" "path_track"
	}
	replace:
	{
		"origin" "9718 524 -2646"
		"target" "hover_15"
	}
}
modify:
{
	match:
	{
		"targetname" "hover_15"
		"classname" "path_track"
	}
	replace:
	{
		"origin" "9387 211 -2642"
		"target" "hover_22"
	}
}
modify:
{
	match:
	{
		"targetname" "hover_22"
		"classname" "path_track"
	}
	replace:
	{
		"origin" "9656 -209 -2642"
	}
}

;; stage 3 - increase boss hp

modify:
{
	match:
	{
		"targetname" "trigger_boss_activar"
		"classname" "trigger_multiple"
	}
	delete:
	{
		"OnStartTouch" "vidajefe,Add,80,0,-1"
	}
	insert:
	{
		"OnStartTouch" "vidajefe,Add,100,0,-1"
	}
}


