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

Fix #5461wrong documentation #5598

Merged
merged 7 commits into from
Sep 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/configuration_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,17 +361,17 @@ If you want to configure a given task, you can pass values like this:
## Catch Configuration
[[back to top](#table-of-contents)]

Default configuration will capture all Pokémon.
Default configuration will catch all Pokémon.

```"any": {"catch_above_cp": 0, "catch_above_iv": 0, "logic": "or"}```

You can override the global configuration with Pokémon-specific options, such as:

```"Pidgey": {"catch_above_cp": 0, "catch_above_iv": 0.8", "logic": "and"}``` to only capture Pidgey with a good roll.
```"Pidgey": {"catch_above_cp": 0, "catch_above_iv": 0.8", "logic": "and"}``` to only catch Pidgey with a good roll.

Additionally, you can specify always_capture and never_capture flags.
Additionally, you can specify always_catch and never_catch flags.

For example: ```"Pidgey": {"never_capture": true}``` will stop catching Pidgey entirely.
For example: ```"Pidgey": {"never_catch": true}``` will stop catching Pidgey entirely.

## Release Configuration
[[back to top](#table-of-contents)]
Expand Down
4 changes: 4 additions & 0 deletions pokemongo_bot/cell_workers/update_live_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class UpdateLiveStats(BaseTask):
- pokemon_stats : Puts together the pokemon encountered, caught, released, evolved and unseen.
- pokeballs_thrown : The number of thrown pokeballs.
- stardust_earned : The number of earned stardust since the bot started.
- stardust_per_hour : The estimated gain of stardust per hour
- highest_cp_pokemon : The caught pokemon with the highest CP since the bot started.
- most_perfect_pokemon : The most perfect caught pokemon since the bot started.
- location : The location where the player is located.
Expand Down Expand Up @@ -265,6 +266,7 @@ def _get_stats(self, player_stats):
pokemon_evolved = metrics.num_evolutions()
pokemon_unseen = metrics.num_new_mons()
pokeballs_thrown = metrics.num_throws()
dust_per_hour = int(metrics.stardust_per_hour())
stardust_earned = metrics.earned_dust()
highest_cp_pokemon = metrics.highest_cp['desc']
if not highest_cp_pokemon:
Expand Down Expand Up @@ -297,6 +299,7 @@ def _get_stats(self, player_stats):
'pokemon_unseen': pokemon_unseen,
'pokeballs_thrown': pokeballs_thrown,
'stardust_earned': stardust_earned,
'stardust_per_hour': dust_per_hour,
'highest_cp_pokemon': highest_cp_pokemon,
'most_perfect_pokemon': most_perfect_pokemon,
'location': [self.bot.position[0], self.bot.position[1]],
Expand Down Expand Up @@ -344,6 +347,7 @@ def _get_stats_line(self, player_stats):
),
'pokeballs_thrown': 'Threw {:,} pokeballs'.format(player_stats['pokeballs_thrown']),
'stardust_earned': 'Earned {:,} Stardust'.format(player_stats['stardust_earned']),
'stardust_per_hour': '{:,} Stardust/h'.format(player_stats['stardust_per_hour']),
'highest_cp_pokemon': 'Highest CP pokemon : {}'.format(player_stats['highest_cp_pokemon']),
'most_perfect_pokemon': 'Most perfect pokemon : {}'.format(player_stats['most_perfect_pokemon']),
'location': 'Location : ({}, {})'.format(*player_stats['location']),
Expand Down
3 changes: 3 additions & 0 deletions pokemongo_bot/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ def num_evolutions(self):

def earned_dust(self):
return self.dust['latest'] - self.dust['start']

def stardust_per_hour(self):
return self.earned_dust()/(time.time() - self.start_time)*3600

def hatched_eggs(self, update):
if (update):
Expand Down