From b410d43eb536aa45970b221d6e10a2017a855b21 Mon Sep 17 00:00:00 2001 From: HarpyEagle Date: Thu, 26 May 2016 13:51:21 -0400 Subject: [PATCH] Adjusts attack_joint() so that disarm attacking is actually useful If disarm attacking deals half damage but is expected to deal half the damage to the limb before dislocating it, it's not any more useful than just breaking their limbs, other than the fact that you do less damage --- .../mob/living/carbon/human/human_defense.dm | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 810946f26ff..6edefd2951f 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -187,11 +187,13 @@ emp_act // Handle striking to cripple. if(user.a_intent == I_DISARM) - effective_force /= 2 - if(..(I, user, effective_force, blocked, hit_zone)) - attack_joint(affecting, I, blocked) - else + effective_force *= 0.66 //reduced effective force... + if(!..(I, user, effective_force, blocked, hit_zone)) return 0 + + //set the dislocate mult less than the effective force mult so that + //dislocating limbs on disarm is a bit easier than breaking limbs on harm + attack_joint(affecting, I, effective_force, 0.5, blocked) //...but can dislocate joints else if(!..()) return 0 @@ -242,7 +244,7 @@ emp_act return 1 -/mob/living/carbon/human/proc/attack_joint(var/obj/item/organ/external/organ, var/obj/item/W, var/blocked) +/mob/living/carbon/human/proc/attack_joint(var/obj/item/organ/external/organ, var/obj/item/W, var/effective_force, var/dislocate_mult, var/blocked) if(!organ || (organ.dislocated == 2) || (organ.dislocated == -1) || blocked >= 100) return 0 @@ -250,8 +252,8 @@ emp_act return 0 //want the dislocation chance to be such that the limb is expected to dislocate after dealing a fraction of the damage needed to break the limb - var/dislocate_chance = (W.force/2)/(0.5 * organ.min_broken_damage * config.organ_health_multiplier)*100 - if(prob(dislocate_chance * (W.force * (100 - blocked)/100))) + var/dislocate_chance = effective_force/(dislocate_mult * organ.min_broken_damage * config.organ_health_multiplier)*100 + if(prob(dislocate_chance * (100 - blocked)/100)) visible_message("[src]'s [organ.joint] [pick("gives way","caves in","crumbles","collapses")]!") organ.dislocate(1) return 1