Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Enhancement] Preserve move PP when fusing #1556

Closed
wants to merge 2 commits into from

Conversation

knispeja
Copy link
Contributor

@knispeja knispeja commented May 29, 2024

What are the changes?

Move PP is now preserved when learning any moves that come from fusion. This is reflected on the move summary UI. Additionally, for the edge case when both members of the fusion have the same move known, the higher PP is used.

Why am I doing these changes?

Issue: #1284
I thought this issue was a good idea -- fusion order and what is retained is already confusing, I think it's best to limit that confusion where possible. It's also just nice for the player not to lose PP for "no reason".

What did change?

Added a PPUp override value that can be passed through into LearnMovePhase as well as Pokemon.setMove() that allows for moves to begin with non-zero values for ppUp. Provided this override value to the fusion move learning phase in pokemon.ts. I also moved PP calculation into a static method so PP could be calculated with PP Ups taken into account when a move hasn't been learned yet.

Screenshots/Videos

SplicePpTransfer.mp4

Note: to clarify the video above, Sand Attack has had a PP Max used on it, and that carries over during fusion.

How to test the changes?

Increase the drop rate of PP Up, PP Max, and DNA Splicer. Try different combinations -- there's a particular edge case when both know the same move with different PP.

Checklist

  • 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)
  • Are the changes visual?
    • Have I provided screenshots/videos of the changes?

@Madmadness65 Madmadness65 added the Enhancement New feature or request label May 29, 2024
@f-fsantos f-fsantos changed the base branch from main to beta July 10, 2024 17:50
@flx-sta
Copy link
Contributor

flx-sta commented Aug 8, 2024

ℹ️ PR considered stale. No actions in the last 30 days.


❗ Feel free to ping me/comment if you want to re-open it

@flx-sta flx-sta closed this Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants