Skip to content

Commit

Permalink
Refactor catch worker (#2527)
Browse files Browse the repository at this point in the history
* refactor catch worker

* fix

* few renames

* add to contributors

* fix

* add missing behavior

* fix encounter events

* don't make events about ignored pokemon
  • Loading branch information
pokepal authored and douglascamata committed Aug 8, 2016
1 parent 5fb1f04 commit 4b16e9d
Show file tree
Hide file tree
Showing 3 changed files with 357 additions and 452 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
* matheussampaio
* Abraxas000
* lucasfevi
* pokepal
* Moonlight-Angel
* mjmadsen
* nikofil
9 changes: 7 additions & 2 deletions pokemongo_bot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,12 @@ def _register_events(self):
'iv_display',
)
)
self.event_manager.register_event('no_pokeballs')
self.event_manager.register_event(
'pokemon_catch_rate',
parameters=(
'catch_rate',
'ball_name',
'berry_name',
'berry_count'
)
Expand All @@ -244,25 +246,28 @@ def _register_events(self):
'threw_berry',
parameters=(
'berry_name',
'ball_name',
'new_catch_rate'
)
)
self.event_manager.register_event(
'threw_pokeball',
parameters=(
'pokeball',
'ball_name',
'success_percentage',
'count_left'
)
)
self.event_manager.register_event(
'pokemon_escaped',
'pokemon_capture_failed',
parameters=('pokemon',)
)
self.event_manager.register_event(
'pokemon_vanished',
parameters=('pokemon',)
)
self.event_manager.register_event('pokemon_not_in_range')
self.event_manager.register_event('pokemon_inventory_full')
self.event_manager.register_event(
'pokemon_caught',
parameters=(
Expand Down
Loading

0 comments on commit 4b16e9d

Please sign in to comment.