Skip to content

Commit

Permalink
Fixes ranged Vampire Lurker headbiting (#3773)
Browse files Browse the repository at this point in the history
# About the pull request

<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

Fixes a bug where lurker headbite would still trigger after a target was
moved away during windup by adding a proximity check after the headbite
timer.

# Explain why it's good for the game
fixes #3643

# Changelog
:cl: Clairion

fix: Vampire Lurker headbite will no longer trigger if the target is
moved away during windup.

/:cl:
  • Loading branch information
ClairionCM authored Jul 1, 2023
1 parent 4ca3edc commit ddb3736
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,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 ddb3736

Please sign in to comment.