Implemented getToxLoss()

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2528 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
rockdtben
2011-11-17 23:42:09 +00:00
parent 5b81f6ffa3
commit 38d90773cc
41 changed files with 90 additions and 89 deletions
@@ -391,16 +391,16 @@ var/global/list/uneatable = list(
toxmob()
var/toxrange = 10
var/toxloss = 4
var/toxdamage = 4 // changed the name to toxdamage from toxloss to prevent further conflicts
var/radiation = 5
if (src.energy>200)
toxloss = round(((src.energy-150)/50)*4,1)
toxdamage = round(((src.energy-150)/50)*4,1)
radiation = round(((src.energy-150)/50)*5,1)
for(var/mob/living/M in view(toxrange, src.loc))
if(istype(M,/mob/living/))
M.apply_effect(rand(radiation), IRRADIATE)
toxloss = (toxloss - (toxloss*M.getarmor(null, "rad")))
M.apply_effect(toxloss, TOX)
toxdamage = (toxdamage - (toxdamage*M.getarmor(null, "rad")))
M.apply_effect(toxdamage, TOX)
return