Revert "12/21 modernizations from TG live"

This commit is contained in:
LetterJay
2016-12-22 22:35:44 -06:00
committed by GitHub
parent cf59ac1c3d
commit ae40d4134e
2215 changed files with 86928 additions and 707332 deletions
+21 -144
View File
@@ -9,22 +9,23 @@
standard 0 if fail
*/
/mob/living/proc/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = 0)
var/hit_percent = (100-blocked)/100
if(!damage || (hit_percent <= 0))
blocked = (100-blocked)/100
if(!damage || (blocked <= 0))
return 0
switch(damagetype)
if(BRUTE)
adjustBruteLoss(damage * hit_percent)
adjustBruteLoss(damage * blocked)
if(BURN)
adjustFireLoss(damage * hit_percent)
adjustFireLoss(damage * blocked)
if(TOX)
adjustToxLoss(damage * hit_percent)
adjustToxLoss(damage * blocked)
if(OXY)
adjustOxyLoss(damage * hit_percent)
adjustOxyLoss(damage * blocked)
if(CLONE)
adjustCloneLoss(damage * hit_percent)
adjustCloneLoss(damage * blocked)
if(STAMINA)
adjustStaminaLoss(damage * hit_percent)
adjustStaminaLoss(damage * blocked)
updatehealth()
return 1
@@ -48,30 +49,30 @@
/mob/living/proc/apply_effect(effect = 0,effecttype = STUN, blocked = 0)
var/hit_percent = (100-blocked)/100
if(!effect || (hit_percent <= 0))
blocked = (100-blocked)/100
if(!effect || (blocked <= 0))
return 0
switch(effecttype)
if(STUN)
Stun(effect * hit_percent)
Stun(effect * blocked)
if(WEAKEN)
Weaken(effect * hit_percent)
Weaken(effect * blocked)
if(PARALYZE)
Paralyse(effect * hit_percent)
Paralyse(effect * blocked)
if(IRRADIATE)
radiation += max(effect * hit_percent, 0)
radiation += max(effect * blocked, 0)
if(SLUR)
slurring = max(slurring,(effect * hit_percent))
slurring = max(slurring,(effect * blocked))
if(STUTTER)
if(status_flags & CANSTUN) // stun is usually associated with stutter
stuttering = max(stuttering,(effect * hit_percent))
stuttering = max(stuttering,(effect * blocked))
if(EYE_BLUR)
blur_eyes(effect * hit_percent)
blur_eyes(effect * blocked)
if(DROWSY)
drowsyness = max(drowsyness,(effect * hit_percent))
drowsyness = max(drowsyness,(effect * blocked))
if(JITTER)
if(status_flags & CANSTUN)
jitteriness = max(jitteriness,(effect * hit_percent))
jitteriness = max(jitteriness,(effect * blocked))
return 1
@@ -98,128 +99,4 @@
apply_damage(stamina, STAMINA, null, blocked)
if(jitter)
apply_effect(jitter, JITTER, blocked)
return 1
/mob/living/proc/getBruteLoss()
return bruteloss
/mob/living/proc/adjustBruteLoss(amount, updating_health=1)
if(status_flags & GODMODE)
return 0
bruteloss = Clamp((bruteloss + (amount * config.damage_multiplier)), 0, maxHealth*2)
if(updating_health)
updatehealth()
/mob/living/proc/getOxyLoss()
return oxyloss
/mob/living/proc/adjustOxyLoss(amount, updating_health=1)
if(status_flags & GODMODE)
return 0
oxyloss = Clamp((oxyloss + (amount * config.damage_multiplier)), 0, maxHealth*2)
if(updating_health)
updatehealth()
/mob/living/proc/setOxyLoss(amount, updating_health=1)
if(status_flags & GODMODE)
return 0
oxyloss = amount
if(updating_health)
updatehealth()
/mob/living/proc/getToxLoss()
return toxloss
/mob/living/proc/adjustToxLoss(amount, updating_health=1)
if(status_flags & GODMODE)
return 0
toxloss = Clamp((toxloss + (amount * config.damage_multiplier)), 0, maxHealth*2)
if(updating_health)
updatehealth()
return amount
/mob/living/proc/setToxLoss(amount, updating_health=1)
if(status_flags & GODMODE)
return 0
toxloss = amount
if(updating_health)
updatehealth()
/mob/living/proc/getFireLoss()
return fireloss
/mob/living/proc/adjustFireLoss(amount, updating_health=1)
if(status_flags & GODMODE)
return 0
fireloss = Clamp((fireloss + (amount * config.damage_multiplier)), 0, maxHealth*2)
if(updating_health)
updatehealth()
/mob/living/proc/getCloneLoss()
return cloneloss
/mob/living/proc/adjustCloneLoss(amount, updating_health=1)
if(status_flags & GODMODE)
return 0
cloneloss = Clamp((cloneloss + (amount * config.damage_multiplier)), 0, maxHealth*2)
if(updating_health)
updatehealth()
/mob/living/proc/setCloneLoss(amount, updating_health=1)
if(status_flags & GODMODE)
return 0
cloneloss = amount
if(updating_health)
updatehealth()
/mob/living/proc/getBrainLoss()
return brainloss
/mob/living/proc/adjustBrainLoss(amount)
if(status_flags & GODMODE)
return 0
brainloss = Clamp((brainloss + (amount * config.damage_multiplier)), 0, maxHealth*2)
/mob/living/proc/setBrainLoss(amount)
if(status_flags & GODMODE)
return 0
brainloss = amount
/mob/living/proc/getStaminaLoss()
return staminaloss
/mob/living/proc/adjustStaminaLoss(amount, updating_stamina = 1)
return
/mob/living/proc/setStaminaLoss(amount, updating_stamina = 1)
return
// heal ONE external organ, organ gets randomly selected from damaged ones.
/mob/living/proc/heal_bodypart_damage(brute, burn, updating_health = 1)
adjustBruteLoss(-brute, 0) //zero as argument for no instant health update
adjustFireLoss(-burn, 0)
if(updating_health)
updatehealth()
// damage ONE external organ, organ gets randomly selected from damaged ones.
/mob/living/proc/take_bodypart_damage(brute, burn, updating_health = 1)
adjustBruteLoss(brute, 0) //zero as argument for no instant health update
adjustFireLoss(burn, 0)
if(updating_health)
updatehealth()
// heal MANY bodyparts, in random order
/mob/living/proc/heal_overall_damage(brute, burn, only_robotic = 0, only_organic = 1, updating_health = 1)
adjustBruteLoss(-brute, 0) //zero as argument for no instant health update
adjustFireLoss(-burn, 0)
if(updating_health)
updatehealth()
// damage MANY bodyparts, in random order
/mob/living/proc/take_overall_damage(brute, burn, updating_health = 1)
adjustBruteLoss(brute, 0) //zero as argument for no instant health update
adjustFireLoss(burn, 0)
if(updating_health)
updatehealth()
return 1