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)