From 38b8791e27dccca78bbb5f3a2b8dcaa8f7a2b4fb Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Thu, 26 Nov 2020 01:18:57 +0100 Subject: [PATCH] [MIRROR] Fixes issue with mecha drills failing to gib most simplemobs. (#1837) * Feex (#55144) For whatever reason we hardcoded the health value for drills at 200 brute damage before they can gib. 200 brute damage was picked as it was double the max health of /mob/living/carbon/whatever and double the max health was like, the cap on brute damage when someone is really, really, really, really dead. Enter simplemobs. Their max health is regularly under 100, which means a hardcoded value of 200 brute damage to trigger gibbing effects is bad. Not that it matters anyway, because simplemobs also brute damage cap at maxHealth instead of maxHealth * 2 so the only simplemobs that could be gibbed by mech drills are those with 200 or more health. This has been changed. Simplemobs now cap out at maxHealth * 2 damage, in line with all other /mob/living while drill code has been changed to check for maxHealth * 2 when gibbing instead of a hardcoded 200. * Fixes issue with mecha drills failing to gib most simplemobs. Co-authored-by: Timberpoes --- code/modules/mob/living/simple_animal/damage_procs.dm | 2 +- code/modules/vehicles/mecha/equipment/tools/mining_tools.dm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/simple_animal/damage_procs.dm b/code/modules/mob/living/simple_animal/damage_procs.dm index ea5017832b9..be113d9201f 100644 --- a/code/modules/mob/living/simple_animal/damage_procs.dm +++ b/code/modules/mob/living/simple_animal/damage_procs.dm @@ -2,7 +2,7 @@ /mob/living/simple_animal/proc/adjustHealth(amount, updating_health = TRUE, forced = FALSE) if(!forced && (status_flags & GODMODE)) return FALSE - bruteloss = round(clamp(bruteloss + amount, 0, maxHealth),DAMAGE_PRECISION) + bruteloss = round(clamp(bruteloss + amount, 0, maxHealth * 2), DAMAGE_PRECISION) if(updating_health) updatehealth() return amount diff --git a/code/modules/vehicles/mecha/equipment/tools/mining_tools.dm b/code/modules/vehicles/mecha/equipment/tools/mining_tools.dm index 8f1ed86a70b..f191a866d0f 100644 --- a/code/modules/vehicles/mecha/equipment/tools/mining_tools.dm +++ b/code/modules/vehicles/mecha/equipment/tools/mining_tools.dm @@ -125,7 +125,7 @@ target.visible_message("[chassis] is drilling [target] with [src]!", \ "[chassis] is drilling you with [src]!") log_combat(user, target, "drilled", "[name]", "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])") - if(target.stat == DEAD && target.getBruteLoss() >= 200) + if(target.stat == DEAD && target.getBruteLoss() >= (target.maxHealth * 2)) log_combat(user, target, "gibbed", name) if(LAZYLEN(target.butcher_results) || LAZYLEN(target.guaranteed_butcher_results)) var/datum/component/butchering/butchering = src.GetComponent(/datum/component/butchering)