;=======================
; AUTHOR: CLOUD STRIFE
;=======================


modify:
{
	match:
	{
		"classname" "logic_auto"
	}
	insert:
	{
		"OnMapSpawn" "Console,Command,zr_respawn 1,0,1"
		"OnMapSpawn" "Console,Command,zr_respawn_delay 1,0,1"
	}
}


;########################
;#		CHAPTER IV		#
;########################

;========================================================
; FIRST BOSS
;========================================================
add:
{
	"classname" "logic_compare"
	"targetname" "nrk4_dog_compare"
	"CompareValue" "5"
	"InitialValue" "1"
	"OnEqualTo" "nrk4_random_timers,Disable,,0,-1"
	"OnGreaterThan" "nrk4_random_timers,Disable,,0,-1"
	"OnLessThan" "nrk4_random_timers,Enable,,0,-1"
}

add:
{
	"classname" "math_counter"
	"targetname" "nrk4_dog_amount"
	"StartDisabled" "0"
	"min" "0"
	"max" "100"
	"startvalue" "0"
	"OutValue" "nrk4_dog_compare,SetValueCompare,,0,-1"
}

modify:
{
	match:
	{
		"classname" "env_entity_maker"
		"targetname" "nrk4_npc_spawner_1"
	}
	insert:
	{
		"OnEntitySpawned" "nrk4_dog_amount,Add,1,0,-1"
	}
}

modify:
{
	match:
	{
		"classname" "env_entity_maker"
		"targetname" "nrk4_npc_spawner_2"
	}
	insert:
	{
		"OnEntitySpawned" "nrk4_dog_amount,Add,1,0,-1"
	}
}

modify:
{
	match:
	{
		"classname" "env_entity_maker"
		"targetname" "nrk4_npc_spawner_3"
	}
	insert:
	{
		"OnEntitySpawned" "nrk4_dog_amount,Add,1,0,-1"
	}
}

modify:
{
	match:
	{
		"classname" "env_entity_maker"
		"targetname" "nrk4_npc_spawner_4"
	}
	insert:
	{
		"OnEntitySpawned" "nrk4_dog_amount,Add,1,0,-1"
	}
}

modify:
{
	match:
	{
		"classname" "func_physbox"
		"targetname" "nrk_npc_hitbox"
		"hammerid" "741703"
	}
	insert:
	{
		"OnBreak" "nrk4_dog_amount,Subtract,1,0,-1"
	}
}

modify:
{
	match:
	{
		"classname" "logic_case"
		"targetname" "nrk4_random_case"
	}
	delete:
	{
		"OnCase05" "nrk4_npc_spawner_1,ForceSpawn,,0.01,-1"
		"OnCase05" "nrk4_npc_spawner_3,ForceSpawn,,0.01,-1"
		"OnCase05" "nrk4_npc_spawner_2,ForceSpawn,,0.01,-1"
		"OnCase06" "nrk4_npc_spawner_4,ForceSpawn,,0.01,-1"
		"OnCase07" "nrk4_npc_spawner_4,ForceSpawn,,0.01,-1"
		"OnCase07" "nrk4_npc_spawner_3,ForceSpawn,,0.01,-1"
		"OnCase07" "nrk4_npc_spawner_2,ForceSpawn,,0.01,-1"
		"OnCase07" "nrk4_npc_spawner_1,ForceSpawn,,0.01,-1"
	}
}

modify	:
{
	match:
	{
		"classname" "logic_timer"
		"targetname" "nrk4_random_timers"
	}
	replace:
	{
		"LowerRandomBound" "1"
		"UpperRandomBound" "2"
	}
}

;========================================================
; SECOND BOSS
;========================================================
add:
{
	"classname" "math_counter"
	"targetname" "nrk4_npc_amount"
	"StartDisabled" "0"
	"min" "0"
	"max" "100"
	"startvalue" "0"
	"OutValue" "nrk4_npc_compare,SetValueCompare,,0,-1"
}

add:
{
	"classname" "logic_compare"
	"targetname" "nrk4_npc_compare"
	"CompareValue" "5"
	"InitialValue" "0"
	"OnEqualTo" "nrk4_seeker_relay,Disable,,0,-1"
	"OnGreaterThan" "nrk4_seeker_relay,Disable,,0,-1"
	"OnLessThan" "nrk4_seeker_relay,Enable,,0,-1"
}

modify:
{
	match:
	{
		"classname" "env_entity_maker"
		"targetname" "nrk4_spawner_miniboss_1"
	}
	insert:
	{
		"OnEntitySpawned" "nrk4_npc_amount,Add,1,0,-1"
	}
}

modify:
{
	match:
	{
		"classname" "env_entity_maker"
		"targetname" "nrk4_spawner_miniboss_2"
	}
	insert:
	{
		"OnEntitySpawned" "nrk4_npc_amount,Add,1,0,-1"
	}
}

modify:
{
	match:
	{
		"classname" "env_entity_maker"
		"targetname" "nrk4_spawner_miniboss_3"
	}
	insert:
	{
		"OnEntitySpawned" "nrk4_npc_amount,Add,1,0,-1"
	}
}

modify:
{
	match:
	{
		"classname" "env_entity_maker"
		"targetname" "nrk4_spawner_miniboss_4"
	}
	insert:
	{
		"OnEntitySpawned" "nrk4_npc_amount,Add,1,0,-1"
	}
}

modify:
{
	match:
	{
		"classname" "func_physbox"
		"targetname" "nrk4_miniboss_hitbox"
	}
	insert:
	{
		"OnBreak" "nrk4_npc_amount,Subtract,1,0,-1"
	}
}
;########################
;#		CHAPTER V		#
;########################

;========================================================
; FIRST BOSS
;========================================================
add:
{
	"classname" "math_counter"
	"targetname" "nrk5_npc_amount"
	"startvalue" "0"
	"InitialValue" "0"
	"min" "0"
	"max" "100"
	"StartDisabled" "0"
	"OnGetValue" "nrk5_case,InValue,,0,-1"
}

add:
{
	"classname" "logic_case"
	"targetname" "nrk5_case"
	"Case01" "0"
	"Case02" "1"
	"Case03" "2"
	"Case04" "3"
	"Case05" "4"
	"Case06" "5"
	"OnCase01" "nrk5_duplicate_relay,Trigger,,0,-1"
	"OnCase01" "nrk5_duplicate_spawner_*,ForceSpawn,,1.0,-1"
	"OnCase02" "nrk5_duplicate_relay,Trigger,,0,-1"
	"OnCase02" "nrk5_duplicate_spawner_1,ForceSpawn,,1.0,-1"
	"OnCase02" "nrk5_duplicate_spawner_2,ForceSpawn,,1.0,-1"
	"OnCase02" "nrk5_duplicate_spawner_3,ForceSpawn,,1.0,-1"
	"OnCase02" "nrk5_duplicate_spawner_4,ForceSpawn,,1.0,-1"
	"OnCase03" "nrk5_duplicate_relay,Trigger,,0,-1"
	"OnCase03" "nrk5_duplicate_spawner_1,ForceSpawn,,1.0,-1"
	"OnCase03" "nrk5_duplicate_spawner_3,ForceSpawn,,1.0,-1"
	"OnCase03" "nrk5_duplicate_spawner_5,ForceSpawn,,1.0,-1"
	"OnCase04" "nrk5_duplicate_relay,Trigger,,0,-1"
	"OnCase04" "nrk5_duplicate_spawner_2,ForceSpawn,,1.0,-1"
	"OnCase04" "nrk5_duplicate_spawner_4,ForceSpawn,,1.0,-1"
	"OnCase05" "nrk5_duplicate_relay,Trigger,,0,-1"
	"OnCase05" "nrk5_duplicate_spawner_5,ForceSpawn,,1.0,-1"
}

modify:
{
	match:
	{
		"classname" "logic_timer"
		"targetname" "nrk5_duplicate_spawn_timer"
	}
	delete:
	{
		"OnTimer" "nrk5_duplicate_relay,Trigger,,0.03,-1"
	}
	insert:
	{
		"OnTimer" "nrk5_npc_amount,GetValue,,0.03,-1"
	}
}

modify:
{
	match:
	{
		"classname" "logic_relay"
		"targetname" "nrk5_duplicate_relay"
	}
	delete:
	{
		"OnTrigger" "nrk5_duplicate_spawner_1,ForceSpawn,,1,-1"
		"OnTrigger" "nrk5_duplicate_spawner_2,ForceSpawn,,1,-1"
		"OnTrigger" "nrk5_duplicate_spawner_3,ForceSpawn,,1,-1"
		"OnTrigger" "nrk5_duplicate_spawner_4,ForceSpawn,,1,-1"
		"OnTrigger" "nrk5_duplicate_spawner_5,ForceSpawn,,1,-1"
	}
}

modify:
{
	match:
	{
		"classname" "env_entity_maker"
		"targetname" "nrk5_duplicate_spawner_1"
	}
	insert:
	{
		"OnEntitySpawned" "nrk5_npc_amount,Add,1,0,-1"
	}

}

modify:
{
	match:
	{
		"classname" "env_entity_maker"
		"targetname" "nrk5_duplicate_spawner_2"
	}
	insert:
	{
		"OnEntitySpawned" "nrk5_npc_amount,Add,1,0,-1"
	}
}

modify:
{
	match:
	{
		"classname" "env_entity_maker"
		"targetname" "nrk5_duplicate_spawner_3"
	}
	insert:
	{
		"OnEntitySpawned" "nrk5_npc_amount,Add,1,0,-1"
	}
}

modify:
{
	match:
	{
		"classname" "env_entity_maker"
		"targetname" "nrk5_duplicate_spawner_4"
	}
	insert:
	{
		"OnEntitySpawned" "nrk5_npc_amount,Add,1,0,-1"
	}
}

modify:
{
	match:
	{
		"classname" "env_entity_maker"
		"targetname" "nrk5_duplicate_spawner_5"
	}
	insert:
	{
		"OnEntitySpawned" "nrk5_npc_amount,Add,1,0,-1"
	}
}

modify:
{
	match:
	{
		"classname" "func_physbox"
		"targetname" "nrk5_fakeboss_hitbox"
	}
	insert:
	{
		"OnBreak" "nrk5_npc_amount,Subtract,1,0,-1"
	}
}

;========================================================
; SECOND BOSS
;========================================================
modify:
{
	match:
	{
		"classname" "logic_case"
		"targetname" "nrk5_minisatan_random"
	}
	delete:
	{
		"OnCase01" "nrk5_minisatan_spawner_2,ForceSpawn,,0,-1"
		"OnCase02" "nrk5_minisatan_spawner_1,ForceSpawn,,0,-1"
		"OnCase03" "nrk5_minisatan_spawner_1,ForceSpawn,,0,-1"
		"OnCase04" "nrk5_minisatan_spawner_3,ForceSpawn,,0,-1"
		"OnCase05" "nrk5_minisatan_spawner_2,ForceSpawn,,0,-1"
		"OnCase05" "nrk5_minisatan_spawner_4,ForceSpawn,,0,-1"
		"OnCase06" "nrk5_minisatan_spawner_3,ForceSpawn,,0,-1"
		"OnCase06" "nrk5_minisatan_spawner_4,ForceSpawn,,0,-1"
	}
}

add:
{
	"classname" "logic_relay"
	"targetname" "nrk5_spawn_relay"
	"StartDisabled" "0"
	"spawnflags" "0"
	"OnTrigger" "nrk5_minisatan_random,PickRandom,,0,-1"
}

modify:
{
	match:
	{
		"classname" "logic_timer"
		"targetname" "nrk5_minisatan_timer"
	}
	replace:
	{
		"LowerRandomBound" "7"
		"UpperRandomBound" "15"
	}
	delete:
	{
		"OnTimer" "nrk5_minisatan_random,PickRandom,,0,-1"
	}
	insert:
	{
		"OnTimer" "nrk5_spawn_relay,Trigger,,0,-1"
	}
}

add:
{
	"classname" "math_counter"
	"targetname" "nrk5_minisatan_amount"
	"max" "100"
	"min" "0"
	"StartDisabled" "0"
	"startvalue" "0"
	"OutValue" "nrk5_minisatan_compare,SetValueCompare,,0,-1"
}

add:
{
	"classname" "logic_compare"
	"targetname" "nrk5_minisatan_compare"
	"CompareValue" "5"
	"InitialValue" "0"
	"OnEqualTo" "nrk5_spawn_relay,Disable,,0,-1"
	"OnGreaterThan" "nrk5_spawn_relay,Disable,,0,-1"
	"OnLessThan" "nrk5_spawn_relay,Enable,,0,-1"
}

modify:
{
	match:
	{
		"classname" "env_entity_maker"
		"targetname" "nrk5_minisatan_spawner_1"
	}
	insert:
	{
		"OnEntitySpawned" "nrk5_minisatan_amount,Add,1,0,-1"
	}
}

modify:
{
	match:
	{
		"classname" "env_entity_maker"
		"targetname" "nrk5_minisatan_spawner_2"
	}
	insert:
	{
		"OnEntitySpawned" "nrk5_minisatan_amount,Add,1,0,-1"
	}
}

modify:
{
	match:
	{
		"classname" "env_entity_maker"
		"targetname" "nrk5_minisatan_spawner_3"
	}
	insert:
	{
		"OnEntitySpawned" "nrk5_minisatan_amount,Add,1,0,-1"
	}
}

modify:
{
	match:
	{
		"classname" "env_entity_maker"
		"targetname" "nrk5_minisatan_spawner_4"
	}
	insert:
	{
		"OnEntitySpawned" "nrk5_minisatan_amount,Add,1,0,-1"
	}
}

modify:
{
	match:
	{
		"classname" "func_physbox"
		"targetname" "nrk5_fakeboss_hitbox"
	}
	insert:
	{
		"OnBreak" "nrk5_minisatan_amount,Subtract,1,0,-1"
	}
}




;; _

;; music volume

modify:
{
	match:
	{
		"message" "music/naraka/nrk_main_music.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#music/naraka/nrk_main_music.mp3"
	}
}
modify:
{
	match:
	{
		"message" "music/naraka/nrk1_music_1.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#music/naraka/nrk1_music_1.mp3"
	}
}
modify:
{
	match:
	{
		"message" "music/naraka/nrk1_music_2.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#music/naraka/nrk1_music_2.mp3"
	}
}
modify:
{
	match:
	{
		"message" "music/naraka/nrk1_music_3.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#music/naraka/nrk1_music_3.mp3"
	}
}
modify:
{
	match:
	{
		"message" "music/naraka/nrk1_music_4.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#music/naraka/nrk1_music_4.mp3"
	}
}
modify:
{
	match:
	{
		"message" "music/naraka/nrk2_music_1.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#music/naraka/nrk2_music_1.mp3"
	}
}
modify:
{
	match:
	{
		"message" "music/naraka/nrk2_music_2.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#music/naraka/nrk2_music_2.mp3"
	}
}
modify:
{
	match:
	{
		"message" "music/naraka/nrk2_music_3.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#music/naraka/nrk2_music_3.mp3"
	}
}
modify:
{
	match:
	{
		"message" "music/naraka/nrk2_music_4.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#music/naraka/nrk2_music_4.mp3"
	}
}
modify:
{
	match:
	{
		"message" "music/naraka/nrk3_music_1.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#music/naraka/nrk3_music_1.mp3"
	}
}
modify:
{
	match:
	{
		"message" "music/naraka/nrk3_music_2.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#music/naraka/nrk3_music_2.mp3"
	}
}
modify:
{
	match:
	{
		"message" "music/naraka/nrk3_music_3.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#music/naraka/nrk3_music_3.mp3"
	}
}
modify:
{
	match:
	{
		"message" "music/naraka/nrk3_music_4.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#music/naraka/nrk3_music_4.mp3"
	}
}
modify:
{
	match:
	{
		"message" "music/naraka/nrk4_music_1.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#music/naraka/nrk4_music_1.mp3"
	}
}
modify:
{
	match:
	{
		"message" "music/naraka/nrk4_music_2.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#music/naraka/nrk4_music_2.mp3"
	}
}
modify:
{
	match:
	{
		"message" "music/naraka/nrk4_music_3.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#music/naraka/nrk4_music_3.mp3"
	}
}
modify:
{
	match:
	{
		"message" "music/naraka/nrk4_music_4.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#music/naraka/nrk4_music_4.mp3"
	}
}
modify:
{
	match:
	{
		"message" "music/naraka/nrk4_music_5.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#music/naraka/nrk4_music_5.mp3"
	}
}
modify:
{
	match:
	{
		"message" "music/naraka/nrk4_music_6.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#music/naraka/nrk4_music_6.mp3"
	}
}
modify:
{
	match:
	{
		"message" "music/naraka/nrk5_music_1.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#music/naraka/nrk5_music_1.mp3"
	}
}
modify:
{
	match:
	{
		"message" "music/naraka/nrk5_music_2.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#music/naraka/nrk5_music_2.mp3"
	}
}
modify:
{
	match:
	{
		"message" "music/naraka/nrk5_music_3.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#music/naraka/nrk5_music_3.mp3"
	}
}
modify:
{
	match:
	{
		"message" "music/naraka/nrk5_music_4.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#music/naraka/nrk5_music_4.mp3"
	}
}
modify:
{
	match:
	{
		"message" "music/naraka/nrk5_music_5.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#music/naraka/nrk5_music_5.mp3"
	}
}
modify:
{
	match:
	{
		"message" "music/naraka/nrk5_music_6.mp3"
		"classname" "ambient_generic"
	}
	replace:
	{
		"message" "#music/naraka/nrk5_music_6.mp3"
	}
}

