Release_config not work at all
Expected Behavior
Transfer pokemons with CP lower than X and IV lower than Y
Actual Behavior
Console:
[2016-07-24 14:09:43] [x] Captured Primeape! [CP 950] [IV 0.58]
[2016-07-24 14:09:43] [x] Captured Primeape! [CP 950]
release_config.json
"Primeape": { "release_under_cp": 900, "release_under_iv": 1, "cp_iv_logic": "and" },
In-game

Steps to Reproduce
Start the bot lol
Other Information
OS: Windows 10 Git Commit: (run 'git log -n 1 --pretty=format:"%H"' and paste it here) Last dev downloaded a few minutes ago. (Seriously, i don't know how i can use git command)
You chose the option AND which means:
[CP 950] [IV 0.58] if(CP<900 AND IV<1): release since CP>900 the result will be false
If you use the OR option this will change
but still, kinda confuse.
He want to hunt CP 900+ Primeape with IV potential = 1 How to config then?
We should improve this logic
in my config say Don't transfer a primeape with 900 or more AND IV 1 or more, and the bot don't transfer a primeape 950 (OK) with IV 0.58 (not OK)
i see that you are right, do 0.99 until its fixed :)
still not working with AND and IV 0.99, but work fine with OR
[2016-07-24 14:09:43] [x] Captured Primeape! [CP 950] [IV 0.58]
[2016-07-24 14:09:43] [x] Captured Primeape! [CP 950]
release_config.json
"Primeape": { "release_under_cp": 900, "release_under_iv": 1, "cp_iv_logic": "and" },
This means: if cp < 900 AND iv < 1 THEN release. And that is what happened. CP wasn't under 900, so it didn't release.
In that case, the release config is broken, the primeape is 950, OK but the IV is lower than 1
for me it seems that release_config.json is never used with the new -cf config_file.json logic
@crusardri dude... it's a logic AND. It's working as expected. if cp < 900 AND iv < 1. CP is less than 900? False. IV is less than 1? True. False AND True = False, so it won't release. Nothing is broken, it's boolean math.
Math logic: OR 0 0 = 0 0 1 = 1 1 0 = 1 1 1 = 1
AND 0 0 = 0 0 1 =0 1 0 = 0 1 1 = 1
Pokemon used: Primeape PC 950 (>900) IV 0.58 (<1) [2016-07-24 14:09:43] [x] Captured Primeape! [CP 950] [IV 0.58] My config "Primeape": { "release_under_cp": 900, "release_under_iv": 1, "cp_iv_logic": "and" }, Expected Behavior if primeape is PC >900 AND IV >1, keep Actual Behavior if primeape is PC >900 OR IV >1, keep
@crusardri:
- IV condition is
Falseand CP condition isTrue, right? Agree on this? False AND TrueisFalse- Returning
Falsemeans it SHOULD NOT transfer.
Just check the code, it's clear:
if 'release_under_cp' in release_config:
min_cp = release_config['release_under_cp']
if cp < min_cp:
release_results['cp'] = True
Transforming into text: if pokemon cp is lower than 'release_under_cp', it should be released based on that criteria. Same happens to IV.
Your pokemon CP = 950 and IV = 0.58, config is CP 900 and IV 1.
950 < 900 = FALSE 0.58 < 0.1 = TRUE
False AND True = False = not release.
ahhh, ok, i understand now, but it don't have any sense. Why the config is for transfer instead of keep it?
The file is named release_config.json and the name of the key is release_under_cp...
IMHO, it's pretty clear what it means.
@douglascamata and how did you manage to use release_config file with the config_file logic ?
Ok, it's my fault, close the issue if you want. @mehdi-S release when the pokemon have PC lower than X and IV lower than Y, or release when the pokemon have PC lower than X or IV lower than Y
PC is 950 and IV is 0.58 the config says PC 900 and IV 1 950 > 900 = false 0,58 < 1 = true OR = X + Y AND = X * Y
OR: false + true = true, release it AND: flase * true = false, keep it
@mehdi-S I don't know about config_file logic + release_config.json file. I implemented the release_config.json logic before the config_file one. I just woke up a few minutes ago and saw it there, so...