forked from NebulaSS13/Nebula
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added undead, skeletons and zombies.
- Loading branch information
1 parent
fb7cbd9
commit 6b21d41
Showing
9 changed files
with
134 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/decl/trait/undead | ||
name = "Undead" | ||
description = "Your body is dead, but remains animated through some supernatural force." | ||
levels = list(TRAIT_LEVEL_MINOR, TRAIT_LEVEL_MODERATE) // Moderate means skeleton, minor means zombie. | ||
|
||
/mob/living/carbon/human/proc/make_zombie() | ||
SetTrait(/decl/trait/metabolically_inert, TRAIT_LEVEL_EXISTS) | ||
SetTrait(/decl/trait/undead, TRAIT_LEVEL_MINOR) | ||
|
||
for(var/obj/item/organ/organ in get_organs()) | ||
organ.die() | ||
organ.damage = 0 // die() sets to max damage | ||
organ.germ_level = INFECTION_LEVEL_THREE | ||
|
||
// Set this so nonhumans look appropriately gross. | ||
reset_hair() | ||
if(get_bodytype()?.appearance_flags & HAS_SKIN_COLOR) | ||
_skin_colour = pick(COLOR_GRAY, COLOR_GRAY15, COLOR_GRAY20, COLOR_GRAY40, COLOR_GRAY80, COLOR_WHITE) | ||
SET_HAIR_COLOUR(src, _skin_colour, TRUE) | ||
SET_FACIAL_HAIR_COLOUR(src, _skin_colour, TRUE) | ||
|
||
for(var/obj/item/organ/external/limb in get_external_organs()) | ||
if(!BP_IS_PROSTHETIC(limb)) | ||
limb.sync_colour_to_human(src) | ||
if(prob(10)) | ||
limb.skeletonize() | ||
else if(prob(15)) | ||
if(prob(75)) | ||
limb.createwound(CUT, rand(limb.max_damage * 0.25, limb.max_damage * 0.5)) | ||
else | ||
limb.createwound(BURN, rand(limb.max_damage * 0.25, limb.max_damage * 0.5)) | ||
|
||
vessel.remove_any(vessel.total_volume * rand(0.2, 0.5)) | ||
update_body() | ||
|
||
/mob/living/carbon/human/proc/make_skeleton() | ||
SetTrait(/decl/trait/metabolically_inert, TRAIT_LEVEL_EXISTS) | ||
SetTrait(/decl/trait/undead, TRAIT_LEVEL_MODERATE) | ||
|
||
for(var/obj/item/organ/external/limb in get_external_organs()) | ||
if(!BP_IS_PROSTHETIC(limb)) | ||
limb.skeletonize() | ||
|
||
for(var/obj/item/organ/internal/organ in get_internal_organs()) | ||
remove_organ(organ, FALSE, FALSE, TRUE, FALSE, FALSE, TRUE) | ||
qdel(organ) | ||
|
||
vessel?.clear_reagents() | ||
SET_HAIR_STYLE(src, /decl/sprite_accessory/hair/bald, FALSE) | ||
update_body() | ||
|
||
// SKELETONS | ||
// Immune to blind or deaf, but weak to physical damage. | ||
/mob/living/carbon/human/skeleton/post_setup(var/species_name = null, var/datum/dna/new_dna = null) | ||
. = ..() | ||
make_skeleton() | ||
|
||
// ZOMBIES | ||
// Dead and rotting, but still mobile and aggressive. | ||
/mob/living/carbon/human/zombie/post_setup(var/species_name = null, var/datum/dna/new_dna = null) | ||
. = ..() | ||
make_zombie() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters