Prevents legless people from using Krav Maga legsweep (#17850)

* bugfix

* can't legsweep someone who doesn't have legs
This commit is contained in:
Coolrune206
2022-05-24 12:47:56 +01:00
committed by GitHub
parent 64c2bccb36
commit cec9d85d6b
2 changed files with 9 additions and 0 deletions
@@ -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, "<span class='warning'>You suddenly notice you have no legs with which to sweep - how did that happen?!</span>")
return MARTIAL_COMBO_DONE_CLEAR_COMBOS
if(!target.get_num_legs())
to_chat(user, "<span class='warning'>[target] has no legs to sweep!</span>")
return MARTIAL_COMBO_DONE_CLEAR_COMBOS
user.do_attack_animation(target, ATTACK_EFFECT_KICK)
target.visible_message("<span class='warning'>[user] leg sweeps [target]!</span>", \
"<span class='userdanger'>[user] leg sweeps you!</span>")
+3
View File
@@ -42,6 +42,9 @@
if(owner.incapacitated())
to_chat(owner, "<span class='warning'>You can't use Krav Maga while you're incapacitated.</span>")
return
if(!owner.get_num_legs())
to_chat(owner, "<span class='warning'>You can't leg sweep someone if you have no legs.</spawn>")
return
to_chat(owner, "<b><i>Your next attack will be a Leg Sweep.</i></b>")
owner.visible_message("<span class='danger'>[owner] assumes the Leg Sweep stance!</span>")
var/mob/living/carbon/human/H = owner