Added stun, weaken and paralysis-related procs in place of directly editing the vars. Hulk is 5% chance now due to being completely immune to any sort of stunning (will nerf more later). Think that's all but not entirely sure.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2683 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
uporotiy
2011-12-14 16:38:46 +00:00
parent 8c1f50297a
commit 3f5b76aff0
83 changed files with 454 additions and 475 deletions
+6 -6
View File
@@ -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)
+4 -4
View File
@@ -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
+40 -40
View File
@@ -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
+2 -2
View File
@@ -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"
+1 -1
View File
@@ -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 <B>[src]</B> knocks down [target]!", 1)
playsound(loc, 'pierce.ogg', 25, 1, -1)
+4 -4
View File
@@ -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
@@ -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
client.images += activeIndicator
/mob/living/carbon/alien/IsAdvancedToolUser()
return has_fine_manipulation
@@ -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 <B>[src] hurls out the contents of their stomach!</B>"), 1)
return
@@ -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
@@ -89,7 +89,7 @@
message = "<B>The [src.name]</B> jumps!"
m_type = 1
if("collapse")
if (!src.paralysis) src.paralysis += 2
Paralyse(2)
message = text("<B>[]</B> collapses!", src)
m_type = 2
if("help")
@@ -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 <B>The [M.name] has shocked []!</B>", 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 <B>[src] has been touched with the stun gloves by [M]!</B>", 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 <B>[] has punched []!</B>", 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 <B>[] has weakened []!</B>", 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 <B>[] has pushed down []!</B>", 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)
@@ -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
@@ -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
@@ -86,7 +86,7 @@
message = "<B>The [src.name]</B> jumps!"
m_type = 1
if("collapse")
if (!src.paralysis) src.paralysis += 2
Paralyse(2)
message = text("<B>[]</B> collapses!", src)
m_type = 2
if("help")
@@ -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 <B>[src] has been touched with the stun gloves by [M]!</B>", 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 <B>[] has punched []!</B>", 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 <B>[] has weakened []!</B>", 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)
@@ -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
+13 -13
View File
@@ -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
+5 -5
View File
@@ -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!", \
@@ -393,8 +393,7 @@
m_type = 2
if ("collapse")
if (!src.paralysis)
src.paralysis += 2
Paralyse(2)
message = "<B>[src]</B> collapses!"
m_type = 2
+18 -5
View File
@@ -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 <B>The [M.name] has shocked []!</B>", 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
..()
@@ -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 <B>[] has tackled down []!</B>", M, src), 1)
+19 -19
View File
@@ -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 <B>[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
@@ -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
@@ -86,7 +86,7 @@
message = "<B>The [src.name]</B> jumps!"
m_type = 1
if("collapse")
if (!src.paralysis) src.paralysis += 2
Paralyse(2)
message = text("<B>[]</B> collapses!", src)
m_type = 2
if("deathgasp")
+18 -18
View File
@@ -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
+11 -14
View File
@@ -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 <B>[src] has been touched with the stun gloves by [M]!</B>", 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 <B>[] has wounded [name]!</B>", 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 <B>[] has tackled down [name]!</B>", M), 1)
@@ -359,12 +358,10 @@
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has shocked []!</B>", 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)
+3 -3
View File
@@ -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)
+4 -4
View File
@@ -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
+1 -1
View File
@@ -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)
@@ -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
@@ -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)
+2 -2
View File
@@ -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 <B>*BZZZT*</B>"
src << "\red Warning: Electromagnetic pulse detected."
+34
View File
@@ -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
+2 -2
View File
@@ -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
@@ -64,9 +64,11 @@
user.visible_message("\red [user.name] was shocked by the [src.name]!", \
"\red <B>You feel a powerful shock course through your body sending you flying!</B>", \
"\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 <B>Energy pulse detected, system damaged!</B>", \
"\red You hear an electrical crack")
if(prob(20))
if(user.stunned < 2)
user.stunned = 2
user.Stun(2)
return
return