Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug][Hotfix] Restrict Use Candies option in the Pokédex #5446

Conversation

Wlowscha
Copy link
Contributor

@Wlowscha Wlowscha commented Feb 28, 2025

Why am I making these changes?

It was pointed out that using candies in the Pokédex during the shop phase can be exploited to dupe rewards for catching mons. #5444

What are the changes from a developer perspective?

Introducing a canUseCandies condition in the dex which is only true in whitelisted phases.

Screenshots/Videos

The option does not show up anymore, even though Pidgey has more than enough candies:
no-candies-for-pidgey

Checklist

  • I'm using beta as my base branch
  • There is no overlap with another PR?
  • The PR is self-contained and cannot be split into smaller PRs?
  • Have I provided a clear explanation of the changes?
  • Have I tested the changes manually?
  • Are all unit tests still passing? (npm run test)
    • Have I created new automated tests (npm run create-test) or updated existing tests related to the PR's changes?
  • Have I provided screenshots/videos of the changes (if applicable)?
    • Have I made sure that any UI change works for both UI themes (default and legacy)?

@Wlowscha Wlowscha marked this pull request as ready for review February 28, 2025 17:21
@Wlowscha Wlowscha requested a review from a team as a code owner February 28, 2025 17:21
@Wlowscha Wlowscha changed the title Adding canUseCandies option to dex, setting temporarily to false. [Bug][Hotfix] Deactivate Use Candies option in the Pokédex Feb 28, 2025
@damocleas damocleas added the P1 Bug Major. Game crashing move/ability/interaction label Feb 28, 2025
DayKev
DayKev previously approved these changes Feb 28, 2025
@Wlowscha Wlowscha changed the title [Bug][Hotfix] Deactivate Use Candies option in the Pokédex [Bug][Hotfix] Restrict Use Candies option in the Pokédex Feb 28, 2025
@Wlowscha
Copy link
Contributor Author

Following @DayKev's suggestion on discord, the code now allows to use candies in one of the whitelisted phases. This means that it is possible to use candies when checking the Dex in the title screen, while selecting starters, or during a run in the command phase, but not after the opponent faints or while picking items.

Video for proof:

Pokerogue.Mozilla.Firefox.2025-02-28.21-27-33.mp4

@damocleas damocleas merged commit 942bcac into pagefaultgames:main Feb 28, 2025
14 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
P1 Bug Major. Game crashing move/ability/interaction
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants