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

a8ee312, All pokemon appear as VIP #5476

Closed
Pjumpod opened this issue Sep 16, 2016 · 9 comments
Closed

a8ee312, All pokemon appear as VIP #5476

Pjumpod opened this issue Sep 16, 2016 · 9 comments

Comments

@Pjumpod
Copy link

Pjumpod commented Sep 16, 2016

In latest update, a8ee312.

it seem all pokemon appears will be vip.

@dogeatdog
Copy link

dogeatdog commented Sep 16, 2016

Hey, Pjumpod. We meet again :)

Yes, second that. I have very important pidgeys and rattattas as well :)

[2016-09-16 10:47:29] [MoveToFort] [INFO] Moving towards pokestop Public Clock - 0.10km
[2016-09-16 10:47:35] [MoveToFort] [INFO] Moving towards pokestop Public Clock - 0.07km
[2016-09-16 10:47:36] [PokemonCatchWorker] [INFO] A wild Rattata appeared! (CP: 186) (NCP: 0.32) (Potential 0.84) (A/D/S 8/15/15)
[2016-09-16 10:47:39] [PokemonCatchWorker] [INFO] This is a VIP pokemon. Catch!!!
[2016-09-16 10:47:44] [PokemonCatchWorker] [INFO] Threw a Razz Berry! Catch rate with Pokeball is now: 64.82
[2016-09-16 10:47:53] [PokemonCatchWorker] [INFO] OK throw! Used Ultraball, with chance 101.63 (98 left)
[2016-09-16 10:47:54] [PokemonCatchWorker] [INFO] Captured Rattata! [CP 186] [NCP 0.32] [Potential 0.84] 8/15/15 [+100 exp] [+100 stardust]
[2016-09-16 10:47:54] [PokemonCatchWorker] [INFO] You now have 7 Rattata candy!
[2016-09-16 10:47:59] [RecycleItems] [INFO] Forcing item recycle based on schedule
[2016-09-16 10:47:59] [RecycleItems] [INFO] Next forced item recycle at 10:50:12
[2016-09-16 10:48:15] [ItemRecycler] [INFO] Discarded 1x Max Potion.
[2016-09-16 10:48:20] [ItemRecycler] [INFO] Discarded 1x Revive.
[2016-09-16 10:48:20] [MoveToFort] [INFO] Moving towards pokestop Public Clock - 0.07km
[2016-09-16 10:48:21] [IncubateEggs] [INFO] Eggs incubating: [1.70/5.0 km](Eggs left: 8, Incubating: 1)
[2016-09-16 10:48:21] [PokemonCatchWorker] [INFO] A wild Rattata appeared! (CP: 111) (NCP: 0.19) (Potential 0.47) (A/D/S 10/6/5)
[2016-09-16 10:48:24] [PokemonCatchWorker] [INFO] This is a VIP pokemon. Catch!!!
[2016-09-16 10:48:28] [PokemonCatchWorker] [INFO] Threw a Razz Berry! Catch rate with Pokeball is now: 79.95
[2016-09-16 10:48:37] [PokemonCatchWorker] [INFO] Nice Curveball throw! Used Greatball, with chance 102.13 (39 left)

edit : tried to influence it by changing config.json :

"treat_unseen_as_vip": false, --> was true, didn't help.

What did help was this :

"vips" : {
"Any pokemon put here directly force to use Berry & Best Ball to capture, to secure the capture rate": {},
"//any": {"catch_above_cp": 1200, "catch_above_iv": 0.9, "logic": "or" },
"//Lapras": {},
"//Moltres": {},
"//Zapdos": {},
"//Articuno": {},

    "// S-Tier pokemons (if pokemon can be evolved into tier, list the representative)": {},
    "//Mewtwo": {},
    "//Dragonite": {},
    "//Snorlax": {},
    "// Mew evolves to Mewtwo": {},
    "//Mew": {},
    "//Arcanine": {},
    "//Vaporeon": {},
    "//Gyarados": {},
    "//Exeggutor": {},
    "//Muk": {},
    "//Weezing": {},
    "//Flareon": {}
},

Going to check further. I think the 'any' is the culprit here.

**edit 2 : Yup, the "any" rule is what's causing it, so I'm guessing that one isn't handled properly right now. Just commenting it

"//any": {"catch_above_cp": 1200, "catch_above_iv": 0.9, "logic": "or" },

will 'fix' it for now.**

@aris-b
Copy link

aris-b commented Sep 16, 2016

I can confirm this

@dogeatdog
Copy link

I think the same cause has broken Telegram, not getting any messages anymore 👍
"alert_catch": {
"all": {"operator": "and", "cp": 100, "iv": 0.2},
"Pidgey": {"operator": "and", "cp": 900, "iv": 0.9}
}

@Pjumpod
Copy link
Author

Pjumpod commented Sep 16, 2016

I think so.

@Pjumpod
Copy link
Author

Pjumpod commented Sep 16, 2016

I try "// any" in vip and work.
between, I see "release_below_iv" is not work as well.
maybe the problem cause on iv handling.

I will open another issue about "release_below_iv" for tracking.

@micheg
Copy link

micheg commented Sep 16, 2016

I think error is in: ./pokemongo_bot/cell_workers/pokemon_catch_worker.py, line 302

    catch_results['fa'] = ( len(pokemon_config.get('fast_attack', [])) == 0 or unicode(pokemon.fast_attack) in map(lambda x: unicode(x), pokemon_config.get('fast_attack', [])))
    catch_results['ca'] = ( len(pokemon_config.get('charged_attack', [])) == 0 or unicode(pokemon.charged_attack) in map(lambda x: unicode(x), pokemon_config.get('charged_attack', [])))

They are always True because if not setted are comparing len of a void list and zero, len([]) == 0, it is True.
Then in returning ./pokemongo_bot/cell_workers/pokemon_catch_worker.py, line 318:

    if LOGIC_TO_FUNCTION[pokemon_config.get('logic', default_logic)](*cr.values()):
        return catch_results['fa'] and catch_results['ca']
    else:
        return False

If condictiong is satisfied this func retrun the comp against fa and ca.
They are in function _pokemon_matches_config that is called by _is_vip_pokemon when not any explicit name.
return self._pokemon_matches_config(self.bot.config.vips, pokemon, default_logic='or')

So, yes the any cause this beaviors but there error in ca e fa.

@micheg
Copy link

micheg commented Sep 16, 2016

The new update allows you to identify the vips pokemon on type attack also.
But in my opinion it does incorrectly.
To restore the old behavior should be enough:
In ./pokemongo_bot/cell_workers/pokemon_catch_worker.py line 318:

    if LOGIC_TO_FUNCTION[pokemon_config.get('logic', default_logic)](*cr.values()):
        return catch_results['fa'] and catch_results['ca']
    else:
        return False

Simply do:

return LOGIC_TO_FUNCTION[pokemon_config.get('logic', default_logic)](*catch_results.values())

(Ignoring check on attack type.)

This should fix all vips, waiting to see how to set up control over the type of attack.
But I need a trial account and unfortunately I know very little about the game.
I need to investigate.

@xty
Copy link
Contributor

xty commented Sep 16, 2016

The same issue was raised in #5457.

@Gobberwart
Copy link
Contributor

PR submitted to fix this

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

No branches or pull requests

6 participants