[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
@@ -35,6 +35,6 @@ Bonus
to_chat(M, "<span class='warning'>[pick("Your head hurts.", "Your mind blanks for a moment.")]</span>")
else
to_chat(M, "<span class='userdanger'>You can't think straight!</span>")
M.AdjustConfused(8, bound_lower = 0, bound_upper = 100)
M.AdjustConfused(16 SECONDS, bound_lower = 0, bound_upper = 200 SECONDS)
return
@@ -34,5 +34,5 @@ Bonus
to_chat(M, "<span class='warning'>[pick("You feel dizzy.", "Your head spins.")]</span>")
else
to_chat(M, "<span class='userdanger'>A wave of dizziness washes over you!</span>")
M.Dizzy(5)
M.Dizzy(10 SECONDS)
return
@@ -36,6 +36,6 @@ Bonus
to_chat(M, "<span class='warning'><b>[pick("Something is following you.", "You are being watched.", "You hear a whisper in your ear.", "Thumping footsteps slam toward you from nowhere.")]</b></span>")
else
to_chat(M, "<span class='userdanger'>[pick("Oh, your head...", "Your head pounds.", "They're everywhere! Run!", "Something in the shadows...")]</span>")
M.AdjustHallucinate(5)
M.AdjustHallucinate(5 SECONDS)
return
@@ -31,16 +31,16 @@ Bonus
var/datum/reagents/RD = M.reagents
if(A.stage >= 3)
M.AdjustSlur(-2)
M.AdjustDrunk(-4)
M.AdjustSlur(-4 SECONDS)
M.AdjustDrunk(-8 SECONDS)
M.reagents.remove_all_type(/datum/reagent/consumable/ethanol, 3, 0, 1)
if(A.stage >= 4)
M.AdjustDrowsy(-2)
M.AdjustDrowsy(-4 SECONDS)
if(RD.has_reagent("lsd"))
RD.remove_reagent("lsd", 5)
if(RD.has_reagent("histamine"))
RD.remove_reagent("histamine", 5)
M.AdjustHallucinate(-10)
M.AdjustHallucinate(-10 SECONDS)
if(A.stage >= 5)
RD.check_and_add("mannitol", 10, 10)
@@ -37,15 +37,15 @@ Bonus
to_chat(M, "<span class='warning'>Your eyes itch.</span>")
if(3, 4)
to_chat(M, "<span class='warning'><b>Your eyes burn!</b></span>")
M.EyeBlurry(20)
M.EyeBlurry(40 SECONDS)
eyes.receive_damage(1)
else
to_chat(M, "<span class='userdanger'>Your eyes burn horrificly!</span>")
M.EyeBlurry(30)
M.EyeBlurry(60 SECONDS)
eyes.receive_damage(5)
if(eyes.damage >= 10)
M.become_nearsighted(EYE_DAMAGE)
if(prob(eyes.damage - 10 + 1))
if(!M.eye_blind)
if(!M.AmountBlinded())
to_chat(M, "<span class='userdanger'>You go blind!</span>")
eyes.receive_damage(eyes.max_damage)
@@ -40,5 +40,5 @@ Bonus
M.adjustStaminaLoss(30)
if(M.getStaminaLoss() > 60 && !M.stat)
M.visible_message("<span class='warning'>[M] faints!</span>", "<span class='userdanger'>You swoon and faint...</span>")
M.AdjustSleeping(5)
M.AdjustSleeping(10 SECONDS)
return
+3 -3
View File
@@ -24,15 +24,15 @@
to_chat(affected_mob, "<span class='notice'>You feel panicky.</span>")
if(prob(2))
to_chat(affected_mob, "<span class='danger'>You're overtaken with panic!</span>")
affected_mob.AdjustConfused(rand(2,3))
affected_mob.AdjustConfused(rand(4 SECONDS, 6 SECONDS))
if(4)
if(prob(10))
to_chat(affected_mob, "<span class='danger'>You feel butterflies in your stomach.</span>")
if(prob(5))
affected_mob.visible_message("<span class='danger'>[affected_mob] stumbles around in a panic.</span>", \
"<span class='userdanger'>You have a panic attack!</span>")
affected_mob.AdjustConfused(rand(6,8))
affected_mob.AdjustJitter(rand(6,8))
affected_mob.AdjustConfused(rand(12 SECONDS, 16 SECONDS))
affected_mob.AdjustJitter(rand(12 SECONDS, 16 SECONDS))
if(prob(2))
affected_mob.visible_message("<span class='danger'>[affected_mob] coughs up butterflies!</span>", \
"<span class='userdanger'>You cough up butterflies!</span>")
+1 -1
View File
@@ -28,7 +28,7 @@
A.update_icon()
if(prob(3))
to_chat(affected_mob, "<span class='warning'>You feel a stabbing pain in your abdomen!</span>")
affected_mob.Stun(rand(2,3))
affected_mob.Stun(rand(4 SECONDS, 6 SECONDS))
affected_mob.adjustToxLoss(1)
if(3)
if(prob(1))
+2 -2
View File
@@ -47,10 +47,10 @@
if(prob(3))
to_chat(affected_mob, "<span class='danger'>You lose consciousness...</span>")
affected_mob.visible_message("<span class='warning'>[affected_mob] suddenly collapses</span>")
affected_mob.Paralyse(rand(5,10))
affected_mob.Paralyse(rand(10 SECONDS, 20 SECONDS))
if(prob(1))
affected_mob.emote("snore")
if(prob(15))
affected_mob.stuttering += 3
affected_mob.AdjustStuttering(6 SECONDS)
return
+9 -9
View File
@@ -74,7 +74,7 @@
affected_mob.emote(pick("faint", "collapse", "groan"))
if(prob(7))
to_chat(affected_mob, "<span class='danger'>You can't breathe!</span>")
affected_mob.AdjustLoseBreath(1)
affected_mob.AdjustLoseBreath(2 SECONDS)
if(prob(5))
var/datum/disease/D = new /datum/disease/critical/heart_failure
affected_mob.ForceContractDisease(D)
@@ -126,10 +126,10 @@
affected_mob.emote(pick("pale", "groan"))
if(prob(5))
to_chat(affected_mob, "<span class='danger'>Your heart lurches in your chest!</span>")
affected_mob.AdjustLoseBreath(1)
affected_mob.AdjustLoseBreath(2 SECONDS)
if(prob(3))
to_chat(affected_mob, "<span class='danger'>Your heart stops beating!</span>")
affected_mob.AdjustLoseBreath(3)
affected_mob.AdjustLoseBreath(6 SECONDS)
if(prob(5))
affected_mob.emote(pick("faint", "collapse", "groan"))
if(3)
@@ -183,11 +183,11 @@
if(prob(4))
to_chat(affected_mob, "<span class='warning'>You feel like everything is wrong with your life!</span>")
if(prob(5))
affected_mob.Slowed(rand(4, 16))
affected_mob.Slowed(rand(8 SECONDS, 32 SECONDS))
to_chat(affected_mob, "<span class='warning'>You feel [pick("tired", "exhausted", "sluggish")].</span>")
if(prob(5))
affected_mob.Weaken(6)
affected_mob.Stuttering(10)
affected_mob.Weaken(12 SECONDS)
affected_mob.Stuttering(20 SECONDS)
to_chat(affected_mob, "<span class='warning'>You feel [pick("numb", "confused", "dizzy", "lightheaded")].</span>")
affected_mob.emote("collapse")
if(3)
@@ -195,10 +195,10 @@
var/datum/disease/D = new /datum/disease/critical/shock
affected_mob.ForceContractDisease(D)
if(prob(12))
affected_mob.Weaken(6)
affected_mob.Stuttering(10)
affected_mob.Weaken(12 SECONDS)
affected_mob.Stuttering(20 SECONDS)
to_chat(affected_mob, "<span class='warning'>You feel [pick("numb", "confused", "dizzy", "lightheaded")].</span>")
affected_mob.emote("collapse")
if(prob(12))
to_chat(affected_mob, "<span class='warning'>You feel [pick("tired", "exhausted", "sluggish")].</span>")
affected_mob.Slowed(rand(4, 16))
affected_mob.Slowed(rand(8 SECONDS, 32 SECONDS))
+5 -5
View File
@@ -17,7 +17,7 @@
/datum/disease/food_poisoning/stage_act()
..()
if(affected_mob.sleeping && prob(33))
if(affected_mob.IsSleeping() && prob(33))
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
cure()
return
@@ -28,7 +28,7 @@
if(prob(5))
to_chat(affected_mob, "<span class='danger'>You feel queasy.</span>")
if(2)
if(affected_mob.sleeping && prob(40))
if(affected_mob.IsSleeping() && prob(40))
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
cure()
return
@@ -43,7 +43,7 @@
if(prob(5))
to_chat(affected_mob, "<span class='danger'>You feel nauseous.</span>")
if(3)
if(affected_mob.sleeping && prob(25))
if(affected_mob.IsSleeping() && prob(25))
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
cure()
return
@@ -67,5 +67,5 @@
else
to_chat(affected_mob, "<span class='danger'>Your stomach lurches painfully!</span>")
affected_mob.visible_message("<span class='danger'>[affected_mob] gags and retches!</span>")
affected_mob.Stun(rand(2,4))
affected_mob.Weaken(rand(2,4))
affected_mob.Stun(rand(4 SECONDS, 8 SECONDS))
affected_mob.Weaken(rand(4 SECONDS, 8 SECONDS))
+1 -1
View File
@@ -38,7 +38,7 @@
if(istajaran(affected_mob))
affected_mob.visible_message("<span class='danger'>[affected_mob] coughs up a hairball!</span>", \
"<span class='userdanger'>You cough up a hairball!</span>")
affected_mob.Stun(5)
affected_mob.Stun(10 SECONDS)
else
affected_mob.visible_message("<span class='danger'>[affected_mob]'s form contorts into something more feline!</span>", \
"<span class='userdanger'>YOU TURN INTO A TAJARAN!</span>")
+6 -15
View File
@@ -22,34 +22,25 @@
if(prob(50))
affected_mob.emote("laugh")
if(prob(50))
affected_mob.Jitter(25)
affected_mob.Jitter(50 SECONDS)
if(2)
if(prob(50))
affected_mob.visible_message("<span class='danger'>[affected_mob] laughs uncontrollably!</span>")
affected_mob.Stun(10)
affected_mob.Weaken(10)
affected_mob.Jitter(250)
affected_mob.drop_l_hand()
affected_mob.drop_r_hand()
affected_mob.Weaken(20 SECONDS)
affected_mob.Jitter(500 SECONDS)
if(3)
if(prob(25))
to_chat(affected_mob, "<span class='danger'>You feel like you are about to drop dead!</span>")
to_chat(affected_mob, "<span class='danger'>Your body convulses painfully!</span>")
affected_mob.drop_l_hand()
affected_mob.drop_r_hand()
affected_mob.adjustBruteLoss(5)
affected_mob.adjustOxyLoss(5)
affected_mob.Stun(10)
affected_mob.Weaken(10)
affected_mob.Jitter(250)
affected_mob.Weaken(20 SECONDS)
affected_mob.Jitter(500 SECONDS)
affected_mob.visible_message("<span class='danger'>[affected_mob] laughs uncontrollably!</span>")
if(4)
if(prob(25))
to_chat(affected_mob, "<span class='danger'>You feel like you are going to die!</span>")
affected_mob.adjustOxyLoss(75)
affected_mob.adjustBruteLoss(75)
affected_mob.drop_l_hand()
affected_mob.drop_r_hand()
affected_mob.Stun(10)
affected_mob.Weaken(10)
affected_mob.Weaken(20 SECONDS)
affected_mob.visible_message("<span class='danger'>[affected_mob] laughs uncontrollably!</span>")
+1 -1
View File
@@ -33,7 +33,7 @@
if(prob(5))
affected_mob.visible_message("<span class='danger'>[affected_mob] howls!</span>", \
"<span class='userdanger'>You howl!</span>")
affected_mob.AdjustConfused(rand(6, 8))
affected_mob.AdjustConfused(rand(12 SECONDS, 16 SECONDS))
if(prob(3) && barklimit <= 10)
var/list/puppytype = list(/mob/living/simple_animal/pet/dog/corgi/puppy, /mob/living/simple_animal/pet/dog/pug, /mob/living/simple_animal/pet/dog/fox)
var/mob/living/puppypicked = pick(puppytype)
+1 -1
View File
@@ -52,7 +52,7 @@
to_chat(affected_mob, "You feel very strange.")
if(prob(4))
to_chat(affected_mob, "<span class='danger'>You feel a stabbing pain in your head!</span>")
affected_mob.Paralyse(2)
affected_mob.Paralyse(4 SECONDS)
if(prob(4))
to_chat(affected_mob, "<span class='danger'>Your stomach churns.</span>")
if(3)
+3 -3
View File
@@ -112,7 +112,7 @@
if(3)
if(prob(4))
to_chat(affected_mob, "<span class='danger'>You feel a stabbing pain in your head.</span>")
affected_mob.AdjustConfused(10)
affected_mob.AdjustConfused(20 SECONDS)
if(4)
if(prob(3))
affected_mob.say(pick("Eeek, ook ook!", "Eee-eeek!", "Eeee!", "Ungh, ungh."))
@@ -145,7 +145,7 @@
affected_mob.say(pick("Beep, boop", "beep, beep!", "Boop...bop"))
if(prob(4))
to_chat(affected_mob, "<span class='danger'>You feel a stabbing pain in your head.</span>")
affected_mob.Paralyse(2)
affected_mob.Paralyse(4 SECONDS)
if(4)
if(prob(20))
affected_mob.say(pick("beep, beep!", "Boop bop boop beep.", "kkkiiiill mmme", "I wwwaaannntt tttoo dddiiieeee..."))
@@ -175,7 +175,7 @@
if(3)
if(prob(4))
to_chat(affected_mob, "<span class='danger'>You feel a stabbing pain in your head.</span>")
affected_mob.Paralyse(2)
affected_mob.Paralyse(4 SECONDS)
if(4)
if(prob(20))
affected_mob.say(pick("You look delicious.", "Going to... devour you...", "Hsssshhhhh!"))
+3 -3
View File
@@ -27,7 +27,7 @@
if(4)
if(prob(2))
to_chat(affected_mob, "<span class='userdanger'>You see four of everything</span>")
affected_mob.Dizzy(5)
affected_mob.Dizzy(10 SECONDS)
if(prob(2))
to_chat(affected_mob, "<span class='danger'>You feel a sharp pain from your lower chest!</span>")
affected_mob.adjustOxyLoss(5)
@@ -43,10 +43,10 @@
if(prob(10))
affected_mob.adjustStaminaLoss(100)
affected_mob.visible_message("<span class='warning'>[affected_mob] faints!</span>", "<span class='userdanger'>You surrender yourself and feel at peace...</span>")
affected_mob.AdjustSleeping(5)
affected_mob.AdjustSleeping(10 SECONDS)
if(prob(2))
to_chat(affected_mob, "<span class='userdanger'>You feel your mind relax and your thoughts drift!</span>")
affected_mob.AdjustConfused(8, bound_lower = 0, bound_upper = 100)
affected_mob.AdjustConfused(16 SECONDS, bound_lower = 0, bound_upper = 200 SECONDS)
if(prob(10))
affected_mob.vomit(20)
if(prob(3))
-34
View File
@@ -1,34 +0,0 @@
/datum/disease/vampire
name = "Grave Fever"
max_stages = 3
stage_prob = 5
spread_text = "Non-Contagious"
spread_flags = SPECIAL
cure_text = "Antibiotics"
cures = list("spaceacillin")
agent = "Grave Dust"
cure_chance = 20
viable_mobtypes = list(/mob/living/carbon/human)
severity = DANGEROUS
disease_flags = CURABLE
spread_flags = NON_CONTAGIOUS
/datum/disease/vampire/stage_act()
..()
var/toxdamage = stage * 2
var/stuntime = stage * 2
if(prob(10))
affected_mob.emote(pick("cough","groan", "gasp"))
affected_mob.AdjustLoseBreath(1)
if(prob(15))
if(prob(33))
to_chat(affected_mob, "<span class='danger'>You feel sickly and weak.</span>")
affected_mob.AdjustSlowed(3)
affected_mob.adjustToxLoss(toxdamage)
if(prob(5))
to_chat(affected_mob, "<span class='danger'>Your joints ache horribly!</span>")
affected_mob.Weaken(stuntime)
affected_mob.Stun(stuntime)