Update omegaproteingains for new vitamin mechanics #308
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 withko.pureComputed
-wrapped functions. If anyone knows a way to make that work it would be more stable long-term.