Skip to content

Stall Balancing and Multiplicative Upgrade Overhaul - #94

Merged
candour merged 1 commit into
mainfrom
stall-balancing-overhaul-9871894414873740146
Apr 27, 2026
Merged

Stall Balancing and Multiplicative Upgrade Overhaul#94
candour merged 1 commit into
mainfrom
stall-balancing-overhaul-9871894414873740146

Conversation

@candour

@candour candour commented Apr 27, 2026

Copy link
Copy Markdown
Owner

This PR implements a significant balancing overhaul for the game's stalls.

Key changes include:

  • Multiplicative Scaling: Damage upgrades now multiply the current damage by 1.15x (compounding) and round to the nearest integer. The 25% milestone boost (every 10 levels) is preserved and applied on top of this.
  • Stall Adjustments:
    • Chicken Rice: Base damage reduced to 10, fire rate improved to 500ms. Upgrades now follow a specific -15ms reduction path down to a 200ms floor.
    • Durian: Base damage increased to 150. Upgrades now reduce cooldown by 50ms down to a 1000ms floor.
    • Satay: Base damage increased to 30. Upgrades now reduce cooldown by 25ms down to a 750ms floor.
  • Code Cleanup: Removed the legacy getUpgradeDamageIncrease method and streamlined the upgrade branching in MainViewModel.kt.
  • Documentation: Updated STALL_STATS.md to reflect these changes and expanded the average stall comparison tables to include higher-level milestones (Level 36 and Level 48) to better illustrate late-game scaling.

All changes have been verified with unit tests and ensure consistency between the game logic and the UI.


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

Summary by CodeRabbit

  • Balance Updates
    • Adjusted base stats: Chicken Rice damage reduced with faster attack speed; Satay and Durian damage increased
    • Changed damage upgrade scaling to multiplicative progression (1.15x per level)
    • Refined attack speed upgrade mechanics with stall-type-specific minimum thresholds
    • Updated balance reference documentation with new comparison tables for levels 24, 36, and 48

- Implement compounding multiplicative damage upgrades (1.15x) for all stalls.
- Update base stats: Chicken Rice (10 dmg, 500ms), Durian (150 dmg), Satay (30 dmg).
- Implement specific fire rate reduction rules and floors:
    - Chicken Rice: -15ms reduction, 200ms floor.
    - Durian: -50ms reduction, 1000ms floor.
    - Satay: -25ms reduction, 750ms floor.
- Remove redundant special-case upgrade logic for Chicken Rice.
- Update STALL_STATS.md documentation with new scaling rules and expanded comparison tables (Levels 24, 36, and 48).
- Ensure UI stat benefit strings in Registry.kt match gameplay logic.

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 Apr 27, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Updated stall balance mechanics and upgrade scaling rules across documentation and code: replaced additive damage increment with multiplicative 1.15x scaling, introduced stall-specific fire-rate reductions with per-stall minimum cooldown floors, adjusted base stats (SATAY +10 damage, CHICKEN_RICE -5 damage/-200ms cooldown, DURIAN +30 damage), and removed dedicated damage-increment method.

Changes

Cohort / File(s) Summary
Documentation Update
STALL_STATS.md
Updated balance documentation: changed base stats for CHICKEN_RICE (lower damage/rate), SATAY, and DURIAN (higher damage); redefined damage scaling as multiplicative 1.15x per level with 1.25x every 10 levels; reorganized fire-rate scaling to include stall-specific reductions; restructured results from single Level 24 table to Level 24/36/48 comparison tables.
Upgrade Logic Refactoring
app/src/main/java/com/messark/hawker/MainViewModel.kt, app/src/main/java/com/messark/hawker/registry/Registry.kt
Removed per-level additive damage increment function; replaced with multiplicative damage scaling (1.15x per level rounded); introduced stall-type-specific fire-rate reduction values (ms per level) for CHICKEN_RICE, DURIAN, SATAY, and TRAY_RETURN_UNCLE with matching minimum cooldown floors; removed CHICKEN_RICE redirect logic under upgradeTypeIndex 2.
Base Stall Stats
app/src/main/java/com/messark/hawker/registry/Registry.kt
Adjusted base stall definitions: SATAY damage 20→30, CHICKEN_RICE damage 15→10 and fire rate 700→500ms, DURIAN damage 120→150.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

🚥 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 'Stall Balancing and Multiplicative Upgrade Overhaul' clearly and concisely summarizes the main changes: a balance update and shift to multiplicative upgrade scaling.
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 stall-balancing-overhaul-9871894414873740146

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/MainViewModel.kt (1)

980-1033: ⚠️ Potential issue | 🔴 Critical

Chicken Rice upgrades can consume gold without applying any stat change

When upgradeTypeIndex == 2, StallType.CHICKEN_RICE falls through without setting currentCategoryName or mutating stats, but Line 1078 still deducts gold and commits the upgrade transaction. This creates paid no-op upgrades.

💡 Proposed fix (skip unsupported category and try next shuffled category)
                     when (upgradeTypeIndex) {
                         0 -> {
                             ...
                         }
                         1 -> {
                             ...
                         }
                         2 -> {
                             when (stall.stallType) {
                                 StallType.SATAY, StallType.DURIAN -> {
                                     ...
                                 }
                                 StallType.TEH_TARIK -> {
                                     ...
                                 }
                                 StallType.ICE_KACHANG -> {
                                     ...
                                 }
                                 StallType.TRAY_RETURN_UNCLE -> {
                                     ...
                                 }
                                 else -> {
                                     // Fallback for any utility stalls or other types that shouldn't hit the above
                                     if (stall.stallType.isUtility) {
                                         currentCategoryName = "Range"
                                         newRange += 0.5f
                                         val newLevel = mutableUpgrades.getOrDefault("Range", 0) + 1
                                         if (newLevel % 10 == 0) {
                                             newRange *= 1.25f
                                         }
                                         mutableUpgrades["Range"] = newLevel
                                     }
                                 }
                             }
                         }
                     }
+
+                    if (currentCategoryName.isBlank()) {
+                        // No valid upgrade applied for this category/stall combo; try another category
+                        continue
+                    }

                     var newPrefix = stall.legendaryPrefix

Also applies to: 1078-1078

🧹 Nitpick comments (1)
STALL_STATS.md (1)

68-71: Fix markdownlint MD058 around newly added tables

Add blank lines around each table block to clear the reported MD058 warnings.

Also applies to: 78-81, 88-91


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d4e79840-984c-40f4-9a3f-ac77a61ac997

📥 Commits

Reviewing files that changed from the base of the PR and between e2b8fd4 and 81671de.

📒 Files selected for processing (3)
  • STALL_STATS.md
  • app/src/main/java/com/messark/hawker/MainViewModel.kt
  • app/src/main/java/com/messark/hawker/registry/Registry.kt

@candour
candour merged commit be301a9 into main Apr 27, 2026
3 checks passed
@candour
candour deleted the stall-balancing-overhaul-9871894414873740146 branch April 27, 2026 15:06
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