Files
fulpstation/code/datums/diseases/advance/presets.dm
spookydonut 4e8ff18b07 Fix Travis grep script to use PCRE to actually match things (#47065)
Several of the greps were missing the `-P` switch which caused them to 
fail to match things. The EOL grep also wasn't working right so I 
replaced it with the one I added to TGMC.
2019-10-19 10:21:05 -07:00

43 lines
1.1 KiB
Plaintext

// Cold
/datum/disease/advance/cold
copy_type = /datum/disease/advance
/datum/disease/advance/cold/New()
name = "Cold"
symptoms = list(new/datum/symptom/sneeze)
..()
// Flu
/datum/disease/advance/flu
copy_type = /datum/disease/advance
/datum/disease/advance/flu/New()
name = "Flu"
symptoms = list(new/datum/symptom/cough)
..()
//Randomly generated Disease, for virus crates and events
/datum/disease/advance/random
name = "Experimental Disease"
copy_type = /datum/disease/advance
/datum/disease/advance/random/New(max_symptoms, max_level = 8)
if(!max_symptoms)
max_symptoms = rand(1, VIRUS_SYMPTOM_LIMIT)
var/list/datum/symptom/possible_symptoms = list()
for(var/symptom in subtypesof(/datum/symptom))
var/datum/symptom/S = symptom
if(initial(S.level) > max_level)
continue
if(initial(S.level) <= 0) //unobtainable symptoms
continue
possible_symptoms += S
for(var/i in 1 to max_symptoms)
var/datum/symptom/chosen_symptom = pick_n_take(possible_symptoms)
if(chosen_symptom)
var/datum/symptom/S = new chosen_symptom
symptoms += S
Refresh()
name = "Sample #[rand(1,10000)]"