From 1a8b70bc420a29e12e29becee5cf73ae4676d15f Mon Sep 17 00:00:00 2001 From: Guti <32563288+TheCaramelion@users.noreply.github.com> Date: Sat, 1 Aug 2026 18:21:25 +0200 Subject: [PATCH] Anomaly xenoarch effect + Bioscrambler fixes (#19640) * Anomaly stuff * spacing --- code/__defines/anomaly.dm | 11 ++++ code/__defines/xenoarcheaology.dm | 1 + .../objects/effects/anomalies/_anomalies.dm | 2 +- .../anomalies/anomalies_bioscrambler.dm | 9 +++- code/modules/xenoarcheaology/effect.dm | 2 + .../xenoarcheaology/effects/anomaly.dm | 51 +++++++++++++++++++ vorestation.dme | 1 + 7 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 code/modules/xenoarcheaology/effects/anomaly.dm diff --git a/code/__defines/anomaly.dm b/code/__defines/anomaly.dm index 03ccb13e0f4..4109b257de0 100644 --- a/code/__defines/anomaly.dm +++ b/code/__defines/anomaly.dm @@ -48,6 +48,17 @@ #define WEATHER_ANOMALY "weather_anomaly" #define DUST_ANOMALY "dust_anomaly" +#define ANOMALY_ALL list( \ + GRAVITATIONAL_ANOMALY, \ + FLUX_ANOMALY, \ + PYRO_ANOMALY, \ + BIOSCRAMBLER_ANOMALY, \ + HALLUCINATION_ANOMALY, \ + DIMENSIONAL_ANOMALY, \ + WEATHER_ANOMALY, \ + DUST_ANOMALY \ +) + #define ANOMALY_PARTICLE_SIGMA "Sigma particles" #define ANOMALY_PARTICLE_DELTA "Delta particles" #define ANOMALY_PARTICLE_ZETA "Zeta particles" diff --git a/code/__defines/xenoarcheaology.dm b/code/__defines/xenoarcheaology.dm index 9416d8e4336..d1ec23c0dd0 100644 --- a/code/__defines/xenoarcheaology.dm +++ b/code/__defines/xenoarcheaology.dm @@ -116,3 +116,4 @@ #define EFFECT_HEALTH 21 #define EFFECT_GENERATOR 22 #define EFFECT_DNASWITCH 23 +#define EFFECT_ANOMALY 24 diff --git a/code/game/objects/effects/anomalies/_anomalies.dm b/code/game/objects/effects/anomalies/_anomalies.dm index 2a220d46e88..52e4b8c706f 100644 --- a/code/game/objects/effects/anomalies/_anomalies.dm +++ b/code/game/objects/effects/anomalies/_anomalies.dm @@ -169,7 +169,7 @@ if(HALLUCINATION_ANOMALY) new /obj/effect/anomaly/hallucination/supermatter(local_turf, has_changed_lifespan ? rand(15 SECONDS, 25 SECONDS) : null, drops_core) if(BIOSCRAMBLER_ANOMALY) - new /obj/effect/anomaly/bioscrambler/docile(local_turf, null, drops_core) + new /obj/effect/anomaly/bioscrambler(local_turf, null, drops_core) if(DIMENSIONAL_ANOMALY) new /obj/effect/anomaly/dimensional(local_turf, null, drops_core) if(WEATHER_ANOMALY) diff --git a/code/game/objects/effects/anomalies/anomalies_bioscrambler.dm b/code/game/objects/effects/anomalies/anomalies_bioscrambler.dm index 4f93018d601..f3246794bd9 100644 --- a/code/game/objects/effects/anomalies/anomalies_bioscrambler.dm +++ b/code/game/objects/effects/anomalies/anomalies_bioscrambler.dm @@ -35,6 +35,8 @@ playsound(src, 'sound/effects/cosmic_energy.ogg', vol = 50, vary = TRUE) COOLDOWN_START(src, pulse_cooldown, pulse_delay) for(var/mob/living/carbon/human/nearby in viewers(range, src)) + if(nearby.isSynthetic() || nearby.species.flags & NO_DNA) + continue var/susceptibility = GetAnomalySusceptibility(nearby) if(prob(susceptibility * 100)) randmutb(nearby) @@ -73,9 +75,14 @@ continue if(SEND_SIGNAL(target, COMSIG_CHECK_FOR_GODMODE) & COMSIG_GODMODE_CANCEL) continue + if(target.isSynthetic() || target.species.flags & NO_DNA) + continue + if(target.is_incorporeal()) + continue if(target.stat >= UNCONSCIOUS) continue - if(istype(get_area(target), /area/crew_quarters)) + var/area/target_area = get_area(target) + if(target_area.flag_check(AREA_FORBID_EVENTS)) continue var/distance_from_target = get_dist(src, target) if(distance_from_target >= closest_distance) diff --git a/code/modules/xenoarcheaology/effect.dm b/code/modules/xenoarcheaology/effect.dm index 9c730ef2b52..ff3f5a79a89 100644 --- a/code/modules/xenoarcheaology/effect.dm +++ b/code/modules/xenoarcheaology/effect.dm @@ -175,6 +175,8 @@ . += "drain the blood of subjects, creating creatures or anomalous artifacts in the process" if(EFFECT_DNASWITCH) . += "mutate the cells of the organism that touches it, resulting in rampant mutations" + if(EFFECT_ANOMALY) + . += "emit strange, anomalous energies" else . += "have no previously-known anomalous properties" diff --git a/code/modules/xenoarcheaology/effects/anomaly.dm b/code/modules/xenoarcheaology/effects/anomaly.dm new file mode 100644 index 00000000000..feca79c7e47 --- /dev/null +++ b/code/modules/xenoarcheaology/effects/anomaly.dm @@ -0,0 +1,51 @@ +/datum/artifact_effect/anomaly + name = "Anomalous Energies" + effect_type = EFFECT_ANOMALY + + effect_color = "#d400ff" + var/active = TRUE + var/delay = 2 MINUTES + +/datum/artifact_effect/anomaly/DoEffectTouch(mob/user) + var/atom/holder = get_master_holder() + if(!active) + return + if(holder) + var/turf/holder_loc + if(istype(holder, /obj/item/anobattery)) + holder = holder.loc + if(istype(holder, /obj/item/anodevice)) + holder = holder.loc + holder_loc = holder.loc + if(isturf(holder_loc)) + generate_anomaly(holder_loc, pick(ANOMALY_ALL), 2, FALSE) + active = FALSE + VARSET_IN(src, active, TRUE, delay * 5) + +/datum/artifact_effect/anomaly/DoEffectAura() + var/atom/holder = get_master_holder() + if(!active) + return + if(holder) + var/turf/holder_loc + if(istype(holder, /obj/item/anobattery)) + holder = holder.loc + if(istype(holder, /obj/item/anodevice)) + holder = holder.loc + holder_loc = holder.loc + if(isturf(holder_loc)) + for(var/i = 1, i <= 2, i++) + generate_anomaly(holder_loc, pick(ANOMALY_ALL), 15, FALSE) + active = FALSE + VARSET_IN(src, active, TRUE, delay *4 ) + +/datum/artifact_effect/anomaly/DoEffectPulse() + if(!active) + return + + var/datum/anomaly_placer/placer = new() + for(var/i = 1, i <= 4, i++) + var/area/chosen_area = placer.find_valid_area() + generate_anomaly(placer.find_valid_turf(chosen_area), pick(ANOMALY_ALL), 1, FALSE) // EGG HUNT!! + active = FALSE + VARSET_IN(src, active, TRUE, delay * 2.5) diff --git a/vorestation.dme b/vorestation.dme index 88aae8c6001..06ac2301ddb 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -5000,6 +5000,7 @@ #include "code\modules\xenoarcheaology\artifacts\predefined\_predefined.dm" #include "code\modules\xenoarcheaology\artifacts\predefined\hungry_statue.dm" #include "code\modules\xenoarcheaology\effects\animate_anomaly.dm" +#include "code\modules\xenoarcheaology\effects\anomaly.dm" #include "code\modules\xenoarcheaology\effects\atmospheric.dm" #include "code\modules\xenoarcheaology\effects\berserk.dm" #include "code\modules\xenoarcheaology\effects\cell.dm"