diff --git a/code/datums/diseases/appendicitis.dm b/code/datums/diseases/appendicitis.dm
index 2bc6032bca6..acaf4160e8b 100644
--- a/code/datums/diseases/appendicitis.dm
+++ b/code/datums/diseases/appendicitis.dm
@@ -21,19 +21,19 @@
if(2)
if(prob(3))
affected_mob << "\red You feel a stabbing pain in your abdomen!"
- affected_mob.stunned = rand(2,3)
+ affected_mob.Stun(rand(2,3))
affected_mob.adjustToxLoss(1)
if(3)
if(prob(1))
if (affected_mob.nutrition > 100)
- affected_mob.stunned = rand(4,6)
+ affected_mob.Stun(rand(4,6))
affected_mob << "\red You throw up!"
var/turf/location = affected_mob.loc
if (istype(location, /turf/simulated))
location.add_vomit_floor(affected_mob)
affected_mob.nutrition -= 95
- affected_mob:adjustToxLoss(-1)
+ affected_mob.adjustToxLoss(-1)
else
affected_mob << "\red You gag as you want to throw up, but there's nothing in your stomach!"
- affected_mob.weakened += 10
+ affected_mob.Weaken(10)
affected_mob.adjustToxLoss(3)
\ No newline at end of file
diff --git a/code/datums/diseases/brainrot.dm b/code/datums/diseases/brainrot.dm
index a96dd660d1a..d068e42f771 100644
--- a/code/datums/diseases/brainrot.dm
+++ b/code/datums/diseases/brainrot.dm
@@ -59,7 +59,7 @@
affected_mob << "\red You lose consciousness..."
for(var/mob/O in viewers(affected_mob, null))
O.show_message("[affected_mob] suddenly collapses", 1)
- affected_mob.paralysis = rand(5,10)
+ affected_mob.Paralyse(rand(5,10))
if(prob(1))
affected_mob.emote("snore")
if(prob(15))
diff --git a/code/datums/diseases/retrovirus.dm b/code/datums/diseases/retrovirus.dm
index bd2b96b69d8..4d3cc7e7759 100644
--- a/code/datums/diseases/retrovirus.dm
+++ b/code/datums/diseases/retrovirus.dm
@@ -60,7 +60,7 @@
affected_mob << "You feel very strange."
if (prob(4))
affected_mob << "\red You feel a stabbing pain in your head!"
- affected_mob.paralysis += 2
+ affected_mob.Paralyse(2)
if (prob(4))
affected_mob << "\red Your stomach churns."
if(3)
diff --git a/code/datums/diseases/robotic_transformation.dm b/code/datums/diseases/robotic_transformation.dm
index f4363435e90..d68952d9a0b 100644
--- a/code/datums/diseases/robotic_transformation.dm
+++ b/code/datums/diseases/robotic_transformation.dm
@@ -36,7 +36,7 @@
affected_mob.take_organ_damage(5)
if (prob(4))
affected_mob << "\red You feel a stabbing pain in your head."
- affected_mob.paralysis += 2
+ affected_mob.Paralyse(2)
if (prob(4))
affected_mob << "\red You can feel something move...inside."
if(4)
diff --git a/code/datums/diseases/xeno_transformation.dm b/code/datums/diseases/xeno_transformation.dm
index 90d6d656ea8..f3a822fb952 100644
--- a/code/datums/diseases/xeno_transformation.dm
+++ b/code/datums/diseases/xeno_transformation.dm
@@ -36,7 +36,7 @@
affected_mob.take_organ_damage(5)
if (prob(4))
affected_mob << "\red You feel a stabbing pain in your head."
- affected_mob.paralysis += 2
+ affected_mob.Paralyse(2)
if (prob(4))
affected_mob << "\red You can feel something move...inside."
if(4)
diff --git a/code/datums/spells/inflict_handler.dm b/code/datums/spells/inflict_handler.dm
index 03c6685c25a..58783eb9c2b 100644
--- a/code/datums/spells/inflict_handler.dm
+++ b/code/datums/spells/inflict_handler.dm
@@ -2,8 +2,9 @@
name = "Inflict Handler"
desc = "This spell blinds and/or destroys/damages/heals and/or weakens/stuns the target."
- var/amt_weaken = 0
- var/amt_paralysis = 0 //stun
+ var/amt_weakened = 0
+ var/amt_paralysis = 0
+ var/amt_stunned = 0
//set to negatives for healing
var/amt_dam_fire = 0
@@ -43,8 +44,9 @@
target.adjustToxLoss(amt_dam_tox)
target.oxyloss += amt_dam_oxy
//disabling
- target.weakened += amt_weaken
- target.paralysis += amt_paralysis
+ target.Weaken(amt_weakened)
+ target.Paralyse(amt_paralysis)
+ target.Stun(amt_stunned)
target.eye_blind += amt_eye_blind
target.eye_blurry += amt_eye_blurry
\ No newline at end of file
diff --git a/code/datums/spells/mind_transfer.dm b/code/datums/spells/mind_transfer.dm
index 6d45a813ea4..1ce3a8d389b 100644
--- a/code/datums/spells/mind_transfer.dm
+++ b/code/datums/spells/mind_transfer.dm
@@ -115,8 +115,8 @@ Also, you never added distance checking after target is selected. I've went ahea
victim.mind.current = victim
//Here we paralyze both mobs and knock them out for a time.
- caster.paralysis += paralysis_amount_caster
- victim.paralysis += paralysis_amount_victim
+ caster.Paralyse(paralysis_amount_caster)
+ victim.Paralyse(paralysis_amount_victim)
//After a certain amount of time the victim gets a message about being in a different body.
spawn(msg_wait)
diff --git a/code/datums/spells/wizard.dm b/code/datums/spells/wizard.dm
index a60a2b30d85..66821e3d33b 100644
--- a/code/datums/spells/wizard.dm
+++ b/code/datums/spells/wizard.dm
@@ -24,7 +24,7 @@
proj_trail_icon_state = "magicmd"
/obj/effect/proc_holder/spell/targeted/inflict_handler/magic_missile
- amt_weaken = 5
+ amt_weakened = 5
amt_dam_fire = 10
/obj/effect/proc_holder/spell/targeted/genetic/mutate
diff --git a/code/defines/obj/toy.dm b/code/defines/obj/toy.dm
index 8be79927c6c..ddff58bc1df 100644
--- a/code/defines/obj/toy.dm
+++ b/code/defines/obj/toy.dm
@@ -213,7 +213,7 @@
return
else if (bullets == 0)
- user.weakened += 5
+ user.Weaken(5)
for(var/mob/O in viewers(world.view, user))
O.show_message(text("\red [] realized they were out of ammo and starting scrounging for some!", user), 1)
@@ -236,7 +236,7 @@
else if (M.lying && src.bullets == 0)
for(var/mob/O in viewers(M, null))
if (O.client) O.show_message(text("\red [] casually lines up a shot with []'s head, pulls the trigger, then realizes they are out of ammo and drops to the floor in search of some!", user, M), 1, "\red You hear someone fall", 2)
- user.weakened += 5
+ user.Weaken(5)
return
/obj/item/toy/crayonbox
diff --git a/code/game/cellautomata.dm b/code/game/cellautomata.dm
index dacbdf2ebb3..af26bc1228d 100644
--- a/code/game/cellautomata.dm
+++ b/code/game/cellautomata.dm
@@ -92,6 +92,8 @@
vote = new /datum/vote()
+// coffinhandler = new /datum/coffinhandler()
+
radio_controller = new /datum/controller/radio()
//main_hud1 = new /obj/hud()
data_core = new /obj/datacore()
diff --git a/code/game/dna.dm b/code/game/dna.dm
index 362fe0cedae..473ef170378 100644
--- a/code/game/dna.dm
+++ b/code/game/dna.dm
@@ -277,7 +277,7 @@
M.disabilities |= 1
M << "\red Your eyes feel strange."
if (isblockon(getblock(M.dna.struc_enzymes, HULKBLOCK,3),2))
- if(inj || prob(15))
+ if(inj || prob(5))
M << "\blue Your muscles hurt."
M.mutations |= HULK
if (isblockon(getblock(M.dna.struc_enzymes, 3,3),3))
diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm
index e49ad980649..222114c6d85 100644
--- a/code/game/gamemodes/changeling/changeling_powers.dm
+++ b/code/game/gamemodes/changeling/changeling_powers.dm
@@ -382,9 +382,9 @@
//usr.bruteloss = 0
usr.setOxyLoss(0)
usr.setCloneLoss(0)
- usr.paralysis = 0
- usr.stunned = 0
- usr.weakened = 0
+ usr.SetParalysis(0)
+ usr.SetStunned(0)
+ usr.SetWeakened(0)
usr.radiation = 0
//usr.health = 100
//usr.updatehealth()
diff --git a/code/game/gamemodes/events/ninja_abilities.dm b/code/game/gamemodes/events/ninja_abilities.dm
index c7b1521d058..ec08ae9d6fb 100644
--- a/code/game/gamemodes/events/ninja_abilities.dm
+++ b/code/game/gamemodes/events/ninja_abilities.dm
@@ -269,9 +269,9 @@ Movement impairing would indicate drugs and the like.*/
var/mob/living/carbon/human/U = affecting
//Wouldn't need to track adrenaline boosters if there was a miracle injection to get rid of paralysis and the like instantly.
//For now, adrenaline boosters ARE the miracle injection. Well, radium, really.
- U.paralysis = 0
- U.stunned = 0
- U.weakened = 0
+ U.SetParalysis(0)
+ U.SetStunned(0)
+ U.SetWeakened(0)
/*
Due to lag, it was possible to adrenaline boost but remain helpless while life.dm resets player stat.
This lead to me and others spamming adrenaline boosters because they failed to kick in on time.
diff --git a/code/game/gamemodes/wizard/spells.dm b/code/game/gamemodes/wizard/spells.dm
index bbc1e54c331..eb5c1fd98ac 100644
--- a/code/game/gamemodes/wizard/spells.dm
+++ b/code/game/gamemodes/wizard/spells.dm
@@ -76,7 +76,7 @@
del(B)
step_to(A,M,0)
if (get_dist(A,M) == 0)
- M.weakened += 5
+ M.Weaken(5)
M.take_overall_damage(0,10)
del(A)
return
@@ -558,8 +558,8 @@
spawn(500)
U << "Something about your body doesn't seem quite right..."
- U.paralysis += 20
- H.paralysis += 20
+ U.Paralyse(20)
+ H.Paralyse(20)
spawn(600)
H.verbs += /mob/proc/swap
diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm
index b168dc21bc5..85a350d8571 100644
--- a/code/game/machinery/Sleeper.dm
+++ b/code/game/machinery/Sleeper.dm
@@ -238,15 +238,12 @@
else
M.oxyloss = 0
M.updatehealth()
- M.paralysis -= 4
- M.weakened -= 4
- M.stunned -= 4
- if (M.paralysis < 1)
- M.paralysis = 1
- if (M.weakened < 1)
- M.weakened = 1
- if (M.stunned < 1)
- M.stunned = 1
+ M.AdjustParalysis(-4)
+ M.AdjustWeakened(-4)
+ M.AdjustStunned(-4)
+ M.Paralyse(1)
+ M.Weaken(1)
+ M.Stun(1)
if (M:reagents.get_reagent_amount("inaprovaline") < 5)
M:reagents.add_reagent("inaprovaline", 5)
return
diff --git a/code/game/machinery/bots/ed209bot.dm b/code/game/machinery/bots/ed209bot.dm
index 0e4f95eabb5..d3399e263f4 100644
--- a/code/game/machinery/bots/ed209bot.dm
+++ b/code/game/machinery/bots/ed209bot.dm
@@ -242,16 +242,14 @@ Auto Patrol: []"},
var/mob/living/carbon/M = src.target
var/maxstuns = 4
if (istype(M, /mob/living/carbon/human))
- if (M.weakened < 10 && (!(M.mutations & HULK)) /*&& (!istype(M:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
- M.weakened = 10
if (M.stuttering < 10 && (!(M.mutations & HULK)) /*&& (!istype(M:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
M.stuttering = 10
- if (M.stunned < 10 && (!(M.mutations & HULK)) /*&& (!istype(M:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
- M.stunned = 10
+ M.Stun(10)
+ M.Weaken(10)
else
- M.weakened = 10
+ M.Weaken(10)
M.stuttering = 10
- M.stunned = 10
+ M.Stun(10)
maxstuns--
if (maxstuns <= 0)
target = null
diff --git a/code/game/machinery/bots/mulebot.dm b/code/game/machinery/bots/mulebot.dm
index d7f335d4157..eec60faf6f0 100644
--- a/code/game/machinery/bots/mulebot.dm
+++ b/code/game/machinery/bots/mulebot.dm
@@ -768,8 +768,8 @@
else
src.visible_message("\red [src] knocks over [M]!")
M.pulling = null
- M.stunned = 8
- M.weakened = 5
+ M.Stun(8)
+ M.Weaken(5)
M.lying = 1
..()
diff --git a/code/game/machinery/bots/secbot.dm b/code/game/machinery/bots/secbot.dm
index 5819d1c5313..03208420a67 100644
--- a/code/game/machinery/bots/secbot.dm
+++ b/code/game/machinery/bots/secbot.dm
@@ -223,16 +223,14 @@ Auto Patrol: []"},
var/mob/living/carbon/M = src.target
var/maxstuns = 4
if(istype(M, /mob/living/carbon/human))
- if(M.weakened < 10 && (!(M.mutations & HULK)) /*&& (!istype(M:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
- M.weakened = 10
- if(M.stuttering < 10 && (!(M.mutations & HULK)) /*&& (!istype(M:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
+ if(M.stuttering < 10 && (!(M.mutations & HULK)))
M.stuttering = 10
- if(M.stunned < 10 && (!(M.mutations & HULK)) /*&& (!istype(M:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
- M.stunned = 10
+ M.Stun(10)
+ M.Weaken(10)
else
- M.weakened = 10
+ M.Weaken(10)
M.stuttering = 10
- M.stunned = 10
+ M.Stun(10)
maxstuns--
if(maxstuns <= 0)
target = null
diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm
index 100b1434bb3..b0f2357fdfa 100644
--- a/code/game/machinery/cloning.dm
+++ b/code/game/machinery/cloning.dm
@@ -461,7 +461,7 @@
src.occupant.rejuv = 10
src.occupant.adjustCloneLoss(190) //new damage var so you can't eject a clone early then stab them to abuse the current damage system --NeoFite
src.occupant.adjustBrainLoss(90)
- src.occupant.paralysis += 4
+ src.occupant.Paralyse(4)
//Here let's calculate their health so the pod doesn't immediately eject them!!!
src.occupant.health = (src.occupant.getBruteLoss() + src.occupant.getToxLoss() + src.occupant.getOxyLoss() + src.occupant.getCloneLoss())
@@ -545,7 +545,7 @@
return
else if(src.occupant.health < src.heal_level)
- src.occupant.paralysis = 4
+ src.occupant.Paralyse(4)
//Slowly get that clone healed and finished.
src.occupant.adjustCloneLoss(-2)
diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm
index 384e8daf81f..791b3db0617 100644
--- a/code/game/machinery/cryo.dm
+++ b/code/game/machinery/cryo.dm
@@ -166,7 +166,7 @@
occupant.stat = 1
if(occupant.bodytemperature < T0C)
occupant.sleeping = max(5, (1/occupant.bodytemperature)*2000)
- occupant.paralysis = max(5, (1/occupant.bodytemperature)*3000)
+ occupant.Paralyse(max(5, (1/occupant.bodytemperature)*3000))
if(air_contents.oxygen > 2)
if(occupant.getOxyLoss()) occupant.adjustOxyLoss(-1)
else
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 97fba6cab90..2876f34ff68 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -607,8 +607,8 @@ About the new airlock wires panel:
M << "\red [user] headbutts the airlock."
var/datum/organ/external/affecting = H.get_organ("head")
affecting.take_damage(10, 0)
- H.stunned = 8
- H.weakened = 5
+ H.Stun(8)
+ H.Weaken(5)
H.UpdateDamageIcon()
else
for(var/mob/M in viewers(src, null))
diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm
index ce140838923..8e240470efc 100644
--- a/code/game/machinery/flasher.dm
+++ b/code/game/machinery/flasher.dm
@@ -77,7 +77,7 @@
if (istype(O, /mob/living/carbon/alien))//So aliens don't get flashed (they have no external eyes)/N
continue
- O.weakened = src.strength
+ O.Weaken(strength)
if ((O.eye_stat > 15 && prob(O.eye_stat + 50)))
flick("e_flash", O:flash)
O.eye_stat += rand(1, 2)
diff --git a/code/game/machinery/morgue.dm b/code/game/machinery/morgue.dm
index 336514d391c..0d8ff6209b5 100644
--- a/code/game/machinery/morgue.dm
+++ b/code/game/machinery/morgue.dm
@@ -258,7 +258,7 @@
cremating = 1
locked = 1
for (var/mob/living/M in contents)
- M:stunned = 100 //You really dont want to place this inside the loop.
+ M.Stun(100) //You really dont want to place this inside the loop.
spawn(1)
for(var/i=1 to 10)
sleep(10)
diff --git a/code/game/machinery/sink.dm b/code/game/machinery/sink.dm
index e8d2a9b6a5f..163ca8fd53b 100644
--- a/code/game/machinery/sink.dm
+++ b/code/game/machinery/sink.dm
@@ -65,9 +65,9 @@
var/obj/item/weapon/melee/baton/B = O
if (B.charges > 0 && B.status == 1)
flick("baton_active", src)
- user.stunned = 10
+ user.Stun(10)
user.stuttering = 10
- user.weakened = 10
+ user.Weaken(10)
if(isrobot(user))
var/mob/living/silicon/robot/R = user
R.cell.charge -= 20
diff --git a/code/game/magic/cultist/runes.dm b/code/game/magic/cultist/runes.dm
index 217a493e1fe..2298af13fd9 100644
--- a/code/game/magic/cultist/runes.dm
+++ b/code/game/magic/cultist/runes.dm
@@ -275,9 +275,9 @@ var/list/sacrificed = list()
affecting.heal_damage(1000, 1000)
corpse_to_raise.setToxLoss(0)
corpse_to_raise.setOxyLoss(0)
- corpse_to_raise.paralysis = 0
- corpse_to_raise.stunned = 0
- corpse_to_raise.weakened = 0
+ corpse_to_raise.SetParalysis(0)
+ corpse_to_raise.SetStunned(0)
+ corpse_to_raise.SetWeakened(0)
corpse_to_raise.radiation = 0
corpse_to_raise.buckled = null
if (corpse_to_raise.handcuffed)
@@ -914,12 +914,10 @@ var/list/sacrificed = list()
usr.say("Fuu ma'jin!")
for(var/mob/living/carbon/C in viewers(src))
flick("e_flash", C.flash)
- if (C.weakened < 1 && (!(C.mutations & HULK))) //Copied this off baton code
- C.weakened = 1
if (C.stuttering < 1 && (!(C.mutations & HULK)))
C.stuttering = 1
- if (C.stunned < 1 && (!(C.mutations & HULK)))
- C.stunned = 1
+ C.Weaken(1)
+ C.Stun(1)
C.show_message("\red The rune explodes in a bright flash.", 3)
del(src)
else ///When invoked as talisman, stun and mute the target mob.
@@ -929,10 +927,8 @@ var/list/sacrificed = list()
flick("e_flash", T.flash)
if (!(T.mutations & HULK))
T.silent += 15
- if (!(T.mutations & HULK))
- T.weakened += 25
- if (!(T.mutations & HULK))
- T.stunned += 25
+ T.Weaken(25)
+ T.Stun(25)
return
/////////////////////////////////////////TWENTY-FIFTH RUNE
diff --git a/code/game/mecha/combat/combat.dm b/code/game/mecha/combat/combat.dm
index 53d0362cfd9..b022f7663fe 100644
--- a/code/game/mecha/combat/combat.dm
+++ b/code/game/mecha/combat/combat.dm
@@ -61,7 +61,7 @@
if(temp)
switch(damtype)
if("brute")
- H.paralysis += 1
+ H.Paralyse(1)
temp.take_damage(rand(force/2, force), 0)
if("fire")
temp.take_damage(0, rand(force/2, force))
@@ -79,7 +79,7 @@
else
switch(damtype)
if("brute")
- M.paralysis += 1
+ M.Paralyse(1)
M.take_overall_damage(rand(force/2, force))
if("fire")
M.take_overall_damage(0, rand(force/2, force))
diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm
index 8017ed9a9d9..99a6edac93d 100644
--- a/code/game/mecha/equipment/weapons/weapons.dm
+++ b/code/game/mecha/equipment/weapons/weapons.dm
@@ -128,10 +128,10 @@
M.sleeping = 0
M.stuttering += 20
M.ear_deaf += 30
- M.weakened = 3
+ M.Weaken(3)
if(prob(30))
- M.stunned = 10
- M.paralysis += 4
+ M.Stun(10)
+ M.Paralyse(4)
else
M.make_jittery(500)
/* //else the mousetraps are useless
diff --git a/code/game/objects/alien/facehugger.dm b/code/game/objects/alien/facehugger.dm
index dfb45df9575..ec6cbdfece8 100644
--- a/code/game/objects/alien/facehugger.dm
+++ b/code/game/objects/alien/facehugger.dm
@@ -145,7 +145,7 @@ var/const
GoIdle() //so it doesn't jump the people that tear it off
- if(!sterile) target.paralysis = max(target.paralysis,MAX_IMPREGNATION_TIME/6) //something like 25 ticks = 20 seconds with the default settings
+ if(!sterile) target.Paralyse(MAX_IMPREGNATION_TIME/6) //something like 25 ticks = 20 seconds with the default settings
spawn(rand(MIN_IMPREGNATION_TIME,MAX_IMPREGNATION_TIME))
Impregnate(target)
diff --git a/code/game/objects/devices/PDA/PDA.dm b/code/game/objects/devices/PDA/PDA.dm
index d7b2b481b32..39b737f15f7 100644
--- a/code/game/objects/devices/PDA/PDA.dm
+++ b/code/game/objects/devices/PDA/PDA.dm
@@ -818,8 +818,8 @@
M.pulling = null
M << "\blue You slipped on the PDA!"
playsound(src.loc, 'slip.ogg', 50, 1, -3)
- M.stunned = 8
- M.weakened = 5
+ M.Stun(8)
+ M.Weaken(5)
//AI verb and proc for sending PDA messages.
diff --git a/code/game/objects/devices/flash.dm b/code/game/objects/devices/flash.dm
index d0f47f0fd60..20ec9617a85 100644
--- a/code/game/objects/devices/flash.dm
+++ b/code/game/objects/devices/flash.dm
@@ -41,9 +41,8 @@
if(iscarbon(M))
var/safety = M:eyecheck()
if(safety <= 0)
- if(M.weakened <= 10)
- M.weakened = 10
- flick("e_flash", M.flash)
+ M.Weaken(10)
+ flick("e_flash", M.flash)
if(ishuman(M) && ishuman(user))
if(user.mind in ticker.mode.head_revolutionaries)
@@ -65,7 +64,7 @@
flashfail = 1
else if(issilicon(M))
- M.weakened = max(user.weakened, rand(5,10))
+ M.Weaken(rand(5,10))
if(isrobot(user))
spawn(0)
diff --git a/code/game/objects/effect_system.dm b/code/game/objects/effect_system.dm
index 3e46dde648a..8b47e067fdd 100644
--- a/code/game/objects/effect_system.dm
+++ b/code/game/objects/effect_system.dm
@@ -884,8 +884,8 @@ steam.start() -- spawns the effect
M.pulling = null
M << "\blue You slipped on the foam!"
playsound(src.loc, 'slip.ogg', 50, 1, -3)
- M.stunned = 5
- M.weakened = 2
+ M.Stun(5)
+ M.Weaken(2)
/datum/effect/effect/system/foam_spread
@@ -1094,7 +1094,7 @@ steam.start() -- spawns the effect
for(var/mob/M in viewers(1, location))
if (prob (50 * amount))
M << "\red The explosion knocks you down."
- M.weakened += rand (1, 5)
+ M.Weaken(rand(1,5))
return
else
var/devastation = -1
diff --git a/code/game/objects/items/item.dm b/code/game/objects/items/item.dm
index 9c37be7f90a..8497582c9dd 100644
--- a/code/game/objects/items/item.dm
+++ b/code/game/objects/items/item.dm
@@ -399,8 +399,8 @@
M << "\red You drop what you're holding and clutch at your eyes!"
M.drop_item()
M.eye_blurry += 10
- M.paralysis += 1
- M.weakened += 4
+ M.Paralyse(1)
+ M.Weaken(4)
if (prob(M.eye_stat - 10 + 1))
if(M.stat != 2)
M << "\red You go blind!"
diff --git a/code/game/objects/items/robot_items.dm b/code/game/objects/items/robot_items.dm
index 517d08c3848..667ac47e479 100644
--- a/code/game/objects/items/robot_items.dm
+++ b/code/game/objects/items/robot_items.dm
@@ -11,12 +11,12 @@
M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])")
user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])")
user.cell.charge -= 30
- if (M.weakened < 5)
- M.weakened = 5
+
+ M.Weaken(5)
if (M.stuttering < 5)
M.stuttering = 5
- if (M.stunned < 5)
- M.stunned = 5
+ M.Stun(5)
+
for(var/mob/O in viewers(M, null))
if (O.client)
O.show_message("\red [user] has prodded [M] with an electrically-charged arm!", 1, "\red You hear someone fall", 2)
diff --git a/code/game/objects/items/weapons/clown_items.dm b/code/game/objects/items/weapons/clown_items.dm
index f8dd6391141..4c892471140 100644
--- a/code/game/objects/items/weapons/clown_items.dm
+++ b/code/game/objects/items/weapons/clown_items.dm
@@ -16,8 +16,8 @@ BIKE HORN
M.pulling = null
M << "\blue You slipped on the [name]!"
playsound(src.loc, 'slip.ogg', 50, 1, -3)
- M.stunned = 4
- M.weakened = 2
+ M.Stun(4)
+ M.Weaken(2)
/obj/item/weapon/reagent_containers/food/snacks/grown/bluetomato/HasEntered(AM as mob|obj)
if (istype(AM, /mob/living/carbon))
@@ -28,8 +28,8 @@ BIKE HORN
M.pulling = null
M << "\blue You slipped on the [name]!"
playsound(src.loc, 'slip.ogg', 50, 1, -3)
- M.stunned = 8
- M.weakened = 5
+ M.Stun(8)
+ M.Weaken(5)
/obj/item/weapon/soap/HasEntered(AM as mob|obj) //EXACTLY the same as bananapeel for now, so it makes sense to put it in the same dm -- Urist
if (istype(AM, /mob/living/carbon))
@@ -40,8 +40,8 @@ BIKE HORN
M.pulling = null
M << "\blue You slipped on the [name]!"
playsound(src.loc, 'slip.ogg', 50, 1, -3)
- M.stunned = 3
- M.weakened = 2
+ M.Stun(3)
+ M.Weaken(2)
/obj/item/weapon/soap/afterattack(atom/target, mob/user as mob)
if(istype(target,/obj/effect/decal/cleanable))
diff --git a/code/game/objects/items/weapons/grenades.dm b/code/game/objects/items/weapons/grenades.dm
index afbdc688913..35b17ceb801 100644
--- a/code/game/objects/items/weapons/grenades.dm
+++ b/code/game/objects/items/weapons/grenades.dm
@@ -172,19 +172,19 @@ FLASHBANG
if(eye_safety < 1)
flick("e_flash", M.flash)
M.eye_stat += rand(1, 3)
- M.stunned = max(M.stunned,2)
- M.weakened = max(M.weakened,10)
+ M.Stun(2)
+ M.Weaken(10)
//Now applying sound
if((get_dist(M, T) <= 2 || src.loc == M.loc || src.loc == M))
if(ear_safety > 0)
- M.stunned = max(M.stunned,2)
- M.weakened = max(M.weakened,1)
+ M.Stun(2)
+ M.Weaken(1)
else
- M.stunned = max(M.stunned,10)
- M.weakened = max(M.weakened,3)
+ M.Stun(10)
+ M.Weaken(3)
if ((prob(14) || (M == src.loc && prob(70))))
M.ear_damage += rand(1, 10)
else
@@ -193,12 +193,12 @@ FLASHBANG
else if(get_dist(M, T) <= 5)
if(!ear_safety)
- M.stunned = max(M.stunned,8)
+ M.Stun(8)
M.ear_damage += rand(0, 3)
M.ear_deaf = max(M.ear_deaf,10)
else if(!ear_safety)
- M.stunned = max(M.stunned,4)
+ M.Stun(4)
M.ear_damage += rand(0, 1)
M.ear_deaf = max(M.ear_deaf,5)
diff --git a/code/game/objects/items/weapons/hydroponics.dm b/code/game/objects/items/weapons/hydroponics.dm
index 422d5d64a97..3f9e47750bb 100644
--- a/code/game/objects/items/weapons/hydroponics.dm
+++ b/code/game/objects/items/weapons/hydroponics.dm
@@ -108,7 +108,7 @@ Deathnettle
else
user.take_organ_damage(0,force)
if(prob(50))
- user.paralysis += 5
+ user.Paralyse(5)
user << "\red You are stunned by the Deathnettle when you try picking it up!"
/obj/item/weapon/grown/deathnettle/attack(mob/living/carbon/M as mob, mob/user as mob)
@@ -120,8 +120,8 @@ Deathnettle
M.eye_blurry += force/7
if(prob(20))
- M.paralysis += force/6
- M.weakened += force/15
+ M.Paralyse(force/6)
+ M.Weaken(force/15)
M.drop_item()
/obj/item/weapon/grown/deathnettle/afterattack(atom/A as mob|obj, mob/user as mob)
diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm
index 70aaa51329a..6866fae1a6e 100644
--- a/code/game/objects/items/weapons/kitchen.dm
+++ b/code/game/objects/items/weapons/kitchen.dm
@@ -50,7 +50,7 @@ KNIFE
if ((user.mutations & CLUMSY) && prob(50))
user << "\red The [src] slips out of your hand and hits your head."
user.take_organ_damage(10)
- user.paralysis += 2
+ user.Paralyse(2)
return
M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])")
user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])")
@@ -63,11 +63,9 @@ KNIFE
return
var/time = rand(2, 6)
if (prob(75))
- if (M.paralysis < time && (!(M.mutations & HULK)) )
- M.paralysis = time
+ M.Paralyse(time)
else
- if (M.stunned < time && (!(M.mutations & HULK)) )
- M.stunned = time
+ M.Stun(time)
if(M.stat != 2) M.stat = 1
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] has been knocked unconscious!", M), 1, "\red You hear someone fall.", 2)
@@ -109,7 +107,7 @@ KNIFE
if((user.mutations & CLUMSY) && prob(50)) //What if he's a clown?
M << "\red You accidentally slam yourself with the [src]!"
- M.weakened += 1
+ M.Weaken(1)
user.take_organ_damage(2)
if(prob(50))
playsound(M, 'trayhit1.ogg', 50, 1)
@@ -132,7 +130,7 @@ KNIFE
user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])")
if(prob(15))
- M.weakened += 3
+ M.Weaken(3)
M.take_organ_damage(3)
else
M.take_organ_damage(5)
@@ -173,7 +171,7 @@ KNIFE
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] slams [] with the tray!", user, M), 1)
if(prob(10))
- M.stunned = rand(1,3)
+ M.Stun(rand(1,3))
M.take_organ_damage(3)
return
else
@@ -197,13 +195,13 @@ KNIFE
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] slams [] in the face with the tray!", user, M), 1)
if(prob(30))
- M.stunned = rand(2,4)
+ M.Stun(rand(2,4))
M.take_organ_damage(4)
return
else
M.take_organ_damage(8)
if(prob(30))
- M.weakened+=2
+ M.Weaken(2)
return
return
diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm
index 6a29f44c745..5f7185d72b6 100644
--- a/code/game/objects/items/weapons/swords_axes_etc.dm
+++ b/code/game/objects/items/weapons/swords_axes_etc.dm
@@ -105,7 +105,7 @@ STUN BATON
src.status = !( src.status )
if ((usr.mutations & CLUMSY) && prob(50))
usr << "\red You grab the stunbaton on the wrong side."
- usr.paralysis += 60
+ usr.Paralyse(60)
return
if (src.status)
user << "\blue The baton is now on."
@@ -121,7 +121,7 @@ STUN BATON
/obj/item/weapon/melee/baton/attack(mob/M as mob, mob/user as mob)
if ((usr.mutations & CLUMSY) && prob(50))
usr << "\red You grab the stunbaton on the wrong side."
- usr.weakened += 30
+ usr.Weaken(30)
return
src.add_fingerprint(user)
var/mob/living/carbon/human/H = M
@@ -136,8 +136,7 @@ STUN BATON
if (status == 0 || (status == 1 && charges ==0))
if(user.a_intent == "hurt")
if(!..()) return
- if (M.weakened < 5 && (!(M.mutations & HULK)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
- M.weakened = 5
+ M.Weaken(5)
for(var/mob/O in viewers(M))
if (O.client) O.show_message("\red [M] has been beaten with the stun baton by [user]!", 1)
if(status == 1 && charges == 0)
@@ -159,12 +158,10 @@ STUN BATON
R.cell.charge -= 20
else
charges--
- if (M.weakened < 1 && (!(M.mutations & HULK)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
- M.weakened = 1
if (M.stuttering < 1 && (!(M.mutations & HULK)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
M.stuttering = 1
- if (M.stunned < 1 && (!(M.mutations & HULK)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
- M.stunned = 1
+ M.Stun(1)
+ M.Weaken(1)
else
playsound(src.loc, 'Egloves.ogg', 50, 1, -1)
if(isrobot(user))
@@ -172,12 +169,10 @@ STUN BATON
R.cell.charge -= 20
else
charges--
- if (M.weakened < 10 && (!(M.mutations & HULK)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
- M.weakened = 10
if (M.stuttering < 10 && (!(M.mutations & HULK)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
M.stuttering = 10
- if (M.stunned < 10 && (!(M.mutations & HULK)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
- M.stunned = 10
+ M.Stun(10)
+ M.Weaken(10)
user.lastattacked = M
M.lastattacker = user
for(var/mob/O in viewers(M))
@@ -193,7 +188,7 @@ STUN BATON
/obj/item/weapon/melee/classic_baton/attack(mob/M as mob, mob/living/user as mob)
if ((user.mutations & CLUMSY) && prob(50))
user << "\red You club yourself over the head."
- user.weakened = max(3 * force, user.weakened)
+ user.Weaken(3 * force)
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.apply_damage(2*force, BRUTE, "head")
@@ -208,19 +203,15 @@ STUN BATON
if (user.a_intent == "hurt")
if(!..()) return
playsound(src.loc, "swing_hit", 50, 1, -1)
- if (M.weakened < 8 && (!(M.mutations & HULK)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
- M.weakened = 8
if (M.stuttering < 8 && (!(M.mutations & HULK)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
M.stuttering = 8
- if (M.stunned < 8 && (!(M.mutations & HULK)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
- M.stunned = 8
+ M.Stun(8)
+ M.Weaken(8)
for(var/mob/O in viewers(M))
if (O.client) O.show_message("\red [M] has been beaten with the police baton by [user]!", 1, "\red You hear someone fall", 2)
else
playsound(src.loc, 'Genhit.ogg', 50, 1, -1)
- if (M.weakened < 5 && (!(M.mutations & HULK)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
- M.weakened = 5
- if (M.stunned < 5 && (!(M.mutations & HULK)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
- M.stunned = 5
+ M.Stun(5)
+ M.Weaken(5)
for(var/mob/O in viewers(M))
if (O.client) O.show_message("\red [M] has been stunned with the police baton by [user]!", 1, "\red You hear someone fall", 2)
diff --git a/code/game/objects/radio/electropack.dm b/code/game/objects/radio/electropack.dm
index 3920b0ab354..4f5b5d07632 100644
--- a/code/game/objects/radio/electropack.dm
+++ b/code/game/objects/radio/electropack.dm
@@ -138,8 +138,7 @@
s.set_up(3, 1, M)
s.start()
- if (M.weakened < 10)
- M.weakened = 10
+ M.Weaken(10)
if ((src.master && src.wires & 1))
src.master.receive_signal()
diff --git a/code/game/objects/secstorage/sbriefcase.dm b/code/game/objects/secstorage/sbriefcase.dm
index 3362984a608..472d9b33fa7 100644
--- a/code/game/objects/secstorage/sbriefcase.dm
+++ b/code/game/objects/secstorage/sbriefcase.dm
@@ -19,7 +19,7 @@
if ((user.mutations & CLUMSY) && prob(50))
user << "\red The [src] slips out of your hand and hits your head."
user.take_organ_damage(10)
- user.paralysis += 2
+ user.Paralyse(2)
return
@@ -36,11 +36,9 @@
return
var/time = rand(2, 6)
if (prob(75))
- if (M.paralysis < time)// && (!M.ishulk))
- M.paralysis = time
+ M.Paralyse(time)
else
- if (M.stunned < time)// && (!M.ishulk))
- M.stunned = time
+ M.Stun(time)
if(M.stat != 2) M.stat = 1
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] has been knocked unconscious!", M), 1, "\red You hear someone fall.", 2)
diff --git a/code/game/objects/stacks/glass.dm b/code/game/objects/stacks/glass.dm
index 04dd4284ced..e81bb4217ce 100644
--- a/code/game/objects/stacks/glass.dm
+++ b/code/game/objects/stacks/glass.dm
@@ -169,7 +169,7 @@ SHARDS
var/mob/living/carbon/human/H = M
if(!H.shoes)
var/datum/organ/external/affecting = H.get_organ(pick("l_leg", "r_leg"))
- H.weakened = max(3, H.weakened)
+ H.Weaken(3)
affecting.take_damage(5, 0)
H.UpdateDamageIcon()
H.updatehealth()
diff --git a/code/game/objects/stool.dm b/code/game/objects/stool.dm
index 5f1214fc8db..a47ba982293 100644
--- a/code/game/objects/stool.dm
+++ b/code/game/objects/stool.dm
@@ -197,8 +197,7 @@
M << "\red You feel a deep shock course through your body!"
sleep(1)
M.burn_skin(85)
- if(M.stunned < 600)
- M.stunned = 600
+ M.Stun(600)
for(var/mob/M in hearers(src, null))
M.show_message("\red The electric chair went off!.", 3, "\red You hear a deep sharp shock.", 2)
diff --git a/code/game/objects/storage/bible.dm b/code/game/objects/storage/bible.dm
index 4d2a37e6aba..f8d409bc87d 100644
--- a/code/game/objects/storage/bible.dm
+++ b/code/game/objects/storage/bible.dm
@@ -36,7 +36,7 @@
if ((user.mutations & CLUMSY) && prob(50))
user << "\red The [src] slips out of your hand and hits your head."
user.take_organ_damage(10)
- user.paralysis += 20
+ user.Paralyse(20)
return
// if(..() == BLOCKED)
diff --git a/code/game/objects/storage/briefcase.dm b/code/game/objects/storage/briefcase.dm
index d29aa0c830b..a2dd6970cd6 100644
--- a/code/game/objects/storage/briefcase.dm
+++ b/code/game/objects/storage/briefcase.dm
@@ -14,7 +14,7 @@
if ((user.mutations & CLUMSY) && prob(50))
user << "\red The [src] slips out of your hand and hits your head."
user.take_organ_damage(10)
- user.paralysis += 2
+ user.Paralyse(2)
return
@@ -29,11 +29,9 @@
return
var/time = rand(2, 6)
if (prob(75))
- if (M.paralysis < time && (!(M.mutations & HULK)) )
- M.paralysis = time
+ M.Paralyse(time)
else
- if (M.stunned < time && (!(M.mutations & HULK)) )
- M.stunned = time
+ M.Stun(time)
if(M.stat != 2) M.stat = 1
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] has been knocked unconscious!", M), 1, "\red You hear someone fall.", 2)
diff --git a/code/game/objects/tables_racks.dm b/code/game/objects/tables_racks.dm
index 8878770a712..2df373a1b1a 100644
--- a/code/game/objects/tables_racks.dm
+++ b/code/game/objects/tables_racks.dm
@@ -123,7 +123,7 @@ TABLE AND RACK OBJECT INTERATIONS
user << "\red You need a better grip to do that!"
return
G.affecting.loc = src.loc
- G.affecting.weakened = 5
+ G.affecting.Weaken(5)
for(var/mob/O in viewers(world.view, src))
if (O.client)
O << text("\red [] puts [] on the table.", G.assailant, G.affecting)
@@ -169,7 +169,7 @@ TABLE AND RACK OBJECT INTERATIONS
user << "\red You need a better grip to do that!"
return
G.affecting.loc = src.loc
- G.affecting.weakened = 5
+ G.affecting.Weaken(5)
for(var/mob/O in viewers(world.view, src))
if (O.client)
O << text("\red [] puts [] on the wooden table.", G.assailant, G.affecting)
@@ -211,7 +211,7 @@ TABLE AND RACK OBJECT INTERATIONS
user << "\red You need a better grip to do that!"
return
G.affecting.loc = src.loc
- G.affecting.weakened = 5
+ G.affecting.Weaken(5)
for(var/mob/O in viewers(world.view, src))
if (O.client)
O << text("\red [] puts [] on the reinforced table.", G.assailant, G.affecting)
diff --git a/code/game/objects/weapons.dm b/code/game/objects/weapons.dm
index 57499d809dc..a118b09f2e3 100644
--- a/code/game/objects/weapons.dm
+++ b/code/game/objects/weapons.dm
@@ -15,7 +15,9 @@
del(src)
/obj/effect/mine/proc/triggerstun(obj)
- obj:stunned += 30
+ if(ismob(obj))
+ var/mob/M = obj
+ M.Stun(30)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
@@ -130,11 +132,11 @@
if("feet")
if(!H.shoes)
affecting = H.get_organ(pick("l_leg", "r_leg"))
- H.weakened = max(3, H.weakened)
+ H.Weaken(3)
if("l_hand", "r_hand")
if(!H.gloves)
affecting = H.get_organ(type)
- H.stunned = max(3, H.stunned)
+ H.Stun(3)
if(affecting)
affecting.take_damage(1, 0)
H.UpdateDamageIcon()
diff --git a/code/game/turf.dm b/code/game/turf.dm
index c05fd4ae961..10902f962ba 100644
--- a/code/game/turf.dm
+++ b/code/game/turf.dm
@@ -187,8 +187,8 @@
step(M, M.dir)
M << "\blue You slipped on the wet floor!"
playsound(src.loc, 'slip.ogg', 50, 1, -3)
- M.stunned = 8
- M.weakened = 5
+ M.Stun(8)
+ M.Weaken(5)
else
M.inertia_dir = 0
return
@@ -198,8 +198,8 @@
step(M, M.dir)
M << "\blue You slipped on the wet floor!"
playsound(src.loc, 'slip.ogg', 50, 1, -3)
- M.stunned = 8
- M.weakened = 5
+ M.Stun(8)
+ M.Weaken(5)
else
M.inertia_dir = 0
return
@@ -215,7 +215,7 @@
M.take_organ_damage(2) // Was 5 -- TLE
M << "\blue You slipped on the floor!"
playsound(src.loc, 'slip.ogg', 50, 1, -3)
- M.weakened = 10
+ M.Weaken(10)
..()
@@ -1197,7 +1197,7 @@ turf/simulated/floor/return_siding_icon_state()
else if(ticker.mode.name == "extended"||ticker.mode.name == "sandbox") Sandbox_Spacemove(A)
else
- if (src.x <= 2)
+ if (src.x <= 2 || A.x >= (world.maxx - 1) || src.y <= 2 || A.y >= (world.maxy - 1))
if(istype(A, /obj/effect/meteor)||istype(A, /obj/effect/space_dust))
del(A)
return
@@ -1210,63 +1210,25 @@ turf/simulated/floor/return_siding_icon_state()
return
A.z = move_to_z
- A.x = world.maxx - 2
- spawn (0)
- if ((A && A.loc))
- A.loc.Entered(A)
- else if (A.x >= (world.maxx - 1))
- if(istype(A, /obj/effect/meteor)||istype(A, /obj/effect/space_dust))
- del(A)
- return
- var/move_to_z_str = pickweight(accessable_z_levels)
+ if(src.x <= 2)
+ A.x = world.maxx - 2
- var/move_to_z = text2num(move_to_z_str)
+ else if (A.x >= (world.maxx - 1))
+ A.x = 3
- if(!move_to_z)
- return
+ else if (src.y <= 2)
+ A.y = world.maxy - 2
- A.z = move_to_z
- A.x = 3
- spawn (0)
- if ((A && A.loc))
- A.loc.Entered(A)
- else if (src.y <= 2)
- if(istype(A, /obj/effect/meteor)||istype(A, /obj/effect/space_dust))
- del(A)
- return
+ else if (A.y >= (world.maxy - 1))
+ A.y = 3
- var/move_to_z_str = pickweight(accessable_z_levels)
-
- var/move_to_z = text2num(move_to_z_str)
-
- if(!move_to_z)
- return
-
- A.z = move_to_z
- A.y = world.maxy - 2
- spawn (0)
- if ((A && A.loc))
- A.loc.Entered(A)
-
- else if (A.y >= (world.maxy - 1))
- if(istype(A, /obj/effect/meteor)||istype(A, /obj/effect/space_dust))
- del(A)
- return
-
- var/move_to_z_str = pickweight(accessable_z_levels)
-
- var/move_to_z = text2num(move_to_z_str)
-
- if(!move_to_z)
- return
-
- A.z = move_to_z
- A.y = 3
spawn (0)
if ((A && A.loc))
A.loc.Entered(A)
+// if(istype(A, /obj/structure/closet/coffin))
+// coffinhandler.Add(A)
/turf/space/proc/Sandbox_Spacemove(atom/movable/A as mob|obj)
var/cur_x
diff --git a/code/game/vials.dm b/code/game/vials.dm
index f7f4483f243..0e27b6b6ee6 100644
--- a/code/game/vials.dm
+++ b/code/game/vials.dm
@@ -58,20 +58,21 @@
///////////////////////////////////////////////////////***
/////////////////////////////////////////////////////green
-/obj/item/weapon/vial/green/drink(user)
+/obj/item/weapon/vial/green/drink(mob/living/user as mob)
var/A = src
src = null
del(A)
switch(pick(1,2,3))
if(1)
spawn(300)
- user:gib()
+ user.gib()
if(2)
- user:weakened += 5
- user:contract_disease(new /datum/disease/gbs,1)
+ user.Weaken(5)
+ user.contract_disease(new /datum/disease/gbs,1)
if(3)
spawn(200)
- user:contract_disease(new /datum/disease/gbs,1)
+ user.contract_disease(new /datum/disease/gbs,1)
+
/obj/item/weapon/vial/green/shatter()
var/A = src
var/atom/sourceloc = get_turf(src.loc)
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index 6d030af5b60..cf604b2c739 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -504,7 +504,7 @@
W.dropped(M)
W.layer = initial(W.layer)
//teleport person to cell
- M.paralysis += 5
+ M.Paralyse(5)
sleep(5) //so they black out before warping
M.loc = pick(prisonwarp)
if(istype(M, /mob/living/carbon/human))
@@ -571,7 +571,7 @@
W.loc = M.loc
W.dropped(M)
W.layer = initial(W.layer)
- M.paralysis += 5
+ M.Paralyse(5)
sleep(5)
M.loc = pick(tdome1)
spawn(50)
@@ -597,7 +597,7 @@
W.loc = M.loc
W.dropped(M)
W.layer = initial(W.layer)
- M.paralysis += 5
+ M.Paralyse(5)
sleep(5)
M.loc = pick(tdome2)
spawn(50)
@@ -612,7 +612,7 @@
if(istype(M, /mob/living/silicon/ai))
alert("The AI can't be sent to the thunderdome you jerk!", null, null, null, null, null)
return
- M.paralysis += 5
+ M.Paralyse(5)
sleep(5)
M.loc = pick(tdomeadmin)
spawn(50)
@@ -642,7 +642,7 @@
var/mob/living/carbon/human/observer = M
observer.equip_if_possible(new /obj/item/clothing/under/suit_jacket(observer), observer.slot_w_uniform)
observer.equip_if_possible(new /obj/item/clothing/shoes/black(observer), observer.slot_shoes)
- M.paralysis += 5
+ M.Paralyse(5)
sleep(5)
M.loc = pick(tdomeobserve)
spawn(50)
@@ -1153,7 +1153,7 @@
if(loc.z > 1 || prisonwarped.Find(H))
//don't warp them if they aren't ready or are already there
continue
- H.paralysis += 5
+ H.Paralyse(5)
if(H.wear_id)
var/obj/item/weapon/card/id/id = H.get_idcard()
for(var/A in id.access)
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index 43d33e5c956..9e9e7dc2b6e 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -24,7 +24,7 @@
for(var/obj/item/W in M)
M.drop_from_slot(W)
//teleport person to cell
- M.paralysis += 5
+ M.Paralyse(5)
sleep(5) //so they black out before warping
M.loc = pick(prisonwarp)
if(istype(M, /mob/living/carbon/human))
@@ -500,9 +500,9 @@ Traitors and the like can also be revived with the previous role mostly intact.
M.setToxLoss(0)
//M.bruteloss = 0
M.setOxyLoss(0)
- M.paralysis = 0
- M.stunned = 0
- M.weakened = 0
+ M.SetParalysis(0)
+ M.SetStunned(0)
+ M.SetWeakened(0)
M.radiation = 0
//M.health = 100
M.nutrition = 400
diff --git a/code/modules/chemical/Chemistry-Reagents.dm b/code/modules/chemical/Chemistry-Reagents.dm
index db93d03e114..ec8e9129885 100644
--- a/code/modules/chemical/Chemistry-Reagents.dm
+++ b/code/modules/chemical/Chemistry-Reagents.dm
@@ -386,8 +386,8 @@ datum
if(15 to 25)
M:drowsyness = max(M:drowsyness, 20)
if(25 to INFINITY)
- M:paralysis = max(M:paralysis, 20)
- M:drowsyness = max(M:drowsyness, 30)
+ M.Paralyse(20)
+ M.drowsyness = max(M:drowsyness, 30)
data++
..()
return
@@ -412,16 +412,16 @@ datum
if(15 to 25)
M:drowsyness = max(M:drowsyness, 20)
if(25 to INFINITY)
- M:sleeping = 1
- M:oxyloss = 0
- M:weakened = 0
- M:stunned = 0
- M:paralysis = 0
+ M.sleeping = 1
+ M.oxyloss = 0
+ M.SetWeakened(0)
+ M.SetStunned(0)
+ M.SetParalysis(0)
M.dizziness = 0
- M:drowsyness = 0
- M:stuttering = 0
- M:confused = 0
- M:jitteriness = 0
+ M.drowsyness = 0
+ M.stuttering = 0
+ M.confused = 0
+ M.jitteriness = 0
..()
return
@@ -1228,11 +1228,11 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom ///This can even heal dead people.
- M:cloneloss = 0
- M:oxyloss = 0
- M:radiation = 0
- M:heal_organ_damage(5,5)
- M:adjustToxLoss(-5)
+ M.cloneloss = 0
+ M.setOxyLoss(0)
+ M.radiation = 0
+ M.heal_organ_damage(5,5)
+ M.adjustToxLoss(-5)
if(holder.has_reagent("toxin"))
holder.remove_reagent("toxin", 5)
if(holder.has_reagent("stoxin"))
@@ -1255,23 +1255,23 @@ datum
holder.remove_reagent("carpotoxin", 5)
if(holder.has_reagent("zombiepowder"))
holder.remove_reagent("zombiepowder", 5)
- M:brainloss = 0
+ M.brainloss = 0
M.disabilities = 0
M.sdisabilities = 0
- M:eye_blurry = 0
- M:eye_blind = 0
- M:disabilities &= ~1
- M:sdisabilities &= ~1
- M:weakened = 0
- M:stunned = 0
- M:paralysis = 0
- M:silent = 0
+ M.eye_blurry = 0
+ M.eye_blind = 0
+ M.disabilities &= ~1
+ M.sdisabilities &= ~1
+ M.SetWeakened(0)
+ M.SetStunned(0)
+ M.SetParalysis(0)
+ M.silent = 0
M.dizziness = 0
- M:drowsyness = 0
- M:stuttering = 0
- M:confused = 0
- M:sleeping = 0
- M:jitteriness = 0
+ M.drowsyness = 0
+ M.stuttering = 0
+ M.confused = 0
+ M.sleeping = 0
+ M.jitteriness = 0
for(var/datum/disease/D in M.viruses)
D.spread = "Remissive"
D.stage--
@@ -1290,10 +1290,10 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
M:drowsyness = max(M:drowsyness-5, 0)
- if(M:paralysis) M:paralysis--
- if(M:stunned) M:stunned--
- if(M:weakened) M:weakened--
- if(prob(60)) M:adjustToxLoss(1)
+ M.AdjustParalysis(-1)
+ M.AdjustStunned(-1)
+ M.AdjustWeakened(-1)
+ if(prob(60)) M.adjustToxLoss(1)
..()
return
@@ -1470,10 +1470,10 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
- M:adjustOxyLoss(0.5)
- M:adjustToxLoss(0.5)
- M:weakened = max(M:weakened, 10)
- M:silent = max(M:silent, 10)
+ M.adjustOxyLoss(0.5)
+ M.adjustToxLoss(0.5)
+ M.Weaken(10)
+ M.silent = max(M:silent, 10)
..()
return
@@ -1722,7 +1722,7 @@ datum
M << "\red You're sprayed directly in the eyes with pepperspray!"
M.eye_blurry = max(M.eye_blurry, 5)
M.eye_blind = max(M.eye_blind, 2)
- M:paralysis = max(M:paralysis, 1)
+ M.Paralyse(1)
M.drop_item()
frostoil
@@ -3053,7 +3053,7 @@ datum
color = "#664300" // rgb: 102, 67, 0
on_mob_life(var/mob/living/M as mob)
- M.stunned = 2
+ M.Stun(2)
if(!data) data = 1
data++
M.dizziness +=3
diff --git a/code/modules/chemical/Chemistry-Recipes.dm b/code/modules/chemical/Chemistry-Recipes.dm
index 1b514af0bd2..70ff34f5f64 100644
--- a/code/modules/chemical/Chemistry-Recipes.dm
+++ b/code/modules/chemical/Chemistry-Recipes.dm
@@ -310,7 +310,7 @@ datum
continue
flick("e_flash", M.flash)
- M.weakened = 15
+ M.Weaken(15)
if(4 to 5)
if(hasvar(M, "glasses"))
@@ -318,7 +318,7 @@ datum
continue
flick("e_flash", M.flash)
- M.stunned = 5
+ M.Stun(5)
napalm
name = "Napalm"
diff --git a/code/modules/critters/critters.dm b/code/modules/critters/critters.dm
index d79500fe3fb..9d86cb5bbe3 100644
--- a/code/modules/critters/critters.dm
+++ b/code/modules/critters/critters.dm
@@ -176,7 +176,7 @@
AfterAttack(var/mob/living/target)
if(prob(stunchance))
if(target.weakened <= 0)
- target.weakened += rand(10, 15)
+ target.Weaken(rand(10, 15))
for(var/mob/O in viewers(src, null))
O.show_message("\red [src] knocks down [target]!", 1)
playsound(loc, 'pierce.ogg', 25, 1, -1)
diff --git a/code/modules/mob/living/blob/blob.dm b/code/modules/mob/living/blob/blob.dm
index fa0b312c246..38d848bb9c3 100644
--- a/code/modules/mob/living/blob/blob.dm
+++ b/code/modules/mob/living/blob/blob.dm
@@ -36,12 +36,12 @@
proc/clamp_values()
- stunned = 0
- paralysis = 0
- weakened = 0
+ AdjustStunned(0)
+ AdjustParalysis(0)
+ AdjustWeakened(0)
sleeping = 0
if(stat)
- stat = 0
+ stat = CONSCIOUS
return
diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm
index 1fad304014d..0098c849c01 100644
--- a/code/modules/mob/living/carbon/alien/alien.dm
+++ b/code/modules/mob/living/carbon/alien/alien.dm
@@ -15,4 +15,7 @@
if(facehugger.stat == CONSCIOUS)
var/image/activeIndicator = image('alien.dmi', loc = facehugger, icon_state = "facehugger_active")
activeIndicator.override = 1
- client.images += activeIndicator
\ No newline at end of file
+ client.images += activeIndicator
+
+/mob/living/carbon/alien/IsAdvancedToolUser()
+ return has_fine_manipulation
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm
index d87686c499c..acf23ee4ef0 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm
@@ -76,15 +76,15 @@
health = 150 - (getOxyLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
- if(getOxyLoss() > 50) paralysis = max(paralysis, 3)
+ if(getOxyLoss() > 50) Paralyse(3)
if(src.sleeping)
- src.paralysis = max(src.paralysis, 3)
+ Paralyse(3)
if (prob(10) && health) spawn(0) emote("snore")
src.sleeping--
if(src.resting)
- src.weakened = max(src.weakened, 5)
+ Weaken(5)
if(health < config.health_threshold_dead || src.brain_op_stage == 4.0)
death()
@@ -95,20 +95,20 @@
if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss++
if(src.stat != 2) src.stat = 1
- src.paralysis = max(src.paralysis, 5)
+ Paralyse(5)
if (src.stat != 2) //Alive.
if (src.paralysis || src.stunned || src.weakened) //Stunned etc.
if (src.stunned > 0)
- src.stunned--
+ AdjustStunned(-1)
src.stat = 0
if (src.weakened > 0)
- src.weakened--
+ AdjustWeakened(-1)
src.lying = 1
src.stat = 0
if (src.paralysis > 0)
- src.paralysis--
+ AdjustParalysis(-1)
src.blinded = 1
src.lying = 1
src.stat = 1
@@ -186,7 +186,7 @@
if(M in stomach_contents)
stomach_contents.Remove(M)
M.loc = loc
- M.paralysis += 10
+ Paralyse(10)
for(var/mob/O in viewers(src, null))
O.show_message(text("\green [src] hurls out the contents of their stomach!"), 1)
return
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm
index 615db5677ef..ec631e76990 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm
@@ -77,15 +77,15 @@
health = 150 - (getOxyLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
- if(getOxyLoss() > 50) paralysis = max(paralysis, 3)
+ if(getOxyLoss() > 50) Paralyse(3)
if(src.sleeping)
- src.paralysis = max(src.paralysis, 3)
+ Paralyse(3)
if (prob(10) && health) spawn(0) emote("snore")
src.sleeping--
if(src.resting)
- src.weakened = max(src.weakened, 5)
+ Weaken(5)
if(health < config.health_threshold_dead || src.brain_op_stage == 4.0)
death()
@@ -96,20 +96,20 @@
if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss++
if(src.stat != 2) src.stat = 1
- src.paralysis = max(src.paralysis, 5)
+ Paralyse(5)
if (src.stat != 2) //Alive.
if (src.paralysis || src.stunned || src.weakened) //Stunned etc.
if (src.stunned > 0)
- src.stunned--
+ AdjustStunned(-1)
src.stat = 0
if (src.weakened > 0)
- src.weakened--
+ AdjustWeakened(-1)
src.lying = 1
src.stat = 0
if (src.paralysis > 0)
- src.paralysis--
+ AdjustParalysis(-1)
src.blinded = 1
src.lying = 1
src.stat = 1
diff --git a/code/modules/mob/living/carbon/alien/humanoid/emote.dm b/code/modules/mob/living/carbon/alien/humanoid/emote.dm
index 83a8576f397..179406c1e0e 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/emote.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/emote.dm
@@ -89,7 +89,7 @@
message = "The [src.name] jumps!"
m_type = 1
if("collapse")
- if (!src.paralysis) src.paralysis += 2
+ Paralyse(2)
message = text("[] collapses!", src)
m_type = 2
if("help")
diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
index 7ba7d8222c1..25b9aca8cef 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
@@ -117,7 +117,7 @@
if(3.0)
b_loss += 30
if (prob(50) && !shielded)
- paralysis += 1
+ Paralyse(1)
ear_damage += 15
ear_deaf += 60
@@ -541,12 +541,10 @@
if ((O.client && !( O.blinded )))
O.show_message(text("\red The [M.name] has shocked []!", src), 1)
- if (weakened < power)
- weakened = power
+ Weaken(power)
if (stuttering < power)
stuttering = power
- if (stunned < power)
- stunned = power
+ Stun(power)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
@@ -576,12 +574,12 @@
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
if(M.gloves.cell.charge >= 2500)
M.gloves.cell.charge -= 2500
- if (weakened < 5)
- weakened = 5
+
+ Weaken(5)
if (stuttering < 5)
stuttering = 5
- if (stunned < 5)
- stunned = 5
+ Stun(5)
+
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message("\red [src] has been touched with the stun gloves by [M]!", 1, "\red You hear someone fall.", 2)
@@ -638,7 +636,7 @@
if (M.mutations & HULK)//HULK SMASH
damage += 14
spawn(0)
- paralysis += 5
+ Paralyse(5)
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
@@ -647,8 +645,7 @@
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has punched []!", M, src), 1)
if (damage > 9||prob(5))//Regular humans have a very small chance of weakening an alien.
- if (weakened < 10)
- weakened = rand(1,5)
+ Weaken(1,5)
for(var/mob/O in viewers(M, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has weakened []!", M, src), 1, "\red You hear someone fall.", 2)
@@ -662,15 +659,14 @@
if ("disarm")
if (!lying)
- var/randn = rand(1, 100)
- if (randn <= 5)//Very small chance to push an alien down.
- weakened = 2
+ if (prob(5))//Very small chance to push an alien down.
+ Weaken(2)
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has pushed down []!", M, src), 1)
else
- if (randn <= 50)
+ if (prob(50))
drop_item()
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
@@ -704,9 +700,9 @@ In all, this is a lot like the monkey code. /N
if ("help")
sleeping = 0
resting = 0
- if (paralysis >= 3) paralysis -= 3
- if (stunned >= 3) stunned -= 3
- if (weakened >= 3) weakened -= 3
+ AdjustParalysis(-3)
+ AdjustStunned(-3)
+ AdjustWeakened(-3)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M.name] nuzzles [] trying to wake it up!", src), 1)
diff --git a/code/modules/mob/living/carbon/alien/humanoid/life.dm b/code/modules/mob/living/carbon/alien/humanoid/life.dm
index d0eb999b370..2fa384d722f 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/life.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/life.dm
@@ -80,9 +80,9 @@
proc
clamp_values()
- stunned = max(min(stunned, 20),0)
- paralysis = max(min(paralysis, 20), 0)
- weakened = max(min(weakened, 20), 0)
+ SetStunned(min(stunned, 20))
+ SetParalysis(min(paralysis, 20))
+ SetWeakened(min(weakened, 20))
sleeping = max(min(sleeping, 20), 0)
adjustBruteLoss(0)
adjustToxLoss(0)
@@ -95,7 +95,7 @@
if (src.disabilities & 2)
if ((prob(1) && src.paralysis < 10 && src.r_epil < 1))
src << "\red You have a seizure!"
- src.paralysis = max(10, src.paralysis)
+ Paralyse(10)
if (src.disabilities & 4)
if ((prob(5) && src.paralysis <= 1 && src.r_ch_cou < 1))
src.drop_item()
@@ -104,7 +104,7 @@
return
if (src.disabilities & 8)
if ((prob(10) && src.paralysis <= 1 && src.r_Tourette < 1))
- src.stunned = max(10, src.stunned)
+ Stun(10)
spawn( 0 )
emote("twitch")
return
@@ -132,13 +132,13 @@
if (src.mutations & HULK && src.health <= 25)
src.mutations &= ~HULK
src << "\red You suddenly feel very weak."
- src.weakened = 3
+ Weaken(3)
emote("collapse")
if (src.radiation)
if (src.radiation > 100)
src.radiation = 100
- src.weakened = 10
+ Weaken(10)
src << "\red You feel weak."
emote("collapse")
@@ -157,7 +157,7 @@
src.adjustToxLoss(1)
if(prob(5))
src.radiation -= 5
- src.weakened = 3
+ Weaken(3)
src << "\red You feel weak."
emote("collapse")
src.updatehealth()
@@ -377,7 +377,7 @@
src.eye_blurry = max(2, src.eye_blurry)
if (prob(5))
src.sleeping = 1
- src.paralysis = 5
+ src.Paralyse(5)
confused = max(0, confused - 1)
// decrement dizziness counter, clamped to 0
@@ -396,15 +396,15 @@
health = 100 - (getOxyLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
- if(getOxyLoss() > 50) paralysis = max(paralysis, 3)
+ if(getOxyLoss() > 50) Paralyse(3)
if(src.sleeping)
- src.paralysis = max(src.paralysis, 3)
+ Paralyse(3)
if (prob(10) && health) spawn(0) emote("snore")
src.sleeping--
if(src.resting)
- src.weakened = max(src.weakened, 5)
+ Weaken(5)
if(health < config.health_threshold_dead || src.brain_op_stage == 4.0)
death()
@@ -415,20 +415,20 @@
if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss++
if(src.stat != 2) src.stat = 1
- src.paralysis = max(src.paralysis, 5)
+ Paralyse(5)
if (src.stat != 2) //Alive.
if (src.paralysis || src.stunned || src.weakened) //Stunned etc.
if (src.stunned > 0)
- src.stunned--
+ AdjustStunned(-1)
src.stat = 0
if (src.weakened > 0)
- src.weakened--
+ AdjustWeakened(-1)
src.lying = 1
src.stat = 0
if (src.paralysis > 0)
- src.paralysis--
+ AdjustParalysis(-1)
src.blinded = 1
src.lying = 1
src.stat = 1
diff --git a/code/modules/mob/living/carbon/alien/humanoid/queen.dm b/code/modules/mob/living/carbon/alien/humanoid/queen.dm
index 99cd26a4b01..e408f676b4f 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/queen.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/queen.dm
@@ -78,15 +78,15 @@
health = 250 - (getOxyLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
- if(getOxyLoss() > 50) paralysis = max(paralysis, 3)
+ if(getOxyLoss() > 50) Paralyse(3)
if(src.sleeping)
- src.paralysis = max(src.paralysis, 3)
+ Paralyse(3)
if (prob(10) && health) spawn(0) emote("snore")
src.sleeping--
if(src.resting)
- src.weakened = max(src.weakened, 5)
+ Weaken(5)
if(health < config.health_threshold_dead || src.brain_op_stage == 4.0)
death()
@@ -97,20 +97,20 @@
if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss++
if(src.stat != 2) src.stat = 1
- src.paralysis = max(src.paralysis, 5)
+ Paralyse(5)
if (src.stat != 2) //Alive.
if (src.paralysis || src.stunned || src.weakened) //Stunned etc.
if (src.stunned > 0)
- src.stunned--
+ AdjustStunned(-1)
src.stat = 0
if (src.weakened > 0)
- src.weakened--
+ AdjustWeakened(-1)
src.lying = 1
src.stat = 0
if (src.paralysis > 0)
- src.paralysis--
+ AdjustParalysis(-1)
src.blinded = 1
src.lying = 1
src.stat = 1
diff --git a/code/modules/mob/living/carbon/alien/larva/emote.dm b/code/modules/mob/living/carbon/alien/larva/emote.dm
index a01cadc361d..a7000423f68 100644
--- a/code/modules/mob/living/carbon/alien/larva/emote.dm
+++ b/code/modules/mob/living/carbon/alien/larva/emote.dm
@@ -86,7 +86,7 @@
message = "The [src.name] jumps!"
m_type = 1
if("collapse")
- if (!src.paralysis) src.paralysis += 2
+ Paralyse(2)
message = text("[] collapses!", src)
m_type = 2
if("help")
diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm
index 68dca06b1f7..1ea89f9a219 100644
--- a/code/modules/mob/living/carbon/alien/larva/larva.dm
+++ b/code/modules/mob/living/carbon/alien/larva/larva.dm
@@ -105,7 +105,7 @@
if(3.0)
b_loss += 30
if (prob(50))
- paralysis += 1
+ Paralyse(1)
ear_damage += 15
ear_deaf += 60
@@ -356,12 +356,12 @@
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
if(M.gloves.cell.charge >= 2500)
M.gloves.cell.charge -= 2500
- if (weakened < 5)
- weakened = 5
+
+ Weaken(5)
if (stuttering < 5)
stuttering = 5
- if (stunned < 5)
- stunned = 5
+ Stun(5)
+
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message("\red [src] has been touched with the stun gloves by [M]!", 1, "\red You hear someone fall.", 2)
@@ -418,7 +418,7 @@
if (M.mutations & HULK)
damage += 5
spawn(0)
- paralysis += 1
+ Paralyse(1)
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
@@ -427,8 +427,7 @@
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has punched []!", M, src), 1)
if (damage > 4.9)
- if (weakened < 10)
- weakened = rand(10, 15)
+ Weaken(rand(10,15))
for(var/mob/O in viewers(M, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has weakened []!", M, src), 1, "\red You hear someone fall.", 2)
@@ -457,9 +456,9 @@
if ("help")
sleeping = 0
resting = 0
- if (paralysis >= 3) paralysis -= 3
- if (stunned >= 3) stunned -= 3
- if (weakened >= 3) weakened -= 3
+ AdjustParalysis(-3)
+ AdjustStunned(-3)
+ AdjustWeakened(-3)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M.name] nuzzles [] trying to wake it up!", src), 1)
diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm
index 947ee5459be..66bab04a2fb 100644
--- a/code/modules/mob/living/carbon/alien/larva/life.dm
+++ b/code/modules/mob/living/carbon/alien/larva/life.dm
@@ -78,9 +78,9 @@
proc
clamp_values()
- stunned = max(min(stunned, 20),0)
- paralysis = max(min(paralysis, 20), 0)
- weakened = max(min(weakened, 20), 0)
+ SetStunned(min(stunned, 20))
+ SetParalysis(min(paralysis, 20))
+ SetWeakened(min(weakened, 20))
sleeping = max(min(sleeping, 20), 0)
handle_mutations_and_radiation()
@@ -114,7 +114,7 @@
if (radiation)
if (radiation > 100)
radiation = 100
- weakened = 10
+ Weaken(10)
src << "\red You feel weak."
emote("collapse")
@@ -133,7 +133,7 @@
adjustToxLoss(1)
if(prob(5))
radiation -= 5
- weakened = 3
+ Weaken(3)
src << "\red You feel weak."
emote("collapse")
updatehealth()
@@ -302,7 +302,7 @@
eye_blurry = max(2, eye_blurry)
if (prob(5))
sleeping = 1
- paralysis = 5
+ Paralyse(5)
confused = max(0, confused - 1)
// decrement dizziness counter, clamped to 0
@@ -321,15 +321,15 @@
health = 25 - (getOxyLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
- if(getOxyLoss() > 50) paralysis = max(paralysis, 3)
+ if(getOxyLoss() > 50) Paralyse(3)
if(sleeping)
- paralysis = max(paralysis, 3)
+ Paralyse(3)
if (prob(10) && health) spawn(0) emote("snore")
sleeping--
if(resting)
- weakened = max(weakened, 5)
+ Weaken(5)
if(health < config.health_threshold_dead || brain_op_stage == 4.0)
death()
@@ -340,20 +340,20 @@
if(!reagents.has_reagent("inaprovaline")) oxyloss++
if(stat != 2) stat = 1
- paralysis = max(paralysis, 5)
+ Paralyse(5)
if (stat != 2) //Alive.
if (paralysis || stunned || weakened) //Stunned etc.
if (stunned > 0)
- stunned--
+ AdjustStunned(-1)
stat = 0
if (weakened > 0)
- weakened--
+ AdjustWeakened(-1)
lying = 1
stat = 0
if (paralysis > 0)
- paralysis--
+ AdjustParalysis(-1)
blinded = 1
lying = 1
stat = 1
diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm
index 89f8ad88694..67ed50b1702 100644
--- a/code/modules/mob/living/carbon/brain/life.dm
+++ b/code/modules/mob/living/carbon/brain/life.dm
@@ -42,9 +42,9 @@
clamp_values()
- stunned = max(stunned,0)
- paralysis = max(paralysis, 0)
- weakened = max(weakened, 0)
+ AdjustParalysis(0)
+ AdjustStunned(0)
+ AdjustWeakened(0)
adjustBruteLoss(0)
adjustFireLoss(0)
adjustOxyLoss(0)
@@ -55,7 +55,7 @@
if (radiation)
if (radiation > 100)
radiation = 100
- weakened = 10
+ Weaken(10)
src << "\red You feel weak."
switch(radiation)
@@ -70,7 +70,7 @@
adjustToxLoss(1)
if(prob(5))
radiation -= 5
- weakened = 3
+ Weaken(3)
src << "\red You feel weak."
// emote("collapse")
updatehealth()
@@ -139,7 +139,7 @@
eye_blurry = max(2, eye_blurry)
if (prob(5))
sleeping = 1
- paralysis = 5
+ Paralyse(5)
confused = max(0, confused - 1)
// decrement dizziness counter, clamped to 0
@@ -156,14 +156,14 @@
health = 100 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
- if(getOxyLoss() > 25) paralysis = max(paralysis, 3)
+ if(getOxyLoss() > 25) Paralyse(3)
if(sleeping)
- paralysis = max(paralysis, 5)
+ Paralyse(5)
if (prob(1) && health) spawn(0) emote("snore")
if(resting)
- weakened = max(weakened, 5)
+ Weaken(5)
if(stat != 2 && (!container && (health < config.health_threshold_dead || (config.revival_brain_life >= 0 && ((world.time - timeofhostdeath) > config.revival_brain_life )))))
death()
@@ -174,20 +174,20 @@
if(!reagents.has_reagent("inaprovaline")) oxyloss++
if(stat != 2) stat = 1
- paralysis = max(paralysis, 5)
+ Paralyse(5)
if (stat != 2) //Alive.
if (paralysis || stunned || weakened) //Stunned etc.
if (stunned > 0)
- stunned--
+ AdjustStunned(-1)
stat = 0
if (weakened > 0)
- weakened--
+ AdjustWeakened(-1)
lying = 1
stat = 0
if (paralysis > 0)
- paralysis--
+ AdjustParalysis(-1)
blinded = 1
lying = 1
stat = 1
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 935467a53cc..0517e6c414a 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -134,9 +134,9 @@
"\red You hear a heavy electrical crack." \
)
// if(src.stunned < shock_damage) src.stunned = shock_damage
- src.stunned = max(src.stunned,10)//This should work for now, more is really silly and makes you lay there forever
+ Stun(10)//This should work for now, more is really silly and makes you lay there forever
// if(src.weakened < 20*siemens_coeff) src.weakened = 20*siemens_coeff
- src.weakened = max(src.weakened,10)
+ Weaken(10)
return shock_damage
@@ -166,9 +166,9 @@
H.w_uniform.add_fingerprint(M)
src.sleeping = 0
src.resting = 0
- if (src.paralysis >= 3) src.paralysis -= 3
- if (src.stunned >= 3) src.stunned -= 3
- if (src.weakened >= 3) src.weakened -= 3
+ AdjustParalysis(-3)
+ AdjustStunned(-3)
+ AdjustWeakened(-3)
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
M.visible_message( \
"\blue [M] shakes [src] trying to wake [t_him] up!", \
diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm
index 4be5616d753..702e771e03e 100644
--- a/code/modules/mob/living/carbon/human/emote.dm
+++ b/code/modules/mob/living/carbon/human/emote.dm
@@ -393,8 +393,7 @@
m_type = 2
if ("collapse")
- if (!src.paralysis)
- src.paralysis += 2
+ Paralyse(2)
message = "[src] collapses!"
m_type = 2
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index c7c83bd5349..b28f782cd35 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -265,7 +265,7 @@
ear_damage += 15
ear_deaf += 60
if (prob(50) && !shielded)
- paralysis += 10
+ Paralyse(10)
for(var/datum/organ/external/temp in organs)
switch(temp.name)
@@ -1154,12 +1154,10 @@
if ((O.client && !( O.blinded )))
O.show_message(text("\red The [M.name] has shocked []!", src), 1)
- if (weakened < power)
- weakened = power
+ Weaken(power)
if (stuttering < power)
stuttering = power
- if (stunned < power)
- stunned = power
+ Stun(power)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
@@ -2226,3 +2224,18 @@ It can still be worn/put on as normal.
take_overall_damage(0, amount)
else
heal_overall_damage(0, -amount)
+
+/mob/living/carbon/human/Stun(amount)
+ if(mutations & HULK)
+ return
+ ..()
+
+/mob/living/carbon/human/Weaken(amount)
+ if(mutations & HULK)
+ return
+ ..()
+
+/mob/living/carbon/human/Paralyse(amount)
+ if(mutations & HULK)
+ return
+ ..()
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/human/human_attackalien.dm b/code/modules/mob/living/carbon/human/human_attackalien.dm
index 66ecc32aa12..1b8e5a1ef1a 100644
--- a/code/modules/mob/living/carbon/human/human_attackalien.dm
+++ b/code/modules/mob/living/carbon/human/human_attackalien.dm
@@ -54,8 +54,7 @@
var/randn = rand(1, 100)
if (randn <= 90)
playsound(loc, 'pierce.ogg', 25, 1, -1)
- if (weakened < 15)
- weakened = rand(10, 15)
+ Weaken(rand(15,20))
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has tackled down []!", M, src), 1)
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index 18562bad8af..68354e7d2ac 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -98,9 +98,9 @@
proc
clamp_values()
- stunned = max(min(stunned, 20),0)
- paralysis = max(min(paralysis, 20), 0)
- weakened = max(min(weakened, 20), 0)
+ SetStunned(min(stunned, 20))
+ SetParalysis(min(paralysis, 20))
+ SetWeakened(min(weakened, 20))
sleeping = max(min(sleeping, 20), 0)
adjustBruteLoss(0)
adjustToxLoss(0)
@@ -126,7 +126,7 @@
if(O == src)
continue
O.show_message(text("\red [src] starts having a seizure!"), 1)
- paralysis = max(10, paralysis)
+ Paralyse(10)
make_jittery(1000)
if (disabilities & 4)
if ((prob(5) && paralysis <= 1 && r_ch_cou < 1))
@@ -136,7 +136,7 @@
return
if (disabilities & 8)
if ((prob(10) && paralysis <= 1 && r_Tourette < 1))
- stunned = max(10, stunned)
+ Stun(10)
spawn( 0 )
switch(rand(1, 3))
if(1)
@@ -160,7 +160,7 @@
if(1)
say(pick("IM A PONY NEEEEEEIIIIIIIIIGH", "without oxigen blob don't evoluate?", "CAPTAINS A COMDOM", "[pick("", "that faggot traitor")] [pick("joerge", "george", "gorge", "gdoruge")] [pick("mellens", "melons", "mwrlins")] is grifing me HAL;P!!!", "can u give me [pick("telikesis","halk","eppilapse")]?", "THe saiyans screwed", "Bi is THE BEST OF BOTH WORLDS>", "I WANNA PET TEH monkeyS", "stop grifing me!!!!", "SOTP IT#"))
if(2)
- say(pick("fucking 4rries!", "stat me", ">my face", "roll it easy!", "waaaaaagh!!!", "red wonz go fasta", "FOR TEH EMPRAH", "lol2cat", "dem dwarfs man, dem dwarfs", "SPESS MAHREENS", "hwee did eet fhor khayosss", "lifelike texture ;_;", "luv can bloooom"))
+ say(pick("FUS RO DAH","fucking 4rries!", "stat me", ">my face", "roll it easy!", "waaaaaagh!!!", "red wonz go fasta", "FOR TEH EMPRAH", "lol2cat", "dem dwarfs man, dem dwarfs", "SPESS MAHREENS", "hwee did eet fhor khayosss", "lifelike texture ;_;", "luv can bloooom"))
if(3)
emote("drool")
@@ -173,13 +173,13 @@
if (mutations & HULK && health <= 25)
mutations &= ~HULK
src << "\red You suddenly feel very weak."
- weakened = 3
+ Weaken(3)
emote("collapse")
if (radiation)
if (radiation > 100)
radiation = 100
- weakened = 10
+ Weaken(10)
src << "\red You feel weak."
emote("collapse")
@@ -198,7 +198,7 @@
adjustToxLoss(1)
if(prob(5))
radiation -= 5
- weakened = 3
+ Weaken(3)
src << "\red You feel weak."
emote("collapse")
updatehealth()
@@ -357,7 +357,7 @@
if(!co2overloadtime) // If it's the first breath with too much CO2 in it, lets start a counter, then have them pass out after 12s or so.
co2overloadtime = world.time
else if(world.time - co2overloadtime > 120)
- paralysis = max(paralysis, 3)
+ Paralyse(3)
oxyloss += 3 // Lets hurt em a little, let them know we mean business
if(world.time - co2overloadtime > 300) // They've been in here 30s now, lets start to kill them for their own good!
oxyloss += 8
@@ -378,7 +378,7 @@
for(var/datum/gas/sleeping_agent/SA in breath.trace_gases)
var/SA_pp = (SA.moles/breath.total_moles())*breath_pressure
if(SA_pp > SA_para_min) // Enough to make us paralysed for a bit
- paralysis = max(paralysis, 3) // 3 gives them one second to wake up and run away a bit!
+ Paralyse(3) // 3 gives them one second to wake up and run away a bit!
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
sleeping = max(sleeping, 2)
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
@@ -643,7 +643,7 @@
eye_blurry = max(2, eye_blurry)
if (prob(5))
sleeping = 1
- paralysis = 5
+ Paralyse(5)
confused = max(0, confused - 1)
// decrement dizziness counter, clamped to 0
@@ -662,15 +662,15 @@
// health = 100 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
- if(getOxyLoss() > 50) paralysis = max(paralysis, 3)
+ if(getOxyLoss() > 50) Paralyse(3)
if(sleeping)
- paralysis = max(paralysis, 3)
+ Paralyse(3)
if (prob(10) && health) spawn(0) emote("snore")
sleeping--
if(resting)
- weakened = max(weakened, 3)
+ Weaken(3)
if(health < config.health_threshold_dead || brain_op_stage == 4.0)
death()
@@ -681,7 +681,7 @@
if(!reagents.has_reagent("inaprovaline")) oxyloss++
if(stat != 2) stat = 1
- paralysis = max(paralysis, 5)
+ Paralyse(5)
if (stat != 2) //Alive.
if (silent)
@@ -689,14 +689,14 @@
if (paralysis || stunned || weakened || (changeling && changeling.changeling_fakedeath)) //Stunned etc.
if (stunned > 0)
- stunned--
+ AdjustStunned(-1)
stat = 0
if (weakened > 0)
- weakened--
+ AdjustWeakened(-1)
lying = 1
stat = 0
if (paralysis > 0)
- paralysis--
+ AdjustParalysis(-1)
blinded = 1
lying = 1
stat = 1
diff --git a/code/modules/mob/living/carbon/metroid/life.dm b/code/modules/mob/living/carbon/metroid/life.dm
index 251dbbbc5e6..8cc12f2c5ae 100644
--- a/code/modules/mob/living/carbon/metroid/life.dm
+++ b/code/modules/mob/living/carbon/metroid/life.dm
@@ -413,7 +413,7 @@
//if(!src.rejuv) src.oxyloss++
if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss+=10
- if(src.stat != 2) src.stat = 1
+ if(src.stat != DEAD) src.stat = UNCONSCIOUS
if(prob(30))
if(getOxyLoss()>0) oxyloss = max(getOxyLoss()-1, 0)
@@ -423,23 +423,22 @@
if(getBruteLoss()>0) bruteloss = max(getBruteLoss()-1,0)
- if (src.stat == 2)
+ if (src.stat == DEAD)
src.lying = 1
src.blinded = 1
- src.stat = 2
else
if (src.paralysis || src.stunned || src.weakened || (changeling && changeling.changeling_fakedeath)) //Stunned etc.
if (src.stunned > 0)
- src.stunned = 0
+ AdjustStunned(-1)
src.stat = 0
if (src.weakened > 0)
- src.weakened = 0
+ AdjustWeakened(-1)
src.lying = 0
src.stat = 0
if (src.paralysis > 0)
- src.paralysis = 0
+ AdjustParalysis(-1)
src.blinded = 0
src.lying = 0
src.stat = 0
diff --git a/code/modules/mob/living/carbon/monkey/emote.dm b/code/modules/mob/living/carbon/monkey/emote.dm
index 37d64603352..6f26f53e81e 100644
--- a/code/modules/mob/living/carbon/monkey/emote.dm
+++ b/code/modules/mob/living/carbon/monkey/emote.dm
@@ -86,7 +86,7 @@
message = "The [src.name] jumps!"
m_type = 1
if("collapse")
- if (!src.paralysis) src.paralysis += 2
+ Paralyse(2)
message = text("[] collapses!", src)
m_type = 2
if("deathgasp")
diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm
index 5176b918f53..3b7ac133e5d 100644
--- a/code/modules/mob/living/carbon/monkey/life.dm
+++ b/code/modules/mob/living/carbon/monkey/life.dm
@@ -90,16 +90,16 @@
clamp_values()
- stunned = max(stunned,0)
- paralysis = max(paralysis, 0)
- weakened = max(weakened, 0)
+ AdjustStunned(0)
+ AdjustParalysis(0)
+ AdjustWeakened(0)
handle_disabilities()
if (src.disabilities & 2)
if ((prob(1) && src.paralysis < 10 && src.r_epil < 1))
src << "\red You have a seizure!"
- src.paralysis = max(10, src.paralysis)
+ Paralyse(10)
if (src.disabilities & 4)
if ((prob(5) && src.paralysis <= 1 && src.r_ch_cou < 1))
src.drop_item()
@@ -108,7 +108,7 @@
return
if (src.disabilities & 8)
if ((prob(10) && src.paralysis <= 1 && src.r_Tourette < 1))
- src.stunned = max(10, src.stunned)
+ Stun(10)
spawn( 0 )
emote("twitch")
return
@@ -135,13 +135,13 @@
if (src.mutations & HULK && src.health <= 25)
src.mutations &= ~HULK
src << "\red You suddenly feel very weak."
- src.weakened = 3
+ Weaken(3)
emote("collapse")
if (src.radiation)
if (src.radiation > 100)
src.radiation = 100
- src.weakened = 10
+ Weaken(10)
src << "\red You feel weak."
emote("collapse")
@@ -157,7 +157,7 @@
src.adjustToxLoss(1)
if(prob(5))
src.radiation -= 5
- src.weakened = 3
+ Weaken(3)
src << "\red You feel weak."
emote("collapse")
src.updatehealth()
@@ -304,7 +304,7 @@
if(!co2overloadtime) // If it's the first breath with too much CO2 in it, lets start a counter, then have them pass out after 12s or so.
co2overloadtime = world.time
else if(world.time - co2overloadtime > 120)
- src.paralysis = max(src.paralysis, 3)
+ Paralyse(3)
oxyloss += 3 // Lets hurt em a little, let them know we mean business
if(world.time - co2overloadtime > 300) // They've been in here 30s now, lets start to kill them for their own good!
oxyloss += 8
@@ -325,7 +325,7 @@
for(var/datum/gas/sleeping_agent/SA in breath.trace_gases)
var/SA_pp = (SA.moles/breath.total_moles())*breath_pressure
if(SA_pp > SA_para_min) // Enough to make us paralysed for a bit
- src.paralysis = max(src.paralysis, 3) // 3 gives them one second to wake up and run away a bit!
+ Paralyse(3) // 3 gives them one second to wake up and run away a bit!
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
src.sleeping = max(src.sleeping, 2)
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
@@ -387,7 +387,7 @@
src.eye_blurry = max(2, src.eye_blurry)
if (prob(5))
src.sleeping = 1
- src.paralysis = 5
+ Paralyse(5)
confused = max(0, confused - 1)
// decrement dizziness counter, clamped to 0
@@ -404,14 +404,14 @@
health = 100 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
- if(getOxyLoss() > 25) paralysis = max(paralysis, 3)
+ if(getOxyLoss() > 25) Paralyse(3)
if(src.sleeping)
- src.paralysis = max(src.paralysis, 5)
+ Paralyse(5)
if (prob(1) && health) spawn(0) emote("snore")
if(src.resting)
- src.weakened = max(src.weakened, 5)
+ Weaken(5)
if(health < config.health_threshold_dead && stat != 2)
death()
@@ -422,20 +422,20 @@
if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss++
if(src.stat != 2) src.stat = 1
- src.paralysis = max(src.paralysis, 5)
+ Paralyse(5)
if (src.stat != 2) //Alive.
if (src.paralysis || src.stunned || src.weakened || (changeling && changeling.changeling_fakedeath)) //Stunned etc.
if (src.stunned > 0)
- src.stunned--
+ AdjustStunned(-1)
src.stat = 0
if (src.weakened > 0)
- src.weakened--
+ AdjustWeakened(-1)
src.lying = 1
src.stat = 0
if (src.paralysis > 0)
- src.paralysis--
+ AdjustParalysis(-1)
src.blinded = 1
src.lying = 1
src.stat = 1
diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm
index 80546dc07fd..34ad5c6f464 100644
--- a/code/modules/mob/living/carbon/monkey/monkey.dm
+++ b/code/modules/mob/living/carbon/monkey/monkey.dm
@@ -161,12 +161,11 @@
if(M.a_intent == "hurt")
if(M.gloves.cell.charge >= 2500)
M.gloves.cell.charge -= 2500
- if (weakened < 5)
- weakened = 5
+ Weaken(5)
if (stuttering < 5)
stuttering = 5
- if (stunned < 5)
- stunned = 5
+ Stun(5)
+
for(var/mob/O in viewers(src, null))
if (O.client)
O.show_message("\red [src] has been touched with the stun gloves by [M]!", 1, "\red You hear someone fall", 2)
@@ -189,7 +188,7 @@
if (prob(40))
damage = rand(10, 15)
if (paralysis < 5)
- paralysis = rand(10, 15)
+ Paralyse(rand(10, 15))
spawn( 0 )
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
@@ -226,7 +225,7 @@
else
if (!( paralysis ))
if (prob(25))
- paralysis = 2
+ Paralyse(2)
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
@@ -261,7 +260,7 @@
if (damage >= 25)
damage = rand(20, 40)
if (paralysis < 15)
- paralysis = rand(10, 15)
+ Paralyse(rand(10, 15))
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has wounded [name]!", M), 1)
@@ -301,7 +300,7 @@
playsound(loc, 'pierce.ogg', 25, 1, -1)
var/damage = 5
if(prob(95))
- weakened = rand(10, 15)
+ Weaken(rand(10,15))
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has tackled down [name]!", M), 1)
@@ -359,12 +358,10 @@
if ((O.client && !( O.blinded )))
O.show_message(text("\red The [M.name] has shocked []!", src), 1)
- if (weakened < power)
- weakened = power
+ Weaken(power)
if (stuttering < power)
stuttering = power
- if (stunned < power)
- stunned = power
+ Stun(power)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
@@ -548,7 +545,7 @@
adjustBruteLoss(30)
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
if (prob(50))
- paralysis += 10
+ Paralyse(10)
else
return
@@ -557,7 +554,7 @@
adjustFireLoss(60)
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
if (prob(50))
- paralysis += 10
+ Paralyse(10)
/obj/effect/equip_e/monkey/process()
if (item)
diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm
index a22e7ade174..ec814720a80 100644
--- a/code/modules/mob/living/damage_procs.dm
+++ b/code/modules/mob/living/damage_procs.dm
@@ -42,11 +42,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)
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index c870f6ee482..df6e2e0d1aa 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -138,14 +138,14 @@
src.setToxLoss(0)
//src.bruteloss = 0
src.setOxyLoss(0)
- src.paralysis = 0
- src.stunned = 0
- src.weakened =0
+ SetParalysis(0)
+ SetStunned(0)
+ SetWeakened(0)
//src.health = 100
src.heal_overall_damage(1000, 1000)
src.buckled = initial(src.buckled)
src.handcuffed = initial(src.handcuffed)
- if(src.stat > 1) src.stat=0
+ if(src.stat > 1) src.stat = CONSCIOUS
..()
return
diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm
index 225e160070e..4c180012a39 100644
--- a/code/modules/mob/living/living_defense.dm
+++ b/code/modules/mob/living/living_defense.dm
@@ -41,7 +41,7 @@
if(C && C.active)
C.attack_self(src)//Should shut it off
src << "\blue Your [C.name] was disrupted!"
- stunned = max(stunned, 2)
+ Stun(2)
var/absorb = run_armor_check(def_zone, P.flag)
if(absorb >= 2)
diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm
index 945edea29f7..2ee69c5746e 100644
--- a/code/modules/mob/living/silicon/robot/life.dm
+++ b/code/modules/mob/living/silicon/robot/life.dm
@@ -30,9 +30,9 @@
proc
clamp_values()
- stunned = max(min(stunned, 30),0)
- paralysis = max(min(paralysis, 30), 0)
- weakened = max(min(weakened, 20), 0)
+ SetStunned(min(stunned, 30))
+ SetParalysis(min(paralysis, 30))
+ SetWeakened(min(weakened, 20))
sleeping = 0
adjustBruteLoss(0)
adjustToxLoss(0)
@@ -89,14 +89,14 @@
health = 200 - (getOxyLoss() + getFireLoss() + getBruteLoss())
- if(getOxyLoss() > 50) paralysis = max(paralysis, 3)
+ if(getOxyLoss() > 50) Paralyse(3)
if(src.sleeping)
- src.paralysis = max(src.paralysis, 3)
+ Paralyse(3)
src.sleeping--
if(src.resting)
- src.weakened = max(src.weakened, 5)
+ Weaken(5)
if(health < config.health_threshold_dead && src.stat != 2) //die only once
death()
@@ -105,11 +105,11 @@
if (src.paralysis || src.stunned || src.weakened) //Stunned etc.
src.stat = 1
if (src.stunned > 0)
- src.stunned--
+ AdjustStunned(-1)
if (src.weakened > 0)
- src.weakened--
+ AdjustWeakened(-1)
if (src.paralysis > 0)
- src.paralysis--
+ AdjustParalysis(-1)
src.blinded = 1
else
src.blinded = 0
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index a1f388bafd8..4d8c83defaa 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -503,9 +503,8 @@
if ("disarm")
if(!(lying))
- var/randn = rand(1, 100)
- if (randn <= 85)
- stunned = 5
+ if (rand(1,100) <= 85)
+ Stun(5)
step(src,get_dir(M,src))
spawn(5) step(src,get_dir(M,src))
playsound(loc, 'pierce.ogg', 50, 1, -1)
diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm
index 111623b1316..9ae9d586221 100644
--- a/code/modules/mob/living/silicon/silicon.dm
+++ b/code/modules/mob/living/silicon/silicon.dm
@@ -11,10 +11,10 @@
switch(severity)
if(1)
src.take_organ_damage(40)
- src.stunned = max(src.stunned,rand(5,10))
+ Stun(rand(5,10))
if(2)
src.take_organ_damage(20)
- src.stunned = max(src.stunned,rand(1,5))
+ Stun(rand(1,5))
flick("noise", src:flash)
src << "\red *BZZZT*"
src << "\red Warning: Electromagnetic pulse detected."
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 087bf09b1b9..7422137256b 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -1021,4 +1021,38 @@ note dizziness decrements automatically in the mob's Life() proc.
/mob/proc/IsAdvancedToolUser()//This might need a rename but it should replace the can this mob use things check
return 0
+/mob/proc/Stun(amount)
+ stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun
+ return
+/mob/proc/SetStunned(amount) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned"
+ stunned = max(amount,0)
+ return
+
+/mob/proc/AdjustStunned(amount)
+ stunned = max(stunned + amount,0)
+ return
+
+/mob/proc/Weaken(amount)
+ weakened = max(max(weakened,amount),0)
+ return
+
+/mob/proc/SetWeakened(amount)
+ weakened = max(amount,0)
+ return
+
+/mob/proc/AdjustWeakened(amount)
+ weakened = max(weakened + amount,0)
+ return
+
+/mob/proc/Paralyse(amount)
+ paralysis = max(max(paralysis,amount),0)
+ return
+
+/mob/proc/SetParalysis(amount)
+ paralysis = max(amount,0)
+ return
+
+/mob/proc/AdjustParalysis(amount)
+ paralysis = max(paralysis + amount,0)
+ return
\ No newline at end of file
diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm
index 9c404164ba6..5abc6e8516d 100644
--- a/code/modules/mob/mob_grab.dm
+++ b/code/modules/mob/mob_grab.dm
@@ -76,8 +76,8 @@
if (!( affecting.buckled ))
affecting.loc = assailant.loc
if ((killing && state == 3))
- affecting.stunned = max(5, affecting.stunned)
- affecting.paralysis = max(3, affecting.paralysis)
+ affecting.Stun(5)
+ affecting.Paralyse(3)
affecting.losebreath = min(affecting.losebreath + 2, 3)
return
diff --git a/code/modules/power/singularity/containment_field.dm b/code/modules/power/singularity/containment_field.dm
index f5593cd95eb..0f679e421a9 100644
--- a/code/modules/power/singularity/containment_field.dm
+++ b/code/modules/power/singularity/containment_field.dm
@@ -64,9 +64,11 @@
user.visible_message("\red [user.name] was shocked by the [src.name]!", \
"\red You feel a powerful shock course through your body sending you flying!", \
"\red You hear a heavy electrical crack")
+
var/stun = min(shock_damage, 15)
- if(user.stunned < shock_damage) user.stunned = stun
- if(user.weakened < 10) user.weakened = 10
+ user.Stun(stun)
+ user.Weaken(10)
+
user.updatehealth()
var/atom/target = get_edge_target_turf(user, get_dir(src, get_step_away(user, src)))
user.throw_at(target, 200, 4)
@@ -81,8 +83,7 @@
"\red Energy pulse detected, system damaged!", \
"\red You hear an electrical crack")
if(prob(20))
- if(user.stunned < 2)
- user.stunned = 2
+ user.Stun(2)
return
return