From 4dfc579820176298d1e4c4ac84405b9bab2044be Mon Sep 17 00:00:00 2001 From: ynot01 Date: Tue, 28 Jan 2025 00:10:35 -0500 Subject: [PATCH] Strengthens counterplay vs allergens (#22973) --- code/datums/traits/negative.dm | 9 +++++++++ code/modules/mob/living/carbon/human/examine.dm | 3 +++ code/modules/mob/living/status_procs.dm | 2 +- .../reagents/chemistry/reagents/medicine_reagents.dm | 2 +- .../reagents/chemistry/reagents/toxin_reagents.dm | 10 +++++++++- 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/code/datums/traits/negative.dm b/code/datums/traits/negative.dm index d2326f0eabf6..1f6712f54aa2 100644 --- a/code/datums/traits/negative.dm +++ b/code/datums/traits/negative.dm @@ -736,6 +736,15 @@ if(H.stat == DEAD) return + if(H.reagents.has_reagent(/datum/reagent/medicine/epinephrine)) + return + if(H.reagents.has_reagent(/datum/reagent/medicine/atropine)) + return + if(H.reagents.has_reagent(/datum/reagent/medicine/diphenhydramine)) + return + if(H.reagents.has_reagent(/datum/reagent/medicine/synaphydramine)) + return + var/datum/reagent/allergy = GLOB.chemical_reagents_list[reagent_id] if(H.reagents.has_reagent(reagent_id)) //check if there are chems diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 14dfc26ea694..30cf05bbfea4 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -281,6 +281,9 @@ if(DISGUST_LEVEL_DISGUSTED to INFINITY) msg += "[t_He] look[p_s()] extremely disgusted.\n" + var/datum/quirk/allergic/allergen = has_quirk(/datum/quirk/allergic) + if((allergen && reagents?.has_reagent(allergen.reagent_id)) || reagents?.has_reagent(/datum/reagent/toxin/histamine)) + msg += span_boldwarning("[t_His] face is very swollen!\n") var/apparent_blood_volume = blood_volume if(skin_tone == "albino") diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm index c5133d9a2695..169d41038d03 100644 --- a/code/modules/mob/living/status_procs.dm +++ b/code/modules/mob/living/status_procs.dm @@ -464,7 +464,7 @@ /mob/living/proc/has_quirk(quirktype) for(var/datum/quirk/Q in roundstart_quirks) if(Q.type == quirktype) - return TRUE + return Q return FALSE /mob/living/proc/remove_all_quirks() diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index 9244dca4bb21..a986defc2778 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -891,7 +891,7 @@ M.adjustFireLoss(-0.5*REM, 0) M.adjustOxyLoss(-0.5*REM, 0) if(M.losebreath >= 4) - M.losebreath -= 2 + M.losebreath = floor(M.losebreath * 0.9) if(M.losebreath < 0) M.losebreath = 0 M.adjustStaminaLoss(-0.5*REM, 0) diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm index d1135520daf3..c139d96de303 100644 --- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm @@ -472,6 +472,15 @@ toxpwr = 0 /datum/reagent/toxin/histamine/on_mob_life(mob/living/carbon/M) + . = ..() + if(M.reagents.has_reagent(/datum/reagent/medicine/epinephrine)) + return + if(M.reagents.has_reagent(/datum/reagent/medicine/atropine)) + return + if(M.reagents.has_reagent(/datum/reagent/medicine/diphenhydramine)) + return + if(M.reagents.has_reagent(/datum/reagent/medicine/synaphydramine)) + return if(prob(50)) switch(pick(1, 2, 3, 4)) if(1) @@ -486,7 +495,6 @@ to_chat(M, "You scratch at an itch.") M.adjustBruteLoss(2*REM, 0) . = 1 - ..() /datum/reagent/toxin/histamine/overdose_process(mob/living/M) M.adjustOxyLoss(2*REM, 0)