From c94bda6e80a20e87ccc2d5453871e4f590442594 Mon Sep 17 00:00:00 2001 From: Ben <91219575+Ben10083@users.noreply.github.com> Date: Sat, 6 Apr 2024 03:39:17 -0400 Subject: [PATCH] Super Strength Grab Changes (Never skip arm day) (#6020) # About the pull request Grabs for those with super strength buffed - passive grabs no longer guarantied resist - target has reduced chance to resist - if the target, _increased_ chance to resist - if both have super strength, works as before (passive grabs guarantied for example) # Explain why it's good for the game Grabs are not often used, even though roles such as WJs are encouraged to do so. This is because grabs are very easy to be resisted out of. This is fine, and is necessary, but in this case, I want to have it so if someone has an advantage in strength, they have advantage in this exchange (both dealing and recieving). I feel this was more an oversight, as logically those who are stronger will have a stronger grip than otherwise. The balance out between the two is to prevent shenanigans between synth and pred, no grab fights there. scenario 1) Synth vs Human Synth has strength, human doesn't advantage synth scenario 2) human vs Pred Pred has strength, human doesnt advantage pred scenario 3) Synth vs Pred Both have strength No advantage (how it is now) # Changelog :cl: balance: Mobs with super strength now have an advantage when resisting of a grab is done, both as the grabber and the one being grabbed (Xenos not affected, works as before). balance: Mobs with super strength no longer have their passive grabs a guaranteed resist (unless both super). /:cl: --------- Co-authored-by: Ben10083 --- .../mob/living/carbon/human/human_helpers.dm | 10 ++--- code/modules/mob/living/living.dm | 37 +++++++++++++------ 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index c38ddbcd552c..d6d438441d20 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -206,18 +206,18 @@ return FALSE -/mob/living/carbon/human/is_mob_restrained(check_grab = 1) +/mob/living/carbon/human/is_mob_restrained(check_grab = TRUE) if(check_grab && pulledby && pulledby.grab_level >= GRAB_AGGRESSIVE) - return 1 + return TRUE if (handcuffed) - return 1 + return TRUE if (istype(wear_suit, /obj/item/clothing/suit/straight_jacket)) - return 1 + return TRUE if (HAS_TRAIT(src, TRAIT_NESTED)) return TRUE - return 0 + return FALSE /mob/living/carbon/human/proc/disable_special_flags() status_flags |= CANPUSH diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index d5190318715c..40a06b253c3e 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -224,19 +224,34 @@ /mob/living/resist_grab(moving_resist) if(!pulledby) return - if(pulledby.grab_level) - if(prob(50)) - playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 25, 1, 7) - visible_message(SPAN_DANGER("[src] has broken free of [pulledby]'s grip!"), null, null, 5) - pulledby.stop_pulling() - return 1 - if(moving_resist && client) //we resisted by trying to move - visible_message(SPAN_DANGER("[src] struggles to break free of [pulledby]'s grip!"), null, null, 5) - client.next_movement = world.time + (10*pulledby.grab_level) + client.move_delay - else + // vars for checks of strengh + var/pulledby_is_strong = HAS_TRAIT(pulledby, TRAIT_SUPER_STRONG) + var/src_is_strong = HAS_TRAIT(src, TRAIT_SUPER_STRONG) + + if(!pulledby.grab_level && (!pulledby_is_strong || src_is_strong)) // if passive grab, check if puller is stronger than src, and if not, break free pulledby.stop_pulling() - return 1 + return TRUE + // Chance for person to break free of grip, defaults to 50. + var/chance = 50 + if(src_is_strong && !isxeno(pulledby)) // no extra chance to resist warrior grabs + chance += 30 // you are strong, you can overpower them easier + if(pulledby_is_strong) + chance -= 30 // stronger grip + // above code means that if you are super strong, 80% chance to resist, otherwise, 20 percent. if both are super strong, standard 50. + + if(prob(chance)) + playsound(loc, 'sound/weapons/thudswoosh.ogg', 25, 1, 7) + visible_message(SPAN_DANGER("[src] has broken free of [pulledby]'s grip!"), max_distance = 5) + pulledby.stop_pulling() + return TRUE + if(moving_resist && client) //we resisted by trying to move + visible_message(SPAN_DANGER("[src] struggles to break free of [pulledby]'s grip!"), max_distance = 5) + // +1 delay if super strong, also done as passive grabs would have a modifier of 0 otherwise, causing spam + if(pulledby_is_strong && !src_is_strong) + client.next_movement = world.time + (10*(pulledby.grab_level + 1)) + client.move_delay + else + client.next_movement = world.time + (10*pulledby.grab_level) + client.move_delay /mob/living/movement_delay() . = ..()