Update 18.09.11

Update event binaries with latest from the Event Gallery
This commit is contained in:
Kurt
2018-09-10 19:10:28 -07:00
parent 0c02a0cbbc
commit b20020fbe6
6 changed files with 36 additions and 11 deletions

View File

@@ -1,5 +1,8 @@
namespace PKHeX.Core
{
/// <summary>
/// Calculations for <see cref="PKM.EXP"/> and <see cref="PKM.CurrentLevel"/>.
/// </summary>
public static class Experience
{
/// <summary>
@@ -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;
}
/// <summary>
@@ -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];
}
/// <summary>
@@ -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
/// <summary>
/// Experience required for next level [0,99]
/// </summary>
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},

Binary file not shown.

View File

@@ -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!

View File

@@ -1 +1 @@
20180803
20180911