pokerogue icon indicating copy to clipboard operation
pokerogue copied to clipboard

[Balance] Add Memory Mushroom to Shop

Open innerthunder opened this issue 4 months ago • 9 comments

What are the changes the user will see?

  • Memory Mushrooms are now purchasable in the shop after Wave 80. They currently cost 4x the base item cost (equivalent to 2 Revives). When the player selects Memory Mushroom from the shop, the purchase isn't made until the player finalizes the choice to learn a move. After using a Memory Mushroom from the shop, the player is returned to the rewards screen with the same choices as before the purchase was made.
  • When the player chooses to use a TM on a Pokemon but cancels the learning of the move, the player is returned to the rewards screen with the same reward options

Why am I making these changes?

Requested by Balance Team

What are the changes from a developer perspective?

  • modifier/modifier-type: Added Memory Mushroom to the shop item pool in the third tier (Wave 51+)
  • modifier/modifier: RememberMoveModifier (i.e. Memory Mushroom) now takes a cost argument. If cost is defined, the player spends that much money if the move is learned.
  • phases/select-modifier-phase: Now queues a copy of itself in the phaseQueue when a TM or Memory Mushroom is selected. This allows the player to return to the rewards screen if they decide against learning a move during the LearnMovePhase. The cost of these items (when applicable) is also forwarded to LearnMovePhase, so the player doesn't spend money unless they actually learn the move.
  • phases/learn-move-phase: The fromTM parameter is now expanded to a LearnMoveType enum with 3 possible values:
    • LEARN_MOVE: For default behavior, moves learned from level-up, evolution, and other non-item sources.
    • TM: For moves obtained from TM rewards during the SelectModifierPhase.
    • MEMORY: For moves obtained from Memory Mushroom, either as a reward or shop purchase. This type also uses a cost parameter to deduct money from the player when applicable. The learnMove function has been updated in support of the new LearnMoveTypes.

Screenshots/Videos

Buying a Memory Mushroom + Cancelling a TM

https://github.com/user-attachments/assets/c4c89e5e-3820-4322-97b0-b61f81ae353c

How to test the changes?

Start a run in Classic (or Endless, etc.). Starting at Wave 51, Memory Mushroom should appear in the shop. Try to interact with TMs and Memory Mushroom as they appear as rewards. When you use a TM/Memory Mushroom on a Pokemon but then decline replacing a move for it, you should return to the shop/rewards screen with the same options. Doing the same with a Memory Mushroom from the shop menu should not result in lost money.

Checklist

  • [x] I'm using beta as my base branch
  • [x] There is no overlap with another PR?
  • [x] The PR is self-contained and cannot be split into smaller PRs?
  • [x] Have I provided a clear explanation of the changes?
  • [x] Have I considered writing automated tests for the issue?
  • [x] If I have text, did I make it translatable and add a key in the English locale file(s)?
  • [x] Have I tested the changes (manually)?
    • [x] Are all unit tests still passing? (npm run test)
  • [x] Are the changes visual?
    • [x] Have I provided screenshots/videos of the changes?

innerthunder avatar Oct 03 '24 06:10 innerthunder