Fixes and changes

This commit is contained in:
TheDZD
2016-07-06 21:49:26 -04:00
parent 551b2aefbd
commit 2df88fcdb5
9 changed files with 48 additions and 23 deletions
-4
View File
@@ -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)
+2
View File
@@ -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)
+5 -3
View File
@@ -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, "<span class='notice'>[msg]</span>")
/datum/dna/gene/basic/deactivate(var/mob/M)
..()
M.mutations.Remove(mutation)
if(deactivation_messages.len)
var/msg = pick(deactivation_messages)
+10
View File
@@ -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)
+8
View File
@@ -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"
+1 -1
View File
@@ -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("<B>Remember:</B> 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
+9 -3
View File
@@ -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("<span class='notice'>Detected cybernetic modifications:</span>")
user.show_message("<span class='notice'>[implant_detect]</span>")
if(H.gene_stability < 40)
user.show_message("<span class='userdanger'>Subject's genes are quickly breaking down!</span>")
else if(H.gene_stability < 70)
user.show_message("<span class='danger'>Subject's genes are showing signs of spontenous breakdown.</span>")
else if(H.gene_stability < 85)
user.show_message("<span class='warning'>Subject's genes are showing minor signs of instability.</span>")
else
user.show_message("<span class='notice'>Subject's genes are stable.</span>")
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)
@@ -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)
+12 -11
View File
@@ -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, "<span class='danger'>You feel like your skin is burning and bubbling off!</span>")
if(gene_stability < 70)
if(prob(3))
adjustCloneLoss(2)
if(prob(instability / 12))
adjustCloneLoss(min(5, instability / 15))
to_chat(src, "<span class='danger'>You feel as if your body is warping.</span>")
if(prob(5))
adjustToxLoss(3)
if(prob(instability / 10))
adjustToxLoss(min(6, instability / 12))
to_chat(src, "<span class='danger'>You feel weak and nauseous.</span>")
if(gene_stability < 40 && getCloneLoss() > 50 && prob(5))
to_chat(src, "<span class='userdanger'>You feel incredibly sick... Something isn't right!</span>")
spawn(180)
if(getCloneLoss() > 10)
if(gene_stability < 40 && prob(1))
to_chat(src, "<span class='biggerdanger'>You feel incredibly sick... Something isn't right!</span>")
spawn(300)
if(gene_stability < 40)
gib()
if(!(species.flags & RADIMMUNE))