From d01e39b97995e016513be4bfdbede23157130214 Mon Sep 17 00:00:00 2001 From: Matt J Madsen Date: Mon, 22 Aug 2016 10:48:43 -0500 Subject: [PATCH 1/2] Ultraball try emit_event --- pokemongo_bot/cell_workers/pokemon_catch_worker.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pokemongo_bot/cell_workers/pokemon_catch_worker.py b/pokemongo_bot/cell_workers/pokemon_catch_worker.py index 3211ab7b73..bcfabc8a03 100644 --- a/pokemongo_bot/cell_workers/pokemon_catch_worker.py +++ b/pokemongo_bot/cell_workers/pokemon_catch_worker.py @@ -353,6 +353,7 @@ def _do_catch(self, pokemon, encounter_id, catch_rate_by_ball, is_vip=False): # use untraball if there is no other balls with constraint to `min_ultraball_to_keep` if maximum_ball != ITEM_ULTRABALL and ball_count[ITEM_ULTRABALL] > min_ultraball_to_keep: maximum_ball = ITEM_ULTRABALL + self.emit_event('trying_ultraball', formatted='More ultraballs than minimum. Trying...') continue else: return WorkerResult.ERROR From 56f441a53699ce371c97325b1625d46a37bb81ad Mon Sep 17 00:00:00 2001 From: Matt J Madsen Date: Mon, 22 Aug 2016 10:54:09 -0500 Subject: [PATCH 2/2] Output change --- pokemongo_bot/cell_workers/pokemon_catch_worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pokemongo_bot/cell_workers/pokemon_catch_worker.py b/pokemongo_bot/cell_workers/pokemon_catch_worker.py index bcfabc8a03..54e12206b6 100644 --- a/pokemongo_bot/cell_workers/pokemon_catch_worker.py +++ b/pokemongo_bot/cell_workers/pokemon_catch_worker.py @@ -348,7 +348,7 @@ def _do_catch(self, pokemon, encounter_id, catch_rate_by_ball, is_vip=False): while ball_count[current_ball] == 0 and current_ball < maximum_ball: current_ball += 1 if ball_count[current_ball] == 0: - self.emit_event('no_pokeballs', formatted='No usable pokeballs found!') + self.emit_event('no_pokeballs', formatted='No usable (non-ultra)pokeballs found!') # use untraball if there is no other balls with constraint to `min_ultraball_to_keep` if maximum_ball != ITEM_ULTRABALL and ball_count[ITEM_ULTRABALL] > min_ultraball_to_keep: