add:
{
	"origin" "-6144 -12416 5296"
	"targetname" "TheCurrentLevelPlugin"
	"min" "1"
	"max" "6"
	"startvalue" "1"
	"classname" "math_counter"
}

modify:
{
	match:
	{
		"classname" "func_breakable"
		"hammerid" "870797"
	}
	insert:
	{
		"OnBreak" "TheCurrentLevelPlugin,SetValue,1,0,1"
	}
}
modify:
{
	match:
	{
		"classname" "func_breakable"
		"hammerid" "870857"
	}
	insert:
	{
		"OnBreak" "TheCurrentLevelPlugin,SetValue,2,0,1"
	}
}
modify:
{
	match:
	{
		"classname" "func_breakable"
		"hammerid" "870862"
	}
	insert:
	{
		"OnBreak" "TheCurrentLevelPlugin,SetValue,3,0,1"
	}
}
modify:
{
	match:
	{
		"classname" "func_breakable"
		"hammerid" "870867"
	}
	insert:
	{
		"OnBreak" "TheCurrentLevelPlugin,SetValue,4,0,1"
	}
}
modify:
{
	match:
	{
		"classname" "func_breakable"
		"hammerid" "870872"
	}
	insert:
	{
		"OnBreak" "TheCurrentLevelPlugin,SetValue,5,0,1"
	}
}
modify:
{
	match:
	{
		"classname" "func_breakable"
		"hammerid" "870877"
	}
	insert:
	{
		"OnBreak" "TheCurrentLevelPlugin,SetValue,6,0,1"
	}
}

;-------------
; MAP CHANGES
;-------------

; Disable bhop on the final run to the end (epic, god)
modify:
{
	match:
	{
		"targetname" "Airship_Trigger_Glassdoors2"
		"classname" "trigger_once"
	}
	insert:
	{
		"OnStartTouch" "cmd,Command,sv_enablebunnyhopping 0,30,1"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_once"
		"origin" "-6144 -12416 5296"
	}
	insert:
	{
		"OnStartTouch" "cmd,Command,sv_enablebunnyhopping 1,0,1"
	}
}
modify:
{
	match:
	{
		"classname" "logic_auto"
		"origin" "-15352 12440 8"
	}
	insert:
	{
		"OnNewGame" "cmd,Command,sv_enablebunnyhopping 1,0,-1"
	}
}

; Disable bhop at waterfall
;modify:
;{
;	match:
;	{
;		"classname" "func_door"
;		"origin" "4480 -7680 1376"
;		"targetname" "Door_4"
;	}
;	insert:
;	{
;		"OnOpen" "cmd,Command,sv_enablebunnyhopping 0,0,1"
;		"OnFullyClosed" "cmd,Command,sv_enablebunnyhopping 1,0,1"
;	}
;}

;------------------------
;CHANGE EXTREME BOSS HPs
;------------------------

; Dragon

filter:
{
	"targetname" "Boss_Trigger_Add_Health_Extreme"
	"classname" "trigger_multiple"
}


; Guardian

add:
{
	"model" "*359"
	"targetname" "ITS_A_FIX_OF_THE_GUARDIAN_HP"
	"StartDisabled" "1"
	"spawnflags" "1"
	"origin" "2816 -960 2304"
	"filtername" "Filter_Team_Humans"
	"classname" "trigger_once"
	"OnStartTouch" "!activator,AddOutput,OnUser1 Ehe_Guardian_HP:FireUser1::0:1,0,-1"
}

modify:
{
	match:
	{
		"targetname" "ZE_Extreme_Ending"
		"classname" "trigger_once"
		"hammerid" "975412"
	}
	insert:
	{
		"OnStartTouch" "ITS_A_FIX_OF_THE_GUARDIAN_HP,Enable,,30,1"
	}
}

modify:
{
	match:
	{
		"targetname" "ZE_Extreme_Ending"
		"classname" "trigger_multiple"
		"hammerid" "896598"
	}
	delete:
	{
		"OnStartTouch" "Ehe_Guardian_HP,Add,30,0,-1"
	}
	insert:
	{
		"OnStartTouch" "!activator,FireUser1,,0,-1"
	}
}

modify:
{
	match:
	{
		"targetname" "Ehe_Guardian_HP"
		"classname" "math_counter"
	}
	insert:
	{
		"StartDisabled" "1"
		"OnUser1" "!self,Add,30,0,-1"
	}
}

modify:
{
	match:
	{
		"origin" "-14328 13336 8"
		"classname" "logic_auto"
	}
	insert:
	{
		"OnMapSpawn" "player,FireUser1,,1,1"
		"OnMapSpawn" "Ehe_Guardian_HP,Enable,,5,1"
	}
}

;------------------------------------------------
; Disable lagcomp for the trigger above elevator
;------------------------------------------------

modify:
{
	match:
	{
		"classname" "trigger_teleport"
		"targetname" "Elevator_Blocker"
	}
	replace:
	{
		"spawnflags" "1073741825"
	}
}

;----------------------------------------------
; ANTI-TROLL: Make earth only solid for zombies
;----------------------------------------------

modify:
{
	match:
	{
		"classname" "point_template"
		"targetname" "Staff_Earth_Template"
	}
	insert:
	{
		"Template02" "Staff_Earth_Owner_Human"
		"Template03" "Staff_Earth_Owner_Zombie"
	}
}

modify:
{
	match:
	{
		"targetname" "Staff_Earth_Prop"
		"classname" "prop_dynamic"
	}
	replace:
	{
		"spawnflags" "256"
	}
}

add:
{
	"model" "*111"
	"wait" "1"
	"targetname" "Staff_Earth_Owner_Human"
	"parentname" "Staff_Earth_Prop"
	"StartDisabled" "0"
	"spawnflags" "1"
	"origin" "-14080 14592 32"
	"filtername" "Filter_Team_Humans"
	"classname" "trigger_multiple"
	"OnStartTouch" "Staff_Earth_Prop,SetOwner,,0,-1"
	"OnStartTouch" "Staff_Earth_Owner_Zombie,FireUser1,,0,1"
	"OnStartTouch" "Staff_Earth_Prop,EnableCollision,,0.04,1"
}

add:
{
	"model" "*111"
	"wait" "1"
	"targetname" "Staff_Earth_Owner_Zombie"
	"parentname" "Staff_Earth_Prop"
	"StartDisabled" "0"
	"spawnflags" "1"
	"origin" "-14080 14592 32"
	"filtername" "Filter_Team_Zombies"
	"classname" "trigger_multiple"
	"OnStartTouch" "!activator,RemoveOwner,,0,-1"
	"OnStartTouch" "Staff_Earth_Prop,EnableCollision,,0.04,1"
	"OnUser1" "!self,Enable,,0,-1"
	"OnUser1" "!self,Disable,,0.2,-1"
	"OnUser1" "!self,FireUser1,,0.22,-1"
}

;----------------------------------------------------------------------------------------------------------
; Adds 4 trigger_push to prevent adding infinite HP to the guardian rushing the humans on stage extreme
;----------------------------------------------------------------------------------------------------------
add:
{
    "model" "*259"
    "targetname" "fix_infinite_hp_on_extreme"
    "StartDisabled" "1"
    "speed" "500"
    "spawnflags" "1"
    "pushdir" "0 90 0"
    "origin" "5056 -2592 2368"
    "filtername" "Filter_Team_Humans"
    "alternateticksfix" "0"
    "classname" "trigger_push"
}
add:
{
    "model" "*259"
    "targetname" "fix_infinite_hp_on_extreme"
    "StartDisabled" "1"
    "speed" "500"
    "spawnflags" "1"
    "pushdir" "0 90 0"
    "origin" "5056 -2528 2368"
    "filtername" "Filter_Team_Humans"
    "alternateticksfix" "0"
    "classname" "trigger_push"
}
add:
{
    "model" "*259"
    "targetname" "fix_infinite_hp_on_extreme"
    "StartDisabled" "1"
    "speed" "500"
    "spawnflags" "1"
    "pushdir" "0 90 0"
    "origin" "4352 -2592 2368"
    "filtername" "Filter_Team_Humans"
    "alternateticksfix" "0"
    "classname" "trigger_push"
}
add:
{
    "model" "*259"
    "targetname" "fix_infinite_hp_on_extreme"
    "StartDisabled" "1"
    "speed" "500"
    "spawnflags" "1"
    "pushdir" "0 90 0"
    "origin" "4352 -2528 2368"
    "filtername" "Filter_Team_Humans"
    "alternateticksfix" "0"
    "classname" "trigger_push"
}
modify:
{
    match:
    {
        "targetname" "ZE_Extreme_Ending"
        "classname" "trigger_once"
        "origin" "2560 -5504 2224"
    }
    insert:
    {
        "OnStartTouch" "fix_infinite_hp_on_extreme,Enable,,1,1"
    }
}
