-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First basic features of the pokemon optimizer (#2956)
* catching every single pokemon nearby * catch lured pokemon in all forts nearby * adding run_interval to some tasks to avoid running all the time and minimum tick time of 5 seconds Tasks inheriting from BaseTask should use `self._update_last_ran` and `_time_to_run` if they want to implement the time based running. The config to set a custom timer is named `run_interval`. * added config to ignore item count for Spin and MoveToFort this works good with the `run_interval` configuration added to TransferPokemon and RecycleItem * spinning all pokestops in range * fixing loop in spin fort task * First basic features of the pokemon optimizer * For now, dry run only * Add cygwin to supported platform and improved log readability (#2948) * Add cygwin to supported platform and improved log readability * fixed formatting * - Add dry_run and use_lucky_egg in config - Evolve all pokemons together and only if enough for a full lucky egg (90). - Keep enough candies for consecutive evolutions of best pokemons - Only evolve the lowest rank of a family * Add lucky egg support when enough pokemon to evolve * fixing returns * - Support Eevee evolution scheme - Rename "use_lucky_egg" parameter in the more accurate "evolve_only_with_lucky_egg" * Revert "Merge remote-tracking branch 'origin/faeture/xp-improvements' into pokemon_optimizer" This reverts commit ff1f5e4, reversing changes made to e8fd901. * - Fix an issue in evolve_pokemon task - Use common inventory - Add configuration example * Add missing inventory refresh at the end of the process * Add missing inventory refresh after catching a pokemon * Add parameters "transfer" and "evolve" to activate/deactivate corresponding action. If both false, this is equivalent to a dry_run. Add parameters "use_lucky_egg" to allow task to use a lucky egg before evolve. Add parameter "minimum_evolve_for_lucky_egg" to add a requirement on the number of evolution before using a lucky egg. * Move some functions around * Default lucky egg to false + had again parameter "evolve_only_with_lucky_egg" * Fix qn issue with egg counting Add configuration parameter to allow customization of how pokemons are ranked in a family * Update configuration example * Upgrade to latest inventory * Fix bug
- Loading branch information
1 parent
f83e767
commit b8ea368
Showing
7 changed files
with
396 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
{ | ||
"auth_service": "google", | ||
"username": "YOUR_USERNAME", | ||
"password": "YOUR_PASSWORD", | ||
"location": "SOME_LOCATION", | ||
"gmapkey": "GOOGLE_MAPS_API_KEY", | ||
"tasks": [ | ||
{ | ||
"type": "HandleSoftBan" | ||
}, | ||
{ | ||
"type": "CollectLevelUpReward" | ||
}, | ||
{ | ||
"type": "IncubateEggs", | ||
"config": { | ||
"longer_eggs_first": true | ||
} | ||
}, | ||
{ | ||
"type": "PokemonOptimizer", | ||
"config": { | ||
"transfer": true, | ||
"evolve": true, | ||
"use_lucky_egg": true, | ||
"evolve_only_with_lucky_egg": true, | ||
"minimum_evolve_for_lucky_egg": 90, | ||
"keep": [ | ||
{ | ||
"top": 1, | ||
"evolve": true, | ||
"// Available sorting keys are:": true, | ||
"// iv, cp, ncp, ivcp, max_cp, iv_attack, iv_defense, iv_stamina, hp_max, level": true, | ||
"sort": ["iv"] | ||
}, | ||
{ | ||
"top": 1, | ||
"evolve": true, | ||
"sort": ["ncp"] | ||
}, | ||
{ | ||
"top": 1, | ||
"evolve": false, | ||
"sort": ["cp"] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"type": "RecycleItems", | ||
"config": { | ||
"min_empty_space": 15, | ||
"item_filter": { | ||
"Pokeball": { "keep": 100 }, | ||
"Potion": { "keep": 10 }, | ||
"Super Potion": { "keep": 20 }, | ||
"Hyper Potion": { "keep": 30 }, | ||
"Revive": { "keep": 30 }, | ||
"Razz Berry": { "keep": 100 } | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "CatchVisiblePokemon" | ||
}, | ||
{ | ||
"type": "CatchLuredPokemon" | ||
}, | ||
{ | ||
"type": "SpinFort", | ||
"config": { | ||
"ignore_item_count": true | ||
} | ||
}, | ||
{ | ||
"type": "MoveToFort", | ||
"config": { | ||
"lure_attraction": false, | ||
"lure_max_distance": 2000, | ||
"ignore_item_count": true | ||
} | ||
} | ||
], | ||
"map_object_cache_time": 5, | ||
"forts": { | ||
"avoid_circles": true, | ||
"max_circle_size": 50 | ||
}, | ||
"websocket_server": true, | ||
"walk": 4.16, | ||
"action_wait_min": 1, | ||
"action_wait_max": 4, | ||
"debug": false, | ||
"test": false, | ||
"health_record": false, | ||
"location_cache": true, | ||
"distance_unit": "km", | ||
"reconnecting_timeout": 15, | ||
"logging_color": true, | ||
"catch": { | ||
"any": { | ||
"always_catch": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
b8ea368
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like this idea, but what do the following things mean:
"top": 1 ??
ncp ?
i would use it like this if its possible: