Mostly fixes stamina by making knockdown() apply its staminaloss to the chest, giving adjuststaminaloss() new args, disabling limb-specific stamina regen for the chest, and disabling head stamina (#7596)
* fixes stamina (hopefully) * makes adjuststaminaloss() apply to the chest by default, makes it possible to target specific zones with adjuststaminaloss. * i dropped out of first grade dont bulli * REE * be patient im a dum * come on
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
/mob/living/carbon/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked = FALSE)
|
||||
var/hit_percent = (100-blocked)/100
|
||||
if(!damage || hit_percent <= 0)
|
||||
if(hit_percent <= 0)
|
||||
return 0
|
||||
|
||||
var/obj/item/bodypart/BP = null
|
||||
@@ -18,13 +18,13 @@
|
||||
switch(damagetype)
|
||||
if(BRUTE)
|
||||
if(BP)
|
||||
if(BP.receive_damage(damage * hit_percent, 0))
|
||||
if(damage > 0 ? BP.receive_damage(damage * hit_percent, 0) : BP.heal_damage(abs(damage * hit_percent), 0))
|
||||
update_damage_overlays()
|
||||
else //no bodypart, we deal damage with a more general method.
|
||||
adjustBruteLoss(damage * hit_percent)
|
||||
if(BURN)
|
||||
if(BP)
|
||||
if(BP.receive_damage(0, damage * hit_percent))
|
||||
if(damage > 0 ? BP.receive_damage(0, damage * hit_percent) : BP.heal_damage(0, abs(damage * hit_percent)))
|
||||
update_damage_overlays()
|
||||
else
|
||||
adjustFireLoss(damage * hit_percent)
|
||||
@@ -36,7 +36,7 @@
|
||||
adjustCloneLoss(damage * hit_percent)
|
||||
if(STAMINA)
|
||||
if(BP)
|
||||
if(BP.receive_damage(0, 0, damage * hit_percent))
|
||||
if(damage > 0 ? BP.receive_damage(0, 0, damage * hit_percent) : BP.heal_damage(0, 0, abs(damage * hit_percent)))
|
||||
update_damage_overlays()
|
||||
else
|
||||
adjustStaminaLoss(damage * hit_percent)
|
||||
|
||||
@@ -1600,7 +1600,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
/datum/species/proc/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked, mob/living/carbon/human/H)
|
||||
var/hit_percent = (100-(blocked+armor))/100
|
||||
hit_percent = (hit_percent * (100-H.physiology.damage_resistance))/100
|
||||
if(!damage || hit_percent <= 0)
|
||||
if(hit_percent <= 0)
|
||||
return 0
|
||||
|
||||
var/obj/item/bodypart/BP = null
|
||||
@@ -1617,14 +1617,14 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
if(BRUTE)
|
||||
H.damageoverlaytemp = 20
|
||||
if(BP)
|
||||
if(BP.receive_damage(damage * hit_percent * brutemod * H.physiology.brute_mod, 0))
|
||||
if(damage > 0 ? BP.receive_damage(damage * hit_percent * brutemod * H.physiology.brute_mod, 0) : BP.heal_damage(abs(damage * hit_percent * brutemod * H.physiology.brute_mod), 0))
|
||||
H.update_damage_overlays()
|
||||
else//no bodypart, we deal damage with a more general method.
|
||||
H.adjustBruteLoss(damage * hit_percent * brutemod * H.physiology.brute_mod)
|
||||
if(BURN)
|
||||
H.damageoverlaytemp = 20
|
||||
if(BP)
|
||||
if(BP.receive_damage(0, damage * hit_percent * burnmod * H.physiology.burn_mod))
|
||||
if(damage > 0 ? BP.receive_damage(0, damage * hit_percent * burnmod * H.physiology.burn_mod) : BP.heal_damage(0, abs(damage * hit_percent * burnmod * H.physiology.burn_mod)))
|
||||
H.update_damage_overlays()
|
||||
else
|
||||
H.adjustFireLoss(damage * hit_percent * burnmod * H.physiology.burn_mod)
|
||||
@@ -1636,7 +1636,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
H.adjustCloneLoss(damage * hit_percent * H.physiology.clone_mod)
|
||||
if(STAMINA)
|
||||
if(BP)
|
||||
if(BP.receive_damage(0, 0, damage * hit_percent * H.physiology.stamina_mod))
|
||||
if(damage > 0 ? BP.receive_damage(0, 0, damage * hit_percent * H.physiology.stamina_mod) : BP.heal_damage(0, 0, abs(damage * hit_percent * H.physiology.stamina_mod)))
|
||||
H.update_stamina()
|
||||
else
|
||||
H.adjustStaminaLoss(damage * hit_percent * H.physiology.stamina_mod)
|
||||
|
||||
Reference in New Issue
Block a user