From aea80f8200bc7e52b1599e5000383a9a00660424 Mon Sep 17 00:00:00 2001 From: Bone White Date: Sat, 16 Aug 2014 06:21:31 +0100 Subject: [PATCH] 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. --- .../living/carbon/human/human_attackhand.dm | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index 8b8411f7012..dbba84f5559 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -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 [M] has pushed [src]!") - M.attack_log += text("\[[time_stamp()]\] Pushed [src.name] ([src.ckey])") - src.attack_log += text("\[[time_stamp()]\] Has been pushed by [M.name] ([M.ckey])") + visible_message("\red [M] has floored [src]!") + M.attack_log += text("\[[time_stamp()]\] Floored [src.name] ([src.ckey])") + src.attack_log += text("\[[time_stamp()]\] Has been floored by [M.name] ([M.ckey])") if(!iscarbon(M)) LAssailant = null else