From 7b7ddccbbc0034985e388303d7167ba947caedce Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Fri, 22 Sep 2017 22:32:22 -0500 Subject: [PATCH] [MIRROR] Zombies cease healing for 6 seconds after taking damage (#2897) * Zombies cease healing for 6 seconds after taking damage (#30885) * Automatic changelog generation for PR #30056 [ci skip] * Delete AutoChangeLog-pr-30056.yml * Organic var for Organs * Update liver.dm * Zombie healing ceases in combat * Update zombies.dm * Update liver.dm * Update organ_internal.dm * TIMER_OVERRIDE * 2 equal signs * New condition structure * UNIQUE and OVERRIDE * Removes timer * Zombies cease healing for 6 seconds after taking damage --- .../living/carbon/human/species_types/zombies.dm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/species_types/zombies.dm b/code/modules/mob/living/carbon/human/species_types/zombies.dm index 7c25b4d3cb..04123102c0 100644 --- a/code/modules/mob/living/carbon/human/species_types/zombies.dm +++ b/code/modules/mob/living/carbon/human/species_types/zombies.dm @@ -1,3 +1,5 @@ +#define REGENERATION_DELAY 60 // After taking damage, how long it takes for automatic regeneration to begin + /datum/species/zombie // 1spooky name = "High Functioning Zombie" @@ -20,14 +22,21 @@ armor = 20 // 120 damage to KO a zombie, which kills it speedmod = 2 mutanteyes = /obj/item/organ/eyes/night_vision/zombie + var/regen_cooldown = 0 /datum/species/zombie/infectious/spec_stun(mob/living/carbon/human/H,amount) . = min(2, amount) +/datum/species/zombie/infectious/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked, mob/living/carbon/human/H) + . = ..() + if(.) + regen_cooldown = world.time + REGENERATION_DELAY + /datum/species/zombie/infectious/spec_life(mob/living/carbon/C) . = ..() C.a_intent = INTENT_HARM // THE SUFFERING MUST FLOW - C.heal_overall_damage(4,4) + if(regen_cooldown < world.time) + C.heal_overall_damage(4,4) if(prob(4)) playsound(C, pick(spooks), 50, TRUE, 10) if(C.InCritical()) @@ -56,3 +65,5 @@ sexes = 0 meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/zombie mutant_organs = list(/obj/item/organ/tongue/zombie) + +#undef REGENERATION_DELAY