diff --git a/code/modules/organs/organ_internal.dm b/code/modules/organs/organ_internal.dm index f4ef04280e3..fe5a5192400 100644 --- a/code/modules/organs/organ_internal.dm +++ b/code/modules/organs/organ_internal.dm @@ -137,7 +137,26 @@ if(owner.life_tick % PROCESS_ACCURACY == 0) - //High toxins levels are dangerous + //A liver's duty is to get rid of toxins + if(owner.getToxLoss() > 0 && owner.getToxLoss() <= 3) + owner.adjustToxLoss(-0.2) //there isn't a lot of toxin damage, so we're going to be chill and slowly filter it out + else if(owner.getToxLoss() > 3) + if(is_bruised()) + //damaged liver works less efficiently + owner.adjustToxLoss(-0.5) + if(!owner.reagents.has_reagent("anti_toxin")) //no damage to liver if anti-toxin is present + src.damage += 0.1 * PROCESS_ACCURACY + else if(is_broken()) + //non-functioning liver ADDS toxins + owner.adjustToxLoss(-0.1) //roughly 33 minutes to kill someone straight out, stacks with 60+ tox proc tho + else + //functioning liver removes toxins at a cost + owner.adjustToxLoss(-1) + if(!owner.reagents.has_reagent("anti_toxin")) //no damage to liver if anti-toxin is present + src.damage += 0.05 * PROCESS_ACCURACY + + + //High toxins levels are super dangerous if(owner.getToxLoss() >= 60 && !owner.reagents.has_reagent("anti_toxin")) //Healthy liver suffers on its own if (src.damage < min_broken_damage) diff --git a/html/changelogs/geeves-liverWorks.yml b/html/changelogs/geeves-liverWorks.yml new file mode 100644 index 00000000000..f2bf617f219 --- /dev/null +++ b/html/changelogs/geeves-liverWorks.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: Geeves + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "The liver now slowly heals toxin damage, and will take damage if the toxins it filters is of a substantial amount."