;-------------------------------------------
;-----------|S T R I P P E R|---------------
;-----------|	  B Y	  |---------------
;-----------|  K L I X U S  |---------------
;-------------------------------------------


;-------------------------------------------
;---------------|STAGE 1|-------------------
;-------------------------------------------

;-----------|BOSS TP GLITCH|----------------
add:
{
	"model" "*388"
	"targetname" "AFK_Teleport3"
	"target" "AFK_Teleport2Gym_Alpha"
	"StartDisabled" "1"
	"spawnflags" "4097"
	"origin" "13969.3 -7036.98 12543"
	"classname" "trigger_teleport"
}

;-------------------------------------------
;---------------|STAGE 2|-------------------
;-------------------------------------------

;-----------|CAMP IN BOSS AREA|-------------

add:
{
	"targetname" "VioletCity_ZCage_TP"
	"target" "Route_32_Cage_Dest"
	"StartDisabled" "1"
	"spawnflags" "1"
	"origin" "14016 -5632 13439"
	"classname" "trigger_teleport"
	"OnUser1" "!self,AddOutput,mins -704 -1664 -1420,0,1"
	"OnUser1" "!self,AddOutput,maxs 704 1664 1420,0,1"
	"OnUser1" "!self,AddOutput,solid 2,0.1,1"
}

modify:
{
	match:
	{
		"classname" "logic_auto"
		"hammerid" "1074650"
	}
	insert:
	{
		"OnMapSpawn" "VioletCity_ZCage_TP,FireUser1,,1,1"
	}
}


;-------------------------------------------
;---------------|STAGE 3|-------------------
;-------------------------------------------

;----------------------------------------------------------------
;Fix Stage 3 Groudon's Roar that can happen after Groudon's death
;By Moltard
;----------------------------------------------------------------

modify:
{
	match:
	{
		"classname" "func_breakable"
		"targetname" "Groudon"
	}
	insert:
	{
		"OnBreak" "groudon_roar_relay,CancelPending,,0,1"
		"OnBreak" "groudon_roar_relay,Disable,,0,1"
	}
}
;-------------------------------------------
;---------------|STAGE 4|-------------------
;-------------------------------------------


;-------------------------------------------
;-----------|BOSS HP INCREASE|--------------
;-------------------------------------------

;--------------|GIRANTINA|------------------
modify:
{
	match:
	{
		"targetname" "giratinahp"
		"classname" "math_counter"
		"hammerid" "416932"
	}
	replace:
	{
		"max" "30000"
		"startvalue" "500"
	}
}


;-------------------------------------------
;---------------|STAGE 5|-------------------
;-------------------------------------------

;-----ATTEMPT TO FIX LAST LASER DMG---------
modify:
{
	match:
	{
		"targetname" "Level5_FinalTrigger"
		"classname" "trigger_once"
		"hammerid" "693701"
	}
	delete:
	{
		"OnStartTouch" "Level5_FinalLasers_PickRandom,PickRandom,,44,-1"
		"OnStartTouch" "Level5_FinalLasers_PickRandom,PickRandom,,45,-1"
		"OnStartTouch" "Level5_FinalLasers_PickRandom,PickRandom,,46,-1"
		"OnStartTouch" "Level5_FinalLasers_PickRandom,PickRandom,,47,-1"
		"OnStartTouch" "Level5_FinalLasers_PickRandom,PickRandom,,48,-1"
		"OnStartTouch" "Level5_FinalLasers_PickRandom,PickRandom,,49,-1"
		"OnStartTouch" "Level5_FinalLasers_PickRandom,PickRandom,,50,-1"
		"OnStartTouch" "Level5_FinalLaserUPRIGHT_Relay,Trigger,,60,-1"
		"OnStartTouch" "Level5_FinalLaserUPLEFT_Relay,Trigger,,60,-1"
	}
	insert:
	{
		"OnStartTouch" "Level5_FinalLasers_PickRandom,PickRandom,,44,1"
		"OnStartTouch" "Level5_FinalLasers_PickRandom,PickRandom,,45,1"
		"OnStartTouch" "Level5_FinalLasers_PickRandom,PickRandom,,46,1"
		"OnStartTouch" "Level5_FinalLasers_PickRandom,PickRandom,,47,1"
		"OnStartTouch" "Level5_FinalLasers_PickRandom,PickRandom,,48,1"
		"OnStartTouch" "Level5_FinalLasers_PickRandom,PickRandom,,49,1"
		"OnStartTouch" "Level5_FinalLasers_PickRandom,PickRandom,,50,1"
		"OnStartTouch" "Level5_FinalLaserUPRIGHT_Relay,Trigger,,60,1"
		"OnStartTouch" "Level5_FinalLaserUPLEFT_Relay,Trigger,,60,1"
	}
modify:
{
	match:
	{
		"targetname" "Level5_FinalLaserUPRIGHT_Template"
		"classname" "point_template"
	}
	replace:
	{
		"spawnflags" "0"
	}
}
modify:
{
	match:
	{
		"targetname" "Level5_FinalLaserUPLEFT_Template"
		"classname" "point_template"
	}
	replace:
	{
		"spawnflags" "0"
	}
}
modify:
{
	match:
	{
		"targetname" "Level5_FinalLaserUP_Template"
		"classname" "point_template"
	}
	replace:
	{
		"spawnflags" "0"
	}
}
modify:
{
	match:
	{
		"targetname" "Level5_FinalLaserDOWN_Template"
		"classname" "point_template"
	}
	replace:
	{
		"spawnflags" "0"
	}
}

;--------------------------------------------------------------------
;STRIPPER CFG BY MOLTARD http://steamcommunity.com/id/0123456789ABC/
;--------------------------------------------------------------------
;FIX JUDGEMENT HURT AFTER ARCEUS' DEATH
;---------------------------------------

modify:
{
	match:
	{
		"classname"	"func_breakable"
		"targetname" "Arceus"
	}
	delete:
	{
		"OnBreak" "Arceus_Judgement_Hurt,Disable,,0,-1"
	}
	insert:
	{
		"OnBreak" "Arceus_Judgement_Hurt,Kill,,0,-1"
	}
}

;----------------------------------------------
;STAGE 4: FIX BACKLASER NOT DEALING DAMAGE
;OR MAYBE STAGE 5 ? I DONT KNOW ANYMORE 
;WITH THIS STUPID MAP. END MY SUFFERING PLEASE
;----------------------------------------------

modify:
{
	match:
	{
		"targetname" "crobatfinal1_laserup_spawn"
		"classname" "point_template"
	}
	replace:
	{
		"spawnflags" "0"
	}
}
modify:
{
	match:
	{
		"targetname" "crobatfinal1_laserdown_spawn"
		"classname" "point_template"
	}
	replace:
	{
		"spawnflags" "0"
	}
}

;-------------------------------------
;FIX ALL THE POTENTIAL BOSS HP ISSUES
;FUCK THIS MAP 
;-------------------------------------

;**************************
; Level 3: Regular groudon 
;**************************

filter:
{
	"targetname" "groudonaddhealth"
	"classname" "trigger_multiple"
}
modify:
{
	match:
	{
		"targetname" "l4_finalbosstphuman"
		"classname" "trigger_teleport"
	}
	insert:
	{
		"OnStartTouch" "groudonhp,Add,350,0,-1"
	}
}

;*****************
; Level 3: Kirlia
;*****************

modify:
{
	match:
	{
		"origin" "-5236 7404 560"
		"classname" "trigger_multiple"
		"hammerid" "480407"
	}
	replace:
	{
		"classname" "trigger_once"
		"targetname" "finalkirlia_addhealth"
		"StartDisabled" "1"
	}
}
modify:
{
	match:
	{
		"origin" "-5139 8815 560"
		"classname" "trigger_once"
		"hammerid" "186056"
	}
	insert:
	{
		"OnStartTouch" "finalkirlia_addhealth,Enable,,2.9,1"
	}
}

;*************************
; Level 3: Primal groudon 
;*************************

modify:
{
	match:
	{
		"targetname" "PrimalGroudonHPScale"
		"classname" "trigger_multiple"
	}
	replace:
	{
		"classname" "trigger_once"
	}
}

;**************************
; Level4: Purugly Skuntank
;**************************

filter:
{
	"targetname" "l4_trainerscale"
	"origin" "2237 14161 1336"
	"classname" "trigger_multiple"
}
modify:
{
	match:
	{
		"targetname" "spearpilar_tp"
		"classname" "trigger_teleport"
	}
	insert:
	{
		"OnStartTouch" "skuntankhealth,Add,250,0,-1"
		"OnStartTouch" "puruglyhealth,Add,250,0,-1"
	}
}

;**************************
; Level4: Cyrus boss fight 
;**************************

modify:
{
	match:
	{
		"targetname" "honchkrow_addhealth"
		"classname" "trigger_multiple"
	}
	replace:
	{
		"classname" "trigger_once"
		"StartDisabled" "1"
	}
}
modify:
{
	match:
	{
		"targetname" "Level3_CyrusTrigger"
		"classname" "trigger_once"
		"hammerid" "345028"
	}
	insert:
	{
		"OnStartTouch" "honchkrow_addhealth,Enable,,7.9,1"
	}
}
modify:
{
	match:
	{
		"targetname" "crobat_addhealth"
		"classname" "trigger_multiple"
	}
	replace:
	{
		"classname" "trigger_once"
	}
}
modify:
{
	match:
	{
		"targetname" "Weavile_addhealth"
		"classname" "trigger_multiple"
	}
	replace:
	{
		"classname" "trigger_once"
	}
}


;*****************************
; Level4: Giratina boss fight 
;*****************************

filter:
{
	"targetname" "addhealth_gira"
	"classname" "trigger_multiple"
}
modify:
{
	match:
	{
		"targetname" "giratinabattle"
		"classname" "trigger_teleport"
	}
	insert:
	{
		;"OnStartTouch" "giratinahp,Add,250,0,-1" ; The stripper fix increased the hp originally
		"OnStartTouch" "giratinahp,Add,500,0,-1"
	}
}

;****************************
; Level 5: Arceus boss fight 
;****************************

modify:
{
	match:
	{
		"targetname" "/Arceus_HPScale_[2-4]/" ; This match the trigger 2 to 4
		"classname" "trigger_multiple"
	}
	replace:
	{
		"classname" "trigger_once"
	}
}

;************************
; Level 5: Final Weavile 
;************************

; Delete a very bad trigger, easily glitchable

filter:
{
	"origin" "12443.5 7010.5 2878.06"
	"classname" "trigger_multiple"
	"hammerid" "437195"
}

add:
{
	"model" "*107"
	"wait" "0"
	"targetname" "weavilefinal_addhealth"
	"StartDisabled" "1"
	"spawnflags" "4097"
	"origin" "12641.6 6934.09 3163.5"
	"filtername" "SurvivorTeam"
	"classname" "trigger_once"
	"OnStartTouch" "weavilefinalhp,Add,150,0,-1" ; Originally 50 hp 
}
modify:
{
	match:
	{
		"origin" "12441.5 7010.5 2878.06"
		"classname" "trigger_once"
		"hammerid" "431407"
	}
	insert:
	{
		"OnStartTouch" "weavilefinal_addhealth,Enable,,20,1"
	}
}



;*******************************
; Level 5: Crobat final laser 2nd floor
;*******************************

filter:
{
	"origin" "11841 7008.5 1861"
	"classname" "trigger_multiple"
	"hammerid" "446993"
}
add:
{
	"model" "*137"
	"targetname" "bottom_2_medium"
	"target" "mediumdest"
	"StartDisabled" "0"
	"spawnflags" "4097"
	"origin" "12044.5 7007 1111.08"
	"filtername" "ZombieTeam"
	"classname" "trigger_teleport"
}

modify:
{
	match:
	{
		"targetname" "bottom_2_medium"
		"classname" "trigger_teleport"
		"hammerid" "426421"
	}
	insert:
	{
		"filtername" "SurvivorTeam"
		"OnStartTouch" "crobatfinal2_health,Add,35,0,-1"
	}
}
