From 5dcdb6ca9c7563659054e636a43b4a3cbed27d97 Mon Sep 17 00:00:00 2001 From: itseasytosee <55666666+itseasytosee@users.noreply.github.com> Date: Tue, 28 Nov 2023 07:47:10 -0600 Subject: [PATCH] Stagger bugfix + pummeling grammar (#79977) ## About The Pull Request Small bugfix which properly upgrades the difficultly of breaking out of a passive grab to that of an aggressive grab if staggered and stamina damaged. Punching someone while grappled gives unique damage text based on the limb used. ## Why It's Good For The Game Bugfix. More user feedback. ## Changelog :cl: itseasytosee fix: staggered targets now have the correct chance for escaping grapples. spellcheck: changed attack verb for punching a grappled target /:cl: --- .../objects/items/stacks/golem_food/golem_status_effects.dm | 1 + code/modules/mob/living/carbon/human/_species.dm | 2 ++ code/modules/mob/living/living.dm | 2 +- code/modules/surgery/bodyparts/_bodyparts.dm | 2 ++ code/modules/surgery/bodyparts/parts.dm | 1 + .../surgery/bodyparts/species_parts/ethereal_bodyparts.dm | 2 ++ .../modules/surgery/bodyparts/species_parts/lizard_bodyparts.dm | 2 ++ code/modules/surgery/bodyparts/species_parts/misc_bodyparts.dm | 2 ++ code/modules/surgery/bodyparts/species_parts/moth_bodyparts.dm | 2 ++ 9 files changed, 15 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/stacks/golem_food/golem_status_effects.dm b/code/game/objects/items/stacks/golem_food/golem_status_effects.dm index d34cb722763..c89fae800b9 100644 --- a/code/game/objects/items/stacks/golem_food/golem_status_effects.dm +++ b/code/game/objects/items/stacks/golem_food/golem_status_effects.dm @@ -292,6 +292,7 @@ /// Make our arm do slashing effects /datum/status_effect/golem/diamond/proc/set_arm_fluff(obj/item/bodypart/arm/arm) arm.unarmed_attack_verb = "slash" + arm.grappled_attack_verb = "lacerate" arm.unarmed_attack_effect = ATTACK_EFFECT_CLAW arm.unarmed_attack_sound = 'sound/weapons/slash.ogg' arm.unarmed_miss_sound = 'sound/weapons/slashmiss.ogg' diff --git a/code/modules/mob/living/carbon/human/_species.dm b/code/modules/mob/living/carbon/human/_species.dm index 6af88e20028..e67651f0ce6 100644 --- a/code/modules/mob/living/carbon/human/_species.dm +++ b/code/modules/mob/living/carbon/human/_species.dm @@ -1186,6 +1186,8 @@ GLOBAL_LIST_EMPTY(features_by_species) playsound(target.loc, attacking_bodypart.unarmed_attack_sound, 25, TRUE, -1) + if(grappled && attacking_bodypart.grappled_attack_verb) + atk_verb = attacking_bodypart.grappled_attack_verb target.visible_message(span_danger("[user] [atk_verb]ed [target]!"), \ span_userdanger("You're [atk_verb]ed by [user]!"), span_hear("You hear a sickening sound of flesh hitting flesh!"), COMBAT_MESSAGE_RANGE, user) to_chat(user, span_danger("You [atk_verb] [target]!")) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index bf346fe6a97..408f6765cf3 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1119,7 +1119,7 @@ //If we're in an aggressive grab or higher, we're lying down, we're vulnerable to grabs, or we're staggered and we have some amount of stamina loss, we must resist if(pulledby.grab_state || body_position == LYING_DOWN || HAS_TRAIT(src, TRAIT_GRABWEAKNESS) || get_timed_status_effect_duration(/datum/status_effect/staggered) && getStaminaLoss() >= 30) var/altered_grab_state = pulledby.grab_state - if((body_position == LYING_DOWN || HAS_TRAIT(src, TRAIT_GRABWEAKNESS)) && pulledby.grab_state < GRAB_KILL) //If prone, resisting out of a grab is equivalent to 1 grab state higher. won't make the grab state exceed the normal max, however + if((body_position == LYING_DOWN || HAS_TRAIT(src, TRAIT_GRABWEAKNESS) || get_timed_status_effect_duration(/datum/status_effect/staggered)) && pulledby.grab_state < GRAB_KILL) //If prone, 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, 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. diff --git a/code/modules/surgery/bodyparts/_bodyparts.dm b/code/modules/surgery/bodyparts/_bodyparts.dm index 7526550e637..857d1b11fbf 100644 --- a/code/modules/surgery/bodyparts/_bodyparts.dm +++ b/code/modules/surgery/bodyparts/_bodyparts.dm @@ -166,6 +166,8 @@ var/attack_type = BRUTE /// the verb used for an unarmed attack when using this limb, such as arm.unarmed_attack_verb = punch var/unarmed_attack_verb = "bump" + /// if we have a special attack verb for hitting someone who is grappled by us, it goes here. + var/grappled_attack_verb /// what visual effect is used when this limb is used to strike someone. var/unarmed_attack_effect = ATTACK_EFFECT_PUNCH /// Sounds when this bodypart is used in an umarmed attack diff --git a/code/modules/surgery/bodyparts/parts.dm b/code/modules/surgery/bodyparts/parts.dm index 1ca837c9260..25f1ab985b6 100644 --- a/code/modules/surgery/bodyparts/parts.dm +++ b/code/modules/surgery/bodyparts/parts.dm @@ -109,6 +109,7 @@ body_damage_coeff = LIMB_BODY_DAMAGE_COEFFICIENT_DEFAULT can_be_disabled = TRUE unarmed_attack_verb = "punch" /// The classic punch, wonderfully classic and completely random + grappled_attack_verb = "pummel" unarmed_damage_low = 5 unarmed_damage_high = 10 body_zone = BODY_ZONE_L_ARM diff --git a/code/modules/surgery/bodyparts/species_parts/ethereal_bodyparts.dm b/code/modules/surgery/bodyparts/species_parts/ethereal_bodyparts.dm index feda164b6f2..3eeafa6f4e1 100644 --- a/code/modules/surgery/bodyparts/species_parts/ethereal_bodyparts.dm +++ b/code/modules/surgery/bodyparts/species_parts/ethereal_bodyparts.dm @@ -37,6 +37,7 @@ dmg_overlay_type = null attack_type = BURN //burn bish unarmed_attack_verb = "burn" + grappled_attack_verb = "scorch" unarmed_attack_sound = 'sound/weapons/etherealhit.ogg' unarmed_miss_sound = 'sound/weapons/etherealmiss.ogg' brute_modifier = 1.25 //ethereal are weak to brute damage @@ -54,6 +55,7 @@ dmg_overlay_type = null attack_type = BURN // bish buzz unarmed_attack_verb = "burn" + grappled_attack_verb = "scorch" unarmed_attack_sound = 'sound/weapons/etherealhit.ogg' unarmed_miss_sound = 'sound/weapons/etherealmiss.ogg' brute_modifier = 1.25 //ethereal are weak to brute damage diff --git a/code/modules/surgery/bodyparts/species_parts/lizard_bodyparts.dm b/code/modules/surgery/bodyparts/species_parts/lizard_bodyparts.dm index 8c971174d6d..24178d9bd16 100644 --- a/code/modules/surgery/bodyparts/species_parts/lizard_bodyparts.dm +++ b/code/modules/surgery/bodyparts/species_parts/lizard_bodyparts.dm @@ -14,6 +14,7 @@ icon_greyscale = 'icons/mob/human/species/lizard/bodyparts.dmi' limb_id = SPECIES_LIZARD unarmed_attack_verb = "slash" + grappled_attack_verb = "lacerate" unarmed_attack_effect = ATTACK_EFFECT_CLAW unarmed_attack_sound = 'sound/weapons/slash.ogg' unarmed_miss_sound = 'sound/weapons/slashmiss.ogg' @@ -22,6 +23,7 @@ icon_greyscale = 'icons/mob/human/species/lizard/bodyparts.dmi' limb_id = SPECIES_LIZARD unarmed_attack_verb = "slash" + grappled_attack_verb = "lacerate" unarmed_attack_effect = ATTACK_EFFECT_CLAW unarmed_attack_sound = 'sound/weapons/slash.ogg' unarmed_miss_sound = 'sound/weapons/slashmiss.ogg' diff --git a/code/modules/surgery/bodyparts/species_parts/misc_bodyparts.dm b/code/modules/surgery/bodyparts/species_parts/misc_bodyparts.dm index 8fea46470ce..776c28caa78 100644 --- a/code/modules/surgery/bodyparts/species_parts/misc_bodyparts.dm +++ b/code/modules/surgery/bodyparts/species_parts/misc_bodyparts.dm @@ -232,6 +232,7 @@ /obj/item/bodypart/arm/left/pod limb_id = SPECIES_PODPERSON unarmed_attack_verb = "slash" + grappled_attack_verb = "lacerate" unarmed_attack_effect = ATTACK_EFFECT_CLAW unarmed_attack_sound = 'sound/weapons/slice.ogg' unarmed_miss_sound = 'sound/weapons/slashmiss.ogg' @@ -240,6 +241,7 @@ /obj/item/bodypart/arm/right/pod limb_id = SPECIES_PODPERSON unarmed_attack_verb = "slash" + grappled_attack_verb = "lacerate" unarmed_attack_effect = ATTACK_EFFECT_CLAW unarmed_attack_sound = 'sound/weapons/slice.ogg' unarmed_miss_sound = 'sound/weapons/slashmiss.ogg' diff --git a/code/modules/surgery/bodyparts/species_parts/moth_bodyparts.dm b/code/modules/surgery/bodyparts/species_parts/moth_bodyparts.dm index 4dabec067fd..faed53371af 100644 --- a/code/modules/surgery/bodyparts/species_parts/moth_bodyparts.dm +++ b/code/modules/surgery/bodyparts/species_parts/moth_bodyparts.dm @@ -23,6 +23,7 @@ limb_id = SPECIES_MOTH should_draw_greyscale = FALSE unarmed_attack_verb = "slash" + grappled_attack_verb = "lacerate" unarmed_attack_effect = ATTACK_EFFECT_CLAW unarmed_attack_sound = 'sound/weapons/slash.ogg' unarmed_miss_sound = 'sound/weapons/slashmiss.ogg' @@ -34,6 +35,7 @@ limb_id = SPECIES_MOTH should_draw_greyscale = FALSE unarmed_attack_verb = "slash" + grappled_attack_verb = "lacerate" unarmed_attack_effect = ATTACK_EFFECT_CLAW unarmed_attack_sound = 'sound/weapons/slash.ogg' unarmed_miss_sound = 'sound/weapons/slashmiss.ogg'