PKHeX/PKHeX.Core/PKM/Enums/OriginMark.cs

53 lines
956 B
C#
Raw Normal View History

2022-08-21 08:39:16 +00:00
using static PKHeX.Core.OriginMark;
namespace PKHeX.Core;
2022-08-21 08:39:16 +00:00
/// <summary>
/// Displayed origin mark, indicating the group of games it originated from.
/// </summary>
public enum OriginMark
{
None,
Gen6Pentagon,
Gen7Clover,
Gen8Galar,
Gen8Trio,
Gen8Arc,
Gen9Paldea,
GameBoy,
GO,
LetsGo,
}
public static class OriginMarkUtil
{
public static OriginMark GetOriginMark(PKM pk)
{
// Specific Markings
if (pk.VC)
2022-08-21 08:39:16 +00:00
return GameBoy;
if (pk.GO)
2022-08-21 08:39:16 +00:00
return GO;
if (pk.LGPE)
2022-08-21 08:39:16 +00:00
return LetsGo;
// Lumped Generations
if (pk.Gen6)
2022-08-21 08:39:16 +00:00
return Gen6Pentagon;
if (pk.Gen7)
2022-08-21 08:39:16 +00:00
return Gen7Clover;
if (pk.SWSH)
2022-08-21 08:39:16 +00:00
return Gen8Galar;
if (pk.BDSP)
2022-08-21 08:39:16 +00:00
return Gen8Trio;
if (pk.LA)
2022-08-21 08:39:16 +00:00
return Gen8Arc;
if (pk.SV)
return Gen9Paldea;
2022-08-21 08:39:16 +00:00
return None;
}
}