Skip to content

Conversation

@decker757
Copy link

@decker757 decker757 commented Oct 28, 2025

Fix Escort Service Availability Bug

I am not sure if this is the fix you're looking for, but it resolves the premature cooldown issue I was experiencing.
This fixes #2802

Problem

Escort Service ability becomes unavailable even when Scavenger has movement points remaining. This happens intermittently after moving around the map.

Root Cause

getEscortUsableHexes() was calling getFlyingRange() with incorrect parameters:

  • Used combined size (4) instead of Scavenger's size (2)
  • Used modified x position instead of actual position
  • This caused getFlyingRange to return hexes on wrong rows
  • All hexes were filtered out, resulting in usableHexes.length = 0

Solution

  • Use Scavenger's actual position: crea.x, crea.y
  • Use Scavenger's size: crea.size
  • This returns hexes on the correct row where the ability can be used

Testing

See ESCORT_SERVICE_FIX.md for detailed before/after comparison and testing instructions.

https://streamable.com/svz8rc [before patch - cooldown was premature]
https://streamable.com/avm0yu [after patch - cooldown is correct]

Video links expire in 2 days (30th October where I am from)

This is a detailed summary of what I did to attempt to fix the bug. Not sure if this is what you're looking for but this resolved the problem where Escort Service goes on cooldown when there are still moves left.
The Escort Service ability was incorrectly showing as unavailable even when
the Scavenger had sufficient movement points. This was caused by passing
incorrect parameters to getFlyingRange().

Root cause:
- getFlyingRange() was called with a modified x position and combined size
  (Scavenger size + target size)
- This caused it to return hexes on different rows (y-coordinates) than where
  the creatures actually were
- All returned hexes were filtered out because they didn't match crea.y
- Result: usableHexes.length = 0 even with movement available

Fix:
- Use Scavenger's actual position (crea.x, crea.y) instead of modified position
- Use Scavenger's size (crea.size) instead of combined size
- This returns hexes on the correct row where the ability can be used

Fixes intermittent unavailability after moving around the map.
@vercel
Copy link

vercel bot commented Oct 28, 2025

@decker757 is attempting to deploy a commit to the FreezingMoon Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Oct 30, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
ancientbeast Ready Ready Preview Oct 30, 2025 4:42am

@DreadKnight
Copy link
Member

@decker757 "Testing" = all dead links. Rather upload previews here. That link to the MD file is also broken.

I've tested a bit, works better than current master, but still bumped into a bug:
Scavenger turn starts in front of Knightmare = can't use Escort Service 🐻
Screenshot_20251030_064503

Same goes with turn start in front of Headless
Screenshot_20251030_064750
And if flying in front of Knightmare, still not usable. So it needs more testing and work.

@DreadKnight DreadKnight marked this pull request as draft October 30, 2025 04:49
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.

Escort Service unavailable at times [bounty: 25 XTR]

2 participants