namespace PKHeX.Core
{
///
/// analogues used by Colosseum/XD instead of the main-series values.
///
public enum GCVersion : byte
{
None = 0,
FR = 1,
LG = 2,
S = 8,
R = 9,
E = 10,
CXD = 11,
}
public static class GCVersionExtensions
{
///
/// Translates a main-series to the corresponding value.
///
/// Version ID while present in the main-series games
/// Version ID while present in the GameCube games
public static GCVersion GetCXDVersionID(this GameVersion gbaVersion)
{
switch (gbaVersion)
{
case GameVersion.S: return GCVersion.S;
case GameVersion.R: return GCVersion.R;
case GameVersion.E: return GCVersion.E;
case GameVersion.FR: return GCVersion.FR;
case GameVersion.LG: return GCVersion.LG;
case GameVersion.CXD: return GCVersion.CXD;
default: return 0;
}
}
///
/// Translates a to the corresponding main-series value.
///
/// Version ID while present in the GameCube games
/// Version ID while present in the main-series games
public static GameVersion GetG3VersionID(this GCVersion gcVersion)
{
switch (gcVersion)
{
case GCVersion.S: return GameVersion.S;
case GCVersion.R: return GameVersion.R;
case GCVersion.E: return GameVersion.E;
case GCVersion.FR: return GameVersion.FR;
case GCVersion.LG: return GameVersion.LG;
case GCVersion.CXD: return GameVersion.CXD;
default: return 0;
}
}
}
}