Simplify slime temperature damage

Currently the damage-temperature curve is not continuous and isn't monotone.
It's better to change it to constant 30 damage between -50°C and 50K.
The exact shape of the function is not that important, because the slimes
resistance is mostly due to its bodytemperature need time to change.
This commit is contained in:
Szunti
2016-01-18 13:57:45 +01:00
parent a00a6ae0e6
commit 2f93947e59
2 changed files with 10 additions and 5 deletions
@@ -54,11 +54,13 @@
if(bodytemperature < (T0C + 5)) // start calculating temperature damage etc
if(bodytemperature <= (T0C - 50)) // hurt temperature
if(bodytemperature <= 50) // sqrting negative numbers is bad
if(bodytemperature <= hurt_temperature)
if(bodytemperature <= die_temperature)
adjustToxLoss(200)
else
adjustToxLoss(round(sqrt(bodytemperature)) * 2)
// could be more fancy, but doesn't worth the complexity: when the slimes goes into a cold area
// the damage is mostly determined by how fast its body cools
adjustToxLoss(30)
updatehealth()
@@ -547,4 +549,4 @@
return 0
/mob/living/carbon/slime/slip() //Can't slip something without legs.
return 0
return 0
@@ -49,6 +49,9 @@
var/SStun = 0 // NPC stun variable. Used to calm them down when they are attacked while feeding, or they will immediately re-attach
var/Discipline = 0 // if a slime has been hit with a freeze gun, or wrestled/attacked off a human, they become disciplined and don't attack anymore for a while. The part about freeze gun is a lie
var/hurt_temperature = T0C-50 // slime keeps taking damage when its bodytemperature is below this
var/die_temperature = 50 // slime dies instantly when its bodytemperature is below this
///////////TIME FOR SUBSPECIES
var/colour = "grey"
@@ -411,4 +414,4 @@
/mob/living/carbon/slime/cannot_use_vents()
if(Victim)
return "You cannot ventcrawl while feeding."
..()
..()