Parasite progression adjustment (#10889)

This commit is contained in:
Doxxmedearly
2021-01-05 18:00:50 -03:00
committed by GitHub
parent 6bec7f4786
commit 82125f6741
2 changed files with 18 additions and 1 deletions
+12 -1
View File
@@ -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()