diff --git a/code/WorkInProgress/virus2/base.dm b/code/WorkInProgress/virus2/base.dm
index ce2aec42040..4bd30bf08ca 100644
--- a/code/WorkInProgress/virus2/base.dm
+++ b/code/WorkInProgress/virus2/base.dm
@@ -113,7 +113,7 @@ proc/airborne_can_reach(turf/source, turf/target)
var/infectionchance = 10
var/speed = 1
var/spreadtype = "Blood" // Can also be "Airborne"
- var/stage = 1
+ var/stage = 0
var/stageprob = 10
var/dead = 0
var/clicks = 0
@@ -225,7 +225,7 @@ proc/airborne_can_reach(turf/source, turf/target)
if(mob.reagents.has_reagent("virusfood"))
mob.reagents.remove_reagent("virusfood",0.1)
clicks += 10
- if(clicks > stage*100 && prob(10))
+ if(clicks > (stage+1)*100 && prob(10))
if(stage == 4)
var/datum/disease2/resistance/res = new /datum/disease2/resistance(src)
src.cure(mob)
@@ -246,13 +246,13 @@ proc/airborne_can_reach(turf/source, turf/target)
if(stage>1)
E = effects[1]
E.effect.deactivate(mob)
- if(stage>2)
+ if(stage>=2)
E = effects[2]
E.effect.deactivate(mob)
- if(stage>3)
+ if(stage>=3)
E = effects[3]
E.effect.deactivate(mob)
- if(stage>4)
+ if(stage>=4)
E = effects[4]
E.effect.deactivate(mob)
@@ -272,6 +272,7 @@ proc/airborne_can_reach(turf/source, turf/target)
disease.spreadtype = spreadtype
disease.stageprob = stageprob
disease.antigen = antigen
+ disease.uniqueID = uniqueID
for(var/datum/disease2/effectholder/holder in effects)
// world << "adding effects"
var/datum/disease2/effectholder/newholder = new /datum/disease2/effectholder
diff --git a/code/game/gamemodes/epidemic/epidemic.dm b/code/game/gamemodes/epidemic/epidemic.dm
index 25a66eaac20..6a94e65dd1c 100644
--- a/code/game/gamemodes/epidemic/epidemic.dm
+++ b/code/game/gamemodes/epidemic/epidemic.dm
@@ -8,6 +8,12 @@
var/checkwin_counter =0
var/finished = 0
+ var/cruiser_arrival
+
+ var/virus_name = ""
+
+ var/stage = 0
+
///////////////////////////
//Announces the game type//
///////////////////////////
@@ -31,6 +37,51 @@
return 1
+/datum/game_mode/epidemic/proc/cruiser_seconds()
+ return (cruiser_arrival - world.time) / 10
+
+////////////////////// INTERCEPT ////////////////////////
+/// OVERWRITE THE INTERCEPT WITH A QUARANTINE WARNING ///
+/////////////////////////////////////////////////////////
+
+/datum/game_mode/epidemic/send_intercept()
+ var/intercepttext = "CONFIDENTIAL REPORT
"
+ virus_name = "X-[rand(1,99)]™"
+ intercepttext += "Warning: Pathogen [virus_name] has been detected on [station_name()].
"
+ intercepttext += "Code violet quarantine of [station_name()] put under immediate effect.
"
+ intercepttext += "Class [rand(2,5)] cruiser has been dispatched. ETA: [round(cruiser_seconds() / 60)] minutes.
"
+ intercepttext += "
Instructions
"
+ intercepttext += "* ELIMINATE THREAT WITH EXTREME PREJUDICE. [virus_name] IS HIGHLY CONTAGIOUS. INFECTED CREW MEMBERS MUST BE QUARANTINED IMMEDIATELY.
"
+ intercepttext += "* [station_name()] is under QUARANTINE. Any vessels outbound from [station_name()] will be tracked down and destroyed.
"
+ intercepttext += "* The existence of [virus_name] is highly confidential. To prevent a panic, only high-ranking staff members are authorized to know of its existence. Crew members that illegally obtained knowledge of [virus_name] are to be neutralized.
"
+ intercepttext += "* A cure is to be researched immediately, but NanoTrasen intellectual property must be respected. To prevent knowledge of [virus_name] from falling into unauthorized hands, all medical staff that work with the pathogen must be enhanced with a NanoTrasen loyality implant.
"
+
+
+ for (var/obj/machinery/computer/communications/comm in world)
+ if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept)
+ var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc )
+ intercept.name = "paper"
+ intercept.info = intercepttext
+
+ comm.messagetitle.Add("Cent. Com. CONFIDENTIAL REPORT")
+ comm.messagetext.Add(intercepttext)
+ world << sound('commandreport.ogg')
+
+/datum/game_mode/epidemic/proc/announce_to_kill_crew()
+ var/intercepttext = "CONFIDENTIAL REPORT
"
+ intercepttext += "PATHOGEN [virus_name] IS STILL PRESENT ON [station_name()]. IN COMPLIANCE WITH NANOTRASEN LAWS FOR INTERSTELLAR SAFETY, EMERGENCY SAFETY MEASURES HAVE BEEN AUTHORIZED. ALL INFECTED CREW MEMBERS ON [station_name()] ARE TO BE NEUTRALIZED AND DISPOSED OF IN A MANNER THAT WILL DESTROY ALL TRACES OF THE PATHOGEN. FAILURE TO COMPLY WILL RESULT IN IMMEDIATE DESTRUCTION OF [station_name].
"
+ intercepttext += "CRUISER WILL ARRIVE IN [round(cruiser_seconds()/60)] MINUTES
"
+
+ for (var/obj/machinery/computer/communications/comm in world)
+ if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept)
+ var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc )
+ intercept.name = "paper"
+ intercept.info = intercepttext
+
+ comm.messagetitle.Add("Cent. Com. CONFIDENTIAL REPORT")
+ comm.messagetext.Add(intercepttext)
+ world << sound('commandreport.ogg')
+
/datum/game_mode/epidemic/post_setup()
var/list/crew = list()
@@ -39,7 +90,6 @@
if(crew.len < 2)
world << "\red There aren't enough players for this mode!"
- return
var/datum/disease2/disease/lethal = new
lethal.makerandom(1)
@@ -62,18 +112,24 @@
continue
H.virus2 = nonlethal.getcopy()
+ cruiser_arrival = world.time + (10 * 90 * 60)
+ stage = 1
+
spawn (rand(waittime_l, waittime_h))
send_intercept()
- spawn(10 * 60 * 30)
- command_alert("Unknown pathogen detected in routine biological scans.", "Biohazard Alert")
- spawn(300)
- command_alert("Pathogen identified as level 7 biohazard. All crew, take precaution immediately. Avoid contact with other biological personnel when necessary. Initiate quarantine immediately.", "Biohazard Alert")
..()
/datum/game_mode/epidemic/process()
+ if(stage == 1 && cruiser_seconds() < 60 * 30)
+ announce_to_kill_crew()
+ stage = 2
+ else if(stage == 2 && cruiser_seconds() <= 0)
+ crew_lose()
+ stage = 3
+
checkwin_counter++
if(checkwin_counter >= 20)
if(!finished)
@@ -106,6 +162,30 @@
else
return 0
+///////////////////////////////////////////
+///Handle crew failure(station explodes)///
+///////////////////////////////////////////
+/datum/game_mode/epidemic/proc/crew_lose()
+ ticker.mode:explosion_in_progress = 1
+ for(var/mob/M in world)
+ if(M.client)
+ M << 'Alarm.ogg'
+ world << "\blueIncoming missile detected.. Impact in 10.."
+ for (var/i=9 to 1 step -1)
+ sleep(10)
+ world << "\blue[i].."
+ sleep(10)
+ enter_allowed = 0
+ for(var/mob/M in world)
+ if(M.client)
+ spawn(0)
+ M.client.station_explosion_cinematic()
+ sleep(110)
+ ticker.mode:station_was_nuked = 1
+ ticker.mode:explosion_in_progress = 0
+ return
+
+
//////////////////////////////////////////////////////////////////////
//Announces the end of the game with all relavent information stated//
//////////////////////////////////////////////////////////////////////