From 711789a121aee1818df13f6d4ed09e72d82b52c6 Mon Sep 17 00:00:00 2001 From: Beagle <56142455+BeagleGaming1@users.noreply.github.com> Date: Mon, 7 Aug 2023 23:48:10 -0400 Subject: [PATCH] heartless --- code/game/objects/items/devices/defibrillator.dm | 10 ++++++---- code/modules/cm_tech/implements/medical_czsp.dm | 3 ++- code/modules/mob/living/blood.dm | 8 ++------ 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/code/game/objects/items/devices/defibrillator.dm b/code/game/objects/items/devices/defibrillator.dm index 0596ae9d14b8..4832a7bfac68 100644 --- a/code/game/objects/items/devices/defibrillator.dm +++ b/code/game/objects/items/devices/defibrillator.dm @@ -11,7 +11,8 @@ w_class = SIZE_MEDIUM var/blocked_by_suit = TRUE - var/heart_damage_to_deal = 5 + var/min_heart_damage_dealt = 3 + var/max_heart_damage_dealt = 5 var/ready = 0 var/damage_heal_threshold = 12 //This is the maximum non-oxy damage the defibrillator will heal to get a patient above -100, in all categories var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread @@ -191,8 +192,8 @@ shock_cooldown = world.time + 10 //1 second cooldown before you can shock again var/datum/internal_organ/heart/heart = H.internal_organs_by_name["heart"] - if(heart && prob(25)) - heart.take_damage(heart_damage_to_deal, TRUE) //Allow the defibrillator to possibly worsen heart damage. Still rare enough to just be the "clone damage" of the defib + if(heart) + heart.take_damage(rand(min_heart_damage_dealt, max_heart_damage_dealt), TRUE) // Disincentivizes using the defibrillator too much if(!H.is_revivable()) playsound(get_turf(src), 'sound/items/defib_failed.ogg', 25, 0) @@ -245,7 +246,8 @@ item_state = "defib" w_class = SIZE_MEDIUM blocked_by_suit = FALSE - heart_damage_to_deal = 0 + min_heart_damage_dealt = 0 + max_heart_damage_dealt = 0 damage_heal_threshold = 40 charge_cost = 198 diff --git a/code/modules/cm_tech/implements/medical_czsp.dm b/code/modules/cm_tech/implements/medical_czsp.dm index e0b00ebf5afd..6c1b59c52537 100644 --- a/code/modules/cm_tech/implements/medical_czsp.dm +++ b/code/modules/cm_tech/implements/medical_czsp.dm @@ -86,7 +86,8 @@ desc = "An advanced rechargeable defibrillator using induction to deliver shocks through metallic objects, such as armor, and does so with much greater efficiency than the standard variant." blocked_by_suit = FALSE - heart_damage_to_deal = 0 + min_heart_damage_dealt = 0 + max_heart_damage_dealt = 0 damage_heal_threshold = 35 /obj/item/ammo_magazine/internal/pillgun diff --git a/code/modules/mob/living/blood.dm b/code/modules/mob/living/blood.dm index 61848eda251c..dd7750f0b091 100644 --- a/code/modules/mob/living/blood.dm +++ b/code/modules/mob/living/blood.dm @@ -29,12 +29,8 @@ b_volume = 0 else if(chem_effect_flags & CHEM_EFFECT_ORGAN_STASIS) b_volume *= 1 - else if(heart.damage > 1 && heart.damage < heart.min_bruised_damage) - b_volume *= 0.8 - else if(heart.damage >= heart.min_bruised_damage && heart.damage < heart.min_broken_damage) - b_volume *= 0.6 - else if(heart.damage >= heart.min_broken_damage && heart.damage < INFINITY) - b_volume *= 0.3 + else if(heart.damage >= heart.min_bruised_damage) + b_volume *= Clamp(100 - (2 * heart.damage), 30, 100) / 100 //Effects of bloodloss switch(b_volume)