makes it impossible to resist/move out of grabs while resting (though disarming your way out of the grab still works) (#7688)

* makes it impossible to resist out of grabs while resting (partially emulates grab rework's restraining)

* actually wait, *now* you can disarm your way out of grabs

* logging and sounds too
This commit is contained in:
deathride58
2018-11-09 22:11:30 -05:00
committed by kevinz000
parent 9caf80391b
commit 2676f2a6fc
2 changed files with 7 additions and 1 deletions

View File

@@ -1419,6 +1419,12 @@ GLOBAL_LIST_EMPTY(roundstart_races)
target.w_uniform.add_fingerprint(user)
//var/randomized_zone = ran_zone(user.zone_selected) CIT CHANGE - comments out to prevent compiling errors
SEND_SIGNAL(target, COMSIG_HUMAN_DISARM_HIT, user, user.zone_selected)
if(target.pulling == user)
target.visible_message("<span class='warning'>[user] wrestles out of [target]'s grip!</span>")
target.stop_pulling()
playsound(target, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
log_combat(user, target, "disarmed out of grab from")
return
//var/obj/item/bodypart/affecting = target.get_bodypart(randomized_zone) CIT CHANGE - comments this out to prevent compile errors due to the below commented out bit
var/randn = rand(1, 100)
/*if(randn <= 25) CITADEL CHANGE - moves disarm push attempts to right click

View File

@@ -631,7 +631,7 @@
/mob/living/resist_grab(moving_resist)
. = 1
if(pulledby.grab_state)
if(prob(30/pulledby.grab_state))
if(!resting && prob(30/pulledby.grab_state))
visible_message("<span class='danger'>[src] has broken free of [pulledby]'s grip!</span>")
log_combat(pulledby, src, "broke grab")
pulledby.stop_pulling()