From 0ba2aef187d295e5abbc2d409eea639ee5f53961 Mon Sep 17 00:00:00 2001 From: HarpyEagle Date: Tue, 24 May 2016 12:46:53 -0400 Subject: [PATCH] Fixes jointlock not accounting for species with less health or NO_PAIN --- code/modules/mob/mob_grab_specials.dm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/mob_grab_specials.dm b/code/modules/mob/mob_grab_specials.dm index 5158a7f3d07..af50746cd4d 100644 --- a/code/modules/mob/mob_grab_specials.dm +++ b/code/modules/mob/mob_grab_specials.dm @@ -51,10 +51,16 @@ return attacker.visible_message("[attacker] [pick("bent", "twisted")] [target]'s [organ.name] into a jointlock!") + + if(target.species.flags & NO_PAIN) + return + var/armor = target.run_armor_check(target, "melee") if(armor < 60) target << "You feel extreme pain!" - 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))