From e8d42244ebd60e223e84a0d293c088ce9e91d17b Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Sun, 3 May 2015 19:52:05 -0500 Subject: [PATCH 1/4] Slime Mutation Changes +new reactions Slime mutation chance starts at a flat 27% Slime mutation chance is now hereditary, with the new baby slimes inheriting the mutation chance of the parent (with a variation of -5 to +5). This allows you to cultivate slimes that are more likely to mutate over time rather than praying to the RNG forever. Plasma no longer causes slimes to have a higher mutation chance, and epinephrine no longer lowers mutation chance. Red slime extract+plasma now gives a potion that increases mutation chace Blue slime extract+blood now gives a potion that lowers mutation chance. The numbers might need tweaking if this makes xenobio too fast, but right now it is often frustrating and slow. It is more reliable and faster to build a mech than breed slimes given the current mutation system. --- .../mob/living/simple_animal/slime/life.dm | 4 +- .../mob/living/simple_animal/slime/powers.dm | 1 + .../mob/living/simple_animal/slime/slime.dm | 4 +- .../Chemistry-Recipes/Slime_extracts.dm | 33 ++++++++++- .../research/xenobiology/xenobiology.dm | 59 +++++++++++++++++++ 5 files changed, 96 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/living/simple_animal/slime/life.dm b/code/modules/mob/living/simple_animal/slime/life.dm index 904803ff26c..9dc3ab4cfd4 100644 --- a/code/modules/mob/living/simple_animal/slime/life.dm +++ b/code/modules/mob/living/simple_animal/slime/life.dm @@ -147,7 +147,7 @@ temp_change = (temperature - current) return temp_change -/mob/living/simple_animal/slime/handle_chemicals_in_body() +/*/mob/living/simple_animal/slime/handle_chemicals_in_body() if(reagents) reagents.metabolize(src) @@ -159,7 +159,7 @@ mutation_chance = max(mutation_chance - 5,0) //Prevents muation chance going <0% reagents.remove_reagent("epinephrine", 5) updatehealth() - +*/ /mob/living/simple_animal/slime/handle_regular_status_updates() if(..()) diff --git a/code/modules/mob/living/simple_animal/slime/powers.dm b/code/modules/mob/living/simple_animal/slime/powers.dm index b6f4ed34b86..3b1df681f67 100644 --- a/code/modules/mob/living/simple_animal/slime/powers.dm +++ b/code/modules/mob/living/simple_animal/slime/powers.dm @@ -191,6 +191,7 @@ if(i != 1) step_away(M,src) M.Friends = Friends.Copy() babies += M + M.mutation_chance = mutation_chance+(rand(-5,5)) feedback_add_details("slime_babies_born","slimebirth_[replacetext(M.colour," ","_")]") var/mob/living/simple_animal/slime/new_slime = pick(babies) diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index 7dd50a1008d..9ce6e40676e 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -40,7 +40,7 @@ status_flags = CANPARALYSE|CANPUSH var/cores = 1 // the number of /obj/item/slime_extract's the slime has left inside - var/mutation_chance = 30 // Chance of mutating, should be between 25 and 35 + var/mutation_chance = 27 // Chance of mutating, should be between 25 and 35 var/powerlevel = 0 // 1-10 controls how much electricity they are generating var/amount_grown = 0 // controls how long the slime has been overfed, if 10, grows or reproduces @@ -61,6 +61,7 @@ var/list/speech_buffer = list() // Last phrase said near it and person who said it var/mood = "" // To show its face + var/mutator_used = 0 //So you can't shove a dozen mutators into a single slime ///////////TIME FOR SUBSPECIES @@ -80,7 +81,6 @@ icon_dead = "[icon_state] dead" real_name = name slime_mutation = mutation_table(colour) - mutation_chance = rand(25, 35) var/sanitizedcolour = replacetext(colour, " ", "") coretype = text2path("/obj/item/slime_extract/[sanitizedcolour]") ..() diff --git a/code/modules/reagents/Chemistry-Recipes/Slime_extracts.dm b/code/modules/reagents/Chemistry-Recipes/Slime_extracts.dm index cf323dd09e8..be029b2220a 100644 --- a/code/modules/reagents/Chemistry-Recipes/Slime_extracts.dm +++ b/code/modules/reagents/Chemistry-Recipes/Slime_extracts.dm @@ -218,6 +218,23 @@ /datum/chemical_reaction/slimefrost/on_reaction(var/datum/reagents/holder) feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + +/datum/chemical_reaction/slimestabilizer + name = "Slime Stabilizer" + id = "m_slimestabilizer" + result = null + required_reagents = list("blood" = 1) + result_amount = 1 + required_container = /obj/item/slime_extract/blue + required_other = 1 + +/datum/chemical_reaction/slimestabilizer/on_reaction(var/datum/reagents/holder) + feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + var/obj/item/weapon/slimestabilizer/P = new /obj/item/weapon/slimestabilizer + P.loc = get_turf(holder.my_atom) + + + //Dark Blue /datum/chemical_reaction/slimefreeze name = "Slime Freeze" @@ -363,7 +380,7 @@ P.loc = get_turf(holder.my_atom) //Red -/datum/chemical_reaction/slimeglycerol +/*/datum/chemical_reaction/slimeglycerol name = "Slime Glycerol" id = "m_glycerol" result = "glycerol" @@ -374,7 +391,21 @@ /datum/chemical_reaction/slimeglycerol/on_reaction(var/datum/reagents/holder) feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") +*/ +/datum/chemical_reaction/slimemutator + name = "Slime Mutator" + id = "m_slimemutator" + result = null + required_reagents = list("plasma" = 1) + result_amount = 1 + required_container = /obj/item/slime_extract/red + required_other = 1 + +/datum/chemical_reaction/slimemutator/on_reaction(var/datum/reagents/holder) + feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + var/obj/item/weapon/slimemutator/P = new /obj/item/weapon/slimemutator + P.loc = get_turf(holder.my_atom) /datum/chemical_reaction/slimebloodlust name = "Bloodlust" diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index f054bbb6867..7447861c0c8 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -236,6 +236,13 @@ M.cores = 3 qdel(src) + +/obj/item/weapon/slimesteroid3 + name = "slime steroid" + desc = "A potent chemical mix that will cause a slime to generate more extract." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle16" + /obj/item/weapon/slimesteroid2 name = "extract enhancer" desc = "A potent chemical mix that will give a slime extract three uses." @@ -256,6 +263,58 @@ qdel(src)*/ +/obj/item/weapon/slimestabilizer + name = "slime stabilizer" + desc = "A potent chemical mix that will reduce the chance of a slime mutating." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle15" + +/obj/item/weapon/slimestabilizer/attack(mob/living/simple_animal/slime/M as mob, mob/user as mob) + if(!isslime(M)) + user << " The stabilizer only works on baby slimes!" + return ..() + if(M.stat) + user << " The slime is dead!" + return..() + if(M.mutation_chance == 0) + user <<" The slime already has no chance of mutating!" + return..() + + user <<"You feed the slime the stabilizer. It is now less likely to mutate." + M.mutation_chance -= 15 + if(M.mutation_chance < 0) + M.mutation_chance = 0 + qdel(src) + +/obj/item/weapon/slimemutator + name = "slime mutator" + desc = "A potent chemical mix that will increase the chance of a slime mutating." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle3" + +/obj/item/weapon/slimemutator/attack(mob/living/simple_animal/slime/M as mob, mob/user as mob) + if(!isslime(M)) + user << " The mutator only works on baby slimes!" + return ..() + if(M.stat) + user << " The slime is dead!" + return..() + if(M.mutator_used == 1) + user << " This slime has already consumed a mutator, any more would be far too unstable!" + return..() + if(M.mutation_chance == 100) + user <<" The slime is already guaranteed to mutate!" + return..() + + user <<"You feed the slime the mutator. It is now more likely to mutate." + M.mutation_chance += 5 + if(M.mutation_chance < 0) + M.mutation_chance = 0 + M.mutator_used = 1 + qdel(src) + + + ////////Adamantine Golem stuff I dunno where else to put it // This will eventually be removed. From 8b6b8887db3f3f02dde0d8654c31ca99603b9aba Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Mon, 4 May 2015 09:05:42 -0500 Subject: [PATCH 2/4] More slime stuff Further tweaks slime mutation chances based on Crimson's feedback, makes the code prettier based on Remie's feedback --- code/modules/mob/living/simple_animal/slime/life.dm | 13 ------------- .../mob/living/simple_animal/slime/powers.dm | 2 +- .../modules/mob/living/simple_animal/slime/slime.dm | 2 +- code/modules/research/xenobiology/xenobiology.dm | 12 ++++-------- 4 files changed, 6 insertions(+), 23 deletions(-) diff --git a/code/modules/mob/living/simple_animal/slime/life.dm b/code/modules/mob/living/simple_animal/slime/life.dm index 9dc3ab4cfd4..88b876e102e 100644 --- a/code/modules/mob/living/simple_animal/slime/life.dm +++ b/code/modules/mob/living/simple_animal/slime/life.dm @@ -147,19 +147,6 @@ temp_change = (temperature - current) return temp_change -/*/mob/living/simple_animal/slime/handle_chemicals_in_body() - - if(reagents) - reagents.metabolize(src) - - if (reagents.get_reagent_amount("plasma")>=5) - mutation_chance = min(mutation_chance + 5,50) //Prevents mutation chance going >50% - reagents.remove_reagent("plasma", 5) - if (reagents.get_reagent_amount("epinephrine")>=5) - mutation_chance = max(mutation_chance - 5,0) //Prevents muation chance going <0% - reagents.remove_reagent("epinephrine", 5) - updatehealth() -*/ /mob/living/simple_animal/slime/handle_regular_status_updates() if(..()) diff --git a/code/modules/mob/living/simple_animal/slime/powers.dm b/code/modules/mob/living/simple_animal/slime/powers.dm index 3b1df681f67..e2b541d9c53 100644 --- a/code/modules/mob/living/simple_animal/slime/powers.dm +++ b/code/modules/mob/living/simple_animal/slime/powers.dm @@ -191,7 +191,7 @@ if(i != 1) step_away(M,src) M.Friends = Friends.Copy() babies += M - M.mutation_chance = mutation_chance+(rand(-5,5)) + M.mutation_chance = Clamp(mutation_chance+(rand(5,-5)),0,100) feedback_add_details("slime_babies_born","slimebirth_[replacetext(M.colour," ","_")]") var/mob/living/simple_animal/slime/new_slime = pick(babies) diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index 9ce6e40676e..0ecace17a6e 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -40,7 +40,7 @@ status_flags = CANPARALYSE|CANPUSH var/cores = 1 // the number of /obj/item/slime_extract's the slime has left inside - var/mutation_chance = 27 // Chance of mutating, should be between 25 and 35 + var/mutation_chance = 30 // Chance of mutating, should be between 25 and 35 var/powerlevel = 0 // 1-10 controls how much electricity they are generating var/amount_grown = 0 // controls how long the slime has been overfed, if 10, grows or reproduces diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index 7447861c0c8..2cc97cc4a0a 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -271,7 +271,7 @@ /obj/item/weapon/slimestabilizer/attack(mob/living/simple_animal/slime/M as mob, mob/user as mob) if(!isslime(M)) - user << " The stabilizer only works on baby slimes!" + user << " The stabilizer only works on slimes!" return ..() if(M.stat) user << " The slime is dead!" @@ -281,9 +281,7 @@ return..() user <<"You feed the slime the stabilizer. It is now less likely to mutate." - M.mutation_chance -= 15 - if(M.mutation_chance < 0) - M.mutation_chance = 0 + M.mutation_chance = Clamp(M.mutation_chance-15,0,100) qdel(src) /obj/item/weapon/slimemutator @@ -294,7 +292,7 @@ /obj/item/weapon/slimemutator/attack(mob/living/simple_animal/slime/M as mob, mob/user as mob) if(!isslime(M)) - user << " The mutator only works on baby slimes!" + user << " The mutator only works on slimes!" return ..() if(M.stat) user << " The slime is dead!" @@ -307,9 +305,7 @@ return..() user <<"You feed the slime the mutator. It is now more likely to mutate." - M.mutation_chance += 5 - if(M.mutation_chance < 0) - M.mutation_chance = 0 + M.mutation_chance = Clamp(M.mutation_chance+12,0,100) M.mutator_used = 1 qdel(src) From 91be614fa5d2939629af3b179e8dc8f1558330a7 Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Tue, 5 May 2015 21:49:49 -0500 Subject: [PATCH 3/4] More changes Based on Remie's suggestions --- code/modules/research/xenobiology/xenobiology.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index 2cc97cc4a0a..f6693492790 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -297,7 +297,7 @@ if(M.stat) user << " The slime is dead!" return..() - if(M.mutator_used == 1) + if(M.mutator_used) user << " This slime has already consumed a mutator, any more would be far too unstable!" return..() if(M.mutation_chance == 100) @@ -306,7 +306,7 @@ user <<"You feed the slime the mutator. It is now more likely to mutate." M.mutation_chance = Clamp(M.mutation_chance+12,0,100) - M.mutator_used = 1 + M.mutator_used = TRUE qdel(src) @@ -417,4 +417,4 @@ G.loc = src.loc G.key = ghost.key G << "You are an adamantine golem. You move slowly, but are highly resistant to heat and cold as well as blunt trauma. You are unable to wear clothes, but can still use most tools. Serve [user], and assist them in completing their goals at any cost." - qdel(src) \ No newline at end of file + qdel(src) From daa9a92998ee985f6ca9aed49c8fe2c4efca2da6 Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Tue, 5 May 2015 21:50:22 -0500 Subject: [PATCH 4/4] Update slime.dm Fixed mutator used to be boolean --- code/modules/mob/living/simple_animal/slime/slime.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index 0ecace17a6e..e2caeb9bb2b 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -61,7 +61,7 @@ var/list/speech_buffer = list() // Last phrase said near it and person who said it var/mood = "" // To show its face - var/mutator_used = 0 //So you can't shove a dozen mutators into a single slime + var/mutator_used = FALSE //So you can't shove a dozen mutators into a single slime ///////////TIME FOR SUBSPECIES