Skip to content

Fix Bak Kut Teh logic and scaling - #157

Merged
candour merged 1 commit into
mainfrom
fix-bkt-logic-and-scaling-10113414088049427990
May 14, 2026
Merged

Fix Bak Kut Teh logic and scaling#157
candour merged 1 commit into
mainfrom
fix-bkt-logic-and-scaling-10113414088049427990

Conversation

@candour

@candour candour commented May 14, 2026

Copy link
Copy Markdown
Owner

This PR fixes a bug where Bak Kut Teh stalls would provide their wave-start random buff even if they were in a disabled state (e.g., following a specific upgrade or event).

Additionally, it synchronizes the Bak Kut Teh statistics with the official project documentation (STALL_STATS.md and AGENTS.md) by correcting the base boost and upgrade increment from 10% to 20%.

Key changes:

  1. Bug Fix: Added it.stall.disabledWaves == 0 check in MainViewModel.startWave.
  2. Balancing/Consistency: Updated base damage/boost to 20f in Registry.kt and upgrade increment to 20.0 in StallUpgradeManager.kt.
  3. Tests:
    • Created BktDisabledWaveTest.kt to verify that disabled BKT stalls do not trigger wave buffs.
    • Updated BakKutTehSameTickTest.kt assertions to reflect the 20% boost.
  4. Documentation: Added FIX-009 to fixes.md.

PR created automatically by Jules for task 10113414088049427990 started by @candour

Summary by CodeRabbit

  • Bug Fixes

    • Bak Kut Teh wave buff now only applies when the stall is enabled (not disabled).
    • Bak Kut Teh base boost percentage increased from 10% to 20%.
    • Boost stat scaling per-level increment increased from 10 to 20.
  • Tests

    • Added test coverage for Bak Kut Teh wave buff behavior with enabled and disabled stalls.
    • Updated test expectations to reflect new 20% boost values.

Review Change Stack

…ation

- Updated `MainViewModel.startWave` to only trigger Bak Kut Teh wave buffs if the stall is enabled (disabledWaves == 0).
- Corrected Bak Kut Teh base boost from 10% to 20% in `Registry.kt` to match `STALL_STATS.md` and `AGENTS.md`.
- Updated `StallUpgradeManager` to use a 20% increment for Bak Kut Teh boosts.
- Added regression test `BktDisabledWaveTest.kt`.
- Updated `BakKutTehSameTickTest.kt` to reflect corrected boost values.
- Updated `fixes.md` with FIX-009.

Co-authored-by: candour <4670475+candour@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented May 14, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This PR fixes Bak Kut Teh wave buff eligibility to respect disabled stalls and increases the base boost percentage from 10% to 20%. MainViewModel's startWave() now checks disabledWaves == 0 before applying the buff. The boost value is doubled in the stall registry and upgrade manager calculations, with validation tests added and the existing test updated.

Changes

Bak Kut Teh wave buff and boost fix

Layer / File(s) Summary
BKT wave buff disabled state handling
app/src/main/java/com/messark/hawker/MainViewModel.kt, app/src/test/java/com/messark/hawker/BktDisabledWaveTest.kt
startWave() only applies wave buff when BKT stall has disabledWaves == 0. New test class validates null toast when disabled (disabledWaves = 1) and non-null toast when enabled (disabledWaves = 0).
BKT boost percentage increase
app/src/main/java/com/messark/hawker/registry/Registry.kt, app/src/main/java/com/messark/hawker/utils/StallUpgradeManager.kt, app/src/test/java/com/messark/hawker/BakKutTehSameTickTest.kt
BKT stall base boost (damage) raised from 10f to 20f in registry. Upgrade manager "Boost" stat increment increased from 10.0 to 20.0 per level. Existing test expectation updated from 10% boost (610 gold) to 20% boost (620 gold).
Fix documentation
fixes.md
FIX-009 entry added documenting the wave buff logic correction and base boost/upgrade scaling alignment.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • candour/towerpower#116: Directly overlaps on StallUpgradeManager.calculateValue()'s "Boost" scaling computation refactor.
  • candour/towerpower#111: Overlaps on Bak Kut Teh boost mechanics and base boost value initialization in MainViewModel and Registry.
  • candour/towerpower#126: Overlaps on MainViewModel's Bak Kut Teh boost behavior and re-enabled adjacent stall boosting logic.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: fixing Bak Kut Teh wave buff logic (disabledWaves check) and correcting scaling values from 10% to 20%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-bkt-logic-and-scaling-10113414088049427990

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown

Build Successful! 🚀

Download APK

Note: This link will be removed when the PR is closed.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/src/main/java/com/messark/hawker/registry/Registry.kt (1)

510-510: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update tutorial description to reflect the 20% boost.

The tutorialDescription still states "by 10%" but the base boost percentage is now 20% (line 505). This user-facing text will mislead players about the stall's actual effectiveness.

📝 Proposed fix
-tutorialDescription = "The aroma of these herbs doesn't just attract customers; it invigorates your fellow hawkers! Placing this stall next to others will boost their primary stats—like damage, effect duration, or even ATM income—by 10%. It's the perfect herbal pick-me-up for a busy lunch rush. Note: Boosts from multiple Bak Kut Teh stalls stack additively!",
+tutorialDescription = "The aroma of these herbs doesn't just attract customers; it invigorates your fellow hawkers! Placing this stall next to others will boost their primary stats—like damage, effect duration, or even ATM income—by 20%. It's the perfect herbal pick-me-up for a busy lunch rush. Note: Boosts from multiple Bak Kut Teh stalls stack additively!",

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e847e56b-1724-4424-a8bd-90e7c159e1fc

📥 Commits

Reviewing files that changed from the base of the PR and between a458b18 and 0478f32.

📒 Files selected for processing (6)
  • app/src/main/java/com/messark/hawker/MainViewModel.kt
  • app/src/main/java/com/messark/hawker/registry/Registry.kt
  • app/src/main/java/com/messark/hawker/utils/StallUpgradeManager.kt
  • app/src/test/java/com/messark/hawker/BakKutTehSameTickTest.kt
  • app/src/test/java/com/messark/hawker/BktDisabledWaveTest.kt
  • fixes.md

@candour
candour merged commit a1ed2d2 into main May 14, 2026
3 checks passed
@candour
candour deleted the fix-bkt-logic-and-scaling-10113414088049427990 branch May 14, 2026 06:55
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.

1 participant