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
This commit is contained in:
necromanceranne
2020-06-03 21:33:36 +02:00
committed by GitHub
parent 17348c3f99
commit ffcf609a36
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -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
+4 -4
View File
@@ -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("<span class='danger'>[src] breaks free of [pulledby]'s grip!</span>", \
"<span class='danger'>You break free of [pulledby]'s grip!</span>", 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("<span class='danger'>[src] struggles as they fail to break free of [pulledby]'s grip!</span>", \
"<span class='warning'>You struggle as you fail to break free of [pulledby]'s grip!</span>", null, null, pulledby)
to_chat(pulledby, "<span class='danger'>[src] struggles as they fail to break free of your grip!</span>")
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