-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:
giacomand@gmail.com
2012-11-21 02:01:39 +00:00
parent 02c12a5877
commit ba4e25b97d
3 changed files with 14 additions and 5 deletions
+4 -4
View File
@@ -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]