Skip to content

Commit

Permalink
Merge pull request #6139 from MerlionRock/dev
Browse files Browse the repository at this point in the history
Ignore legendaries for in gyms #6139
  • Loading branch information
Jcolomar authored Jul 26, 2017
2 parents 69a906e + f4687ce commit c115cd2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pokemongo_bot/cell_workers/gym_pokemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,14 +661,18 @@ def get_poke_info(info, pokemon):
if info not in poke_info:
raise ConfigException("order by {}' isn't available".format(self.order_by))
return poke_info[info]
legendaries = ["Lugia", "Zapdos", "HoOh", "Celebi", "Articuno", "Moltres", "Mewtwo", "Mew"]
# Don't place a Pokemon which is already in the gym (prevent ALL Blissey etc)
possible_pokemons = [p for p in self.pokemons if not p.name in current_pokemons]
# Don't put in Pokemon above 3000 cp (morale drops too fast)
possible_pokemons = [p for p in possible_pokemons if p.cp < 3000 and p.name not in self.ignore_max_cp_pokemon]
# Filter out "bad" Pokemon
possible_pokemons = [p for p in possible_pokemons if not p.is_bad]
# Ignore legendaries for in Gyms
possible_pokemons = [p for p in possible_pokemons if not p.name in legendaries]
# Filter out "never place" Pokemon
possible_pokemons = [p for p in possible_pokemons if p.name not in self.never_place]

# HP Must be max
possible_pokemons = [p for p in possible_pokemons if p.hp == p.hp_max]
possible_pokemons = [p for p in possible_pokemons if not p.in_fort]
Expand Down

0 comments on commit c115cd2

Please sign in to comment.