mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-03 09:19:13 +00:00
03182ebd3d
Adds support for Scarlet & Violet. Co-Authored-By: SciresM <8676005+SciresM@users.noreply.github.com> Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com> Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
28 lines
909 B
C#
28 lines
909 B
C#
using System;
|
|
using static PKHeX.Core.EntityContext;
|
|
|
|
namespace PKHeX.Core;
|
|
|
|
public static class EvolutionGroupUtil
|
|
{
|
|
public static IEvolutionGroup GetCurrentGroup(PKM pk) => GetCurrentGroup(pk.Context);
|
|
|
|
public static IEvolutionGroup GetCurrentGroup(EntityContext context) => context switch
|
|
{
|
|
Gen1 => EvolutionGroup1.Instance,
|
|
Gen2 => EvolutionGroup2.Instance,
|
|
Gen3 => EvolutionGroup3.Instance,
|
|
Gen4 => EvolutionGroup4.Instance,
|
|
Gen5 => EvolutionGroup5.Instance,
|
|
Gen6 => EvolutionGroup6.Instance,
|
|
Gen7 => EvolutionGroup7.Instance,
|
|
Gen8 => EvolutionGroup8.Instance,
|
|
Gen9 => EvolutionGroup9.Instance,
|
|
|
|
Gen7b => EvolutionGroup7b.Instance,
|
|
Gen8a => EvolutionGroup8.Instance,
|
|
Gen8b => EvolutionGroup8.Instance,
|
|
|
|
_ => throw new ArgumentOutOfRangeException(nameof(context), context, null),
|
|
};
|
|
}
|