Skip to content

Commit

Permalink
Treat as VIP missing Pokemon in Pokedex
Browse files Browse the repository at this point in the history
Check pokemon_id in pokedex. If not seen -> treat as VIP.
From PokemonGoF#4559
  • Loading branch information
sohje authored Aug 22, 2016
1 parent 30cdaf6 commit 1ca5bba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pokemongo_bot/cell_workers/pokemon_catch_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def initialize(self):
self.position = self.bot.position
self.pokemon_list = self.bot.pokemon_list
self.inventory = inventory.items()
self.pokedex = inventory.pokedex()
self.spawn_point_guid = ''
self.response_key = ''
self.response_status_key = ''
Expand Down Expand Up @@ -242,7 +243,8 @@ def _should_catch_pokemon(self, pokemon):

def _is_vip_pokemon(self, pokemon):
# having just a name present in the list makes them vip
if self.bot.config.vips.get(pokemon.name) == {}:
# Not seen pokemons also will become vip
if self.bot.config.vips.get(pokemon.name) == {} or not self.pokedex.seen(pokemon.pokemon_id):
return True
return self._pokemon_matches_config(self.bot.config.vips, pokemon, default_logic='or')

Expand Down

0 comments on commit 1ca5bba

Please sign in to comment.