mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-16 00:52:41 -05:00
More tweaks
This commit is contained in:
parent
d61e646ca9
commit
f308be38fd
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
namespace PKHeX.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Analyzes content within a <see cref="SaveFile"/> for overall <see cref="PKM"/> legality analysis.
|
||||
/// </summary>
|
||||
public sealed class BulkAnalysis
|
||||
{
|
||||
public readonly IReadOnlyList<PKM> AllData;
|
||||
|
|
|
|||
|
|
@ -78,14 +78,8 @@ private static IReadOnlyList<EvoCriteria> GetOriginChain(PKM pkm, int maxSpecies
|
|||
|
||||
foreach (var evo in chain)
|
||||
{
|
||||
// Check for invalid evolutions, or cases where they may be under-leveled encounters of an evolution.
|
||||
if (evo.Level > maxLevel)
|
||||
evo.Level = maxLevel;
|
||||
if (evo.MinLevel <= maxLevel)
|
||||
continue;
|
||||
evo.MinLevel = maxLevel;
|
||||
if (evo.RequiresLvlUp)
|
||||
maxLevel--;
|
||||
evo.Level = maxLevel;
|
||||
evo.MinLevel = minLevel;
|
||||
}
|
||||
return chain;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,9 @@ internal static class GBRestrictions
|
|||
(int)Kabuto,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Species that have a specific minimum amount of moves based on their evolution state.
|
||||
/// </summary>
|
||||
private static readonly HashSet<int> SpecialMinMoveSlots = new()
|
||||
{
|
||||
(int)Pikachu,
|
||||
|
|
@ -61,6 +64,9 @@ internal static class GBRestrictions
|
|||
|
||||
internal static bool TypeIDExists(int type) => Types_Gen1.Contains(type);
|
||||
|
||||
/// <summary>
|
||||
/// Valid type IDs extracted from the Personal Table used for R/G/B/Y games.
|
||||
/// </summary>
|
||||
private static readonly HashSet<int> Types_Gen1 = new()
|
||||
{
|
||||
0, 1, 2, 3, 4, 5, 7, 8, 20, 21, 22, 23, 24, 25, 26
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ namespace PKHeX.Core
|
|||
/// <summary>
|
||||
/// Provides information for <see cref="IRegionOrigin.ConsoleRegion"/> and <see cref="IRegionOrigin.Country"/> data.
|
||||
/// </summary>
|
||||
/// <remarks>These values were specific to the 3DS games (Generations 6 and 7, excluding LGP/E)</remarks>
|
||||
public static class Locale3DS
|
||||
{
|
||||
/// <summary>
|
||||
|
|
@ -16,8 +17,8 @@ public static class Locale3DS
|
|||
public static bool IsConsoleRegionCountryValid(int consoleRegion, int country) => consoleRegion switch
|
||||
{
|
||||
0 => country is 1, // Japan
|
||||
1 => (8 <= country && country <= 52) || (country is 153 or 156 or 168 or 174 or 186), // Americas
|
||||
2 => (64 <= country && country <= 127) || (country is 169 or 184 or 185), // Europe
|
||||
1 => country is (>= 8 and <= 52) or 153 or 156 or 168 or 174 or 186, // Americas
|
||||
2 => country is (>= 64 and <= 127) or 169 or 184 or 185, // Europe
|
||||
4 => country is 144 or 160, // China
|
||||
5 => country is 136, // Korea
|
||||
6 => country is 144 or 128, // Taiwan
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user