From 82125f674110546e3d7cd319970f3fb9f61eda31 Mon Sep 17 00:00:00 2001 From: Doxxmedearly <38594443+Doxxmedearly@users.noreply.github.com> Date: Tue, 5 Jan 2021 15:00:50 -0600 Subject: [PATCH] Parasite progression adjustment (#10889) --- code/modules/organs/subtypes/parasite.dm | 13 ++++++++++++- html/changelogs/doxxmedearly - parasitespeed.yml | 6 ++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 html/changelogs/doxxmedearly - parasitespeed.yml diff --git a/code/modules/organs/subtypes/parasite.dm b/code/modules/organs/subtypes/parasite.dm index e124ffdb8c6..ecc6c3f8c66 100644 --- a/code/modules/organs/subtypes/parasite.dm +++ b/code/modules/organs/subtypes/parasite.dm @@ -8,9 +8,19 @@ var/stage = 1 var/max_stage = 4 var/stage_ticker = 0 + var/infection_speed = 2 //Will be determined by get_infect_speed() + var/infect_speed_high = 35 //The fastest this parasite will advance stages + var/infect_speed_low = 15 //The slowest this parasite will advance stages var/stage_interval = 600 //time between stages, in seconds var/subtle = 0 //will the body reject the parasite naturally? +/obj/item/organ/internal/parasite/Initialize() + . = ..() + get_infect_speed() + +/obj/item/organ/internal/parasite/proc/get_infect_speed() //Slightly randomizes how fast each infection progresses. + infection_speed = rand(infect_speed_low, infect_speed_high) / 10 + /obj/item/organ/internal/parasite/process() ..() @@ -18,10 +28,11 @@ return if(stage < max_stage) - stage_ticker += 2 //process ticks every ~2 seconds + stage_ticker += infection_speed if(stage_ticker >= stage*stage_interval) stage = min(stage+1,max_stage) + get_infect_speed() //Each stage may progress faster or slower than the previous one stage_effect() /obj/item/organ/internal/parasite/handle_rejection() diff --git a/html/changelogs/doxxmedearly - parasitespeed.yml b/html/changelogs/doxxmedearly - parasitespeed.yml new file mode 100644 index 00000000000..889c457247d --- /dev/null +++ b/html/changelogs/doxxmedearly - parasitespeed.yml @@ -0,0 +1,6 @@ +author: Doxxmedearly + +delete-after: True + +changes: + - tweak: "Parasitic infections (such as k'ois) now have some randomization regarding progression speed."