diff --git a/code/game/dna/dna2_helpers.dm b/code/game/dna/dna2_helpers.dm index 53f248d1e91..c15c0eebee4 100644 --- a/code/game/dna/dna2_helpers.dm +++ b/code/game/dna/dna2_helpers.dm @@ -196,7 +196,3 @@ return 1 else return 0 - -// Used below, simple injection modifier. -/proc/probinj(var/pr, var/inj) - return prob(pr+inj*pr) diff --git a/code/game/dna/genes/disabilities.dm b/code/game/dna/genes/disabilities.dm index 4505dc1c1db..bbad4a7912f 100644 --- a/code/game/dna/genes/disabilities.dm +++ b/code/game/dna/genes/disabilities.dm @@ -28,6 +28,7 @@ return 1 // Always set! /datum/dna/gene/disability/activate(var/mob/M, var/connected, var/flags) + ..() if(mutation && !(mutation in M.mutations)) M.mutations.Add(mutation) if(disability) @@ -40,6 +41,7 @@ testing("[name] has no activation message.") /datum/dna/gene/disability/deactivate(var/mob/M, var/connected, var/flags) + ..() if(mutation && (mutation in M.mutations)) M.mutations.Remove(mutation) if(disability) diff --git a/code/game/dna/genes/gene.dm b/code/game/dna/genes/gene.dm index a39da68c92e..a3781f9985d 100644 --- a/code/game/dna/genes/gene.dm +++ b/code/game/dna/genes/gene.dm @@ -39,7 +39,7 @@ // Called when the gene activates. Do your magic here. /datum/dna/gene/proc/activate(var/mob/living/M, var/connected, var/flags) - M.gene_stability += instability + M.gene_stability -= instability return /** @@ -47,7 +47,7 @@ * Only called when the block is deactivated. */ /datum/dna/gene/proc/deactivate(var/mob/living/M, var/connected, var/flags) - M.gene_stability -= instability + M.gene_stability += instability return // This section inspired by goone's bioEffects. @@ -112,15 +112,17 @@ if(flags & MUTCHK_FORCED) return 1 // Probability check - return probinj(activation_prob,(flags&MUTCHK_FORCED)) + return prob(activation_prob) /datum/dna/gene/basic/activate(var/mob/M) + ..() M.mutations.Add(mutation) if(activation_messages.len) var/msg = pick(activation_messages) to_chat(M, "[msg]") /datum/dna/gene/basic/deactivate(var/mob/M) + ..() M.mutations.Remove(mutation) if(deactivation_messages.len) var/msg = pick(deactivation_messages) diff --git a/code/game/dna/genes/goon_disabilities.dm b/code/game/dna/genes/goon_disabilities.dm index 5ec04865591..2afb9b7bd83 100644 --- a/code/game/dna/genes/goon_disabilities.dm +++ b/code/game/dna/genes/goon_disabilities.dm @@ -38,6 +38,16 @@ ..() block=RADBLOCK + +/datum/dna/gene/disability/radioactive/can_activate(var/mob/M,var/flags) + if(!..()) + return 0 + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.species && H.species.flags & RADIMMUNE && !(flags & MUTCHK_FORCED)) + return 0 + return 1 + /datum/dna/gene/disability/radioactive/OnMobLife(var/mob/living/owner) var/radiation_amount = abs(min(owner.radiation - 20,0)) owner.apply_effect(radiation_amount, IRRADIATE) diff --git a/code/game/dna/genes/powers.dm b/code/game/dna/genes/powers.dm index 2f211f7a057..5600005271e 100644 --- a/code/game/dna/genes/powers.dm +++ b/code/game/dna/genes/powers.dm @@ -34,6 +34,14 @@ /datum/dna/gene/basic/increaserun/New() block=INCREASERUNBLOCK +/datum/dna/gene/basic/increaserun/can_activate(var/mob/M,var/flags) + if(!..()) + return 0 + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.species && H.species.slowdown && !(flags & MUTCHK_FORCED)) + return 0 + return 1 /datum/dna/gene/basic/heat_resist name="Heat Resistance" diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index d98eae3135d..c5f8271ab63 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -195,7 +195,7 @@ to_chat(wizard_mob, "In your pockets you will find a teleport scroll. Use it as needed.") wizard_mob.mind.store_memory("Remember: do not forget to prepare your spells.") wizard_mob.update_icons() - wizard_mob.gene_stability = 2 * DEFAULT_GENE_STABILITY //magic + wizard_mob.gene_stability += DEFAULT_GENE_STABILITY //magic return 1 diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 7138a4515be..7401a593e99 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -226,7 +226,7 @@ REAGENT SCANNER for(var/datum/wound/W in e.wounds) if(W.internal) user.show_message(text("\red Internal bleeding detected. Advanced scanner required for location."), 1) break - if(M:vessel) + if(H.vessel) var/blood_volume = round(M:vessel.get_reagent_amount("blood")) var/blood_percent = blood_volume / 560 blood_percent *= 100 @@ -246,7 +246,14 @@ REAGENT SCANNER if(implant_detect) user.show_message("Detected cybernetic modifications:") user.show_message("[implant_detect]") - + if(H.gene_stability < 40) + user.show_message("Subject's genes are quickly breaking down!") + else if(H.gene_stability < 70) + user.show_message("Subject's genes are showing signs of spontenous breakdown.") + else if(H.gene_stability < 85) + user.show_message("Subject's genes are showing minor signs of instability.") + else + user.show_message("Subject's genes are stable.") src.add_fingerprint(user) return @@ -523,4 +530,3 @@ REAGENT SCANNER if (T.cores > 1) user.show_message("Anomalious slime core amount detected", 1) user.show_message("Growth progress: [T.amount_grown]/10", 1) - diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index 2fc12e812fe..f243e1a6ab9 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -93,7 +93,7 @@ M.dna.UpdateSE() else M.dna.SetSEValue(block,src.GetValue()) - domutcheck(M, null, block!=null) + domutcheck(M, null, 0) M.update_mutations() if(H) H.sync_organ_dna(assimilate = 0, old_ue = prev_ue) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 9a56765bf67..3a394e002d5 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -176,21 +176,22 @@ if(gene.is_active(src)) speech_problem_flag = 1 gene.OnMobLife(src) - if(gene_stability < 85) - if(prob(5)) - adjustFireLoss(2) + if(gene_stability < 85) + var/instability = DEFAULT_GENE_STABILITY - gene_stability + if(prob(instability / 10)) + adjustFireLoss(min(6, instability / 12)) to_chat(src, "You feel like your skin is burning and bubbling off!") if(gene_stability < 70) - if(prob(3)) - adjustCloneLoss(2) + if(prob(instability / 12)) + adjustCloneLoss(min(5, instability / 15)) to_chat(src, "You feel as if your body is warping.") - if(prob(5)) - adjustToxLoss(3) + if(prob(instability / 10)) + adjustToxLoss(min(6, instability / 12)) to_chat(src, "You feel weak and nauseous.") - if(gene_stability < 40 && getCloneLoss() > 50 && prob(5)) - to_chat(src, "You feel incredibly sick... Something isn't right!") - spawn(180) - if(getCloneLoss() > 10) + if(gene_stability < 40 && prob(1)) + to_chat(src, "You feel incredibly sick... Something isn't right!") + spawn(300) + if(gene_stability < 40) gib() if(!(species.flags & RADIMMUNE))