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

Pokemon optimizer improvements #4446

Merged
merged 5 commits into from
Aug 21, 2016
Merged

Pokemon optimizer improvements #4446

merged 5 commits into from
Aug 21, 2016

Conversation

julienlavergne
Copy link
Contributor

  • Refresh web inventory when pokemon inventory change
  • Take into account the candy rewarded at evolution. This is to fix a borderline case. ex:

If we have 23 candies and 2 Pidgey (at 12 evolution cost), the previous formula give us that only one of them can be evolved:
(23 + 2) / (12 + 1) = 1

The fixed formula return that both can be evolved (which is correct):
(23 + 2 - 1) / 12 = 2

Take into account the candy rewarded at evolution
@mention-bot
Copy link

@anakin5, thanks for your PR! By analyzing the annotation information on this pull request, we identified @BriceSD, @RedViper9 and @DeXtroTip to be potential reviewers

@@ -29,13 +29,13 @@ def initialize(self):
self.max_pokemon_storage = inventory.get_pokemon_inventory_size()
self.last_pokemon_count = 0

self.config_transfer = self.config.get("transfer", False)
self.config_evolve = self.config.get("evolve", False)
self.config_transfer = self.config.get("transfer", True)
Copy link
Contributor

@mjmadsen mjmadsen Aug 21, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer things to be off by default.

If we use the default value, they are probably missing important stuff in their config.

@julienlavergne
Copy link
Contributor Author

done

self.config_evolve_count_for_lucky_egg = self.config.get("evolve_count_for_lucky_egg", 90)
self.config_may_use_lucky_egg = self.config.get("may_use_lucky_egg", False)
self.config_evolve_count_for_lucky_egg = self.config.get("evolve_count_for_lucky_egg", 92)
self.config_may_use_lucky_egg = self.config.get("may_use_lucky_egg", True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we revert this as well?

@julienlavergne
Copy link
Contributor Author

done

@solderzzc
Copy link
Contributor

Thanks for the PR.

@solderzzc solderzzc merged commit 9382550 into PokemonGoF:dev Aug 21, 2016
@julienlavergne julienlavergne deleted the pokemon_optimizer branch August 22, 2016 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants