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

Fix escort service ability when target is of size three #2614

Conversation

nohaibogdan1
Copy link
Contributor

@nohaibogdan1 nohaibogdan1 commented Aug 24, 2024

This fixes issue issue

My wallet address 0xb82c1a2192090acf236f691113b2a823a15eb03b.

The proposed changes are the following:

  1. In the object related to scavenger's escort service change the condition from require function to disable the escort service is based on the hexes usable calculated in the query function. This will be one to one correspondence between the button availability to be used and the hexes available to use for escort .

  2. the distance is changed, now bing equally to the remaining moves so that when it computes the adjiacent haxes from the new x at least the hex behind Scavenger will be taken into consideration.

Let's take an example:
Scavenger size is 2 and target size is 3, the remaining moves are 5 and the target is in front. Until now the distance was Math.floor(crea.remainingMove / trg.size), which would be 2. Then the adjiacent hexes from the x of the target are the two hexes backwards from x which results in not having the possibility to move the target backwards.
With the new change the distance is the remaining moves which is 5. The adjiacent hexes from the x of the target will be 5 hexes backwards which will be the hex behind the Scavenger.

Copy link

vercel bot commented Aug 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
ancientbeast ✅ Ready (Inspect) Visit Preview Aug 24, 2024 9:54pm

@nohaibogdan1 nohaibogdan1 force-pushed the fix/scavenger-escort-service-availability-issue-2582 branch from f43a38b to 46d0a5f Compare August 24, 2024 21:53
@DreadKnight DreadKnight merged commit 15e6379 into FreezingMoon:master Aug 24, 2024
6 checks passed
@DreadKnight
Copy link
Member

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