diff --git a/PoGo.NecroBot.CLI/App.config b/PoGo.NecroBot.CLI/App.config
index b9833f16e..1e1fed657 100644
--- a/PoGo.NecroBot.CLI/App.config
+++ b/PoGo.NecroBot.CLI/App.config
@@ -59,6 +59,9 @@
False
+
+ False
+
True
diff --git a/PoGo.NecroBot.CLI/Settings.cs b/PoGo.NecroBot.CLI/Settings.cs
index b4bf928b6..cae3c127f 100644
--- a/PoGo.NecroBot.CLI/Settings.cs
+++ b/PoGo.NecroBot.CLI/Settings.cs
@@ -45,6 +45,7 @@ public class LogicSettings : ILogicSettings
public int KeepMinCp => UserSettings.Default.KeepMinCP;
public double WalkingSpeedInKilometerPerHour => UserSettings.Default.WalkingSpeedInKilometerPerHour;
public bool EvolveAllPokemonWithEnoughCandy => UserSettings.Default.EvolveAllPokemonWithEnoughCandy;
+ public bool KeepPokemonsThatCanEvolve => UserSettings.Default.KeepPokemonsThatCanEvolve;
public bool TransferDuplicatePokemon => UserSettings.Default.TransferDuplicatePokemon;
public int DelayBetweenPokemonCatch => UserSettings.Default.DelayBetweenPokemonCatch;
public bool UsePokemonToNotCatchFilter => UserSettings.Default.UsePokemonToNotCatchFilter;
diff --git a/PoGo.NecroBot.CLI/UserSettings.Designer.cs b/PoGo.NecroBot.CLI/UserSettings.Designer.cs
index 7c5ef002d..cea12df95 100644
--- a/PoGo.NecroBot.CLI/UserSettings.Designer.cs
+++ b/PoGo.NecroBot.CLI/UserSettings.Designer.cs
@@ -142,7 +142,22 @@ public bool EvolveAllPokemonWithEnoughCandy {
this["EvolveAllPokemonWithEnoughCandy"] = value;
}
}
-
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool KeepPokemonsThatCanEvolve
+ {
+ get
+ {
+ return ((bool)(this["KeepPokemonsThatCanEvolve"]));
+ }
+ set
+ {
+ this["KeepPokemonsThatCanEvolve"] = value;
+ }
+ }
+
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
diff --git a/PoGo.NecroBot.Logic/ILogicSettings.cs b/PoGo.NecroBot.Logic/ILogicSettings.cs
index 16b378bc0..47b57010a 100644
--- a/PoGo.NecroBot.Logic/ILogicSettings.cs
+++ b/PoGo.NecroBot.Logic/ILogicSettings.cs
@@ -14,6 +14,7 @@ public interface ILogicSettings
int KeepMinCp { get; }
double WalkingSpeedInKilometerPerHour { get; }
bool EvolveAllPokemonWithEnoughCandy { get; }
+ bool KeepPokemonsThatCanEvolve { get; }
bool TransferDuplicatePokemon { get; }
int DelayBetweenPokemonCatch { get; }
bool UsePokemonToNotCatchFilter { get; }
diff --git a/PoGo.NecroBot.Logic/Inventory.cs b/PoGo.NecroBot.Logic/Inventory.cs
index 32289800e..949682659 100644
--- a/PoGo.NecroBot.Logic/Inventory.cs
+++ b/PoGo.NecroBot.Logic/Inventory.cs
@@ -83,13 +83,11 @@ public async Task> GetDuplicatePokemonToTransfer(
{
var settings = pokemonSettings.Single(x => x.PokemonId == pokemon.Key);
var familyCandy = pokemonFamilies.Single(x => settings.FamilyId == x.FamilyId);
- if (settings.CandyToEvolve == 0)
- continue;
+ var amountToSkip = _client.Settings.KeepMinDuplicatePokemon;
+
+ if (settings.CandyToEvolve > 0 && familyCandy.Candy / settings.CandyToEvolve > amountToSkip)
+ amountToSkip = familyCandy.Candy / settings.CandyToEvolve;
- var amountToSkip = familyCandy.Candy/settings.CandyToEvolve;
- amountToSkip = amountToSkip > _logicClient.Settings.KeepMinDuplicatePokemon
- ? amountToSkip
- : _logicClient.Settings.KeepMinDuplicatePokemon;
if (prioritizeIVoverCp)
{
results.AddRange(pokemonList.Where(x => x.PokemonId == pokemon.Key)
diff --git a/PoGo.NecroBot.Logic/Tasks/TransferDuplicatePokemonTask.cs b/PoGo.NecroBot.Logic/Tasks/TransferDuplicatePokemonTask.cs
index 19464830f..f17bd1872 100644
--- a/PoGo.NecroBot.Logic/Tasks/TransferDuplicatePokemonTask.cs
+++ b/PoGo.NecroBot.Logic/Tasks/TransferDuplicatePokemonTask.cs
@@ -13,7 +13,7 @@ public class TransferDuplicatePokemonTask
public static void Execute(Context ctx, StateMachine machine)
{
var duplicatePokemons =
- ctx.Inventory.GetDuplicatePokemonToTransfer(false, ctx.LogicSettings.PrioritizeIvOverCp,
+ ctx.Inventory.GetDuplicatePokemonToTransfer(ctx.LogicSettings.KeepPokemonsThatCanEvolve, ctx.LogicSettings.PrioritizeIvOverCp,
ctx.LogicSettings.PokemonsNotToTransfer).Result;
foreach (var duplicatePokemon in duplicatePokemons)
diff --git a/PoGo.NecroBot.Logic/Utils/Statistics.cs b/PoGo.NecroBot.Logic/Utils/Statistics.cs
index 413916f0e..aab9cb3c9 100644
--- a/PoGo.NecroBot.Logic/Utils/Statistics.cs
+++ b/PoGo.NecroBot.Logic/Utils/Statistics.cs
@@ -73,88 +73,13 @@ public double GetRuntime()
public static int GetXpDiff(int level)
{
- switch (level)
+ if (level > 0 && level <= 40)
{
- case 1:
- return 0;
- case 2:
- return 1000;
- case 3:
- return 2000;
- case 4:
- return 3000;
- case 5:
- return 4000;
- case 6:
- return 5000;
- case 7:
- return 6000;
- case 8:
- return 7000;
- case 9:
- return 8000;
- case 10:
- return 9000;
- case 11:
- return 10000;
- case 12:
- return 10000;
- case 13:
- return 10000;
- case 14:
- return 10000;
- case 15:
- return 15000;
- case 16:
- return 20000;
- case 17:
- return 20000;
- case 18:
- return 20000;
- case 19:
- return 25000;
- case 20:
- return 25000;
- case 21:
- return 50000;
- case 22:
- return 75000;
- case 23:
- return 100000;
- case 24:
- return 125000;
- case 25:
- return 150000;
- case 26:
- return 190000;
- case 27:
- return 200000;
- case 28:
- return 250000;
- case 29:
- return 300000;
- case 30:
- return 350000;
- case 31:
- return 500000;
- case 32:
- return 500000;
- case 33:
- return 750000;
- case 34:
- return 1000000;
- case 35:
- return 1250000;
- case 36:
- return 1500000;
- case 37:
- return 2000000;
- case 38:
- return 2500000;
- case 39:
- return 1000000;
- case 40:
- return 1000000;
+ int[] xpTable = { 0, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000,
+ 10000, 10000, 10000, 10000, 15000, 20000, 20000, 20000, 25000, 25000,
+ 50000, 75000, 100000, 125000, 150000, 190000, 200000, 250000, 300000, 350000,
+ 500000, 500000, 750000, 1000000, 1250000, 1500000, 2000000, 2500000, 1000000, 1000000};
+ return xpTable[level - 1];
}
return 0;
}