Skip to content

Commit

Permalink
Defib property changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kiVts committed Oct 5, 2023
1 parent 6f16651 commit a2a503f
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions code/modules/reagents/chemistry_properties/prop_positive.dm
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,6 @@
rarity = PROPERTY_RARE
category = PROPERTY_TYPE_REACTANT
value = 3
max_level = 1

/datum/chem_property/positive/defibrillating/on_delete(mob/living/M)
..()
Expand All @@ -574,19 +573,24 @@
/datum/chem_property/positive/defibrillating/process_dead(mob/living/M, potency = 1, delta_time)
if(!ishuman(M))
return
var/mob/living/carbon/human/H = M
H.apply_damage(-H.getOxyLoss(), OXY)
if(H.check_tod() && H.is_revivable() && H.health > HEALTH_THRESHOLD_DEAD)
to_chat(H, SPAN_NOTICE("You feel your heart struggling as you suddenly feel a spark, making it desperately try to continue pumping."))
playsound_client(H.client, 'sound/effects/Heart Beat Short.ogg', 35)
addtimer(CALLBACK(H, TYPE_PROC_REF(/mob/living/carbon/human, handle_revive)), 50, TIMER_UNIQUE)
else if (potency > POTENCY_MAX_TIER_1 && H.check_tod() && H.is_revivable() && H.health < HEALTH_THRESHOLD_DEAD) //Will heal if level is 7 or greater
to_chat(H, SPAN_NOTICE("You feel a faint spark in your chest."))
H.apply_damage(-potency * POTENCY_MULTIPLIER_LOW, BRUTE)
H.apply_damage(-potency * POTENCY_MULTIPLIER_LOW, BURN)
H.apply_damage(-potency * POTENCY_MULTIPLIER_LOW, TOX)
H.apply_damage(-potency * POTENCY_MULTIPLIER_LOW, CLONE)
H.apply_damage(-H.getOxyLoss(), OXY)
var/mob/living/carbon/human/dead = M
dead.apply_damage(-dead.getOxyLoss(), OXY)
if(dead.check_tod() && dead.is_revivable() && dead.health > HEALTH_THRESHOLD_DEAD )
addtimer(CALLBACK(dead, TYPE_PROC_REF(/mob/living/carbon/human, handle_revive)), 50, TIMER_UNIQUE)
to_chat(dead, SPAN_NOTICE("You feel your heart struggling as you suddenly feel a spark, making it desperately try to continue pumping."))
playsound_client(dead.client, 'sound/effects/Heart Beat Short.ogg', 35)
else if (potency > 1 && dead.check_tod() && dead.is_revivable() && dead.health <= HEALTH_THRESHOLD_DEAD) //heals on all level above 1. This is however, minimal.
to_chat(dead, SPAN_NOTICE("You feel a faint spark in your chest."))
dead.apply_damage(-potency * POTENCY_MULTIPLIER_VLOW, BRUTE)
dead.apply_damage(-potency * POTENCY_MULTIPLIER_VLOW, BURN)
dead.apply_damage(-potency * POTENCY_MULTIPLIER_VLOW, TOX)
dead.apply_damage(-potency * POTENCY_MULTIPLIER_VLOW, CLONE)
dead.apply_damage(-dead.getOxyLoss(), OXY)
if(dead.health > HEALTH_THRESHOLD_DEAD)
var/mob/dead/observer/ghost = dead.get_ghost()
if(ghost?.client)
playsound_client(ghost.client, 'sound/effects/adminhelp_new.ogg')
to_chat(ghost, SPAN_BOLDNOTICE("Your heart is struggling to pump! There is a chance you might get up!(Verbs -> Ghost -> Re-enter corpse, or <a href='?src=\ref[ghost];reentercorpse=1'>click here!</a>)"))
return TRUE

/datum/chem_property/positive/hyperdensificating
Expand Down

0 comments on commit a2a503f

Please sign in to comment.