Skip to content

Bugfix: Implement missing Lahap jewel combine/dismantle tax#794

Open
eduardosmaniotto wants to merge 1 commit into
MUnique:masterfrom
eduardosmaniotto:bugfix/lahap-tax
Open

Bugfix: Implement missing Lahap jewel combine/dismantle tax#794
eduardosmaniotto wants to merge 1 commit into
MUnique:masterfrom
eduardosmaniotto:bugfix/lahap-tax

Conversation

@eduardosmaniotto
Copy link
Copy Markdown
Contributor

Closes #765

Add Zen fees to Lahap jewel combine/dismantle operations

Lahap's jewel combine and dismantle were free. This adds hardcoded Zen costs:

  • Combine: 500k per 10 jewels (10→500k, 20→1M, 30→1.5M)
  • Dismantle: 1M flat fee regardless of stack size

Zen is deducted after item validation but before items are consumed, avoiding any rollback complexity. The client is notified of the balance change via IUpdateMoneyPlugIn.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a missing economic mechanic by enforcing Zen costs for jewel stacking and unstacking operations at the Lahap NPC. By implementing these fees, the change ensures that jewel management now correctly consumes player currency, with proper validation to prevent unauthorized operations and clear client-side feedback for balance updates.

Highlights

  • Zen Fee Implementation: Introduced mandatory Zen costs for Lahap's jewel combine (500k per 10 jewels) and dismantle (1M flat fee) operations.
  • Validation and Feedback: Added balance checks before item processing and integrated IUpdateMoneyPlugIn to notify the client of currency changes.
  • Logging Improvements: Refactored security-related log messages to use structured logging templates instead of string interpolation.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces fees for combining and dismantling item stacks (jewels) in ItemStackAction.cs, including checking for sufficient funds and updating the player's money UI. It also refactors logging to use structured formats and corrects minor typos. A critical security issue was identified where a stackSize of 0 could bypass the fee and jewel requirements, potentially allowing players to exploit the system. A validation check for valid bundle sizes (10, 20, or 30) was suggested to prevent this.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/GameLogic/PlayerActions/Items/ItemStackAction.cs
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.

Lahap not charge for jewel combinations

1 participant