[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

View File

@@ -56,4 +56,4 @@
H.visible_message("<span class='danger'>[H] slides on [A]!</span>", "<span class='userdanger'>You slide on [A]!</span>")
cooldown = world.time
H.Weaken(3)
H.Weaken(6 SECONDS)

View File

@@ -10,8 +10,6 @@
/datum/component/slippery
/// Text that gets displayed in the slip proc, i.e. "user slips on [description]"
var/description
/// The amount of stun to apply after slip.
var/stun
/// The amount of weaken to apply after slip.
var/weaken
/// The chance that walking over the parent will slip you.
@@ -25,12 +23,11 @@
/// The verb that players will see when someone slips on the parent. In the form of "You [slip_verb]ped on".
var/slip_verb
/datum/component/slippery/Initialize(_description, _stun = 0, _weaken = 0, _slip_chance = 100, _slip_tiles = 0, _walking_is_safe = TRUE, _slip_always = FALSE, _slip_verb = "slip")
/datum/component/slippery/Initialize(_description, _weaken = 0, _slip_chance = 100, _slip_tiles = 0, _walking_is_safe = TRUE, _slip_always = FALSE, _slip_verb = "slip")
if(!isatom(parent))
return COMPONENT_INCOMPATIBLE
description = _description
stun = max(0, _stun)
weaken = max(0, _weaken)
slip_chance = max(0, _slip_chance)
slip_tiles = max(0, _slip_tiles)
@@ -51,6 +48,6 @@
Additionally calls the parent's `after_slip()` proc on the `victim`.
*/
/datum/component/slippery/proc/Slip(datum/source, mob/living/carbon/human/victim)
if(istype(victim) && !victim.flying && prob(slip_chance) && victim.slip(description, stun, weaken, slip_tiles, walking_is_safe, slip_always, slip_verb))
if(istype(victim) && !victim.flying && prob(slip_chance) && victim.slip(description, weaken, slip_tiles, walking_is_safe, slip_always, slip_verb))
var/atom/movable/owner = parent
owner.after_slip(victim)

View File

@@ -9,8 +9,8 @@
var/mob/living/carbon/human/U = user
if(!istype(U.dna.species, /datum/species/skeleton))
U.adjustStaminaLoss(35) //Extra Damage
U.Jitter(35)
U.stuttering = 20
U.Jitter(70 SECONDS)
U.SetStuttering(40 SECONDS)
if(U.getStaminaLoss() > 95)
to_chat(U, "<font color='red' size='4'><b>Your ears weren't meant for this spectral sound.</b></font>")
spectral_change(U)
@@ -20,20 +20,20 @@
var/mob/living/carbon/human/H = C
if(istype(H.dna.species, /datum/species/skeleton))
return //undeads are unaffected by the spook-pocalypse.
C.Jitter(35)
C.stuttering = 20
C.Jitter(70 SECONDS)
C.SetStuttering(40 SECONDS)
if(!istype(H.dna.species, /datum/species/diona) && !istype(H.dna.species, /datum/species/machine) && !istype(H.dna.species, /datum/species/slime) && !istype(H.dna.species, /datum/species/golem) && !istype(H.dna.species, /datum/species/plasmaman))
C.adjustStaminaLoss(25) //boneless humanoids don't lose the will to live
to_chat(C, "<font color='red' size='4'><B>DOOT</B></font>")
spectral_change(H)
else //the sound will spook monkeys.
C.Jitter(15)
C.stuttering = 20
C.Jitter(30 SECONDS)
C.SetStuttering(40 SECONDS)
/datum/component/spooky/proc/spectral_change(mob/living/carbon/human/H, mob/user)
if((H.getStaminaLoss() > 95) && (!istype(H.dna.species, /datum/species/diona) && !istype(H.dna.species, /datum/species/machine) && !istype(H.dna.species, /datum/species/slime) && !istype(H.dna.species, /datum/species/golem) && !istype(H.dna.species, /datum/species/plasmaman) && !istype(H.dna.species, /datum/species/skeleton)))
H.Stun(20)
H.Stun(40 SECONDS)
H.set_species(/datum/species/skeleton)
H.visible_message("<span class='warning'>[H] has given up on life as a mortal.</span>")
var/T = get_turf(H)