Skip to content

Commit

Permalink
Strengthens counterplay vs allergens (#22973)
Browse files Browse the repository at this point in the history
  • Loading branch information
ynot01 authored Jan 28, 2025
1 parent c428b4a commit 4dfc579
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 3 deletions.
9 changes: 9 additions & 0 deletions code/datums/traits/negative.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions code/modules/mob/living/carbon/human/examine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/status_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 9 additions & 1 deletion code/modules/reagents/chemistry/reagents/toxin_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 4dfc579

Please sign in to comment.