;---------------------------------
; room4 kill crys_models_rot 
;---------------------------------
modify:
{
    match:
    {
        "origin" "2120 9356 -4919"
        "classname" "math_counter"
        "hammerid" "1226500"
    }
    insert:
    {
        "OnHitMax" "room4/crys_modes_rot,Kill,0,1"
    }
}

;---------------------------
; Room 3: Delay ZM TP + 2 more seconds for safe 
;---------------------------
modify:
{
    match:
    {
        "origin" "-4672 2992 -1752"
        "classname" "trigger_multiple"
        "hammerid" "1178411"
    }
    delete:
    {
        "OnStartTouch" "room3/zm_tp1_trig,Toggle,,53.00"
    }
    insert:
    {
        "OnStartTouch" "room3/zm_tp1_trig,Toggle,,55.00"
    }
}

;----------------------------
; Fixes item command spam 
;----------------------------
modify:
{
    match:
    {
        "classname" "weapon_elite"
        "hammerid" "1939284"
    }
    delete:
    {
        "OnPlayerPickup" "sv_cmd,Command,say *** HEAL PICKED UP ( 200hp + 50 seconds cooldown ) *** ,0.2,0"
    }
    insert:
    {
        "OnPlayerPickup" "sv_cmd,Command,say *** HEAL PICKED UP ( 200hp + 50 seconds cooldown ) *** ,0,1"
    }
}

;----------------------------------------------
; Fixing hp adding to the final boss
;----------------------------------------------
add:
{
    "origin" "-6576 -14240 3336"
    "targetname" "MapFilterCT"
    "Negated" "Allow entities that match criteria"
    "filterteam" "3"
    "classname" "filter_activator_team"
}
modify:
{
    match:
    {
        "origin" "-4764 -8880 6968"
        "classname" "trigger_multiple"
    }
    delete:
    {
        "OnStartTouch" "boss/hitbox,AddHealth,6500,12,-1"
    }
    insert:
    {
        "OnStartTouch" "give_hp_boss,Enable,,11,-1"
    }
}
add:
{
    "model" "*310"
    "targetname" "give_hp_boss"
    "StartDisabled" "1"
    "spawnflags" "1"
    "origin" "-3863.25 -8896 6439.91"
    "filtername" "MapFilterCT"
    "classname" "trigger_once"
    "hammerid" "23596"
    "OnStartTouch" "boss/hitbox,AddHealth,16500,0,-1"
}

;----------------------------------------------------------------
; Dark room tp trigger delay so humans can take heal item
;----------------------------------------------------------------
modify:
{
    match:
    {
        "origin" "-4896 -3472 1987.95"
        "classname" "trigger_multiple"
    }
    delete:
    {
        "OnStartTouch" "room7/zombie_tp_dark,Enable,,46,1"
        "OnStartTouch" "darkroom_particles_zmtp_1,Start,,44,1"
        "OnStartTouch" "darkroom_particles_zmtp_1,Kill,,48,1"
    }
    insert:
    {
        "OnStartTouch" "room7/zombie_tp_dark,Enable,,60,1"
        "OnStartTouch" "darkroom_particles_zmtp_1,Start,,58,1"
        "OnStartTouch" "darkroom_particles_zmtp_1,Kill,,62,1"
    }
}

;----------------------------------------------
; Room 5 more seconds for humans to fallback
;----------------------------------------------
modify:
{
    match:
    {
        "targetname" "room5/particles_wall_brk"
        "origin" "-672 -6128 6384"
        "classname" "func_breakable"
    }
    delete:
    {
        "OnBreak" "room4/zombie_tp_f4,Toggle,,16,1"
        "OnBreak" "room5/zm_tp1_trig,Toggle,,16,1"
        "OnBreak" "room5/particles_zmtp_1,Kill,,18,1"
    }
    insert:
    {
        "OnBreak" "room4/zombie_tp_f4,Toggle,,21,1"
        "OnBreak" "room5/zm_tp1_trig,Toggle,,21,1"
        "OnBreak" "room5/particles_zmtp_1,Kill,,23,1"
    }
}

;--------------------------------
; Change last door lasers speed
;--------------------------------
modify:
{
    match:
    {
        "targetname" "last_room_door"
        "origin" "-11264 -2120 8064"
        "classname" "func_door"
    }
    replace:
    {
        "speed" "1.5"
    }
}

;--------------------------------
; Change 1/4 boss push value (500)
;--------------------------------
modify:
{
    match:
    {
        "targetname" "boss/push_fx_hurt"
        "origin" "-2384 -5784 7104"
        "classname" "trigger_push"
    }
    replace:
    {
        "speed" "500"
    }
}

;--------------------------------
; Change 2/4 boss push value (500)
;--------------------------------
modify:
{
    match:
    {
        "targetname" "boss/push_fx_hurt"
        "origin" "-2384 -6408 7104"
        "classname" "trigger_push"
    }
    replace:
    {
        "speed" "500"
    }
}

;--------------------------------
; Change 3/4 boss push value (500)
;--------------------------------
modify:
{
    match:
    {
        "targetname" "boss/push_fx_hurt"
        "origin" "-3056 -6408 7104"
        "classname" "trigger_push"
    }
    replace:
    {
        "speed" "500"
    }
}

;--------------------------------
; Change 4/4 boss push value (500)
;--------------------------------
modify:
{
    match:
    {
        "targetname" "boss/push_fx_hurt"
        "origin" "-3056 -5776 7104"
        "classname" "trigger_push"
    }
    replace:
    {
        "speed" "500"
    }
}