add:
{
	"origin" "164 -972 -565.5"
	"targetname" "TheCurrentLevelPlugin"
	"min" "1"
	"max" "3"
	"startvalue" "1"
	"classname" "math_counter"
}

modify:
{
	match:
	{
		"targetname" "Level"
		"classname" "logic_case"
	}
	insert:
	{
		"OnCase01" "TheCurrentLevelPlugin,SetValue,1,0,1"
		"OnCase02" "TheCurrentLevelPlugin,SetValue,2,0,1"
		"OnCase03" "TheCurrentLevelPlugin,SetValue,3,0,1"
	}
}


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


modify:
{
	match:
	{
		"targetname" "CounterPikachuCtsTrigger"
	}
	delete:
	{
		"OnStartTouch" "CounterPikachuCTs,Add,40,0,-1"
	}
	insert:
	{
		"OnStartTouch" "CounterPikachuCTs,Add,200,0,-1"
	}
}

modify:
{
	match:
	{
		"targetname" "CounterPikachuCTs"
	}
	replace:
	{
		"startvalue" "100"
		"max" "30000"
	}
}

modify:
{
	match:
	{
		"classname" "trigger_multiple"
		"model" "*143"
	}
	delete:
	{
		"OnStartTouch" "CounterSigilyphCTs,Add,45,0,-1"
	}
	insert:
	{
		"OnStartTouch" "CounterSigilyphCTs,Add,10,0,-1"
	}
}


modify:
{
	match:
	{
		"classname" "trigger_multiple"
		"model" "*250"
	}
	delete:
	{
		"OnStartTouch" "CounterZapdosCTs,Add,75,0,-1"
	}
	insert:
	{
		"OnStartTouch" "CounterZapdosCTs,Add,300,0,-1"
	}
}

modify:
{
	match:
	{
		"targetname" "CounterZapdosCTs"
	}
	replace:
	{
		"startvalue" "100"
		"max" "30000"
	}
}

modify:
{
	match:
	{
		"classname" "trigger_multiple"
		"model" "*151"
	}
	delete:
	{
		"OnStartTouch" "CounterLastBoss,Add,20,0,-1"
		"OnStartTouch" "HPCounter,Add,8,0,-1"
		"OnStartTouch" "HPCounterBackUp,Add,8,0,-1"
	}
	insert:
	{
		"OnStartTouch" "CounterLastBoss,Add,350,0,-1"
		"OnStartTouch" "HPCounter,Add,80,0,-1"
		"OnStartTouch" "HPCounterBackUp,Add,80,0,-1"
	}
}


modify:
{
	match:
	{
		"targetname" "CounterLastBoss"
	}
	replace:
	{
		"startvalue" "100"
		"max" "30000"
	}
}

modify:
{
	match:
	{
		"targetname" "CharizardGrenades"
	}
	delete:
	{
		"OnHealthChanged" "HPCounter,Subtract,5,0.25,-1"
		"OnHealthChanged" "HPCounter,Subtract,5,0.2,-1"
		"OnHealthChanged" "HPCounter,Subtract,5,0.15,-1"
		"OnHealthChanged" "HPCounter,Subtract,5,0.1,-1"
		"OnHealthChanged" "HPCounter,Subtract,5,0.05,-1"
	}
	insert:
	{
		"OnHealthChanged" "HPCounter,Subtract,10,0.25,-1"
		"OnHealthChanged" "HPCounter,Subtract,10,0.2,-1"
		"OnHealthChanged" "HPCounter,Subtract,10,0.15,-1"
		"OnHealthChanged" "HPCounter,Subtract,10,0.1,-1"
		"OnHealthChanged" "HPCounter,Subtract,10,0.05,-1"
	}
}

modify:
{
	match:
	{
		"targetname" "HPCounter"
	}
	replace:
	{
		"startvalue" "100"
		"max" "30000"
	}
}

modify:
{
	match:
	{
		"targetname" "HPCounterBackUp"
	}
	replace:
	{
		"startvalue" "100"
		"max" "30000"
	}
}

;STAGE 3 MOVE BACK FAIL TRIGGER
modify:
{
	match:
	{
		"classname" "trigger_once"
		"model" "*98"
	}
	replace:
	{
		"origin" "4913 -11168 -583"
	}
}

;FINAL BOSS CROUCH VENT
add:
{
	"model" "*335"
	"classname" "func_breakable"
	"disablereceiveshadows" "1"
	"disableshadows" "1"
	"ExplodeDamage" "0"
	"explodemagnitude" "0"
	"ExplodeRadius" "0"
	"explosion" "0"
	"gibdir" "0 0 0"
	"health" "0"
	"material" "1"
	"minhealthdmg" "0"
	"nodamageforces" "0"
	"origin" "6281.5 -11405 -656.5"
	"PerformanceMode" "0"
	"physdamagescale" "1.0"
	"pressuredelay" "0"
	"propdata" "0"
	"renderamt" "255"
	"rendercolor" "255 255 255"
	"renderfx" "0"
	"rendermode" "0"
	"spawnflags" "1"
	"spawnobject" "0"
	"targetname" "zvent"
}

;STAGE 3 SHORTCUT GLITCH BLOCKERS
add:
{
	"model" "*53"
	"classname" "func_breakable"
	"disablereceiveshadows" "1"
	"disableshadows" "1"
	"ExplodeDamage" "0"
	"explodemagnitude" "0"
	"ExplodeRadius" "0"
	"explosion" "0"
	"gibdir" "0 0 0"
	"health" "0"
	"material" "1"
	"minhealthdmg" "0"
	"nodamageforces" "0"
	"origin" "12364 -8624 176.63"
	"PerformanceMode" "0"
	"physdamagescale" "1.0"
	"pressuredelay" "0"
	"propdata" "0"
	"renderamt" "255"
	"rendercolor" "255 255 255"
	"renderfx" "0"
	"rendermode" "0"
	"spawnflags" "1"
	"spawnobject" "0"
	"targetname" "glitchblock"
}

add:
{
	"model" "*53"
	"classname" "func_breakable"
	"disablereceiveshadows" "1"
	"disableshadows" "1"
	"ExplodeDamage" "0"
	"explodemagnitude" "0"
	"ExplodeRadius" "0"
	"explosion" "0"
	"gibdir" "0 0 0"
	"health" "0"
	"material" "1"
	"minhealthdmg" "0"
	"nodamageforces" "0"
	"origin" "12364 -9169 176.63"
	"PerformanceMode" "0"
	"physdamagescale" "1.0"
	"pressuredelay" "0"
	"propdata" "0"
	"renderamt" "255"
	"rendercolor" "255 255 255"
	"renderfx" "0"
	"rendermode" "0"
	"spawnflags" "1"
	"spawnobject" "0"
	"targetname" "glitchblock"
}

add:
{
	"model" "*53"
	"classname" "func_breakable"
	"disablereceiveshadows" "1"
	"disableshadows" "1"
	"ExplodeDamage" "0"
	"explodemagnitude" "0"
	"ExplodeRadius" "0"
	"explosion" "0"
	"gibdir" "0 0 0"
	"health" "0"
	"material" "1"
	"minhealthdmg" "0"
	"nodamageforces" "0"
	"origin" "12364 -9506 79.63"
	"PerformanceMode" "0"
	"physdamagescale" "1.0"
	"pressuredelay" "0"
	"propdata" "0"
	"renderamt" "255"
	"rendercolor" "255 255 255"
	"renderfx" "0"
	"rendermode" "0"
	"spawnflags" "1"
	"spawnobject" "0"
	"targetname" "glitchblock"
}

add:
{
	"model" "*53"
	"classname" "func_breakable"
	"disablereceiveshadows" "1"
	"disableshadows" "1"
	"ExplodeDamage" "0"
	"explodemagnitude" "0"
	"ExplodeRadius" "0"
	"explosion" "0"
	"gibdir" "0 0 0"
	"health" "0"
	"material" "1"
	"minhealthdmg" "0"
	"nodamageforces" "0"
	"origin" "11735 -11443 79.63"
	"PerformanceMode" "0"
	"physdamagescale" "1.0"
	"pressuredelay" "0"
	"propdata" "0"
	"renderamt" "255"
	"rendercolor" "255 255 255"
	"renderfx" "0"
	"rendermode" "0"
	"spawnflags" "1"
	"spawnobject" "0"
	"targetname" "glitchblock"
}

add:
{
	"model" "*53"
	"classname" "func_breakable"
	"disablereceiveshadows" "1"
	"disableshadows" "1"
	"ExplodeDamage" "0"
	"explodemagnitude" "0"
	"ExplodeRadius" "0"
	"explosion" "0"
	"gibdir" "0 0 0"
	"health" "0"
	"material" "1"
	"minhealthdmg" "0"
	"nodamageforces" "0"
	"origin" "12364 -8549 79.63"
	"PerformanceMode" "0"
	"physdamagescale" "1.0"
	"pressuredelay" "0"
	"propdata" "0"
	"renderamt" "255"
	"rendercolor" "255 255 255"
	"renderfx" "0"
	"rendermode" "0"
	"spawnflags" "1"
	"spawnobject" "0"
	"targetname" "glitchblock"
}

add:
{
	"model" "*53"
	"classname" "func_breakable"
	"disablereceiveshadows" "1"
	"disableshadows" "1"
	"ExplodeDamage" "0"
	"explodemagnitude" "0"
	"ExplodeRadius" "0"
	"explosion" "0"
	"gibdir" "0 0 0"
	"health" "0"
	"material" "1"
	"minhealthdmg" "0"
	"nodamageforces" "0"
	"origin" "13022 -11443 79.63"
	"PerformanceMode" "0"
	"physdamagescale" "1.0"
	"pressuredelay" "0"
	"propdata" "0"
	"renderamt" "255"
	"rendercolor" "255 255 255"
	"renderfx" "0"
	"rendermode" "0"
	"spawnflags" "1"
	"spawnobject" "0"
	"targetname" "glitchblock"
}

;STAGE 1 ZOMBIE CAGE STUCK TELEPORT
modify:
{
	match:
	{
		"targetname" "TeleportLvl1Jail"
		"model" "*51"
	}
	replace:
	{
		"origin" "2240 -14179.5 404"
	}
}

;FINAL BOSS SPIN ATTACK FIX
modify:
{
	match:
	{
		"targetname" "CharizardAttacks"
	}
	delete:
	{
		"OnCase01" "CharizardRotating,ClearParent,,1,-1"
		"OnCase01" "CY01Physic,SetParent,CharizardRotating,1.5,-1"
		"OnCase01" "CY01Physic,ClearParent,,10,-1"
		"OnCase01" "CharizardRotating,SetParent,CY01Physic,12,-1"
	}
}

;INCREASE PHYSBOX HEALTH

modify:
{
	match:
	{
		"targetname" "PikachuBullets"
	}
	replace:
	{
		"health" "9999999"
	}
}

modify:
{
	match:
	{
		"targetname" "SigilyphBullets"
	}
	replace:
	{
		"health" "9999999"
	}
}

modify:
{
	match:
	{
		"targetname" "ZapdosBullets"
	}
	replace:
	{
		"health" "9999999"
	}
}

modify:
{
	match:
	{
		"targetname" "FinalBossBullets"
	}
	replace:
	{
		"health" "9999999"
	}
}

modify:
{
	match:
	{
		"targetname" "CharizardBullets"
	}
	replace:
	{
		"health" "9999999"
	}
}

;FINAL BOSS PLAYER BLOCKING FIX
modify:
{
	match:
	{
		"targetname" "Charizard"
	}
	replace:
	{
		"solid" "0"
	}
}

modify:
{
	match:
	{
		"targetname" "CharizardMoveLinear"
	}
	replace:
	{
		"blockdamage" "50000"
	}
}




;; _

;; fix ammo

modify:
{
	match:
	{
		"targetname" "ButtonAmmo"
		"classname" "func_button"
	}
	insert:
	{
		"OnPressed" "WeaponAmmoGive,Disable,,5.1,-1"
	}
}
modify:
{
	match:
	{
		"targetname" "ButtonAmmo90"
		"classname" "func_button"
	}
	insert:
	{
		"OnPressed" "WeaponAmmoGive90,Disable,,5.1,-1"
	}
}
modify:
{
	match:
	{
		"targetname" "ButtonAmmo180"
		"classname" "func_button"
	}
	insert:
	{
		"OnPressed" "WeaponAmmoGive180,Disable,,5.1,-1"
	}
}