Zombie Stuff (#10499)

This commit is contained in:
Geeves
2020-11-17 10:15:09 +01:00
committed by GitHub
parent 2042dafb69
commit ae46ed4a04
36 changed files with 263 additions and 57 deletions
+1 -1
View File
@@ -1005,7 +1005,7 @@ Note that amputating the affected organ does in fact remove the infection from t
"<span class='warning'><font size=2>You hear a loud cracking sound coming from \the [owner]!</font></span>",\
"<span class='danger'><font size=3>Something feels like it [message] in your [name]!</font></span>",\
"You hear a sickening crack!")
if(owner.species && (owner.can_feel_pain()))
if(owner.species && owner.can_feel_pain())
owner.emote("scream")
owner.flash_strong_pain()
+39 -3
View File
@@ -215,17 +215,53 @@
icon_state = "blacktumor"
dead_icon = "blacktumor"
organ_tag = "zombie"
parent_organ = BP_CHEST
organ_tag = BP_ZOMBIE_PARASITE
parent_organ = BP_HEAD
stage_interval = 150
var/last_heal = 0
var/heal_rate = 5 SECONDS
/obj/item/organ/internal/parasite/zombie/process()
..()
if (!owner)
return
if(length(owner.bad_external_organs) && last_heal + heal_rate < world.time && iszombie(owner))
var/list/organs_to_heal = owner.bad_external_organs
shuffle(organs_to_heal)
for(var/thing in organs_to_heal)
var/obj/item/organ/external/O = thing
if(istype(O, /obj/item/organ/external/head)) // the head is the weak point
continue
var/healed = FALSE
if(O.status & ORGAN_ARTERY_CUT)
O.status &= ~ORGAN_ARTERY_CUT
owner.visible_message(SPAN_WARNING("The severed artery in \the [owner]'s [O] stitches itself back together..."), SPAN_NOTICE("The severed artery in your [O] stitches itself back together..."))
healed = TRUE
else if(O.status & ORGAN_TENDON_CUT)
O.status &= ~ORGAN_TENDON_CUT
owner.visible_message(SPAN_WARNING("The severed tendon in \the [owner]'s [O] stitches itself back together..."), SPAN_NOTICE("The severed tendon in your [O] stitches itself back together..."))
healed = TRUE
else if(O.status & ORGAN_BROKEN)
var/list/brute_wounds = list()
for(var/wound in O.wounds)
var/datum/wound/W = wound
if(W.damage_type in list(CUT, BRUISE, PIERCE))
brute_wounds += W
for(var/wound in brute_wounds)
var/datum/wound/W = wound
W.damage = max(min(W.damage, (O.min_broken_damage / length(brute_wounds))), 0)
O.status &= ~ORGAN_BROKEN
owner.visible_message(SPAN_WARNING("The shattered bone in \the [owner]'s [O] melds back together..."), SPAN_NOTICE("The shattered bone in your [O] melds back together..."))
healed = TRUE
if(healed)
last_heal = world.time
heal_rate += 2 SECONDS
O.update_damages()
break
if(prob(10) && (owner.can_feel_pain()))
to_chat(owner, "<span class='warning'>You feel a burning sensation on your skin!</span>")
owner.make_jittery(10)
+5
View File
@@ -211,3 +211,8 @@
. = ..()
if(owner)
owner.brokejaw = 0
/obj/item/organ/external/head/droplimb(var/clean, var/disintegrate = DROPLIMB_EDGE, var/ignore_children = null)
if(iszombie(owner))
return ..(disintegrate = DROPLIMB_BLUNT)
return ..()