[MIRROR] Disease antagonist (#5815)

* Disease antagonist

* Update mobs.dm

* can I go to sleep yet
This commit is contained in:
CitadelStationBot
2018-03-05 15:20:59 -06:00
committed by Poojawa
parent 766b85908e
commit a2e6253f00
85 changed files with 1483 additions and 505 deletions
+48 -1
View File
@@ -11,6 +11,7 @@
var/processing = FALSE
var/obj/screen/movable/action_button/button = null
var/buttontooltipstyle = ""
var/transparent_when_unavailable = TRUE
var/button_icon = 'icons/mob/actions/backgrounds.dmi' //This is the file for the BACKGROUND icon
var/background_icon_state = ACTION_BUTTON_DEFAULT_BACKGROUND //And this is the state for the background icon
@@ -124,7 +125,7 @@
ApplyIcon(button, force)
if(!IsAvailable())
button.color = rgb(128,0,0,128)
button.color = transparent_when_unavailable ? rgb(128,0,0,128) : rgb(128,0,0)
else
button.color = rgb(255,255,255,255)
return 1
@@ -572,6 +573,52 @@
call(target, procname)(usr)
return 1
//Preset for an action with a cooldown
/datum/action/cooldown
check_flags = 0
transparent_when_unavailable = FALSE
var/cooldown_time = 0
var/next_use_time = 0
/datum/action/cooldown/New()
..()
button.maptext = ""
button.maptext_x = 8
button.maptext_y = 0
button.maptext_width = 24
button.maptext_height = 12
/datum/action/cooldown/IsAvailable()
return next_use_time <= world.time
/datum/action/cooldown/proc/StartCooldown()
next_use_time = world.time + cooldown_time
button.maptext = "<b>[round(cooldown_time/10, 0.1)]</b>"
UpdateButtonIcon()
START_PROCESSING(SSfastprocess, src)
/datum/action/cooldown/process()
if(!owner)
button.maptext = ""
STOP_PROCESSING(SSfastprocess, src)
var/timeleft = max(next_use_time - world.time, 0)
if(timeleft == 0)
button.maptext = ""
UpdateButtonIcon()
STOP_PROCESSING(SSfastprocess, src)
else
button.maptext = "<b>[round(timeleft/10, 0.1)]</b>"
/datum/action/cooldown/Grant(mob/M)
..()
if(owner)
UpdateButtonIcon()
if(next_use_time > world.time)
START_PROCESSING(SSfastprocess, src)
//Stickmemes
/datum/action/item_action/stickmen
name = "Summon Stick Minions"
@@ -142,9 +142,6 @@
var/link = FOLLOW_LINK(M, owner)
to_chat(M, "[link] [dead_rendered]")
/mob/camera/imaginary_friend/emote(act,m_type=1,message = null)
return
/mob/camera/imaginary_friend/forceMove(atom/destination)
dir = get_dir(get_turf(src), destination)
loc = destination
+20 -43
View File
@@ -1,17 +1,17 @@
/mob/proc/HasDisease(datum/disease/D)
for(var/thing in viruses)
/mob/living/proc/HasDisease(datum/disease/D)
for(var/thing in diseases)
var/datum/disease/DD = thing
if(D.IsSame(DD))
return TRUE
return FALSE
/mob/proc/CanContractDisease(datum/disease/D)
/mob/living/proc/CanContractDisease(datum/disease/D)
if(stat == DEAD)
return FALSE
if(D.GetDiseaseID() in resistances)
if(D.GetDiseaseID() in disease_resistances)
return FALSE
if(HasDisease(D))
@@ -23,38 +23,10 @@
return TRUE
/mob/proc/ContactContractDisease(datum/disease/D)
/mob/living/proc/ContactContractDisease(datum/disease/D)
if(!CanContractDisease(D))
return FALSE
AddDisease(D)
/mob/proc/AddDisease(datum/disease/D)
for(var/datum/disease/advance/P in viruses)
if(istype(D, /datum/disease/advance))
var/datum/disease/advance/DD = D
if (P.totalResistance() < DD.totalTransmittable()) //Overwrite virus if the attacker's Transmission is lower than the defender's Resistance. This does not grant immunity to the lost virus.
P.remove_virus()
if (!viruses.len) //Only add the new virus if it defeated the existing one
var/datum/disease/DD = new D.type(1, D, 0)
viruses += DD
DD.affected_mob = src
SSdisease.active_diseases += DD //Add it to the active diseases list, now that it's actually in a mob and being processed.
//Copy properties over. This is so edited diseases persist.
var/list/skipped = list("affected_mob","holder","carrier","stage","type","parent_type","vars","transformed","symptoms","processing")
for(var/V in DD.vars)
if(V in skipped)
continue
if(islist(DD.vars[V]))
var/list/L = D.vars[V]
DD.vars[V] = L.Copy()
else
DD.vars[V] = D.vars[V]
DD.after_add()
DD.affected_mob.med_hud_set_status()
D.try_infect(src)
/mob/living/carbon/ContactContractDisease(datum/disease/D, target_zone)
@@ -124,28 +96,33 @@
passed = prob((Cl.permeability_coefficient*100) - 1)
if(passed)
AddDisease(D)
D.try_infect(src)
/mob/proc/AirborneContractDisease(datum/disease/D)
if((D.spread_flags & VIRUS_SPREAD_AIRBORNE) && prob((50*D.permeability_mod) - 1))
/mob/living/proc/AirborneContractDisease(datum/disease/D, force_spread)
if( ((D.spread_flags & DISEASE_SPREAD_AIRBORNE) || force_spread) && prob((50*D.permeability_mod) - 1))
ForceContractDisease(D)
/mob/living/carbon/AirborneContractDisease(datum/disease/D)
/mob/living/carbon/AirborneContractDisease(datum/disease/D, force_spread)
if(internal)
return
if(has_trait(TRAIT_NOBREATH))
return
..()
//Proc to use when you 100% want to infect someone, as long as they aren't immune
/mob/proc/ForceContractDisease(datum/disease/D)
//Proc to use when you 100% want to try to infect someone (ignoreing protective clothing and such), as long as they aren't immune
/mob/living/proc/ForceContractDisease(datum/disease/D, make_copy = TRUE, del_on_fail = FALSE)
if(!CanContractDisease(D))
if(del_on_fail)
qdel(D)
return FALSE
AddDisease(D)
if(!D.try_infect(src, make_copy))
if(del_on_fail)
qdel(D)
return FALSE
return TRUE
/mob/living/carbon/human/CanContractDisease(datum/disease/D)
if(dna)
if(has_trait(TRAIT_VIRUSIMMUNE) && !D.bypasses_immunity)
return FALSE
@@ -161,4 +138,4 @@
for(var/thing in D.required_organs)
if(!((locate(thing) in bodyparts) || (locate(thing) in internal_organs)))
return FALSE
return ..()
return ..()
+53 -23
View File
@@ -2,7 +2,7 @@
//Flags
var/visibility_flags = 0
var/disease_flags = CURABLE|CAN_CARRY|CAN_RESIST
var/spread_flags = VIRUS_SPREAD_AIRBORNE | VIRUS_SPREAD_CONTACT_FLUIDS | VIRUS_SPREAD_CONTACT_SKIN
var/spread_flags = DISEASE_SPREAD_AIRBORNE | DISEASE_SPREAD_CONTACT_FLUIDS | DISEASE_SPREAD_CONTACT_SKIN
//Fluff
var/form = "Virus"
@@ -26,7 +26,7 @@
var/carrier = FALSE //If our host is only a carrier
var/bypasses_immunity = FALSE //Does it skip species virus immunity check? Some things may diseases and not viruses
var/permeability_mod = 1
var/severity = VIRUS_SEVERITY_POSITIVE
var/severity = DISEASE_SEVERITY_NONTHREAT
var/list/required_organs = list()
var/needs_all_cures = TRUE
var/list/strain_data = list() //dna_spread special bullshit
@@ -34,9 +34,27 @@
var/process_dead = FALSE //if this ticks while the host is dead
/datum/disease/Destroy()
affected_mob = null
. = ..()
if(affected_mob)
remove_disease()
SSdisease.active_diseases.Remove(src)
return ..()
//add this disease if the host does not already have too many
/datum/disease/proc/try_infect(var/mob/living/infectee, make_copy = TRUE)
if(infectee.diseases.len < DISEASE_LIMIT)
infect(infectee, make_copy)
return TRUE
return FALSE
//add the disease with no checks
/datum/disease/proc/infect(var/mob/living/infectee, make_copy = TRUE)
var/datum/disease/D = make_copy ? Copy() : src
infectee.diseases += D
D.affected_mob = infectee
SSdisease.active_diseases += D //Add it to the active diseases list, now that it's actually in a mob and being processed.
D.after_add()
infectee.med_hud_set_status()
/datum/disease/proc/stage_act()
var/cure = has_cure()
@@ -74,7 +92,7 @@
if(!affected_mob)
return
if(!(spread_flags & VIRUS_SPREAD_AIRBORNE) && !force_spread)
if(!(spread_flags & DISEASE_SPREAD_AIRBORNE) && !force_spread)
return
if(affected_mob.reagents.has_reagent("spaceacillin") || (affected_mob.satiety > 0 && prob(affected_mob.satiety/10)))
@@ -89,24 +107,25 @@
if(istype(T))
for(var/mob/living/carbon/C in oview(spread_range, affected_mob))
var/turf/V = get_turf(C)
if(V)
while(TRUE)
if(V == T)
C.AirborneContractDisease(src)
break
var/turf/Temp = get_step_towards(V, T)
if(!CANATMOSPASS(V, Temp))
break
V = Temp
if(disease_air_spread_walk(T, V))
C.AirborneContractDisease(src, force_spread)
/proc/disease_air_spread_walk(turf/start, turf/end)
if(!start || !end)
return FALSE
while(TRUE)
if(end == start)
return TRUE
var/turf/Temp = get_step_towards(end, start)
if(!CANATMOSPASS(end, Temp))
return FALSE
end = Temp
/datum/disease/proc/cure(add_resistance = TRUE)
if(affected_mob)
if(disease_flags & CAN_RESIST)
var/id = GetDiseaseID()
if(add_resistance && !(id in affected_mob.resistances))
affected_mob.resistances += id
remove_virus()
if(add_resistance && (disease_flags & CAN_RESIST))
affected_mob.disease_resistances |= GetDiseaseID()
qdel(src)
/datum/disease/proc/IsSame(datum/disease/D)
@@ -116,8 +135,19 @@
/datum/disease/proc/Copy()
//note that stage is not copied over - the copy starts over at stage 1
var/static/list/copy_vars = list("name", "visibility_flags", "disease_flags", "spread_flags", "form", "desc", "agent", "spread_text",
"cure_text", "max_stages", "stage_prob", "viable_mobtypes", "cures", "infectivity", "cure_chance",
"bypasses_immunity", "permeability_mod", "severity", "required_organs", "needs_all_cures", "strain_data",
"infectable_hosts", "process_dead")
var/datum/disease/D = new type()
D.strain_data = strain_data.Copy()
for(var/V in copy_vars)
var/val = vars[V]
if(islist(val))
var/list/L = val
val = L.Copy()
D.vars[V] = val
return D
/datum/disease/proc/after_add()
@@ -127,7 +157,7 @@
/datum/disease/proc/GetDiseaseID()
return "[type]"
//don't use this proc directly. this should only ever be called by cure()
/datum/disease/proc/remove_virus()
affected_mob.viruses -= src //remove the datum from the list
/datum/disease/proc/remove_disease()
affected_mob.diseases -= src //remove the datum from the list
affected_mob.med_hud_set_status()
affected_mob = null
+74 -69
View File
@@ -7,7 +7,6 @@
*/
#define SYMPTOM_LIMIT 6
@@ -31,6 +30,7 @@
var/list/symptoms = list() // The symptoms of the disease.
var/id = ""
var/processing = FALSE
var/mutable = TRUE //set to FALSE to prevent most in-game methods of altering the disease via virology
// The order goes from easy to cure to hard to cure.
var/static/list/advance_cures = list(
@@ -46,23 +46,8 @@
*/
/datum/disease/advance/New(var/process = 1, var/datum/disease/advance/D)
if(!istype(D))
D = null
// Generate symptoms if we weren't given any.
if(!symptoms || !symptoms.len)
if(!D || !D.symptoms || !D.symptoms.len)
symptoms = GenerateSymptoms(0, 2)
else
for(var/datum/symptom/S in D.symptoms)
var/datum/symptom/new_symp = S.Copy()
symptoms += new_symp
/datum/disease/advance/New()
Refresh()
..(process, D)
return
/datum/disease/advance/Destroy()
if(processing)
@@ -70,6 +55,26 @@
S.End(src)
return ..()
/datum/disease/advance/try_infect(var/mob/living/infectee, make_copy = TRUE)
var/replace_num = infectee.diseases.len + 1 - DISEASE_LIMIT
if(replace_num > 0)
//see if we are more transmittable than enough diseases to replace them
//diseases replaced in this way do not confer immunity
var/list/L = list()
for(var/datum/disease/advance/P in infectee.diseases)
L += P
sortTim(L, /proc/cmp_advdisease_resistance_asc)
var/datum/disease/advance/competition = L[replace_num]
if(totalTransmittable() > competition.totalResistance())
for(var/i in 1 to replace_num)
var/datum/disease/advance/A = L[replace_num]
A.cure(FALSE)
else
//we are not strong enough to bully our way in
return FALSE
infect(infectee, make_copy)
return TRUE
// Randomly pick a symptom to activate.
/datum/disease/advance/stage_act()
..()
@@ -85,8 +90,6 @@
for(var/datum/symptom/S in symptoms)
S.Activate(src)
else
CRASH("We do not have any symptoms during stage_act()!")
// Compares type then ID.
/datum/disease/advance/IsSame(datum/disease/advance/D)
@@ -99,8 +102,15 @@
return 1
// Returns the advance disease with a different reference memory.
/datum/disease/advance/Copy(process = 0)
return new /datum/disease/advance(process, src, 1)
/datum/disease/advance/Copy()
var/datum/disease/advance/A = ..()
QDEL_LIST(A.symptoms)
for(var/datum/symptom/S in symptoms)
A.symptoms += S.Copy()
A.properties = properties.Copy()
A.id = id
//this is a new disease starting over at stage 1, so processing is not copied
return A
/*
@@ -130,7 +140,7 @@
var/list/possible_symptoms = list()
for(var/symp in SSdisease.list_symptoms)
var/datum/symptom/S = new symp
if(S.level >= level_min && S.level <= level_max)
if(S.naturally_occuring && S.level >= level_min && S.level <= level_max)
if(!HasSymptom(S))
possible_symptoms += S
@@ -154,22 +164,18 @@
AssignProperties()
id = null
if(!SSdisease.archive_diseases[GetDiseaseID()])
var/the_id = GetDiseaseID()
if(!SSdisease.archive_diseases[the_id])
if(new_name)
AssignName()
SSdisease.archive_diseases[GetDiseaseID()] = src // So we don't infinite loop
SSdisease.archive_diseases[GetDiseaseID()] = new /datum/disease/advance(0, src, 1)
SSdisease.archive_diseases[the_id] = src // So we don't infinite loop
SSdisease.archive_diseases[the_id] = Copy()
var/datum/disease/advance/A = SSdisease.archive_diseases[GetDiseaseID()]
AssignName(A.name)
var/datum/disease/advance/A = SSdisease.archive_diseases[the_id]
name = A.name
//Generate disease properties based on the effects. Returns an associated list.
/datum/disease/advance/proc/GenerateProperties()
if(!symptoms || !symptoms.len)
CRASH("We did not have any symptoms before generating properties.")
return
properties = list("resistance" = 0, "stealth" = 0, "stage_rate" = 0, "transmittable" = 0, "severity" = 0)
for(var/datum/symptom/S in symptoms)
@@ -179,7 +185,6 @@
properties["transmittable"] += S.transmittable
if(!S.neutered)
properties["severity"] = max(properties["severity"], S.severity) // severity is based on the highest severity non-neutered symptom
return
// Assign the properties that are in the list.
/datum/disease/advance/proc/AssignProperties()
@@ -188,7 +193,7 @@
if(properties["stealth"] >= 2)
visibility_flags = HIDDEN_SCANNER
SetSpread(CLAMP(2 ** (properties["transmittable"] - symptoms.len), VIRUS_SPREAD_BLOOD, VIRUS_SPREAD_AIRBORNE))
SetSpread(CLAMP(2 ** (properties["transmittable"] - symptoms.len), DISEASE_SPREAD_BLOOD, DISEASE_SPREAD_AIRBORNE))
permeability_mod = max(CEILING(0.4 * properties["transmittable"], 1), 1)
cure_chance = 15 - CLAMP(properties["resistance"], -5, 5) // can be between 10 and 20
@@ -202,23 +207,23 @@
// Assign the spread type and give it the correct description.
/datum/disease/advance/proc/SetSpread(spread_id)
switch(spread_id)
if(VIRUS_SPREAD_NON_CONTAGIOUS)
spread_flags = VIRUS_SPREAD_NON_CONTAGIOUS
if(DISEASE_SPREAD_NON_CONTAGIOUS)
spread_flags = DISEASE_SPREAD_NON_CONTAGIOUS
spread_text = "None"
if(VIRUS_SPREAD_SPECIAL)
spread_flags = VIRUS_SPREAD_SPECIAL
if(DISEASE_SPREAD_SPECIAL)
spread_flags = DISEASE_SPREAD_SPECIAL
spread_text = "None"
if(VIRUS_SPREAD_BLOOD)
spread_flags = VIRUS_SPREAD_BLOOD
if(DISEASE_SPREAD_BLOOD)
spread_flags = DISEASE_SPREAD_BLOOD
spread_text = "Blood"
if(VIRUS_SPREAD_CONTACT_FLUIDS)
spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_FLUIDS
if(DISEASE_SPREAD_CONTACT_FLUIDS)
spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_FLUIDS
spread_text = "Fluids"
if(VIRUS_SPREAD_CONTACT_SKIN)
spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_FLUIDS | VIRUS_SPREAD_CONTACT_SKIN
if(DISEASE_SPREAD_CONTACT_SKIN)
spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_FLUIDS | DISEASE_SPREAD_CONTACT_SKIN
spread_text = "On contact"
if(VIRUS_SPREAD_AIRBORNE)
spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_FLUIDS | VIRUS_SPREAD_CONTACT_SKIN | VIRUS_SPREAD_AIRBORNE
if(DISEASE_SPREAD_AIRBORNE)
spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_FLUIDS | DISEASE_SPREAD_CONTACT_SKIN | DISEASE_SPREAD_AIRBORNE
spread_text = "Airborne"
/datum/disease/advance/proc/SetSeverity(level_sev)
@@ -226,19 +231,19 @@
switch(level_sev)
if(-INFINITY to 0)
severity = VIRUS_SEVERITY_POSITIVE
severity = DISEASE_SEVERITY_POSITIVE
if(1)
severity = VIRUS_SEVERITY_NONTHREAT
severity = DISEASE_SEVERITY_NONTHREAT
if(2)
severity = VIRUS_SEVERITY_MINOR
severity = DISEASE_SEVERITY_MINOR
if(3)
severity = VIRUS_SEVERITY_MEDIUM
severity = DISEASE_SEVERITY_MEDIUM
if(4)
severity = VIRUS_SEVERITY_HARMFUL
severity = DISEASE_SEVERITY_HARMFUL
if(5)
severity = VIRUS_SEVERITY_DANGEROUS
severity = DISEASE_SEVERITY_DANGEROUS
if(6 to INFINITY)
severity = VIRUS_SEVERITY_BIOHAZARD
severity = DISEASE_SEVERITY_BIOHAZARD
else
severity = "Unknown"
@@ -253,11 +258,10 @@
var/datum/reagent/D = GLOB.chemical_reagents_list[cures[1]]
cure_text = D.name
return
// Randomly generate a symptom, has a chance to lose or gain a symptom.
/datum/disease/advance/proc/Evolve(min_level, max_level)
/datum/disease/advance/proc/Evolve(min_level, max_level, ignore_mutable = FALSE)
if(!mutable && !ignore_mutable)
return
var/s = safepick(GenerateSymptoms(min_level, max_level, 1))
if(s)
AddSymptom(s)
@@ -265,27 +269,32 @@
return
// Randomly remove a symptom.
/datum/disease/advance/proc/Devolve()
/datum/disease/advance/proc/Devolve(ignore_mutable = FALSE)
if(!mutable && !ignore_mutable)
return
if(symptoms.len > 1)
var/s = safepick(symptoms)
if(s)
RemoveSymptom(s)
Refresh(TRUE)
return
// Randomly neuter a symptom.
/datum/disease/advance/proc/Neuter()
/datum/disease/advance/proc/Neuter(ignore_mutable = FALSE)
if(!mutable && !ignore_mutable)
return
if(symptoms.len)
var/s = safepick(symptoms)
if(s)
NeuterSymptom(s)
Refresh(TRUE)
return
// Name the disease.
/datum/disease/advance/proc/AssignName(name = "Unknown")
src.name = name
return
Refresh()
var/datum/disease/advance/A = SSdisease.archive_diseases[GetDiseaseID()]
A.name = name
for(var/datum/disease/advance/AD in SSdisease.active_diseases)
AD.Refresh()
// Return a unique ID of the disease.
/datum/disease/advance/GetDiseaseID()
@@ -309,17 +318,15 @@
if(HasSymptom(S))
return
if(symptoms.len < (SYMPTOM_LIMIT - 1) + rand(-1, 1))
if(symptoms.len < (VIRUS_SYMPTOM_LIMIT - 1) + rand(-1, 1))
symptoms += S
else
RemoveSymptom(pick(symptoms))
symptoms += S
return
// Simply removes the symptom.
/datum/disease/advance/proc/RemoveSymptom(datum/symptom/S)
symptoms -= S
return
// Neuter a symptom, so it will only affect stats
/datum/disease/advance/proc/NeuterSymptom(datum/symptom/S)
@@ -377,7 +384,7 @@
if(!user)
return
var/i = SYMPTOM_LIMIT
var/i = VIRUS_SYMPTOM_LIMIT
var/datum/disease/advance/D = new(0, null)
D.symptoms = list()
@@ -434,5 +441,3 @@
/datum/disease/advance/proc/totalTransmittable()
return properties["transmittable"]
#undef RANDOM_STARTING_LEVEL
+28 -35
View File
@@ -1,59 +1,52 @@
// Cold
/datum/disease/advance/cold/New(var/process = TRUE, var/datum/disease/advance/D, var/copy = FALSE)
if(!D)
name = "Cold"
symptoms = list(new/datum/symptom/sneeze)
..(process, D, copy)
/datum/disease/advance/cold/New()
name = "Cold"
symptoms = list(new/datum/symptom/sneeze)
..()
// Flu
/datum/disease/advance/flu/New(var/process = TRUE, var/datum/disease/advance/D, var/copy = FALSE)
if(!D)
name = "Flu"
symptoms = list(new/datum/symptom/cough)
..(process, D, copy)
/datum/disease/advance/flu/New()
name = "Flu"
symptoms = list(new/datum/symptom/cough)
..()
// Voice Changing
/datum/disease/advance/voice_change/New(var/process = TRUE, var/datum/disease/advance/D, var/copy = FALSE)
if(!D)
name = "Epiglottis Mutation"
symptoms = list(new/datum/symptom/voice_change)
..(process, D, copy)
/datum/disease/advance/voice_change/New()
name = "Epiglottis Mutation"
symptoms = list(new/datum/symptom/voice_change)
..()
// Toxin Filter
/datum/disease/advance/heal/New(var/process = TRUE, var/datum/disease/advance/D, var/copy = FALSE)
if(!D)
name = "Liver Enhancer"
symptoms = list(new/datum/symptom/heal)
..(process, D, copy)
/datum/disease/advance/heal/New()
name = "Liver Enhancer"
symptoms = list(new/datum/symptom/heal)
..()
// Hallucigen
/datum/disease/advance/hallucigen/New(var/process = TRUE, var/datum/disease/advance/D, var/copy = FALSE)
if(!D)
name = "Second Sight"
symptoms = list(new/datum/symptom/hallucigen)
..(process, D, copy)
/datum/disease/advance/hallucigen/New()
name = "Second Sight"
symptoms = list(new/datum/symptom/hallucigen)
..()
// Sensory Restoration
/datum/disease/advance/mind_restoration/New(var/process = TRUE, var/datum/disease/advance/D, var/copy = FALSE)
if(!D)
name = "Intelligence Booster"
symptoms = list(new/datum/symptom/mind_restoration)
..(process, D, copy)
/datum/disease/advance/mind_restoration/New()
name = "Intelligence Booster"
symptoms = list(new/datum/symptom/mind_restoration)
..()
// Sensory Destruction
/datum/disease/advance/narcolepsy/New(var/process = TRUE, var/datum/disease/advance/D, var/copy = FALSE)
if(!D)
name = "Experimental Insomnia Cure"
symptoms = list(new/datum/symptom/narcolepsy)
..(process, D, copy)
/datum/disease/advance/narcolepsy/New()
name = "Experimental Insomnia Cure"
symptoms = list(new/datum/symptom/narcolepsy)
..()
@@ -40,7 +40,7 @@ BONUS
return
if(A.properties["stealth"] >= 4)
suppress_warning = TRUE
if(A.spread_flags &= VIRUS_SPREAD_AIRBORNE) //infect bystanders
if(A.spread_flags &= DISEASE_SPREAD_AIRBORNE) //infect bystanders
infective = TRUE
if(A.properties["resistance"] >= 3) //strong enough to drop items
power = 1.5
@@ -28,6 +28,7 @@
//A neutered symptom has no effect, and only affects statistics.
var/neutered = FALSE
var/list/thresholds
var/naturally_occuring = TRUE //if this symptom can appear from /datum/disease/advance/GenerateSymptoms()
/datum/symptom/New()
var/list/S = SSdisease.list_symptoms
+2 -2
View File
@@ -3,13 +3,13 @@
form = "Infection"
max_stages = 4
spread_text = "On contact"
spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_SKIN | VIRUS_SPREAD_CONTACT_FLUIDS
spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_SKIN | DISEASE_SPREAD_CONTACT_FLUIDS
cure_text = "Ethanol"
cures = list("ethanol")
agent = "Excess Lepidopticides"
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
desc = "If left untreated subject will regurgitate butterflies."
severity = VIRUS_SEVERITY_MINOR
severity = DISEASE_SEVERITY_MINOR
/datum/disease/anxiety/stage_act()
..()
+2 -2
View File
@@ -7,9 +7,9 @@
viable_mobtypes = list(/mob/living/carbon/human)
permeability_mod = 1
desc = "If left untreated the subject will become very weak, and may vomit often."
severity = VIRUS_SEVERITY_MEDIUM
severity = DISEASE_SEVERITY_MEDIUM
disease_flags = CAN_CARRY|CAN_RESIST
spread_flags = VIRUS_SPREAD_NON_CONTAGIOUS
spread_flags = DISEASE_SPREAD_NON_CONTAGIOUS
visibility_flags = HIDDEN_PANDEMIC
required_organs = list(/obj/item/organ/appendix)
bypasses_immunity = TRUE // Immunity is based on not having an appendix; this isn't a virus
+2 -2
View File
@@ -3,13 +3,13 @@
form = "Infection"
max_stages = 4
spread_text = "On contact"
spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_SKIN | VIRUS_SPREAD_CONTACT_FLUIDS
spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_SKIN | DISEASE_SPREAD_CONTACT_FLUIDS
cure_text = "Sugar"
cures = list("sugar")
agent = "Apidae Infection"
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
desc = "If left untreated subject will regurgitate bees."
severity = VIRUS_SEVERITY_MEDIUM
severity = DISEASE_SEVERITY_MEDIUM
infectable_hosts = list(SPECIES_ORGANIC, SPECIES_UNDEAD) //bees nesting in corpses
/datum/disease/beesease/stage_act()
+2 -2
View File
@@ -2,7 +2,7 @@
name = "Brainrot"
max_stages = 4
spread_text = "On contact"
spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_SKIN | VIRUS_SPREAD_CONTACT_FLUIDS
spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_SKIN | DISEASE_SPREAD_CONTACT_FLUIDS
cure_text = "Mannitol"
cures = list("mannitol")
agent = "Cryptococcus Cosmosis"
@@ -10,7 +10,7 @@
cure_chance = 15//higher chance to cure, since two reagents are required
desc = "This disease destroys the braincells, causing brain fever, brain necrosis and general intoxication."
required_organs = list(/obj/item/organ/brain)
severity = VIRUS_SEVERITY_HARMFUL
severity = DISEASE_SEVERITY_HARMFUL
/datum/disease/brainrot/stage_act() //Removed toxloss because damaging diseases are pretty horrible. Last round it killed the entire station because the cure didn't work -- Urist -ACTUALLY Removed rather than commented out, I don't see it returning - RR
..()
+4 -4
View File
@@ -7,7 +7,7 @@
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
permeability_mod = 0.5
desc = "If left untreated the subject will contract the flu."
severity = VIRUS_SEVERITY_NONTHREAT
severity = DISEASE_SEVERITY_NONTHREAT
/datum/disease/cold/stage_act()
..()
@@ -47,7 +47,7 @@
if(prob(1))
to_chat(affected_mob, "<span class='danger'>Mucous runs down the back of your throat.</span>")
if(prob(1) && prob(50))
if(!affected_mob.resistances.Find(/datum/disease/flu))
var/datum/disease/Flu = new /datum/disease/flu(0)
affected_mob.ForceContractDisease(Flu)
if(!affected_mob.disease_resistances.Find(/datum/disease/flu))
var/datum/disease/Flu = new /datum/disease/flu()
affected_mob.ForceContractDisease(Flu, FALSE, TRUE)
cure()
+2 -2
View File
@@ -2,13 +2,13 @@
name = "The Cold"
max_stages = 3
spread_text = "On contact"
spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_SKIN | VIRUS_SPREAD_CONTACT_FLUIDS
spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_SKIN | DISEASE_SPREAD_CONTACT_FLUIDS
cure_text = "Common Cold Anti-bodies & Spaceacillin"
cures = list("spaceacillin")
agent = "ICE9-rhinovirus"
viable_mobtypes = list(/mob/living/carbon/human)
desc = "If left untreated the subject will slow, as if partly frozen."
severity = VIRUS_SEVERITY_HARMFUL
severity = DISEASE_SEVERITY_HARMFUL
/datum/disease/cold9/stage_act()
..()
+2 -2
View File
@@ -2,7 +2,7 @@
name = "Space Retrovirus"
max_stages = 4
spread_text = "On contact"
spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_SKIN | VIRUS_SPREAD_CONTACT_FLUIDS
spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_SKIN | DISEASE_SPREAD_CONTACT_FLUIDS
cure_text = "Mutadone"
cures = list("mutadone")
disease_flags = CAN_CARRY|CAN_RESIST|CURABLE
@@ -11,7 +11,7 @@
var/datum/dna/original_dna = null
var/transformed = 0
desc = "This disease transplants the genetic code of the initial vector into new hosts."
severity = VIRUS_SEVERITY_MEDIUM
severity = DISEASE_SEVERITY_MEDIUM
/datum/disease/dnaspread/stage_act()
+2 -2
View File
@@ -2,13 +2,13 @@
name = "GBS"
max_stages = 5
spread_text = "On contact"
spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_SKIN | VIRUS_SPREAD_CONTACT_FLUIDS
spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_SKIN | DISEASE_SPREAD_CONTACT_FLUIDS
cure_text = "Synaptizine & Sulfur"
cures = list("synaptizine","sulfur")
agent = "Gravitokinetic Bipotential SADS-"
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
desc = "If left untreated death will occur."
severity = VIRUS_SEVERITY_BIOHAZARD
severity = DISEASE_SEVERITY_BIOHAZARD
/datum/disease/fake_gbs/stage_act()
..()
+1 -1
View File
@@ -9,7 +9,7 @@
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
permeability_mod = 0.75
desc = "If left untreated the subject will feel quite unwell."
severity = VIRUS_SEVERITY_MINOR
severity = DISEASE_SEVERITY_MINOR
/datum/disease/flu/stage_act()
..()
+1 -1
View File
@@ -9,7 +9,7 @@
viable_mobtypes = list(/mob/living/carbon/human)
permeability_mod = 0.75
desc = "If left untreated the subject will burn to death for being a heretic."
severity = VIRUS_SEVERITY_DANGEROUS
severity = DISEASE_SEVERITY_DANGEROUS
/datum/disease/fluspanish/stage_act()
..()
+2 -2
View File
@@ -2,7 +2,7 @@
name = "GBS"
max_stages = 4
spread_text = "On contact"
spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_SKIN | VIRUS_SPREAD_CONTACT_FLUIDS
spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_SKIN | DISEASE_SPREAD_CONTACT_FLUIDS
cure_text = "Synaptizine & Sulfur"
cures = list("synaptizine","sulfur")
cure_chance = 15//higher chance to cure, since two reagents are required
@@ -10,7 +10,7 @@
viable_mobtypes = list(/mob/living/carbon/human)
disease_flags = CAN_CARRY|CAN_RESIST|CURABLE
permeability_mod = 1
severity = VIRUS_SEVERITY_BIOHAZARD
severity = DISEASE_SEVERITY_BIOHAZARD
/datum/disease/gbs/stage_act()
..()
+6 -1
View File
@@ -10,12 +10,17 @@
desc = "If left untreated the subject will die!"
severity = "Dangerous!"
disease_flags = CAN_CARRY|CAN_RESIST
spread_flags = VIRUS_SPREAD_NON_CONTAGIOUS
spread_flags = DISEASE_SPREAD_NON_CONTAGIOUS
visibility_flags = HIDDEN_PANDEMIC
required_organs = list(/obj/item/organ/heart)
bypasses_immunity = TRUE // Immunity is based on not having an appendix; this isn't a virus
var/sound = FALSE
/datum/disease/heart_failure/Copy()
var/datum/disease/heart_failure/D = ..()
D.sound = sound
return D
/datum/disease/heart_failure/stage_act()
..()
var/obj/item/organ/heart/O = affected_mob.getorgan(/obj/item/organ/heart)
+1 -1
View File
@@ -9,7 +9,7 @@
disease_flags = CAN_CARRY|CAN_RESIST|CURABLE
permeability_mod = 0.75
desc = "This disease disrupts the magnetic field of your body, making it act as if a powerful magnet. Injections of iron help stabilize the field."
severity = VIRUS_SEVERITY_MEDIUM
severity = DISEASE_SEVERITY_MEDIUM
infectable_hosts = list(SPECIES_ORGANIC, SPECIES_ROBOTIC)
process_dead = TRUE
+2 -2
View File
@@ -2,7 +2,7 @@
name = "Parrot Possession"
max_stages = 1
spread_text = "Paranormal"
spread_flags = VIRUS_SPREAD_SPECIAL
spread_flags = DISEASE_SPREAD_SPECIAL
disease_flags = CURABLE
cure_text = "Holy Water."
cures = list("holywater")
@@ -10,7 +10,7 @@
agent = "Avian Vengence"
viable_mobtypes = list(/mob/living/carbon/human)
desc = "Subject is possesed by the vengeful spirit of a parrot. Call the priest."
severity = VIRUS_SEVERITY_MEDIUM
severity = DISEASE_SEVERITY_MEDIUM
infectable_hosts = list(SPECIES_ORGANIC, SPECIES_UNDEAD, SPECIES_INORGANIC, SPECIES_ROBOTIC)
bypasses_immunity = TRUE //2spook
var/mob/living/simple_animal/parrot/Poly/ghost/parrot
+1 -1
View File
@@ -9,7 +9,7 @@
viable_mobtypes = list(/mob/living/carbon/human)
permeability_mod = 0.75
desc = "If left untreated the subject will probably drive others to insanity."
severity = VIRUS_SEVERITY_MEDIUM
severity = DISEASE_SEVERITY_MEDIUM
/datum/disease/pierrot_throat/stage_act()
..()
+6 -5
View File
@@ -2,20 +2,17 @@
name = "Retrovirus"
max_stages = 4
spread_text = "Contact"
spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_SKIN | VIRUS_SPREAD_CONTACT_FLUIDS
spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_SKIN | DISEASE_SPREAD_CONTACT_FLUIDS
cure_text = "Rest or an injection of mutadone"
cure_chance = 6
agent = ""
viable_mobtypes = list(/mob/living/carbon/human)
desc = "A DNA-altering retrovirus that scrambles the structural and unique enzymes of a host constantly."
severity = VIRUS_SEVERITY_HARMFUL
severity = DISEASE_SEVERITY_HARMFUL
permeability_mod = 0.4
stage_prob = 2
var/SE
var/UI
var/restcure = 0
/datum/disease/dna_retrovirus/New()
..()
agent = "Virus class [pick("A","B","C","D","E","F")][pick("A","B","C","D","E","F")]-[rand(50,300)]"
@@ -24,6 +21,10 @@
else
restcure = 1
/datum/disease/dna_retrovirus/Copy()
var/datum/disease/dna_retrovirus/D = ..()
D.restcure = restcure
return D
/datum/disease/dna_retrovirus/stage_act()
..()
+2 -2
View File
@@ -2,13 +2,13 @@
name = "The Rhumba Beat"
max_stages = 5
spread_text = "On contact"
spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_SKIN | VIRUS_SPREAD_CONTACT_FLUIDS
spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_SKIN | DISEASE_SPREAD_CONTACT_FLUIDS
cure_text = "Chick Chicky Boom!"
cures = list("plasma")
agent = "Unknown"
viable_mobtypes = list(/mob/living/carbon/human)
permeability_mod = 1
severity = VIRUS_SEVERITY_BIOHAZARD
severity = DISEASE_SEVERITY_BIOHAZARD
process_dead = TRUE
/datum/disease/rhumba_beat/stage_act()
+19 -9
View File
@@ -2,11 +2,11 @@
name = "Transformation"
max_stages = 5
spread_text = "Acute"
spread_flags = VIRUS_SPREAD_SPECIAL
spread_flags = DISEASE_SPREAD_SPECIAL
cure_text = "A coder's love (theoretical)."
agent = "Shenanigans"
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey, /mob/living/carbon/alien)
severity = VIRUS_SEVERITY_BIOHAZARD
severity = DISEASE_SEVERITY_BIOHAZARD
stage_prob = 10
visibility_flags = HIDDEN_SCANNER|HIDDEN_PANDEMIC
disease_flags = CURABLE
@@ -17,6 +17,16 @@
var/list/stage5 = list("Oh the humanity!")
var/new_form = /mob/living/carbon/human
/datum/disease/transformation/Copy()
var/datum/disease/transformation/D = ..()
D.stage1 = stage1.Copy()
D.stage2 = stage2.Copy()
D.stage3 = stage3.Copy()
D.stage4 = stage4.Copy()
D.stage5 = stage5.Copy()
D.new_form = D.new_form
return D
/datum/disease/transformation/stage_act()
..()
switch(stage)
@@ -68,13 +78,13 @@
cure_text = "Death."
cures = list("adminordrazine")
spread_text = "Monkey Bites"
spread_flags = VIRUS_SPREAD_SPECIAL
spread_flags = DISEASE_SPREAD_SPECIAL
viable_mobtypes = list(/mob/living/carbon/monkey, /mob/living/carbon/human)
permeability_mod = 1
cure_chance = 1
disease_flags = CAN_CARRY|CAN_RESIST
desc = "Monkeys with this disease will bite humans, causing humans to mutate into a monkey."
severity = VIRUS_SEVERITY_BIOHAZARD
severity = DISEASE_SEVERITY_BIOHAZARD
stage_prob = 4
visibility_flags = 0
agent = "Kongey Vibrion M-909"
@@ -131,7 +141,7 @@
cure_chance = 5
agent = "R2D2 Nanomachines"
desc = "This disease, actually acute nanomachine infection, converts the victim into a cyborg."
severity = VIRUS_SEVERITY_BIOHAZARD
severity = DISEASE_SEVERITY_BIOHAZARD
visibility_flags = 0
stage1 = null
stage2 = list("Your joints feel stiff.", "<span class='danger'>Beep...boop..</span>")
@@ -163,7 +173,7 @@
cure_chance = 5
agent = "Rip-LEY Alien Microbes"
desc = "This disease changes the victim into a xenomorph."
severity = VIRUS_SEVERITY_BIOHAZARD
severity = DISEASE_SEVERITY_BIOHAZARD
visibility_flags = 0
stage1 = null
stage2 = list("Your throat feels scratchy.", "<span class='danger'>Kill...</span>")
@@ -191,7 +201,7 @@
cure_chance = 80
agent = "Advanced Mutation Toxin"
desc = "This highly concentrated extract converts anything into more of itself."
severity = VIRUS_SEVERITY_BIOHAZARD
severity = DISEASE_SEVERITY_BIOHAZARD
visibility_flags = 0
stage1 = list("You don't feel very well.")
stage2 = list("Your skin feels a little slimy.")
@@ -219,7 +229,7 @@
cures = list("adminordrazine")
agent = "Fell Doge Majicks"
desc = "This disease transforms the victim into a corgi."
severity = VIRUS_SEVERITY_BIOHAZARD
severity = DISEASE_SEVERITY_BIOHAZARD
visibility_flags = 0
stage1 = list("BARK.")
stage2 = list("You feel the need to wear silly hats.")
@@ -245,7 +255,7 @@
agent = "Gluttony's Blessing"
desc = "A 'gift' from somewhere terrible."
stage_prob = 20
severity = VIRUS_SEVERITY_BIOHAZARD
severity = DISEASE_SEVERITY_BIOHAZARD
visibility_flags = 0
stage1 = list("Your stomach rumbles.")
stage2 = list("Your skin feels saggy.")
+1 -1
View File
@@ -10,7 +10,7 @@
cure_chance = 5//like hell are you getting out of hell
desc = "A rare highly transmittable virulent virus. Few samples exist, rumoured to be carefully grown and cultured by clandestine bio-weapon specialists. Causes fever, blood vomiting, lung damage, weight loss, and fatigue."
required_organs = list(/obj/item/organ/lungs)
severity = VIRUS_SEVERITY_BIOHAZARD
severity = DISEASE_SEVERITY_BIOHAZARD
bypasses_immunity = TRUE // TB primarily impacts the lungs; it's also bacterial or fungal in nature; viral immunity should do nothing.
/datum/disease/tuberculosis/stage_act() //it begins
+1 -1
View File
@@ -10,7 +10,7 @@
disease_flags = CAN_CARRY|CAN_RESIST|CURABLE
permeability_mod = 0.75
desc = "Some speculate that this virus is the cause of the Space Wizard Federation's existence. Subjects affected show the signs of mental retardation, yelling obscure sentences or total gibberish. On late stages subjects sometime express the feelings of inner power, and, cite, 'the ability to control the forces of cosmos themselves!' A gulp of strong, manly spirits usually reverts them to normal, humanlike, condition."
severity = VIRUS_SEVERITY_HARMFUL
severity = DISEASE_SEVERITY_HARMFUL
required_organs = list(/obj/item/bodypart/head)
/*
+1
View File
@@ -11,6 +11,7 @@ GLOBAL_LIST_INIT(huds, list(
DATA_HUD_DIAGNOSTIC_BASIC = new/datum/atom_hud/data/diagnostic/basic(),
DATA_HUD_DIAGNOSTIC_ADVANCED = new/datum/atom_hud/data/diagnostic/advanced(),
DATA_HUD_ABDUCTOR = new/datum/atom_hud/abductor(),
DATA_HUD_SENTIENT_DISEASE = new/datum/atom_hud/sentient_disease(),
ANTAG_HUD_CULT = new/datum/atom_hud/antag(),
ANTAG_HUD_REV = new/datum/atom_hud/antag(),
ANTAG_HUD_OPS = new/datum/atom_hud/antag(),