diff --git a/PKHeX.Core/PKM/Util/Experience.cs b/PKHeX.Core/PKM/Util/Experience.cs
index 60cb76f69..bddfa8928 100644
--- a/PKHeX.Core/PKM/Util/Experience.cs
+++ b/PKHeX.Core/PKM/Util/Experience.cs
@@ -1,5 +1,8 @@
namespace PKHeX.Core
{
+ ///
+ /// Calculations for and .
+ ///
public static class Experience
{
///
@@ -12,12 +15,12 @@ public static int GetLevel(int species, uint exp)
{
int growth = PKX.Personal[species].EXPGrowth;
int tl = 1; // Initial Level. Iterate upwards to find the level
- while (ExpTable[++tl, growth] <= exp)
+ while (ExpTable[tl, growth] <= exp)
{
- if (tl == 100)
- return 100;
+ if (++tl == 100)
+ break;
}
- return --tl;
+ return tl;
}
///
@@ -32,7 +35,7 @@ public static uint GetEXP(int level, int species)
return 0;
if (level > 100)
level = 100;
- return ExpTable[level, PKX.Personal[species].EXPGrowth];
+ return ExpTable[level - 1, PKX.Personal[species].EXPGrowth];
}
///
@@ -53,8 +56,8 @@ public static uint GetEXPToLevelUp(int level, int species)
if (level >= 100)
return 0;
var growth = PKX.Personal[species].EXPGrowth;
- var current = ExpTable[level, growth];
- var next = ExpTable[level + 1, growth];
+ var current = ExpTable[level - 1, growth];
+ var next = ExpTable[level, growth];
return next - current;
}
@@ -70,8 +73,8 @@ public static double GetEXPToLevelUpPercentage(int level, int species, uint exp)
if (level >= 100)
return 0;
var growth = PKX.Personal[species].EXPGrowth;
- var current = ExpTable[level, growth];
- var next = ExpTable[level + 1, growth];
+ var current = ExpTable[level - 1, growth];
+ var next = ExpTable[level, growth];
var amount = next - current;
double progress = exp - current;
return progress / amount;
@@ -79,9 +82,11 @@ public static double GetEXPToLevelUpPercentage(int level, int species, uint exp)
#region ExpTable
+ ///
+ /// Experience required for next level [0,99]
+ ///
private static readonly uint[,] ExpTable =
{
- {0000000, 0000000, 0000000, 0000000, 0000000, 0000000},
{0000000, 0000000, 0000000, 0000000, 0000000, 0000000},
{0000008, 0000015, 0000004, 0000009, 0000006, 0000010},
{0000027, 0000052, 0000013, 0000057, 0000021, 0000033},
diff --git a/PKHeX.Core/Resources/byte/wc6full.pkl b/PKHeX.Core/Resources/byte/wc6full.pkl
index 296ed0592..d012954c3 100644
Binary files a/PKHeX.Core/Resources/byte/wc6full.pkl and b/PKHeX.Core/Resources/byte/wc6full.pkl differ
diff --git a/PKHeX.Core/Resources/byte/wc7.pkl b/PKHeX.Core/Resources/byte/wc7.pkl
index b30578fef..f548e8ee4 100644
Binary files a/PKHeX.Core/Resources/byte/wc7.pkl and b/PKHeX.Core/Resources/byte/wc7.pkl differ
diff --git a/PKHeX.Core/Resources/byte/wc7full.pkl b/PKHeX.Core/Resources/byte/wc7full.pkl
index 0aa0a9d1a..aaf1f86d3 100644
Binary files a/PKHeX.Core/Resources/byte/wc7full.pkl and b/PKHeX.Core/Resources/byte/wc7full.pkl differ
diff --git a/PKHeX.WinForms/Resources/text/changelog.txt b/PKHeX.WinForms/Resources/text/changelog.txt
index 97694924b..40d400763 100644
--- a/PKHeX.WinForms/Resources/text/changelog.txt
+++ b/PKHeX.WinForms/Resources/text/changelog.txt
@@ -1,6 +1,26 @@
PKHeX - By Kaphotics
http://projectpokemon.org/pkhex/
+18/09/11 - New Update:
+ - Legality:
+ - - Changed: Another round of legality check updates. Thanks HaxAras, @sora10pls, ICanSnake, Omnipotent Arceus, Raptor385, PF649, PrometheusG, @Narithegreat, Yami_Wheeler, crzyc, ThePunish3D, @Lusamine!
+ - - Added: Poké Pelago status legality checks have been enabled, which can detect improperly transferred files.
+ - Added: Clicking on the "Ball" label now brings up a list of all balls, with background color indicating legality.
+ - Added: Gen6 X/Y Trainer appearance can now be modified directly (instead of via raw hex editing).
+ - Added: Gen6 Trainer Stats can now be edited (full list of stats added).
+ - Added: Gen4 Misc Editor can now grant all Pokéball Seals. Thanks @sora10pls!
+ - Added: Custom Backup Paths are now included in the autodetect save file search. Thanks @ReignOfComputer!
+ - Added: User Settings can now hide sensitive pkm details (PID/EC text fields).
+ - Added: User Settings can now hide sensitive savefile details (program title bar, game sync fields).
+ - Added: Gen6/7 Can now unlock Mega Rayquaza early in the Trainer Editor.
+ - Changed: Species / Form cries are now generation specific (Cosplay Pikachu) and follow the same rules as sprites.
+ - Changed: Legality is now shown for Database slots.
+ - Changed: Legality string variable names are now much more descriptive (instead of V###).
+ - Changed: Key item sprite now shows instead of "?" for key item mystery gifts.
+ - Changed: Spanish translations updated. Thanks @ajtudela!
+ - Fixed: PK1<->PK2 transfers now set current level & hp. Thanks HaxAras & Vladcik!
+ - Fixed: Clicking Relearn Moves groupbox under certain conditions no longer causes an error message. Thanks @ajtudela!
+
18/08/03 - New Update:
- Legality:
- - Changed: Another round of legality check updates. Thanks @iiippppk, @WEERSOQUEER, @PrometheusG, @NinFanBoyFTW, paf, Cloud AC!
diff --git a/PKHeX.WinForms/Resources/text/version.txt b/PKHeX.WinForms/Resources/text/version.txt
index 3e73d7dbb..7d4d99ec9 100644
--- a/PKHeX.WinForms/Resources/text/version.txt
+++ b/PKHeX.WinForms/Resources/text/version.txt
@@ -1 +1 @@
-20180803
\ No newline at end of file
+20180911
\ No newline at end of file