[Ready] Refactors stuns and status effects. (#17579)

* Fixes reviver runtime

* Confusion status effect

* Dizzy status effect

* Drowsiness status effect

* decaying -> transient

* Drunkenness status effect

* why use timer when SSfastprocessing work good

* stuns (mostly)

* weaken and immobalise

* stun/weaken times

* update_flags redundancies.

* Slowed()

* Silence + fixes transient decay

* Jittery

* sleeping

* Paralyze -> weaken

* Cult sluring

* paralyse

* Stammer

* slurring + projectile cleanups

* losebreath

* Hallucination

* forgor this

* eyeblurry

* eye blind

* Druggy

* affected didn't like my spacing

* review pass

* second review pass

* some cleanups

* documentation and signal framework

* confusion fix

* Fixes spec_stun

* rejuv fix

* removes a TODO

* conflicted myself

* fixes

* self review

* review

* removes TODOs

* adminfreeze

* TM fixes

* hallucination fix + others

* tones down alchol and runtime fixes

* confusion overlay suggestion

* more fixes

* runtime fix

* losebreath fix

* clamp => directional bounded sum

* steel review

* oops

Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>

* reduces the dizziness cycle rate

* borg hotfix

* sanctified decursening

Co-authored-by: mochi <1496804+dearmochi@users.noreply.github.com>
Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
This commit is contained in:
Charlie
2022-05-24 16:35:26 +01:00
committed by GitHub
parent b32fb92770
commit 0f7a8707ef
311 changed files with 2268 additions and 2155 deletions
@@ -464,10 +464,10 @@
M.reagents.add_reagent("omnizine", 20)
to_chat(M, "<span class='warning'>You feel strange...</span>")
M.Paralyse(30 SECONDS_TO_LIFE_CYCLES)
M.EyeBlind(35 SECONDS_TO_LIFE_CYCLES)
M.EyeBlurry(35 SECONDS_TO_LIFE_CYCLES)
M.AdjustConfused(35 SECONDS_TO_LIFE_CYCLES)
M.Paralyse(30 SECONDS)
M.EyeBlind(35 SECONDS)
M.EyeBlurry(35 SECONDS)
M.AdjustConfused(35 SECONDS)
sleep(6 SECONDS)
to_chat(M, "<span class='warning'>That portal did something to you...</span>")
@@ -530,10 +530,10 @@
// Return them a bit confused.
M.visible_message("<span class='notice'>[M] vanishes...</span>")
M.forceMove(closet)
M.Paralyse(3 SECONDS_TO_LIFE_CYCLES)
M.EyeBlurry(5 SECONDS_TO_LIFE_CYCLES)
M.AdjustConfused(5 SECONDS_TO_LIFE_CYCLES)
M.Dizzy(35)
M.Paralyse(3 SECONDS)
M.EyeBlurry(5 SECONDS)
M.AdjustConfused(5 SECONDS)
M.Dizzy(70 SECONDS)
do_sparks(4, FALSE, destination)
// Newscaster story
@@ -3,7 +3,7 @@
desc = "A compact, specialised baton issued to Syndicate contractors. Applies light electrical shocks to targets."
// Overrides
affect_silicon = TRUE
stun_time = 1
stun_time = 2 SECONDS
cooldown = 2.5 SECONDS
force_off = 5
force_on = 15
@@ -16,9 +16,9 @@
/// Stamina damage to deal on stun.
var/stamina_damage = 70
/// Jitter to deal on stun.
var/jitter_amount = 5 SECONDS_TO_JITTER
var/jitter_amount = 5 SECONDS
/// Stutter to deal on stun.
var/stutter_amount = 10 SECONDS_TO_LIFE_CYCLES
var/stutter_amount = 10 SECONDS
/obj/item/melee/classic_baton/telescopic/contractor/stun(mob/living/target, mob/living/user)
. = ..()
@@ -71,7 +71,7 @@
H.mind.add_antag_datum(new /datum/antagonist/mindslave/thrall(user.mind, greet_text))
if(jobban_isbanned(H, ROLE_VAMPIRE))
SSticker.mode.replace_jobbanned_player(H, SPECIAL_ROLE_VAMPIRE_THRALL)
H.Stun(2)
H.Stun(4 SECONDS)
user.create_log(CONVERSION_LOG, "vampire enthralled", H)
H.create_log(CONVERSION_LOG, "was vampire enthralled", user)
@@ -113,12 +113,12 @@
continue
new /obj/effect/temp_visual/blood_tendril(blood_turf)
addtimer(CALLBACK(src, .proc/apply_slowdown, T, area_of_affect, 3, user), 0.5 SECONDS)
addtimer(CALLBACK(src, .proc/apply_slowdown, T, area_of_affect, 6 SECONDS, user), 0.5 SECONDS)
/obj/effect/proc_holder/spell/vampire/blood_tendrils/proc/apply_slowdown(turf/T, distance, slowed_amount, mob/user)
for(var/mob/living/L in range(distance, T))
if(L.affects_vampire(user))
L.AdjustSlowed(slowed_amount)
L.Slowed(slowed_amount)
L.visible_message("<span class='warning'>[L] gets ensared in blood tendrils, restricting [L.p_their()] movement!</span>")
new /obj/effect/temp_visual/blood_tendril/long(get_turf(L))
@@ -234,8 +234,8 @@
H.adjustBruteLoss(2)
owner.heal_overall_damage(8, 2, TRUE)
owner.adjustStaminaLoss(-15)
owner.AdjustStunned(-1)
owner.AdjustWeakened(-1)
owner.AdjustStunned(-2 SECONDS)
owner.AdjustWeakened(-2 SECONDS)
if(drain_amount == 10)
to_chat(H, "<span class='warning'>You feel your life force draining!</b></span>")
@@ -72,7 +72,7 @@
if(!C.affects_vampire()) // no parameter here so holy always protects
return
C.extinguish_light()
C.EyeBlind(10)
C.EyeBlind(20 SECONDS)
STOP_PROCESSING(SSobj, src) // won't wither away once you are trapped
..()
if(!iscarbon(loc)) // if it fails to latch onto someone for whatever reason, delete itself, we don't want unarmed ones lying around.
@@ -83,8 +83,9 @@
/obj/item/restraints/legcuffs/beartrap/shadow_snare/attack_tk(mob/user)
if(iscarbon(user))
var/mob/living/carbon/C = user
to_chat(user, "<span class='userdanger'>The snare sends a psychic backlash!</span>")
user.EyeBlind(10)
C.EyeBlind(20 SECONDS)
/obj/item/restraints/legcuffs/beartrap/shadow_snare/process()
var/turf/T = get_turf(src)
@@ -185,22 +185,22 @@
continue
var/deviation
if(user.weakened || user.resting)
if(user.IsWeakened() || user.resting)
deviation = DEVIATION_PARTIAL
else
deviation = calculate_deviation(target, user)
if(deviation == DEVIATION_FULL)
target.AdjustConfused(3)
target.AdjustConfused(6 SECONDS)
target.adjustStaminaLoss(40)
else if(deviation == DEVIATION_PARTIAL)
target.Weaken(1)
target.AdjustConfused(3)
target.Weaken(2 SECONDS)
target.AdjustConfused(6 SECONDS)
target.adjustStaminaLoss(40)
else
target.adjustStaminaLoss(120)
target.Weaken(6)
target.AdjustSilence(3)
target.Weaken(12 SECONDS)
target.AdjustSilence(6 SECONDS)
target.flash_eyes(1, TRUE, TRUE)
to_chat(target, "<span class='warning'>You are blinded by [user]'s glare.</span>")
add_attack_logs(user, target, "(Vampire) Glared at")
@@ -302,7 +302,7 @@
H.adjustBrainLoss(60)
else
visible_message("<span class='warning'>[H] looks to be stunned by the energy!</span>")
H.Weaken(20)
H.Weaken(40 SECONDS)
return
for(var/obj/item/implant/mindshield/L in H)
if(L && L.implanted)
@@ -319,7 +319,7 @@
add_attack_logs(M, H, "Vampire-sired")
H.mind.make_vampire()
H.revive()
H.Weaken(20)
H.Weaken(40 SECONDS)
/obj/effect/proc_holder/spell/turf_teleport/shadow_step
name = "Shadow Step (30)"