Files
Bubberstation/code/datums/diseases/anaphylaxis.dm
Alexis 21b4095dfd [MDB IGNORE] [IDB IGNORE] Upstream Sync - 04/17/2026 (#5453)
Upstream 04/17/2026

fixes https://github.com/Bubberstation/Bubberstation/issues/5549

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com>
Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com>
Co-authored-by: rageguy505 <54517726+rageguy505@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Aliceee2ch <160794176+Aliceee2ch@users.noreply.github.com>
Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
Co-authored-by: Tsar-Salat <62388554+Tsar-Salat@users.noreply.github.com>
Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
Co-authored-by: Maxipat <108554989+Maxipat112@users.noreply.github.com>
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com>
Co-authored-by: SimplyLogan <47579821+loganuk@users.noreply.github.com>
Co-authored-by: loganuk <fakeemail123@aol.com>
Co-authored-by: Leland Kemble <70413276+lelandkemble@users.noreply.github.com>
Co-authored-by: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com>
Co-authored-by: Roxy <75404941+TealSeer@users.noreply.github.com>
Co-authored-by: Lucy <lucy@absolucy.moe>
Co-authored-by: siliconOpossum <138069572+siliconOpossum@users.noreply.github.com>
Co-authored-by: Isratosh <Isratosh@hotmail.com>
Co-authored-by: TheRyeGuyWhoWillNowDie <70169560+TheRyeGuyWhoWillNowDie@users.noreply.github.com>
Co-authored-by: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Co-authored-by: Alexander V. <volas@ya.ru>
Co-authored-by: ElGitificador <168473461+ElGitificador@users.noreply.github.com>
Co-authored-by: Twaticus <46540570+Twaticus@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Iamgoofball <iamgoofball@gmail.com>
Co-authored-by: Layzu666 <121319428+Layzu666@users.noreply.github.com>
Co-authored-by: Arturlang <24881678+Arturlang@users.noreply.github.com>
Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com>
Co-authored-by: mrmanlikesbt <99309552+mrmanlikesbt@users.noreply.github.com>
Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
Co-authored-by: John F. Kennedy <54908920+MacaroniCritter@users.noreply.github.com>
Co-authored-by: Cursor <102828457+theselfish@users.noreply.github.com>
Co-authored-by: Josh <josh.adam.powell@gmail.com>
Co-authored-by: Josh Powell <josh.powell@softwire.com>
Co-authored-by: Yobrocharlie <Charliemiller5617@gmail.com>
Co-authored-by: Hardly3D <66234359+Hardly3D@users.noreply.github.com>
Co-authored-by: shayoki <96078776+shayoki@users.noreply.github.com>
Co-authored-by: LT3 <83487515+lessthnthree@users.noreply.github.com>
2026-05-16 00:56:00 +02:00

84 lines
3.9 KiB
Plaintext

/datum/disease/anaphylaxis
form = "Condition"
name = "Anaphylaxis"
desc = "Patient is undergoing a life-threatening allergic reaction and will die if not treated."
max_stages = 3
cure_text = /datum/reagent/medicine/epinephrine::name
cures = list(/datum/reagent/medicine/epinephrine)
cure_chance = 20
agent = "Allergy"
viable_mobtypes = list(/mob/living/carbon/human)
disease_flags = CURABLE
severity = DISEASE_SEVERITY_DANGEROUS
spread_flags = DISEASE_SPREAD_NON_CONTAGIOUS
spread_text = "None"
visibility_flags = HIDDEN_PANDEMIC
bypasses_immunity = TRUE
stage_prob = 5
/datum/disease/anaphylaxis/stage_act(seconds_per_tick)
. = ..()
if(!.)
return
if(HAS_TRAIT(affected_mob, TRAIT_TOXINLOVER)) // You are no fun
cure()
return
// Cool them enough to feel cold to the touch, and then some, because temperature mechanics are dumb
affected_mob.adjust_bodytemperature(-10 * seconds_per_tick * stage, min_temp = BODYTEMP_COLD_DAMAGE_LIMIT - 70)
switch(stage)
// early symptoms: mild shakes and dizziness
if(1)
if(affected_mob.num_hands >= 1 && SPT_PROB(5, seconds_per_tick))
to_chat(affected_mob, span_warning("You feel your hand[affected_mob.num_hands == 1 ? "":"s"] start to shake."))
affected_mob.adjust_jitter_up_to(4 SECONDS * seconds_per_tick, 1 MINUTES)
if(affected_mob.num_legs >= 1 && SPT_PROB(5, seconds_per_tick))
to_chat(affected_mob, span_warning("You feel your leg[affected_mob.num_hands == 1 ? "":"s"] start to shake."))
affected_mob.adjust_jitter_up_to(4 SECONDS * seconds_per_tick, 1 MINUTES)
if(SPT_PROB(2, seconds_per_tick))
affected_mob.adjust_dizzy_up_to(5 SECONDS * seconds_per_tick, 1 MINUTES)
if(SPT_PROB(1, seconds_per_tick))
to_chat(affected_mob, span_danger("Your throat itches."))
// warning symptoms: violent shakes, dizziness, blurred vision, difficulty breathing
if(2)
affected_mob.apply_damage(0.33 * seconds_per_tick, TOX, spread_damage = TRUE)
if(affected_mob.num_hands >= 1 && SPT_PROB(5, seconds_per_tick))
to_chat(affected_mob, span_warning("You feel your hand[affected_mob.num_hands == 1 ? "":"s"] shake violently."))
affected_mob.adjust_jitter_up_to(8 SECONDS * seconds_per_tick, 1 MINUTES)
if(prob(20))
affected_mob.drop_all_held_items()
if(affected_mob.num_legs >= 1 && SPT_PROB(5, seconds_per_tick))
to_chat(affected_mob, span_warning("You feel your leg[affected_mob.num_hands == 1 ? "":"s"] shake violently."))
affected_mob.adjust_jitter_up_to(8 SECONDS * seconds_per_tick, 1 MINUTES)
if(prob(40) && affected_mob.get_stamina_loss() < 75)
affected_mob.adjust_stamina_loss(15)
if(affected_mob.get_organ_slot(ORGAN_SLOT_EYES) && SPT_PROB(4, seconds_per_tick))
affected_mob.adjust_eye_blur(4 SECONDS * seconds_per_tick)
to_chat(affected_mob, span_warning("It's getting harder to see clearly."))
if(!HAS_TRAIT(affected_mob, TRAIT_NOBREATH) && SPT_PROB(4, seconds_per_tick))
affected_mob.apply_damage(2 * seconds_per_tick, OXY)
affected_mob.losebreath += (2 * seconds_per_tick)
to_chat(affected_mob, span_warning("It's getting harder to breathe."))
if(SPT_PROB(2, seconds_per_tick))
affected_mob.adjust_drowsiness_up_to(3 SECONDS * seconds_per_tick, 30 SECONDS)
if(SPT_PROB(2, seconds_per_tick))
affected_mob.adjust_dizzy_up_to(5 SECONDS * seconds_per_tick, 1 MINUTES)
affected_mob.adjust_confusion_up_to(1 SECONDS * seconds_per_tick, 10 SECONDS)
if(SPT_PROB(2, seconds_per_tick))
affected_mob.vomit(MOB_VOMIT_MESSAGE|MOB_VOMIT_HARM)
affected_mob.Stun(2 SECONDS) // The full 20 second vomit stun would be lethal
if(SPT_PROB(1, seconds_per_tick))
affected_mob.emote("cough")
if(SPT_PROB(1, seconds_per_tick))
to_chat(affected_mob, span_danger("Your throat feels sore."))
// "you are too late" symptoms: death.
if(3)
affected_mob.apply_damage(3 * seconds_per_tick, TOX, spread_damage = TRUE)
affected_mob.apply_damage(1 * seconds_per_tick, OXY)
affected_mob.Unconscious(3 SECONDS * seconds_per_tick)