Files
CHOMPStation2/code/game/gamemodes/technomancer/spells/spawner/destablize.dm
Neerti bb7be9b628 Tweaks instability
Instability should now feel more responsive and less sluggish to go away.  Instead of it being removed at a semi-random and slow rate, it now has a semi-defined half life of about 46 seconds (IE 100 instability will be around 50 in 46 seconds).  The radiate pulse now occurs every Life() tick as well, and by extension the light radius update, so you should be able to see your purple halo adjust faster.

This unfortunately necessitated tweaking to the strength of instability events.  Instability events should happen more often to compensate for it going away faster.  It may need to be tweaked further.

Instability Glow (IE radiating) now radiates the instability decayed in the Life() tick instead of a third of the current instability.  This means people have more time to get out of the purple light before they start glowing themselves.  Two glowing people tend to equalize their instability if adjacent for awhile, while a third person can cause runaway instability, as normal.

Glowing now starts at 10 instability instead of 30.

Technomancer cores show the instability delta in their stat panel.

Message for standing in purple made bigger and purple-er.

Fixes bug with certain spells which waited for the effect to go off before qdeling the hand item.

Fixes leftover Xenobio tests in example map defines.
2017-09-11 11:46:35 -04:00

54 lines
1.8 KiB
Plaintext

/datum/technomancer/spell/destablize
name = "Destablize"
desc = "Creates an unstable disturbance at the targeted tile, which will afflict anyone nearby with instability who remains nearby. This can affect you \
and your allies as well. The disturbance lasts for twenty seconds."
cost = 100
obj_path = /obj/item/weapon/spell/spawner/destablize
category = OFFENSIVE_SPELLS
/obj/item/weapon/spell/spawner/destablize
name = "destablize"
desc = "Now your enemies can feel what you go through when you have too much fun."
icon_state = "destablize"
cast_methods = CAST_RANGED
aspect = ASPECT_UNSTABLE
spawner_type = /obj/effect/temporary_effect/destablize
/obj/item/weapon/spell/spawner/destablize/New()
..()
set_light(3, 2, l_color = "#C26DDE")
/obj/item/weapon/spell/spawner/destablize/on_ranged_cast(atom/hit_atom, mob/user)
if(within_range(hit_atom) && pay_energy(2000))
adjust_instability(15)
..()
/obj/effect/temporary_effect/destablize
name = "destablizing disturbance"
desc = "This can't be good..."
icon = 'icons/effects/effects.dmi'
icon_state = "blueshatter"
time_to_die = null
invisibility = 0
new_light_range = 6
new_light_power = 20
new_light_color = "#C26DDE"
var/pulses_remaining = 40 // Lasts 20 seconds.
var/instability_power = 5
var/instability_range = 6
/obj/effect/temporary_effect/destablize/New()
..()
spawn(0)
radiate_loop()
/obj/effect/temporary_effect/destablize/proc/radiate_loop()
while(pulses_remaining)
sleep(5)
for(var/mob/living/L in range(src, instability_range) )
var/radius = max(get_dist(L, src), 1)
// Being farther away lessens the amount of instabity received.
var/outgoing_instability = instability_power * ( 1 / (radius**2) )
L.receive_radiated_instability(outgoing_instability)
pulses_remaining--
qdel(src)