Skip to content
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

Open
wants to merge 45 commits into
base: develop
Choose a base branch
from

Conversation

sebast1219
Copy link

Limiting encounters to bots that are lvl30 or more

Noctem and others added 30 commits April 28, 2017 01:01
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).
Use correct cache in add_mystery, use visit_point instead of visit in
Overseer, fix setting spawn/despawn times in update_spawns, fix some
variable names in Worker.
@@ -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:
Copy link
Contributor

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

Copy link
Author

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.

@evenly-epic-mule
Copy link
Contributor

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):

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?

Copy link
Author

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+

Copy link

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.

Copy link
Author

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

Copy link
Contributor

@evenly-epic-mule evenly-epic-mule left a 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):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. self.player_level and self.player_level >= 30 sould be fine too, you don't need the check if it is != None
  2. 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

@just2codes
Copy link

Problem is that if i.e a snorlax is found with a non-LV30 worker then we'll never have the IV ?

@BaseUrchin73
Copy link

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.

Copy link
Contributor

@j16sdiz j16sdiz left a 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants