Update damage_procs.dm

This commit is contained in:
YakumoChen
2019-10-23 00:11:52 +00:00
committed by GitHub
parent 6d11e1bd1d
commit 292b997900
@@ -1,16 +1,17 @@
/mob/living/silicon/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = FALSE)
var/hit_percent = (100-blocked)/100
if(!damage || (hit_percent <= 0))
if(!damage || (!forced && hit_percent <= 0))
return 0
var/damage_amount = forced ? damage : damage * hit_percent
switch(damagetype)
if(BRUTE)
adjustBruteLoss(damage * hit_percent)
adjustBruteLoss(damage_amount, forced = forced)
if(BURN)
adjustFireLoss(damage * hit_percent)
adjustFireLoss(damage_amount, forced = forced)
if(OXY)
if(damage < 0) //we shouldn't be taking oxygen damage through this proc, but we'll let it heal.
adjustOxyLoss(damage * hit_percent)
if(damage < 0 || forced) //we shouldn't be taking oxygen damage through this proc, but we'll let it heal.
adjustOxyLoss(damage_amount, forced = forced)
return 1
@@ -29,7 +30,7 @@
/mob/living/silicon/setCloneLoss(amount, updating_health = TRUE, forced = FALSE)
return FALSE
/mob/living/silicon/adjustStaminaLoss(amount, updating_stamina = 1)//immune to stamina damage.
/mob/living/silicon/adjustStaminaLoss(amount, updating_stamina = 1, forced = FALSE)//immune to stamina damage.
return FALSE
/mob/living/silicon/setStaminaLoss(amount, updating_stamina = 1)