Fixes disarm-attacking being very likely to break the limb before dislocating it.

Also makes it possible to 'strike to cripple' with stunbatons
This commit is contained in:
HarpyEagle
2016-05-24 11:47:11 -04:00
committed by Yoshax
parent fcb8c63d2a
commit 36e53d4b98
2 changed files with 8 additions and 2 deletions

View File

@@ -245,7 +245,13 @@ emp_act
/mob/living/carbon/human/proc/attack_joint(var/obj/item/organ/external/organ, var/obj/item/W, var/blocked)
if(!organ || (organ.dislocated == 2) || (organ.dislocated == -1) || blocked >= 100)
return 0
if(prob(W.force * (100 - blocked)/100))
if(W.damtype != BRUTE)
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)))
visible_message("<span class='danger'>[src]'s [organ.joint] [pick("gives way","caves in","crumbles","collapses")]!</span>")
organ.dislocate(1)
return 1