[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
co-authored by SteelSlayer mochi
parent b32fb92770
commit 0f7a8707ef
311 changed files with 2268 additions and 2155 deletions
+9 -9
View File
@@ -24,7 +24,7 @@
/datum/mutation/disability/hallucinate/on_life(mob/living/carbon/human/H)
if(prob(1))
H.AdjustHallucinate(45)
H.AdjustHallucinate(45 SECONDS)
/datum/mutation/disability/epilepsy
name = "Epilepsy"
@@ -37,10 +37,10 @@
block = GLOB.epilepsyblock
/datum/mutation/disability/epilepsy/on_life(mob/living/carbon/human/H)
if((prob(1) && H.paralysis < 1))
if((prob(1) && !H.IsParalyzed()))
H.visible_message("<span class='danger'>[H] starts having a seizure!</span>","<span class='alert'>You have a seizure!</span>")
H.Paralyse(10)
H.Jitter(1000)
H.Paralyse(20 SECONDS)
H.Jitter(2000 SECONDS)
/datum/mutation/disability/cough
name = "Coughing"
@@ -53,7 +53,7 @@
block = GLOB.coughblock
/datum/mutation/disability/cough/on_life(mob/living/carbon/human/H)
if((prob(5) && H.paralysis <= 1))
if((prob(5) && H.AmountParalyzed() <= 1))
H.drop_item()
H.emote("cough")
@@ -79,8 +79,8 @@
block = GLOB.twitchblock
/datum/mutation/disability/tourettes/on_life(mob/living/carbon/human/H)
if((prob(10) && H.paralysis <= 1))
H.Stun(10)
if((prob(10) && H.AmountParalyzed() <= 1))
H.Stun(20 SECONDS)
switch(rand(1, 3))
if(1)
H.emote("twitch")
@@ -104,7 +104,7 @@
/datum/mutation/disability/nervousness/on_life(mob/living/carbon/human/H)
if(prob(10))
H.Stuttering(10)
H.Stuttering(20 SECONDS)
/datum/mutation/disability/blindness
name = "Blindness"
@@ -546,7 +546,7 @@
/datum/mutation/disability/dizzy/on_life(mob/living/carbon/human/M)
if(!istype(M))
return
M.Dizzy(300)
M.Dizzy(600 SECONDS)
/datum/mutation/disability/dizzy/deactivate(mob/living/M)
..()
+7 -8
View File
@@ -489,9 +489,9 @@
/obj/effect/proc_holder/spell/leap/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/leap/cast(list/targets, mob/user = usr)
/obj/effect/proc_holder/spell/leap/cast(list/targets, mob/living/user = usr)
var/failure = FALSE
if(istype(user.loc,/mob/) || user.lying || user.stunned || user.buckled || user.stat)
if(istype(user.loc,/mob/) || user.lying || user.IsStunned() || user.buckled || user.stat)
to_chat(user, "<span class='warning'>You can't jump right now!</span>")
return
@@ -507,8 +507,7 @@
user.visible_message("<span class='danger'>[user.name]</b> takes a huge leap!</span>")
playsound(user.loc, 'sound/weapons/thudswoosh.ogg', 50, 1)
if(failure)
user.Weaken(5)
user.Stun(5)
user.Weaken(10 SECONDS)
user.visible_message("<span class='warning'>[user] attempts to leap away but is slammed back down to the ground!</span>",
"<span class='warning'>You attempt to leap away but are suddenly slammed back down to the ground!</span>",
"<span class='notice'>You hear the flexing of powerful muscles and suddenly a crash as a body hits the floor.</span>")
@@ -528,16 +527,16 @@
if(HAS_TRAIT(user, TRAIT_FAT) && prob(66))
user.visible_message("<span class='danger'>[user.name]</b> crashes due to [user.p_their()] heavy weight!</span>")
//playsound(user.loc, 'zhit.wav', 50, 1)
user.AdjustWeakened(10)
user.AdjustStunned(5)
user.AdjustWeakened(20 SECONDS)
user.AdjustStunned(10 SECONDS)
user.layer = prevLayer
if(istype(user.loc,/obj/))
var/obj/container = user.loc
to_chat(user, "<span class='warning'>You leap and slam your head against the inside of [container]! Ouch!</span>")
user.AdjustParalysis(3)
user.AdjustWeakened(5)
user.AdjustParalysis(6 SECONDS)
user.AdjustWeakened(10 SECONDS)
container.visible_message("<span class='danger'>[user.loc]</b> emits a loud thump and rattles a bit.</span>")
playsound(user.loc, 'sound/effects/bang.ogg', 50, 1)
var/wiggle = 6