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
+1 -1
View File
@@ -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)
+2 -2
View File
@@ -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.
+3 -4
View File
@@ -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)
+3 -3
View File
@@ -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
+2 -2
View File
@@ -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!"
+4 -4
View File
@@ -11,12 +11,12 @@
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
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 <B>[user] has prodded [M] with an electrically-charged arm!</B>", 1, "\red You hear someone fall", 2)
@@ -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))
+8 -8
View File
@@ -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)
@@ -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)
+8 -10
View File
@@ -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()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
@@ -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 <B>[] has been knocked unconscious!</B>", 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()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
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 <B>[] slams [] with the tray!</B>", 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 <B>[] slams [] in the face with the tray!</B>", 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
@@ -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 <B>[M] has been beaten with the stun baton by [user]!</B>", 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 <B>[M] has been beaten with the police baton by [user]!</B>", 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 <B>[M] has been stunned with the police baton by [user]!</B>", 1, "\red You hear someone fall", 2)
+1 -2
View File
@@ -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()
+3 -5
View File
@@ -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 <B>[] has been knocked unconscious!</B>", M), 1, "\red You hear someone fall.", 2)
+1 -1
View File
@@ -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()
+1 -2
View File
@@ -197,8 +197,7 @@
M << "\red <B>You feel a deep shock course through your body!</B>"
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)
+1 -1
View File
@@ -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)
+3 -5
View File
@@ -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 <B>[] has been knocked unconscious!</B>", M), 1, "\red You hear someone fall.", 2)
+3 -3
View File
@@ -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)
+5 -3
View File
@@ -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()