Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Zombies added to gamelay, although not random events.
- Loading branch information
1 parent
a12cd4b
commit d1f5b1a
Showing
11 changed files
with
379 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
/datum/disease/zombie_transformation //Labeling the class as an effect type | ||
name = "zombie virus" | ||
max_stages = 5 | ||
spread_type = CONTACT_GENERAL //Maybe switch back to hands? | ||
hidden = list(1, 0) | ||
cure = "Spaceacillin" | ||
cure_id ="necrocure" | ||
cure_list = list("necrocure", "zmeat") | ||
cure_chance = 5 | ||
holder = /mob/living/simple_animal/hostile/zombie | ||
agent = "Necrophobes T" | ||
affected_species = list("Human", "Monkey") //Monkeys can carry the virus but are not directly affected by it | ||
desc = null | ||
severity = "DANGEROUS" | ||
permeability_mod = 0.8 | ||
contagious_period = 0 | ||
var/gibbed = 0 | ||
var/faction = "undead" | ||
stage_minimum_age = 110 | ||
stage_prob = 10 | ||
longevity = 600 | ||
|
||
/datum/disease/zombie_transformation/stage_act() | ||
if(istype(affected_mob, /mob/living/simple_animal/hostile/zombie)) //Double check first, suppose to stop zombie from curing itself... | ||
return //Do nothing | ||
..() //There is still a chance that the dead body will "cure" itself, anybody killed by zeds will probably either cure or turn | ||
if(affected_mob.stat == 2 && !istype(affected_mob, /mob/living/carbon/monkey)) | ||
sleep(rand(10,3000)) | ||
affected_mob:Turnundead() //Doesn't support turning monkies undead | ||
return //add turn zombie | ||
if(istype(affected_mob, /mob/living/carbon/human)) //Percents might be a little high | ||
switch(stage) | ||
if(2) | ||
if(prob(4)) | ||
affected_mob << "\blue You feel hot." | ||
affected_mob.bodytemperature += 10 | ||
if(prob(4)) | ||
affected_mob.say("*cough") | ||
return | ||
if(prob(1)) | ||
affected_mob << "\red You smell meat." | ||
if(3) | ||
if(prob(8)) | ||
affected_mob << "\red Your skin itches." | ||
var/vatk_target = pick("head", "chest", "l_hand", "r_hand", "l_leg", "r_leg") | ||
affected_mob.apply_damage(2, BRUTE, vatk_target) | ||
if(prob(5)) | ||
affected_mob << "\red Your stomache hurts." | ||
affected_mob.nutrition -= 20 | ||
return | ||
if(prob(5)) | ||
affected_mob << "\red You are feeling tired." | ||
affected_mob.drowsyness += 5 | ||
if(4) | ||
if(prob(3)) | ||
affected_mob.say("*choke") | ||
var/vatk_target = pick("head", "chest") | ||
affected_mob.apply_damage(5, BRUTE, vatk_target) | ||
var/turf/simulated/pos = get_turf(affected_mob) | ||
pos.add_blood_floor(affected_mob) | ||
playsound(pos, 'sound/effects/splat.ogg', 50, 1) | ||
//add blood effect | ||
if(prob(15)) | ||
affected_mob.hallucination += 5 | ||
if(prob(8)) | ||
affected_mob << pick("\red Kill them.", "\red You are not going to escape", "\red They won't miss their legs.") | ||
affected_mob.hallucination += 25 | ||
return | ||
if(prob(2)) | ||
affected_mob << "\blue Through sheer will you're holding your sanity together." | ||
affected_mob.hallucination = 0 | ||
return | ||
if(prob(7)) | ||
affected_mob.custom_emote(1, "is having trouble keeping their eyes open.") | ||
affected_mob.drowsyness += 2 | ||
return | ||
if(prob(1)) | ||
affected_mob << pick("\red You come to the realization that you're infected and possibly about to turn.") | ||
affected_mob.nutrition -= 50 | ||
affected_mob.drowsyness += 30 | ||
affected_mob.hallucination = 0 | ||
var/vatk_target = pick("head", "chest", "l_hand", "r_hand", "l_leg", "r_leg") | ||
affected_mob.apply_damage(20, BRUTE, vatk_target) | ||
if(5) | ||
if(!istype(affected_mob, /mob/living/carbon/monkey)) | ||
affected_mob:Turnundead() | ||
|
||
/datum/disease/zombie_transformation/process() //Almost the same thing, a few tweaks needed for dead people. | ||
if(!holder) | ||
active_diseases -= src | ||
return | ||
if(prob(65)) | ||
spread(holder) | ||
|
||
if(affected_mob.faction == null) | ||
cure(0) | ||
return | ||
|
||
if(affected_mob) | ||
for(var/datum/disease/D in affected_mob.viruses) | ||
if(D != src) | ||
if(IsSame(D)) | ||
//error("Deleting [D.name] because it's the same as [src.name].") | ||
del(D) // if there are somehow two viruses of the same kind in the system, delete the other one | ||
|
||
if(holder == affected_mob) | ||
if(affected_mob.stat != DEAD) //he's alive | ||
stage_act() | ||
else //he's dead. | ||
if(spread_type!=SPECIAL) | ||
spread_type = CONTACT_GENERAL | ||
stage_act() //Dead and not a zombie, should act | ||
|
||
if(affected_mob.faction == "undead" || istype(affected_mob, /mob/living/carbon/monkey) && affected_mob.stat == 2) //the virus is in inanimate obj, dead zed, or monkey | ||
if(prob(70)) | ||
if(--longevity<=0) | ||
cure(0) | ||
return |
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,50 @@ | ||
/datum/event/zombie_outbreak | ||
startWhen = 40 | ||
announceWhen = 20 | ||
endWhen = 800 | ||
oneShot = 1 //DON'T SPAWN ANOTHER OUTBREAK, one is bad enough | ||
var/spawncount = 12 //Base zombie count | ||
|
||
/datum/event/carp_migration/setup() | ||
announceWhen = rand(10, 40) | ||
startWhen = rand(announceWhen, 50) //Doesn't pick anything before announcement | ||
endWhen = rand(600,1200) | ||
|
||
/datum/event/zombie_outbreak/start() | ||
var/count = 0 | ||
if(player_list.len < 12) | ||
count = 2 | ||
else if(player_list.len < 22) | ||
count = 1 | ||
else | ||
count = 0 | ||
for(count, count < 3, count++) | ||
for(var/mob/living/carbon/F in living_mob_list) //Has a chance to spawn zombies on players or mobs | ||
sleep(20) | ||
if(prob(40)) | ||
var/mob/living/simple_animal/hostile/zombie/ZEDS = new(F.loc) //Have to give a var that's under zombie and call new. | ||
playsound(F.loc, 'sound/effects/phasein.ogg', vol = 80, vary = 1,extrarange = 6) | ||
|
||
//Ripped spider_infestation code | ||
var/list/vents = list() | ||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world) | ||
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network) | ||
if(temp_vent.network.normal_members.len > 50) | ||
vents += temp_vent | ||
|
||
while((spawncount >= 1) && vents.len) | ||
sleep(5) | ||
var/obj/vent = pick(vents) | ||
var/mob/living/simple_animal/hostile/zombie/ZEDS = new(vent.loc) | ||
playsound(vent.loc, 'sound/effects/phasein.ogg', vol = 80, vary = 1,extrarange = 6) | ||
vents -= vent | ||
spawncount-- | ||
|
||
/datum/event/zombie_outbreak/announce() | ||
var/alertshouted = pick( | ||
"A Boscalian ship has jumped into our sector.", | ||
"Unidentified vessel has passed our perimeter, detecting blue technology.", | ||
"Detecting Syndicate signal.", | ||
"Biological scans picking up level 10 biohazard. Please find the nearest BioHazard locker and prepare for sterilization procedures.") | ||
command_alert(alertshouted) | ||
world << sound('sound/AI/spanomalies.ogg') |
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,73 @@ | ||
//Locking movement speed //This doesn't do anything. | ||
var/const/move_speed = 1 | ||
var/const/m_intent = "walk" | ||
var/const/speed = -1 | ||
|
||
|
||
/mob/living/simple_animal/hostile/zombie | ||
name = "zombie" | ||
desc = "Cannablism at its best." | ||
icon = 'icons/mob//otherHuman/human.dmi' | ||
icon_state = "zombie_s" | ||
icon_living = "zombie_s" | ||
icon_dead = "zombie_l" | ||
speak = list("...", "f...a.", "rrrhhn", "..zzzooo..", "..phleahsh..") | ||
emote_see = list("starts moving towards flesh", "turns") | ||
speak_chance = 1 | ||
turns_per_move = 3 | ||
response_help = "unphazed" | ||
response_disarm = "shoves" | ||
response_harm = "hits" | ||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat/undead | ||
meat_amount = 1 | ||
stop_automated_movement_when_pulled = 0 | ||
maxHealth = 250 | ||
health = 250 | ||
move_to_delay = 6 //This is what slows down movement, change it if humans can outwalk a zombie | ||
|
||
harm_intent_damage = 2 | ||
melee_damage_lower = 7 | ||
melee_damage_upper = 19 | ||
attacktext = "bites" | ||
attack_sound = "sound/effects/bite.ogg" | ||
|
||
minbodytemp = 200 | ||
maxbodytemp = 340 | ||
cold_damage_per_tick = 4 //Zombies are almost immune to the cold | ||
heat_damage_per_tick = 50 //Zombies are extremely weak to fire | ||
|
||
min_oxy = 0 //These zombies don't need to breath | ||
max_oxy = 0 | ||
min_tox = 0 | ||
max_tox = 0 | ||
min_co2 = 0 | ||
max_co2 = 0 | ||
min_n2 = 0 | ||
max_n2 = 0 | ||
unsuitable_atoms_damage = 0 | ||
|
||
wall_smash = 1 //Add push as well? | ||
a_intent = "harm" | ||
faction = "undead" | ||
|
||
New() //Any zombie created will have the virus | ||
..() | ||
var/datum/disease/D = new /datum/disease/zombie_transformation | ||
D.holder = src | ||
D.affected_mob = src | ||
src.viruses += D | ||
|
||
SA_attackable(target_mob) | ||
if (isliving(target_mob)) | ||
var/mob/living/L = target_mob | ||
if(L.stat != DEAD) //Make sure the target is completely dead | ||
return (0) | ||
if (istype(target_mob,/obj/mecha)) | ||
var/obj/mecha/M = target_mob | ||
if (M.occupant) | ||
return (0) | ||
if (istype(target_mob,/obj/machinery/bot)) | ||
var/obj/machinery/bot/B = target_mob | ||
if(B.health > 0) | ||
return (0) | ||
return (1) |
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
Oops, something went wrong.