(Liver) Organ Damage: Begone Toxins (#6757)

This commit is contained in:
Geeves
2019-08-02 22:03:55 +02:00
committed by Werner
parent b2d1cad33f
commit fc3b3dd658
2 changed files with 61 additions and 1 deletions
+20 -1
View File
@@ -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)