From 57f113b427f39c01d146e6f136e60cb4a02e7016 Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Wed, 29 Jan 2014 00:58:58 -0500 Subject: [PATCH] Chemistry and Brain Damage --- .../mob/living/carbon/human/human_damage.dm | 2 +- code/modules/mob/living/living.dm | 2 +- code/modules/reagents/Chemistry-Reagents.dm | 117 ++++++++---------- code/modules/reagents/Chemistry-Recipes.dm | 13 +- .../reagents/reagent_containers/glass.dm | 4 +- .../reagents/reagent_containers/hypospray.dm | 8 +- 6 files changed, 66 insertions(+), 80 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index b7be410e4b1..09fa640080e 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -9,7 +9,7 @@ for(var/datum/organ/external/O in organs) //hardcoded to streamline things a bit total_brute += O.brute_dam total_burn += O.burn_dam - health = 100 - getOxyLoss() - getToxLoss() - getCloneLoss() - total_burn - total_brute + health = 100 - getOxyLoss() - getToxLoss() - getCloneLoss() - total_burn - total_brute - getBrainLoss() //TODO: fix husking if( ((100 - total_burn) < config.health_threshold_dead) && stat == DEAD) //100 only being used as the magic human max health number, feel free to change it if you add a var for it -- Urist ChangeToHusk() diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index be03e96784e..2408942671e 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -34,7 +34,7 @@ health = 100 stat = CONSCIOUS else - health = maxHealth - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - getCloneLoss() - halloss + health = maxHealth - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - getCloneLoss() - getBrainLoss() - halloss //This proc is used for mobs which are affected by pressure to calculate the amount of pressure that actually diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index b816af44cb3..0fe13384aa3 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -338,11 +338,10 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M.drowsyness = max(M.drowsyness-2*REM, 0) if(holder.has_reagent("toxin")) - holder.remove_reagent("toxin", 2*REM) + holder.remove_reagent("toxin", 1*REM) if(holder.has_reagent("stoxin")) - holder.remove_reagent("stoxin", 2*REM) + holder.remove_reagent("stoxin", 1*REM) if(holder.has_reagent("plasma")) holder.remove_reagent("plasma", 1*REM) if(holder.has_reagent("sacid")) @@ -350,17 +349,14 @@ datum if(holder.has_reagent("cyanide")) holder.remove_reagent("cyanide", 1*REM) if(holder.has_reagent("amatoxin")) - holder.remove_reagent("amatoxin", 2*REM) + holder.remove_reagent("amatoxin", 1*REM) if(holder.has_reagent("chloralhydrate")) - holder.remove_reagent("chloralhydrate", 5*REM) + holder.remove_reagent("chloralhydrate", 1*REM) if(holder.has_reagent("carpotoxin")) holder.remove_reagent("carpotoxin", 1*REM) if(holder.has_reagent("zombiepowder")) - holder.remove_reagent("zombiepowder", 0.5*REM) - if(holder.has_reagent("mindbreaker")) - holder.remove_reagent("mindbreaker", 2*REM) - M.hallucination = max(0, M.hallucination - 5*REM) - M.adjustToxLoss(-2*REM) + holder.remove_reagent("zombiepowder", 1*REM) + M.adjustToxLoss(-1.5*REM) ..() return @@ -370,12 +366,10 @@ datum description = "A Toxic chemical." reagent_state = LIQUID color = "#CF3600" // rgb: 207, 54, 0 - custom_metabolism = 0.01 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - // Toxins are really weak, but without being treated, last very long. - M.adjustToxLoss(0.2) + M.adjustToxLoss(2) ..() return @@ -385,12 +379,10 @@ datum description = "Liquid plastic, do not eat." reagent_state = LIQUID color = "#CF3600" // rgb: 207, 54, 0 - custom_metabolism = 0.01 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - // Toxins are really weak, but without being treated, last very long. - M.adjustToxLoss(0.2) + M.adjustToxLoss(2) ..() return @@ -401,7 +393,6 @@ datum description = "A highly toxic chemical." reagent_state = LIQUID color = "#CF3600" // rgb: 207, 54, 0 - custom_metabolism = 0.4 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom @@ -410,6 +401,7 @@ datum M.sleeping += 1 ..() return + chefspecial // Quiet and lethal, needs atleast 4 units in the person before they'll die name = "Chef's Special" @@ -507,8 +499,6 @@ datum reagent_state = LIQUID color = "#E895CC" // rgb: 232, 149, 204 - custom_metabolism = 0.1 - on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom if(!data) data = 1 @@ -589,9 +579,9 @@ datum return holywater - name = "Holy Water" + name = "Water" id = "holywater" - description = "An ashen-obsidian-water mix, this solution will alter certain sections of the brain's rationality." + description = "A ubiquitous chemical substance that is composed of hydrogen and oxygen." reagent_state = LIQUID color = "#0064C8" // rgb: 0, 100, 200 @@ -741,12 +731,11 @@ datum description = "A chemical element." reagent_state = LIQUID color = "#484848" // rgb: 72, 72, 72 + custom_metabolism = 0.2 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - if(M.canmove && !M.restrained() && istype(M.loc, /turf/space)) - step(M, pick(cardinal)) - if(prob(5)) M.emote(pick("twitch","drool","moan")) + M.adjustBrainLoss(1) ..() return @@ -945,6 +934,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom M.adjustToxLoss(1*REM) + M.take_organ_damage(0, 1*REM) ..() return @@ -1044,10 +1034,11 @@ datum description = "Radium is an alkaline earth metal. It is extremely radioactive." reagent_state = SOLID color = "#C7C7C7" // rgb: 199,199,199 + custom_metabolism = 0.3 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M.apply_effect(8*REM,IRRADIATE,0) + M.apply_effect(4*REM,IRRADIATE,0) // radium may increase your chances to cure a disease if(istype(M,/mob/living/carbon)) // make sure to only use it on carbon mobs var/mob/living/carbon/C = M @@ -1122,6 +1113,7 @@ datum description = "Might cause unpredictable mutations. Keep away from children." reagent_state = LIQUID color = "#13BC5E" // rgb: 19, 188, 94 + custom_metabolism = 0.3 reaction_mob(var/mob/M, var/method=TOUCH, var/volume) if(!..()) return @@ -1139,7 +1131,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M.dna) return //No robots, AIs, aliens, Ians or other mobs should be affected by this. if(!M) M = holder.my_atom - M.apply_effect(4*REM,IRRADIATE,0) + M.apply_effect(2*REM,IRRADIATE,0) ..() return @@ -1236,7 +1228,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M.apply_effect(1,IRRADIATE,0) + M.apply_effect(2,IRRADIATE,0) ..() return @@ -1341,7 +1333,7 @@ datum M.clean_blood() plantbgone - name = "Plant-B-Gone" + name = "Atrazine" id = "plantbgone" description = "A harmful toxic mixture to kill plantlife. Do not ingest!" reagent_state = LIQUID @@ -1349,7 +1341,7 @@ datum on_mob_life(var/mob/living/carbon/M) if(!M) M = holder.my_atom - M.adjustToxLoss(1.0) + M.adjustToxLoss(2) ..() return @@ -1399,7 +1391,7 @@ datum if(!M) M = holder.my_atom if(holder.has_reagent("inaprovaline")) holder.remove_reagent("inaprovaline", 2*REM) - M.adjustToxLoss(3*REM) + M.adjustToxLoss(2*REM) ..() return reaction_obj(var/obj/O, var/volume) @@ -1649,14 +1641,13 @@ datum ..() return - synaptizine name = "Synaptizine" id = "synaptizine" description = "Synaptizine is used to treat various diseases." reagent_state = LIQUID color = "#FF4040" // rgb: 255, 64, 64 - custom_metabolism = 0.01 + custom_metabolism = 0.05 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom @@ -1682,7 +1673,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom M.jitteriness = max(M.jitteriness-5,0) - if(prob(80)) M.adjustBrainLoss(1*REM) + if(prob(80)) M.adjustBrainLoss(2*REM) if(prob(50)) M.drowsyness = max(M.drowsyness, 3) if(prob(10)) M.emote("drool") ..() @@ -1694,7 +1685,6 @@ datum description = "Hyronalin is a medicinal drug used to counter the effect of radiation poisoning." reagent_state = LIQUID color = "#74C365" // rgb: 116, 195, 101 - custom_metabolism = 0.05 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom @@ -1708,7 +1698,6 @@ datum description = "Arithrazine is an unstable medication used for the most extreme cases of radiation poisoning." reagent_state = LIQUID color = "#BFFF00" // rgb: 191, 255, 0 - custom_metabolism = 0.05 on_mob_life(var/mob/living/M as mob) if(M.stat == 2.0) @@ -1716,7 +1705,7 @@ datum if(!M) M = holder.my_atom M.radiation = max(M.radiation-7*REM,0) M.adjustToxLoss(-1*REM) - if(prob(15)) + if(prob(33)) M.take_organ_damage(1, 0) ..() return @@ -1797,7 +1786,7 @@ datum description = "Hyperzine is a highly effective, long lasting, muscle stimulant." reagent_state = LIQUID color = "#CCFF00" // rgb: 204, 255, 0 - custom_metabolism = 0.03 + custom_metabolism = 0.05 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom @@ -1816,9 +1805,9 @@ datum if(!M) M = holder.my_atom if(M.bodytemperature < 170) M.adjustCloneLoss(-1) - M.adjustOxyLoss(-1) - M.heal_organ_damage(1,1) - M.adjustToxLoss(-1) + M.adjustOxyLoss(-2) + M.heal_organ_damage(2,2) + M.adjustToxLoss(-2) ..() return @@ -1832,10 +1821,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom if(M.bodytemperature < 170) - M.adjustCloneLoss(-3) - M.adjustOxyLoss(-3) - M.heal_organ_damage(3,3) - M.adjustToxLoss(-3) + M.adjustCloneLoss(-4) ..() return @@ -1872,7 +1858,6 @@ datum description = "An all-purpose antiviral agent." reagent_state = LIQUID color = "#228B22" // rgb: 34, 139, 34 - custom_metabolism = 0.01 on_mob_life(var/mob/living/M as mob) ..() @@ -2382,10 +2367,9 @@ datum return amatoxin - name = "Amatoxin" + name = "Amanitin" id = "amatoxin" description = "A powerful poison derived from certain species of mushroom." - custom_metabolism = 0.1 color = "#792300" // rgb: 121, 35, 0 on_mob_life(var/mob/living/M as mob) @@ -2404,7 +2388,7 @@ datum to_remove = min(holder.get_reagent_amount("anti_toxin"),data) holder.remove_reagent("anti_toxin", to_remove, 0) data -= to_remove - M.adjustToxLoss(data) + M.adjustToxLoss((data-1)*rand(2,4)) ..() psilocybin @@ -2705,6 +2689,23 @@ datum data++ return + doctor_delight + name = "The Doctor's Delight" + id = "doctorsdelight" + description = "A gulp a day keeps the MediBot away. That's probably for the best." + reagent_state = LIQUID + nutriment_factor = 1 * FOOD_METABOLISM + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + M:nutrition += nutriment_factor + holder.remove_reagent(src.id, FOOD_METABOLISM) + if(!M) M = holder.my_atom + if(M:getToxLoss() && prob(80)) M:adjustToxLoss(-1) + + ..() + return + berryjuice name = "Berry Juice" id = "berryjuice" @@ -3403,26 +3404,6 @@ datum reagent_state = LIQUID color = "#664300" // rgb: 102, 67, 0 - doctor_delight - name = "The Doctor's Delight" - id = "doctorsdelight" - description = "A gulp a day keeps the MediBot away. That's probably for the best." - reagent_state = LIQUID - nutriment_factor = 1 * FOOD_METABOLISM - color = "#664300" // rgb: 102, 67, 0 - - on_mob_life(var/mob/living/M as mob) - M:nutrition += nutriment_factor - holder.remove_reagent(src.id, FOOD_METABOLISM) - if(!M) M = holder.my_atom - if(M:getOxyLoss() && prob(50)) M:adjustOxyLoss(-2) - if(M:getBruteLoss() && prob(60)) M:heal_organ_damage(2,0) - if(M:getFireLoss() && prob(50)) M:heal_organ_damage(0,2) - if(M:getToxLoss() && prob(50)) M:adjustToxLoss(-2) - if(M.dizziness !=0) M.dizziness = max(0,M.dizziness-15) - if(M.confused !=0) M.confused = max(0,M.confused - 5) - ..() - return changelingsting name = "Changeling Sting" id = "changelingsting" diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index 0db596c6ba4..27b41af7792 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -197,6 +197,13 @@ datum required_catalysts = list("plasma" = 5) result_amount = 2 + holy_water + name = "Holy Water" + id = "holywater" + result = "holywater" + required_reagents = list("water" = 1, "mercury" = 1, "wine" = 1) + result_amount = 3 + virus_food name = "Virus Food" id = "virusfood" @@ -699,8 +706,8 @@ datum name = "Plant-B-Gone" id = "plantbgone" result = "plantbgone" - required_reagents = list("toxin" = 1, "water" = 4) - result_amount = 5 + required_reagents = list("chlorine" = 1, "hydrogen" = 1, "nitrogen" = 1) + result_amount = 3 /////////////////////////////////////OLD SLIME CORE REACTIONS /////////////////////////////// @@ -1676,7 +1683,7 @@ datum name = "The Doctor's Delight" id = "doctordelight" result = "doctorsdelight" - required_reagents = list("limejuice" = 1, "tomatojuice" = 1, "orangejuice" = 1, "cream" = 1, "tricordrazine" = 1) + required_reagents = list("limejuice" = 1, "tomatojuice" = 1, "orangejuice" = 1, "cream" = 1) result_amount = 5 irish_cream diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index cf868d65de7..dfdde564357 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -277,8 +277,8 @@ g_amt = 0 w_class = 3.0 amount_per_transfer_from_this = 20 - possible_transfer_amounts = list(10,20,30,50,70) - volume = 70 + possible_transfer_amounts = list(5,10,15,25,30,50,80,100,120) + volume = 120 flags = FPRINT | OPENCONTAINER attackby(var/obj/D, mob/user as mob) diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 8ec33df216d..d8836dd9bf7 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -10,7 +10,7 @@ icon_state = "hypo" amount_per_transfer_from_this = 5 volume = 30 - possible_transfer_amounts = null + possible_transfer_amounts = list(1,2,3,4,5,10,15,20,25,30) flags = FPRINT | TABLEPASS | OPENCONTAINER slot_flags = SLOT_BELT @@ -20,8 +20,7 @@ /obj/item/weapon/reagent_containers/hypospray/New() //comment this to make hypos start off empty ..() - reagents.add_reagent("doctorsdelight", 15) - reagents.add_reagent("dexalinp", 15) + reagents.add_reagent("tricordrazine", 30) return /obj/item/weapon/reagent_containers/hypospray/attack(mob/M as mob, mob/user as mob) @@ -64,8 +63,7 @@ /obj/item/weapon/reagent_containers/hypospray/autoinjector/New() ..() - reagents.remove_reagent("doctorsdelight", 15) - reagents.remove_reagent("dexalinp", 15) + reagents.remove_reagent("tricordrazine", 30) reagents.add_reagent("tramadol", 4) reagents.add_reagent("hyperzine", 1) update_icon()