;Special thanks to memories


; 21/12/23 - Hobbitten
; Fixes a displacement glitch where the user can walk through the displacement to the bottom of the boss arena and infect through the ground
add:
{
    "model" "*240"
    "targetname" "displacement_fix_arena_2_boss"
    "target" "stage2_dest06"
    "StartDisabled" "0"
    "spawnflags" "1"
    "origin" "-11694 6112 9104"
    "classname" "trigger_teleport"
}


;m4dara fixes
;stage 4 : this hold should be 10 sec longer
modify:
{
    match:
    {
        "targetname" "s4_button04"
        "classname" "func_button"
    }
    delete:
    {
        "OnPressed" "CMD,Command,say ** PATH OPEN IN 25 SECONDS **,0,1"
        "OnPressed" "s4_rotating_huge_door,Start,,25,1"
		"OnPressed" "s4_doorparent_rotate,Open,,25.1,1"
        "OnPressed" "s4_rotating_door_particle,Start,,25.1,1"
    }
    insert:
    {
        "OnPressed" "CMD,Command,say ** PATH OPEN IN 35 SECONDS **,0,1"
        "OnPressed" "s4_rotating_huge_door,Start,,35,1"
		"OnPressed" "s4_doorparent_rotate,Open,,35.1,1"
        "OnPressed" "s4_rotating_door_particle,Start,,35.1,1"
    }
}

;this door should open 5 sec after the final lever has been pressed
modify:
{
    match:
    {
        "targetname" "p2_s4_button_end1"
        "classname" "func_button"
    }
    insert:
    {
        "OnPressed" "p2_s4_doors_shortcut,Open,,5,1"
    }
}
;This tp should be like 13 sec instead of 18
modify:
{
    match:
    {
        "targetname" "exsdfgh_madara_door"
        "classname" "func_door"
    }
    delete:
    {
        "OnFullyOpen" "p2_s4_teleport_last_zm,Enable,,18,-1"
    }
    insert:
    {
        "OnFullyOpen" "p2_s4_teleport_last_zm,Enable,,13,-1"
    }
}
;This laser should be now 4000 instead of 3300
modify:
{
    match:
    {
        "targetname" "kinhugd_susano_laser_door"
        "classname" "func_door"
    }
    replace:
    {
        "speed" "4000"
    }
}
;And this door from madara should be faster (35)
modify:
{
    match:
    {
        "targetname" "bvcyuir_madara_door"
        "classname" "func_door"
    }
    replace:
    {
        "speed" "35"
    }
}
;and madara at the end have to low hp so should add 10 instead of 5
modify:
{
    match:
    {
        "targetname" "p2_s4_madara_laser_addhp"
        "classname" "trigger_once"
    }
    delete:
    {
        "OnStartTouch" "exsdfgh_madara_Health,Add,5,0,-1"
        "OnStartTouch" "exsdfgh_madara_HealthBackup,Add,5,0,-1"
    }
    insert:
    {
        "OnStartTouch" "exsdfgh_madara_Health,Add,8,0,-1"
        "OnStartTouch" "exsdfgh_madara_HealthBackup,Add,8,0,-1"
    }
}

modify:
{
    match:
    {
        "targetname" "nbvjkl_madara_ending_laser_Hurt2"
        "classname" "trigger_hurt"
    }
    delete:
    {
        "OnHurt" "exsdfgh_madara_Health,Subtract,35,0,-1"
    }
    insert:
    {
       "OnHurt" "exsdfgh_madara_Health,Subtract,55,0,-1"
    }

modify:
{
    match:
    {
        "targetname" "cdfuio_madara_ending_laser_crouch_Hurt2"
        "classname" "trigger_hurt"
    }
    delete:
    {
        "OnHurt" "exsdfgh_madara_Health,Subtract,35,0,-1"
    }
    insert:
    {
       "OnHurt" "exsdfgh_madara_Health,Subtract,55,0,-1"
    }
}
}
;also this 120 is stupid it should be 20
modify:
{
    match:
    {
        "targetname" "6543_madara_appear_once"
        "classname" "trigger_once"
    }
    delete:
    {
        "OnStartTouch" "6543_madara_appear_counter,Add,120,0,-1"
    }
    insert:
    {
        "OnStartTouch" "6543_madara_appear_counter,Add,20,0,-1"
    }
}
;fix so madara dissapears after obito uses alternate dimension
modify:
{
    match:
    {
        "targetname" "obito_alternate_dimension_relay"
        "classname" "func_physbox_multiplayer"
    }
    insert:
    {
        "OnTrigger" "6543_madara_appear*,Kill,,0,1"
    }
}

// 09/05/21

;m4dara fixes
;rdv_explosion also this is magnitude 310 should try 450
modify:
{
    match:
    {
        "targetname" "rdv_explosion"
        "classname" "env_explosion"
    }
    replace:
    {
        "iMagnitude" "450"
    }
}
;also the susano hurt I checked on source I gave you only 1 hurt for the stripper that does 999dmg
modify:
{
    match:
    {
        "damage" "425"
        "classname" "trigger_hurt"
    }
    replace:
    {
        "damage" "999"
    }
}
;forgot to add triggerhurt into pointtemplate
modify:
{
    match:
    {
        "targetname" "madara_item_template"
        "classname" "point_template"
    }
    insert:
    {
        "Template07" "bvcyuir_madara_hurt"
    }
}


// 10/05/21


;some ignitelifetime work only on first person, fixed
modify:
{
    match:
    {
        "OnStartTouch" "!activator,IgniteLifetime,3,0,1"
    }
    delete:
    {
        "OnStartTouch" "!activator,IgniteLifetime,3,0,1"
    }
    insert:
    {
        "OnStartTouch" "!activator,IgniteLifetime,3,0,-1"
    }
}
modify:
{
    match:
    {
        "OnStartTouch" "!activator,IgniteLifetime,2,0,1"
    }
    delete:
    {
        "OnStartTouch" "!activator,IgniteLifetime,2,0,1"
    }
    insert:
    {
        "OnStartTouch" "!activator,IgniteLifetime,2,0,-1"
    }
}

; player can glitch attack on itachi boss fight

modify:
{
	match:
	{
		"targetname" "rty_hurt1"
		"classname" "trigger_hurt"
		"origin" "10176 15040 11340"
	}
	replace:
	{
	"origin" "10176 15040 11284"
	}
}

; itachi katon attack faster

modify:
{
    match:
    {
        "targetname" "rty_door"
        "classname" "func_door"
    }
    replace:
    {
        "speed" "320"
    }
}

; fix itachi katon hurt origin

modify:
{
	match:
	{
		"targetname" "rty_explosion_hurt"
		"classname" "trigger_hurt"
		"origin" "9328 15040 11232"
	}
	replace:
	{
	"origin" "9384 15040 11232"
	}
}


; stage 2 faster teleport

modify:
{
    match:
    {
        "targetname" "s2_button03"
        "classname" "func_button"
    }
    delete:
    {
		"OnPressed" "cmd,Command,say **TELEPORT IN 10 SECONDS**,20,1"
		"OnPressed" "s2_teleport03,Enable,,30,1"
    }
    insert:
    {
		"OnPressed" "cmd,Command,say **TELEPORT IN 5 SECONDS**,20,1"
		"OnPressed" "s2_teleport03,Enable,,25,1"
    }
}

; Stage 4 doors close faster to avoid killing zm in doors

modify:
{
    match:
    {
        "targetname" "s4_door02"
        "classname" "func_door"
    }
    replace:
    {
        "speed" "80"
    }
}

modify:
{
    match:
    {
        "targetname" "s4_door03"
        "classname" "func_door"
    }
    replace:
    {
        "speed" "80"
    }
}


; stage 4 faster teleport

modify:
{
    match:
    {
        "targetname" "p2_s4_once2"
        "classname" "trigger_once"
    }
    delete:
    {
		"OnStartTouch" "p2_s4_teleport01,Enable,,15,1"
    }
    insert:
    {
		"OnStartTouch" "p2_s4_teleport01,Enable,,8,1"
    }
}

; susanoo one shot

modify:
{
    match:
    {
        "damage" "440"
        "classname" "trigger_hurt"
    }
    replace:
    {
        "damage" "999"
    }
}

; stage 4 faster teleport before ending

modify:
{
    match:
    {
        "targetname" "p2_s4_button_end1"
        "classname" "func_button"
    }
    delete:
    {
		"OnPressed" "p2_s4_teleport_tomain_room,Enable,,10,1"
    }
    insert:
    {
		"OnPressed" "p2_s4_teleport_tomain_room,Enable,,5,1"
    }
}

; stage 4 enable bhop faster at laser part

modify:
{
    match:
    {
        "targetname" "p2_s4_uchiha_legacy_final"
        "classname" "trigger_once"
    }
    delete:
    {
		"OnStartTouch" "cmd,Command,sv_enablebunnyhopping 1,16,1"
    }
    insert:
    {
		"OnStartTouch" "cmd,Command,sv_enablebunnyhopping 1,7,1"
    }
}

; stage 2 hold bit longer

modify:
{
    match:
    {
        "targetname" "s2_button04"
        "classname" "func_button"
    }
    delete:
    {
		"OnPressed" "s2_door_11,Open,,33,1"
		"OnPressed" "s2_door_12,Open,,33,1"
		"OnPressed" "cmd,Command,say **DOOR OPENS IN 10 SECONDS**,23,1"
		"OnPressed" "s2_door_12,Close,,45,1"
		"OnPressed" "s2_door_11,Close,,45,1"
		"OnPressed" "s2_teleport04,Enable,,49,1"
    }
    insert:
    {
		"OnPressed" "s2_door_11,Open,,38,1"
		"OnPressed" "s2_door_12,Open,,38,1"
		"OnPressed" "cmd,Command,say **DOOR OPENS IN 15 SECONDS**,23,1"
		"OnPressed" "s2_door_12,Close,,49,1"
		"OnPressed" "s2_door_11,Close,,49,1"
		"OnPressed" "s2_teleport04,Enable,,54,1"
    }
}

; stage 4 rock explosion bigger

modify:
{
    match:
    {
        "targetname" "s4_rock_explosion_entity"
        "classname" "env_explosion"
    }
    replace:
    {
        "iMagnitude" "1000"
    }
}

; stage 3 tobi random explosion bigger

modify:
{
    match:
    {
        "targetname" "randomtobi_stage3_explosion"
        "classname" "env_explosion"
    }
    replace:
    {
        "iMagnitude" "500"
    }
}

; Changing also the speed of this random tobi

modify:
{
    match:
    {
        "targetname" "randomtobi_stage3_door"
        "classname" "func_door"
    }
    replace:
    {
        "speed" "280"
    }
}

// item changes


; Mokuton hurt fix
modify:
{
    match:
    {
	    "targetname" "fgdklmo_mokuton_hurt"
        "classname" "trigger_hurt"
		"damage" "3000"
    }
    replace:
    {
        "damage" "1500"
    }
}


; Doton duration

modify:
{
    match:
    {
        "targetname" "doton_relay"
        "classname" "logic_relay"
    }
    delete:
    {
		"OnSpawn" "doton_door,Kill,,6,-1"
		"OnSpawn" "doton_appear_particle,Kill,,6,-1"
		"OnSpawn" "doton_model,Kill,,6,-1"
    }
    insert:
    {
		"OnSpawn" "doton_door,Kill,,4,-1"
		"OnSpawn" "doton_appear_particle,Kill,,4,-1"
		"OnSpawn" "doton_model,Kill,,4,-1"
    }
}

; zheal more speed

modify:
{
    match:
    {
        "targetname" "zheal_cure"
        "classname" "trigger_multiple"
    }
    delete:
    {
		"OnStartTouch" "speed,ModifySpeed,1,5,-1"
		"OnStartTouch" "speed,ModifySpeed,1.30,0,-1"
    }
    insert:
    {
		"OnStartTouch" "speed,ModifySpeed,1,6,-1"
		"OnStartTouch" "speed,ModifySpeed,1.40,0,-1"
    }
}


; zkaleidoscope speed

modify:
{
    match:
    {
        "targetname" "zkaleidoscope_door"
        "classname" "func_door"
    }
    replace:
    {
        "speed" "320"
    }
}

; 07/06/21 

; Fix music so people can change the volume


modify:
{
    match:
    {
	    "targetname" "s1_music01"
            "classname" "ambient_generic"
    }
    replace:
    {
"message" "#naruto-shippuden-ost-saika-colourful-mist-extended.mp3"
    }
}

modify:
{
    match:
    {
	    "targetname" "s1_music02"
            "classname" "ambient_generic"
    }
    replace:
    {
"message" "#itachi-uchiha-orignal-soundtrack-extended.mp3"
    }
}

modify:
{
    match:
    {
	    "targetname" "s1_music03"
            "classname" "ambient_generic"
    }
    replace:
    {
	"message" "#naruto-akatsuki-theme-song-full.mp3"
    }
}

modify:
{
    match:
    {
	    "targetname" "s1_music_end"
            "classname" "ambient_generic"
    }
    replace:
    {
	"message" "#akatsuki.mp3"
    }
}
modify:
{
    match:
    {
	    "targetname" "s1_music_boss"
            "classname" "ambient_generic"
    }
    replace:
    {
	"message" "#naruto-ost-3-11-heavy-violence.mp3"
    }
}

modify:
{
    match:
    {
	    "targetname" "s2_music01"
            "classname" "ambient_generic"
    }
    replace:
    {
	"message" "#setting-sun.mp3"
    }
}

modify:
{
    match:
    {
	    "targetname" "s2_music02"
            "classname" "ambient_generic"
    }
    replace:
    {
	"message" "#sasuke-theme-hyouhaku-extended-hq-hd.mp3"
    }
}

modify:
{
    match:
    {
	    "targetname" "s2_music03"
            "classname" "ambient_generic"
    }
    replace:
    {
	"message" "#rtpn-awakening-high-quality.mp3"
    }
}

modify:
{
    match:
    {
	    "targetname" "s2_music_boss"
            "classname" "ambient_generic"
    }
    replace:
    {
	"message" "#naruto-strong-and-strike-extended.mp3"
    }
}

modify:
{
    match:
    {
	    "targetname" "s2_music_end"
            "classname" "ambient_generic"
    }
    replace:
    {
	"message" "#e-for-extinction.mp3"
    }
}

modify:
{
    match:
    {
	    "targetname" "s3_music01"
            "classname" "ambient_generic"
    }
    replace:
    {
	"message" "#tobi-theme-song.mp3"
    }
}

modify:
{
    match:
    {
	    "targetname" "s3_music02"
            "classname" "ambient_generic"
    }
    replace:
    {
	"message" "#blue-stahli-scrape-instrumental.mp3"
    }
}

modify:
{
    match:
    {
	    "targetname" "s3_music03"
            "classname" "ambient_generic"
    }
    replace:
    {
	"message" "#naruto-ost-1-need-to-be-strong.mp3"
    }
}

modify:
{
    match:
    {
	    "targetname" "s3_boss_sound"
            "classname" "ambient_generic"
    }
    replace:
    {
	"message" "#reverse_situation.mp3"
    }
}

modify:
{
    match:
    {
	    "targetname" "s3_music04"
            "classname" "ambient_generic"
    }
    replace:
    {
	"message" "#awakening.mp3"
    }
}

modify:
{
    match:
    {
	    "targetname" "s3_music05"
            "classname" "ambient_generic"
    }
    replace:
    {
	"message" "#naruto-shippuden-i-have-seen-much-brokubeatz.mp3"
    }
}

modify:
{
    match:
    {
	    "targetname" "s4_music01"
            "classname" "ambient_generic"
    }
    replace:
    {
	"message" "#naruto-shippuden-ost-1-track-09-ikari-anger.mp3"
    }
}

modify:
{
    match:
    {
	    "targetname" "s4_music02"
            "classname" "ambient_generic"
    }
    replace:
    {
	"message" "#naruto-shippuden-ost-ii-crimson-flames.mp3"
    }
}

modify:
{
    match:
    {
	    "targetname" "s4_music03"
            "classname" "ambient_generic"
    }
    replace:
    {
	"message" "#metallica-master-of-puppets-pendulum-remix-tjs-edit-hq-1080p.mp3"
    }
}

modify:
{
    match:
    {
	    "targetname" "s4_music03_1"
            "classname" "ambient_generic"
    }
    replace:
    {
	"message" "#the-qemists-warrior-sound.mp3"
    }
}

modify:
{
    match:
    {
	    "targetname" "p2_s4_music01"
            "classname" "ambient_generic"
    }
    replace:
    {
	"message" "#naruto-shippuden-girei-pains-theme-song.mp3"
    }
}

modify:
{
    match:
    {
	    "targetname" "p2_s4_music02"
            "classname" "ambient_generic"
    }
    replace:
    {
	"message" "#led-zeppelin-immigrant-song-pendulum-remix.mp3"
    }
}

modify:
{
    match:
    {
	    "targetname" "p2_s4_music02_1"
            "classname" "ambient_generic"
    }
    replace:
    {
	"message" "#blue-stahli-youll-get-whats-coming-feat-mark-salomon-sebastian-komor-remix.mp3"
    }
}

modify:
{
    match:
    {
	    "targetname" "p2_s4_music03"
            "classname" "ambient_generic"
    }
    replace:
    {
	"message" "#blue-stahli-shotgun-senorita-zardonic-remix-hd.mp3"
    }
}

modify:
{
    match:
    {
	    "targetname" "p2_s4_music_laser"
            "classname" "ambient_generic"
    }
    replace:
    {
	"message" "#most-epic-battle-anime-ost-spin-and-burst-borutonaruto-the-movie-boruto-episode-65.mp3"
    }
}

modify:
{
    match:
    {
	    "targetname" "p2_s4_madara_boss_music"
            "classname" "ambient_generic"
    }
    replace:
    {
	"message" "#naruto-shippuden-ost-3-purge-goddess-extended.mp3"
    }
}

modify:
{
    match:
    {
	    "targetname" "p2_s4_perfect_susano_music"
            "classname" "ambient_generic"
    }
    replace:
    {
	"message" "#uchiha-madara-perfect-susanoo-themehq.mp3"
    }
}

; Loud senpai npc sound 

modify:
{
    match:
    {
        "targetname" "rdv_sound"
        "classname" "ambient_generic"
    }
    replace:
    {
        "health" "10"
    }
}
modify:
{
    match:
    {
        "targetname" "randomtobi_stage3_sound_explosion"
        "classname" "ambient_generic"
    }
    replace:
    {
        "health" "10"
    }
}

;on itachi boss fight fire lasers have safe spot / fixing
modify:
{
    match:
    {
        "targetname" "cvb_itachi_maker1"
        "classname" "env_entity_maker"
    }
    replace:
    {
        "origin" "9912 15040 11154"
    }
}
modify:
{
    match:
    {
        "targetname" "cvb_itachi_maker2"
        "classname" "env_entity_maker"
    }
    replace:
    {
        "origin" "9912 15040 11200"
    }
}

; Fix a trigger hurt that doesnt disappear when sasuke die
modify:
{
    match:
    {
        "targetname" "sasuke_DEATH_relay"
        "classname" "logic_relay"
    }
    insert:
    {
        "OnTrigger" "s2_sasuke_electric_explosion_hurt,Kill,,0,-1"
        "OnTrigger" "s2_sasuke_particle_meteor,Kill,,0,-1"
    }
}

; Stage 4 telehop trigger new
modify:
{
    match:
    {
        "targetname" "s4_teleport_lava_zm"
        "classname" "trigger_teleport"
    }
    replace:
    {
        "origin" "3072 -11104 5624"
    }
}

modify:
{
    match:
    {
        "targetname" "stage4_lavadest_zm"
        "classname" "info_teleport_destination"
    }
    replace:
    {
        "origin" "7360 -11104 7980"
    }
}

; change itachi katon damage cause its a bit to much for a first stage

modify:
{
    match:
    {
        "targetname" "rty_explosion_hurt"
        "classname" "trigger_hurt"
    }
    replace:
    {
        "damage" "80"
    }
}

; change damage of random madara npc that can spawn on stage 4

modify:
{
    match:
    {
        "targetname" "hbguio_madara_hurt"
        "classname" "trigger_hurt"
    }
    replace:
    {
        "damage" "400"
    }
}


; /////////////////////////////////////////////////////////////////////////////////////
; 2024-07-19 - Edit by Hobbitten
; /////////////////////////////////////////////////////////////////////////////////////

;-------------------------------------------------------------------------------
; Fixes a displacement error in spawn that allows users to walk under the map
;-------------------------------------------------------------------------------
add:
{
    "origin" "-4632 3520 11336"
    "targetname" "bridge_displacement_error_destination"
    "angles" "0 345 0"
    "classname" "info_teleport_destination"
}
add:
{
    "model" "*20"
    "targetname" "bridge_displacement_error_teleporter"
    "target" "bridge_displacement_error_destination"
    "StartDisabled" "0"
    "spawnflags" "1"
    "origin" "-4476.2 3391.06 11034.1"
    "classname" "trigger_teleport"
}
add:
{
    "model" "*20"
    "targetname" "bridge_displacement_error_teleporter"
    "target" "bridge_displacement_error_destination"
    "StartDisabled" "0"
    "spawnflags" "1"
    "origin" "-4604.2 3567.06 11130.1"
    "classname" "trigger_teleport"
}
add:
{
    "model" "*20"
    "targetname" "bridge_displacement_error_teleporter"
    "target" "bridge_displacement_error_destination"
    "StartDisabled" "0"
    "spawnflags" "1"
    "origin" "-4476.2 3719.06 11034.1"
    "classname" "trigger_teleport"
}
add:
{
    "model" "*20"
    "targetname" "bridge_displacement_error_teleporter"
    "target" "bridge_displacement_error_destination"
    "StartDisabled" "0"
    "spawnflags" "1"
    "origin" "-4524.2 3201.06 11084.1"
    "classname" "trigger_teleport"
}
add:
{
    "model" "*20"
    "targetname" "bridge_displacement_error_teleporter"
    "target" "bridge_displacement_error_destination"
    "StartDisabled" "0"
    "spawnflags" "1"
    "origin" "-4524.2 3719.06 11084.1"
    "classname" "trigger_teleport"
}
