Skip to content

Commit

Permalink
Fix crash with upgrade pokemon
Browse files Browse the repository at this point in the history
  • Loading branch information
julienlavergne committed Sep 20, 2016
1 parent d1e983f commit ef2e9ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pokemongo_bot/cell_workers/pokemon_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,8 @@ def get_evolution_plan(self, family_id, family_list, keep, try_evolve, try_upgra
full_upgrade_candy_cost = 0
full_upgrade_stardust_cost = 0

for i in range(pokemon.level, upgrade_level, 0.5):
upgrade_cost = self.pokemon_upgrade_cost[2 * (i - 1)]
for i in range(int(pokemon.level * 2), int(upgrade_level * 2)):
upgrade_cost = self.pokemon_upgrade_cost[i - 2]
full_upgrade_candy_cost += upgrade_cost[0]
full_upgrade_stardust_cost += upgrade_cost[1]

Expand Down

0 comments on commit ef2e9ea

Please sign in to comment.