From 3e05e9655e8dfd4e8bb0d395e67606faa13b5e7b Mon Sep 17 00:00:00 2001 From: Kurt Date: Fri, 28 Dec 2018 16:54:01 -0800 Subject: [PATCH] Store hidden power type --- PKHeX.Core/Editing/ShowdownSet.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/PKHeX.Core/Editing/ShowdownSet.cs b/PKHeX.Core/Editing/ShowdownSet.cs index 3c8ca1acc..7654962f9 100644 --- a/PKHeX.Core/Editing/ShowdownSet.cs +++ b/PKHeX.Core/Editing/ShowdownSet.cs @@ -93,6 +93,11 @@ public class ShowdownSet /// public int[] IVs { get; private set; } = {31, 31, 31, 31, 31, 31}; + /// + /// of the Set entity. + /// + public int HiddenPowerType { get; set; } = -1; + /// /// of the Set entity. /// @@ -326,7 +331,11 @@ private IEnumerable GetStringMoves() { var str = $"- {Strings.Move[move]}"; if (move == 237) // Hidden Power - str += $" [{Strings.Types[1+HiddenPower.GetType(IVs, Format)]}]"; + { + var hpVal = HiddenPower.GetType(IVs, Format); + str += $" [{Strings.Types[1+ hpVal]}]"; + HiddenPowerType = hpVal; + } yield return str; } } @@ -509,6 +518,7 @@ private string ParseLineMove(string line) type = ReplaceAll(type, string.Empty, "[", "]", "(", ")"); // Trim out excess data int hpVal = Array.IndexOf(Strings.types, type) - 1; // Get HP Type + HiddenPowerType = hpVal; if (IVs.Any(z => z != 31)) { if (!HiddenPower.SetIVsForType(hpVal, IVs, Format))