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

Fix default ball settings. #1879

Merged
merged 2 commits into from
Aug 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 30 additions & 5 deletions PoGo.NecroBot.Logic/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,13 @@ public class GlobalSettings
public int TotalAmountOfPotionsToKeep = 80;
public int TotalAmountOfRevivesToKeep = 60;
//balls
public int UseGreatBallAboveCp = 1000;
public int UseUltraBallAboveCp = 1250;
public int UseGreatBallAboveCp = 750;
public int UseUltraBallAboveCp = 1000;
public int UseMasterBallAboveCp = 1500;
public int UseGreatBallAboveIv = 85;
public int UseUltraBallAboveIv = 90;
public double UseGreatBallBelowCatchProbability = 0.3;
public double UseUltraBallBelowCatchProbability = 0.2;
public int UseUltraBallAboveIv = 95;
public double UseGreatBallBelowCatchProbability = 0.2;
public double UseUltraBallBelowCatchProbability = 0.1;
public double UseMasterBallBelowCatchProbability = 0.05;
//transfer
public bool TransferDuplicatePokemon = true;
Expand Down Expand Up @@ -548,6 +548,31 @@ public static GlobalSettings Load(string path)
settings.UseMasterBallBelowCatchProbability = Default.UseMasterBallBelowCatchProbability;
}

if (settings.UseMasterBallAboveCp < 0)
{
settings.UseMasterBallAboveCp = Default.UseMasterBallAboveCp;
}

if (settings.UseUltraBallAboveCp < 0)
{
settings.UseUltraBallAboveCp = Default.UseUltraBallAboveCp;
}

if (settings.UseUltraBallAboveIv < 0)
{
settings.UseUltraBallAboveIv = Default.UseUltraBallAboveCp;
}

if (settings.UseGreatBallAboveCp < 0)
{
settings.UseGreatBallAboveCp = Default.UseGreatBallAboveCp;
}

if (settings.UseUltraBallAboveIv < 0)
{
settings.UseGreatBallAboveIv = Default.UseGreatBallAboveIv;
}

if (settings.UseBerriesMinCp < 0)
{
settings.UseBerriesMinCp = Default.UseBerriesMinCp;
Expand Down