diff --git a/docs/configuration_files.md b/docs/configuration_files.md index 3c81355554..e478cc4920 100644 --- a/docs/configuration_files.md +++ b/docs/configuration_files.md @@ -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)] diff --git a/pokemongo_bot/cell_workers/update_live_stats.py b/pokemongo_bot/cell_workers/update_live_stats.py index de8a368b46..c82f9a387e 100644 --- a/pokemongo_bot/cell_workers/update_live_stats.py +++ b/pokemongo_bot/cell_workers/update_live_stats.py @@ -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. @@ -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: @@ -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]], @@ -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']), diff --git a/pokemongo_bot/metrics.py b/pokemongo_bot/metrics.py index 9c4f6d72f4..6ce771ae98 100644 --- a/pokemongo_bot/metrics.py +++ b/pokemongo_bot/metrics.py @@ -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):