Add loot-progress punctuation to normal piece move-card indicator - #10
Add loot-progress punctuation to normal piece move-card indicator#10jmegner wants to merge 2 commits into
Conversation
Deploying kdlgame with
|
| Latest commit: |
ef86fa5
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ff6afc96.kdlgame.pages.dev |
| Branch Preview URL: | https://codex-add-loot-action-indica.kdlgame.pages.dev |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: abeb69971c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const roundedThirdsProgress = ((Math.round(moveCards * 3) % 3) + 3) % 3; | ||
| const lootActionsAwayFromNextFullMoveCard = (3 - roundedThirdsProgress) % 3; |
There was a problem hiding this comment.
Compute loot-progress suffix from real loot increment
The new suffix logic assumes loot progress advances in exact thirds (Math.round(moveCards * 3)), but game rules use MOVE_CARDS_PER_LOOT = 11/32 (see src/KdlRust/src/core/rule_helper.rs), so the displayed :/. can be wrong for valid states. This is immediately observable at integer move-card totals (e.g. 2.0 is actually 3 loot actions away from 3.0, but the code shows no suffix), and it also mislabels high fractional states like 2.96875 (1 loot away, still shown with no suffix). As a result, the indicator text and the updated help explanation are inaccurate relative to actual gameplay math.
Useful? React with 👍 / 👎.
Deploying killdoctorluckyweb with
|
| Latest commit: |
ef86fa5
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://390124a7.killdoctorluckyweb.pages.dev |
| Branch Preview URL: | https://codex-add-loot-action-indica.killdoctorluckyweb.pages.dev |
Motivation
Description
:when a normal player is 1 loot action away and a.when 2 loot actions away to the rounded-down move-card count ingetLivePieceIndicatorsvia a newgetNormalPlayerMoveCardIndicatorhelper insrc/components/PlayArea.tsx.:/.semantics in the Piece Indicators section of the same file.e2e/piece-indicator-animation.spec.tsto compute expected indicator text using the same suffix rules so e2e expectations remain aligned with the UI.Testing
npm run build && npm run test, but the build step failed in this environment whenwasm-packattempted to download Binaryen/wasm-optfrom GitHub.cargo test) succeeded with49tests passing and0failures.npx playwright test e2e/piece-indicator-animation.spec.tspassed.Codex Task