Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions code/__DEFINES/antagonists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,9 @@
#define IS_VASSAL(mob) (mob?.mind?.has_antag_datum(/datum/antagonist/vassal))
#define IS_MONSTERHUNTER(mob) (mob?.mind?.has_antag_datum(/datum/antagonist/monsterhunter))

//Zombie defines
#define SMOKER "Smoker"
#define RUNNER "Runner"
#define SPITTER "Spitter"
#define JUGGERNAUT "Juggernaut"
#define BRAINY "Brainy"
10 changes: 8 additions & 2 deletions code/__DEFINES/is_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list(
#define isslimeperson(A) (is_species(A, /datum/species/jelly/slime))
#define isluminescent(A) (is_species(A, /datum/species/jelly/luminescent))
#define iszombie(A) (is_species(A, /datum/species/zombie))
#define isinfectedzombie(A) (is_species(A, /datum/species/zombie/infectious/gamemode))
#define isspitter(A) (is_species(A, /datum/species/zombie/infectious/gamemode/spitter))
#define isskeleton(A) (is_species(A, /datum/species/skeleton))
#define ismoth(A) (is_species(A, /datum/species/moth))
#define ishumanbasic(A) (is_species(A, /datum/species/human))
Expand All @@ -87,6 +85,14 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list(
#define isandroid(A) (is_species(A, /datum/species/android))
#define isdummy(A) (istype(A, /mob/living/carbon/human/dummy))

//zombie gamemode mobs and species
#define isinfectedzombie(A) (is_species(A, /datum/species/zombie/infectious/gamemode))
#define issmoker(A) (is_species(A, /datum/species/zombie/infectious/gamemode/smoker))
#define isrunner(A) (is_species(A, /datum/species/zombie/infectious/gamemode/runner))
#define isspitter(A) (is_species(A, /datum/species/zombie/infectious/gamemode/spitter))
#define isjuggernaut(A) (is_species(A, /datum/species/zombie/infectious/gamemode/juggernaut))
#define isbrainy(A) (istype(A, /mob/living/simple_animal/horror/brainy))

//more carbon mobs
#define ismonkey(A) (istype(A, /mob/living/carbon/monkey))

Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/status_effects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@

#define STATUS_EFFECT_BRAZIL_PENANCE /datum/status_effect/brazil_penance //controls heretic sacrifice

#define STATUS_EFFECT_ZOMBIE_ACID /datum/status_effect/zombie_acid //spitter zombie ability acid effect

#define STATUS_EFFECT_ZOMBIE_ROT /datum/status_effect/zombie_rot //prevents healing from happening + slowly damages you

#define STATUS_EFFECT_EXHUMED /datum/status_effect/exhumed //controls the rate of aides reviving

/////////////
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@
#define TRAIT_BADMAIL "badmail" //Your mail is going to be worse than average
#define TRAIT_SHORT_TELOMERES "short_telomeres" //You cannot be CLOONED
#define TRAIT_LONG_TELOMERES "long_telomeres" //You get CLOONED faster!!!
#define TRAIT_DODGE "dodge" //projectile pierce
#define TRAIT_NO_HEAL "no_heal" //exactly what you think

/// This person is crying
#define TRAIT_CRYING "crying"
Expand Down Expand Up @@ -352,6 +354,7 @@
#define HOLDER_TRAIT "holder_trait"
#define SINFULDEMON_TRAIT "sinfuldemon"
#define CHANGESTING_TRAIT "changesting"
#define ZOMBIE_TRAIT "zombie"
#define POSIBRAIN_TRAIT "positrait"

///Traits given by station traits
Expand Down
13 changes: 13 additions & 0 deletions code/__DEFINES/zombies.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
///Flags for each class
#define SMOKER_BITFLAG (1<<0)
#define RUNNER_BITFLAG (1<<1)
#define SPITTER_BITFLAG (1<<2)
#define JUGGERNAUT_BITFLAG (1<<3)
#define BRAINY_BITFLAG (1<<4)

///Upgrades for all classes.
#define SECTOR_COMMON "sector_common"
///Upgrades for a specific class.
#define SECTOR_CLASS "sector_class"
///Upgrades that fit under other conditions.
#define SECTOR_SPECIAL "sector_special"
4 changes: 4 additions & 0 deletions code/__DEFINES/{yogs_defines}/is_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@
#define is_syndicate(M) (istype(M, /mob/living) && is_traitor(M) || is_blood_brother(M) || is_nukeop(M) || is_infiltrator(M))

#define isspacepod(A) (istype(A, /obj/spacepod))

#define IS_INFECTED(M) (isliving(M) && M.mind?.has_antag_datum(/datum/antagonist/zombie))

#define IS_SPECIALINFECTED(M) (isliving(M) && M.mind?.has_antag_datum(/datum/antagonist/zombie/special))
6 changes: 6 additions & 0 deletions code/_onclick/hud/zombie.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/atom/movable/screen/zombie_infection
name = "infection"
icon = 'icons/mob/zombie_base.dmi'
icon_state = "zombie_counter"
screen_loc = ui_lingchemdisplay
invisibility = INVISIBILITY_ABSTRACT
54 changes: 54 additions & 0 deletions code/datums/components/zombie_infection.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/datum/component/zombie_infection
//see code\modules\zombie\items.dm
var/scaled_infection
var/infection_chance
var/organ_to_insert

/datum/component/zombie_infection/Initialize(scaled_infection = FALSE, infection_chance = 100, organ_to_insert = /obj/item/organ/zombie_infection)
if(!isitem(parent))
return COMPONENT_INCOMPATIBLE
src.scaled_infection = scaled_infection
src.infection_chance = infection_chance
src.organ_to_insert = organ_to_insert

/datum/component/zombie_infection/RegisterWithParent()
RegisterSignal(parent, COMSIG_ITEM_AFTERATTACK, .proc/spread_infection)

/datum/component/zombie_infection/UnregisterFromParent()
UnregisterSignal(parent, COMSIG_ITEM_AFTERATTACK)

/datum/component/zombie_infection/proc/spread_infection(obj/item/source, atom/target, mob/user, proximity_flag, click_parameters)
if(!proximity_flag)
return

if(!isliving(target))
return

if(ishuman(target))
var/mob/living/carbon/human/H = target
var/obj/item/bodypart/L = H.get_bodypart(check_zone(user.zone_selected))
if(H.health <= HEALTH_THRESHOLD_FULLCRIT || (L && L.status != BODYPART_ROBOTIC))//no more infecting via metal limbs unless they're in hard crit and probably going to die
var/flesh_wound = ran_zone(user.zone_selected)
if(scaled_infection)
var/scaled_infection = ((100 - H.getarmor(flesh_wound, MELEE))/100) ^ 1.5 //20 armor -> 71.5% chance of infection
if(prob(infection_chance * scaled_infection)) //40 armor -> 46.5% chance
try_to_zombie_infect(target, organ_to_insert) //60 armor -> 25.3% chance
else //80 armor -> 8.9% chance
if(prob(infection_chance - H.getarmor(flesh_wound, MELEE)))
try_to_zombie_infect(target, organ_to_insert)
else
check_feast(target, user)

/datum/component/zombie_infection/proc/check_feast(mob/living/target, mob/living/user)
if(target.stat != DEAD)
return
var/hp_gained = target.maxHealth
target.gib()
// zero as argument for no instant health update
user.adjustBruteLoss(-hp_gained, 0)
user.adjustToxLoss(-hp_gained, 0)
user.adjustFireLoss(-hp_gained, 0)
user.adjustCloneLoss(-hp_gained, 0)
user.updatehealth()
user.adjustOrganLoss(ORGAN_SLOT_BRAIN, -hp_gained) // Zom Bee gibbers "BRAAAAISNSs!1!"
user.set_nutrition(min(user.nutrition + hp_gained, NUTRITION_LEVEL_FULL))
97 changes: 97 additions & 0 deletions code/datums/status_effects/debuffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1218,6 +1218,103 @@
to_chat(tamer, span_notice("[M] is now friendly after exposure to the flowers!"))
. = ..()

/datum/status_effect/zombie_acid
id = "zombie_acid"
status_type = STATUS_EFFECT_UNIQUE
examine_text = span_warning("SUBJECTPRONOUN is covered with a repugnant green goo, throwing water should help a bit.")
tick_interval = 1 SECONDS
alert_type = /atom/movable/screen/alert/status_effect/zombie_acid
var/mutable_appearance/acid_overlay
COOLDOWN_DECLARE(message_cooldown)
var/cooldown = 10 SECONDS

/datum/status_effect/zombie_acid/on_apply()
acid_overlay = mutable_appearance('icons/effects/effects.dmi', "acid")
owner.add_overlay(acid_overlay)
return TRUE

/datum/status_effect/zombie_acid/tick()
. = ..()
RegisterSignal(owner, list(COMSIG_MOVABLE_BUMP, COMSIG_MOVABLE_CROSSED), .proc/check_destroy)
if(get_turf(owner) == /turf/open/indestructible/sound/pool || owner.stat == DEAD)
owner.visible_message("The acid washes off of [owner]!")
qdel(src)
owner.adjustFireLoss(1.25)
if(COOLDOWN_FINISHED(src, message_cooldown))
to_chat(owner, span_danger("The acid burns you badly!"))
COOLDOWN_START(src, message_cooldown, cooldown)

/datum/status_effect/zombie_acid/proc/check_destroy(mob/user, atom/cleaner)
if(istype(cleaner, /obj/machinery/shower))
var/obj/machinery/shower/S
if(S.on)
qdel(src)
if(istype(cleaner, /obj/effect/particle_effect/water))
qdel(src)

/datum/status_effect/zombie_acid/Destroy()
UnregisterSignal(owner, list(COMSIG_MOVABLE_BUMP, COMSIG_MOVABLE_CROSSED))
QDEL_NULL(acid_overlay)
. = ..()

/atom/movable/screen/alert/status_effect/zombie_acid
name = "Zombie Acid"
desc = "ACID! ACID! I NEED WATER, WASH IT OFF!"
icon_state = "zombie_acid"
alerttooltipstyle = "cult"

/datum/status_effect/zombie_rot
id = "rot"
status_type = STATUS_EFFECT_UNIQUE
tick_interval = -1
alert_type = /atom/movable/screen/alert/status_effect/zombie_rot
examine_text = span_warning("SUBJECTPRONOUN has black, dead tissue all over!")
tick_interval = 1 SECONDS
var/mutable_appearance/rot_overlay

/datum/status_effect/zombie_rot/on_apply()
rot_overlay = mutable_appearance('icons/effects/effects.dmi', "rot", -UNDER_SUIT_LAYER)
owner.add_overlay(rot_overlay)
ADD_TRAIT(owner, TRAIT_NO_HEAL, ZOMBIE_TRAIT) //fucked up
return TRUE

/datum/status_effect/zombie_rot/tick()
. = ..()
if(owner.stat == DEAD)
owner.visible_message("[owner]s skin completely falls off!")
qdel(src)
RegisterSignal(owner, COMSIG_PARENT_ATTACKBY, .proc/check_items)
owner.adjustBruteLoss(2)

/datum/status_effect/zombie_rot/proc/check_items(datum/source, obj/item/the_item, mob/living/user)
if(!the_item.get_sharpness() == SHARP_EDGED)
to_chat(owner, span_warning("You need a sharper item!"))
return
if(!do_after(user, 7 SECONDS, owner))
if(user == owner)
to_chat(owner, span_warning("You lose focus and cut yourself!"))
else
to_chat(user, span_warning("You lose focus and cut [owner]s skin badly!"))
owner.adjustBruteLoss(10)
return
if(user == owner)
to_chat(owner, span_notice("You cut the rot off yourself!"))
else
to_chat(user, span_notice("You cut the rot off of [owner]s body!"))
qdel(src)

/datum/status_effect/zombie_rot/Destroy()
UnregisterSignal(owner, COMSIG_PARENT_ATTACKBY)
QDEL_NULL(rot_overlay)
REMOVE_TRAIT(owner, TRAIT_NO_HEAL, ZOMBIE_TRAIT)
. = ..()

/atom/movable/screen/alert/status_effect/zombie_rot
name = "Rotting"
desc = "Your body is starting to necrose, you'll need to cut the rotten parts off with something sharp!"
icon_state = "rot"
alerttooltipstyle = "cult"

/datum/status_effect/exhumed
id = "exhume"
tick_interval = -1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

GLOBAL_LIST_EMPTY(zombies)

/proc/isinfected(mob/living/M)
return istype(M) && M.mind && M.mind.has_antag_datum(/datum/antagonist/zombie)


/datum/game_mode/zombie
name = "zombie"
config_tag = "zombie"
Expand Down Expand Up @@ -57,43 +53,20 @@ GLOBAL_LIST_EMPTY(zombies)

if(people_to_infect.len >= required_enemies)
return TRUE
else
setup_error = "Not enough zombie candidates."
return FALSE

/datum/game_mode/zombie/proc/can_evolve_tier_2()
var/count = 0
for(var/Z in GLOB.zombies)
var/datum/mind/zombie = Z
if(!zombie.current)
continue
var/mob/living/carbon/human/H = zombie.current
if(H)
if(H.stat == DEAD || QDELETED(H))
continue
if(istype(H.dna.species, /datum/species/zombie/infectious/gamemode/necromancer))
count++
else if(istype(H.dna.species, /datum/species/zombie/infectious/gamemode/coordinator))
count++

if(count < actual_roundstart_zombies)
return TRUE
setup_error = "Not enough zombie candidates."
return FALSE

/datum/game_mode/zombie/post_setup()
main_team = new

main_team.setup_objectives()

for(var/M in people_to_infect)
var/datum/mind/minds = M
var/datum/antagonist/zombie/antag = add_zombie(minds)
if(!istype(antag))
continue
for(var/datum/mind/minds in people_to_infect)
var/datum/antagonist/zombie/special/antag = add_zombie(minds)
actual_roundstart_zombies++
antag.start_timer()

addtimer(CALLBACK(src, .proc/call_shuttle), 60 MINUTES) //Shuttle called after 1 hour if it hasn't been
addtimer(CALLBACK(src, .proc/call_shuttle), 1 HOURS) //Shuttle called after 1 hour if it hasn't been
. = ..()

/datum/game_mode/zombie/proc/call_shuttle()
Expand All @@ -119,8 +92,8 @@ GLOBAL_LIST_EMPTY(zombies)
return FALSE

/datum/game_mode/zombie/generate_report()
return "We have lost contact with some local mining outposts. Our rescue teams have found nothing but decaying and rotting corpses. On one of the ships, a body in the morgue 'woke' up and started attacking the crew \
People seem to 'turn' when attacked by these... Creatures.. We currently estimate their threat level to be VERY HIGH. If the virus somehow makes it onboard your station, send a report to Central Command immediately.\
The only way to truly kill them is to chop their heads off. We have spotted abnormal evolutions amongst the creatures, suggesting that they have the ability to adapt to the people fighting them. Keep your guard up crew."
return "After an unknown alien encounter, we have lost contact with some local mining outposts. Our rescue teams have found nothing but decaying and rotting corpses. On one of the ships, a body in the morgue 'woke' up and started attacking the crew \
People seem to 'turn' when attacked by these... Creatures.. We currently estimate their threat level to be VERY HIGH. If they somehow makes it onboard your station, send a report to Central Command immediately.\
The only way to truly kill them is to incinerate or severely mangle them. We have spotted abnormal evolutions amongst the creatures, suggesting that they have the ability to adapt to the people fighting them. Keep your guard up crew."

#undef ZOMBIE_SCALING_COEFFICIENT
30 changes: 30 additions & 0 deletions code/game/gamemodes/zombie/zombie_hud.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/datum/hud
var/atom/movable/screen/zombie_infection/infection_display

/datum/hud/New(mob/owner, ui_style = 'icons/mob/screen_midnight.dmi')
. = ..()
infection_display = new /atom/movable/screen/zombie_infection

/datum/hud/human/New(mob/living/carbon/human/owner, ui_style = 'icons/mob/screen_midnight.dmi')
. = ..()
infection_display = new /atom/movable/screen/zombie_infection
infodisplay += infection_display

/datum/hud/Destroy()
. = ..()
infection_display = null

//////////////////////////// for brainy simplemob //////////////////////////

/datum/hud/zombie
ui_style = 'icons/mob/screen_midnight.dmi'

/datum/hud/zombie/New(mob/owner)
. = ..()
infection_display = new /atom/movable/screen/zombie_infection
infodisplay += infection_display

/datum/hud/zombie/Destroy()
. = ..()
QDEL_NULL(infection_display)

Empty file.
27 changes: 27 additions & 0 deletions code/game/objects/effects/alien_acid.dm
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,30 @@
visible_message(span_warning("[target] is struggling to withstand the acid!"))
if(4)
visible_message(span_warning("[target] begins to crumble under the acid!"))

/obj/effect/acid_puddle
gender = PLURAL
name = "acid puddle"
desc = "Burbling corrosive stuff."
icon_state = "acid_puddle"
density = FALSE
opacity = 0
anchored = TRUE
resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF
layer = ABOVE_NORMAL_TURF_LAYER
var/uses = 2

/obj/effect/acid_puddle/Crossed(AM as mob|obj)
. = ..()
if(isliving(AM))
var/mob/living/L = AM
if(iszombie(L))
return
L.apply_status_effect(STATUS_EFFECT_ZOMBIE_ACID)
L.adjustFireLoss(10)
to_chat(L, span_warning("As you step into the acid puddle, it splashes all over you!"))
uses--
if(!uses)
visible_message(span_warning("The [src] dries up!"))
new /obj/effect/decal/cleanable/greenglow(get_turf(src))
qdel(src)
Loading