add:
{
	"origin" "-1007 -12403 -5495"
	"targetname" "TheCurrentLevelPlugin"
	"min" "1"
	"max" "5"
	"startvalue" "1"
	"classname" "math_counter"
}
modify:
{
	match:
	{
		"targetname" "stage_1_trigger"
		"classname" "trigger_once"
	}
	insert:
	{
		"OnStartTouch" "TheCurrentLevelPlugin,SetValue,1,0,1"
	}
}
modify:
{
	match:
	{
		"targetname" "stage_2_trigger"
		"classname" "trigger_once"
	}
	insert:
	{
		"OnStartTouch" "TheCurrentLevelPlugin,SetValue,2,0,1"
	}
}
modify:
{
	match:
	{
		"targetname" "stage_3_trigger"
		"classname" "trigger_once"
	}
	insert:
	{
		"OnStartTouch" "TheCurrentLevelPlugin,SetValue,3,0,1"
	}
}
modify:
{
	match:
	{
		"targetname" "stage_4_trigger"
		"classname" "trigger_once"
	}
	insert:
	{
		"OnStartTouch" "TheCurrentLevelPlugin,SetValue,4,0,1"
	}
}
modify:
{
	match:
	{
		"targetname" "stage_5_trigger"
		"classname" "trigger_once"
	}
	insert:
	{
		"OnStartTouch" "TheCurrentLevelPlugin,SetValue,5,0,1"
	}
}

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

modify:
{
	match:
	{
		"classname" "trigger_hurt"
		"targetname" "steam_judge_4_hurt"
		"origin" "6916.57 4107.2 3064.5"
		"model" "*61"
		"hammerid" "309250"
	}
	replace:
	{
		"damage" "70"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_hurt"
		"targetname" "steam_judge_5_hurt"
		"origin" "6899 2677 3064.5"
		"model" "*63"
		"hammerid" "309685"
	}
	replace:
	{
		"damage" "70"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_hurt"
		"targetname" "lv4_last_laser_c_hurt"
		"origin" "-1311.29 -10455 -4263"
		"model" "*77"
		"hammerid" "269925"
	}
	replace:
	{
		"OnStartTouch" "lv3_nael_hp,Subtract,30,0,-1"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_hurt"
		"targetname" "lv4_last_laser_b_hurt"
		"origin" "-1311.29 -10453 -4305"
		"model" "*79"
		"hammerid" "269931"
	}
	replace:
	{
		"OnStartTouch" "lv3_nael_hp,Subtract,30,0,-1"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_hurt"
		"targetname" "lv4_last_laser_a_hurt"
		"origin" "-1311.29 -10457 -4330"
		"model" "*81"
		"hammerid" "269937"
	}
	replace:
	{
		"OnStartTouch" "lv3_nael_hp,Subtract,30,0,-1"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_hurt"
		"targetname" "akh_morn_hurt"
		"origin" "6937.49 2819.51 3217"
		"model" "*86"
		"hammerid" "247303"
	}
	replace:
	{
		"damage" "50"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_hurt"
		"targetname" "dalamud_shadow_flare_hurt"
		"origin" "6937.5 2728.5 3092"
		"model" "*87"
		"hammerid" "247313"
	}
	replace:
	{
		"origin" "6937.5 2728.5 3084"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_hurt"
		"targetname" "steam_judge_1_hurt"
		"origin" "8282 2646 3057.5"
		"model" "*91"
		"hammerid" "248517"
	}
	replace:
	{
		"damage" "70"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_hurt"
		"targetname" "steam_judge_2_hurt"
		"origin" "6912.18 1366.04 3064.5"
		"model" "*94"
		"hammerid" "248599"
	}
	replace:
	{
		"damage" "70"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_hurt"
		"targetname" "steam_judge_3_hurt"
		"origin" "5485.9 2664 3064.5"
		"model" "*97"
		"hammerid" "248878"
	}
	replace:
	{
		"damage" "70"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_hurt"
		"targetname" "lv3_last_laser_a_hurt"
		"origin" "-1307.29 -10645 -4330"
		"model" "*134"
		"hammerid" "193618"
	}
	replace:
	{
		"OnStartTouch" "lv3_nael_hp,Subtract,30,0,-1"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_hurt"
		"targetname" "lv3_last_laser_b_hurt"
		"origin" "-1307.29 -10641 -4305"
		"model" "*135"
		"hammerid" "193725"
	}
	replace:
	{
		"OnStartTouch" "lv3_nael_hp,Subtract,30,0,-1"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_hurt"
		"targetname" "lv3_last_laser_c_hurt"
		"origin" "-1307.29 -10643 -4263"
		"model" "*137"
		"hammerid" "193767"
	}
	replace:
	{
		"OnStartTouch" "lv3_nael_hp,Subtract,30,0,-1"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_multiple"
		"targetname" "lv3_nael_hp_counter"
		"origin" "-3239 -6405 -3628.91"
		"model" "*141"
		"hammerid" "193856"
	}
	replace:
	{
		"OnStartTouch" "lv3_nael_hp,Add,55,0,-1"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_hurt"
		"targetname" "akh_morn_hurt"
		"origin" "-3163.5 4407.5 -10262.9"
		"model" "*187"
		"hammerid" "178584"
	}
	replace:
	{
		"damage" "50"
	}
}
modify:
{
	match:
	{
		"classname" "logic_relay"
		"targetname" "finish_relay"
		"origin" "-3534.71 10083 3607"
		"hammerid" "102362"
	}
	delete:
	{
		"OnTrigger" "servercommand,Command,say ***HARD CLEAR***,54,-1"
		"OnTrigger" "servercommand,Command,say ***Texture Support by fujione***,56,-1"
		"OnTrigger" "servercommand,Command,say ***Map made by Altima***,58,-1"
		"OnTrigger" "ffxiv_clear,PlaySound,,61,-1"
		"OnTrigger" "fade2,Fade,,60,-1"
		"OnTrigger" "map_bgm_6,StopSound,,61,-1"
		"OnTrigger" "servercommand,Command,say ***Next Level Extreme***,60,-1"
		"OnTrigger" "stage_1_brush,Enable,,60,-1"
		"OnTrigger" "stage_2_brush,Enable,,60,-1"
		"OnTrigger" "stage_3_brush,Disable,,60,-1"
		"OnTrigger" "nuke_2,Enable,,61,-1"
		"OnTrigger" "stage_4_brush,Enable,,60,-1"
	}
	insert:
	{
		"OnTrigger" "servercommand,Command,say ***HARD CLEAR***,64,-1"
		"OnTrigger" "servercommand,Command,say ***Texture Support by fujione***,66,-1"
		"OnTrigger" "servercommand,Command,say ***Map made by Altima***,68,-1"
		"OnTrigger" "ffxiv_clear,PlaySound,,71,-1"
		"OnTrigger" "fade2,Fade,,70,-1"
		"OnTrigger" "map_bgm_6,StopSound,,71,-1"
		"OnTrigger" "servercommand,Command,say ***Next Level Extreme***,70,-1"
		"OnTrigger" "stage_1_brush,Enable,,70,-1"
		"OnTrigger" "stage_2_brush,Enable,,70,-1"
		"OnTrigger" "stage_3_brush,Disable,,70,-1"
		"OnTrigger" "nuke_2,Enable,,71,-1"
		"OnTrigger" "stage_4_brush,Enable,,70,-1"
		"OnTrigger" "gravity,Enable,,46,-1"
		"OnTrigger" "gravity,Disable,,70,-1"
		"OnTrigger" "lv2_last_laser_case,PickRandom,,54,-1"
		"OnTrigger" "lv2_last_laser_case,PickRandom,,55,-1"
		"OnTrigger" "lv2_last_laser_case,PickRandom,,56,-1"
		"OnTrigger" "lv2_last_laser_case,PickRandom,,57,-1"
		"OnTrigger" "lv2_last_laser_case,PickRandom,,58,-1"
		"OnTrigger" "lv2_last_laser_case,PickRandom,,59,-1"
		"OnTrigger" "lv2_last_laser_case,PickRandom,,60,-1"
		"OnTrigger" "lv2_last_laser_case,PickRandom,,53,-1"
	}
}
modify:
{
	match:
	{
		"classname" "logic_case"
		"targetname" "behe_king_case"
		"origin" "-3593 9562 2876.08"
		"hammerid" "98642"
	}
	insert:
	{
		"OnCase04" "cart_case,PickRandom,,0,-1"
	}
}
modify:
{
	match:
	{
		"classname" "trigger_teleport"
		"targetname" "1st_tele"
		"origin" "7275 -12298 -4527"
		"hammerid" "200468"
	}
	insert:
	{
		"OnStartTouch" "!activator,AddOutput,gravity 1,0,-1"
		"OnEndTouch" "!activator,AddOutput,gravity 1,0,-1"
	}
}
add:
{
	"targetname" "gravity"
	"origin" "-3649.5 10152.5 2153"
	"model" "*308"
	"StartDisabled" "1"
	"spawnflags" "4097"
	"filtername" "ct_filter"
	"wait" "1"
	"classname" "trigger_multiple"
	"OnStartTouch" "!activator,AddOutput,gravity -0.5,0,-1"
	"OnEndTouch" "!activator,AddOutput,gravity 1,0,-1"
}
;--------------------------------
;----------enable bhop-----------
;--------------------------------
modify:
{
	match:
	{
		"classname" "logic_auto"
	}
	delete:
	{
		"OnMapSpawn" "servercommand,Command,sv_enablebunnyhopping 0,0,-1"
	}
}
;-----------------------------------------------------
;-------fix stage2 glitching on the side pillar-------
;-----------------------------------------------------
add:
{
	"classname" "trigger_hurt"
	"targetname" "hurt_on_stage2"
	"origin" "-3648 10176 2176"
	"damage" "500"
	"damagecap" "1000"
	"damagemodel" "0"
	"damagetype" "0"
	"nodmgforce" "0"
	"spawnflags" "1"
	"StartDisabled" "1"
}
;--------------------------------------------------
;-------------fix stage4 tp avoid spot-------------
;--------------------------------------------------
add:
{
	"targetname" "afk_tele_8_extra"
	"target" "bahamut_zombie_telepoint"
	"StartDisabled" "1"
	"spawnflags" "1"
	"origin" "-5120 -6336 -5120"
	"classname" "trigger_teleport"
}
modify:
{
	match:
	{
		"classname" "logic_auto"
		"hammerid" "15616"
	}
	insert:
	{
		"OnMapSpawn" "hurt_on_stage2,AddOutput,solid 2,0.5,1"
		"OnMapSpawn" "hurt_on_stage2,AddOutput,mins -512 -512 -1216,1,1"
		"OnMapSpawn" "hurt_on_stage2,AddOutput,maxs 512 512 1216,1,1"
		"OnMapSpawn" "afk_tele_8_extra,AddOutput,solid 2,0.5,1"
		"OnMapSpawn" "afk_tele_8_extra,AddOutput,mins -1024 -1024 -256,1,1"
		"OnMapSpawn" "afk_tele_8_extra,AddOutput,maxs 1024 1024 256,1,1"
	}
}
modify:
{
	match:
	{
		"classname" "logic_relay"
		"targetname" "finish_relay"
	}
	insert:
	{
		"OnTrigger" "hurt_on_stage2,Enable,,45,1"
	}
}
modify:
{
	match:
	{
		"classname" "logic_relay"
		"targetname" "bahamut_win_relay"
	}
	insert:
	{
		"OnTrigger" "afk_tele_8_extra,Disable,,0,-1"
	}
}
modify:
{
	match:
	{
		"classname" "logic_relay"
		"targetname" "bahamut_appear_relay"
	}
	insert:
	{
		"OnTrigger" "afk_tele_8_extra,Enable,,5,-1"
	}
}