From ffcf609a36e5d010bc7e81a4e73705e33d679d89 Mon Sep 17 00:00:00 2001
From: necromanceranne <40847847+necromanceranne@users.noreply.github.com>
Date: Thu, 4 Jun 2020 05:33:36 +1000
Subject: [PATCH] Fixes neckgrabs being only escapable if RNGesus comes down
and saves you from your fate (#51427)
* Fixes grabs being impossible to escape, at the expense of making it easier to escape a grab. Damage inflicted by resisting increased to compensate.
* Upped the time between resists a bit
---
code/__DEFINES/combat.dm | 2 +-
code/modules/mob/living/living.dm | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm
index 48b4aa948f7..611b9ca5d8f 100644
--- a/code/__DEFINES/combat.dm
+++ b/code/__DEFINES/combat.dm
@@ -70,7 +70,7 @@
#define GRAB_KILL 3
//Grab breakout odds
-#define BASE_GRAB_RESIST_CHANCE 30
+#define BASE_GRAB_RESIST_CHANCE 60 //base chance for whether or not you can escape from a grab
//slowdown when in softcrit. Note that crawling slowdown will also apply at the same time!
#define SOFTCRIT_ADD_SLOWDOWN 2
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 9b10fe0ee70..791b407ee0f 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -784,8 +784,8 @@
var/altered_grab_state = pulledby.grab_state
if((resting || HAS_TRAIT(src, TRAIT_GRABWEAKNESS)) && pulledby.grab_state < GRAB_KILL) //If resting, resisting out of a grab is equivalent to 1 grab state higher. won't make the grab state exceed the normal max, however
altered_grab_state++
- var/resist_chance = BASE_GRAB_RESIST_CHANCE // see defines/combat.dm
- resist_chance = max((resist_chance/altered_grab_state)-sqrt((getBruteLoss()+getFireLoss()+getOxyLoss()+getToxLoss()+getCloneLoss())*0.5+getStaminaLoss()), 0) //stamina loss is weighted twice as heavily as the other damage types in this calculation
+ var/resist_chance = BASE_GRAB_RESIST_CHANCE /// see defines/combat.dm, this should be baseline 60%
+ resist_chance = (resist_chance/altered_grab_state) ///Resist chance divided by the value imparted by your grab state. It isn't until you reach neckgrab that you gain a penalty to escaping a grab.
if(prob(resist_chance))
visible_message("[src] breaks free of [pulledby]'s grip!", \
"You break free of [pulledby]'s grip!", null, null, pulledby)
@@ -794,12 +794,12 @@
pulledby.stop_pulling()
return FALSE
else
- adjustStaminaLoss(rand(8,15))//8 is from 7.5 rounded up
+ adjustStaminaLoss(rand(15,20))//failure to escape still imparts a pretty serious penalty
visible_message("[src] struggles as they fail to break free of [pulledby]'s grip!", \
"You struggle as you fail to break free of [pulledby]'s grip!", null, null, pulledby)
to_chat(pulledby, "[src] struggles as they fail to break free of your grip!")
if(moving_resist && client) //we resisted by trying to move
- client.move_delay = world.time + 20
+ client.move_delay = world.time + 40
else
pulledby.stop_pulling()
return FALSE