From cec9d85d6b0559d2bbf138e9c6914b7408da480f Mon Sep 17 00:00:00 2001 From: Coolrune206 <71326864+Coolrune206@users.noreply.github.com> Date: Tue, 24 May 2022 21:47:56 +1000 Subject: [PATCH] Prevents legless people from using Krav Maga legsweep (#17850) * bugfix * can't legsweep someone who doesn't have legs --- code/modules/martial_arts/combos/krav_maga/leg_sweep.dm | 6 ++++++ code/modules/martial_arts/krav_maga.dm | 3 +++ 2 files changed, 9 insertions(+) diff --git a/code/modules/martial_arts/combos/krav_maga/leg_sweep.dm b/code/modules/martial_arts/combos/krav_maga/leg_sweep.dm index 77a06ac153b..c8a7d320138 100644 --- a/code/modules/martial_arts/combos/krav_maga/leg_sweep.dm +++ b/code/modules/martial_arts/combos/krav_maga/leg_sweep.dm @@ -5,6 +5,12 @@ /datum/martial_combo/krav_maga/leg_sweep/perform_combo(mob/living/carbon/human/user, mob/living/target, datum/martial_art/MA) if(target.stat || target.IsWeakened()) return FALSE + if(!user.get_num_legs()) + to_chat(user, "You suddenly notice you have no legs with which to sweep - how did that happen?!") + return MARTIAL_COMBO_DONE_CLEAR_COMBOS + if(!target.get_num_legs()) + to_chat(user, "[target] has no legs to sweep!") + return MARTIAL_COMBO_DONE_CLEAR_COMBOS user.do_attack_animation(target, ATTACK_EFFECT_KICK) target.visible_message("[user] leg sweeps [target]!", \ "[user] leg sweeps you!") diff --git a/code/modules/martial_arts/krav_maga.dm b/code/modules/martial_arts/krav_maga.dm index 4c92669a53a..6bb902d2bd0 100644 --- a/code/modules/martial_arts/krav_maga.dm +++ b/code/modules/martial_arts/krav_maga.dm @@ -42,6 +42,9 @@ if(owner.incapacitated()) to_chat(owner, "You can't use Krav Maga while you're incapacitated.") return + if(!owner.get_num_legs()) + to_chat(owner, "You can't leg sweep someone if you have no legs.") + return to_chat(owner, "Your next attack will be a Leg Sweep.") owner.visible_message("[owner] assumes the Leg Sweep stance!") var/mob/living/carbon/human/H = owner