From f8464b97ef5dede0eaab7efe9d538514cbd4357e Mon Sep 17 00:00:00 2001 From: Nerd Lord Date: Wed, 11 Nov 2015 12:41:07 -0500 Subject: [PATCH] Makes anomalies somewhat more dangerous; hyper-energetic flux anomaly will shock mobs that run into it(or if it runs into them), bluespace anomaly will occasionally teleport mobs away from it in a small radius, vortex anomalies will sometimes throw objects at nearby living mobs, and pyroclastic anomalies will produce MORE FIRE, MORE HEAT, MORE BURNING, and if not disabled, they will burst into flame and the resulting slime will be rabid and thus attack much more aggressively. Also fixes a bug where gravitational anomalies were doing if(!target) throw stuff instead of If(target) throw stuff, meaning it'd either do nothing or runtime. In addition, anomalies move more often, are resistant to explosions and will only be destroyed if they are in devastation range(but why are you bombing it) --- code/game/objects/effects/anomalies.dm | 69 ++++++++++++++++++++------ code/modules/events/anomaly_flux.dm | 2 +- code/modules/events/anomaly_pyro.dm | 5 +- 3 files changed, 60 insertions(+), 16 deletions(-) diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm index 30bc38bf624..5dc5527abfa 100644 --- a/code/game/objects/effects/anomalies.dm +++ b/code/game/objects/effects/anomalies.dm @@ -22,10 +22,17 @@ /obj/effect/anomaly/proc/anomalyEffect() - if(prob(50)) + if(prob(70)) step(src,pick(alldirs)) +/obj/effect/anomaly/ex_act(severity, target) + switch(severity) + if(1) + qdel(src) + if(2 to 3) + return + /obj/effect/anomaly/proc/anomalyNeutralize() PoolOrNew(/obj/effect/particle_effect/smoke/bad, loc) @@ -37,7 +44,7 @@ /obj/effect/anomaly/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/device/analyzer)) - user << "Analyzing... [src]'s unstable field is fluctuating along frequency [aSignal.code]:[format_frequency(aSignal.frequency)]." + user << "Analyzing... [src]'s unstable field is fluctuating along frequency [format_frequency(aSignal.frequency)], code [aSignal.code]." /////////////////////// @@ -60,13 +67,12 @@ step_towards(O,src) for(var/mob/living/M in orange(4, src)) step_towards(M,src) - for(var/obj/O in orange(1,src)) + for(var/obj/O in range(0,src)) if(!O.anchored) - var/mob/living/target = locate() in view(10,src) - if(!target) + var/mob/living/target = locate() in view(4,src) + if(target && !target.stat) O.throw_at(target, 5, 10) - /obj/effect/anomaly/grav/Bump(mob/A) gravShock(A) return @@ -88,11 +94,41 @@ /obj/effect/anomaly/flux name = "flux wave anomaly" icon_state = "electricity2" + density = 1 + var/canshock = 0 + var/shockdamage = 20 /obj/effect/anomaly/flux/New() ..() aSignal.origin_tech = "powerstorage=6;programming=4;plasmatech=4" +/obj/effect/anomaly/flux/anomalyEffect() + ..() + + canshock = 1 + + +/obj/effect/anomaly/flux/Bump(mob/living/M) + mobShock(M) + +/obj/effect/anomaly/flux/Bumped(mob/living/M) + mobShock(M) + +/obj/effect/anomaly/flux/proc/mobShock(mob/living/M) + if(canshock && isliving(M)) + canshock = 0 //Just so you don't instakill yourself if you slam into the anomaly five times in a second. + if(iscarbon(M)) + if(ishuman(M)) + M.electrocute_act(shockdamage, "[name]", safety=1) + return + M.electrocute_act(shockdamage, "[name]") + return + else + M.adjustFireLoss(shockdamage) + M.visible_message("[M] was shocked by \the [name]!", \ + "You feel a powerful shock coursing through your body!", \ + "You hear a heavy electrical crack.") + ///////////////////// /obj/effect/anomaly/bluespace @@ -105,9 +141,14 @@ ..() aSignal.origin_tech = "bluespace=5;magnets=5;powerstorage=3" +/obj/effect/anomaly/bluespace/anomalyEffect() + ..() + for(var/mob/living/M in range(1,src)) + do_teleport(M, locate(M.x, M.y, M.z), 4) + /obj/effect/anomaly/bluespace/Bumped(atom/A) if(isliving(A)) - do_teleport(A, locate(A.x, A.y, A.z), 10) + do_teleport(A, locate(A.x, A.y, A.z), 8) return ///////////////////// @@ -124,7 +165,7 @@ ..() var/turf/simulated/T = get_turf(src) if(istype(T)) - T.atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 3) + T.atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS | SPAWN_OXYGEN, 20) ///////////////////// @@ -146,13 +187,13 @@ grav(rand(0,3), rand(2,3), 50, 25) //Throwing stuff around! - for(var/obj/O in orange(1,src)) + for(var/obj/O in range(2,src)) + if(O == src) + return //DON'T DELETE YOURSELF GOD DAMN if(!O.anchored) - var/mob/living/target = locate() in view(5,src) - if(!target) - return - O.throw_at(target, 5, 10) - return + var/mob/living/target = locate() in view(4,src) + if(target && !target.stat) + O.throw_at(target, 7, 5) else O.ex_act(2) diff --git a/code/modules/events/anomaly_flux.dm b/code/modules/events/anomaly_flux.dm index fd568e4c029..0c99d90f034 100644 --- a/code/modules/events/anomaly_flux.dm +++ b/code/modules/events/anomaly_flux.dm @@ -22,5 +22,5 @@ /datum/round_event/anomaly/anomaly_flux/end() if(newAnomaly.loc)//If it hasn't been neutralized, it's time to blow up. - explosion(newAnomaly, -1, 3, 8, 10) + explosion(newAnomaly, 1, 4, 16, 18) //Low devistation, but hits a lot of stuff. qdel(newAnomaly) \ No newline at end of file diff --git a/code/modules/events/anomaly_pyro.dm b/code/modules/events/anomaly_pyro.dm index 9f5feea38e1..0eee47ebbe4 100644 --- a/code/modules/events/anomaly_pyro.dm +++ b/code/modules/events/anomaly_pyro.dm @@ -28,9 +28,12 @@ /datum/round_event/anomaly/anomaly_pyro/end() if(newAnomaly.loc) - explosion(get_turf(newAnomaly), -1,0,3, flame_range = 4) + var/turf/simulated/T = get_turf(newAnomaly) + if(istype(T)) + T.atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS | SPAWN_OXYGEN, 200) //Make it hot and burny for the new slime var/mob/living/simple_animal/slime/S = new/mob/living/simple_animal/slime(get_turf(newAnomaly)) S.colour = pick("red", "orange") + S.rabid = 1 qdel(newAnomaly) \ No newline at end of file