;ze_coastline_assault_v1_0 -- Stripper fixes -- Last Updated May 25th, 2025.
;Thanks to NiDE for helping with testing the map before and after Stripper changes were made.
;Extra comment -- If your server has a hitmarkers plugin of sorts, please disable it as this map uses custom overlays of its own and will cause flickering.

;------------------
; General Stuff
;------------------

;Notification that Stripper is loaded

modify:
{
	match:
	{
		"classname" "logic_auto"
	}
	insert:
	{
		"OnNewGame" "main_console,FireUser3,,2,1"
		"OnNewGame" "main_console,Command,sv_airaccelerate 16,2,1"
		"OnNewGame" "main_console,Command,say [C.E.C.I.] Mission briefing 250525 received -- We'll keep you up to speed.,2,1"
	}
}

;Removes the spawntime commands from point_servercommand to let each stage set the respective spawntime.

modify:
{
	match:
	{
		"targetname" "main_console"
	}
	delete:
	{
		"OnUser1" "!self,Command,zr_infect_spawntime_min 10,0,1"
		"OnUser1" "!self,Command,zr_infect_spawntime_max 10,0,1"
	}
	insert:
	{
		"OnUser1" "!self,Command,zr_ambientsounds 0,0,1"
		"OnUser1" "!self,Command,zr_ambientsounds_volume 0,0,1"
	}
}

modify:
{
	match:
	{
		"targetname" "level_case"
	}
	delete:
	{
		"OnCase16" "!self,Command,zr_infect_spawntime_min 72,0,1"
		"OnCase16" "!self,Command,zr_infect_spawntime_max 72,0,1"
		"OnCase01" "!self,Command,zr_infect_spawntime_max 12,0,1"
		"OnCase01" "!self,Command,zr_infect_spawntime_min 16,0,1"
	}
	insert:
	{
		"OnCase16" "main_console,Command,zr_infect_spawntime_min 66,0,1"
		"OnCase16" "main_console,Command,zr_infect_spawntime_max 66,0,1"
		"OnCase01" "main_console,Command,zr_infect_spawntime_max 12,0,1"
		"OnCase01" "main_console,Command,zr_infect_spawntime_min 16,0,1"
	}
}

;------------------
; Health of things
;------------------

;Mostly unchanged, I'm just leaving this here for future reference.

;Zombie Airstrike Drone Item
modify:
{
	match:
	{
		"targetname" "drone_weapon"
	}
	delete:
	{
		"OnPlayerPickup" "main_hp_filter,AddOutput,OnPass main_drone_hp:Add:9:0:-1,0,1"
	}
	insert:
	{
		"OnPlayerPickup" "main_hp_filter,AddOutput,OnPass main_drone_hp:Add:9:0:-1,0,1"
	}
}

;Debris at the start
modify:
{
	match:
	{
		"targetname" "main_tp"
	}
	delete:
	{
		"OnStartTouch" "main_hp_filter,AddOutput,OnPass s1_fangs_hold1_break:AddHealth:350:0:-1,0,1"
	}
	insert:
	{
		"OnStartTouch" "main_hp_filter,AddOutput,OnPass s1_fangs_hold1_break:AddHealth:350:0:-1,0,1"
	}
}

;Wall before Ravine
modify:
{
	match:
	{
		"targetname" "s1_fangs_hold5_trigger"
	}
	delete:
	{
		"OnStartTouch" "main_hp_filter,AddOutput,OnPass s1_fangs_hold5_break:AddHealth:600:0:-1,0,1"
	}
	insert:
	{
		"OnStartTouch" "main_hp_filter,AddOutput,OnPass s1_fangs_hold5_break:AddHealth:600:0:-1,0,1"
	}
}

;First rock wall in Ravine
modify:
{
	match:
	{
		"targetname" "s1_african_raft_path13"
	}
	delete:
	{
		"OnPass" "main_hp_filter,AddOutput,OnPass s1_heavy_hold3_break:AddHealth:800:0:-1,0,1"
	}
	insert:
	{
		"OnPass" "main_hp_filter,AddOutput,OnPass s1_heavy_hold3_break:AddHealth:2600:0:-1,0,1"
	}
}

;Second rock wall in Ravine
modify:
{
	match:
	{
		"targetname" "s1_african_raft_path15"
	}
	delete:
	{
		"OnPass" "main_hp_filter,AddOutput,OnPass s1_heavy_hold4_break:AddHealth:200:0:-1,0,1"
	}
	insert:
	{
		"OnPass" "main_hp_filter,AddOutput,OnPass s1_heavy_hold4_break:AddHealth:400:0:-1,0,1"
	}
}

;Opposing Force Helicopter
modify:
{
	match:
	{
		"targetname" "s1_heavy_heli_path4"
	}
	delete:
	{
		"OnPass" "main_hp_filter,AddOutput,OnPass s1_heavy_heli_phys:AddHealth:3000:0:-1,0,1"
	}
	insert:
	{
		"OnPass" "main_hp_filter,AddOutput,OnPass s1_heavy_heli_phys:AddHealth:4000:0:-1,0,1"
	}
}

;Ram-God (Main bossfight)
modify:
{
	match:
	{
		"targetname" "ramgod_start_relay"
	}
	delete:
	{
		"OnUser1" "main_hp_filter,AddOutput,OnPass ramgod_phys:AddHealth:14000:0:-1,2.1,1"
	}
	insert:
	{
		"OnUser1" "main_hp_filter,AddOutput,OnPass ramgod_phys:AddHealth:14000:0:-1,2.1,1"
	}
}

;Breakable doors before elevator
modify:
{
	match:
	{
		"targetname" "s1_bio_hold2_trigger"
	}
	delete:
	{
		"OnStartTouch" "main_hp_filter,AddOutput,OnPass s1_bio_hold3_break:AddHealth:700:0:-1,0,1"
	}
	insert:
	{
		"OnStartTouch" "main_hp_filter,AddOutput,OnPass s1_bio_hold3_break:AddHealth:600:0:-1,0,1"
	}
}

;Ram-God (Lazers)
modify:
{
	match:
	{
		"targetname" "s1_bio_boss_start_relay"
	}
	delete:
	{
		"OnUser1" "main_hp_filter,AddOutput,OnPass s1_bio_boss_phys:AddHealth:6125:0:-1,2.1,1"
	}
	insert:
	{
		"OnUser1" "main_hp_filter,AddOutput,OnPass s1_bio_boss_phys:AddHealth:6725:0:-1,2.1,1"
	}
}

;------------------
; Warmup
;------------------

;Disables fade output from teleport from motherbase to helicopters.

modify:
{
	match:
	{
		"targetname" "warmup_tp_a"
	}
	delete:
	{
		"OnStartTouch" "main_fade_to_black,Fade,,0,-1"
		"OnStartTouch" "main_fade_from_black,Fade,,4,-1"
	}
}

modify:
{
	match:
	{
		"targetname" "warmup_relay"
	}
	insert:
	{
		"OnSpawn" "main_fade_to_black,AddOutput,spawnflags 8,29.91,1"
		"OnSpawn" "main_fade_to_black,AddOutput,spawnflags 4,30.02,1"
		"OnSpawn" "main_fade_to_black,AddOutput,targetname main_fade_to_blacka,30.05,1"
		"OnSpawn" "main_fade_from_black,AddOutput,spawnflags 13,34.91,1"
		"OnSpawn" "main_fade_from_black,AddOutput,spawnflags 1,35.02,1"
		"OnSpawn" "main_fade_from_black,AddOutput,targetname main_fade_from_blacka,35.05,1"
		
		"OnSpawn" "main_fade_to_blacka,AddOutput,spawnflags 8,70,1"
		"OnSpawn" "main_fade_to_blacka,Fade,,70.05,1"
	}
	
}

;------------------
; Stage 1
;------------------

;------------------
; Fangs
;------------------

;Adjusts timer of the Airstrike Drone "cutscene" at the start of the stage, as my edits to the Drone item's speed in rc2 from rc1 messed this up.

modify:
{
	match:
	{
		"targetname" "s1_fangs_hold2_trigger"
	}
	delete:
	{
		"OnStartTouch" "s1_fangs_hold2_maker,ForceSpawn,,10,1"
		"OnStartTouch" "main_hurt,AddOutput,damage 5,16,1"
	}
	insert:
	{
		"OnStartTouch" "s1_fangs_hold2_maker,ForceSpawn,,8,1"
		"OnStartTouch" "zm_drone_sfx_warn*,Volume,0,8.55,1"
		"OnStartTouch" "zm_drone_move*,Open,,9.40,1"
		"OnStartTouch" "zm_drone_sfx_warn*,PlaySound,,10,1"
		"OnStartTouch" "main_hurt,AddOutput,damage 2,16,1"
	}
}

;------------------
; Heavy
;------------------

;Lowers the height of the raft by 8 units to let zombies on easier.

modify:
{
	match:
	{
		"targetname" "s1_african_raft_train"
	}
	replace:
	{
		"height" "-4"
	}
}

;Increases health zombies get by trying to get in front of the raft from 40 to 600.

modify:
{
	match:
	{
		"targetname" "s1_african_raft_hp"
	}
	delete:
	{
		"OnStartTouch" "!activator,AddOutput,health 40,0,-1"
	}
	insert:
	{
		"OnStartTouch" "!activator,AddOutput,health 600,0,-1"
	}
}

;Does all outputs to kill the radar manually when at the helicopter boss because the implemented autokill timer messes up this section.

modify:
{
	match:
	{
		"targetname" "s1_heavy_heli_case"
	}
	insert:
	{
		"OnCase01" "radar_relay,CancelPending,,0.02,-1"
		"OnCase01" "radar_relay,Kill,,0.05,-1"
		"OnCase01" "radar_toggle,Kill,,8.05,-1"
		"OnCase01" "radar_brush,Kill,,8.05,-1"
		
		"OnCase02" "radar_relay,CancelPending,,0.02,-1"
		"OnCase02" "radar_relay,Kill,,0.05,-1"
		"OnCase02" "radar_toggle,Kill,,8.05,-1"
		"OnCase02" "radar_brush,Kill,,8.05,-1"
	}
}

;Removes landmark from teleport that links to Ruins because sometimes people can spawn in the wall.

modify:
{
	match:
	{
		"targetname" "s1_heavy_hold6_tp"
	}
	delete:
	{
		"landmark" "s1_heavy_hold6_landmark"
	}
}

;------------------
; Ruins
;------------------

;Fixes a ladder that has a wrong push angle

modify:
{
	match:
	{
		"targetname" "s1_ruins_hold61_ladder_push"
	}
	replace:
	{
		"pushdir" "0 90 0"
	}
}

;------------------
; Ram-God (Main)
;------------------

;Reduces the percentage the boss needs to have his HP lowered to for berserk mode to trigger (this means more time for zombies).

modify:
{
	match:
	{
		"targetname" "ramgod_hp_compare"
	}
	replace:
	{
		"CompareValue" "0.3"
	}
}

;------------------
; Bioinformatics
;------------------

;Fixes ammo refill not working after bossfight.

modify:
{
	match:
	{
		"targetname" "s1_bio_hold0_trigger"
	}
	delete:
	{
		"OnUser1" "main_ammo_zone,FireUser1,,3.05,1"
	}
	insert:
	{
		"OnStartTouch" "main_ammo_zone,FireUser1,,3.05,1"
	}
}

;Adds fire particles and hurt triggers to paths that the player must not go through after breaking the doors to facilitate navigation.
;North

add:
{
	"origin" "-336 10896 864"
	"targetname" "s1_bio_hold4_fire_north_pfx"
	
	"start_active" "1"
	"spawnflags" "0"
	"flag_as_weather" "0"
	"effect_name" "custom_particle_048"
	"cpoint7_parent" "0"
	"cpoint6_parent" "0"
	"cpoint5_parent" "0"
	"cpoint4_parent" "0"
	"cpoint3_parent" "0"
	"cpoint2_parent" "0"
	"cpoint1_parent" "0"
	"angles" "0 0 0"
	"classname" "info_particle_system"
	"hammerid" "247945"
}

add:
{
	"model" "*269"
	"targetname" "s1_bio_hold4_north_hurt"
	
	"StartDisabled" "0"
	"spawnflags" "1"
	"origin" "-320 10896 1008"
	"nodmgforce" "0"
	"damagetype" "16384"
	"damagemodel" "0"
	"damagecap" "20"
	"damage" "20"
	"classname" "trigger_hurt"
	"hammerid" "245870"
	"OnHurtPlayer" "kevlar_hurt,Hurt,,0,-1"
}

add:
{
	"model" "*237"
	"targetname" "s1_bio_hold4_clip_north"
	"spawnobject" "0"
	"spawnflags" "1"
	"rendermode" "0"
	"renderfx" "0"
	"rendercolor" "255 255 255"
	"renderamt" "255"
	"propdata" "0"
	"pressuredelay" "0"
	"physdamagescale" "1.0"
	"PerformanceMode" "0"
	"origin" "-352 10960 1248"
	"nodamageforces" "0"
	"minhealthdmg" "0"
	"material" "2"
	"health" "0"
	"gibdir" "0 0 0"
	"explosion" "0"
	"ExplodeRadius" "0"
	"explodemagnitude" "0"
	"ExplodeDamage" "0"
	"disableshadows" "1"
	"disablereceiveshadows" "1"
	"classname" "func_breakable"
	"hammerid" "139750"
}

modify:
{
	match:
	{
		"targetname" "s1_bio_hold3_break"
		"origin" "360 11664 1296"
	}
	insert:
	{
		"OnBreak" "s1_bio_hold4_fire_north_pfx,Kill,,0,1"
		"OnBreak" "s1_bio_hold4_north_hurt,Kill,,0,1"
	}
}

;South

add:
{
	"origin" "-368 8848 864"
	"targetname" "s1_bio_hold4_fire_south_pfx"
	
	"start_active" "1"
	"spawnflags" "0"
	"flag_as_weather" "0"
	"effect_name" "custom_particle_048"
	"cpoint7_parent" "0"
	"cpoint6_parent" "0"
	"cpoint5_parent" "0"
	"cpoint4_parent" "0"
	"cpoint3_parent" "0"
	"cpoint2_parent" "0"
	"cpoint1_parent" "0"
	"angles" "0 0 0"
	"classname" "info_particle_system"
	"hammerid" "247945"
}

add:
{
	"model" "*269"
	"targetname" "s1_bio_hold4_south_hurt"
	
	"StartDisabled" "0"
	"spawnflags" "1"
	"origin" "-352 8848 1008"
	"nodmgforce" "0"
	"damagetype" "16384"
	"damagemodel" "0"
	"damagecap" "20"
	"damage" "20"
	"classname" "trigger_hurt"
	"hammerid" "245870"
	"OnHurtPlayer" "kevlar_hurt,Hurt,,0,-1"
}

modify:
{
	match:
	{
		"targetname" "s1_bio_hold3_break"
		"origin" "360 8080 1296"
	}
	insert:
	{
		"OnBreak" "s1_bio_hold4_fire_south_pfx,Kill,,0,1"
		"OnBreak" "s1_bio_hold4_south_hurt,Kill,,0,1"
	}
}

;Removes the HP remove event from getting hit by lazers.

modify:
{
	match:
	{
		"targetname" "s1_bio_boss_bottom_hurt"
	}
	delete:
	{
		"OnHurtPlayer" "s1_bio_boss_phys,RemoveHealth,200,0,-1"
	}
}

modify:
{
	match:
	{
		"targetname" "s1_bio_boss_top_hurt"
	}
	delete:
	{
		"OnHurtPlayer" "s1_bio_boss_phys,RemoveHealth,200,0,-1"
	}
}

;------------------
; Escape
;------------------

;Fixes bad parent on Soul of the Ram-God

modify:
{
	match:
	{
		"targetname" "item_soul_push"
	}
	delete:
	{
		"parentname" "s1_bio_boss_prop"
	}
}

;Increases holdtime at first hold to 22 seconds (from 10).

modify:
{
	match:
	{
		"targetname" "s1_escape_hold1_trigger"
	}
	delete:
	{
		"OnStartTouch" "s1_escape_hold1_door,Open,,10,1"
		"OnStartTouch" "s1_escape_hold1_tp,Enable,,25,1"
		"OnStartTouch" "main_game_text,Display,,17.05,1"
		"OnStartTouch" "main_game_text,AddOutput,message Now Approaching -- Southern Canyon,17,1"
	}
	insert:
	{
		"OnStartTouch" "s1_escape_hold1_door,Open,,22,1"
		"OnStartTouch" "s1_escape_hold1_tp,Enable,,35,1"
		"OnStartTouch" "main_game_text,Display,,27.05,1"
		"OnStartTouch" "main_game_text,AddOutput,message Now Approaching -- Southern Canyon,27,1"
	}
}

;Increases holdtime for helicopter to arrive to 30 seconds and when helicopter stops to 25 seconds (from 20 and 20).

modify:
{
	match:
	{
		"targetname" "s1_escape_hold2_trigger"
	}
	delete:
	{
		"OnStartTouch" "s1_escape_hold2_heli_train,FireUser1,,1,-1"
	}
	insert:
	{
		"OnStartTouch" "s1_escape_hold2_heli_train,FireUser1,,11,-1"
	}
}

modify:
{
	match:
	{
		"targetname" "s1_escape_hold2_heli_path6"
	}
	delete:
	{
		"OnPass" "s1_escape_hold2_heli_train,StartForward,,20,1"
	}
	insert:
	{
		"OnPass" "s1_escape_hold2_heli_train,StartForward,,25,1"
	}
}

;Rearranges the order of music being played / disabled to hopefully fix it playing correctly.
;Also fixes points.

modify:
{
	match:
	{
		"targetname" "s1_escape_music_a"
	}
	delete:
	{
		"OnUser1" "!self,Kill,,0.05,1"
	}
}

modify:
{
	match:
	{
		"targetname" "s1_escape_win_trigger"
	}
	delete:
	{
		"OnStartTouch" "main_win_overlay,FireUser1,,0,1"
		"OnStartTouch" "main_win_sound,PlaySound,,0,1"
		"OnStartTouch" "main_console,Command,say **Map by Vanyarin -- Thanks for playing**,11.2,1"
		"OnStartTouch" "nuke_zone,FireUser1,,11.2,1"
		"OnStartTouch" "main_nuke_sound_a,PlaySound,,11.2,1"
		"OnStartTouch" "s1_escape_music_b,Volume,0,0,-1"
		"OnStartTouch" "s1_escape_music_b,Kill,,0.05,-1"
		"OnStartTouch" "s1_escape_music_a,Volume,0,0,-1"
		"OnStartTouch" "s1_escape_music_a,Kill,,0.05,-1"
		"OnStartTouch" "main_points,ApplyScore,,0.05,1"
	}
	insert:
	{
		"OnStartTouch" "s1_escape_music_a,Volume,0,0,1"
		"OnStartTouch" "s1_escape_music_a,Kill,,0.05,1"
		"OnStartTouch" "s1_escape_music_b,Volume,0,0.1,1"
		"OnStartTouch" "s1_escape_music_b,Kill,,0.15,1"
		"OnStartTouch" "main_win_overlay,FireUser1,,0.20,1"
		"OnStartTouch" "main_win_sound,PlaySound,,0.20,1"
		"OnStartTouch" "main_console,Command,say **Map by Vanyarin -- Thanks for playing**,11.4,1"
		"OnStartTouch" "nuke_zone,FireUser1,,11.4,1"
		"OnStartTouch" "main_nuke_sound_a,PlaySound,,11.4,1"
		"OnStartTouch" "main_hp_filter,AddOutput,OnPass main_points:ApplyScore::0:-1,11.4,1"
		"OnStartTouch" "main_hp_zone,FireUser1,,11.5,1"
	}
}

;------------------
; Changelog
;------------------

;May 18th (After first test on Nide)

;Increased first rock at Ravine HP from 800 to 2200HP.
;Increased second rock at Ravine HP from 200 to 400HP.
;Increased holdtime on both Escape holds.
;Reduced the HP needed for Ram-God to go berserk.


;May 22nd (After NA run on Nide)

;Fixed fadein/outs during warmup.
;Lowered height of the raft by 8 units.
;Increased health zombies get if they try to get in front of the raft from 40 to 600HP.
;Increased first rock at Ravine HP from 2200 to 3200HP.
;Removes landmark from teleport that links to Ruins from Heavy because sometimes people can spawn in the wall.
;Fixed ammo refill not working after first Ram-God boss.
;Increased lazer Ram-God HP from 6125 to 6725HP.
;Increased waiting time for the helicopter to come at the escape from 20 to 30 seconds but lowered the time the helicopter stays down from 40 to 25 seconds.

;May 25th (After EU #2 on Nide)

;Fixed fadein/outs during warmup for real this time.
;Decreased first rock at Ravine HP from 3200 to 2600HP.
;Fixed parent on Soul of the Ram-God push triggers.



;; _

;; fix raft

modify:
{
	match:
	{
		"targetname" "s1_african_raft_train"
		"classname" "func_tracktrain"
	}
	replace:
	{
		"spawnflags" "2"
	}
}

;; disable ztele for zombies, so Zombie Drone couldn't teleport and infect humans

modify:
{
	match:
	{
		"targetname" "main_console"
		"classname" "point_servercommand"
	}
	delete:
	{
		"OnUser1" "!self,Command,zr_ztele_zombie 1,0,1"
	}
	insert:
	{
		"OnUser1" "!self,Command,zr_ztele_zombie 0,0,1"
	}
}
modify:
{
	match:
	{
		"targetname" "s1_african_raft_path13"
		"classname" "path_track"
	}
	insert:
	{
		"OnPass" "main_console,Command,zr_ztele_zombie 1,1,1"
	}
}


