diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index b84208fba69..bbed15a5c3d 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -290,19 +290,36 @@ return TRUE /mob/living/verb/succumb() - set hidden = 1 - if(InCritical()) - create_attack_log("[src] has ["succumbed to death"] with [round(health, 0.1)] points of health!") - create_log(MISC_LOG, "has succumbed to death with [round(health, 0.1)] points of health") - adjustOxyLoss(health - HEALTH_THRESHOLD_DEAD) - // super check for weird mobs, including ones that adjust hp - // we don't want to go overboard and gib them, though - for(var/i = 1 to 5) - if(health < HEALTH_THRESHOLD_DEAD) - break - take_overall_damage(max(5, health - HEALTH_THRESHOLD_DEAD), 0) + set hidden = TRUE + if(health >= HEALTH_THRESHOLD_CRIT || stat != UNCONSCIOUS) + to_chat(src, "You are unable to succumb to death! This life continues!") + return + + var/last_words = input(src, "Do you have any last words?", "Goodnight, Sweet Prince") as text|null + + if(stat == DEAD) + // cancel em out if they died while they had the message box up + last_words = null + + if(!isnull(last_words)) + create_log(MISC_LOG, "gave their final words, [last_words]") + whisper(last_words) + + add_attack_logs(src, src, "[src] has [!isnull(last_words) ? "whispered [p_their()] final words" : "succumbed to death"] with [round(health, 0.1)] points of health!") + + create_log(MISC_LOG, "has succumbed to death with [round(health, 0.1)] points of health") + adjustOxyLoss(max(health - HEALTH_THRESHOLD_DEAD, 0)) + // super check for weird mobs, including ones that adjust hp + // we don't want to go overboard and gib them, though + for(var/i in 1 to 5) + if(health < HEALTH_THRESHOLD_DEAD) + break + take_overall_damage(max(5, health - HEALTH_THRESHOLD_DEAD), 0) + if(!isnull(last_words)) + addtimer(CALLBACK(src, PROC_REF(death)), 1 SECONDS) + else death() - to_chat(src, "You have given up life and succumbed to death.") + to_chat(src, "You have given up life and succumbed to death.") /mob/living/proc/InCritical()