PKHeX/PKHeX.Core/PKM/Util/PKX.cs
Kurt a57f40ae7d Break up PKX into separate classes
Many years ago, PKX used to be a >4,000 line bloated file, which spun off multiple classes like CommonEdits and most of the early non-GUI PKM related logic. Now, it's just a stub to source the latest generation & personal table.

Separate files = more concise info, and more room to grow to do more advanced things.
Makes the IsPresent methods public (no longer internal).
2022-05-06 20:38:55 -07:00

25 lines
725 B
C#

using System;
namespace PKHeX.Core;
/// <summary>
/// Common logic for <see cref="PKM"/> data providing and manipulation.
/// </summary>
public static class PKX
{
internal static readonly PersonalTable Personal = PersonalTable.LA;
public const int Generation = 8;
/// <summary>
/// Reorders (in place) the input array of stats to have the Speed value last rather than before the SpA/SpD stats.
/// </summary>
/// <param name="value">Input array to reorder</param>
/// <returns>Same array, reordered.</returns>
public static void ReorderSpeedLast(Span<int> value)
{
var spe = value[3];
value[3] = value[4];
value[4] = value[5];
value[5] = spe;
}
}