From f152607930b678e92936471d65c84e287ad63418 Mon Sep 17 00:00:00 2001 From: ClairionCM <115504494+ClairionCM@users.noreply.github.com> Date: Fri, 30 Jun 2023 08:56:50 +0200 Subject: [PATCH] Update lurker_powers.dm Fixes a bug where lurker headbite would still trigger after a target was moved away during windup. --- .../carbon/xenomorph/abilities/lurker/lurker_powers.dm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm index d4300c17cceb..bdd8881dbb34 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm @@ -336,6 +336,11 @@ if(!do_after(xeno, 0.8 SECONDS, INTERRUPT_NO_NEEDHAND, BUSY_ICON_HOSTILE, numticks = 2)) // would be 0.75 but that doesn't really work with numticks return + // To make sure that the headbite does nothing if the target is moved away. + if(!xeno.Adjacent(target_carbon)) + to_chat(xeno, SPAN_XENOHIGHDANGER("You missed! Your target was moved away before you could finish headbiting them!")) + return + if(target_carbon.stat == DEAD) to_chat(xeno, SPAN_XENODANGER("They died before you could finish headbiting them! Be more careful next time!")) return