Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VIP wrong ball, berry calculations wrong #2505

Closed
jzju opened this issue Aug 3, 2016 · 2 comments
Closed

VIP wrong ball, berry calculations wrong #2505

jzju opened this issue Aug 3, 2016 · 2 comments

Comments

@jzju
Copy link
Contributor

jzju commented Aug 3, 2016

Expected Behavior

for vip ultra>great>poke always
maybe change this

current_type = pokeball
while current_type < 3:
  current_type += 1
  if catch_rate[pokeball-1] < 0.9 and items_stock[current_type] > 0:
    pokeball = current_type # use better ball

to this

current_type = ultraball
if items_stock[current_type] == 0:
  current_type -= 1
if items_stock[current_type] == 0:
  current_type -= 1
pokeball = current_type

Actual Behavior

[18:26:26] [-] Gyarados is a VIP Pokemon! [CP 1332] [Potential 0.67] Nice! Try our best to catch it!
[18:26:26] Catch Rate with normal Pokeball is low (7.06%). Thinking to throw a Razz Berry... (39 left!)
[18:26:27] Threw a berry! Catch Rate with normal Pokeball has increased to 10.59%
[18:26:27] Using Ultraball (chance: 20.43%)... (169 left!)
[18:26:27] [-] Attempted to capture Gyarados - failed.. trying again!
[18:26:29] Catch Rate with normal Pokeball is low (10.59%). Thinking to throw a Razz Berry... (38 left!)
[18:26:30] Threw a berry! Catch Rate with normal Pokeball has increased to 15.88%
[18:26:30] Using Ultraball (chance: 30.64%)... (168 left!)
[18:26:31] [-] Attempted to capture Gyarados - failed.. trying again!
[18:26:33] Catch Rate with normal Pokeball is low (15.88%). Thinking to throw a Razz Berry... (37 left!)
[18:26:33] Threw a berry! Catch Rate with normal Pokeball has increased to 23.82%
[18:26:33] Using Ultraball (chance: 45.96%)... (167 left!)
[18:26:34] [-] Attempted to capture Gyarados - failed.. trying again!
[18:26:36] Catch Rate with normal Pokeball is low (23.82%). Thinking to throw a Razz Berry... (36 left!)
[18:26:36] Threw a berry! Catch Rate with normal Pokeball has increased to 35.73%
[18:26:36] Using Ultraball (chance: 68.94%)... (166 left!)
[18:26:37] [-] Attempted to capture Gyarados - failed.. trying again!
[18:26:38] Catch Rate with normal Pokeball is low (35.73%). Thinking to throw a Razz Berry... (35 left!)
[18:26:39] Threw a berry! Catch Rate with normal Pokeball has increased to 53.59%
[18:26:39] Using Ultraball (chance: 103.41%)... (165 left!)
[18:26:40] [-] Attempted to capture Gyarados - failed.. trying again!
[18:26:42] Catch Rate with normal Pokeball is low (53.59%). Thinking to throw a Razz Berry... (34 left!)
[18:26:43] Threw a berry! Catch Rate with normal Pokeball has increased to 80.39%
[18:26:43] Using Greatball (chance: 118.43%)... (31 left!)
[18:26:44] [-] Attempted to capture Gyarados - failed.. trying again!
[18:26:46] Catch Rate with normal Pokeball is low (80.39%). Thinking to throw a Razz Berry... (33 left!)
[18:26:47] Threw a berry! Catch Rate with normal Pokeball has increased to 120.59%
[18:26:47] Using Pokeball (chance: 120.59%)... (1 left!)
[18:26:50] [-] Attempted to capture Gyarados - failed.. trying again!
[18:26:52] Using Pokeball (chance: 120.59%)... (0 left!)
[18:26:53] [-] Attempted to capture Gyarados - failed.. trying again!
[18:26:55] Using Pokeball (chance: 120.59%)... (-1 left!)

Steps to Reproduce

???

Other Information

OS:
Git Commit: 2f91fd0

@sgitkene
Copy link

sgitkene commented Aug 3, 2016

have you tried your solution?

@jzju
Copy link
Contributor Author

jzju commented Aug 3, 2016

Yes, it crashed first but with current_type = 3 it worked as ultraball isn't defined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants