How to increase the CP level of greatball?
So i saw in the bot that its using the greatballs even on low level CP pokemons. How do i increase the amount of CP which a greatball triggers?
I missed this section of the implementation. @douglascamata could you help on this one?
Currently it does look for the best pokeball available:
for i in range(3):
for item in self.inventory:
if item['item'] is not i:
continue
if item['count'] is 0:
continue
pokeball = i
item['count'] -= 1
break
@eggins We can use something like this:
if (masterBallsCount > 0 && pokemonCp >= 1000)
MASTER_BALL;
else if (ultraBallsCount > 0 && pokemonCp >= 1000)
ULTRA_BALL;
else if (greatBallsCount > 0 && pokemonCp >= 1000)
GREAT_BALL;
if (ultraBallsCount > 0 && pokemonCp >= 600)
ULTRA_BALL;
else if (greatBallsCount > 0 && pokemonCp >= 600)
GREAT_BALL;
if (greatBallsCount > 0 && pokemonCp >= 350)
GREAT_BALL;
Need a PR ;)?
@brantje @eggins isn't this set at line 65 of pokemon_catch_worker.py??
@brantje weird, mine seems to be working.
[#] A Wild Rattata appeared! [CP68] [x] Using Pokeball... [x] Captured Rattata! [CP68] - exchanging for candy [x] Exchanged successfully! [x] Found pokemon at distance 329.249950733m [#] Walking from (30.511562712141007, -97.67613412729037) to (30.511319456121722, -97.6757101444806) for approx. 3.0 seconds [#] Finished walking to (30.511319456121722, -97.6757101444806) [x] Walked to Pokemon [#] A Wild Pidgey appeared! [CP266] [x] Using Greatball... [x] Captured Pidgey! [CP266]
Can't debug right now, servers are down -_-
@brantje nope its off the master
I think 42-51 is if your out of balls it switches
Can you also add a check to see if the pokemon has already been caught before? I'd only like to use great balls on new pokemons above a certain level.
capture_probability = response_dict['responses']['ENCOUNTER']['capture_probability']['capture_probability']
if self.ballstock[1] > 0:
#DEBUG - Hide
#print 'use Poke Ball'
pokeball = 1
else:
#DEBUG - Hide
#print 'no Poke Ball'
pokeball = 0
if self.ballstock[2] > 0 and capture_probability[0] < 0.5:
#DEBUG - Hide
#print 'use Great Ball'
pokeball = 2
if self.ballstock[3] > 0 and capture_probability[1] < 0.5:
#DEBUG - Hide
#print 'use Utra Ball'
pokeball = 3
Would it make more sense? I don't think wasting a great ball on a pokemon that has a capture probability > 0.5 for a pokeball is a good thing.
good function added with probability in PR #618