This commit is contained in:
silicons
2021-02-28 00:58:13 -07:00
parent 5d37871cd2
commit 0f35f01a9b
2 changed files with 24 additions and 11 deletions
+12 -3
View File
@@ -32,6 +32,8 @@
var/max_stamina_damage = 0
var/incoming_stam_mult = 1 //Multiplier for incoming staminaloss, decreases when taking staminaloss when the limb is disabled, resets back to 1 when limb is no longer disabled.
var/max_damage = 0
/// Threshold at which we are disabled. Defaults to max_damage if unset.
var/disable_threshold
var/stam_heal_tick = 0 //per Life(). Defaults to 0 due to citadel changes
var/brute_reduction = 0 //Subtracted to brute damage taken
@@ -494,6 +496,12 @@
return
set_disabled(is_disabled(silent), silent)
/**
* Gets the damage at which point we're disabled.
*/
/obj/item/bodypart/proc/get_disable_threshold()
return isnull(disable_threshold)? max_damage : disable_threshold
/obj/item/bodypart/proc/is_disabled(silent = FALSE)
if(!owner)
return
@@ -503,15 +511,16 @@
var/datum/wound/W = i
if(W.disabling)
return BODYPART_DISABLED_WOUND
var/disable_threshold = get_disable_threshold()
if(can_dismember() && !HAS_TRAIT(owner, TRAIT_NODISMEMBER))
. = disabled //inertia, to avoid limbs healing 0.1 damage and being re-enabled
if(get_damage(TRUE) >= max_damage * (HAS_TRAIT(owner, TRAIT_EASYLIMBDISABLE) ? 0.6 : 1)) //Easy limb disable disables the limb at 40% health instead of 0%
if(get_damage(TRUE) >= disable_threshold * (HAS_TRAIT(owner, TRAIT_EASYLIMBDISABLE) ? 0.6 : 1)) //Easy limb disable disables the limb at 40% health instead of 0%
if(!last_maxed && !silent)
owner.emote("scream")
last_maxed = TRUE
if(!is_organic_limb(FALSE) || stamina_dam >= max_damage)
if(!is_organic_limb(FALSE) || stamina_dam >= disable_threshold)
return BODYPART_DISABLED_DAMAGE
else if(disabled && (get_damage(TRUE) <= (max_damage * 0.8))) // reenabled at 80% now instead of 50% as of wounds update
else if(disabled && (get_damage(TRUE) <= (disable_threshold * 0.8))) // reenabled at 80% now instead of 50% as of wounds update
last_maxed = FALSE
return BODYPART_NOT_DISABLED
else
+12 -8
View File
@@ -59,12 +59,13 @@
one though."
icon_state = "default_human_l_arm"
attack_verb = list("slapped", "punched")
max_damage = 50
max_damage = 150
disable_threshold = 75
max_stamina_damage = 50
body_zone = BODY_ZONE_L_ARM
body_part = ARM_LEFT
aux_icons = list(BODY_ZONE_PRECISE_L_HAND = HANDS_PART_LAYER, "l_hand_behind" = BODY_BEHIND_LAYER)
body_damage_coeff = 0.75
body_damage_coeff = 0.25
held_index = 1
px_x = -6
px_y = 0
@@ -120,11 +121,12 @@
among humans missing their right arm."
icon_state = "default_human_r_arm"
attack_verb = list("slapped", "punched")
max_damage = 50
max_damage = 150
disable_threshold = 75
body_zone = BODY_ZONE_R_ARM
body_part = ARM_RIGHT
aux_icons = list(BODY_ZONE_PRECISE_R_HAND = HANDS_PART_LAYER, "r_hand_behind" = BODY_BEHIND_LAYER)
body_damage_coeff = 0.75
body_damage_coeff = 0.25
held_index = 2
px_x = 6
px_y = 0
@@ -182,10 +184,11 @@
luck. In this instance, it probably would not have helped."
icon_state = "default_human_l_leg"
attack_verb = list("kicked", "stomped")
max_damage = 50
max_damage = 150
disable_threshold = 75
body_zone = BODY_ZONE_L_LEG
body_part = LEG_LEFT
body_damage_coeff = 0.75
body_damage_coeff = 0.25
px_x = -2
px_y = 12
stam_heal_tick = STAM_RECOVERY_LIMB
@@ -240,10 +243,11 @@
// alternative spellings of 'pokey' are availible
icon_state = "default_human_r_leg"
attack_verb = list("kicked", "stomped")
max_damage = 50
max_damage = 150
disable_threshold = 75
body_zone = BODY_ZONE_R_LEG
body_part = LEG_RIGHT
body_damage_coeff = 0.75
body_damage_coeff = 0.25
px_x = 2
px_y = 12
max_stamina_damage = 50