[MIRROR] Zombies can now succumb [MDB IGNORE] (#17411)

* Zombies can now succumb (#70883)

fixes #70877

Mobs with NODEATH can now succumb if they choose. The only mobs with
NODEATH are all zombies, memento mori and penthrite, of which zombies
are the only one that can ever enter hardcrit. I think it's fair to let
them die if they want.

High-functioning zombies can't succumb by whispering, but pressing the
succumb UI without whispering will succumb you

🆑
tweak: Mobs with NODEATH can now succumb (this is literally only
zombies)
/🆑

* Zombies can now succumb

Co-authored-by: Time-Green <timkoster1@hotmail.com>
This commit is contained in:
SkyratBot
2022-11-09 02:08:02 +00:00
committed by GitHub
co-authored by Time-Green
parent b4239520a5
commit 61a2b76eee
6 changed files with 36 additions and 6 deletions
+2
View File
@@ -244,6 +244,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_NOSOFTCRIT "nosoftcrit"
#define TRAIT_MINDSHIELD "mindshield"
#define TRAIT_DISSECTED "dissected"
/// Lets the user succumb even if they got NODEATH
#define TRAIT_SUCCUMB_OVERRIDE "succumb_override"
/// Can hear observers
#define TRAIT_SIXTHSENSE "sixth_sense"
#define TRAIT_FEARLESS "fearless"
+7 -2
View File
@@ -413,8 +413,13 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
if(!.)
return
var/mob/living/living_owner = owner
var/last_whisper = tgui_input_text(usr, "Do you have any last words?", "Goodnight, Sweet Prince")
if(isnull(last_whisper) || !CAN_SUCCUMB(living_owner))
var/last_whisper
if(!HAS_TRAIT(living_owner, TRAIT_SUCCUMB_OVERRIDE))
last_whisper = tgui_input_text(usr, "Do you have any last words?", "Goodnight, Sweet Prince")
if(isnull(last_whisper))
if(!HAS_TRAIT(living_owner, TRAIT_SUCCUMB_OVERRIDE))
return
if(!CAN_SUCCUMB(living_owner) && !HAS_TRAIT(living_owner, TRAIT_SUCCUMB_OVERRIDE))
return
if(length(last_whisper))
living_owner.say("#[last_whisper]")
@@ -16,6 +16,7 @@
TRAIT_NOBREATH,
TRAIT_NOCLONELOSS,
TRAIT_NODEATH,
TRAIT_SUCCUMB_OVERRIDE,
TRAIT_NOHUNGER,
TRAIT_NOMETABOLISM,
TRAIT_RADIMMUNE,
@@ -89,6 +90,23 @@
/// The cooldown before the zombie can start regenerating
COOLDOWN_DECLARE(regen_cooldown)
inherent_traits = list(
TRAIT_EASILY_WOUNDED,
TRAIT_EASYDISMEMBER,
TRAIT_FAKEDEATH,
TRAIT_LIMBATTACHMENT,
TRAIT_NOBREATH,
TRAIT_NOCLONELOSS,
TRAIT_NODEATH,
TRAIT_NOHUNGER,
TRAIT_NOMETABOLISM,
TRAIT_RADIMMUNE,
TRAIT_RESISTCOLD,
TRAIT_RESISTHIGHPRESSURE,
TRAIT_RESISTLOWPRESSURE,
TRAIT_TOXIMMUNE,
)
/datum/species/zombie/infectious/check_roundstart_eligible()
return FALSE
+1 -1
View File
@@ -188,7 +188,7 @@
*/
/mob/living/proc/update_succumb_action()
SIGNAL_HANDLER
if (CAN_SUCCUMB(src))
if (CAN_SUCCUMB(src) || HAS_TRAIT(src, TRAIT_SUCCUMB_OVERRIDE))
throw_alert(ALERT_SUCCUMB, /atom/movable/screen/alert/succumb)
else
clear_alert(ALERT_SUCCUMB)
+7 -2
View File
@@ -460,8 +460,13 @@
/mob/living/verb/succumb(whispered as null)
set hidden = TRUE
if (!CAN_SUCCUMB(src))
to_chat(src, text="You are unable to succumb to death! This life continues.", type=MESSAGE_TYPE_INFO)
return
if(HAS_TRAIT(src, TRAIT_SUCCUMB_OVERRIDE))
if(whispered)
to_chat(src, text="You are unable to succumb to death! Unless you just press the UI button.", type=MESSAGE_TYPE_INFO)
return
else
to_chat(src, text="You are unable to succumb to death! This life continues.", type=MESSAGE_TYPE_INFO)
return
log_message("Has [whispered ? "whispered his final words" : "succumbed to death"] with [round(health, 0.1)] points of health!", LOG_ATTACK)
adjustOxyLoss(health - HEALTH_THRESHOLD_DEAD)
updatehealth()
+1 -1
View File
@@ -487,7 +487,7 @@ GLOBAL_LIST_INIT(message_modes_stat_limits, list(
/mob/living/say_mod(input, list/message_mods = list())
if(message_mods[WHISPER_MODE] == MODE_WHISPER)
. = verb_whisper
else if(message_mods[WHISPER_MODE] == MODE_WHISPER_CRIT)
else if(message_mods[WHISPER_MODE] == MODE_WHISPER_CRIT && !HAS_TRAIT(src, TRAIT_SUCCUMB_OVERRIDE))
. = "[verb_whisper] in [p_their()] last breath"
else if(message_mods[MODE_SING])
. = verb_sing