Conversation
When a creature has a minimal endurance pool (max 1) and it is fully depleted, both isFragile() and isFatigued() are true. The getter checked Fragile first, so the queue displayed a misleading Fragile status and logged has-become-fragile at the wrong moment. Fatigued (0/x endurance) is the more severe and accurate status, so it is now checked first. Fixes FreezingMoon#1986
|
Someone is attempting to deploy a commit to the FreezingMoon Team on Vercel. A member of the Team first needs to authorize it. |
Preserve Felipe Domingues' exact upstream commit 4d84d7d while incorporating the five concurrent fork commits already on master. No changes are made to Felipe's two-file patch.
Preserve Felipe Domingues' exact upstream fatigue-priority commit while incorporating the concurrently merged materialization-variety work from fork master. The resulting tree keeps Felipe's two-file patch unchanged.
…gue-priority mirror: prioritize Fatigued over Fragile from upstream FreezingMoon#3218
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
It has errors:
|
The production build type-checks the test sources, and the shared
getCreatureObjMock() fixture declares stats as { health, movement } only,
so assigning stats.endurance directly failed with TS2339 and broke
npm run build.
Set endurance through a small typed helper with a widening cast, leaving
the shared fixture untouched for the other suites. Verified with the full
repo gate: lint, production build and jest (385 passed).
|
Fixed in b8a68b4 — thanks for the report. Cause: the production build type-checks the test sources, and the shared getCreatureObjMock() fixture declares stats as { health, movement }, so assigning stats.endurance directly was a compile-time error rather than a runtime one. Endurance is now set through a small typed helper with a widening cast, so the shared fixture stays untouched for the other suites. Verified with the repo's own gate — npm run test (lint + production build + Jest): the build compiles and 385 tests pass. One note on the check above: the Vercel status is now "Authorization required to deploy" rather than a build failure, so it will not turn green until a team member authorizes the deployment. |
This fixes issue #1986
When a creature has a minimal endurance pool (max 1) and it is fully depleted, both
isFragile()andisFatigued()are true. ThefatigueTextgetter checkedFragilefirst, so the queue displayed a misleadingFragilestatus and loggedhas become fragileat the wrong moment.Changes:
src/creature.ts: checkisFatigued()beforeisFragile()in thefatigueTextgetter, so the more severe status is displayed (the fragile log now only fires when the creature is fragile but not fatigued).src/__tests__/creature.ts: 3 new unit tests — fragile+fatigued overlap showsFatigued(and does not log a misleading message), plain fragile showsFragile+ logs, normal pool shows3/5.Validation: full suite 385 passed / lint clean. The new overlap test fails against the original ordering (verified by temporarily reverting the fix).
Note: no bounty attached to this issue, so no wallet address needed.