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

specific release requirement is not overwriting the general one

Open kenkclam opened this issue 10 years ago • 6 comments

Hi I have problem with the release the specific release requirement is not overwriting the "any" Any suggestions? Thanks!

Expected Behavior

"release": { "any": {"release_below_cp": 280, "release_below_iv": 80, "logic": "and"}, "// Example of releasing Rattata:": {}, "// Rattata": {"release_below_cp": 330}, },

if a 300 cp 50iv Rattata is caught, It should not be released by the general rule (cp >280) but should be released by the specific rule (cp<330)

Actual Behavior

if a 300 cp 50iv Rattata is caught, it is actually kept. So the specific rule is not working

Steps to Reproduce

Other Information

OS: Mac

kenkclam avatar Aug 08 '16 20:08 kenkclam

"release_below_iv": 0.8 it should be i think ;)

for the specific rule. remove the //

fyooree avatar Aug 08 '16 21:08 fyooree

Thanks! I changed it but it still does not solve my problem! It is still ignoring the specific rule

(with my mistake, basically nothing below 280 will be kept Now after the correction, some will be kept anyhow, a 300cp Rattata should not be kept and the bot is keeping it)

kenkclam avatar Aug 08 '16 21:08 kenkclam

It may be because of line 144 in transfer_pokemon.py:

cp_iv_logic = release_config.get('logic')
if not cp_iv_logic:
    cp_iv_logic = self._get_release_config_for('any').get('logic', 'and')

I don't know why it should load the logic from 'any'.

Currently, you need to specify cp, iv and logic in your config.json in order to solve this issue temparily.

g2384 avatar Aug 08 '16 21:08 g2384

Do you mean I should change it to

"release": { "any": {"release_below_cp": 280, "release_below_iv": 80, "logic": "and"}, "// Example of releasing Rattata:": {}, "// Rattata": {"release_below_cp": 330, "release_below_iv": 0.95, "logic": "and"}, },

for the script to work? I actually try that it does not work.. a cp 300 rattata is still kept.

kenkclam avatar Aug 08 '16 21:08 kenkclam

Wait. Do this.

"release": {
    "any": {"release_below_cp": 280, "release_below_iv": 80, "logic": "and"},
    "Rattata": {"release_below_cp": 330, "release_below_iv": 0.95, "logic": "and"}
},

Please let me make a palm face.

g2384 avatar Aug 08 '16 21:08 g2384

It works now!

Gosh, that was so dump // probably indicates a comment or something I had no idea at all

Thanks so much! (I am closing this)

kenkclam avatar Aug 08 '16 21:08 kenkclam