Fixes a bunch of things to not circumvent SetStun/SetWeaken/SetParalyse that has no business doing so.

This commit is contained in:
Tastyfish
2016-02-28 01:11:36 -05:00
parent 386db45948
commit aed9859b9a
11 changed files with 42 additions and 49 deletions
+3 -3
View File
@@ -110,11 +110,11 @@
if(!effect || (blocked >= 2)) return 0
switch(effecttype)
if(STUN)
stunned = max(stunned,(effect/(blocked+1)))
Stun(effect / (blocked + 1))
if(WEAKEN)
weakened = max(weakened,(effect/(blocked+1)))
Weaken(effect / (blocked + 1))
if(PARALYZE)
paralysis = max(paralysis,(effect/(blocked+1)))
Paralyse(effect / (blocked + 1))
if(IRRADIATE)
radiation += min((effect - (effect*getarmor(null, "rad"))), 0)//Rads auto check armor
if(STUTTER)
@@ -101,14 +101,14 @@
if(..(target, blocked))
var/mob/living/M = target
M.dizziness += 20
M:slurring += 20
M.slurring += 20
M.confused += 20
M.eye_blurry += 20
M.drowsyness += 20
for(var/datum/reagent/ethanol/A in M.reagents.reagent_list)
M.paralysis += 2
M.AdjustParalysis(2)
M.dizziness += 10
M:slurring += 10
M.slurring += 10
M.confused += 10
M.eye_blurry += 10
M.drowsyness += 10
@@ -22,7 +22,7 @@
// Sobering multiplier.
// Sober block makes it more difficult to get drunk
var/sober_str=!(SOBER in M.mutations)?1:2
M:nutrition += nutriment_factor
M.nutrition += nutriment_factor
if(!src.data) data = 1
src.data++
@@ -42,8 +42,8 @@
M.dizziness += dizzy_adj.
if(d >= slur_start && d < pass_out)
if (!M:slurring) M:slurring = 1
M:slurring += slurr_adj/sober_str
if (!M.slurring) M.slurring = 1
M.slurring += slurr_adj/sober_str
if(d >= brawl_start && ishuman(M))
var/mob/living/carbon/human/H = M
F.teach(H,1)
@@ -51,17 +51,17 @@
if(H.martial_art == F)
F.remove(H)
if(d >= confused_start && prob(33))
if (!M:confused) M:confused = 1
M.confused = max(M:confused+(confused_adj/sober_str),0)
if (!M.confused) M.confused = 1
M.confused = max(M.confused+(confused_adj/sober_str),0)
if(d >= blur_start)
M.eye_blurry = max(M.eye_blurry, 10/sober_str)
M:drowsyness = max(M:drowsyness, 0)
M.drowsyness = max(M.drowsyness, 0)
if(d >= vomit_start)
if(prob(8))
M.fakevomit()
if(d >= pass_out)
M:paralysis = max(M:paralysis, 20/sober_str)
M:drowsyness = max(M:drowsyness, 30/sober_str)
M.Paralyse(20 / sober_str)
M.drowsyness = max(M.drowsyness, 30/sober_str)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/liver/L = H.internal_organs_by_name["liver"]
@@ -17,7 +17,7 @@
C.apply_effect(25 * weakness,IRRADIATE,0)
C.nutrition -= min(50 * weakness, C.nutrition)
C.Dizzy(6 * weakness)
C.weakened += 6 * weakness
C.AdjustWeakened(6 * weakness)
/datum/artifact_effect/hurt/DoEffectAura()
if(holder)
@@ -28,14 +28,14 @@
var/turf/T = get_turf(suspension_field)
if(field_type == "carbon")
for(var/mob/living/carbon/M in T)
M.weakened = max(M.weakened, 3)
M.Weaken(3)
cell.charge -= power_use
if(prob(5))
M << "\blue [pick("You feel tingly.","You feel like floating.","It is hard to speak.","You can barely move.")]"
if(field_type == "iron")
for(var/mob/living/silicon/M in T)
M.weakened = max(M.weakened, 3)
M.Weaken(3)
cell.charge -= power_use
if(prob(5))
M << "\blue [pick("You feel tingly.","You feel like floating.","It is hard to speak.","You can barely move.")]"
@@ -47,7 +47,7 @@
I.loc = suspension_field
for(var/mob/living/simple_animal/M in T)
M.weakened = max(M.weakened, 3)
M.Weaken(3)
cell.charge -= power_use
if(prob(5))
M << "\blue [pick("You feel tingly.","You feel like floating.","It is hard to speak.","You can barely move.")]"
@@ -247,7 +247,7 @@
if("carbon")
success = 1
for(var/mob/living/carbon/C in T)
C.weakened += 5
C.AdjustWeakened(5)
C.visible_message("\blue \icon[C] [C] begins to float in the air!","You feel tingly and light, but it is difficult to move.")
if("nitrogen")
success = 1
@@ -270,7 +270,7 @@
if("iron")
success = 1
for(var/mob/living/silicon/R in T)
R.weakened += 5
R.AdjustWeakened(5)
R.visible_message("\blue \icon[R] [R] begins to float in the air!","You feel tingly and light, but it is difficult to move.")
//
//in case we have a bad field type
@@ -279,7 +279,7 @@
for(var/mob/living/simple_animal/C in T)
C.visible_message("\blue \icon[C] [C] begins to float in the air!","You feel tingly and light, but it is difficult to move.")
C.weakened += 5
C.AdjustWeakened(5)
suspension_field = new(T)
suspension_field.field_type = field_type
@@ -306,7 +306,7 @@
for(var/mob/M in T)
M << "<span class='info'>You no longer feel like floating.</span>"
M.weakened = min(M.weakened, 3)
M.SetWeakened(min(M.weakened, 3))
src.visible_message("\blue \icon[src] [src] deactivates with a gentle shudder.")
qdel(suspension_field)
@@ -385,7 +385,8 @@
var/mob/living/M = A
if(M in immune)
continue
M.stunned = 10
M.stunned += 10
M.canmove = 0
M.anchored = 1
if(istype(M, /mob/living/simple_animal/hostile))
var/mob/living/simple_animal/hostile/H = M
@@ -413,7 +414,7 @@
return
/obj/effect/timestop/proc/unfreeze_mob(mob/living/M)
M.stunned = 0
M.AdjustStunned(-10)
M.anchored = 0
if(istype(M, /mob/living/simple_animal/hostile))
var/mob/living/simple_animal/hostile/H = M