PokemonGoF / PokemonGo-Bot

The Pokemon Go Bot, baking with community.
MIT License
3.86k stars 1.54k forks source link

Feature Request : Shiny #5982

Open camnomis opened 7 years ago

camnomis commented 7 years ago

Thanks to I assume @davidakachaos check in we are now getting notifications if catches are Shiny, but can we use this logic else where? Ideally I would like to use it as a VIP / always catch / never release.

Is this possible?

camnomis commented 7 years ago

Edit:

just seen in pokemon_catch_worker.py

Which means all Shiny's are VIP, other two requests stand

ronaldobr72 commented 7 years ago

I made this change on my transfer_pokemon.py code, it works for me:

def should_release_pokemon(self, pokemon, keep_best_mode=False):
    release_config = self._get_release_config_for(pokemon.name)

    never_release_shiny = release_config.get('never_release_shiny', 0)
    if pokemon.shiny and never_release_shiny:
       self.emit_event(
           'pokemon_shiny_keep',
           data={
               'pokemon': pokemon.name,
               'iv': pokemon.iv,
               'cp': pokemon.cp,
               'ivcp': pokemon.ivcp,
               'shiny': pokemon.shiny 
           },
           formatted="Kept {} (CP: {}, IV: {}, IVCP: {} shiny: {})".format(pokemon.name, pokemon.cp, pokemon.iv, pokemon.ivcp, pokemon.shiny),
       )
       return False 

    if (keep_best_mode

And of config.json

    "any": { "keep_best_cp": 1, "never_release_shiny": true},

    "Pidgey": { "keep_best_cp": 10, "never_release_shiny": true },
    "Weedle": { "keep_best_cp": 10, "never_release_shiny": true },
    "Caterpie": { "keep_best_cp": 10, "never_release_shiny": true},
    "// Keep no more than 3 best IV pokemon for every pokemon type": {},

I don't know how to implement it in project.

nemchik commented 6 years ago

I'd love to know how to get the bot to treat shiny as VIP and never transfer/release them.

jessie-n-james commented 6 years ago

@ronaldobr72 Make sure you also have extended config/config.json.example as well as docs/configuration_files.md. Then run these commands:

> git config --global user.name "Your Full Name"
> git config --global user.email "your@email.address"
> git commit pokemongo_bot/cell_workers/transfer_pokemon.py config/config.json.example docs/configuration_files.md
> git push origin HEAD:pr-01-keep-shiny

NOTE: When committing, make sure to include the line Closes #5982 to make sure Github will notice that your pull request will close this thread.

Visit your fork at https://github.com/ronaldobr72/PokemonGo-Bot and create a full request.