Kitchelin Star Improvements and Health Action - #129
Conversation
- Add 1% passive gold bonus per Kitchelin Star (cumulative). - Buff Budget Bonus action from 10% to 100%. - Add "Restore Health" action to spend a star for +1 health (max 10). - Update UI to include the new action and updated descriptions. - Add unit tests for new and updated bonus logic. - Update AGENTS.md with new mechanics. Co-authored-by: candour <4670475+candour@users.noreply.github.com>
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
📝 WalkthroughWalkthroughThis PR implements a new Kitchelin Star action system: players can restore health by spending stars, the Budget Bonus formula is recalculated to offer 100% next-round gold (cumulative with a new 1% passive per-star bonus), and UI components are updated to display and handle the health restoration option. ChangesKitchelin Star Action System & Bonus Recalculation
Sequence DiagramsequenceDiagram
actor Player
participant MainActivity
participant StarActionOverlay
participant MainViewModel
Player->>StarActionOverlay: Click "Restore Health" button
StarActionOverlay->>MainViewModel: onRestoreHealth() callback
MainViewModel->>MainViewModel: Consume 1 kitchelinStar
MainViewModel->>MainViewModel: Increment health by 1 (max 10)
MainViewModel->>MainViewModel: Dismiss showStarActionOverlay
MainViewModel-->>MainActivity: State update (health, stars, overlay)
MainActivity-->>StarActionOverlay: Recompose with updated state
StarActionOverlay-->>Player: Close overlay, display new health
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Build Successful! 🚀Note: This link will be removed when the PR is closed. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
app/src/main/java/com/messark/hawker/ui/components/StarActionOverlay.kt (1)
124-124: ⚡ Quick winAvoid hardcoded button colors
Color(0xFFFFD700)andColor.Grayshould come fromMaterialTheme.colorSchemeso this stays correct in both light/dark themes.Proposed theme-based adjustment
- color = if (enabled) Color(0xFFFFD700) else Color.Gray, // Gold or Gray + color = if (enabled) MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.surfaceVariant,As per coding guidelines: "/*.kt: Always prefer MaterialTheme.colorScheme ... instead of hardcoding colors in UI components".
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 37fedd94-adfc-46d3-9f25-f9a3fc86bee3
📒 Files selected for processing (5)
AGENTS.mdapp/src/main/java/com/messark/hawker/MainActivity.ktapp/src/main/java/com/messark/hawker/MainViewModel.ktapp/src/main/java/com/messark/hawker/ui/components/StarActionOverlay.ktapp/src/test/java/com/messark/hawker/KitchelinBonusTest.kt
This change enhances the Kitchelin Star system by adding a passive gold bonus for each star held, increasing the potency of the Budget Bonus action, and introducing a new health restoration option. Logic was added to MainViewModel to handle these bonuses and actions, and the StarActionOverlay UI was updated to support the new functionality. Tests verify the correctness of the cumulative bonus calculations and health restoration.
PR created automatically by Jules for task 16498074718452147401 started by @candour
Summary by CodeRabbit
New Features
Gameplay Balance
Documentation