modify:
{
	match:
	{
		"targetname" "Level5_Trigger"
		"classname" "trigger_once"
		"hammerid" "1106912"
	}
	insert:
	{
		"OnStartTouch" "zombiecage_teleport,Enable,,60,1"
		"OnStartTouch" "zombiecage_teleport,Disable,,61,1"
		"OnStartTouch" "eolic_zombiecage,Break,,70,1"
	}
}

modify:
{
    match:
    {
        "targetname" "kirlia"
        "classname" "func_breakable"
    }
    insert:
    {
        "OnBreak" "kirlia_shockwave,Kill,,0,-1"
    }
}
modify:
{
    match:
    {
        "targetname" "Crobat"
        "classname" "func_breakable"
    }
    insert:
    {
        "OnBreak" "crobat_toxic_attack,Kill,,0,-1"
    }
}

;Buff Laser Boss HP Stage 4
modify:
{
	match:
	{
		"classname"	"trigger_multiple"
		"hammerid"	"437195"
	}
	delete:
	{
		"OnStartTouch"	"weavilefinalhp,Add,50,0,-1"
	}
	insert:
	{
		"OnStartTouch"	"weavilefinalhp,Add,100,0,-1"
	}
}

;Fix Stage 3 Groudon's Roar that can happen after Groudon's death
modify:
{
	match:
	{
		"classname"		"func_breakable"
		"targetname"	"Groudon"
	}
	insert:
	{
		"OnBreak"	"groudon_roar_relay,CancelPending,,0,1"
		"OnBreak"	"groudon_roar_relay,Disable,,0,1"
	}
}

;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"
	}
}
;Teleport Zombies in the cage when the teleports on stage 5 are enabled like it is supposed to be

modify:
{
	match:
	{
		"targetname" "Level5_Trigger"
		"classname" "trigger_once"
		"hammerid" "1106912"
	}
	insert:
	{
		"OnStartTouch" "zombiecage_teleport,Enable,,60,1"
		"OnStartTouch" "zombiecage_teleport,Disable,,61,1"
		"OnStartTouch" "eolic_zombiecage,Break,,70,1"
	}
}
		
;Correctly kill some bosses attacks
modify:
{
    match:
    {
        "targetname" "kirlia"
        "classname" "func_breakable"
    }
    insert:
    {
        "OnBreak" "kirlia_shockwave,Kill,,0,-1"
    }
}
modify:
{
    match:
    {
        "targetname" "Crobat"
        "classname" "func_breakable"
    }
    insert:
    {
        "OnBreak" "crobat_toxic_attack,Kill,,0,-1"
    }
}

;Buff Laser Boss HP Stage 4
modify:
{
	match:
	{
		"classname"	"trigger_multiple"
		"hammerid"	"437195"
	}
	delete:
	{
		"OnStartTouch"	"weavilefinalhp,Add,50,0,-1"
	}
	insert:
	{
		"OnStartTouch"	"weavilefinalhp,Add,100,0,-1"
	}
}

;Fix Stage 3 Groudon's Roar that can happen after Groudon's death
modify:
{
	match:
	{
		"classname"		"func_breakable"
		"targetname"	"Groudon"
	}
	insert:
	{
		"OnBreak"	"groudon_roar_relay,CancelPending,,0,1"
		"OnBreak"	"groudon_roar_relay,Disable,,0,1"
	}
}

;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"
	}
}
