Skip to content

Commit 5a9e828

Browse files
duhminicksolderzzc
authored andcommitted
Set evolve speed in config (#1090)
* added evolve_speed * updated README.md to include evolve_speed
1 parent 6a28333 commit 5a9e828

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ Option | Meaning
187187
`distance_unit` | Set the unit to display distance in (e.g, km for kilometers, mi for miles, ft for feet)
188188
`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)
189189
`evolve_all` | Set to true to evolve pokemon if possible, takes pokémon as an argument as well.
190+
`evolve_speed` | Set the speed between each evolves in seconds. (Defaults to 3.7 seconds if not set)
190191

191192
## Catch Configuration
192193
Default configuration will capture all Pokemon.

configs/config.json.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"701": { "keep" : 100 }
2323
},
2424
"evolve_all": "NONE",
25+
"evolve_speed": 20,
2526
"cp_min": 300,
2627
"use_lucky_egg": false,
2728
"evolve_captured": false,

configs/config.json.pokemons.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"701": { "keep" : 100 }
2222
},
2323
"evolve_all": "NONE",
24+
"evolve_speed": 20,
2425
"use_lucky_egg": false,
2526
"evolve_captured": false,
2627
"catch": {

pokemongo_bot/cell_workers/evolve_all_worker.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,12 @@ def _execute_pokemon_evolve(self, pokemon, cache):
159159
print('[#] Successfully evolved {} with {} CP and {} IV!'.format(
160160
pokemon_name, pokemon_cp, pokemon_iv
161161
))
162-
sleep(3.7)
162+
163+
if self.config.evolve_speed:
164+
sleep(self.config.evolve_speed)
165+
else:
166+
sleep(3.7)
167+
163168
else:
164169
# cache pokemons we can't evolve. Less server calls
165170
cache[pokemon_name] = 1

0 commit comments

Comments
 (0)