From a75ac3bc1358cc0391280767aa66e35c6ca1be85 Mon Sep 17 00:00:00 2001 From: BordListian Date: Sun, 25 Feb 2018 21:52:17 +0100 Subject: [PATCH] Removes liver unfailure and makes alcohol do the killing thing sometimes (#35840) * - Removes liver unfailure * - MY LIVER FAILED INSTANTLY * - Increases liver damage tenfold because whats the point of this pr if you need to drink 100 liters of the toughest booze in the game before you get liver damage * - Fixes cyber livers not being twice as durable as ordinary livers - Ok compromise alcohol does twice as much liver damage - Fixes livers regenerating after they failed * - I'll be happy if bacchus blessing destroys my liver and absinthe doesn't * - I think this is the final number I'll punch in. I downed 14 shot glasses of vodka --- code/modules/mob/living/carbon/life.dm | 4 +--- .../reagents/chemistry/reagents/alcohol_reagents.dm | 2 +- code/modules/surgery/organs/liver.dm | 11 ++++++----- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 21689f085e..8cbbc2b90f 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -412,11 +412,9 @@ if((!dna && !liver) || (NOLIVER in dna.species.species_traits)) return if(liver) - if(liver.damage >= 100) + if(liver.damage >= liver.maxHealth) liver.failing = TRUE liver_failure() - else - liver.failing = FALSE else liver_failure() diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index d9e26e34c2..53b98b2d4a 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -39,7 +39,7 @@ All effects don't start immediately, but rather get worse over time; the rate is if(H.drunkenness < volume * boozepwr * ALCOHOL_THRESHOLD_MODIFIER) H.drunkenness = max((H.drunkenness + (sqrt(volume) * boozepwr * ALCOHOL_RATE)), 0) //Volume, power, and server alcohol rate effect how quickly one gets drunk var/obj/item/organ/liver/L = H.getorganslot(ORGAN_SLOT_LIVER) - H.applyLiverDamage((max(sqrt(volume) * boozepwr * L.alcohol_tolerance, 0))/10) + H.applyLiverDamage((max(sqrt(volume) * boozepwr * L.alcohol_tolerance, 0))/4) return ..() || . /datum/reagent/consumable/ethanol/reaction_obj(obj/O, reac_volume) diff --git a/code/modules/surgery/organs/liver.dm b/code/modules/surgery/organs/liver.dm index 9dceb5ceda..7e106e0b45 100755 --- a/code/modules/surgery/organs/liver.dm +++ b/code/modules/surgery/organs/liver.dm @@ -20,13 +20,11 @@ /obj/item/organ/liver/on_life() var/mob/living/carbon/C = owner - //slowly heal liver damage - damage = max(0, damage - 0.1) - if(damage > maxHealth)//cap liver damage - damage = maxHealth - if(istype(C)) if(!failing)//can't process reagents with a failing liver + //slowly heal liver damage + damage = max(0, damage - 0.1) + if(filterToxins) //handle liver toxin filtration var/toxamount @@ -47,6 +45,9 @@ if(damage > 10 && prob(damage/3))//the higher the damage the higher the probability to_chat(C, "You feel [pick("nauseous", "dull pain in your lower body", "confused")].") + if(damage > maxHealth)//cap liver damage + damage = maxHealth + /obj/item/organ/liver/prepare_eat() var/obj/S = ..() S.reagents.add_reagent("iron", 5)