AncientBeast icon indicating copy to clipboard operation
AncientBeast copied to clipboard

fix: prevent extra movement restoration on movement drops (fixes #2814)

Open Bennethxyz opened this issue 1 month ago • 4 comments

Problem Picking up movement-increasing drops (e.g., Scavenger wing feather, Uncle Fungus frog leg) restored movement twice: once via updateAlteration and once via Drop.pickup(). This could leave extra movement points after pickup.

Solution

  • In Drop.pickup(), stop calling creature.restoreMovement() for movement drops. updateAlteration already increases max movement and increments remainingMove accordingly. This prevents double restoration while preserving intended +1 movement remaining when picked up on the last point.

Verification

  • Jest passes (84/84) locally.
  • Logic verified by code path: updateAlteration handles remainingMove for movement increases; energy/endurance restoration unchanged.

Impact

  • No gameplay nerf: movement max still increases; remainingMove no longer double-increments.

Closes #2814

Bennethxyz avatar Nov 04 '25 14:11 Bennethxyz

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

A member of the Team first needs to authorize it.

vercel[bot] avatar Nov 04 '25 14:11 vercel[bot]

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

Project Deployment Preview Updated (UTC)
ancientbeast Ready Ready Preview Nov 5, 2025 2:25am

vercel[bot] avatar Nov 05 '25 02:11 vercel[bot]

@Bennethxyz I've tested it some more, there's still something off about this: Dark Priest steps on bat wings (Chimera drop that provides +2 movement), remaining movement will be 3-1+2, meaning 4, but the next time it picks a drop that provides movement (like from Scavenger or Uncle Fungus), things don't properly add up anymore, it's like the move when picking the drop doesn't get drained anymore, basically a free hexagon move 🐻 So test it out with picking up multiple movement related drops (doesn't have to be in the same turn btw).

DreadKnight avatar Nov 05 '25 02:11 DreadKnight

@Bennethxyz You're a bot, aren't you? 🐻

DreadKnight avatar Nov 07 '25 07:11 DreadKnight