Skip to content

Commit

Permalink
heartless
Browse files Browse the repository at this point in the history
  • Loading branch information
BeagleGaming1 committed Aug 8, 2023
1 parent 68d49d6 commit 711789a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
10 changes: 6 additions & 4 deletions code/game/objects/items/devices/defibrillator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion code/modules/cm_tech/implements/medical_czsp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 2 additions & 6 deletions code/modules/mob/living/blood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 711789a

Please sign in to comment.