From 3605aa5e4de4093103b8e1b9836b51dfd462f5f4 Mon Sep 17 00:00:00 2001 From: TheDZD Date: Mon, 27 Jun 2016 10:57:54 -0400 Subject: [PATCH 1/5] Re-Adds Instability --- code/__DEFINES/genetics.dm | 2 + code/game/dna/genes/disabilities.dm | 70 +++--- code/game/dna/genes/gene.dm | 9 +- code/game/dna/genes/goon_disabilities.dm | 207 ++++++++--------- code/game/dna/genes/goon_powers.dm | 225 ++++++++++--------- code/game/dna/genes/powers.dm | 132 ++++++----- code/game/dna/genes/vg_disabilities.dm | 33 +-- code/game/dna/genes/vg_powers.dm | 36 ++- code/modules/mob/living/carbon/human/life.dm | 7 +- 9 files changed, 379 insertions(+), 342 deletions(-) diff --git a/code/__DEFINES/genetics.dm b/code/__DEFINES/genetics.dm index e6988ca745e..5e04d288764 100644 --- a/code/__DEFINES/genetics.dm +++ b/code/__DEFINES/genetics.dm @@ -124,3 +124,5 @@ #define NUTRITION_LEVEL_HUNGRY 250 #define NUTRITION_LEVEL_STARVING 150 +//Used for calculations for negative effects of having genetics powers +#define DEFAULT_GENE_INSTABILITY -4 diff --git a/code/game/dna/genes/disabilities.dm b/code/game/dna/genes/disabilities.dm index f62268b621a..cb2ab29dae0 100644 --- a/code/game/dna/genes/disabilities.dm +++ b/code/game/dna/genes/disabilities.dm @@ -35,7 +35,7 @@ if(sdisability) M.sdisabilities|=sdisability if(activation_message) - to_chat(M, "\red [activation_message]") + to_chat(M, "[activation_message]") else testing("[name] has no activation message.") @@ -47,7 +47,7 @@ if(sdisability) M.sdisabilities &= ~sdisability if(deactivation_message) - to_chat(M, "\red [deactivation_message]") + to_chat(M, "[deactivation_message]") else testing("[name] has no deactivation message.") @@ -55,86 +55,95 @@ name="Hallucinate" activation_message="Your mind says 'Hello'." deactivation_message ="Sanity returns. Or does it?" + instability = -2 mutation=HALLUCINATE - New() - block=HALLUCINATIONBLOCK +/datum/dna/gene/disability/hallucinate/New() + block=HALLUCINATIONBLOCK /datum/dna/gene/disability/epilepsy name="Epilepsy" activation_message="You get a headache." deactivation_message ="Your headache is gone, at last." + instability = -2 disability=EPILEPSY - New() - block=EPILEPSYBLOCK +/datum/dna/gene/disability/epilepsy/New() + block=EPILEPSYBLOCK /datum/dna/gene/disability/cough name="Coughing" activation_message="You start coughing." deactivation_message ="Your throat stops aching." + instability = -1 disability=COUGHING - New() - block=COUGHBLOCK +/datum/dna/gene/disability/cough/New() + block=COUGHBLOCK /datum/dna/gene/disability/clumsy name="Clumsiness" activation_message="You feel lightheaded." deactivation_message ="You regain some control of your movements" + instability = -2 mutation=CLUMSY - New() - block=CLUMSYBLOCK +/datum/dna/gene/disability/clumsy/New() + block=CLUMSYBLOCK /datum/dna/gene/disability/tourettes name="Tourettes" activation_message="You twitch." deactivation_message ="Your mouth tastes like soap." + instability = -1 disability=TOURETTES - New() - block=TWITCHBLOCK +/datum/dna/gene/disability/tourettes/New() + block=TWITCHBLOCK /datum/dna/gene/disability/nervousness name="Nervousness" activation_message="You feel nervous." deactivation_message ="You feel much calmer." + instability = -1 disability=NERVOUS - New() - block=NERVOUSBLOCK +/datum/dna/gene/disability/nervousness/New() + block=NERVOUSBLOCK /datum/dna/gene/disability/blindness name="Blindness" activation_message="You can't seem to see anything." deactivation_message ="You can see now, in case you didn't notice..." + instability = -5 sdisability=BLIND - New() - block=BLINDBLOCK +/datum/dna/gene/disability/blindness/New() + block=BLINDBLOCK /datum/dna/gene/disability/deaf name="Deafness" activation_message="It's kinda quiet." deactivation_message ="You can hear again!" + instability = -4 sdisability=DEAF - New() - block=DEAFBLOCK +/datum/dna/gene/disability/deaf/New() + block=DEAFBLOCK - activate(var/mob/M, var/connected, var/flags) - ..(M,connected,flags) - M.ear_deaf = 1 +/datum/dna/gene/disability/deaf/activate(var/mob/M, var/connected, var/flags) + ..(M,connected,flags) + M.ear_deaf = 1 /datum/dna/gene/disability/nearsighted name="Nearsightedness" activation_message="Your eyes feel weird..." deactivation_message ="You can see clearly now" + instability = -3 disability=NEARSIGHTED - New() - block=GLASSESBLOCK +/datum/dna/gene/disability/nearsighted/New() + block=GLASSESBLOCK /datum/dna/gene/disability/lisp @@ -142,14 +151,15 @@ desc = "I wonder wath thith doeth." activation_message = "Thomething doethn't feel right." deactivation_message = "You now feel able to pronounce consonants." + instability = -1 mutation = LISP - New() - ..() - block=LISPBLOCK +/datum/dna/gene/disability/lisp/New() + ..() + block=LISPBLOCK - OnSay(var/mob/M, var/message) - return replacetext(message,"s","th") +/datum/dna/gene/disability/lisp/OnSay(var/mob/M, var/message) + return replacetext(message,"s","th") /datum/dna/gene/disability/comic name = "Comic" @@ -158,5 +168,5 @@ deactivation_message = "Well thank god that's over with." mutation=COMIC - New() - block = COMICBLOCK +/datum/dna/gene/disability/comic/New() + block = COMICBLOCK diff --git a/code/game/dna/genes/gene.dm b/code/game/dna/genes/gene.dm index a56be88082e..ad2b1f43c54 100644 --- a/code/game/dna/genes/gene.dm +++ b/code/game/dna/genes/gene.dm @@ -23,7 +23,10 @@ // Any of a number of GENE_ flags. var/flags=0 -/** + // Chance of the gene to cause adverse effects when active + var/instability=0 + +/* * Is the gene active in this mob's DNA? */ /datum/dna/gene/proc/is_active(var/mob/M) @@ -113,10 +116,10 @@ M.mutations.Add(mutation) if(activation_messages.len) var/msg = pick(activation_messages) - to_chat(M, "\blue [msg]") + to_chat(M, "[msg]") /datum/dna/gene/basic/deactivate(var/mob/M) M.mutations.Remove(mutation) if(deactivation_messages.len) var/msg = pick(deactivation_messages) - to_chat(M, "\red [msg]") + to_chat(M, "[msg]") diff --git a/code/game/dna/genes/goon_disabilities.dm b/code/game/dna/genes/goon_disabilities.dm index 1cb70e2c236..5fa8d6bb10c 100644 --- a/code/game/dna/genes/goon_disabilities.dm +++ b/code/game/dna/genes/goon_disabilities.dm @@ -12,14 +12,15 @@ desc = "Completely shuts down the speech center of the subject's brain." activation_message = "You feel unable to express yourself at all." deactivation_message = "You feel able to speak freely again." + instability = -3 sdisability = MUTE - New() - ..() - block=MUTEBLOCK +/datum/dna/gene/disability/mute/New() + ..() + block=MUTEBLOCK - OnSay(var/mob/M, var/message) - return "" +/datum/dna/gene/disability/mute/OnSay(var/mob/M, var/message) + return "" //////////////////////////////////////// // Harmful to others as well as self @@ -30,24 +31,25 @@ desc = "The subject suffers from constant radiation sickness and causes the same on nearby organics." activation_message = "You feel a strange sickness permeate your whole body." deactivation_message = "You no longer feel awful and sick all over." + instability = -6 mutation = RADIOACTIVE - New() - ..() - block=RADBLOCK +/datum/dna/gene/disability/radioactive/New() + ..() + block=RADBLOCK - OnMobLife(var/mob/living/owner) - var/radiation_amount = abs(min(owner.radiation - 20,0)) - owner.apply_effect(radiation_amount, IRRADIATE) - for(var/mob/living/L in range(1, owner)) - if(L == owner) - continue - to_chat(L, "You are enveloped by a soft green glow emanating from [owner].") - L.apply_effect(5, IRRADIATE) - return +/datum/dna/gene/disability/radioactive/OnMobLife(var/mob/living/owner) + var/radiation_amount = abs(min(owner.radiation - 20,0)) + owner.apply_effect(radiation_amount, IRRADIATE) + for(var/mob/living/L in range(1, owner)) + if(L == owner) + continue + to_chat(L, "You are enveloped by a soft green glow emanating from [owner].") + L.apply_effect(5, IRRADIATE) + return - OnDrawUnderlays(var/mob/M,var/g,var/fat) - return "rads[fat]_s" +/datum/dna/gene/disability/radioactive/OnDrawUnderlays(var/mob/M,var/g,var/fat) + return "rads[fat]_s" //////////////////////////////////////// // Other disabilities @@ -59,12 +61,12 @@ desc = "Greatly slows the subject's metabolism, enabling greater buildup of lipid tissue." activation_message = "You feel blubbery and lethargic!" deactivation_message = "You feel fit!" - + instability = -2 mutation = OBESITY - New() - ..() - block=FATBLOCK +/datum/dna/gene/disability/fat/New() + ..() + block=FATBLOCK // WAS: /datum/bioEffect/chav /datum/dna/gene/disability/speech/chav @@ -72,38 +74,39 @@ desc = "Forces the language center of the subject's brain to construct sentences in a more rudimentary manner." activation_message = "Ye feel like a reet prat like, innit?" deactivation_message = "You no longer feel like being rude and sassy." + instability = -1 mutation = CHAV - New() - ..() - block=CHAVBLOCK +/datum/dna/gene/disability/speech/chav/New() + ..() + block=CHAVBLOCK - OnSay(var/mob/M, var/message) - // THIS ENTIRE THING BEGS FOR REGEX - message = replacetext(message,"dick","prat") - message = replacetext(message,"comdom","knob'ead") - message = replacetext(message,"looking at","gawpin' at") - message = replacetext(message,"great","bangin'") - message = replacetext(message,"man","mate") - message = replacetext(message,"friend",pick("mate","bruv","bledrin")) - message = replacetext(message,"what","wot") - message = replacetext(message,"drink","wet") - message = replacetext(message,"get","giz") - message = replacetext(message,"what","wot") - message = replacetext(message,"no thanks","wuddent fukken do one") - message = replacetext(message,"i don't know","wot mate") - message = replacetext(message,"no","naw") - message = replacetext(message,"robust","chin") - message = replacetext(message," hi ","how what how") - message = replacetext(message,"hello","sup bruv") - message = replacetext(message,"kill","bang") - message = replacetext(message,"murder","bang") - message = replacetext(message,"windows","windies") - message = replacetext(message,"window","windy") - message = replacetext(message,"break","do") - message = replacetext(message,"your","yer") - message = replacetext(message,"security","coppers") - return message +/datum/dna/gene/disability/speech/chav/OnSay(var/mob/M, var/message) + // THIS ENTIRE THING BEGS FOR REGEX + message = replacetext(message,"dick","prat") + message = replacetext(message,"comdom","knob'ead") + message = replacetext(message,"looking at","gawpin' at") + message = replacetext(message,"great","bangin'") + message = replacetext(message,"man","mate") + message = replacetext(message,"friend",pick("mate","bruv","bledrin")) + message = replacetext(message,"what","wot") + message = replacetext(message,"drink","wet") + message = replacetext(message,"get","giz") + message = replacetext(message,"what","wot") + message = replacetext(message,"no thanks","wuddent fukken do one") + message = replacetext(message,"i don't know","wot mate") + message = replacetext(message,"no","naw") + message = replacetext(message,"robust","chin") + message = replacetext(message," hi ","how what how") + message = replacetext(message,"hello","sup bruv") + message = replacetext(message,"kill","bang") + message = replacetext(message,"murder","bang") + message = replacetext(message,"windows","windies") + message = replacetext(message,"window","windy") + message = replacetext(message,"break","do") + message = replacetext(message,"your","yer") + message = replacetext(message,"security","coppers") + return message // WAS: /datum/bioEffect/swedish /datum/dna/gene/disability/speech/swedish @@ -111,18 +114,19 @@ desc = "Forces the language center of the subject's brain to construct sentences in a vaguely norse manner." activation_message = "You feel Swedish, however that works." deactivation_message = "The feeling of Swedishness passes." + instability = -1 mutation = SWEDISH - New() - ..() - block=SWEDEBLOCK +/datum/dna/gene/disability/speech/swedish/New() + ..() + block=SWEDEBLOCK - OnSay(var/mob/M, var/message) - // svedish - message = replacetext(message,"w","v") - if(prob(30)) - message += " Bork[pick("",", bork",", bork, bork")]!" - return message +/datum/dna/gene/disability/speech/swedish/OnSay(var/mob/M, var/message) + // svedish + message = replacetext(message,"w","v") + if(prob(30)) + message += " Bork[pick("",", bork",", bork, bork")]!" + return message // WAS: /datum/bioEffect/unintelligable /datum/dna/gene/disability/unintelligable @@ -130,34 +134,35 @@ desc = "Heavily corrupts the part of the brain responsible for forming spoken sentences." activation_message = "You can't seem to form any coherent thoughts!" deactivation_message = "Your mind feels more clear." + instability = -1 mutation = SCRAMBLED - New() - ..() - block=SCRAMBLEBLOCK +/datum/dna/gene/disability/unintelligable/New() + ..() + block=SCRAMBLEBLOCK - OnSay(var/mob/M, var/message) - var/prefix=copytext(message,1,2) - if(prefix == ";") - message = copytext(message,2) - else if(prefix in list(":","#")) - prefix += copytext(message,2,3) - message = copytext(message,3) - else - prefix="" +/datum/dna/gene/disability/unintelligable/OnSay(var/mob/M, var/message) + var/prefix=copytext(message,1,2) + if(prefix == ";") + message = copytext(message,2) + else if(prefix in list(":","#")) + prefix += copytext(message,2,3) + message = copytext(message,3) + else + prefix="" - var/list/words = splittext(message," ") - var/list/rearranged = list() - for(var/i=1;i<=words.len;i++) - var/cword = pick(words) - words.Remove(cword) - var/suffix = copytext(cword,length(cword)-1,length(cword)) - while(length(cword)>0 && suffix in list(".",",",";","!",":","?")) - cword = copytext(cword,1 ,length(cword)-1) - suffix = copytext(cword,length(cword)-1,length(cword) ) - if(length(cword)) - rearranged += cword - return "[prefix][uppertext(jointext(rearranged," "))]!!" + var/list/words = splittext(message," ") + var/list/rearranged = list() + for(var/i=1;i<=words.len;i++) + var/cword = pick(words) + words.Remove(cword) + var/suffix = copytext(cword,length(cword)-1,length(cword)) + while(length(cword)>0 && suffix in list(".",",",";","!",":","?")) + cword = copytext(cword,1 ,length(cword)-1) + suffix = copytext(cword,length(cword)-1,length(cword) ) + if(length(cword)) + rearranged += cword + return "[prefix][uppertext(jointext(rearranged," "))]!!" // WAS: /datum/bioEffect/toxic_farts /datum/dna/gene/disability/toxic_farts @@ -165,12 +170,11 @@ desc = "Causes the subject's digestion to create a significant amount of noxious gas." activation_message = "Your stomach grumbles unpleasantly." deactivation_message = "Your stomach stops acting up. Phew!" - mutation = TOXIC_FARTS - New() - ..() - block=TOXICFARTBLOCK +/datum/dna/gene/disability/toxic_farts/New() + ..() + block=TOXICFARTBLOCK ////////////////// // USELESS SHIT // @@ -183,12 +187,11 @@ desc = "Enhances the subject's ability to build and retain heavy muscles." activation_message = "You feel buff!" deactivation_message = "You feel wimpy and weak." - mutation = STRONG - New() - ..() - block=STRONGBLOCK +/datum/dna/gene/disability/strong/New() + ..() + block=STRONGBLOCK // WAS: /datum/bioEffect/horns /datum/dna/gene/disability/horns @@ -198,12 +201,12 @@ deactivation_message = "Your horns crumble away into nothing." mutation = HORNS - New() - ..() - block=HORNSBLOCK +/datum/dna/gene/disability/horns/New() + ..() + block=HORNSBLOCK - OnDrawUnderlays(var/mob/M,var/g,var/fat) - return "horns_s" +/datum/dna/gene/disability/horns/OnDrawUnderlays(var/mob/M,var/g,var/fat) + return "horns_s" //////////////////////////////////////////////////////////////////////// // WAS: /datum/bioEffect/immolate @@ -216,9 +219,9 @@ spelltype=/obj/effect/proc_holder/spell/targeted/immolate - New() - ..() - block = IMMOLATEBLOCK +/datum/dna/gene/basic/grant_spell/immolate/New() + ..() + block = IMMOLATEBLOCK /obj/effect/proc_holder/spell/targeted/immolate name = "Incendiary Mitochondria" @@ -241,6 +244,6 @@ /obj/effect/proc_holder/spell/targeted/immolate/cast(list/targets) var/mob/living/carbon/L = usr L.adjust_fire_stacks(0.5) - L.visible_message("\red [L.name] suddenly bursts into flames!") + L.visible_message("[L.name] suddenly bursts into flames!") L.IgniteMob() playsound(L.loc, 'sound/effects/bamf.ogg', 50, 0) diff --git a/code/game/dna/genes/goon_powers.dm b/code/game/dna/genes/goon_powers.dm index c50c04860cf..7cc0731e3bb 100644 --- a/code/game/dna/genes/goon_powers.dm +++ b/code/game/dna/genes/goon_powers.dm @@ -8,8 +8,8 @@ mutation=SOBER - New() - block=SOBERBLOCK +/datum/dna/gene/basic/sober/New() + block=SOBERBLOCK //WAS: /datum/bioEffect/psychic_resist /datum/dna/gene/basic/psychic_resist @@ -20,24 +20,26 @@ mutation=PSY_RESIST - New() - block=PSYRESISTBLOCK +/datum/dna/gene/basic/psychic_resist/New() + block=PSYRESISTBLOCK ///////////////////////// // Stealth Enhancers ///////////////////////// /datum/dna/gene/basic/stealth - can_activate(var/mob/M, var/flags) - // Can only activate one of these at a time. - if(is_type_in_list(/datum/dna/gene/basic/stealth,M.active_genes)) - testing("Cannot activate [type]: /datum/dna/gene/basic/stealth in M.active_genes.") - return 0 - return ..(M,flags) + instability = 4 - deactivate(var/mob/M) - ..(M) - M.alpha=255 +/datum/dna/gene/basic/stealth/can_activate(var/mob/M, var/flags) + // Can only activate one of these at a time. + if(is_type_in_list(/datum/dna/gene/basic/stealth,M.active_genes)) + testing("Cannot activate [type]: /datum/dna/gene/basic/stealth in M.active_genes.") + return 0 + return ..(M,flags) + +/datum/dna/gene/basic/stealth/deactivate(var/mob/M) + ..(M) + M.alpha=255 // WAS: /datum/bioEffect/darkcloak /datum/dna/gene/basic/stealth/darkcloak @@ -48,23 +50,23 @@ activation_prob=10 mutation = CLOAK - New() - block=SHADOWBLOCK +/datum/dna/gene/basic/stealth/darkcloak/New() + block=SHADOWBLOCK - OnMobLife(var/mob/M) - var/turf/simulated/T = get_turf(M) - if(!istype(T)) - return - var/atom/movable/lighting_overlay/L = locate(/atom/movable/lighting_overlay) in T - var/light_available - if(L) - light_available = L.get_clamped_lum()*10 - else - light_available = 5 - if(light_available <= 2) - M.alpha = round(M.alpha * 0.8) - else - M.alpha = 255 +/datum/dna/gene/basic/stealth/darkcloak/OnMobLife(var/mob/M) + var/turf/simulated/T = get_turf(M) + if(!istype(T)) + return + var/atom/movable/lighting_overlay/L = locate(/atom/movable/lighting_overlay) in T + var/light_available + if(L) + light_available = L.get_clamped_lum()*10 + else + light_available = 5 + if(light_available <= 2) + M.alpha = round(M.alpha * 0.8) + else + M.alpha = 255 //WAS: /datum/bioEffect/chameleon /datum/dna/gene/basic/stealth/chameleon @@ -75,43 +77,43 @@ activation_prob=10 mutation = CHAMELEON - New() +/datum/dna/gene/basic/stealth/chameleon/New() block=CHAMELEONBLOCK - OnMobLife(var/mob/M) - if((world.time - M.last_movement) >= 30 && !M.stat && M.canmove && !M.restrained()) - M.alpha -= 25 - else - M.alpha = round(255 * 0.80) +/datum/dna/gene/basic/stealth/chameleon/OnMobLife(var/mob/M) + if((world.time - M.last_movement) >= 30 && !M.stat && M.canmove && !M.restrained()) + M.alpha -= 25 + else + M.alpha = round(255 * 0.80) ///////////////////////////////////////////////////////////////////////////////////////// /datum/dna/gene/basic/grant_spell var/obj/effect/proc_holder/spell/spelltype - activate(var/mob/M, var/connected, var/flags) - M.AddSpell(new spelltype(M)) - ..() - return 1 +/datum/dna/gene/basic/grant_spell/activate(var/mob/M, var/connected, var/flags) + M.AddSpell(new spelltype(M)) + ..() + return 1 - deactivate(var/mob/M, var/connected, var/flags) - for(var/obj/effect/proc_holder/spell/S in M.spell_list) - if(istype(S,spelltype)) - M.spell_list.Remove(S) - ..() - return 1 +/datum/dna/gene/basic/grant_spell/deactivate(var/mob/M, var/connected, var/flags) + for(var/obj/effect/proc_holder/spell/S in M.spell_list) + if(istype(S,spelltype)) + M.spell_list.Remove(S) + ..() + return 1 /datum/dna/gene/basic/grant_verb var/verbtype - activate(var/mob/M, var/connected, var/flags) - ..() - M.verbs += verbtype - return 1 +/datum/dna/gene/basic/grant_verb/activate(var/mob/M, var/connected, var/flags) + ..() + M.verbs += verbtype + return 1 - deactivate(var/mob/M, var/connected, var/flags) - ..() - M.verbs -= verbtype +/datum/dna/gene/basic/grant_verb/deactivate(var/mob/M, var/connected, var/flags) + ..() + M.verbs -= verbtype // WAS: /datum/bioEffect/cryokinesis /datum/dna/gene/basic/grant_spell/cryo @@ -119,13 +121,14 @@ desc = "Allows the subject to lower the body temperature of others." activation_messages = list("You notice a strange cold tingle in your fingertips.") deactivation_messages = list("Your fingers feel warmer.") + instability = 4 mutation = CRYO spelltype = /obj/effect/proc_holder/spell/targeted/cryokinesis - New() - ..() - block = CRYOBLOCK +/datum/dna/gene/basic/grant_spell/cryo/New() + ..() + block = CRYOBLOCK /obj/effect/proc_holder/spell/targeted/cryokinesis name = "Cryokinesis" @@ -153,11 +156,11 @@ var/mob/living/carbon/C = targets[1] if(!iscarbon(C)) - to_chat(usr, "\red This will only work on normal organic beings.") + to_chat(usr, "This will only work on normal organic beings.") return if (RESIST_COLD in C.mutations) - C.visible_message("\red A cloud of fine ice crystals engulfs [C.name], but disappears almost instantly!") + C.visible_message("A cloud of fine ice crystals engulfs [C.name], but disappears almost instantly!") return var/handle_suit = 0 if(ishuman(C)) @@ -166,12 +169,12 @@ if(istype(H.wear_suit, /obj/item/clothing/suit/space)) handle_suit = 1 if(H.internal) - H.visible_message("\red [usr] sprays a cloud of fine ice crystals, engulfing [H]!", + H.visible_message("[usr] sprays a cloud of fine ice crystals, engulfing [H]!", "[usr] sprays a cloud of fine ice crystals over your [H.head]'s visor.") log_admin("[key_name(usr)] has used cryokinesis on [key_name(C)] while wearing internals and a suit") msg_admin_attack("[key_name_admin(usr)] has cast cryokinesis on [key_name_admin(C)]") else - H.visible_message("\red [usr] sprays a cloud of fine ice crystals engulfing, [H]!", + H.visible_message("[usr] sprays a cloud of fine ice crystals engulfing, [H]!", "[usr] sprays a cloud of fine ice crystals cover your [H.head]'s visor and make it into your air vents!.") log_admin("[key_name(usr)] has used cryokinesis on [key_name(C)]") msg_admin_attack("[key_name_admin(usr)] has cast cryokinesis on [key_name_admin(C)]") @@ -200,12 +203,12 @@ desc = "" //layer = 15 - New(var/atom/location, var/icon/I, var/duration = 20, var/oname = "something") - src.name = oname - loc=location - src.icon = I - spawn(duration) - qdel(src) +/obj/effect/self_deleting/New(var/atom/location, var/icon/I, var/duration = 20, var/oname = "something") + src.name = oname + loc=location + src.icon = I + spawn(duration) + qdel(src) /////////////////////////////////////////////////////////////////////////////////////////// @@ -215,13 +218,14 @@ desc = "Allows the subject to eat just about anything without harm." activation_messages = list("You feel hungry.") deactivation_messages = list("You don't feel quite so hungry anymore.") + instability = 2 mutation = EATER spelltype=/obj/effect/proc_holder/spell/targeted/eat - New() - ..() - block = EATBLOCK +/datum/dna/gene/basic/grant_spell/mattereater/New() + ..() + block = EATBLOCK /obj/effect/proc_holder/spell/targeted/eat name = "Eat" @@ -356,13 +360,14 @@ //cooldown = 30 activation_messages = list("Your leg muscles feel taut and strong.") deactivation_messages = list("Your leg muscles shrink back to normal.") + instability = 2 mutation = JUMPY spelltype =/obj/effect/proc_holder/spell/targeted/leap - New() - ..() - block = JUMPBLOCK +/datum/dna/gene/basic/grant_spell/jumpy/New() + ..() + block = JUMPBLOCK /obj/effect/proc_holder/spell/targeted/leap name = "Jump" @@ -383,12 +388,10 @@ /obj/effect/proc_holder/spell/targeted/leap/cast(list/targets) var/failure = 0 if (istype(usr.loc,/mob/) || usr.lying || usr.stunned || usr.buckled || usr.stat) - to_chat(usr, "\red You can't jump right now!") + to_chat(usr, "You can't jump right now!") return if (istype(usr.loc,/turf/)) - - if(usr.restrained())//Why being pulled while cuffed prevents you from moving for(var/mob/M in range(usr, 1)) if(M.pulling == usr) @@ -400,12 +403,12 @@ if(usr.pinned.len) failure = 1 - usr.visible_message("\red [usr.name] takes a huge leap!") + usr.visible_message("[usr.name] takes a huge leap!") playsound(usr.loc, 'sound/weapons/thudswoosh.ogg', 50, 1) if(failure) usr.Weaken(5) usr.Stun(5) - usr.visible_message(" \the [usr] attempts to leap away but is slammed back down to the ground!", + usr.visible_message("[usr] attempts to leap away but is slammed back down to the ground!", "You attempt to leap away but are suddenly slammed back down to the ground!", "You hear the flexing of powerful muscles and suddenly a crash as a body hits the floor.") return 0 @@ -422,7 +425,7 @@ usr.flying = prevFlying if (FAT in usr.mutations && prob(66)) - usr.visible_message("\red [usr.name] crashes due to their heavy weight!") + usr.visible_message("[usr.name] crashes due to their heavy weight!") //playsound(usr.loc, 'zhit.wav', 50, 1) usr.AdjustWeakened(10) usr.AdjustStunned(5) @@ -431,10 +434,10 @@ if (istype(usr.loc,/obj/)) var/obj/container = usr.loc - to_chat(usr, "\red You leap and slam your head against the inside of [container]! Ouch!") + to_chat(usr, "You leap and slam your head against the inside of [container]! Ouch!") usr.AdjustParalysis(3) usr.AdjustWeakened(5) - container.visible_message("\red [usr.loc] emits a loud thump and rattles a bit.") + container.visible_message("[usr.loc] emits a loud thump and rattles a bit.") playsound(usr.loc, 'sound/effects/bang.ogg', 50, 1) var/wiggle = 6 while(wiggle > 0) @@ -460,11 +463,12 @@ //cooldown = 1800 activation_messages = list("You don't feel entirely like yourself somehow.") deactivation_messages = list("You feel secure in your identity.") + instability = 3 mutation = POLYMORPH - New() - ..() - block = POLYMORPHBLOCK +/datum/dna/gene/basic/grant_spell/polymorph/New() + ..() + block = POLYMORPHBLOCK /obj/effect/proc_holder/spell/targeted/polymorph name = "Polymorph" @@ -483,13 +487,13 @@ /obj/effect/proc_holder/spell/targeted/polymorph/cast(list/targets) var/mob/living/M=targets[1] if(!ishuman(M)) - to_chat(usr, "\red You can only change your appearance to that of another human.") + to_chat(usr, "You can only change your appearance to that of another human.") return if(!ishuman(usr)) return - usr.visible_message("\red [usr]'s body shifts and contorts.") + usr.visible_message("[usr]'s body shifts and contorts.") spawn(10) if(M && usr) @@ -510,11 +514,12 @@ spelltype = /obj/effect/proc_holder/spell/targeted/empath activation_messages = list("You suddenly notice more about others than you did before.") deactivation_messages = list("You no longer feel able to sense intentions.") + instability = 1 mutation=EMPATH - New() - ..() - block = EMPATHBLOCK +/datum/dna/gene/basic/grant_spell/empath/New() + ..() + block = EMPATHBLOCK /obj/effect/proc_holder/spell/targeted/empath name = "Read Mind" @@ -544,21 +549,21 @@ for(var/mob/living/carbon/M in targets) if(!iscarbon(M)) - to_chat(usr, "\red You may only use this on other organic beings.") + to_chat(usr, "You may only use this on other organic beings.") return if (PSY_RESIST in M.mutations) - to_chat(usr, "\red You can't see into [M.name]'s mind at all!") + to_chat(usr, "You can't see into [M.name]'s mind at all!") return if (M.stat == 2) - to_chat(usr, "\red [M.name] is dead and cannot have their mind read.") + to_chat(usr, "[M.name] is dead and cannot have their mind read.") return if (M.health < 0) - to_chat(usr, "\red [M.name] is dying, and their thoughts are too scrambled to read.") + to_chat(usr, "[M.name] is dying, and their thoughts are too scrambled to read.") return - to_chat(usr, "\blue Mind Reading of [M.name]:") + to_chat(usr, "Mind Reading of [M.name]:") var/pain_condition = M.health // lower health means more pain var/list/randomthoughts = list("what to have for lunch","the future","the past","money", @@ -575,33 +580,33 @@ switch(pain_condition) if (81 to INFINITY) - to_chat(usr, "\blue Condition: [M.name] feels good.") + to_chat(usr, "Condition: [M.name] feels good.") if (61 to 80) - to_chat(usr, "\blue Condition: [M.name] is suffering mild pain.") + to_chat(usr, "Condition: [M.name] is suffering mild pain.") if (41 to 60) - to_chat(usr, "\blue Condition: [M.name] is suffering significant pain.") + to_chat(usr, "Condition: [M.name] is suffering significant pain.") if (21 to 40) - to_chat(usr, "\blue Condition: [M.name] is suffering severe pain.") + to_chat(usr, "Condition: [M.name] is suffering severe pain.") else - to_chat(usr, "\blue Condition: [M.name] is suffering excruciating pain.") + to_chat(usr, "Condition: [M.name] is suffering excruciating pain.") thoughts = "haunted by their own mortality" switch(M.a_intent) if (I_HELP) - to_chat(usr, "\blue Mood: You sense benevolent thoughts from [M.name].") + to_chat(usr, "Mood: You sense benevolent thoughts from [M.name].") if (I_DISARM) - to_chat(usr, "\blue Mood: You sense cautious thoughts from [M.name].") + to_chat(usr, "Mood: You sense cautious thoughts from [M.name].") if (I_GRAB) - to_chat(usr, "\blue Mood: You sense hostile thoughts from [M.name].") + to_chat(usr, "Mood: You sense hostile thoughts from [M.name].") if (I_HARM) - to_chat(usr, "\blue Mood: You sense cruel thoughts from [M.name].") + to_chat(usr, "Mood: You sense cruel thoughts from [M.name].") for(var/mob/living/L in view(7,M)) if (L == M) continue thoughts = "thinking about punching [L.name]" break else - to_chat(usr, "\blue Mood: You sense strange thoughts from [M.name].") + to_chat(usr, "Mood: You sense strange thoughts from [M.name].") if (istype(M,/mob/living/carbon/human)) var/numbers[0] @@ -610,13 +615,13 @@ numbers += H.mind.initial_account.account_number numbers += H.mind.initial_account.remote_access_pin if(numbers.len>0) - to_chat(usr, "\blue Numbers: You sense the number[numbers.len>1?"s":""] [english_list(numbers)] [numbers.len>1?"are":"is"] important to [M.name].") - to_chat(usr, "\blue Thoughts: [M.name] is currently [thoughts].") + to_chat(usr, "b>Numbers: You sense the number[numbers.len>1?"s":""] [english_list(numbers)] [numbers.len>1?"are":"is"] important to [M.name].") + to_chat(usr, "Thoughts: [M.name] is currently [thoughts].") if (EMPATH in M.mutations) - to_chat(M, "\red You sense [usr.name] reading your mind.") + to_chat(M, "You sense [usr.name] reading your mind.") else if (prob(5) || M.mind.assigned_role=="Chaplain") - to_chat(M, "\red You sense someone intruding upon your thoughts...") + to_chat(M, "You sense someone intruding upon your thoughts...") return //////////////////////////////////////////////////////////////////////// @@ -627,13 +632,13 @@ desc = "Vastly increases the gas capacity of the subject's digestive tract." activation_messages = list("You feel bloated and gassy.") deactivation_messages = list("You no longer feel gassy. What a relief!") - + instability = 2 mutation = SUPER_FART spelltype = /obj/effect/proc_holder/spell/aoe_turf/superfart - New() - ..() - block = SUPERFARTBLOCK +/datum/dna/gene/basic/grant_spell/superfart/New() + ..() + block = SUPERFARTBLOCK /obj/effect/proc_holder/spell/aoe_turf/superfart name = "Super Fart" diff --git a/code/game/dna/genes/powers.dm b/code/game/dna/genes/powers.dm index eb33cef7ccf..4e3d77efb66 100644 --- a/code/game/dna/genes/powers.dm +++ b/code/game/dna/genes/powers.dm @@ -6,151 +6,163 @@ name="No Breathing" activation_messages=list("You feel no need to breathe.") deactivation_messages=list("You feel the need to breathe, once more.") + instability = 2 mutation=NO_BREATH activation_prob=10 - New() - block=NOBREATHBLOCK +/datum/dna/gene/basic/nobreath/New() + block=NOBREATHBLOCK /datum/dna/gene/basic/regenerate name="Regenerate" activation_messages=list("Your wounds start healing.") deactivation_messages=list("Your regenerative powers feel like they've vanished.") + instability = 1 mutation=REGEN - New() - block=REGENERATEBLOCK +/datum/dna/gene/basic/regenerate/New() + block=REGENERATEBLOCK /datum/dna/gene/basic/increaserun name="Super Speed" activation_messages=list("You feel swift and unencumbered.") deactivation_messages=list("You feel slow.") + instability = 2 mutation=RUN - New() - block=INCREASERUNBLOCK +/datum/dna/gene/basic/increaserun/New() + block=INCREASERUNBLOCK /datum/dna/gene/basic/heat_resist name="Heat Resistance" activation_messages=list("Your skin is icy to the touch.") deactivation_messages=list("Your skin no longer feels icy to the touch.") + instability = 2 mutation=RESIST_HEAT - New() - block=COLDBLOCK +/datum/dna/gene/basic/heat_resist/New() + block=COLDBLOCK - OnDrawUnderlays(var/mob/M,var/g,var/fat) - return "cold[fat]_s" +/datum/dna/gene/basic/heat_resist/OnDrawUnderlays(var/mob/M,var/g,var/fat) + return "cold[fat]_s" /datum/dna/gene/basic/cold_resist name="Cold Resistance" activation_messages=list("Your body is filled with warmth.") deactivation_messages=list("Your body is no longer filled with warmth.") + instability = 2 mutation=RESIST_COLD - New() - block=FIREBLOCK +/datum/dna/gene/basic/cold_resist/New() + block=FIREBLOCK - OnDrawUnderlays(var/mob/M,var/g,var/fat) - return "fire[fat]_s" +/datum/dna/gene/basic/cold_resist/OnDrawUnderlays(var/mob/M,var/g,var/fat) + return "fire[fat]_s" /datum/dna/gene/basic/noprints name="No Prints" activation_messages=list("Your fingers feel numb.") deactivation_messages=list("your fingers no longer feel numb.") + instability = 1 mutation=FINGERPRINTS - New() - block=NOPRINTSBLOCK +/datum/dna/gene/basic/noprints/New() + block=NOPRINTSBLOCK /datum/dna/gene/basic/noshock name="Shock Immunity" activation_messages=list("Your skin feels dry and unreactive.") deactivation_messages=list("Your skin no longer feels dry and unreactive.") + instability = 2 mutation=NO_SHOCK - New() - block=SHOCKIMMUNITYBLOCK +/datum/dna/gene/basic/noshock/New() + block=SHOCKIMMUNITYBLOCK /datum/dna/gene/basic/midget name="Midget" activation_messages=list("Everything around you seems bigger now...") deactivation_messages = list("Everything around you seems to shrink...") + instability = 1 mutation=DWARF - New() - block=SMALLSIZEBLOCK +/datum/dna/gene/basic/midget/New() + block=SMALLSIZEBLOCK - activate(var/mob/M, var/connected, var/flags) - ..(M,connected,flags) - M.pass_flags |= PASSTABLE - M.resize = 0.8 +/datum/dna/gene/basic/midget/activate(var/mob/M, var/connected, var/flags) + ..(M,connected,flags) + M.pass_flags |= PASSTABLE + M.resize = 0.8 - deactivate(var/mob/M, var/connected, var/flags) - ..() - M.pass_flags &= ~PASSTABLE - M.resize = 1.25 +/datum/dna/gene/basic/midget/deactivate(var/mob/M, var/connected, var/flags) + ..() + M.pass_flags &= ~PASSTABLE + M.resize = 1.25 // OLD HULK BEHAVIOR /datum/dna/gene/basic/hulk name="Hulk" activation_messages=list("Your muscles hurt.") deactivation_messages=list("Your muscles shrink.") + instability = 8 mutation=HULK activation_prob=5 - New() - block=HULKBLOCK +/datum/dna/gene/basic/hulk/New() + block=HULKBLOCK - activate(var/mob/M, var/connected, var/flags) - ..() - var/status = CANSTUN | CANWEAKEN | CANPARALYSE | CANPUSH - M.status_flags &= ~status +/datum/dna/gene/basic/hulk/activate(var/mob/M, var/connected, var/flags) + ..() + var/status = CANSTUN | CANWEAKEN | CANPARALYSE | CANPUSH + M.status_flags &= ~status - deactivate(var/mob/M, var/connected, var/flags) - ..() - M.status_flags |= CANSTUN | CANWEAKEN | CANPARALYSE | CANPUSH +/datum/dna/gene/basic/hulk/deactivate(var/mob/M, var/connected, var/flags) + ..() + M.status_flags |= CANSTUN | CANWEAKEN | CANPARALYSE | CANPUSH - OnDrawUnderlays(var/mob/M,var/g,var/fat) - if(HULK in M.mutations) - if(fat) - return "hulk_[fat]_s" - else - return "hulk_[g]_s" - return 0 +/datum/dna/gene/basic/hulk/OnDrawUnderlays(var/mob/M,var/g,var/fat) + if(HULK in M.mutations) + if(fat) + return "hulk_[fat]_s" + else + return "hulk_[g]_s" + return 0 - OnMobLife(var/mob/living/carbon/human/M) - if(!istype(M)) return - if ((HULK in M.mutations) && M.health <= 0) - M.mutations.Remove(HULK) - M.dna.SetSEState(HULKBLOCK,0) - genemutcheck(M, HULKBLOCK,null,MUTCHK_FORCED) - M.update_mutations() //update our mutation overlays - M.update_body() - M.status_flags |= CANSTUN | CANWEAKEN | CANPARALYSE | CANPUSH //temporary fix until the problem can be solved. - to_chat(M, "You suddenly feel very weak.") +/datum/dna/gene/basic/hulk/OnMobLife(var/mob/living/carbon/human/M) + if(!istype(M)) + return + if ((HULK in M.mutations) && M.health <= 0) + M.mutations.Remove(HULK) + M.dna.SetSEState(HULKBLOCK,0) + genemutcheck(M, HULKBLOCK,null,MUTCHK_FORCED) + M.update_mutations() //update our mutation overlays + M.update_body() + M.status_flags |= CANSTUN | CANWEAKEN | CANPARALYSE | CANPUSH //temporary fix until the problem can be solved. + to_chat(M, "You suddenly feel very weak.") /datum/dna/gene/basic/xray name="X-Ray Vision" activation_messages=list("The walls suddenly disappear.") deactivation_messages=list("the walls around you re-appear.") + instability = 8 mutation=XRAY activation_prob=10 - New() - block=XRAYBLOCK +/datum/dna/gene/basic/xray/New() + block=XRAYBLOCK /datum/dna/gene/basic/tk name="Telekenesis" activation_messages = list("You feel smarter.") deactivation_messages = list("You feel dumber.") + instability = 8 mutation=TK activation_prob=10 - New() - block=TELEBLOCK +/datum/dna/gene/basic/tk/New() + block=TELEBLOCK - OnDrawUnderlays(var/mob/M,var/g,var/fat) - return "telekinesishead[fat]_s" \ No newline at end of file +/datum/dna/gene/basic/tk/OnDrawUnderlays(var/mob/M,var/g,var/fat) + return "telekinesishead[fat]_s" diff --git a/code/game/dna/genes/vg_disabilities.dm b/code/game/dna/genes/vg_disabilities.dm index 3514a658c18..e3c6b9883c6 100644 --- a/code/game/dna/genes/vg_disabilities.dm +++ b/code/game/dna/genes/vg_disabilities.dm @@ -4,33 +4,36 @@ desc = "Forces the speaking centre of the subjects brain to yell every sentence." activation_message = "YOU FEEL LIKE YELLING!" deactivation_message = "You feel like being quiet.." + instability = -1 mutation = LOUD - New() - ..() - block=LOUDBLOCK +/datum/dna/gene/disability/speech/loud/New() + ..() + block=LOUDBLOCK - OnSay(var/mob/M, var/message) - message = replacetext(message,".","!") - message = replacetext(message,"?","?!") - message = replacetext(message,"!","!!") - return uppertext(message) +/datum/dna/gene/disability/speech/loud/OnSay(var/mob/M, var/message) + message = replacetext(message,".","!") + message = replacetext(message,"?","?!") + message = replacetext(message,"!","!!") + return uppertext(message) /datum/dna/gene/disability/dizzy name = "Dizzy" desc = "Causes the cerebellum to shut down in some places." activation_message = "You feel very dizzy..." deactivation_message = "You regain your balance." + instability = -2 mutation = DIZZY - New() - ..() - block=DIZZYBLOCK +/datum/dna/gene/disability/dizzy/New() + ..() + block=DIZZYBLOCK - OnMobLife(var/mob/living/carbon/human/M) - if(!istype(M)) return - if(DIZZY in M.mutations) - M.Dizzy(300) +/datum/dna/gene/disability/dizzy/OnMobLife(var/mob/living/carbon/human/M) + if(!istype(M)) + return + if(DIZZY in M.mutations) + M.Dizzy(300) diff --git a/code/game/dna/genes/vg_powers.dm b/code/game/dna/genes/vg_powers.dm index 08784b71a61..fd2061e66fb 100644 --- a/code/game/dna/genes/vg_powers.dm +++ b/code/game/dna/genes/vg_powers.dm @@ -3,17 +3,15 @@ /datum/dna/gene/basic/grant_spell/morph name = "Morphism" desc = "Enables the subject to reconfigure their appearance to that of any human." - spelltype =/obj/effect/proc_holder/spell/targeted/morph activation_messages=list("Your body feels if can alter its appearance.") deactivation_messages = list("Your body doesn't feel capable of altering its appearance.") - - + instability = 1 mutation=MORPH - New() - ..() - block = MORPHBLOCK +/datum/dna/gene/basic/grant_spell/morph/New() + ..() + block = MORPHBLOCK /obj/effect/proc_holder/spell/targeted/morph name = "Morph" @@ -34,7 +32,7 @@ if(!ishuman(usr)) return if (istype(usr.loc,/mob/)) - to_chat(usr, "\red You can't change your appearance right now!") + to_chat(usr, "You can't change your appearance right now!") return var/mob/living/carbon/human/M=usr var/obj/item/organ/external/head/head_organ = M.get_organ("head") @@ -146,19 +144,20 @@ M.regenerate_icons() M.update_dna() - M.visible_message("\blue \The [src] morphs and changes [M.get_visible_gender() == MALE ? "his" : M.get_visible_gender() == FEMALE ? "her" : "their"] appearance!", "\blue You change your appearance!", "\red Oh, god! What the hell was that? It sounded like flesh getting squished and bone ground into a different shape!") + M.visible_message("[src] morphs and changes [M.get_visible_gender() == MALE ? "his" : M.get_visible_gender() == FEMALE ? "her" : "their"] appearance!", "You change your appearance!", "Oh, god! What the hell was that? It sounded like flesh getting squished and bone ground into a different shape!") /datum/dna/gene/basic/grant_spell/remotetalk name="Telepathy" activation_messages=list("You feel you can project your thoughts.") deactivation_messages=list("You no longer feel you can project your thoughts.") + instability = 1 mutation=REMOTE_TALK spelltype =/obj/effect/proc_holder/spell/targeted/remotetalk - New() - ..() - block=REMOTETALKBLOCK +/datum/dna/gene/basic/grant_spell/remotetalk/New() + ..() + block=REMOTETALKBLOCK /obj/effect/proc_holder/spell/targeted/remotetalk name = "Project Mind" @@ -206,10 +205,10 @@ for(var/mob/living/target in targets) log_say("Project Mind: [key_name(usr)]->[key_name(target)]: [say]") if(REMOTE_TALK in target.mutations) - target.show_message("\blue You hear [usr.real_name]'s voice: [say]") + target.show_message("You hear [usr.real_name]'s voice: [say]") else - target.show_message("\blue You hear a voice that seems to echo around the room: [say]") - usr.show_message("\blue You project your mind into [target.real_name]: [say]") + target.show_message("You hear a voice that seems to echo around the room: [say]") + usr.show_message("You project your mind into [target.real_name]: [say]") for(var/mob/dead/observer/G in player_list) G.show_message("Telepathic message from [usr] ([ghost_follow_link(usr, ghost=G)]) to [target] ([ghost_follow_link(target, ghost=G)]): [say]") @@ -217,12 +216,13 @@ name="Remote Viewing" activation_messages=list("Your mind can see things from afar.") deactivation_messages=list("Your mind can no longer can see things from afar.") + instability = 1 mutation=REMOTE_VIEW spelltype =/obj/effect/proc_holder/spell/targeted/remoteview - New() - block=REMOTEVIEWBLOCK +/datum/dna/gene/basic/grant_spell/remoteview/New() + block=REMOTEVIEWBLOCK /obj/effect/proc_holder/spell/targeted/remoteview @@ -262,7 +262,7 @@ var/mob/target if(istype(user.l_hand, /obj/item/tk_grab) || istype(user.r_hand, /obj/item/tk_grab/)) - to_chat(user, "\red Your mind is too busy with that telekinetic grab.") + to_chat(user, "Your mind is too busy with that telekinetic grab.") user.remoteview_target = null user.reset_view(0) return @@ -285,5 +285,3 @@ else user.remoteview_target = null user.reset_view(0) - - diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index a41f787a49c..d1c9b92c917 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -170,15 +170,16 @@ adjustCloneLoss(0.1) /mob/living/carbon/human/handle_mutations_and_radiation() + var/gene_instability = DEFAULT_GENE_INSTABILITY for(var/datum/dna/gene/gene in dna_genes) if(!gene.block) continue if(gene.is_active(src)) - /* if (prob(10) && prob(gene.instability)) - adjustCloneLoss(1) */ + gene_instability += gene.instability speech_problem_flag = 1 gene.OnMobLife(src) - + if(prob(10) && prob(max(gene_instability, 0))) + adjustCloneLoss(0.3 * gene_instability) if(!(species.flags & RADIMMUNE)) if (radiation) From 4bfd6ce95adc04f7b457042e5e1cef508e44135a Mon Sep 17 00:00:00 2001 From: TheDZD Date: Mon, 27 Jun 2016 13:12:50 -0400 Subject: [PATCH 2/5] Changes numbers --- code/__DEFINES/genetics.dm | 5 +++- code/game/dna/genes/disabilities.dm | 18 +++++++------- code/game/dna/genes/goon_disabilities.dm | 10 ++++---- code/game/dna/genes/goon_powers.dm | 14 +++++------ code/game/dna/genes/powers.dm | 22 ++++++++--------- code/game/dna/genes/vg_disabilities.dm | 3 +-- code/game/dna/genes/vg_powers.dm | 6 ++--- code/modules/mob/living/carbon/human/life.dm | 25 ++++++++++++++++---- 8 files changed, 59 insertions(+), 44 deletions(-) diff --git a/code/__DEFINES/genetics.dm b/code/__DEFINES/genetics.dm index 5e04d288764..1baa779b492 100644 --- a/code/__DEFINES/genetics.dm +++ b/code/__DEFINES/genetics.dm @@ -125,4 +125,7 @@ #define NUTRITION_LEVEL_STARVING 150 //Used for calculations for negative effects of having genetics powers -#define DEFAULT_GENE_INSTABILITY -4 +#define DEFAULT_GENE_STABILITY 100 +#define GENE_INSTABILITY_MINOR 5 +#define GENE_INSTABILITY_MODERATE 10 +#define GENE_INSTABILITY_MAJOR 15 diff --git a/code/game/dna/genes/disabilities.dm b/code/game/dna/genes/disabilities.dm index cb2ab29dae0..4505dc1c1db 100644 --- a/code/game/dna/genes/disabilities.dm +++ b/code/game/dna/genes/disabilities.dm @@ -55,7 +55,7 @@ name="Hallucinate" activation_message="Your mind says 'Hello'." deactivation_message ="Sanity returns. Or does it?" - instability = -2 + instability = -GENE_INSTABILITY_MODERATE mutation=HALLUCINATE /datum/dna/gene/disability/hallucinate/New() @@ -65,7 +65,7 @@ name="Epilepsy" activation_message="You get a headache." deactivation_message ="Your headache is gone, at last." - instability = -2 + instability = -GENE_INSTABILITY_MODERATE disability=EPILEPSY /datum/dna/gene/disability/epilepsy/New() @@ -75,7 +75,7 @@ name="Coughing" activation_message="You start coughing." deactivation_message ="Your throat stops aching." - instability = -1 + instability = -GENE_INSTABILITY_MINOR disability=COUGHING /datum/dna/gene/disability/cough/New() @@ -85,7 +85,7 @@ name="Clumsiness" activation_message="You feel lightheaded." deactivation_message ="You regain some control of your movements" - instability = -2 + instability = -GENE_INSTABILITY_MINOR mutation=CLUMSY /datum/dna/gene/disability/clumsy/New() @@ -95,7 +95,7 @@ name="Tourettes" activation_message="You twitch." deactivation_message ="Your mouth tastes like soap." - instability = -1 + instability = -GENE_INSTABILITY_MODERATE disability=TOURETTES /datum/dna/gene/disability/tourettes/New() @@ -105,7 +105,6 @@ name="Nervousness" activation_message="You feel nervous." deactivation_message ="You feel much calmer." - instability = -1 disability=NERVOUS /datum/dna/gene/disability/nervousness/New() @@ -115,7 +114,7 @@ name="Blindness" activation_message="You can't seem to see anything." deactivation_message ="You can see now, in case you didn't notice..." - instability = -5 + instability = -GENE_INSTABILITY_MAJOR sdisability=BLIND /datum/dna/gene/disability/blindness/New() @@ -125,7 +124,7 @@ name="Deafness" activation_message="It's kinda quiet." deactivation_message ="You can hear again!" - instability = -4 + instability = -GENE_INSTABILITY_MAJOR sdisability=DEAF /datum/dna/gene/disability/deaf/New() @@ -139,7 +138,7 @@ name="Nearsightedness" activation_message="Your eyes feel weird..." deactivation_message ="You can see clearly now" - instability = -3 + instability = -GENE_INSTABILITY_MODERATE disability=NEARSIGHTED /datum/dna/gene/disability/nearsighted/New() @@ -151,7 +150,6 @@ desc = "I wonder wath thith doeth." activation_message = "Thomething doethn't feel right." deactivation_message = "You now feel able to pronounce consonants." - instability = -1 mutation = LISP /datum/dna/gene/disability/lisp/New() diff --git a/code/game/dna/genes/goon_disabilities.dm b/code/game/dna/genes/goon_disabilities.dm index 5fa8d6bb10c..5ec04865591 100644 --- a/code/game/dna/genes/goon_disabilities.dm +++ b/code/game/dna/genes/goon_disabilities.dm @@ -12,7 +12,7 @@ desc = "Completely shuts down the speech center of the subject's brain." activation_message = "You feel unable to express yourself at all." deactivation_message = "You feel able to speak freely again." - instability = -3 + instability = -GENE_INSTABILITY_MODERATE sdisability = MUTE /datum/dna/gene/disability/mute/New() @@ -31,7 +31,7 @@ desc = "The subject suffers from constant radiation sickness and causes the same on nearby organics." activation_message = "You feel a strange sickness permeate your whole body." deactivation_message = "You no longer feel awful and sick all over." - instability = -6 + instability = -GENE_INSTABILITY_MAJOR mutation = RADIOACTIVE /datum/dna/gene/disability/radioactive/New() @@ -61,7 +61,7 @@ desc = "Greatly slows the subject's metabolism, enabling greater buildup of lipid tissue." activation_message = "You feel blubbery and lethargic!" deactivation_message = "You feel fit!" - instability = -2 + instability = -GENE_INSTABILITY_MINOR mutation = OBESITY /datum/dna/gene/disability/fat/New() @@ -74,7 +74,6 @@ desc = "Forces the language center of the subject's brain to construct sentences in a more rudimentary manner." activation_message = "Ye feel like a reet prat like, innit?" deactivation_message = "You no longer feel like being rude and sassy." - instability = -1 mutation = CHAV /datum/dna/gene/disability/speech/chav/New() @@ -114,7 +113,6 @@ desc = "Forces the language center of the subject's brain to construct sentences in a vaguely norse manner." activation_message = "You feel Swedish, however that works." deactivation_message = "The feeling of Swedishness passes." - instability = -1 mutation = SWEDISH /datum/dna/gene/disability/speech/swedish/New() @@ -134,7 +132,7 @@ desc = "Heavily corrupts the part of the brain responsible for forming spoken sentences." activation_message = "You can't seem to form any coherent thoughts!" deactivation_message = "Your mind feels more clear." - instability = -1 + instability = -GENE_INSTABILITY_MINOR mutation = SCRAMBLED /datum/dna/gene/disability/unintelligable/New() diff --git a/code/game/dna/genes/goon_powers.dm b/code/game/dna/genes/goon_powers.dm index 7cc0731e3bb..8df3af9a834 100644 --- a/code/game/dna/genes/goon_powers.dm +++ b/code/game/dna/genes/goon_powers.dm @@ -28,7 +28,7 @@ ///////////////////////// /datum/dna/gene/basic/stealth - instability = 4 + instability = GENE_INSTABILITY_MODERATE /datum/dna/gene/basic/stealth/can_activate(var/mob/M, var/flags) // Can only activate one of these at a time. @@ -121,7 +121,7 @@ desc = "Allows the subject to lower the body temperature of others." activation_messages = list("You notice a strange cold tingle in your fingertips.") deactivation_messages = list("Your fingers feel warmer.") - instability = 4 + instability = GENE_INSTABILITY_MODERATE mutation = CRYO spelltype = /obj/effect/proc_holder/spell/targeted/cryokinesis @@ -218,7 +218,7 @@ desc = "Allows the subject to eat just about anything without harm." activation_messages = list("You feel hungry.") deactivation_messages = list("You don't feel quite so hungry anymore.") - instability = 2 + instability = GENE_INSTABILITY_MINOR mutation = EATER spelltype=/obj/effect/proc_holder/spell/targeted/eat @@ -360,7 +360,7 @@ //cooldown = 30 activation_messages = list("Your leg muscles feel taut and strong.") deactivation_messages = list("Your leg muscles shrink back to normal.") - instability = 2 + instability = GENE_INSTABILITY_MINOR mutation = JUMPY spelltype =/obj/effect/proc_holder/spell/targeted/leap @@ -463,7 +463,7 @@ //cooldown = 1800 activation_messages = list("You don't feel entirely like yourself somehow.") deactivation_messages = list("You feel secure in your identity.") - instability = 3 + instability = GENE_INSTABILITY_MODERATE mutation = POLYMORPH /datum/dna/gene/basic/grant_spell/polymorph/New() @@ -514,7 +514,7 @@ spelltype = /obj/effect/proc_holder/spell/targeted/empath activation_messages = list("You suddenly notice more about others than you did before.") deactivation_messages = list("You no longer feel able to sense intentions.") - instability = 1 + instability = GENE_INSTABILITY_MINOR mutation=EMPATH /datum/dna/gene/basic/grant_spell/empath/New() @@ -632,7 +632,7 @@ desc = "Vastly increases the gas capacity of the subject's digestive tract." activation_messages = list("You feel bloated and gassy.") deactivation_messages = list("You no longer feel gassy. What a relief!") - instability = 2 + instability = GENE_INSTABILITY_MINOR mutation = SUPER_FART spelltype = /obj/effect/proc_holder/spell/aoe_turf/superfart diff --git a/code/game/dna/genes/powers.dm b/code/game/dna/genes/powers.dm index 4e3d77efb66..2f211f7a057 100644 --- a/code/game/dna/genes/powers.dm +++ b/code/game/dna/genes/powers.dm @@ -6,7 +6,7 @@ name="No Breathing" activation_messages=list("You feel no need to breathe.") deactivation_messages=list("You feel the need to breathe, once more.") - instability = 2 + instability = GENE_INSTABILITY_MODERATE mutation=NO_BREATH activation_prob=10 @@ -18,7 +18,7 @@ name="Regenerate" activation_messages=list("Your wounds start healing.") deactivation_messages=list("Your regenerative powers feel like they've vanished.") - instability = 1 + instability = GENE_INSTABILITY_MINOR mutation=REGEN /datum/dna/gene/basic/regenerate/New() @@ -28,7 +28,7 @@ name="Super Speed" activation_messages=list("You feel swift and unencumbered.") deactivation_messages=list("You feel slow.") - instability = 2 + instability = GENE_INSTABILITY_MINOR mutation=RUN /datum/dna/gene/basic/increaserun/New() @@ -39,7 +39,7 @@ name="Heat Resistance" activation_messages=list("Your skin is icy to the touch.") deactivation_messages=list("Your skin no longer feels icy to the touch.") - instability = 2 + instability = GENE_INSTABILITY_MODERATE mutation=RESIST_HEAT /datum/dna/gene/basic/heat_resist/New() @@ -52,7 +52,7 @@ name="Cold Resistance" activation_messages=list("Your body is filled with warmth.") deactivation_messages=list("Your body is no longer filled with warmth.") - instability = 2 + instability = GENE_INSTABILITY_MODERATE mutation=RESIST_COLD /datum/dna/gene/basic/cold_resist/New() @@ -65,7 +65,7 @@ name="No Prints" activation_messages=list("Your fingers feel numb.") deactivation_messages=list("your fingers no longer feel numb.") - instability = 1 + instability = GENE_INSTABILITY_MINOR mutation=FINGERPRINTS /datum/dna/gene/basic/noprints/New() @@ -75,7 +75,7 @@ name="Shock Immunity" activation_messages=list("Your skin feels dry and unreactive.") deactivation_messages=list("Your skin no longer feels dry and unreactive.") - instability = 2 + instability = GENE_INSTABILITY_MODERATE mutation=NO_SHOCK /datum/dna/gene/basic/noshock/New() @@ -85,7 +85,7 @@ name="Midget" activation_messages=list("Everything around you seems bigger now...") deactivation_messages = list("Everything around you seems to shrink...") - instability = 1 + instability = GENE_INSTABILITY_MINOR mutation=DWARF /datum/dna/gene/basic/midget/New() @@ -106,7 +106,7 @@ name="Hulk" activation_messages=list("Your muscles hurt.") deactivation_messages=list("Your muscles shrink.") - instability = 8 + instability = GENE_INSTABILITY_MAJOR mutation=HULK activation_prob=5 @@ -146,7 +146,7 @@ name="X-Ray Vision" activation_messages=list("The walls suddenly disappear.") deactivation_messages=list("the walls around you re-appear.") - instability = 8 + instability = GENE_INSTABILITY_MAJOR mutation=XRAY activation_prob=10 @@ -157,7 +157,7 @@ name="Telekenesis" activation_messages = list("You feel smarter.") deactivation_messages = list("You feel dumber.") - instability = 8 + instability = GENE_INSTABILITY_MAJOR mutation=TK activation_prob=10 diff --git a/code/game/dna/genes/vg_disabilities.dm b/code/game/dna/genes/vg_disabilities.dm index e3c6b9883c6..ece9cb1da5c 100644 --- a/code/game/dna/genes/vg_disabilities.dm +++ b/code/game/dna/genes/vg_disabilities.dm @@ -4,7 +4,6 @@ desc = "Forces the speaking centre of the subjects brain to yell every sentence." activation_message = "YOU FEEL LIKE YELLING!" deactivation_message = "You feel like being quiet.." - instability = -1 mutation = LOUD /datum/dna/gene/disability/speech/loud/New() @@ -24,7 +23,7 @@ desc = "Causes the cerebellum to shut down in some places." activation_message = "You feel very dizzy..." deactivation_message = "You regain your balance." - instability = -2 + instability = -GENE_INSTABILITY_MINOR mutation = DIZZY /datum/dna/gene/disability/dizzy/New() diff --git a/code/game/dna/genes/vg_powers.dm b/code/game/dna/genes/vg_powers.dm index fd2061e66fb..0affb14e014 100644 --- a/code/game/dna/genes/vg_powers.dm +++ b/code/game/dna/genes/vg_powers.dm @@ -6,7 +6,7 @@ spelltype =/obj/effect/proc_holder/spell/targeted/morph activation_messages=list("Your body feels if can alter its appearance.") deactivation_messages = list("Your body doesn't feel capable of altering its appearance.") - instability = 1 + instability = GENE_INSTABILITY_MINOR mutation=MORPH /datum/dna/gene/basic/grant_spell/morph/New() @@ -150,7 +150,7 @@ name="Telepathy" activation_messages=list("You feel you can project your thoughts.") deactivation_messages=list("You no longer feel you can project your thoughts.") - instability = 1 + instability = GENE_INSTABILITY_MINOR mutation=REMOTE_TALK spelltype =/obj/effect/proc_holder/spell/targeted/remotetalk @@ -216,7 +216,7 @@ name="Remote Viewing" activation_messages=list("Your mind can see things from afar.") deactivation_messages=list("Your mind can no longer can see things from afar.") - instability = 1 + instability = GENE_INSTABILITY_MINOR mutation=REMOTE_VIEW spelltype =/obj/effect/proc_holder/spell/targeted/remoteview diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index d1c9b92c917..a7c5e8dc649 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -170,16 +170,33 @@ adjustCloneLoss(0.1) /mob/living/carbon/human/handle_mutations_and_radiation() - var/gene_instability = DEFAULT_GENE_INSTABILITY + var/gene_stability = DEFAULT_GENE_STABILITY for(var/datum/dna/gene/gene in dna_genes) if(!gene.block) continue if(gene.is_active(src)) - gene_instability += gene.instability + gene_stability -= gene.instability speech_problem_flag = 1 gene.OnMobLife(src) - if(prob(10) && prob(max(gene_instability, 0))) - adjustCloneLoss(0.3 * gene_instability) + if(mind && mind.special_role && mind.special_role == "Wizard") //magic + gene_instability = DEFAULT_GENE_STABILITY + if(gene_stability < 85)) + if(prob(5)) + adjustBurnLoss(2) + to_chat(src, "You feel like your skin is burning and bubbling off!") + if(gene_stability < 70) + if(prob(3)) + adjustCloneLoss(2) + to_chat(src, "You feel as if your body is warping.") + if(prob(5)) + adjustToxLoss(3) + to_chat(src, "You feel weak and nauseous.") + if(gene_stability < 40 && getCloneLoss() > 30) + to_chat(src, "You feel incredibly sick... Something isn't right!") + spawn(180) + if(getCloneLoss()) + gib() + if(!(species.flags & RADIMMUNE)) if (radiation) From 1573e9be7b39b747d42b9c521ae2d22d360b58f0 Mon Sep 17 00:00:00 2001 From: TheDZD Date: Mon, 27 Jun 2016 13:27:22 -0400 Subject: [PATCH 3/5] There we go --- code/modules/mob/living/carbon/human/life.dm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index a7c5e8dc649..88c7964c07c 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -178,12 +178,10 @@ gene_stability -= gene.instability speech_problem_flag = 1 gene.OnMobLife(src) - if(mind && mind.special_role && mind.special_role == "Wizard") //magic - gene_instability = DEFAULT_GENE_STABILITY - if(gene_stability < 85)) + if(gene_stability < 85) if(prob(5)) - adjustBurnLoss(2) - to_chat(src, "You feel like your skin is burning and bubbling off!") + adjustFireLoss(2) + to_chat(src, "You feel like your skin is burning and bubbling off!") if(gene_stability < 70) if(prob(3)) adjustCloneLoss(2) @@ -191,10 +189,10 @@ if(prob(5)) adjustToxLoss(3) to_chat(src, "You feel weak and nauseous.") - if(gene_stability < 40 && getCloneLoss() > 30) + if(gene_stability < 40 && getCloneLoss() > 50 && prob(5)) to_chat(src, "You feel incredibly sick... Something isn't right!") spawn(180) - if(getCloneLoss()) + if(getCloneLoss() > 10) gib() if(!(species.flags & RADIMMUNE)) From 551b2aefbdee42a304c08909192502077e94497d Mon Sep 17 00:00:00 2001 From: TheDZD Date: Sat, 2 Jul 2016 19:17:17 -0400 Subject: [PATCH 4/5] Remove some shit from Life(), and fix wiznerd thing --- code/game/dna/genes/gene.dm | 6 ++++-- code/game/gamemodes/wizard/wizard.dm | 1 + code/modules/mob/living/carbon/human/human_defines.dm | 2 +- code/modules/mob/living/carbon/human/life.dm | 2 -- code/modules/mob/living/living_defines.dm | 4 +++- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/code/game/dna/genes/gene.dm b/code/game/dna/genes/gene.dm index ad2b1f43c54..a39da68c92e 100644 --- a/code/game/dna/genes/gene.dm +++ b/code/game/dna/genes/gene.dm @@ -38,14 +38,16 @@ return 0 // Called when the gene activates. Do your magic here. -/datum/dna/gene/proc/activate(var/mob/M, var/connected, var/flags) +/datum/dna/gene/proc/activate(var/mob/living/M, var/connected, var/flags) + M.gene_stability += instability return /** * Called when the gene deactivates. Undo your magic here. * Only called when the block is deactivated. */ -/datum/dna/gene/proc/deactivate(var/mob/M, var/connected, var/flags) +/datum/dna/gene/proc/deactivate(var/mob/living/M, var/connected, var/flags) + M.gene_stability -= instability return // This section inspired by goone's bioEffects. diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index 6aa56d91c70..d98eae3135d 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -195,6 +195,7 @@ to_chat(wizard_mob, "In your pockets you will find a teleport scroll. Use it as needed.") wizard_mob.mind.store_memory("Remember: do not forget to prepare your spells.") wizard_mob.update_icons() + wizard_mob.gene_stability = 2 * DEFAULT_GENE_STABILITY //magic return 1 diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 6f106f5e125..3af93392326 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -80,4 +80,4 @@ var/global/default_martial_art = new/datum/martial_art var/fire_dmi = 'icons/mob/OnFire.dmi' var/fire_sprite = "Standing" - var/datum/body_accessory/body_accessory = null \ No newline at end of file + var/datum/body_accessory/body_accessory = null diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 88c7964c07c..9a56765bf67 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -170,12 +170,10 @@ adjustCloneLoss(0.1) /mob/living/carbon/human/handle_mutations_and_radiation() - var/gene_stability = DEFAULT_GENE_STABILITY for(var/datum/dna/gene/gene in dna_genes) if(!gene.block) continue if(gene.is_active(src)) - gene_stability -= gene.instability speech_problem_flag = 1 gene.OnMobLife(src) if(gene_stability < 85) diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index ce73ae369c0..d4e6d613d9c 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -54,4 +54,6 @@ var/list/butcher_results = null - var/list/surgeries = list() //a list of surgery datums. generally empty, they're added when the player wants them. \ No newline at end of file + var/list/surgeries = list() //a list of surgery datums. generally empty, they're added when the player wants them. + + var/gene_stability = DEFAULT_GENE_STABILITY From 2df88fcdb5437306a603f9f1e48353534b119984 Mon Sep 17 00:00:00 2001 From: TheDZD Date: Wed, 6 Jul 2016 21:49:26 -0400 Subject: [PATCH 5/5] Fixes and changes --- code/game/dna/dna2_helpers.dm | 4 ---- code/game/dna/genes/disabilities.dm | 2 ++ code/game/dna/genes/gene.dm | 8 ++++--- code/game/dna/genes/goon_disabilities.dm | 10 ++++++++ code/game/dna/genes/powers.dm | 8 +++++++ code/game/gamemodes/wizard/wizard.dm | 2 +- code/game/objects/items/devices/scanners.dm | 12 +++++++--- .../objects/items/weapons/dna_injector.dm | 2 +- code/modules/mob/living/carbon/human/life.dm | 23 ++++++++++--------- 9 files changed, 48 insertions(+), 23 deletions(-) diff --git a/code/game/dna/dna2_helpers.dm b/code/game/dna/dna2_helpers.dm index 53f248d1e91..c15c0eebee4 100644 --- a/code/game/dna/dna2_helpers.dm +++ b/code/game/dna/dna2_helpers.dm @@ -196,7 +196,3 @@ return 1 else return 0 - -// Used below, simple injection modifier. -/proc/probinj(var/pr, var/inj) - return prob(pr+inj*pr) diff --git a/code/game/dna/genes/disabilities.dm b/code/game/dna/genes/disabilities.dm index 4505dc1c1db..bbad4a7912f 100644 --- a/code/game/dna/genes/disabilities.dm +++ b/code/game/dna/genes/disabilities.dm @@ -28,6 +28,7 @@ return 1 // Always set! /datum/dna/gene/disability/activate(var/mob/M, var/connected, var/flags) + ..() if(mutation && !(mutation in M.mutations)) M.mutations.Add(mutation) if(disability) @@ -40,6 +41,7 @@ testing("[name] has no activation message.") /datum/dna/gene/disability/deactivate(var/mob/M, var/connected, var/flags) + ..() if(mutation && (mutation in M.mutations)) M.mutations.Remove(mutation) if(disability) diff --git a/code/game/dna/genes/gene.dm b/code/game/dna/genes/gene.dm index a39da68c92e..a3781f9985d 100644 --- a/code/game/dna/genes/gene.dm +++ b/code/game/dna/genes/gene.dm @@ -39,7 +39,7 @@ // Called when the gene activates. Do your magic here. /datum/dna/gene/proc/activate(var/mob/living/M, var/connected, var/flags) - M.gene_stability += instability + M.gene_stability -= instability return /** @@ -47,7 +47,7 @@ * Only called when the block is deactivated. */ /datum/dna/gene/proc/deactivate(var/mob/living/M, var/connected, var/flags) - M.gene_stability -= instability + M.gene_stability += instability return // This section inspired by goone's bioEffects. @@ -112,15 +112,17 @@ if(flags & MUTCHK_FORCED) return 1 // Probability check - return probinj(activation_prob,(flags&MUTCHK_FORCED)) + return prob(activation_prob) /datum/dna/gene/basic/activate(var/mob/M) + ..() M.mutations.Add(mutation) if(activation_messages.len) var/msg = pick(activation_messages) to_chat(M, "[msg]") /datum/dna/gene/basic/deactivate(var/mob/M) + ..() M.mutations.Remove(mutation) if(deactivation_messages.len) var/msg = pick(deactivation_messages) diff --git a/code/game/dna/genes/goon_disabilities.dm b/code/game/dna/genes/goon_disabilities.dm index 5ec04865591..2afb9b7bd83 100644 --- a/code/game/dna/genes/goon_disabilities.dm +++ b/code/game/dna/genes/goon_disabilities.dm @@ -38,6 +38,16 @@ ..() block=RADBLOCK + +/datum/dna/gene/disability/radioactive/can_activate(var/mob/M,var/flags) + if(!..()) + return 0 + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.species && H.species.flags & RADIMMUNE && !(flags & MUTCHK_FORCED)) + return 0 + return 1 + /datum/dna/gene/disability/radioactive/OnMobLife(var/mob/living/owner) var/radiation_amount = abs(min(owner.radiation - 20,0)) owner.apply_effect(radiation_amount, IRRADIATE) diff --git a/code/game/dna/genes/powers.dm b/code/game/dna/genes/powers.dm index 2f211f7a057..5600005271e 100644 --- a/code/game/dna/genes/powers.dm +++ b/code/game/dna/genes/powers.dm @@ -34,6 +34,14 @@ /datum/dna/gene/basic/increaserun/New() block=INCREASERUNBLOCK +/datum/dna/gene/basic/increaserun/can_activate(var/mob/M,var/flags) + if(!..()) + return 0 + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.species && H.species.slowdown && !(flags & MUTCHK_FORCED)) + return 0 + return 1 /datum/dna/gene/basic/heat_resist name="Heat Resistance" diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index d98eae3135d..c5f8271ab63 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -195,7 +195,7 @@ to_chat(wizard_mob, "In your pockets you will find a teleport scroll. Use it as needed.") wizard_mob.mind.store_memory("Remember: do not forget to prepare your spells.") wizard_mob.update_icons() - wizard_mob.gene_stability = 2 * DEFAULT_GENE_STABILITY //magic + wizard_mob.gene_stability += DEFAULT_GENE_STABILITY //magic return 1 diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 7138a4515be..7401a593e99 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -226,7 +226,7 @@ REAGENT SCANNER for(var/datum/wound/W in e.wounds) if(W.internal) user.show_message(text("\red Internal bleeding detected. Advanced scanner required for location."), 1) break - if(M:vessel) + if(H.vessel) var/blood_volume = round(M:vessel.get_reagent_amount("blood")) var/blood_percent = blood_volume / 560 blood_percent *= 100 @@ -246,7 +246,14 @@ REAGENT SCANNER if(implant_detect) user.show_message("Detected cybernetic modifications:") user.show_message("[implant_detect]") - + if(H.gene_stability < 40) + user.show_message("Subject's genes are quickly breaking down!") + else if(H.gene_stability < 70) + user.show_message("Subject's genes are showing signs of spontenous breakdown.") + else if(H.gene_stability < 85) + user.show_message("Subject's genes are showing minor signs of instability.") + else + user.show_message("Subject's genes are stable.") src.add_fingerprint(user) return @@ -523,4 +530,3 @@ REAGENT SCANNER if (T.cores > 1) user.show_message("Anomalious slime core amount detected", 1) user.show_message("Growth progress: [T.amount_grown]/10", 1) - diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index 2fc12e812fe..f243e1a6ab9 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -93,7 +93,7 @@ M.dna.UpdateSE() else M.dna.SetSEValue(block,src.GetValue()) - domutcheck(M, null, block!=null) + domutcheck(M, null, 0) M.update_mutations() if(H) H.sync_organ_dna(assimilate = 0, old_ue = prev_ue) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 9a56765bf67..3a394e002d5 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -176,21 +176,22 @@ if(gene.is_active(src)) speech_problem_flag = 1 gene.OnMobLife(src) - if(gene_stability < 85) - if(prob(5)) - adjustFireLoss(2) + if(gene_stability < 85) + var/instability = DEFAULT_GENE_STABILITY - gene_stability + if(prob(instability / 10)) + adjustFireLoss(min(6, instability / 12)) to_chat(src, "You feel like your skin is burning and bubbling off!") if(gene_stability < 70) - if(prob(3)) - adjustCloneLoss(2) + if(prob(instability / 12)) + adjustCloneLoss(min(5, instability / 15)) to_chat(src, "You feel as if your body is warping.") - if(prob(5)) - adjustToxLoss(3) + if(prob(instability / 10)) + adjustToxLoss(min(6, instability / 12)) to_chat(src, "You feel weak and nauseous.") - if(gene_stability < 40 && getCloneLoss() > 50 && prob(5)) - to_chat(src, "You feel incredibly sick... Something isn't right!") - spawn(180) - if(getCloneLoss() > 10) + if(gene_stability < 40 && prob(1)) + to_chat(src, "You feel incredibly sick... Something isn't right!") + spawn(300) + if(gene_stability < 40) gib() if(!(species.flags & RADIMMUNE))