From 13cc69e407cfb478b48a6affae1b903b5f9cf09b Mon Sep 17 00:00:00 2001 From: XDTM Date: Tue, 23 Jan 2018 08:36:50 +0100 Subject: [PATCH] Adds a few jelly reagents, small chem adjustments for slimepeople (#34524) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🆑 XDTM add: Added Regenerative Jelly, made with tricordrazine and slime jelly. It regenerates a bit faster, and won't harm jellypeople. add: Added Energized Jelly, made with teslium and jelly. It works as an anti-stun chemical for slimepeople and speeds up luminescents' power cooldown, but non-jellypeople will just get shocked. add: Added Pyroxadone, made with cryoxadone and slime jelly. It's basically inverse cryoxadone: it heals faster the hotter your body temperature is. tweak: Cryoxadone no longer deals toxin damage to jellypeople. tweak: Purple Slime Extracts no longer have their sugar->slime jelly reaction (obsolete with extract grinding), and instead have a blood->regen jelly reaction. tweak: Purple Extract's major activation by Luminescents now give regenerative jelly instead of tricordrazine. /🆑 Gives a better purpose to purple slimes, makes slime jelly something nice to give to chemistry for improved healing, and makes it so luminescents no longer kill themselves with cryoxadone and tricordrazine. Also reduced the amount of frost oil given to luminescents in dark blue's activation, so they match cryoxadone's duration. Fixes #34517 Fixes #34539 --- code/__DEFINES/is_helpers.dm | 2 + .../chemistry/reagents/medicine_reagents.dm | 49 ++++++++++++++++++- .../chemistry/reagents/other_reagents.dm | 6 +-- .../reagents/pyrotechnic_reagents.dm | 22 +++++++++ .../reagents/chemistry/recipes/medicine.dm | 12 +++++ .../chemistry/recipes/pyrotechnics.dm | 7 +++ .../chemistry/recipes/slime_extracts.dm | 10 ++-- .../research/xenobiology/xenobiology.dm | 4 +- 8 files changed, 100 insertions(+), 12 deletions(-) diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index addeca87398..8eff08691ca 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -61,7 +61,9 @@ #define isplasmaman(A) (is_species(A, /datum/species/plasmaman)) #define ispodperson(A) (is_species(A, /datum/species/podperson)) #define isflyperson(A) (is_species(A, /datum/species/fly)) +#define isjellyperson(A) (is_species(A, /datum/species/jelly)) #define isslimeperson(A) (is_species(A, /datum/species/jelly/slime)) +#define isluminescent(A) (is_species(A, /datum/species/jelly/luminescent)) #define isshadowperson(A) (is_species(A, /datum/species/shadow)) #define iszombie(A) (is_species(A, /datum/species/zombie)) #define ishumanbasic(A) (is_species(A, /datum/species/human)) diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index d49ddd57a1d..199317f1aa0 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -41,7 +41,7 @@ M.setOxyLoss(0, 0) M.radiation = 0 M.heal_bodypart_damage(5,5, 0) - M.adjustToxLoss(-5, 0) + M.adjustToxLoss(-5, 0, TRUE) M.hallucination = 0 M.setBrainLoss(0) M.remove_all_disabilities() @@ -134,7 +134,7 @@ M.adjustOxyLoss(-3 * power, 0) M.adjustBruteLoss(-power, 0) M.adjustFireLoss(-power, 0) - M.adjustToxLoss(-power, 0) + M.adjustToxLoss(-power, 0, TRUE) //heals TOXINLOVERs M.adjustCloneLoss(-power, 0) M.status_flags &= ~DISFIGURED . = 1 @@ -157,6 +157,35 @@ metabolization_rate = REAGENTS_METABOLISM * (0.000015 * (M.bodytemperature ** 2) + 0.75) ..() +/datum/reagent/medicine/pyroxadone + name = "Pyroxadone" + id = "pyroxadone" + description = "A mixture of cryoxadone and slime jelly, that apparently inverses the requirement for its activation." + color = "#f7832a" + taste_description = "spicy jelly" + +/datum/reagent/medicine/pyroxadone/on_mob_life(mob/living/M) + if(M.bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT) + var/power = 0 + switch(M.bodytemperature) + if(BODYTEMP_HEAT_DAMAGE_LIMIT to 400) + power = 2 + if(400 to 460) + power = 3 + else + power = 5 + if(M.on_fire) + power *= 2 + + M.adjustOxyLoss(-2 * power, 0) + M.adjustBruteLoss(-power, 0) + M.adjustFireLoss(-1.5 * power, 0) + M.adjustToxLoss(-power, 0, TRUE) + M.adjustCloneLoss(-power, 0) + M.status_flags &= ~DISFIGURED + . = 1 + ..() + /datum/reagent/medicine/rezadone name = "Rezadone" id = "rezadone" @@ -979,6 +1008,22 @@ ..() . = 1 +/datum/reagent/medicine/regen_jelly + name = "Regenerative Jelly" + id = "regen_jelly" + description = "Gradually regenerates all types of damage, without harming slime anatomy." + reagent_state = LIQUID + color = "#91D865" + taste_description = "jelly" + +/datum/reagent/medicine/regen_jelly/on_mob_life(mob/living/M) + M.adjustBruteLoss(-1.5*REM, 0) + M.adjustFireLoss(-1.5*REM, 0) + M.adjustOxyLoss(-1.5*REM, 0) + M.adjustToxLoss(-1.5*REM, 0, TRUE) //heals TOXINLOVERs + . = 1 + ..() + /datum/reagent/medicine/syndicate_nanites //Used exclusively by Syndicate medical cyborgs name = "Restorative Nanites" id = "syndicate_nanites" diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index bee92b0416d..60ea2cfa731 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -559,9 +559,9 @@ if(!H.dna || !H.dna.species || !(H.dna.species.species_traits & SPECIES_ORGANIC)) return - if(istype(H.dna.species, /datum/species/jelly/slime) || istype(H.dna.species, /datum/species/jelly/stargazer) || istype(H.dna.species, /datum/species/jelly/luminescent)) + if(isjellyperson(H)) to_chat(H, "Your jelly shifts and morphs, turning you into another subspecies!") - var/species_type = pick(/datum/species/jelly/slime,/datum/species/jelly/stargazer,/datum/species/jelly/luminescent) + var/species_type = pick(subtypesof(/datum/species/jelly)) H.set_species(species_type) H.reagents.del_reagent(id) @@ -576,7 +576,7 @@ if(prob(10)) to_chat(H, "[pick("You feel your internal organs turning into slime.", "You feel very slimelike.")]") if(20 to INFINITY) - var/species_type = pick(/datum/species/jelly/slime,/datum/species/jelly/stargazer,/datum/species/jelly/luminescent) + var/species_type = pick(subtypesof(/datum/species/jelly)) H.set_species(species_type) H.reagents.del_reagent(id) to_chat(H, "You've become \a jellyperson!") diff --git a/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm b/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm index 7f4e481a29b..ae625cc5543 100644 --- a/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm @@ -226,3 +226,25 @@ M.electrocute_act(rand(5,20), "Teslium in their body", 1, 1) //Override because it's caused from INSIDE of you playsound(M, "sparks", 50, 1) ..() + +/datum/reagent/teslium/energized_jelly + name = "Energized Jelly" + id = "energized_jelly" + description = "Electrically-charged jelly. Boosts jellypeople's nervous system, but only shocks other lifeforms." + reagent_state = LIQUID + color = "#CAFF43" + taste_description = "jelly" + +/datum/reagent/teslium/energized_jelly/on_mob_life(mob/living/M) + if(isjellyperson(M)) + shock_timer = 0 //immune to shocks + M.AdjustStun(-40, 0) + M.AdjustKnockdown(-40, 0) + M.AdjustUnconscious(-40, 0) + M.adjustStaminaLoss(-2, 0) + if(isluminescent(M)) + var/mob/living/carbon/human/H = M + var/datum/species/jelly/luminescent/L = H.dna.species + L.extract_cooldown = max(0, L.extract_cooldown - 20) + ..() + diff --git a/code/modules/reagents/chemistry/recipes/medicine.dm b/code/modules/reagents/chemistry/recipes/medicine.dm index 7123267eb32..fe988ba1b41 100644 --- a/code/modules/reagents/chemistry/recipes/medicine.dm +++ b/code/modules/reagents/chemistry/recipes/medicine.dm @@ -184,6 +184,12 @@ results = list("cryoxadone" = 3) required_reagents = list("stable_plasma" = 1, "acetone" = 1, "mutagen" = 1) +/datum/chemical_reaction/pyroxadone + name = "Pyroxadone" + id = "pyroxadone" + results = list("pyroxadone" = 2) + required_reagents = list("cryoxadone" = 1, "slimejelly" = 1) + /datum/chemical_reaction/clonexadone name = "Clonexadone" id = "clonexadone" @@ -221,6 +227,12 @@ results = list("tricordrazine" = 3) required_reagents = list("bicaridine" = 1, "kelotane" = 1, "antitoxin" = 1) +/datum/chemical_reaction/regen_jelly + name = "Regenerative Jelly" + id = "regen_jelly" + results = list("regen_jelly" = 2) + required_reagents = list("tricordrazine" = 1, "slimejelly" = 1) + /datum/chemical_reaction/corazone name = "Corazone" id = "corazone" diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm index 9f11498ee5d..e3183fae888 100644 --- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm +++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm @@ -379,6 +379,13 @@ mix_message = "A jet of sparks flies from the mixture as it merges into a flickering slurry." required_temp = 400 +/datum/chemical_reaction/energized_jelly + name = "Energized Jelly" + id = "energized_jelly" + results = list("energized_jelly" = 2) + required_reagents = list("slimejelly" = 1, "teslium" = 1) + mix_message = "The slime jelly starts glowing intermittently." + /datum/chemical_reaction/reagent_explosion/teslium_lightning name = "Teslium Destabilization" id = "teslium_lightning" diff --git a/code/modules/reagents/chemistry/recipes/slime_extracts.dm b/code/modules/reagents/chemistry/recipes/slime_extracts.dm index cd068f47d9a..44f904b0a74 100644 --- a/code/modules/reagents/chemistry/recipes/slime_extracts.dm +++ b/code/modules/reagents/chemistry/recipes/slime_extracts.dm @@ -329,11 +329,11 @@ new /obj/item/slimepotion/steroid(get_turf(holder.my_atom)) ..() -/datum/chemical_reaction/slime/slimejam - name = "Slime Jam" - id = "m_jam" - results = list("slimejelly" = 10) - required_reagents = list("sugar" = 1) +/datum/chemical_reaction/slime/slimeregen + name = "Slime Regen" + id = "m_regen" + results = list("regen_jelly" = 5) + required_reagents = list("blood" = 1) required_container = /obj/item/slime_extract/purple required_other = 1 diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index 3445fc4fc9a..8a90499eb3c 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -148,7 +148,7 @@ if(SLIME_ACTIVATE_MAJOR) to_chat(user, "You activate [src], and it releases regenerative chemicals!") - user.reagents.add_reagent("tricordrazine",10) + user.reagents.add_reagent("regen_jelly",10) return 600 /obj/item/slime_extract/darkpurple @@ -261,7 +261,7 @@ to_chat(user, "You activate [src]. You start feeling colder!") user.ExtinguishMob() user.adjust_fire_stacks(-20) - user.reagents.add_reagent("frostoil",5) + user.reagents.add_reagent("frostoil",4) user.reagents.add_reagent("cryoxadone",5) return 100