mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 11:34:19 +01:00
-Added some new helper procs.
-Used some helper procs in my advance diseases. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5142 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -209,9 +209,9 @@ var/list/advance_cures = list(
|
||||
|
||||
hidden = list( (properties["stealth"] > 2), (properties["stealth"] > 3) )
|
||||
// The more symptoms we have, the less transmittable it is but some symptoms can make up for it.
|
||||
SetSpread(max(BLOOD, min(properties["transmittable"] - symptoms.len, AIRBORNE)))
|
||||
permeability_mod = max(round(0.5 * properties["transmittable"]), 1)
|
||||
cure_chance = 10 - min(max(properties["resistance"], -5), 5) // can be between 5 and 15
|
||||
SetSpread(Clamp(properties["transmittable"] - symptoms.len, BLOOD, AIRBORNE))
|
||||
permeability_mod = max(Ceiling(0.5 * properties["transmittable"]), 1)
|
||||
cure_chance = 10 - Clamp(properties["resistance"], -5, 5) // can be between 5 and 15
|
||||
stage_prob = max(properties["stage_rate"], 2)
|
||||
SetSeverity(properties["severity"])
|
||||
GenerateCure(properties)
|
||||
@@ -260,7 +260,7 @@ var/list/advance_cures = list(
|
||||
// Will generate a random cure, the less resistance the symptoms have, the harder the cure.
|
||||
/datum/disease/advance/proc/GenerateCure(var/list/properties = list())
|
||||
if(properties && properties.len)
|
||||
var/res = min(max(properties["resistance"] - (symptoms.len / 2), 1), advance_cures.len)
|
||||
var/res = Clamp(properties["resistance"] - (symptoms.len / 2), 1, advance_cures.len)
|
||||
//world << "Res = [res]"
|
||||
cure_id = advance_cures[res]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user