PokemonGoF / PokemonGo-Bot

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

[(UN)EXPECTED BEHAVIOR] Transfer low CP Pokemon with high IV when other ruleset is defined #5681

Open davidspeijer opened 8 years ago

davidspeijer commented 8 years ago

Expected Behavior

I wan't to release all Pokemon under CP 100 and have further rules for each Pokemon. (I want to have the candy so setting to catch above CP 100 isn't going to solve :8ball:)

Actual Behavior

If there is a ruleset for a Pokemon, the any rule isn't checked (I suppose) as Pokemon below CP 100 (with high IV) aren't released.

Your FULL config.json (remove your username, password, gmapkey and any other private info)

"release": { "any": { "release_below_cp": 100, "release_below_iv": 0, "logic": "or" }, "Bulbasaur": { "release_below_cp": 590, "release_below_iv": 0.8, "logic": "and" }, "Charmander": { "release_below_cp": 500, "release_below_iv": 0.8, "logic": "and" }, "Squirtle": { "release_below_cp": 500, "release_below_iv": 0.85, "logic": "and" }, "Caterpie": { "release_below_cp": 300, "release_below_iv": 0.85, "logic": "and" } }

Output when issue occurred

See the actual behavior

Steps to Reproduce

Run the bot

Other Information

OS: CentOS

Branch: dev Git Commit: 33ef1a077634465cc6623864d4b47b8776b9e094 Python Version: Python 2.7.5 Any other relevant files/configs (eg: path files)
kureijir commented 8 years ago

I think it IS expected for the bot to ignore "any" rule when a particular Pokemon has its own "catch" and "release" rule. I suggest you to use the Pokemon Optimizer task, which specify rules of Pokemon to keep (yes, keep, not release), then release everything else. That has been working fine for me.

julienlavergne commented 8 years ago

That is weird rules but following Pokemon Optimizer rules would achieve that.

"rules": [
    {
        "mode": "by_pokemon",
        "names": ["!Bulbasaur", "!Charmander", "!Squirtle", "!Caterpie"],
        "keep": {"cp": 100}
    },
    {
        "mode": "by_pokemon",
        "names": ["Bulbasaur"],
        "keep": {"cp": 590}
    },
    {
        "mode": "by_pokemon",
        "names": ["Bulbasaur"],
        "keep": {"iv": 0.8, "cp": 100}
    },
    {
        "mode": "by_pokemon",
        "names": ["Charmander"],
        "keep": {"cp": 500}
    },
    {
        "mode": "by_pokemon",
        "names": ["Charmander"],
        "keep": {"iv": 0.8, "cp": 100}
    },
    {
        "mode": "by_pokemon",
        "names": ["Squirtle"],
        "keep": {"cp": 500}
    },
    {
        "mode": "by_pokemon",
        "names": ["Squirtle"],
        "keep": {"iv": 0.85, "cp": 100}
    },
    {
        "mode": "by_pokemon",
        "names": ["Caterpie"],
        "keep": {"cp": 300}
    },
    {
        "mode": "by_pokemon",
        "names": ["Caterpie"],
        "keep": {"iv": 0.85, "cp": 100}
    }
]