Skip to content

Commit

Permalink
Update lurker_powers.dm
Browse files Browse the repository at this point in the history
Fixes a bug where lurker headbite would still trigger after a target was moved away during windup.
  • Loading branch information
ClairionCM committed Jun 30, 2023
1 parent 9c90821 commit f152607
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f152607

Please sign in to comment.