Altered disarm knockdown

now only occurs with a 30% chance if you already have an aggressive grab
(or better) on the target.

No more disarm > stun baton.
This commit is contained in:
Bone White
2014-08-16 06:21:31 +01:00
parent 5a5b9a930e
commit aea80f8200
@@ -176,12 +176,24 @@
return W.afterattack(target,src)
var/randn = rand(1, 100)
if (randn <= 25)
apply_effect(4, WEAKEN, run_armor_check(affecting, "melee"))
if(!src.handcuffed) // Bone White - disarm knockdown only occurs if you have an aggressive grab on the target, Longer duration (8) to allow handcuffing.
//check for an aggressive grab
for (var/obj/item/weapon/grab/G in src.grabbed_by)
if (G.assailant == M && G.state >= GRAB_AGGRESSIVE)
world << "aggressive grab"
randn -= 30 // this value is the % chance of knockdown if you disarm someone whilst you have an aggressive grab.
else
//if target is handcuffed, always push them over
randn = 0
if (randn <= 0)
world << "push over success"
apply_effect(4, WEAKEN, run_armor_check(affecting, "melee")) // first var here is the length of the knockdown
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("\red <B>[M] has pushed [src]!</B>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Pushed [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been pushed by [M.name] ([M.ckey])</font>")
visible_message("\red <B>[M] has floored [src]!</B>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Floored [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been floored by [M.name] ([M.ckey])</font>")
if(!iscarbon(M))
LAssailant = null
else