You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made a "smart pinap" function to maximize the use of pinap berries.
Ex1) If catch rate is over 85% for a normal mon use a pinap, but spare 3 for VIPs
Ex2) If catch rate is over a threshold (90%) for a VIP use a pinap, if under that threshold the original razz berry logic kicks in.
The current logic for VIP is fixed to razz or pinap, and for normal mon the level or CP determines the use of pinap. I think the actual catch rate is more important.
How do I add this to the bot? I am new to github, and I want to contribute to this bot.
Possible solution
I made something like this in pokemon_catch_worker.py
# SMART_PINAP: Use pinap when high catch rate, but spare some for VIP with high catch rate
if self.smart_pinap_enabled and ( (not is_vip and self.inventory.get(ITEM_PINAPBERRY).count > self.smart_pinap_to_keep and catch_rate_by_ball[current_ball] > self.pinap_threshold) or (is_vip and self.inventory.get(ITEM_PINAPBERRY).count > 0 and catch_rate_by_ball[current_ball] >= self.vip_berry_threshold) ) and not used_berry:
berry_id = ITEM_PINAPBERRY
new_catch_rate_by_ball = self._use_berry(berry_id, berry_count, encounter_id, catch_rate_by_ball, current_ball)
self.inventory.get(berry_id).remove(1)
berry_count -= 1
used_berry = True
How it would help others
Instead of throwing away pinap berries, you can get more candy!
The text was updated successfully, but these errors were encountered:
Short Description
I made a "smart pinap" function to maximize the use of pinap berries.
Ex1) If catch rate is over 85% for a normal mon use a pinap, but spare 3 for VIPs
Ex2) If catch rate is over a threshold (90%) for a VIP use a pinap, if under that threshold the original razz berry logic kicks in.
The current logic for VIP is fixed to razz or pinap, and for normal mon the level or CP determines the use of pinap. I think the actual catch rate is more important.
How do I add this to the bot? I am new to github, and I want to contribute to this bot.
Possible solution
I made something like this in pokemon_catch_worker.py
# SMART_PINAP: Use pinap when high catch rate, but spare some for VIP with high catch rate
if self.smart_pinap_enabled and ( (not is_vip and self.inventory.get(ITEM_PINAPBERRY).count > self.smart_pinap_to_keep and catch_rate_by_ball[current_ball] > self.pinap_threshold) or (is_vip and self.inventory.get(ITEM_PINAPBERRY).count > 0 and catch_rate_by_ball[current_ball] >= self.vip_berry_threshold) ) and not used_berry:
berry_id = ITEM_PINAPBERRY
new_catch_rate_by_ball = self._use_berry(berry_id, berry_count, encounter_id, catch_rate_by_ball, current_ball)
self.inventory.get(berry_id).remove(1)
berry_count -= 1
used_berry = True
How it would help others
Instead of throwing away pinap berries, you can get more candy!
The text was updated successfully, but these errors were encountered: