-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encounter limited to lvl30+ #307
base: develop
Are you sure you want to change the base?
Conversation
0.4 has not been released yet so use the latest commit from the develop branch instead.
Use asynchronous spawn cache in pogeo.monotools.
Remove dependence on shapely and geopy, improve performance of landmarks, automate landmark pickling/unpickling, read landmarks from config as a sequence of dicts instead of a Landmarks object, a little refactoring, miscellaneous fixes.
Add an example script for converting old-style landmarks configurations (constructing an actual Landmarks instance in config.py) with the new-style of using standard Python data-types (a tuple/list of dicts).
monocle/worker.py
Outdated
@@ -788,7 +788,8 @@ def travel_speed(self, point): | |||
normalized not in MYSTERY_CACHE): | |||
if (encounter_conf == 'all' | |||
or (encounter_conf == 'some' | |||
and normalized['pokemon_id'] in conf.ENCOUNTER_IDS)): | |||
and normalized['pokemon_id'] in conf.ENCOUNTER_IDS)) | |||
and self.player_level != None and self.player_level >= 30: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the closing )
should be at the end of this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could add an other () but not moving ) after self.player_level >= 30.
and could you maybe cleanup your branch? a single commit would be nice |
or (encounter_conf == 'some' | ||
and normalized['pokemon_id'] in conf.ENCOUNTER_IDS)): | ||
and normalized['pokemon_id'] in conf.ENCOUNTER_IDS)) | ||
and self.player_level != None and self.player_level >= 30): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, but doesn't this mean that if there is no level 30 worker nearby it just won't encounter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact we shouldn't encounter with a bot less than lvl30 because IV and CPs are same just for lvl30+
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as information is sent to webooks even if no encounter happened.
So we atleast can get notified of a pokemon with no IV info, than no pokemon at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No encounter doesn't mean no pokemon...
Encounter is used to get IV, CP and moves
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and please make it one commit :)
or (encounter_conf == 'some' | ||
and normalized['pokemon_id'] in conf.ENCOUNTER_IDS)): | ||
and normalized['pokemon_id'] in conf.ENCOUNTER_IDS)) | ||
and self.player_level != None and self.player_level >= 30): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.player_level and self.player_level >= 30
sould be fine too, you don't need the check if it is!= None
- I now understand it maybe it would be better this way:
if (self.player_level and self.player_level >= 30 and
((encounter_conf == 'some' and normalized['pokemon_id'] in conf.ENCOUNTER_IDS)
or encounter_conf == 'all')):
or something like that
Problem is that if i.e a snorlax is found with a non-LV30 worker then we'll never have the IV ? |
How do you see where the pokemon are. Like the actual radar. I'm on mobile right now. I don't know where to go to find the actual radar. Please help. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't line 804 need the same change?
Limiting encounters to bots that are lvl30 or more