From b1659c9f55d0229cb5dfda6d0fcbb2e91fde235d Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 2 Feb 2015 20:52:10 -0800 Subject: [PATCH] Shedinja Stat Calculation Fix --- Misc/PKX.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/PKX.cs b/Misc/PKX.cs index c1309bd689e..818bf8b7a39 100644 --- a/Misc/PKX.cs +++ b/Misc/PKX.cs @@ -376,7 +376,7 @@ internal static string getLocation(bool eggmet, int gameorigin, int locval) // Calculate Stats ushort[] stats = new ushort[6]; // Stats are stored as ushorts in the PKX structure. We'll cap them as such. - stats[0] = (ushort)((((HP_IV + (2 * HP_B) + (HP_EV / 4) + 100) * level) / 100) + 10); + stats[0] = (HP_B == 1) ? (ushort)1 : (ushort)((((HP_IV + (2 * HP_B) + (HP_EV / 4) + 100) * level) / 100) + 10); stats[1] = (ushort)((((ATK_IV + (2 * ATK_B) + (ATK_EV / 4)) * level) / 100) + 5); stats[2] = (ushort)((((DEF_IV + (2 * DEF_B) + (DEF_EV / 4)) * level) / 100) + 5); stats[4] = (ushort)((((SPA_IV + (2 * SPA_B) + (SPA_EV / 4)) * level) / 100) + 5);