mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
[MIRROR] Fixes body collision causing a stun, despite a successful block. [MDB IGNORE] (#25146)
* Fixes body collision causing a stun, despite a successful block. (#79824) ## About The Pull Request Puts a block check into the ``throw_impact()`` of carbon mobs. ## Why It's Good For The Game I'm touching on a lot of 'get around shields' stuns, and this has been a big one for the better part of a few years and potentially not even intentional. I would say it gained its largest popularity when it became weaponized with fireman carrying. Despite seemingly rolling to block, blocking a body hitting you doesn't actually do anything at all. This reminds me a bit of energy bolas. So I fixed it? I think, there might be a better fix, I'm just replicating code present in xenomorph tackles. This shit sucks, please recommend a better fix if you know it. ## Changelog 🆑 fix: When you successfully block a body collision, it does something rather than nothing at all. /🆑 * Fixes body collision causing a stun, despite a successful block. --------- Co-authored-by: necromanceranne <40847847+necromanceranne@users.noreply.github.com>
This commit is contained in:
co-authored by
necromanceranne
parent
8cf4d878b2
commit
fcbbb6e0e0
@@ -52,6 +52,7 @@
|
||||
. = ..()
|
||||
var/hurt = TRUE
|
||||
var/extra_speed = 0
|
||||
var/oof_noise = FALSE //We smacked something with denisty, so play a noise
|
||||
if(throwingdatum.thrower != src)
|
||||
extra_speed = min(max(0, throwingdatum.speed - initial(throw_speed)), CARBON_MAX_IMPACT_SPEED_BONUS)
|
||||
|
||||
@@ -66,19 +67,37 @@
|
||||
take_bodypart_damage(5 + 5 * extra_speed, check_armor = TRUE, wound_bonus = extra_speed * 5)
|
||||
else if(!iscarbon(hit_atom) && extra_speed)
|
||||
take_bodypart_damage(5 * extra_speed, check_armor = TRUE, wound_bonus = extra_speed * 5)
|
||||
oof_noise = TRUE
|
||||
|
||||
if(iscarbon(hit_atom) && hit_atom != src)
|
||||
var/mob/living/carbon/victim = hit_atom
|
||||
var/blocked = FALSE
|
||||
if(victim.movement_type & FLYING)
|
||||
return
|
||||
if(hurt)
|
||||
victim.take_bodypart_damage(10 + 5 * extra_speed, check_armor = TRUE, wound_bonus = extra_speed * 5)
|
||||
take_bodypart_damage(10 + 5 * extra_speed, check_armor = TRUE, wound_bonus = extra_speed * 5)
|
||||
if(!hurt)
|
||||
return
|
||||
|
||||
if(victim.check_block(src, 0, "[name]", LEAP_ATTACK))
|
||||
blocked = TRUE
|
||||
|
||||
take_bodypart_damage(10 + 5 * extra_speed, check_armor = TRUE, wound_bonus = extra_speed * 5)
|
||||
Paralyze(2 SECONDS)
|
||||
oof_noise = TRUE
|
||||
|
||||
if(blocked)
|
||||
visible_message(span_danger("[src] crashes into [victim][extra_speed ? " really hard" : ""], but [victim] blocked the worst of it!"),\
|
||||
span_userdanger("You violently crash into [victim][extra_speed ? " extra hard" : ""], but [victim] managed to block the worst of it!"))
|
||||
log_combat(src, victim, "crashed into and was blocked by")
|
||||
return
|
||||
else
|
||||
victim.Paralyze(2 SECONDS)
|
||||
Paralyze(2 SECONDS)
|
||||
victim.take_bodypart_damage(10 + 5 * extra_speed, check_armor = TRUE, wound_bonus = extra_speed * 5)
|
||||
visible_message(span_danger("[src] crashes into [victim][extra_speed ? " really hard" : ""], knocking them both over!"),\
|
||||
span_userdanger("You violently crash into [victim][extra_speed ? " extra hard" : ""]!"))
|
||||
log_combat(src, victim, "crashed into")
|
||||
|
||||
if(oof_noise)
|
||||
playsound(src,'sound/weapons/punch1.ogg',50,TRUE)
|
||||
log_combat(src, victim, "crashed into")
|
||||
|
||||
//Throwing stuff
|
||||
/mob/living/carbon/proc/toggle_throw_mode()
|
||||
|
||||
Reference in New Issue
Block a user