Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1106 - Bunny Hop triggers however an enemy comes into proximity with the Bunny #1939

Merged
merged 13 commits into from
Dec 9, 2021

Conversation

nandastone
Copy link
Contributor

@nandastone nandastone commented Dec 7, 2021

This MR allows the Bunny Hop ability to trigger when:

  • an enemy enters the 3 hexes in front of the Bunny (already worked)
  • the Bunny is displaced and now has an enemy within the 3 hexes in front of the Bunny (new)

CleanShot 2021-12-07 at 21 47 42

CleanShot 2021-12-07 at 21 48 26

When Bunny is frozen:

CleanShot 2021-12-07 at 21 46 01

CleanShot 2021-12-07 at 21 46 15

@gitpod-io
Copy link

gitpod-io bot commented Dec 7, 2021

@nandastone
Copy link
Contributor Author

@DreadKnight Are there any other displacement type abilities I should test this with?

enemyInFront &&
/* Only the active enemy creature should trigger the Hop, not other enemy
creatures that happen to be nearby. */
enemyInFront === this.game.activeCreature &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really. Basically a friend or foe could move an enemy unit in front of Snow Bunny, which should trigger the passive.
Scavenger can use Escort Service ability to move units around.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MR updated, see my comment below: #1939 (comment)

@DreadKnight
Copy link
Member

DreadKnight commented Dec 7, 2021

@nandastone I've left review regarding Scavenger's Escort Service. So the passive shouldn't work just vs active units.
There are also some abilities with knockback, Like Swine Thung's Baseball bat or Uncle Fungus' upgraded Sabre Kick.
Chimera's Battering Ram, Nutcase's upgraded Horn Head, also his Fishing Hook deals with moving around enemies.
So allied units could kick enemies closer to Snow Bunny, possibly causing him to scare away, because he's very fearful.

@nandastone
Copy link
Contributor Author

nandastone commented Dec 8, 2021

@DreadKnight MR updated. Examples:

Regular hop:

CleanShot 2021-12-09 at 06 47 11

Angled hop:

CleanShot 2021-12-09 at 06 47 31

Whip Move displacing hop:

CleanShot 2021-12-09 at 06 48 51

Escort Service displacing hop:

CleanShot 2021-12-09 at 06 50 17

Escort service between two enemies hop:

CleanShot 2021-12-09 at 06 51 29

Escort service between two enemies double hop (upgraded):

CleanShot 2021-12-09 at 06 53 00

Baseball baton hop:

CleanShot 2021-12-09 at 06 54 53

Invalid move no hop:

CleanShot 2021-12-09 at 06 55 54

Angled fallback hop:

CleanShot 2021-12-09 at 06 56 31


Interested to know if any of my functions for determining enemy position could be replaced with existing helper functions in the codebase.

@DreadKnight
Copy link
Member

Seems you had quite the fun with this. So far tests are pretty good. There are situation where Bunny hops twice when he could have hopped just once to get out of danger, but that's fine, as it would rather become way more complex and we'll just assume he's not thinking straight so definitely not making the best and most efficient moves. Regarding helper function, maybe when abilities will get revamped and become modular as of issue #1469 in order to have an API and avoid reinvesting the wheel so much. Great job once again! 👏🏻 I'll merge this and will just open new issues if I do happen to find some given time, we'll see.

@DreadKnight DreadKnight merged commit f5a0597 into FreezingMoon:master Dec 9, 2021
@nandastone nandastone deleted the 1106 branch December 14, 2021 07:35
CyberBishop pushed a commit to CyberBishop/AncientBeast that referenced this pull request Apr 20, 2023
Bunny Hop triggers however an enemy comes into proximity with the Bunny, fixes FreezingMoon#1106
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants