Thought I'd give back and share my modifications, answering a few questions that I haven't seen answered yet. Enjoy & give thanks/thumbs up if you like! Thank you!
Line numbers might be a little bit off and the places/method I'm doing things (not using arrays/list) may not be optimal, but hey...
Adjust cycle time between farming and transferring + evolving
Logic.cs 44:
Code:
await RepeatAction(2, async () => await ExecuteFarmingPokestopsAndPokemons(_client));
// default RepeatAction count = 10 = measured it once at approx. 30 minutes
// 2 = measured it once at approx 13 min.
Transfer all but the two highest instead of only the highest CP Pokémon
Inventory.cs 77:
Code:
return pokemonList
.GroupBy(p => p.PokemonId)
.Where(x => x.Count() > 2)
.SelectMany(p => p.Where(x => x.Favorite == 0).OrderByDescending(x => x.Cp).ThenBy(n => n.StaminaMax).Skip(2).ToList());
Do not evolve Pokémon
Logic.cs 41:
Code:
//await EvolveAllPokemonWithEnoughCandy();
Only evolve specific Pokémon
Inventory.cs 108:
// Require 2x Candy requirement in inventory and Pokémon not to be specified, in that case evolve it
// Using this to save up the specified common Pokémon for mass-evolve with Candy
Code:
if (familyCandy.Candy - pokemonCandyNeededAlready > 2*settings.CandyToEvolve &&! ( pokemon.PokemonId == PokemonId.Rattata ||
pokemon.PokemonId == PokemonId.Pidgey || pokemon.PokemonId == PokemonId.Pidgeotto ||
pokemon.PokemonId == PokemonId.Caterpie || pokemon.PokemonId == PokemonId.Metapod ||
pokemon.PokemonId == PokemonId.Weedle || pokemon.PokemonId == PokemonId.Kakuna )
)
Exclusions on Pokémon to transfer // Do not transfer Pokémon above certain CP level
// You can use this to build up a stack of these Pokémon, while not auto-Evolving them, so you can use them along with a Lucky Egg
Logic.cs 145:
Code:
if (duplicatePokemon.PokemonId != PokemonId.Rattata &&
duplicatePokemon.PokemonId != PokemonId.Weedle &&
duplicatePokemon.PokemonId != PokemonId.Pidgey &&
duplicatePokemon.PokemonId != PokemonId.Caterpie &&
duplicatePokemon.Cp < 1000)
{
var transfer = await _client.TransferPokemon(duplicatePokemon.Id);
Logger.Write($"Transfer {duplicatePokemon.PokemonId} with {duplicatePokemon.Cp} CP", LogLevel.Info);
await Task.Delay(500);
}
Drop items from inventory when you have more than a certain amount
Settings.cs 27:
Code:
new KeyValuePair<ItemId, int>(ItemId.ItemPokeBall, 50),
new KeyValuePair<ItemId, int>(ItemId.ItemGreatBall, 50),
new KeyValuePair<ItemId, int>(ItemId.ItemUltraBall, 100),
new KeyValuePair<ItemId, int>(ItemId.ItemRazzBerry, 50),
new KeyValuePair<ItemId, int>(ItemId.ItemPotion, 0),
new KeyValuePair<ItemId, int>(ItemId.ItemSuperPotion, 0),
new KeyValuePair<ItemId, int>(ItemId.ItemHyperPotion, 50),
new KeyValuePair<ItemId, int>(ItemId.ItemRevive, 30)
Use Ultra/Great Balls on Pokémon capture when their count exceed what you would drop from inventory
Logic.cs in private async Task<MiscEnums.Item> GetBestBall(int? pokemonCp ~179+:
Code:
if (masterBallsCount > 0 && pokemonCp >= 1000)
return MiscEnums.Item.ITEM_MASTER_BALL;
else if (ultraBallsCount > 100 || (ultraBallsCount > 0 && pokemonCp >= 1000))
return MiscEnums.Item.ITEM_ULTRA_BALL;
else if (ultraBallsCount > 50 || (greatBallsCount > 0 && pokemonCp >= 1000))
return MiscEnums.Item.ITEM_GREAT_BALL;
Do not use Raspberry when we have 10 or less
Code:
Logic.cs 204: if (berry == null || berry.Count <= 10)
Use Master/Ultra/Great Balls when certain type of Pokémon is encountered
// This should probably be extended to include when a Pokémon that hasn't been caught yet is being encountered
Logic.cs 104:
Code:
var pokeball = await GetBestBall(pokemonCP, encounterPokemonResponse?.WildPokemon?.PokemonData?.PokemonId);
Logic.cs 173:
Code:
private async Task<MiscEnums.Item> GetBestBall(int? pokemonCp, PokemonId? pokemonId)
Logic.cs 180:
var pokeBallsCount = await _inventory.GetItemAmountByType(MiscEnums.Item.ITEM_POKE_BALL);
var greatBallsCount = await _inventory.GetItemAmountByType(MiscEnums.Item.ITEM_GREAT_BALL);
var ultraBallsCount = await _inventory.GetItemAmountByType(MiscEnums.Item.ITEM_ULTRA_BALL);
var masterBallsCount = await _inventory.GetItemAmountByType(MiscEnums.Item.ITEM_MASTER_BALL);
Code:
if ( pokemonId == PokemonId.Charmender ||
pokemonId == PokemonId.Bulbasaur ||
pokemonId == PokemonId.Squirtle )
{
if (masterBallsCount > 0) return MiscEnums.Item.ITEM_MASTER_BALL;
else if (ultraBallsCount > 0) return MiscEnums.Item.ITEM_ULTRA_BALL;
else if (greatBallsCount > 0) return MiscEnums.Item.ITEM_GREAT_BALL;
else return MiscEnums.Item.ITEM_POKE_BALL; // OTHERWISE JUST CRASH!! What kinda trainer has no balls? And no, obviously, lady trainers have balls.
}
Upgrade Pokéball type if possible, when capture probability is < 20%
Logic.cs 111:
Code:
//Throw berry if we can
await UseBerry(pokemon.EncounterId, pokemon.SpawnpointId);
// Upgrade Pokeball if < 20% cap chance
if (encounterPokemonResponse?.CaptureProbability.CaptureProbability_.First() < 0.20) {
if (pokeball == MiscEnums.Item.ITEM_POKE_BALL) pokeball = MiscEnums.Item.ITEM_GREAT_BALL;
else if (pokeball == MiscEnums.Item.ITEM_GREAT_BALL) pokeball = MiscEnums.Item.ITEM_ULTRA_BALL;
else if (pokeball == MiscEnums.Item.ITEM_ULTRA_BALL) pokeball = MiscEnums.Item.ITEM_MASTER_BALL;
}