Skip to content

Commit

Permalink
Set evolve speed in config (#1090)
Browse files Browse the repository at this point in the history
* added evolve_speed

* updated README.md to include evolve_speed
  • Loading branch information
duhminick authored and solderzzc committed Jul 27, 2016
1 parent 6a28333 commit 5a9e828
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ Option | Meaning
`distance_unit` | Set the unit to display distance in (e.g, km for kilometers, mi for miles, ft for feet)
`item_filter` | Pass a list of unwanted items (in CSV format) to recycle when collected at a Pokestop (e.g, "101,102,103,104" to recycle potions when collected)
`evolve_all` | Set to true to evolve pokemon if possible, takes pokémon as an argument as well.
`evolve_speed` | Set the speed between each evolves in seconds. (Defaults to 3.7 seconds if not set)

## Catch Configuration
Default configuration will capture all Pokemon.
Expand Down
1 change: 1 addition & 0 deletions configs/config.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"701": { "keep" : 100 }
},
"evolve_all": "NONE",
"evolve_speed": 20,
"cp_min": 300,
"use_lucky_egg": false,
"evolve_captured": false,
Expand Down
1 change: 1 addition & 0 deletions configs/config.json.pokemons.example
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"701": { "keep" : 100 }
},
"evolve_all": "NONE",
"evolve_speed": 20,
"use_lucky_egg": false,
"evolve_captured": false,
"catch": {
Expand Down
7 changes: 6 additions & 1 deletion pokemongo_bot/cell_workers/evolve_all_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,12 @@ def _execute_pokemon_evolve(self, pokemon, cache):
print('[#] Successfully evolved {} with {} CP and {} IV!'.format(
pokemon_name, pokemon_cp, pokemon_iv
))
sleep(3.7)

if self.config.evolve_speed:
sleep(self.config.evolve_speed)
else:
sleep(3.7)

else:
# cache pokemons we can't evolve. Less server calls
cache[pokemon_name] = 1
Expand Down

2 comments on commit 5a9e828

@xc-mezcal
Copy link
Contributor

@xc-mezcal xc-mezcal commented on 5a9e828 Jul 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plz do a small random number for the speed.

Like if we set it to 20, then it will be random number 20 +- 2

Well, default is 3.7 without random :D

@DavidK1m
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+/- 10% random would probably be better than +/- 2 because some people might want 0 second delay.

Please sign in to comment.