Tweaks disarms and disarm pushes (#7624)
The chance for a successful left-click disarm has increased to 45% on targets you're pulling Disarm pushing has been slightly reworked. The random chance for disarm push rolls is now determined by how much staminaloss the target has. Pushing someone who is out of combat mode while you're in combat mode is a guaranteed knockdown. Pushing now deals light stamina loss to the target so long as both you and your target are standing, not enough to robust someone without tiring yourself out in the process, but enough for a tide to get someone knocked down. Disarm push attempts are now logged
This commit is contained in:
@@ -37,24 +37,22 @@
|
||||
var/randomized_zone = ran_zone(user.zone_selected)
|
||||
SEND_SIGNAL(target, COMSIG_HUMAN_DISARM_HIT, user, user.zone_selected)
|
||||
var/obj/item/bodypart/affecting = target.get_bodypart(randomized_zone)
|
||||
var/randn = rand(1, 100)
|
||||
if(user.resting)
|
||||
randn += 20 //Makes it plausible, but unlikely, to push someone over while resting
|
||||
if(!user.combatmode)
|
||||
randn += 25 //Makes it impossible to push actually push someone outside of combat mode
|
||||
|
||||
if(randn <= 25)
|
||||
if(!target.combatmode && user.combatmode || prob(target.getStaminaLoss()*(user.resting ? 0.25 : 1)*(user.combatmode ? 1 : 0.05))) //probability depends on staminaloss. it's plausible, but unlikely that you'll be able to push someone over while resting, and pretty rare to successfully push someone outside of combat mode. The few people that even know how to right-click outside of combat mode are a rarity but let's take that into account regardless.
|
||||
playsound(target, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
target.visible_message("<span class='danger'>[user] has pushed [target]!</span>",
|
||||
target.visible_message("<span class='danger'>[user] [user.combatmode ? "has" : "gently"] pushed [target]!</span>",
|
||||
"<span class='userdanger'>[user] has pushed [target]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
target.apply_effect(40, EFFECT_KNOCKDOWN, target.run_armor_check(affecting, "melee", "Your armor prevents your fall!", "Your armor softens your fall!"))
|
||||
target.forcesay(GLOB.hit_appends)
|
||||
log_combat(user, target, "disarmed", " pushing them to the ground")
|
||||
return
|
||||
|
||||
playsound(target, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
target.visible_message("<span class='danger'>[user] attempted to push [target]!</span>", \
|
||||
"<span class='userdanger'>[user] attemped to push [target]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
playsound(target, 'sound/weapons/thudswoosh.ogg', 25, 1, -1)
|
||||
target.visible_message("<span class='danger'>[user] [user.combatmode ? "attempted to push" : "tries to gently push"] [target] over!</span>", \
|
||||
"<span class='userdanger'>[user] [user.combatmode ? "attempted to push" : "tries to gently push"] [target] over!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
if(!target.resting && !user.resting && user.combatmode)
|
||||
target.adjustStaminaLoss(rand(1,5)) //This is the absolute most inefficient way to get someone into soft stamcrit, but if you've got a crowd trying to shove you over, you've no option but to get knocked down and accept fate
|
||||
log_combat(user, target, "attempted to disarm push")
|
||||
|
||||
////////////////////
|
||||
/////BODYPARTS/////
|
||||
|
||||
Reference in New Issue
Block a user