[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
@@ -29,7 +29,7 @@
/obj/item/organ/internal/cyberimp/brain/emp_act(severity)
if(!owner || emp_proof)
return
var/stun_amount = 5 + (severity-1 ? 0 : 5)
var/stun_amount = (5 + (severity-1 ? 0 : 5)) STATUS_EFFECT_CONSTANT
owner.Stun(stun_amount)
to_chat(owner, "<span class='warning'>Your body seizes up!</span>")
return stun_amount
@@ -126,7 +126,7 @@
implant_color = "#FFFF00"
slot = "brain_antistun"
origin_tech = "materials=5;programming=4;biotech=5"
var/stun_max_amount = 2
var/stun_max_amount = 4 SECONDS
/obj/item/organ/internal/cyberimp/brain/anti_stun/hardened
name = "Hardened CNS Rebooter implant"
@@ -140,9 +140,9 @@
..()
if(crit_fail)
return
if(owner.stunned > stun_max_amount)
if(owner.AmountStun() > stun_max_amount)
owner.SetStunned(stun_max_amount)
if(owner.weakened > stun_max_amount)
if(owner.AmountWeakened() > stun_max_amount)
owner.SetWeakened(stun_max_amount)
/obj/item/organ/internal/cyberimp/brain/anti_stun/emp_act(severity)
@@ -174,8 +174,8 @@
if(crit_fail)
return
if(owner.stat == UNCONSCIOUS && cooldown == FALSE)
owner.AdjustSleeping(-100, FALSE)
owner.AdjustParalysis(-100, FALSE)
owner.AdjustSleeping(-200 SECONDS)
owner.AdjustParalysis(-200 SECONDS)
to_chat(owner, "<span class='notice'>You feel a rush of energy course through your body!</span>")
cooldown = TRUE
addtimer(CALLBACK(src, .proc/sleepy_timer_end), 50)
@@ -189,7 +189,7 @@
if(crit_fail || emp_proof)
return
crit_fail = TRUE
owner.AdjustSleeping(200)
owner.AdjustSleeping(400 SECONDS)
cooldown = TRUE
addtimer(CALLBACK(src, .proc/reboot), 90 / severity)
@@ -283,7 +283,7 @@
return
if(prob(60/severity) && owner)
to_chat(owner, "<span class='warning'>Your breathing tube suddenly closes!</span>")
owner.AdjustLoseBreath(2)
owner.AdjustLoseBreath(4 SECONDS)
//[[[[CHEST]]]]
/obj/item/organ/internal/cyberimp/chest
@@ -397,6 +397,8 @@
reviving = TRUE
/obj/item/organ/internal/cyberimp/chest/reviver/proc/heal()
if(QDELETED(owner))
return
if(prob(90) && owner.getOxyLoss())
owner.adjustOxyLoss(-3)
revive_cost += 5