+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.
@@ -31,3 +31,13 @@
mob_trait = TRAIT_MASO
gain_text = "<span class='notice'>You desire to be hurt.</span>"
lose_text = "<span class='notice'>Pain has become less exciting for you.</span>"
/datum/quirk/pharmacokinesis //Prevents unwanted organ additions.
name = "Acute hepatic pharmacokinesis"
desc = "You've a rare genetic disorder that causes certain chemicals to be absorbed by your liver instead."
value = 0
mob_trait = TRAIT_PHARMA
lose_text = "<span class='notice'>Your liver feels different.</span>"
var/active = FALSE
var/power = 0
var/cachedmoveCalc = 1
@@ -297,6 +297,9 @@
var/organCheck = FALSE
var/breastCheck = FALSE
var/willyCheck = FALSE
if(!canbearoused)
add_trait(TRAIT_PHARMA)//Prefs prevent unwanted organs.
return
for(var/obj/item/organ/O in internal_organs)
if(istype(O, /obj/item/organ/genital))
organCheck = TRUE
@@ -547,10 +547,19 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
/datum/reagent/fermi/BElarger/on_mob_life(mob/living/carbon/M) //Increases breast size
if(!ishuman(M))//Just in case
return
return..()
var/mob/living/carbon/human/H = M
var/obj/item/organ/genital/breasts/B = M.getorganslot("breasts")
if(!B) //If they don't have breasts, give them breasts.
//If they have Acute hepatic pharmacokinesis, then route processing though liver.
if(M.has_trait(TRAIT_PHARMA))
var/obj/item/organ/liver/L = M.getorganslot("liver")
L.swelling+= 0.1
return..()
//otherwise proceed as normal
var/obj/item/organ/genital/breasts/nB = new
nB.Insert(M)
if(nB)
@@ -579,6 +588,12 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
/datum/reagent/fermi/BElarger/overdose_process(mob/living/carbon/M) //Turns you into a female if male and ODing, doesn't touch nonbinary and object genders.
//Acute hepatic pharmacokinesis.
if(M.has_trait(TRAIT_PHARMA))
var/obj/item/organ/liver/L = M.getorganslot("liver")
L.swelling+= 0.05
return ..()
var/obj/item/organ/genital/penis/P = M.getorganslot("penis")
var/obj/item/organ/genital/testicles/T = M.getorganslot("testicles")
var/obj/item/organ/genital/vagina/V = M.getorganslot("vagina")
@@ -614,7 +629,14 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
/datum/reagent/fermi/BEsmaller/on_mob_life(mob/living/carbon/M)
var/obj/item/organ/genital/breasts/B = M.getorganslot("breasts")
if(!B)
return
//Acute hepatic pharmacokinesis.
if(M.has_trait(TRAIT_PHARMA))
var/obj/item/organ/liver/L = M.getorganslot("liver")
L.swelling-= 0.1
return ..()
//otherwise proceed as normal
return..()
B.cached_size = B.cached_size - 0.1
B.update()
..()
@@ -669,6 +691,14 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
var/mob/living/carbon/human/H = M
var/obj/item/organ/genital/penis/P = M.getorganslot("penis")
if(!P)//They do have a preponderance for escapism, or so I've heard.
//If they have Acute hepatic pharmacokinesis, then route processing though liver.
if(M.has_trait(TRAIT_PHARMA))
var/obj/item/organ/liver/L = M.getorganslot("liver")
L.swelling+= 0.1
return..()
//otherwise proceed as normal
var/obj/item/organ/genital/penis/nP = new
nP.Insert(M)
if(nP)
@@ -690,6 +720,12 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
..()
/datum/reagent/fermi/PElarger/overdose_process(mob/living/carbon/M) //Turns you into a male if female and ODing, doesn't touch nonbinary and object genders.
//Acute hepatic pharmacokinesis.
if(M.has_trait(TRAIT_PHARMA))
var/obj/item/organ/liver/L = M.getorganslot("liver")
L.swelling+= 0.05
return..()
var/obj/item/organ/genital/breasts/B = M.getorganslot("breasts")
var/obj/item/organ/genital/testicles/T = M.getorganslot("testicles")
var/obj/item/organ/genital/vagina/V = M.getorganslot("vagina")
@@ -724,7 +760,14 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
var/mob/living/carbon/human/H = M
var/obj/item/organ/genital/penis/P = H.getorganslot("penis")
if(!P)
return
//Acute hepatic pharmacokinesis.
if(M.has_trait(TRAIT_PHARMA))
var/obj/item/organ/liver/L = M.getorganslot("liver")
L.swelling-= 0.1
return..()
//otherwise proceed as normal
return..()
P.cached_length = P.cached_length - 0.1
P.update()
..()