Fixes jointlock not accounting for species with less health or NO_PAIN

This commit is contained in:
HarpyEagle
2016-06-20 00:08:51 +01:00
committed by Yoshax
parent fd3a3175ae
commit 0ba2aef187
+7 -1
View File
@@ -51,10 +51,16 @@
return
attacker.visible_message("<span class='danger'>[attacker] [pick("bent", "twisted")] [target]'s [organ.name] into a jointlock!</span>")
if(target.species.flags & NO_PAIN)
return
var/armor = target.run_armor_check(target, "melee")
if(armor < 60)
target << "<span class='danger'>You feel extreme pain!</span>"
affecting.adjustHalLoss(Clamp(0, 60-affecting.halloss, 30)) //up to 60 halloss
var/max_halloss = round(target.species.total_health * 0.8) //up to 80% of passing out
affecting.adjustHalLoss(Clamp(0, max_halloss - affecting.halloss, 30))
/obj/item/weapon/grab/proc/attack_eye(mob/living/carbon/human/target, mob/living/carbon/human/attacker)
if(!istype(attacker))