From 05e484e79454d7ec7054f421977d5fcf9f0a0422 Mon Sep 17 00:00:00 2001 From: chuga-git <98280110+chuga-git@users.noreply.github.com> Date: Sun, 7 Apr 2024 04:38:22 -0500 Subject: [PATCH] Attacking a missing limb instead picks a random bodypart (#24554) Co-authored-by: cybercapitalism <98280110+cybercapitalism@users.noreply.github.com> --- code/modules/mob/living/carbon/human/human_defense.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index c1239ac9567..e028d9c57cd 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -474,9 +474,11 @@ emp_act return FALSE var/obj/item/organ/external/affecting = get_organ(ran_zone(user.zone_selected)) + + // if the targeted limb doesn't exist, pick a new one at random so you don't have to swap target zone if(!affecting) - to_chat(user, "They are missing that limb!") - return FALSE + affecting = pick(bodyparts) + var/hit_area = parse_zone(affecting.limb_name) if(user != src)