Skip to content

Commit

Permalink
Randomize spins for softban PokemonGoF#2247 (PokemonGoF#2253)
Browse files Browse the repository at this point in the history
* Randomize spins for softban PokemonGoF#2247

* Update handle_soft_ban.py
  • Loading branch information
scalp42 authored and MFizz committed Aug 3, 2016
1 parent 88c3f1a commit 3909a2f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pokemongo_bot/cell_workers/handle_soft_ban.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from random import randint

from pgoapi.utilities import f2i

from pokemongo_bot import logger
Expand Down Expand Up @@ -34,8 +36,9 @@ def work(self):
del self.bot.fort_timeouts[forts[0]['id']]
return WorkerResult.RUNNING
else:
logger.log('Starting 50 spins...')
for i in xrange(50):
spins = randint(50,60)
logger.log('Starting %s spins...' % spins)
for i in xrange(spins):
if (i + 1) % 10 == 0:
logger.log('Spin #{}'.format(str(i+1)))
self.spin_fort(forts[0])
Expand Down

0 comments on commit 3909a2f

Please sign in to comment.