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

Update omegaproteingains for new vitamin mechanics #308

Merged
merged 1 commit into from
May 21, 2023

Conversation

umbralOptimatum
Copy link
Contributor

Updates Omega Protein Games to support the new vitamins. Instead of updating the existing approach of intercepting clicks, I modified it to overwrite PartyPokemon.useVitamin() instead. This should make the script much more resilient to future game updates (new vitamins, UI changes, etc).

The script now supports both individual and combined vitamin menus and both adding and removing vitamins. While there's no cap on using Protein or Calcium, I added a limit to the number of Carbos that players can use on each Pokemon to avoid potential glitches from extremely low step counts rounding to 0. The current limit is 70 Carbos, which under the current formula brings any Pokemon above 300 egg steps to exactly 300 steps.

A better approach to the Carbos issue would be to wrap PartyPokemon.getEggSteps() to return 1 at minimum, but modifying the prototype doesn't seem to play nicely with ko.pureComputed-wrapped functions. If anyone knows a way to make that work it would be more stable long-term.

@Ephenia Ephenia added the Insufficient votes This means the PR lacks votes and requires more attention for a decision to be made label May 9, 2023
@Ephenia Ephenia removed the Insufficient votes This means the PR lacks votes and requires more attention for a decision to be made label May 21, 2023
@Ephenia
Copy link
Owner

Ephenia commented May 21, 2023

Approved.

@Ephenia Ephenia merged commit dc51778 into Ephenia:master May 21, 2023
@umbralOptimatum umbralOptimatum deleted the omegaproteins-patch branch May 24, 2023 18:15
@umbralOptimatum
Copy link
Contributor Author

@Ephenia This closes #285 #290 #291 btw

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.

2 participants