From 50a3cf87fe478b3d8a7984d77e01965b93ae1c20 Mon Sep 17 00:00:00 2001 From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Date: Mon, 19 Feb 2024 11:34:41 -0500 Subject: [PATCH] Vampires can gain blood for a minute from people who succumb --- code/__HELPERS/trait_helpers.dm | 1 + code/_globalvars/traits.dm | 3 ++- code/modules/antagonists/vampire/vamp_datum.dm | 2 +- code/modules/mob/living/living.dm | 4 ++++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/code/__HELPERS/trait_helpers.dm b/code/__HELPERS/trait_helpers.dm index b19bf436541..65354ebc0dd 100644 --- a/code/__HELPERS/trait_helpers.dm +++ b/code/__HELPERS/trait_helpers.dm @@ -223,6 +223,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_CAN_VIEW_HEALTH "can_view_health" // Also used for /Stat #define TRAIT_MAGPULSE "magnetificent" // Used for anything that is magboot related #define TRAIT_NOSLIP "noslip" +#define TRAIT_RECENTLY_SUCCUMBED "recently_succumbed" //***** MIND TRAITS *****/ #define TRAIT_HOLY "is_holy" // The mob is holy in regards to religion diff --git a/code/_globalvars/traits.dm b/code/_globalvars/traits.dm index 159b0cb0baa..0612f8abe6b 100644 --- a/code/_globalvars/traits.dm +++ b/code/_globalvars/traits.dm @@ -87,7 +87,8 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_BADASS" = TRAIT_BADASS, "TRAIT_FORCED_STANDING" = TRAIT_FORCED_STANDING, "TRAIT_NOSLIP" = TRAIT_NOSLIP, - "TRAIT_MAGPULSE" = TRAIT_MAGPULSE + "TRAIT_MAGPULSE" = TRAIT_MAGPULSE, + "TRAIT_RECENTLY_SUCCUMBED " = TRAIT_RECENTLY_SUCCUMBED ), /datum/mind = list( diff --git a/code/modules/antagonists/vampire/vamp_datum.dm b/code/modules/antagonists/vampire/vamp_datum.dm index d05fd904e83..6dc4caf483d 100644 --- a/code/modules/antagonists/vampire/vamp_datum.dm +++ b/code/modules/antagonists/vampire/vamp_datum.dm @@ -135,7 +135,7 @@ continue - if(H.stat < DEAD) + if(H.stat < DEAD || HAS_TRAIT(H, TRAIT_RECENTLY_SUCCUMBED)) if(H.ckey || H.player_ghosted) //Requires ckey regardless if monkey or humanoid, or the body has been ghosted before it died blood = min(20, H.blood_volume) adjust_blood(H, blood * BLOOD_GAINED_MODIFIER) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 13a8c62a1ca..beb6228a8b4 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -320,7 +320,11 @@ else death() to_chat(src, "You have given up life and succumbed to death.") + ADD_TRAIT(src, TRAIT_RECENTLY_SUCCUMBED, "succumb") + addtimer(CALLBACK(src, PROC_REF(remove_succumbed)), 1 MINUTES) +/mob/living/proc/remove_succumbed() + REMOVE_TRAIT(src, TRAIT_RECENTLY_SUCCUMBED, "succumb") /mob/living/proc/InCritical() return (health < HEALTH_THRESHOLD_CRIT && health > HEALTH_THRESHOLD_DEAD && stat == UNCONSCIOUS)