From a60ac1d855d4b87ff39fc97d7cbb909d95e19667 Mon Sep 17 00:00:00 2001 From: Time-Green <7501474+Time-Green@users.noreply.github.com> Date: Fri, 6 Dec 2024 23:01:09 +0100 Subject: [PATCH] Makes wild anomaly spawns more bearable (#87960) ## About The Pull Request - Material anomaly will now self-delete after 1-4 relocations - Bioscrambler now has a countdown like all other anomalies - Increased anomaly lifetime from 99 seconds to 120 - Adds some more detonation effects where there were none (see: I abuse the circle effect jacq added (again)) ## Why It's Good For The Game Material anomalies can wreak insane havok throughout the station if it's not caught quickly. It's a cat and mouse game, which can get kinda frustrating (flashbacks to trying to get the anomaly but it constantly teleporting just before I get to it). I don't wanna kill the cat & mouse game, but putting a limit on it so the entire station doesn't suffer endlessly to pizza/snow/jungle toilets is a nice middle road. Bioscramblers are actually beyond frustrating. If someone doesn't immediately go for them, they'll start locking on and noclipping through the entire station and mutating every single person for the rest of the shift. This would probably be less bad if the bioscrambler couldn't give every single organ (par some blacklisted), causing a lot of irreversible damage, spontaneous combustions, glitches and creeping rare organs and limbs into a round "for the lulz". (This doesn't fix the absolute organ slop that they cause, but reworking bioscramblers not to be shit is for later.) I've also given anomalies 20 extra seconds of runtime. Anomalies take 99 seconds, take 30 to announce (for most), giving scientists 69 seconds to get anomaly catching gear and navigate to the area and defuse it. It's always felt like just barely too little time, often not getting the anomaly even when I am beelining. It was usually enough from when we just had meta, but we got bigger and bigger maps. It also gives them more time to wreak havoc for chaos lovers. ## Changelog :cl: balance: Bioscramblers are no longer immortal balance: Anomalies give 20 extra seconds to defuse! Or 20 extra seconds for them to reach havoc... balance: Material anomalies only teleport 1-4 times before detonating /:cl: --- code/__DEFINES/anomaly.dm | 2 +- .../objects/effects/anomalies/_anomalies.dm | 4 +++- .../effects/anomalies/anomalies_bioscrambler.dm | 7 ++++++- .../effects/anomalies/anomalies_bluespace.dm | 8 ++++++++ .../effects/anomalies/anomalies_dimensional.dm | 17 ++++++++++++++++- .../effects/anomalies/anomalies_gravity.dm | 8 ++++++++ .../effects/anomalies/anomalies_vortex.dm | 10 ++++++++++ .../events/anomaly/anomaly_bioscrambler.dm | 2 +- 8 files changed, 53 insertions(+), 5 deletions(-) diff --git a/code/__DEFINES/anomaly.dm b/code/__DEFINES/anomaly.dm index 7422af3fc65..6ca1db70678 100644 --- a/code/__DEFINES/anomaly.dm +++ b/code/__DEFINES/anomaly.dm @@ -4,7 +4,7 @@ */ ///Time in ticks before the anomaly goes poof/explodes depending on type. -#define ANOMALY_COUNTDOWN_TIMER (99 SECONDS) +#define ANOMALY_COUNTDOWN_TIMER (120 SECONDS) /** * Nuisance/funny anomalies diff --git a/code/game/objects/effects/anomalies/_anomalies.dm b/code/game/objects/effects/anomalies/_anomalies.dm index f249d22500c..035a6e05d90 100644 --- a/code/game/objects/effects/anomalies/_anomalies.dm +++ b/code/game/objects/effects/anomalies/_anomalies.dm @@ -11,10 +11,13 @@ var/obj/item/assembly/signaler/anomaly/anomaly_core = /obj/item/assembly/signaler/anomaly var/area/impact_area + /// How long till we seppuku? Blocked by immortal var/lifespan = ANOMALY_COUNTDOWN_TIMER var/death_time + /// Color of the countdown effect var/countdown_colour + /// Reference to the countdown effect var/obj/effect/countdown/anomaly/countdown /// Do we drop a core when we're neutralized? @@ -129,7 +132,6 @@ to_chat(user, span_notice("Analyzing... [src]'s unstable field is not fluctuating along a stable frequency.")) return ITEM_INTERACT_BLOCKING - ///Stabilize an anomaly, letting it stay around forever or untill destabilizes by a player. An anomaly without a core can't be signalled, but can be destabilized /obj/effect/anomaly/proc/stabilize(anchor = FALSE, has_core = TRUE) immortal = TRUE diff --git a/code/game/objects/effects/anomalies/anomalies_bioscrambler.dm b/code/game/objects/effects/anomalies/anomalies_bioscrambler.dm index d722d90ed11..37914308199 100644 --- a/code/game/objects/effects/anomalies/anomalies_bioscrambler.dm +++ b/code/game/objects/effects/anomalies/anomalies_bioscrambler.dm @@ -3,9 +3,10 @@ name = "bioscrambler anomaly" icon_state = "bioscrambler" anomaly_core = /obj/item/assembly/signaler/anomaly/bioscrambler - immortal = TRUE pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE | PASSCLOSEDTURF | PASSMACHINE | PASSSTRUCTURE | PASSDOORS layer = ABOVE_MOB_LAYER + lifespan = ANOMALY_COUNTDOWN_TIMER * 2 + /// Who are we moving towards? var/datum/weakref/pursuit_target /// Cooldown for every anomaly pulse @@ -80,6 +81,10 @@ /obj/effect/anomaly/bioscrambler/docile/update_target() return +/obj/effect/anomaly/bioscrambler/detonate() + COOLDOWN_RESET(src, pulse_cooldown) + anomalyEffect() + /// Visual effect spawned when the bioscrambler scrambles your bio /obj/effect/temp_visual/circle_wave icon = 'icons/effects/64x64.dmi' diff --git a/code/game/objects/effects/anomalies/anomalies_bluespace.dm b/code/game/objects/effects/anomalies/anomalies_bluespace.dm index 7b1de41e564..5c941050bfd 100644 --- a/code/game/objects/effects/anomalies/anomalies_bluespace.dm +++ b/code/game/objects/effects/anomalies/anomalies_bluespace.dm @@ -24,6 +24,9 @@ do_teleport(AM, locate(AM.x, AM.y, AM.z), 8, channel = TELEPORT_CHANNEL_BLUESPACE) /obj/effect/anomaly/bluespace/detonate() + new /obj/effect/temp_visual/circle_wave/bluespace(get_turf(src)) + playsound(src, 'sound/effects/magic/cosmic_energy.ogg', vol = 50) + var/turf/T = pick(get_area_turfs(impact_area)) if(!T) return @@ -110,3 +113,8 @@ var/mob/living/living = bumpee living.apply_status_effect(/datum/status_effect/teleport_madness) + +/obj/effect/temp_visual/circle_wave/bluespace + color = COLOR_BLUE_LIGHT + duration = 1 SECONDS + amount_to_scale = 5 diff --git a/code/game/objects/effects/anomalies/anomalies_dimensional.dm b/code/game/objects/effects/anomalies/anomalies_dimensional.dm index 53129c0e9ce..accbe993ab1 100644 --- a/code/game/objects/effects/anomalies/anomalies_dimensional.dm +++ b/code/game/objects/effects/anomalies/anomalies_dimensional.dm @@ -3,7 +3,7 @@ name = "dimensional anomaly" icon_state = "dimensional" anomaly_core = /obj/item/assembly/signaler/anomaly/dimensional - immortal = TRUE + lifespan = ANOMALY_COUNTDOWN_TIMER * 20 // will generally be killed off by reaching max teleports first move_chance = 0 /// Range of effect, if left alone anomaly will convert a 2(range)+1 squared area. var/range = 3 @@ -13,6 +13,12 @@ var/datum/dimension_theme/theme /// Effect displaying on the anomaly to represent the theme. var/mutable_appearance/theme_icon + /// How many times we can still teleport. Delete self if it hits 0 and we try to teleport. If immortal, will simply stay where it is + var/teleports_left + /// Minimum teleports it will do before going away permanently + var/minimum_teleports = 1 + /// Maximum teleports it will do before going away permanently + var/maximum_teleports = 4 /obj/effect/anomaly/dimensional/Initialize(mapload, new_lifespan, drops_core) . = ..() @@ -21,6 +27,8 @@ animate(src, transform = matrix()*0.85, time = 3, loop = -1) animate(transform = matrix(), time = 3, loop = -1) + teleports_left = rand(minimum_teleports, maximum_teleports) + /obj/effect/anomaly/dimensional/Destroy() theme = null target_turfs = null @@ -37,6 +45,10 @@ if (!theme) prepare_area() if (!target_turfs.len) + if(teleports_left <= 0 && !immortal) + detonate() + return + teleports_left-- relocate() return @@ -80,6 +92,9 @@ src.forceMove(new_turf) prepare_area() +/obj/effect/anomaly/dimensional/detonate() + qdel(src) + /obj/effect/temp_visual/transmute_tile_flash icon = 'icons/effects/effects.dmi' icon_state = "shield-flash" diff --git a/code/game/objects/effects/anomalies/anomalies_gravity.dm b/code/game/objects/effects/anomalies/anomalies_gravity.dm index 82b55542246..40cdcbcb15e 100644 --- a/code/game/objects/effects/anomalies/anomalies_gravity.dm +++ b/code/game/objects/effects/anomalies/anomalies_gravity.dm @@ -82,6 +82,10 @@ A.throw_at(target, 5, 1) boing = 0 +/obj/effect/anomaly/grav/detonate() + new /obj/effect/temp_visual/circle_wave/gravity(get_turf(src)) + playsound(src, 'sound/effects/magic/cosmic_energy.ogg', vol = 50) + /obj/effect/anomaly/grav/high var/datum/proximity_monitor/advanced/gravity/grav_field @@ -93,6 +97,7 @@ grav_field = new(src, 7, TRUE, rand(0, 3)) /obj/effect/anomaly/grav/high/detonate() + ..() for(var/obj/machinery/gravity_generator/main/the_generator as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/gravity_generator/main)) if(is_station_level(the_generator.z)) the_generator.blackout() @@ -111,3 +116,6 @@ . = ..() transform *= 3 + +/obj/effect/temp_visual/circle_wave/gravity + color = COLOR_NAVY diff --git a/code/game/objects/effects/anomalies/anomalies_vortex.dm b/code/game/objects/effects/anomalies/anomalies_vortex.dm index 0313f63146b..4c3a63ae5a6 100644 --- a/code/game/objects/effects/anomalies/anomalies_vortex.dm +++ b/code/game/objects/effects/anomalies/anomalies_vortex.dm @@ -62,3 +62,13 @@ SSexplosions.medturf += T if(EXPLODE_LIGHT) SSexplosions.lowturf += T + +/obj/effect/anomaly/bhole/detonate() + new /obj/effect/temp_visual/circle_wave/vortex(get_turf(src)) + playsound(src, 'sound/effects/hallucinations/far_noise.ogg', vol = 50) + +/obj/effect/temp_visual/circle_wave/vortex + color = COLOR_BLACK + duration = 3 SECONDS + amount_to_scale = 4 + diff --git a/code/modules/events/anomaly/anomaly_bioscrambler.dm b/code/modules/events/anomaly/anomaly_bioscrambler.dm index 21df8bdc72c..aa28489a09b 100644 --- a/code/modules/events/anomaly/anomaly_bioscrambler.dm +++ b/code/modules/events/anomaly/anomaly_bioscrambler.dm @@ -17,4 +17,4 @@ /datum/round_event/anomaly/anomaly_bioscrambler/announce(fake) if(isnull(impact_area)) impact_area = placer.findValidArea() - priority_announce("Biologic limb swapping agent detected on [ANOMALY_ANNOUNCE_MEDIUM_TEXT] [impact_area.name]. Wear biosuits or other protective gear to counter the effects. Calculated half-life of %9£$T$%F3 years.", "Anomaly Alert") + priority_announce("Biologic limb swapping agent detected on [ANOMALY_ANNOUNCE_MEDIUM_TEXT] [impact_area.name]. Wear biosuits or other protective gear to counter the effects.", "Anomaly Alert")