diff --git a/code/datums/diseases/black_goo.dm b/code/datums/diseases/black_goo.dm index d4d9b6f50996..7ee83f4def9c 100644 --- a/code/datums/diseases/black_goo.dm +++ b/code/datums/diseases/black_goo.dm @@ -1,100 +1,128 @@ //Disease Datum /datum/disease/black_goo name = "Black Goo" - max_stages = 5 + max_stages = 3 cure = "Anti-Zed" cure_id = "antiZed" spread = "Bites" spread_type = SPECIAL affected_species = list("Human") - curable = 0 - cure_chance = 100 - desc = "" + cure_chance = 100 //meaning the cure will kill the virus asap severity = "Medium" agent = "Unknown Biological Organism X-65" hidden = list(1,0) //Hidden from med-huds, but not pandemic scanners. BLOOD TESTS FOR THE WIN permeability_mod = 2 - stage_prob = 4 - stage_minimum_age = 150 - survive_mob_death = TRUE //FALSE //switch to true to make dead infected humans still transform - longevity = 500 //should allow the dead to rise - var/zombie_transforming = 0 //whether we're currently transforming the host into a zombie. - var/goo_message_cooldown = 0 //to make sure we don't spam messages too often. - var/stage_counter = 0 // tells a dead infectee their stage, so they can know when-abouts they'll revive + survive_mob_death = TRUE //We want the dead to turn into zombie. + longevity = 500 //the virus tend to die before the dead is turn into zombie this should fix it. + stage_prob = 0//no randomness + + /// whether we're currently transforming the host into a zombie. + var/zombie_transforming = 0 + /// tells a dead infectee their stage, so they can know when-abouts they'll revive + var/stage_counter = 0 + +//new variables to handle infection progression inside a stage. + + /// variable that contain accumulated virus progression for an host. + var/stage_level = 0 + /// variable that handle passive increase of the virus of an host. + var/infection_rate = 1 + + ///the number of stage level needed to pass another stage. + var/stage_level_check = 360 + + /// cooldown between each check to see if we display a symptome idea is to get 60s between symptome atleast. + var/message_cooldown_time = 1 MINUTES + COOLDOWN_DECLARE(goo_message_cooldown) /datum/disease/black_goo/stage_act() ..() if(!ishuman(affected_mob)) return var/mob/living/carbon/human/H = affected_mob - if(age > 1.5*stage_minimum_age) stage_prob = 100 //if it takes too long we force a stage increase - else stage_prob = initial(stage_prob) - if(H.stat == DEAD) stage_minimum_age = 75 //the virus progress faster when the host is dead. + // check if your already a zombie or in the process of being transform into one... + if(iszombie(H)) + return + + // check if dead + if(H.stat == DEAD) + infection_rate = 4 + + // check if he isn't dead + if(H.stat != DEAD) + infection_rate = 1 + + // here we add the new infection rate to the stage level. + stage_level += infection_rate + + // we want to check if we have reach enough stage level to gain a stage 3 stage of 6 min if you get it once. + if(stage_level >= stage_level_check) + stage++ + stage_level -= stage_level_check + switch(stage) if(1) if(H.stat == DEAD && stage_counter != stage) - to_chat(H, SPAN_CENTERBOLD("Your zombie infection is now at Stage One! Zombie transformation begins at Stage Four.")) + to_chat(H, SPAN_CENTERBOLD("Your zombie infection is now at stage one! Zombie transformation begins at stage three.")) stage_counter = stage - survive_mob_death = TRUE //changed because infection rate was REALLY horrible. - if(goo_message_cooldown < world.time ) - if(prob(3)) - to_chat(affected_mob, SPAN_DANGER("You feel really warm...")) - goo_message_cooldown = world.time + 100 + + if (!COOLDOWN_FINISHED(src, goo_message_cooldown)) + return + COOLDOWN_START(src, goo_message_cooldown, message_cooldown_time) + + switch(rand(0, 100)) + if(0 to 25) + return + if(25 to 75) + to_chat(affected_mob, SPAN_DANGER("You feel warm...")) + stage_level += 9 + if(75 to 95) + to_chat(affected_mob, SPAN_DANGER("Your throat is really dry...")) + stage_level += 18 + if(95 to 100) + to_chat(affected_mob, SPAN_DANGER("You can't trust them...")) + stage_level += 36 + if(2) if(H.stat == DEAD && stage_counter != stage) - to_chat(H, SPAN_CENTERBOLD("Your zombie infection is now at Stage Two! Zombie transformation begins at Stage Four.")) - stage_counter = stage - if(goo_message_cooldown < world.time) - if (prob(3)) to_chat(affected_mob, SPAN_DANGER("Your throat is really dry...")) - else if (prob(6)) to_chat(affected_mob, SPAN_DANGER("You feel really warm...")) - else if (prob(2)) H.vomit_on_floor() - goo_message_cooldown = world.time + 100 - if(3) - if(H.stat == DEAD && stage_counter != stage) - to_chat(H, SPAN_CENTERBOLD("Your zombie infection is now at Stage Three! Zombie transformation begins at Stage Four, which will be soon.")) + to_chat(H, SPAN_CENTERBOLD("Your zombie infection is now at stage two! Zombie transformation begins at stage three.")) stage_counter = stage - hidden = list(0,0) - //survive_mob_death = TRUE //even if host dies now, the transformation will occur. - H.next_move_slowdown = max(H.next_move_slowdown, 1) - if(goo_message_cooldown < world.time) - if (prob(3)) - to_chat(affected_mob, SPAN_DANGER("You cough up some black fluid...")) - goo_message_cooldown = world.time + 100 - else if (prob(6)) - to_chat(affected_mob, SPAN_DANGER("Your throat is really dry...")) - goo_message_cooldown = world.time + 100 - else if (prob(9)) + + if (!COOLDOWN_FINISHED(src, goo_message_cooldown)) + return + COOLDOWN_START(src, goo_message_cooldown, message_cooldown_time) + + switch(rand(0, 100)) + if(0 to 25) + return + if(25 to 50) + to_chat(affected_mob, SPAN_DANGER("You can't trust them...")) + stage_level += 5 + if(50 to 75) to_chat(affected_mob, SPAN_DANGER("You feel really warm...")) - goo_message_cooldown = world.time + 100 - else if(prob(5)) - goo_message_cooldown = world.time + 100 + stage_level += 9 + if(75 to 85) + to_chat(affected_mob, SPAN_DANGER("Your throat is really dry...")) + stage_level += 18 + if(85 to 95) H.vomit_on_floor() - if(4) + stage_level += 36 + if(95 to 100) + to_chat(affected_mob, SPAN_DANGER("You cough up some black fluid...")) + stage_level += 42 + + if(3) + //check if your already a zombie just return to avoid weird stuff... if for some weird reason first filter deoesn't work... + if(iszombie(H)) + return + if(H.stat == DEAD && stage_counter != stage) - to_chat(H, SPAN_CENTERBOLD("Your zombie infection is now at Stage Four! Your transformation will happen any moment now.")) + to_chat(H, SPAN_CENTERBOLD("Your zombie infection is now at stage three! Zombie transformation begin!")) stage_counter = stage + hidden = list(0,0) + if(!zombie_transforming) + zombie_transform(H) H.next_move_slowdown = max(H.next_move_slowdown, 2) - if(prob(5) || age >= stage_minimum_age-1) - if(!zombie_transforming) - zombie_transform(H) - else if(prob(5)) - H.vomit_on_floor() - if(5) - if(H.stat == DEAD && stage_counter != stage) - stage_counter = stage - if(H.species.name != SPECIES_ZOMBIE && !zombie_transforming) - to_chat(H, SPAN_CENTERBOLD("Your zombie infection is now at Stage Five! Your transformation should have happened already, but will be forced now.")) - zombie_transform(H) - if(!zombie_transforming && prob(50)) - if(H.stat != DEAD) - var/healamt = 2 - if(H.health < H.maxHealth) - H.apply_damage(-healamt, BURN) - H.apply_damage(-healamt, BRUTE) - H.apply_damage(-healamt, TOX) - H.apply_damage(-healamt, OXY) - H.nutrition = NUTRITION_MAX //never hungry - /datum/disease/black_goo/proc/zombie_transform(mob/living/carbon/human/human) set waitfor = 0 @@ -113,7 +141,7 @@ playsound(human.loc, 'sound/hallucinations/wail.ogg', 25, 1) human.jitteriness = 0 human.set_species(SPECIES_ZOMBIE) - stage = 5 + stage = 3 human.faction = FACTION_ZOMBIE zombie_transforming = FALSE