Fixes not being revived if a ghost enters the body during a defib (#18371)

This commit is contained in:
Shadow-Quill
2022-07-14 05:01:49 -05:00
committed by GitHub
parent 4ab98ea3f8
commit ced4e1f1e3
+1
View File
@@ -453,6 +453,7 @@
for(var/obj/item/organ/external/O in H.bodyparts)
total_brute += O.brute_dam
total_burn += O.burn_dam
ghost = H.get_ghost(TRUE) // We have to double check whether the dead guy has entered their body during the above
if(total_burn <= 180 && total_brute <= 180 && !H.suiciding && !ghost && tplus < tlimit && !HAS_TRAIT(H, TRAIT_HUSK) && !HAS_TRAIT(H, TRAIT_BADDNA) && H.blood_volume > BLOOD_VOLUME_SURVIVE && (H.get_int_organ(/obj/item/organ/internal/heart) || H.get_int_organ(/obj/item/organ/internal/brain/slime)))
tobehealed = min(health + threshold, 0) // It's HILARIOUS without this min statement, let me tell you
tobehealed -= 5 //They get 5 of each type of damage healed so excessive combined damage will not immediately kill them after they get revived