mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-07 06:47:42 -05:00
Store hidden power type
This commit is contained in:
parent
a133fcd498
commit
3e05e9655e
|
|
@ -93,6 +93,11 @@ public class ShowdownSet
|
|||
/// </summary>
|
||||
public int[] IVs { get; private set; } = {31, 31, 31, 31, 31, 31};
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="PKM.HPType"/> of the Set entity.
|
||||
/// </summary>
|
||||
public int HiddenPowerType { get; set; } = -1;
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="PKM.Moves"/> of the Set entity.
|
||||
/// </summary>
|
||||
|
|
@ -326,7 +331,11 @@ private IEnumerable<string> 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))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user