public static IEnumerable <EncounterStatic> GetPossible(PKM pk, EvoCriteria[] chain, GameVersion gameSource) { var table = gameSource switch { RD or GN or BU or YW => StaticRBY.Where(z => z.Version.Contains(gameSource)), GD or SI => StaticGS.Where(z => z.Version.Contains(gameSource)), C => StaticC, _ => GetEncounterStaticTable(pk, gameSource), }; return(table.Where(e => chain.Any(d => d.Species == e.Species))); }
public static IEnumerable <EncounterStatic> GetPossible(PKM pkm, IReadOnlyList <DexLevel> chain, GameVersion gameSource = Any) { if (gameSource == Any) { gameSource = (GameVersion)pkm.Version; } var table = gameSource switch { RD or GN or BU or YW => StaticRBY.Where(z => z.Version.Contains(gameSource)), GD or SV => StaticGS.Where(z => z.Version.Contains(gameSource)), C => StaticC, _ => GetEncounterStaticTable(pkm, gameSource), }; return(table.Where(e => chain.Any(d => d.Species == e.Species))); }