+Acute hepatic pharmacokinesis. (untested, will test with alterations)CC

This commit is contained in:
Fermi
2019-06-05 00:23:42 +01:00
parent 255aa60441
commit 228ab5b7c9
6 changed files with 99 additions and 3 deletions
+1
View File
@@ -75,6 +75,7 @@
#define TRAIT_NYMPHO "nymphomania"
#define TRAIT_MASO "masochism"
#define TRAIT_HIGH_BLOOD "high_blood"
#define TRAIT_PHARMA "hepatic_pharmacokinesis"
@@ -137,6 +137,15 @@ SLIME SCANNER
to_chat(user, "<span class='danger'>Subject suffering from heart attack: Apply defibrillation or other electric shock immediately!</span>")
if(H.undergoing_liver_failure() && H.stat != DEAD)
to_chat(user, "<span class='danger'>Subject is suffering from liver failure: Apply Corazone and begin a liver transplant immediately!</span>")
var/obj/item/organ/liver/L = M.getorganslot("liver")
if(L.swelling > 20)
to_chat(user, "<span class='danger'>Subject is suffering from hyperhepatia.</span>") //i.e. shrink their liver or give them a transplant.
var/obj/item/organ/tongue/T = M.getorganslot("tongue")
if(!T || T.damage > 40)
to_chat(user, "<span class='danger'>Subject is suffering from caustic burns on their tongue./span>") //i.e. their tongue is shot
var/obj/item/organ/lungs/Lung = M.getorganslot("lungs")
if(Lung.damage > 150)
to_chat(user, "<span class='danger'>Subject is suffering from an acute inhalation injury.</span>") //i.e. Their lungs are shot
var/msg = "<span class='info'>*---------*\nAnalyzing results for [M]:\n\tOverall status: [mob_status]\n"
+30
View File
@@ -16,6 +16,8 @@
var/toxTolerance = LIVER_DEFAULT_TOX_TOLERANCE//maximum amount of toxins the liver can just shrug off
var/toxLethality = LIVER_DEFAULT_TOX_LETHALITY//affects how much damage toxins do to the liver
var/filterToxins = TRUE //whether to filter toxins
var/swelling = 0
var/cachedmoveCalc = 1
/obj/item/organ/liver/on_life()
var/mob/living/carbon/C = owner
@@ -45,11 +47,39 @@
if(damage > maxHealth)//cap liver damage
damage = maxHealth
if(swelling >= 10)
pharmacokinesis()
/obj/item/organ/liver/prepare_eat()
var/obj/S = ..()
S.reagents.add_reagent("iron", 5)
return S
//Just in case
/obj/item/organ/liver/Remove(mob/living/carbon/M, special = 0)
M.remove_movespeed_modifier("pharma")
M.ResetBloodVol() //At the moment, this shouldn't allow application twice. You either have this OR a thirsty ferret.
sizeMoveMod(1, M)
//Applies some of the effects to the patient.
/obj/item/organ/liver/proc/pharmacokinesis()
var/moveCalc = 1+((round(swelling) - 9)/3)
if(moveCalc == cachedmoveCalc)//reduce calculations
return
if(prob(5))
to_chat(owner, "<span class='notice'>You feel a stange ache in your side, almost like a sitch. You notice a hint of perspiration as your breathing becomes labored, this pain is affeting your movements and amking you feel lightheaded.</span>")
var/mob/living/carbon/human/H = owner
H.add_movespeed_modifier("pharma", TRUE, 100, NONE, override = TRUE, multiplicative_slowdown = moveCalc)
H.AdjustBloodVol(moveCalc/3)
sizeMoveMod(moveCalc, H)
/obj/item/organ/liver/proc/sizeMoveMod(var/value, mob/living/carbon/human/H)
if(cachedmoveCalc == value)
return
H.next_move_modifier /= cachedmoveCalc
H.next_move_modifier *= value
cachedmoveCalc = value
/obj/item/organ/liver/fly
name = "insectoid liver"
icon_state = "liver-x" //xenomorph liver? It's just a black liver so it fits.