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
@@ -392,7 +392,7 @@ This function restores all organs.
//Handle other types of damage
if(damagetype != BRUTE && damagetype != BURN)
if(!stat && damagetype == PAIN && (can_feel_pain()))
if(!stat && damagetype == PAIN)
if((damage > 25 && prob(20)) || (damage > 50 && prob(60)))
emote("scream")
@@ -65,14 +65,20 @@
if (W.infection_check())
W.germ_level += 1
/mob/living/carbon/human
var/next_stance_collapse = 0
/mob/living/carbon/human/proc/handle_stance()
// Don't need to process any of this if they aren't standing anyways
// unless their stance is damaged, and we want to check if they should stay down
if (!stance_damage && (lying || resting) && (life_tick % 4) == 0)
if(!stance_damage && (lying || resting))
return
stance_damage = 0
if(next_stance_collapse > world.time)
return
// Buckled to a bed/chair. Stance damage is forced to 0 since they're sitting on something solid
if (istype(buckled, /obj/structure/bed))
return
@@ -102,10 +108,11 @@
// standing is poor
if(stance_damage >= 4 || (stance_damage >= 2 && prob(5)))
if(!(lying || resting))
if(can_feel_pain())
emote("scream")
emote("collapse")
if(lying || resting)
return
emote("scream")
emote("collapse")
next_stance_collapse = world.time + (rand(8, 16) SECONDS)
/mob/living/carbon/human/proc/handle_grasp()
if(!l_hand && !r_hand)
@@ -177,11 +177,16 @@
break_cuffs = TRUE
has_organ = list(
"zombie" = /obj/item/organ/internal/parasite/zombie,
BP_BRAIN = /obj/item/organ/internal/brain,
BP_STOMACH = /obj/item/organ/internal/stomach
BP_ZOMBIE_PARASITE = /obj/item/organ/internal/parasite/zombie,
BP_BRAIN = /obj/item/organ/internal/brain,
BP_STOMACH = /obj/item/organ/internal/stomach
)
brute_mod = 0.5
burn_mod = 0.5
slowdown = 3
vision_flags = DEFAULT_SIGHT | SEE_MOBS
reagent_tag = IS_UNDEAD
@@ -195,13 +200,13 @@
flesh_color = "#76a05e"
flags = NO_BLOOD | NO_SCAN | NO_SLIP | NO_POISON | NO_PAIN | NO_BREATHE
flags = NO_BLOOD | NO_SCAN | NO_POISON | NO_PAIN | NO_BREATHE
appearance_flags = HAS_HAIR_COLOR | HAS_SKIN_TONE | HAS_LIPS | HAS_UNDERWEAR | HAS_EYE_COLOR | HAS_SOCKS
spawn_flags = IS_RESTRICTED
stamina = 500 //Tireless automatons
stamina_recovery = 1
sprint_speed_factor = 0.3
sprint_speed_factor = 0.1
exhaust_threshold = 0 //No oxyloss, so zero threshold
inherent_verbs = list(/mob/living/carbon/human/proc/darkness_eyes)
@@ -212,6 +217,8 @@
/datum/species/zombie/handle_post_spawn(var/mob/living/carbon/human/H)
H.mutations.Add(CLUMSY)
var/datum/martial_art/zombie/Z = new /datum/martial_art/zombie()
Z.teach(H)
return ..()
/datum/species/zombie/tajara
@@ -174,21 +174,24 @@
attack_name = "mandibles"
/datum/unarmed_attack/bite/infectious
shredding = 1
shredding = TRUE
/datum/unarmed_attack/bite/infectious/apply_effects(var/mob/living/carbon/human/user,var/mob/living/carbon/human/target,var/armor,var/attack_damage,var/zone)
..()
if(target && target.stat == DEAD)
if(!target || target.stat == DEAD)
return
if(target.internal_organs_by_name["zombie"])
to_chat(user, "<span class='danger'>You feel that \the [target] has been already infected!</span>")
if(target.internal_organs_by_name[BP_ZOMBIE_PARASITE])
to_chat(user, SPAN_WARNING("You feel that \the [target] has been already infected!"))
var/infection_chance = 80
infection_chance -= target.run_armor_check(zone,"melee")
if(prob(infection_chance))
if(target.reagents)
target.reagents.add_reagent(/datum/reagent/toxin/trioxin, 10)
var/inject_amount = 10
var/trioxin_amount = target.reagents.get_reagent_amount(/datum/reagent/toxin/trioxin)
if(inject_amount + trioxin_amount > ZOMBIE_MAX_TRIOXIN)
inject_amount = ZOMBIE_MAX_TRIOXIN - trioxin_amount
target.reagents.add_reagent(/datum/reagent/toxin/trioxin, inject_amount)
/datum/unarmed_attack/golem
attack_verb = list("smashed", "crushed", "rammed")
+24 -15
View File
@@ -111,22 +111,31 @@
return 1
return 0
/proc/iszombie(A)
if(ishuman(A))
var/mob/living/carbon/human/H = A
switch(H.get_species())
if(SPECIES_ZOMBIE)
return TRUE
if(SPECIES_ZOMBIE_TAJARA)
return TRUE
if(SPECIES_ZOMBIE_UNATHI)
return TRUE
if(SPECIES_ZOMBIE_SKRELL)
return TRUE
return FALSE
/proc/isundead(A)
if(istype(A, /mob/living/carbon/human))
switch(A:get_species())
if (SPECIES_SKELETON)
return 1
if (SPECIES_ZOMBIE)
return 1
if (SPECIES_ZOMBIE_TAJARA)
return 1
if (SPECIES_ZOMBIE_UNATHI)
return 1
if (SPECIES_ZOMBIE_SKRELL)
return 1
if (SPECIES_CULTGHOST)
return 1
return 0
if(ishuman(A))
var/mob/living/carbon/human/H = A
switch(H.get_species())
if(SPECIES_SKELETON)
return TRUE
if(SPECIES_CULTGHOST)
return TRUE
if(iszombie(A))
return TRUE
return FALSE
/proc/islesserform(A)
if(istype(A, /mob/living/carbon/human))