Makes the mech clamp attack do only brute damage, checks for block and armor, and gives it an attack animation and sound. (#91563)

## About The Pull Request

If you use the mech clamp offensively, it actually performs an attack
animation and sound, and properly checks armor and block. It only deals
brute damage.

As a consequence of these changes, it actually logs attacks made against
mobs that die when gibbed.

Also, xenos take x3 damage from the clamp.

## Why It's Good For The Game

This is a pretty sinister kind of attack, as it is completely silent
except for throwing a warning into chat, and can be done even in a large
crowd of people. Someone who isn't aware that the clamp can be used this
way may not even understand what is happening before it is too late.

> block check

While mech melee doesn't normally check block, this is an improvised
attack on a non-combat mech. I think it should stay a bit weak compared
to a proper mech melee in most ways and have some additional
limitations.

> Xenos

I thought this was already a thing. It's thematically on point, no?

## Changelog
🆑
balance: Mech hydraulic clamps perform an attack animation and sound
when attacking mobs.
balance: Mech hydraulic clamps can be blocked and respect armor.
balance: Mech hydraulic clamps do triple damage to xenomorphs.
/🆑

(cherry picked from commit fb9824a401)
This commit is contained in:
necromanceranne
2025-06-28 20:38:35 -04:00
committed by Roxy
parent e04863ad39
commit a8fe50f4f4
10 changed files with 52 additions and 29 deletions
@@ -94,7 +94,7 @@
var/mob/living/victim = target
if(victim.stat == DEAD)
return
return ..()
if(!source.combat_mode)
step_away(victim, chassis)
@@ -107,6 +107,11 @@
span_notice("[chassis] pushes you aside."))
return ..()
if(victim.check_block(chassis, clamp_damage, name, attack_type = OVERWHELMING_ATTACK))
source.visible_message(span_danger("[chassis] attempts to squeeze [victim] with [src], but the [name] is blocked!"), span_userdanger("You attempt to squeeze [victim] with [src], but [victim.p_They()] managed to block the attempt!"), ignored_mobs = victim)
to_chat(victim, span_userdanger("You block [chassis]'s attempt to squeeze you with [src]!"))
return ..()
if(iscarbon(victim) && killer_clamp)//meme clamp here
var/mob/living/carbon/carbon_victim = target
var/torn_off = FALSE
@@ -124,15 +129,15 @@
span_userdanger("[chassis] rips your arms off!"))
log_combat(source, carbon_victim, "removed both arms with a real clamp,", "[name]", "(COMBAT MODE: [uppertext(source.combat_mode)] (DAMTYPE: [uppertext(damtype)])")
return ..()
victim.take_overall_damage(clamp_damage)
if(isnull(victim)) //get gibbed stoopid
return ..()
victim.adjustOxyLoss(round(clamp_damage/2))
var/armor_check = clamp(victim.run_armor_check(null, MELEE) / 3, 0, 100) //our target only benefits from a third of their armor. Because it's a huge ass clamp
victim.visible_message(span_danger("[chassis] squeezes [victim]!"), \
span_userdanger("[chassis] squeezes you!"),\
span_hear("You hear something crack."))
log_combat(source, victim, "attacked", "[name]", "(Combat mode: [source.combat_mode ? "On" : "Off"]) (DAMTYPE: [uppertext(damtype)])")
var/final_damage = isalien(victim) ? clamp_damage * 3 : clamp_damage
chassis.do_attack_animation(victim)
playsound(chassis, clampsound, 30, FALSE, -6)
victim.apply_damage(final_damage, BRUTE, blocked = armor_check, spread_damage = TRUE)
return ..()
//This is pretty much just for the death-ripley