diff --git a/code/__DEFINES/genetics.dm b/code/__DEFINES/genetics.dm
index e6988ca745e..1baa779b492 100644
--- a/code/__DEFINES/genetics.dm
+++ b/code/__DEFINES/genetics.dm
@@ -124,3 +124,8 @@
#define NUTRITION_LEVEL_HUNGRY 250
#define NUTRITION_LEVEL_STARVING 150
+//Used for calculations for negative effects of having genetics powers
+#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/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 f62268b621a..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)
@@ -35,11 +36,12 @@
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.")
/datum/dna/gene/disability/deactivate(var/mob/M, var/connected, var/flags)
+ ..()
if(mutation && (mutation in M.mutations))
M.mutations.Remove(mutation)
if(disability)
@@ -47,7 +49,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,46 +57,51 @@
name="Hallucinate"
activation_message="Your mind says 'Hello'."
deactivation_message ="Sanity returns. Or does it?"
+ instability = -GENE_INSTABILITY_MODERATE
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 = -GENE_INSTABILITY_MODERATE
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 = -GENE_INSTABILITY_MINOR
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 = -GENE_INSTABILITY_MINOR
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 = -GENE_INSTABILITY_MODERATE
disability=TOURETTES
- New()
- block=TWITCHBLOCK
+/datum/dna/gene/disability/tourettes/New()
+ block=TWITCHBLOCK
/datum/dna/gene/disability/nervousness
name="Nervousness"
@@ -102,39 +109,42 @@
deactivation_message ="You feel much calmer."
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 = -GENE_INSTABILITY_MAJOR
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 = -GENE_INSTABILITY_MAJOR
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 = -GENE_INSTABILITY_MODERATE
disability=NEARSIGHTED
- New()
- block=GLASSESBLOCK
+/datum/dna/gene/disability/nearsighted/New()
+ block=GLASSESBLOCK
/datum/dna/gene/disability/lisp
@@ -144,12 +154,12 @@
deactivation_message = "You now feel able to pronounce consonants."
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..a3781f9985d 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)
@@ -35,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.
@@ -107,16 +112,18 @@
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, "\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..2afb9b7bd83 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 = -GENE_INSTABILITY_MODERATE
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,35 @@
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 = -GENE_INSTABILITY_MAJOR
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
- OnDrawUnderlays(var/mob/M,var/g,var/fat)
- return "rads[fat]_s"
+/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)
+ 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/OnDrawUnderlays(var/mob/M,var/g,var/fat)
+ return "rads[fat]_s"
////////////////////////////////////////
// Other disabilities
@@ -59,12 +71,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 = -GENE_INSTABILITY_MINOR
mutation = OBESITY
- New()
- ..()
- block=FATBLOCK
+/datum/dna/gene/disability/fat/New()
+ ..()
+ block=FATBLOCK
// WAS: /datum/bioEffect/chav
/datum/dna/gene/disability/speech/chav
@@ -74,36 +86,36 @@
deactivation_message = "You no longer feel like being rude and sassy."
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
@@ -113,16 +125,16 @@
deactivation_message = "The feeling of Swedishness passes."
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 +142,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 = -GENE_INSTABILITY_MINOR
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 +178,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 +195,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 +209,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 +227,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 +252,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..8df3af9a834 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 = GENE_INSTABILITY_MODERATE
- 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 = GENE_INSTABILITY_MODERATE
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 = GENE_INSTABILITY_MINOR
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 = GENE_INSTABILITY_MINOR
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 = GENE_INSTABILITY_MODERATE
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 = GENE_INSTABILITY_MINOR
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 = GENE_INSTABILITY_MINOR
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..5600005271e 100644
--- a/code/game/dna/genes/powers.dm
+++ b/code/game/dna/genes/powers.dm
@@ -6,151 +6,171 @@
name="No Breathing"
activation_messages=list("You feel no need to breathe.")
deactivation_messages=list("You feel the need to breathe, once more.")
+ instability = GENE_INSTABILITY_MODERATE
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 = GENE_INSTABILITY_MINOR
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 = GENE_INSTABILITY_MINOR
mutation=RUN
- New()
- block=INCREASERUNBLOCK
+/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"
activation_messages=list("Your skin is icy to the touch.")
deactivation_messages=list("Your skin no longer feels icy to the touch.")
+ instability = GENE_INSTABILITY_MODERATE
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 = GENE_INSTABILITY_MODERATE
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 = GENE_INSTABILITY_MINOR
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 = GENE_INSTABILITY_MODERATE
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 = GENE_INSTABILITY_MINOR
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 = GENE_INSTABILITY_MAJOR
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 = GENE_INSTABILITY_MAJOR
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 = GENE_INSTABILITY_MAJOR
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..ece9cb1da5c 100644
--- a/code/game/dna/genes/vg_disabilities.dm
+++ b/code/game/dna/genes/vg_disabilities.dm
@@ -6,31 +6,33 @@
deactivation_message = "You feel like being quiet.."
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 = -GENE_INSTABILITY_MINOR
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..0affb14e014 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 = GENE_INSTABILITY_MINOR
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 = GENE_INSTABILITY_MINOR
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 = GENE_INSTABILITY_MINOR
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/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm
index 6aa56d91c70..c5f8271ab63 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 += 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/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 a41f787a49c..3a394e002d5 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -174,10 +174,25 @@
if(!gene.block)
continue
if(gene.is_active(src))
- /* if (prob(10) && prob(gene.instability))
- adjustCloneLoss(1) */
speech_problem_flag = 1
gene.OnMobLife(src)
+ 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(instability / 12))
+ adjustCloneLoss(min(5, instability / 15))
+ to_chat(src, "You feel as if your body is warping.")
+ if(prob(instability / 10))
+ adjustToxLoss(min(6, instability / 12))
+ to_chat(src, "You feel weak and nauseous.")
+ 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))
if (radiation)
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