PokemonGo-Bot icon indicating copy to clipboard operation
PokemonGo-Bot copied to clipboard

release_config.json still releasing

Open HeIix opened this issue 10 years ago • 12 comments

Expected Behavior

Restrict the release of Pokemon to CP < 300 or IV < 0.8 "any": { "min_cp": 300, "min_iv": 0.8, "cp_iv_logic": "or" },

Actual Behavior

[x] Captured Eevee! [CP 318] [IV 0.78] - exchanging for candy [x] Release config for Eevee: CP 300 or IV 0.8 [#] Eevee has been exchanged for candy! [2016-07-23 21:13:37] [#] Something rustles nearby! [#] A Wild Diglett appeared! [CP 181] [Potential 0.8] [#] IV [Stamina/Attack/Defense] = [13/12/11] [x] Using Pokeball... [x] Captured Diglett! [CP 181] [IV 0.8] - exchanging for candy [x] Release config for Diglett: CP 300 or IV 0.8 [#] Diglett has been exchanged for candy!

Steps to Reproduce

Catching pokemon

Other Information

OS: Debian Dev branch

HeIix avatar Jul 23 '16 21:07 HeIix

Looks like it works as specified in your example, no?

pol0nium avatar Jul 23 '16 21:07 pol0nium

I may be having a brain fart. My understanding on setting min_cip to 300 tells me that the 318 Eevee should not have been released. Same with the Diglett being released, it was 0.8 and my min_iv is set at 0.8.

HeIix avatar Jul 23 '16 21:07 HeIix

I've and similar results, look like the OR is being processed as an AND.

alistairmackenzie avatar Jul 23 '16 21:07 alistairmackenzie

My understanding is that the config says "release the pokemon if cp < 300 or iv < 0.8". In your example, each time one of the condition was TRUE.

pol0nium avatar Jul 23 '16 21:07 pol0nium

See here for a slightly better example.

[2016-07-23 22:29:30] [#] Something rustles nearby! [#] A Wild Clefairy appeared! [CP 323] [Potential 0.67] [#] IV [Stamina/Attack/Defense] = [4/13/13] [x] Using Greatball... [x] Captured Clefairy! [CP 323] [IV 0.67] - exchanging for candy [x] Release config for Clefairy: CP 400 or IV 0.4 [#] Clefairy has been exchanged for candy

My IV is set as 0.4 but the Pokemon was 0.67 therefore should not have been released.

alistairmackenzie avatar Jul 23 '16 21:07 alistairmackenzie

323 < 400 -> TRUE 0.67 < 0.4 -> FALSE release pokemon if TRUE or FALSE

Therefore pokemon is released. I think this is the correct behaviour.

pol0nium avatar Jul 23 '16 21:07 pol0nium

If that's the case then how do you suppose I set the configuration to keep pokemon that are CP 300+ or IV 0.8+, releasing everything else? Thanks for your time and feedback.

HeIix avatar Jul 23 '16 21:07 HeIix

I think you should replace "any": { "min_cp": 300, "min_iv": 0.8, "cp_iv_logic": "or" }, by "any": { "min_cp": 300, "min_iv": 0.8, "cp_iv_logic": "and" },

pol0nium avatar Jul 23 '16 21:07 pol0nium

i don't understand, if config is

"any": {
        "min_cp": 400,
        "min_iv": 0.8,
        "cp_iv_logic": "or"
    },

thats mean, don`t release pokemon if cp >=400 OR iv >= 0.8. this correct ?

Hatsunyan avatar Jul 23 '16 23:07 Hatsunyan

That means "release pokemon if cp <400 or iv < 0.8"

pol0nium avatar Jul 23 '16 23:07 pol0nium

I think the logic could be reversed: Default to release unless condition is met?

TimLChan avatar Jul 24 '16 01:07 TimLChan

release_config and config has been merged, please see if issue remains. if it does open a new issue with reference to this

fredrik-hellmangroup avatar Jul 25 '16 22:07 fredrik-hellmangroup