mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-10 06:34:19 +00:00
Trailing commas
No functional change
This commit is contained in:
parent
c6342a163f
commit
bedc52943e
204 changed files with 379 additions and 379 deletions
|
@ -293,7 +293,7 @@ namespace PKHeX.Core
|
|||
3 => pk.EV_SPE = value,
|
||||
4 => pk.EV_SPA = value,
|
||||
5 => pk.EV_SPD = value,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(index))
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(index)),
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
@ -310,7 +310,7 @@ namespace PKHeX.Core
|
|||
3 => pk.IV_SPE = value,
|
||||
4 => pk.IV_SPA = value,
|
||||
5 => pk.IV_SPD = value,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(index))
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(index)),
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -53,14 +53,14 @@ namespace PKHeX.Core
|
|||
SAV6AO xy => GetExtraSlots6AO(xy),
|
||||
SAV7 sav7 => GetExtraSlots7(sav7, all),
|
||||
SAV8SWSH ss => GetExtraSlots8(ss),
|
||||
_ => None
|
||||
_ => None,
|
||||
};
|
||||
|
||||
private static List<SlotInfoMisc> GetExtraSlots2(SAV2 sav)
|
||||
{
|
||||
return new()
|
||||
{
|
||||
new SlotInfoMisc(sav.Data, 0, sav.GetDaycareSlotOffset(0, 2)) {Type = StorageSlotType.Daycare } // egg
|
||||
new SlotInfoMisc(sav.Data, 0, sav.GetDaycareSlotOffset(0, 2)) {Type = StorageSlotType.Daycare }, // egg
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ namespace PKHeX.Core
|
|||
return None;
|
||||
return new List<SlotInfoMisc>
|
||||
{
|
||||
new(sav.Large, 0, 0x3C98) {Type = StorageSlotType.Daycare}
|
||||
new(sav.Large, 0, 0x3C98) {Type = StorageSlotType.Daycare},
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -141,7 +141,7 @@ namespace PKHeX.Core
|
|||
var list = new List<SlotInfoMisc>
|
||||
{
|
||||
new(sav.Data, 0, sav.AllBlocks[07].Offset) {Type = StorageSlotType.GTS},
|
||||
new(sav.Data, 0, sav.GetFusedSlotOffset(0)) {Type = StorageSlotType.Fused}
|
||||
new(sav.Data, 0, sav.GetFusedSlotOffset(0)) {Type = StorageSlotType.Fused},
|
||||
};
|
||||
if (sav is SAV7USUM uu)
|
||||
{
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace PKHeX.Core
|
|||
SlotInfoFile file => $"File: {file.Path}",
|
||||
SlotInfoMisc misc => $"{misc.Type}-{misc.Slot}: {Entity.FileName}",
|
||||
SlotInfoParty party => $"Party: {party.Slot}: {Entity.FileName}",
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(Source))
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(Source)),
|
||||
};
|
||||
|
||||
private string GetFileName()
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
SAV4 s => s.General,
|
||||
SAV3 s3 => s3.Large,
|
||||
_ => sav.Data
|
||||
_ => sav.Data,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace PKHeX.Core
|
|||
private static SlotReversion GetReversion(ISlotInfo info, SaveFile sav) => info switch
|
||||
{
|
||||
SlotInfoParty p => new PartyReversion(p, sav),
|
||||
_ => new SingleSlotReversion(info, sav)
|
||||
_ => new SingleSlotReversion(info, sav),
|
||||
};
|
||||
|
||||
private abstract class SlotReversion
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace PKHeX.Core
|
|||
return species switch
|
||||
{
|
||||
(int)Minior => MiniorFormName,
|
||||
_ => form
|
||||
_ => form,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ namespace PKHeX.Core
|
|||
|
||||
_ => Legal.Totem_USUM.Contains(species) && form == "Large"
|
||||
? Legal.Totem_Alolan.Contains(species) && species != (int)Mimikyu ? "Alola-Totem" : "Totem"
|
||||
: form.Replace(' ', '-')
|
||||
: form.Replace(' ', '-'),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
GCVersion.FR => GameVersion.FR,
|
||||
GCVersion.LG => GameVersion.LG,
|
||||
GCVersion.CXD => GameVersion.CXD,
|
||||
_ => GameVersion.Unknown
|
||||
_ => GameVersion.Unknown,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
public static Nature GetNature(int value) => value switch
|
||||
{
|
||||
< 0 or >= (int)Nature.Random => Nature.Random,
|
||||
_ => (Nature)value
|
||||
_ => (Nature)value,
|
||||
};
|
||||
|
||||
public static bool IsFixed(this Nature value) => value is >= 0 and < Nature.Random;
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
SAV7b => source.SpeciesDataSource // LGPE: Kanto 151, Meltan/Melmetal
|
||||
.Where(s => s.Value is <= (int)Core.Species.Mew or (int)Core.Species.Meltan or (int)Core.Species.Melmetal),
|
||||
_ => source.SpeciesDataSource.Where(s => s.Value <= sav.MaxSpeciesID)
|
||||
_ => source.SpeciesDataSource.Where(s => s.Value <= sav.MaxSpeciesID),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ namespace PKHeX.Core
|
|||
return sav switch
|
||||
{
|
||||
SAV7b => legal.Where(s => Legal.AllowedMovesGG.Contains((short) s.Value)), // LGPE: Not all moves are available
|
||||
_ => legal.Where(m => m.Value <= sav.MaxMoveID)
|
||||
_ => legal.Where(m => m.Value <= sav.MaxMoveID),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
000, 001, 002, 003, 004, 005, 006, 007, 008, 009, 010, 011, 012,
|
||||
013, 014, 015, 016, 492, 493, 494, 495, 496, 497, 498, 499, 576,
|
||||
851
|
||||
851,
|
||||
};
|
||||
|
||||
public GameStrings(string l)
|
||||
|
@ -390,7 +390,7 @@ namespace PKHeX.Core
|
|||
2 => g2items,
|
||||
3 => GetItemStrings3(game),
|
||||
4 => g4items, // mail names changed 4->5
|
||||
_ => itemlist
|
||||
_ => itemlist,
|
||||
};
|
||||
|
||||
private string[] GetItemStrings3(GameVersion game)
|
||||
|
@ -485,7 +485,7 @@ namespace PKHeX.Core
|
|||
6 => GetLocationNames6(bankID),
|
||||
7 => GameVersion.Gen7b.Contains(version) ? GetLocationNames7GG(bankID) : GetLocationNames7(bankID),
|
||||
8 => GetLocationNames8(bankID),
|
||||
_ => Array.Empty<string>()
|
||||
_ => Array.Empty<string>(),
|
||||
};
|
||||
|
||||
private IReadOnlyList<string> GetLocationNames4(int bankID) => bankID switch
|
||||
|
@ -493,7 +493,7 @@ namespace PKHeX.Core
|
|||
0 => metHGSS_00000,
|
||||
2 => metHGSS_02000,
|
||||
3 => metHGSS_03000,
|
||||
_ => Array.Empty<string>()
|
||||
_ => Array.Empty<string>(),
|
||||
};
|
||||
|
||||
public IReadOnlyList<string> GetLocationNames5(int bankID) => bankID switch
|
||||
|
@ -502,7 +502,7 @@ namespace PKHeX.Core
|
|||
3 => metBW2_30000,
|
||||
4 => metBW2_40000,
|
||||
6 => metBW2_60000,
|
||||
_ => Array.Empty<string>()
|
||||
_ => Array.Empty<string>(),
|
||||
};
|
||||
|
||||
public IReadOnlyList<string> GetLocationNames6(int bankID) => bankID switch
|
||||
|
@ -511,7 +511,7 @@ namespace PKHeX.Core
|
|||
3 => metXY_30000,
|
||||
4 => metXY_40000,
|
||||
6 => metXY_60000,
|
||||
_ => Array.Empty<string>()
|
||||
_ => Array.Empty<string>(),
|
||||
};
|
||||
|
||||
public IReadOnlyList<string> GetLocationNames7(int bankID) => bankID switch
|
||||
|
@ -520,7 +520,7 @@ namespace PKHeX.Core
|
|||
3 => metSM_30000,
|
||||
4 => metSM_40000,
|
||||
6 => metSM_60000,
|
||||
_ => Array.Empty<string>()
|
||||
_ => Array.Empty<string>(),
|
||||
};
|
||||
|
||||
public IReadOnlyList<string> GetLocationNames7GG(int bankID) => bankID switch
|
||||
|
@ -529,7 +529,7 @@ namespace PKHeX.Core
|
|||
3 => metGG_30000,
|
||||
4 => metGG_40000,
|
||||
6 => metGG_60000,
|
||||
_ => Array.Empty<string>()
|
||||
_ => Array.Empty<string>(),
|
||||
};
|
||||
|
||||
public IReadOnlyList<string> GetLocationNames8(int bankID) => bankID switch
|
||||
|
@ -538,7 +538,7 @@ namespace PKHeX.Core
|
|||
3 => metSWSH_30000,
|
||||
4 => metSWSH_40000,
|
||||
6 => metSWSH_60000,
|
||||
_ => Array.Empty<string>()
|
||||
_ => Array.Empty<string>(),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ namespace PKHeX.Core
|
|||
MemoryArgType.Item => Items,
|
||||
MemoryArgType.Move => Moves,
|
||||
MemoryArgType.SpecificLocation => SpecificLocations,
|
||||
_ => None
|
||||
_ => None,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -231,7 +231,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
<= CXD when currentGen == 4 => MetGen4Transfer ??= CreateGen4Transfer(),
|
||||
< X when currentGen >= 5 => MetGen5Transfer ??= CreateGen5Transfer(),
|
||||
_ => Array.Empty<ComboItem>()
|
||||
_ => Array.Empty<ComboItem>(),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ namespace PKHeX.Core
|
|||
6 => AS,
|
||||
7 => UM,
|
||||
8 => SH,
|
||||
_ => Invalid
|
||||
_ => Invalid,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
SlotType.BugContest => BCC_SlotRates,
|
||||
SlotType.Grass => RatesGrass,
|
||||
_ => RatesSurf
|
||||
_ => RatesSurf,
|
||||
};
|
||||
Slots = ReadSlots(data, count, 4);
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ namespace PKHeX.Core
|
|||
618, 619, 621, 623, 624, 627, 629, 636, 651, 654,
|
||||
657, 660, 662, 662, 668, 673, 674, 677, 682, 684,
|
||||
686, 689, 694, 701, 702, 702, 705, 707, 708, 710,
|
||||
712, 714
|
||||
712, 714,
|
||||
};
|
||||
|
||||
var slots = new EncounterSlot6XY[species.Length + SpeciesFormSlots];
|
||||
|
|
|
@ -351,7 +351,7 @@ namespace PKHeX.Core
|
|||
HiddenMain or HiddenMain2 => WeatherBleedHiddenGrass .TryGetValue(location, out var weather) && weather.HasFlag(permit),
|
||||
Surfing => WeatherBleedSymbolSurfing .TryGetValue(location, out var weather) && weather.HasFlag(permit),
|
||||
Sharpedo => WeatherBleedSymbolSharpedo.TryGetValue(location, out var weather) && weather.HasFlag(permit),
|
||||
_ => false
|
||||
_ => false,
|
||||
};
|
||||
|
||||
public static EncounterArea8[] GetAreas(byte[][] input, GameVersion game, bool symbol = false)
|
||||
|
|
|
@ -69,7 +69,7 @@ namespace PKHeX.Core
|
|||
6 => MovePP_XY,
|
||||
7 => MovePP_SM,
|
||||
8 => MovePP_SWSH,
|
||||
_ => Array.Empty<byte>()
|
||||
_ => Array.Empty<byte>(),
|
||||
};
|
||||
|
||||
internal static int GetMaxSpeciesOrigin(PKM pkm)
|
||||
|
@ -91,7 +91,7 @@ namespace PKHeX.Core
|
|||
6 => MaxSpeciesID_6,
|
||||
7 => MaxSpeciesID_7b,
|
||||
8 => MaxSpeciesID_8,
|
||||
_ => -1
|
||||
_ => -1,
|
||||
};
|
||||
|
||||
internal static int GetDebutGeneration(int species) => species switch
|
||||
|
@ -104,7 +104,7 @@ namespace PKHeX.Core
|
|||
<= MaxSpeciesID_6 => 6,
|
||||
<= MaxSpeciesID_7b => 7,
|
||||
<= MaxSpeciesID_8 => 8,
|
||||
_ => -1
|
||||
_ => -1,
|
||||
};
|
||||
|
||||
internal static int GetMaxLanguageID(int generation) => generation switch
|
||||
|
@ -117,7 +117,7 @@ namespace PKHeX.Core
|
|||
6 => (int) LanguageID.Korean,
|
||||
7 => (int) LanguageID.ChineseT,
|
||||
8 => (int) LanguageID.ChineseT,
|
||||
_ => -1
|
||||
_ => -1,
|
||||
};
|
||||
|
||||
internal const GameVersion NONE = GameVersion.Invalid;
|
||||
|
@ -132,14 +132,14 @@ namespace PKHeX.Core
|
|||
{
|
||||
LanguageID.ChineseS or LanguageID.ChineseT => 6,
|
||||
LanguageID.Japanese or LanguageID.Korean => generation >= 6 ? 6 : 5,
|
||||
_ => generation >= 6 ? 12 : 7
|
||||
_ => generation >= 6 ? 12 : 7,
|
||||
};
|
||||
|
||||
public static int GetMaxLengthNickname(int generation, LanguageID language) => language switch
|
||||
{
|
||||
LanguageID.ChineseS or LanguageID.ChineseT => 6,
|
||||
LanguageID.Japanese or LanguageID.Korean => generation >= 6 ? 6 : 5,
|
||||
_ => generation >= 6 ? 12 : 10
|
||||
_ => generation >= 6 ? 12 : 10,
|
||||
};
|
||||
|
||||
public static bool GetIsFixedIVSequenceValidSkipRand(IReadOnlyList<int> IVs, PKM pkm, int max = 31)
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
{
|
||||
(int) Core.Species.Kadabra => 96,
|
||||
(int) Core.Species.Dragonair => 27,
|
||||
_ => PersonalTable.RB[Species].CatchRate
|
||||
_ => PersonalTable.RB[Species].CatchRate,
|
||||
};
|
||||
}
|
||||
else
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace PKHeX.Core
|
|||
Ability = ability,
|
||||
Location = 075,
|
||||
Shiny = Shiny.Never,
|
||||
Moves = new[] { move }
|
||||
Moves = new[] { move },
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
Shiny.Never => !pkm.IsShiny,
|
||||
Shiny.Always => pkm.IsShiny,
|
||||
_ => true
|
||||
_ => true,
|
||||
};
|
||||
|
||||
protected override PKM GetBlank(ITrainerInfo tr) => Language switch
|
||||
|
|
|
@ -68,7 +68,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
Shiny.Never => !pkm.IsShiny,
|
||||
Shiny.Always => pkm.IsShiny,
|
||||
_ => true
|
||||
_ => true,
|
||||
};
|
||||
|
||||
protected override int GetMinimalLevel() => CurrentLevel == -1 ? base.GetMinimalLevel() : CurrentLevel;
|
||||
|
|
|
@ -69,7 +69,7 @@ namespace PKHeX.Core
|
|||
// Route 1-25 encounter is possible either in grass or on water
|
||||
101,102,103,104,105,106,107,108,109,110,
|
||||
111,112,113,114,115,116,117,118,119,120,
|
||||
121,122,123,124,125
|
||||
121,122,123,124,125,
|
||||
};
|
||||
|
||||
private static readonly int[] Roaming_MetLocation_RSE =
|
||||
|
|
|
@ -142,7 +142,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
// Routes 30-32,34-35,40-45 and 47 can be encountered in water
|
||||
// Won't go to routes 40,41,47,48
|
||||
178, 179, 180, 182, 183, 190, 191, 192, 193
|
||||
178, 179, 180, 182, 183, 190, 191, 192, 193,
|
||||
};
|
||||
|
||||
private static readonly int[] Roaming_MetLocation_HGSS_Kanto_Grass =
|
||||
|
|
|
@ -89,7 +89,7 @@ namespace PKHeX.Core
|
|||
Fateful = fateful,
|
||||
Location = Locations.Transfer2,
|
||||
Level = metLevel,
|
||||
FlawlessIVCount = fateful ? 5 : 3
|
||||
FlawlessIVCount = fateful ? 5 : 3,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
IRibbonSetMark8 {RibbonMarkCurry: true} => EncounterMatchRating.DeferredErrors,
|
||||
PK8 {AffixedRibbon: (int) RibbonIndex.MarkCurry} => EncounterMatchRating.Deferred,
|
||||
_ => EncounterMatchRating.Match
|
||||
_ => EncounterMatchRating.Match,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ namespace PKHeX.Core
|
|||
EncounterTrade2 => GBEncounterPriority.TradeEncounterG2,
|
||||
EncounterStatic => GBEncounterPriority.StaticEncounter,
|
||||
EncounterSlot => GBEncounterPriority.WildEncounter,
|
||||
_ => GBEncounterPriority.EggEncounter
|
||||
_ => GBEncounterPriority.EggEncounter,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
(int)GameVersion.GO => GetEncountersGO(pkm, chain),
|
||||
> (int)GameVersion.GO => GetEncountersGG(pkm, chain),
|
||||
_ => GetEncountersMainline(pkm, chain)
|
||||
_ => GetEncountersMainline(pkm, chain),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace PKHeX.Core
|
|||
return pkm.Version switch
|
||||
{
|
||||
(int)GameVersion.GO => EncounterGenerator7.GetEncountersGO(pkm, chain),
|
||||
_ => GetEncountersMainline(pkm, chain)
|
||||
_ => GetEncountersMainline(pkm, chain),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -211,7 +211,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
3 => moves.Concat(Legal.LevelUpE [(int)Species.Ninjask].GetMoves(100, 20)),
|
||||
4 => moves.Concat(Legal.LevelUpPt[(int)Species.Ninjask].GetMoves(100, 20)),
|
||||
_ => moves
|
||||
_ => moves,
|
||||
};
|
||||
}
|
||||
return moves;
|
||||
|
@ -226,7 +226,7 @@ namespace PKHeX.Core
|
|||
EncounterOrder.Static => GetStatic(pk, needs, chain, version),
|
||||
EncounterOrder.Trade => GetTrades(pk, needs, chain, version),
|
||||
EncounterOrder.Slot => GetSlots(pk, needs, chain, version),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(type), type, null)
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(type), type, null),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
<= GameVersion.OR => (GameVersion) ((int) ver ^ 2), // gen6
|
||||
<= GameVersion.MN => ver + 2, // gen7
|
||||
_ => ver - 2
|
||||
_ => ver - 2,
|
||||
};
|
||||
|
||||
private static bool HasOtherGamePair(GameVersion ver)
|
||||
|
|
|
@ -150,7 +150,7 @@ namespace PKHeX.Core
|
|||
GO => GetEncounterTableGO(pkm),
|
||||
SW => SlotsSW,
|
||||
SH => SlotsSH,
|
||||
_ => Array.Empty<EncounterArea>()
|
||||
_ => Array.Empty<EncounterArea>(),
|
||||
};
|
||||
|
||||
private static IEnumerable<EncounterArea> GetEncounterTableGSC(PKM pkm)
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace PKHeX.Core
|
|||
6 => MGDB_G6,
|
||||
7 => pkm.LGPE ? MGDB_G7GG : MGDB_G7,
|
||||
8 => MGDB_G8,
|
||||
_ => Array.Empty<MysteryGift>()
|
||||
_ => Array.Empty<MysteryGift>(),
|
||||
};
|
||||
|
||||
private static IEnumerable<MysteryGift> GetMatchingPCD(PKM pkm, IReadOnlyCollection<PCD> DB, IReadOnlyList<DexLevel> chain)
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace PKHeX.Core
|
|||
|
||||
private static EncounterSummary GetSummary(IEncounterTemplate item) => item switch
|
||||
{
|
||||
_ => new EncounterSummary(item)
|
||||
_ => new EncounterSummary(item),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace PKHeX.Core
|
|||
EncounterSlot w => VerifyEncounterWild(w),
|
||||
EncounterStatic s => VerifyEncounterStatic(pkm, s),
|
||||
MysteryGift g => VerifyEncounterEvent(pkm, g),
|
||||
_ => new CheckResult(Severity.Invalid, LEncInvalid, CheckIdentifier.Encounter)
|
||||
_ => new CheckResult(Severity.Invalid, LEncInvalid, CheckIdentifier.Encounter),
|
||||
};
|
||||
|
||||
private static CheckResult VerifyEncounterG12(PKM pkm, IEncounterTemplate enc)
|
||||
|
@ -39,7 +39,7 @@ namespace PKHeX.Core
|
|||
EncounterSlot2 s2 => VerifyWildEncounterGen2(pkm, s2),
|
||||
EncounterStatic s => VerifyEncounterStatic(pkm, s),
|
||||
EncounterTrade t => VerifyEncounterTrade(pkm, t),
|
||||
_ => new CheckResult(Severity.Invalid, LEncInvalid, CheckIdentifier.Encounter)
|
||||
_ => new CheckResult(Severity.Invalid, LEncInvalid, CheckIdentifier.Encounter),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ namespace PKHeX.Core
|
|||
6 => pkm.IsEgg ? VerifyUnhatchedEgg(pkm, Locations.LinkTrade6) : VerifyEncounterEgg6(pkm),
|
||||
7 => pkm.IsEgg ? VerifyUnhatchedEgg(pkm, Locations.LinkTrade6) : VerifyEncounterEgg7(pkm),
|
||||
8 => pkm.IsEgg ? VerifyUnhatchedEgg(pkm, Locations.LinkTrade6) : VerifyEncounterEgg8(pkm),
|
||||
_ => new CheckResult(Severity.Invalid, LEggLocationInvalid, CheckIdentifier.Encounter)
|
||||
_ => new CheckResult(Severity.Invalid, LEggLocationInvalid, CheckIdentifier.Encounter),
|
||||
};
|
||||
|
||||
private static CheckResult VerifyUnhatchedEgg3(PKM pkm)
|
||||
|
|
|
@ -79,7 +79,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
return generation switch
|
||||
{
|
||||
_ => false
|
||||
_ => false,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
return generation switch
|
||||
{
|
||||
_ => false
|
||||
_ => false,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ namespace PKHeX.Core
|
|||
var levelup = new int[info.EvoChainsAllGens.Length][];
|
||||
levelup[pkm.Format] = new[] {166};
|
||||
info.EncounterMoves = new ValidEncounterMoves(levelup);
|
||||
var source = new MoveParseSource { CurrentMoves = currentMoves, };
|
||||
var source = new MoveParseSource { CurrentMoves = currentMoves };
|
||||
return ParseMoves(pkm, source, info);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace PKHeX.Core
|
|||
IRelearn s when s.Relearn.Count != 0 => VerifyRelearnSpecifiedMoveset(pkm, s.Relearn, result),
|
||||
EncounterEgg e => VerifyEggMoveset(e, result, pkm.RelearnMoves),
|
||||
EncounterSlot6AO z when pkm.RelearnMove1 != 0 && z.CanDexNav => VerifyRelearnDexNav(pkm, result),
|
||||
_ => VerifyRelearnNone(pkm, result)
|
||||
_ => VerifyRelearnNone(pkm, result),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace PKHeX.Core
|
|||
Severity.Invalid => L_SInvalid,
|
||||
Severity.Fishy => L_SFishy,
|
||||
Severity.Valid => L_SValid,
|
||||
_ => L_SNotImplemented
|
||||
_ => L_SNotImplemented,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,6 @@
|
|||
/// <summary>
|
||||
/// Information can only exist if has visited both Gen1 and Gen2.
|
||||
/// </summary>
|
||||
WasTradeback
|
||||
WasTradeback,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -140,7 +140,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
< 3 => currentGeneration >= 3,
|
||||
<= 4 => currentGeneration != originalGeneration,
|
||||
_ => false
|
||||
_ => false,
|
||||
};
|
||||
|
||||
private static void TrimVC1Transfer(PKM pkm, IList<List<EvoCriteria>> allChains)
|
||||
|
|
|
@ -97,7 +97,7 @@ namespace PKHeX.Core
|
|||
3 => FutureEvolutionsGen3,
|
||||
4 => FutureEvolutionsGen4,
|
||||
5 => FutureEvolutionsGen5,
|
||||
_ => Array.Empty<int>()
|
||||
_ => Array.Empty<int>(),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace PKHeX.Core
|
|||
|
||||
static EvolutionTree()
|
||||
{
|
||||
// Throw in banned evolution data!
|
||||
// Add in banned evolution data!
|
||||
Evolves7.FixEvoTreeSM();
|
||||
Evolves8.FixEvoTreeSS();
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ namespace PKHeX.Core
|
|||
5 => Evolves5,
|
||||
6 => Evolves6,
|
||||
7 => Evolves7,
|
||||
_ => Evolves8
|
||||
_ => Evolves8,
|
||||
};
|
||||
|
||||
public static EvolutionTree GetEvolutionTree(PKM pkm, int generation) => generation switch
|
||||
|
@ -55,7 +55,7 @@ namespace PKHeX.Core
|
|||
5 => Evolves5,
|
||||
6 => Evolves6,
|
||||
7 => pkm.Version is (int)GO or (int)GP or (int)GE ? Evolves7b : Evolves7,
|
||||
_ => Evolves8
|
||||
_ => Evolves8,
|
||||
};
|
||||
|
||||
private readonly IReadOnlyList<EvolutionMethod[]> Entries;
|
||||
|
@ -142,7 +142,7 @@ namespace PKHeX.Core
|
|||
Gen6 => EvolutionSet6.GetArray(data),
|
||||
Gen7 => EvolutionSet7.GetArray(data),
|
||||
Gen8 => EvolutionSet7.GetArray(data),
|
||||
_ => throw new Exception()
|
||||
_ => throw new ArgumentOutOfRangeException(),
|
||||
};
|
||||
|
||||
private void FixEvoTreeSM()
|
||||
|
|
|
@ -173,7 +173,7 @@ namespace PKHeX.Core
|
|||
|
||||
8 => ParsePK8,
|
||||
|
||||
_ => throw new Exception()
|
||||
_ => throw new Exception(),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ namespace PKHeX.Core
|
|||
|
||||
Stadium => Legal.LevelUpY,
|
||||
Stadium2 => Legal.LevelUpGS,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(game))
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(game)),
|
||||
};
|
||||
|
||||
private static PersonalTable Personal(GameVersion game) => game switch
|
||||
|
@ -100,7 +100,7 @@ namespace PKHeX.Core
|
|||
Stadium => PersonalTable.Y,
|
||||
Stadium2 => PersonalTable.GS,
|
||||
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(game))
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(game)),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace PKHeX.Core
|
|||
6 => GetIsLevelUp6(species, form, move, maxLevel, version),
|
||||
7 => GetIsLevelUp7(species, form, move, version), // move reminder can give any move 1-100
|
||||
8 => GetIsLevelUp8(species, form, move, maxLevel, version),
|
||||
_ => LearnNONE
|
||||
_ => LearnNONE,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,7 @@ namespace PKHeX.Core
|
|||
1 => FR,
|
||||
2 => LG,
|
||||
3 => E,
|
||||
_ => Invalid
|
||||
_ => Invalid,
|
||||
};
|
||||
|
||||
private static Learnset? GetDeoxysLearn3(int form, GameVersion ver = Any)
|
||||
|
@ -267,7 +267,7 @@ namespace PKHeX.Core
|
|||
6 => GetMovesLevelUp6(species, form, maxLevel, version),
|
||||
7 => GetMovesLevelUp7(species, form, maxLevel, MoveReminder, version),
|
||||
8 => GetMovesLevelUp8(species, form, maxLevel, version),
|
||||
_ => Array.Empty<int>()
|
||||
_ => Array.Empty<int>(),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace PKHeX.Core
|
|||
return generation switch
|
||||
{
|
||||
8 => GetIsRecord8(pkm, species, move, form, ver, allowBit),
|
||||
_ => Legal.NONE
|
||||
_ => Legal.NONE,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace PKHeX.Core
|
|||
6 => GetIsTutor6(pkm, species, form, specialTutors, move),
|
||||
7 => GetIsTutor7(pkm, species, form, specialTutors, move),
|
||||
8 => GetIsTutor8(pkm, species, form, specialTutors, move),
|
||||
_ => NONE
|
||||
_ => NONE,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace PKHeX.Core
|
|||
RNGType.LCRNG => RNG.LCRNG,
|
||||
RNGType.XDRNG => RNG.XDRNG,
|
||||
RNGType.ARNG => RNG.ARNG,
|
||||
_ => throw new ArgumentException(nameof(type))
|
||||
_ => throw new ArgumentException(nameof(type)),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ namespace PKHeX.Core
|
|||
0 => max ? 255 : ratio, // male
|
||||
1 => max ? ratio - 1 : 0, // female
|
||||
_ => max ? 255 : 0,
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace PKHeX.Core
|
|||
FrameType.MethodH => HSlot(type, rand),
|
||||
FrameType.MethodJ => JSlot(type, rand),
|
||||
FrameType.MethodK => KSlot(type, rand),
|
||||
_ => Invalid
|
||||
_ => Invalid,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
@ -48,7 +48,7 @@ namespace PKHeX.Core
|
|||
Super_Rod => CalcSlot(ESV, H_SuperRod),
|
||||
Rock_Smash => CalcSlot(ESV, H_Surf),
|
||||
Surf => CalcSlot(ESV, H_Surf),
|
||||
_ => CalcSlot(ESV, H_Regular)
|
||||
_ => CalcSlot(ESV, H_Regular),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ namespace PKHeX.Core
|
|||
Old_Rod or Good_Rod or Super_Rod => CalcSlot(ESV, K_SuperRod),
|
||||
BugContest => CalcSlot(ESV, K_BCC),
|
||||
Headbutt or (Headbutt | Special) => CalcSlot(ESV, K_Headbutt),
|
||||
_ => CalcSlot(ESV, H_Regular)
|
||||
_ => CalcSlot(ESV, H_Regular),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ namespace PKHeX.Core
|
|||
Old_Rod or Rock_Smash or Surf => CalcSlot(ESV, H_Surf),
|
||||
Good_Rod or Super_Rod => CalcSlot(ESV, J_SuperRod),
|
||||
HoneyTree => 0,
|
||||
_ => CalcSlot(ESV, H_Regular)
|
||||
_ => CalcSlot(ESV, H_Regular),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -157,17 +157,17 @@ namespace PKHeX.Core
|
|||
{
|
||||
< 25 => true,
|
||||
< 50 => lead == LeadRequired.None,
|
||||
_ => false
|
||||
_ => false,
|
||||
},
|
||||
Good_Rod => proc switch
|
||||
{
|
||||
< 50 => true,
|
||||
< 75 => lead == LeadRequired.None,
|
||||
_ => false
|
||||
_ => false,
|
||||
},
|
||||
Super_Rod => proc < 75 || lead == LeadRequired.None,
|
||||
|
||||
_ => false
|
||||
_ => false,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -810,7 +810,7 @@ namespace PKHeX.Core
|
|||
0 => esv < 50 , // [0,50)
|
||||
1 => esv - 50 < 35, // [50,85)
|
||||
2 => esv >= 85, // [85,100)
|
||||
_ => false
|
||||
_ => false,
|
||||
};
|
||||
|
||||
public static bool IsCompatible3(this PIDType val, IEncounterTemplate encounter, PKM pkm) => encounter switch
|
||||
|
@ -820,7 +820,7 @@ namespace PKHeX.Core
|
|||
EncounterSlot3 w => (w.Species == (int)Species.Unown ? MethodH_Unown : MethodH).Contains(val),
|
||||
EncounterStaticShadow => val is CXD or CXDAnti,
|
||||
EncounterSlot3PokeSpot => val == PokeSpot,
|
||||
_ => val == None
|
||||
_ => val == None,
|
||||
};
|
||||
|
||||
private static bool IsCompatible3Static(PIDType val, PKM pkm, EncounterStatic3 s) => pkm.Version switch
|
||||
|
@ -836,7 +836,7 @@ namespace PKHeX.Core
|
|||
// forced shiny eggs, when hatched, can lose their detectable correlation.
|
||||
None => (g.Method is BACD_R_S or BACD_U_S) && g.IsEgg && !pkm.IsEgg,
|
||||
CXDAnti => g.Method == CXD && g.Shiny == Shiny.Never,
|
||||
_ => false
|
||||
_ => false,
|
||||
};
|
||||
|
||||
private static bool IsRoamerPIDIV(this PIDType val, PKM pkm)
|
||||
|
@ -870,12 +870,12 @@ namespace PKHeX.Core
|
|||
ChainShiny => pkm.IsShiny && !pkm.HGSS && (w.GroundTile & GroundTilePermission.Grass) != 0 && !Locations.IsSafariZoneLocation4(w.Location),
|
||||
CuteCharm => IsCuteCharm4Valid(encounter, pkm),
|
||||
Method_1 => true,
|
||||
_ => false
|
||||
_ => false,
|
||||
},
|
||||
|
||||
PGT => IsG4ManaphyPIDValid(val, pkm), // Manaphy is the only PGT in the database
|
||||
PCD d when d.Gift.PK.PID != 1 => true, // Already matches PCD's fixed PID requirement
|
||||
_ => val == None
|
||||
_ => val == None,
|
||||
};
|
||||
|
||||
private static bool IsG4ManaphyPIDValid(PIDType val, PKM pkm)
|
||||
|
|
|
@ -203,7 +203,7 @@ namespace PKHeX.Core
|
|||
BACD_R or BACD_R_A or BACD_R_S => true,
|
||||
BACD_U or BACD_U_A or BACD_U_S => true,
|
||||
Method_1_Unown or Method_2_Unown or Method_3_Unown or Method_4_Unown => true,
|
||||
_ => false
|
||||
_ => false,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
-1 => 254,
|
||||
0 => 255,
|
||||
_ => (a >> 1)
|
||||
_ => (a >> 1),
|
||||
};
|
||||
|
||||
private static int[] GetBlankIVTemplate() => new[] {-1, -1, -1, -1, -1, -1};
|
||||
|
@ -98,7 +98,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
254 => (int)rng.NextInt(3),
|
||||
255 => (int)rng.NextInt(2),
|
||||
_ => ability_param
|
||||
_ => ability_param,
|
||||
};
|
||||
abil <<= 1; // 1/2/4
|
||||
|
||||
|
@ -248,7 +248,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
254 => (int)rng.NextInt(3),
|
||||
255 => (int)rng.NextInt(2),
|
||||
_ => ability_param
|
||||
_ => ability_param,
|
||||
};
|
||||
pk.RefreshAbility(abil);
|
||||
|
||||
|
@ -257,7 +257,7 @@ namespace PKHeX.Core
|
|||
PersonalInfo.RatioMagicGenderless => 2,
|
||||
PersonalInfo.RatioMagicFemale => 1,
|
||||
PersonalInfo.RatioMagicMale => 0,
|
||||
_ => (int) rng.NextInt(252) + 1 < gender_ratio ? 1 : 0
|
||||
_ => (int) rng.NextInt(252) + 1 < gender_ratio ? 1 : 0,
|
||||
};
|
||||
|
||||
int nature;
|
||||
|
|
|
@ -68,7 +68,7 @@ namespace PKHeX.Core
|
|||
/// </summary>
|
||||
private static readonly HashSet<int> Types_Gen1 = new()
|
||||
{
|
||||
0, 1, 2, 3, 4, 5, 7, 8, 20, 21, 22, 23, 24, 25, 26
|
||||
0, 1, 2, 3, 4, 5, 7, 8, 20, 21, 22, 23, 24, 25, 26,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace PKHeX.Core
|
|||
6 => ReleasedHeldItems_6,
|
||||
7 => ReleasedHeldItems_7,
|
||||
8 => ReleasedHeldItems_8,
|
||||
_ => Array.Empty<bool>()
|
||||
_ => Array.Empty<bool>(),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace PKHeX.Core
|
|||
4 => country is 144 or 160, // China
|
||||
5 => country is 136, // Korea
|
||||
6 => country is 144 or 128, // Taiwan
|
||||
_ => false
|
||||
_ => false,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -264,7 +264,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
0 => new MemoryVariableSet(LegalityCheckStrings.L_XOT, pkm.OT_Memory, pkm.OT_TextVar, pkm.OT_Intensity, pkm.OT_Feeling), // OT
|
||||
1 => new MemoryVariableSet(LegalityCheckStrings.L_XHT, pkm.HT_Memory, pkm.HT_TextVar, pkm.HT_Intensity, pkm.HT_Feeling), // HT
|
||||
_ => new MemoryVariableSet(LegalityCheckStrings.L_XOT, 0, 0, 0, 0)
|
||||
_ => new MemoryVariableSet(LegalityCheckStrings.L_XOT, 0, 0, 0, 0),
|
||||
};
|
||||
|
||||
public bool Equals(MemoryVariableSet v) => v.Handler == Handler
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
Shiny.Never => !pkm.IsShiny,
|
||||
Shiny.AlwaysSquare => pkm.ShinyXor == 0,
|
||||
Shiny.AlwaysStar => pkm.ShinyXor == 1,
|
||||
_ => true
|
||||
_ => true,
|
||||
};
|
||||
|
||||
public static bool IsShiny(this Shiny s) => s switch
|
||||
|
@ -52,7 +52,7 @@
|
|||
Shiny.Always => true,
|
||||
Shiny.AlwaysSquare => true,
|
||||
Shiny.AlwaysStar => true,
|
||||
_ => false
|
||||
_ => false,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace PKHeX.Core
|
|||
(int)Darmanitan => form & 2,
|
||||
(int)Zygarde when format > 6 => 3,
|
||||
(int)Minior => form + 7,
|
||||
_ => 0
|
||||
_ => 0,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
@ -64,7 +64,7 @@ namespace PKHeX.Core
|
|||
(int)Kyurem when form != 0 && format >= 5 => true,
|
||||
(int)Necrozma when form != 0 && format >= 7 => true,
|
||||
(int)Calyrex when form != 0 && format >= 8 => true,
|
||||
_ => false
|
||||
_ => false,
|
||||
};
|
||||
|
||||
/// <summary>Checks if the form may be different than the original encounter detail.</summary>
|
||||
|
@ -254,7 +254,7 @@ namespace PKHeX.Core
|
|||
Scatterbug => form <= Vivillon3DS.MaxWildFormID, // Vivillon Pre-evolutions
|
||||
Spewpa => form <= Vivillon3DS.MaxWildFormID, // Vivillon Pre-evolutions
|
||||
|
||||
_ => false
|
||||
_ => false,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -103,14 +103,14 @@
|
|||
3 => LinkTrade3NPC,
|
||||
4 => LinkTrade4NPC,
|
||||
5 => LinkTrade5NPC,
|
||||
_ => LinkTrade6NPC
|
||||
_ => LinkTrade6NPC,
|
||||
};
|
||||
|
||||
public static int TradedEggLocation(int generation) => generation switch
|
||||
{
|
||||
4 => LinkTrade4,
|
||||
5 => LinkTrade5,
|
||||
_ => LinkTrade6
|
||||
_ => LinkTrade6,
|
||||
};
|
||||
|
||||
public static bool IsPtHGSSLocation(int location) => location is > 111 and < 2000;
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace PKHeX.Core
|
|||
0xE6CC, 0xE90A, 0xE95D, 0xE991, 0xEBB2,
|
||||
|
||||
0xEE7F, 0xEE9F, 0xEFC8, 0xF0E4, 0xFE4E,
|
||||
0xFE9D
|
||||
0xFE9D,
|
||||
};
|
||||
|
||||
private const int FramesPerMew = 5;
|
||||
|
|
|
@ -126,7 +126,7 @@ namespace PKHeX.Core
|
|||
6 => VerifyAbility6(data, enc),
|
||||
7 => VerifyAbility7(data, enc),
|
||||
>=8 => VALID,
|
||||
_ => CheckMatch(data.pkm, abilities, gen, AbilityState.CanMismatch, enc)
|
||||
_ => CheckMatch(data.pkm, abilities, gen, AbilityState.CanMismatch, enc),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -340,7 +340,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
EncounterSlot5 w when pkm.AbilityNumber == 4 != w.IsHiddenGrotto => GetInvalid(w.IsHiddenGrotto ? LAbilityMismatchGrotto : LAbilityHiddenFail),
|
||||
EncounterEgg e when pkm.AbilityNumber == 4 && AbilityBreedLegality.BanHidden5.Contains(e.Species) => GetInvalid(LAbilityHiddenUnavailable),
|
||||
_ => CheckMatch(data.pkm, abilities, 5, pkm.Format == 5 ? AbilityState.MustMatch : AbilityState.CanMismatch, enc)
|
||||
_ => CheckMatch(data.pkm, abilities, 5, pkm.Format == 5 ? AbilityState.MustMatch : AbilityState.CanMismatch, enc),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -360,7 +360,7 @@ namespace PKHeX.Core
|
|||
EncounterSlot => GetInvalid(LAbilityMismatchHordeSafari),
|
||||
|
||||
EncounterEgg egg when AbilityBreedLegality.BanHidden6.Contains(egg.Species | (egg.Form << 11)) => GetInvalid(LAbilityHiddenUnavailable),
|
||||
_ => VALID
|
||||
_ => VALID,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -374,7 +374,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
EncounterSlot7 {IsSOS: false} => GetInvalid(LAbilityMismatchSOS),
|
||||
EncounterEgg egg when AbilityBreedLegality.BanHidden7.Contains(egg.Species | (egg.Form << 11)) => GetInvalid(LAbilityHiddenUnavailable),
|
||||
_ => VALID
|
||||
_ => VALID,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -471,7 +471,7 @@ namespace PKHeX.Core
|
|||
(int)Species.Tornadus => true, // Form-0 is a/a/h
|
||||
(int)Species.Thundurus => true, // Form-0 is a/a/h
|
||||
(int)Species.Landorus => true, // Form-0 is a/a/h
|
||||
_ => false
|
||||
_ => false,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -479,7 +479,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
EncounterStatic s => s.Ability,
|
||||
EncounterTrade t => t.Ability,
|
||||
_ => -1
|
||||
_ => -1,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -889,7 +889,7 @@ namespace PKHeX.Core
|
|||
(int)Flabébé + (3 << 11), // Flabébé-Blue
|
||||
};
|
||||
|
||||
internal static readonly HashSet<int> AlolanCaptureNoHeavyBall = new() { (int)Beldum, (int)TapuKoko, (int)TapuLele, (int)TapuBulu, (int)TapuFini, };
|
||||
internal static readonly HashSet<int> AlolanCaptureNoHeavyBall = new() { (int)Beldum, (int)TapuKoko, (int)TapuLele, (int)TapuBulu, (int)TapuFini };
|
||||
|
||||
private static readonly HashSet<int> Inherit_ApricornMale7 = new()
|
||||
{
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace PKHeX.Core
|
|||
6 => WildPokeballs6,
|
||||
7 => GameVersion.Gen7b.Contains(game) ? WildPokeballs7b : WildPokeballs7,
|
||||
8 => GameVersion.GO == game ? WildPokeballs8g : WildPokeballs8,
|
||||
_ => Array.Empty<int>()
|
||||
_ => Array.Empty<int>(),
|
||||
};
|
||||
|
||||
private static readonly int[] WildPokeBalls1 = { 4 };
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace PKHeX.Core
|
|||
EncounterSlot w => VerifyBallWild(data, w),
|
||||
EncounterEgg => VerifyBallEgg(data),
|
||||
EncounterInvalid => VerifyBallEquals(data, pkm.Ball), // ignore ball, pass whatever
|
||||
_ => VerifyBallEquals(data, (int)Poke)
|
||||
_ => VerifyBallEquals(data, (int)Poke),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ namespace PKHeX.Core
|
|||
(int)Poke => GetValid(LBallEnc), // Poké Ball
|
||||
(int)Master => GetInvalid(LBallEggMaster), // Master Ball
|
||||
(int)Cherish => GetInvalid(LBallEggCherish), // Cherish Ball
|
||||
_ => VerifyBallInherited(data)
|
||||
_ => VerifyBallInherited(data),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ namespace PKHeX.Core
|
|||
6 => VerifyBallEggGen6(data), // Gen6 Inheritance Rules
|
||||
7 => VerifyBallEggGen7(data), // Gen7 Inheritance Rules
|
||||
8 => VerifyBallEggGen8(data),
|
||||
_ => NONE
|
||||
_ => NONE,
|
||||
};
|
||||
|
||||
private CheckResult VerifyBallEggGen6(LegalityAnalysis data)
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
(int)Species.Eevee => LockFinder.IsXDStarterValid(pidiv.OriginSeed, pkm.TID, pkm.SID),
|
||||
(int)Species.Espeon or (int)Species.Umbreon => pidiv.Type == PIDType.CXD_ColoStarter,
|
||||
_ => true
|
||||
_ => true,
|
||||
};
|
||||
if (!valid)
|
||||
data.AddLine(GetInvalid(LEncConditionBadRNGFrame, CheckIdentifier.PID));
|
||||
|
|
|
@ -252,28 +252,28 @@ namespace PKHeX.Core
|
|||
{
|
||||
not 0 when pkm.IsEgg => GetInvalid(LFormArgumentNotAllowed),
|
||||
> 9_999 => GetInvalid(LFormArgumentHigh),
|
||||
_ => GetValid(LFormArgumentValid)
|
||||
_ => GetValid(LFormArgumentValid),
|
||||
},
|
||||
Runerigus when enc.Species == (int)Runerigus => arg switch
|
||||
{
|
||||
not 0 => GetInvalid(LFormArgumentNotAllowed),
|
||||
_ => GetValid(LFormArgumentValid)
|
||||
_ => GetValid(LFormArgumentValid),
|
||||
},
|
||||
Runerigus => arg switch // From Yamask-1
|
||||
{
|
||||
< 49 => GetInvalid(LFormArgumentLow),
|
||||
> 9_999 => GetInvalid(LFormArgumentHigh),
|
||||
_ => GetValid(LFormArgumentValid)
|
||||
_ => GetValid(LFormArgumentValid),
|
||||
},
|
||||
Alcremie when enc.Species == (int)Alcremie => arg switch
|
||||
{
|
||||
not 0 => GetInvalid(LFormArgumentNotAllowed),
|
||||
_ => GetValid(LFormArgumentValid)
|
||||
_ => GetValid(LFormArgumentValid),
|
||||
},
|
||||
Alcremie => arg switch // From Milcery
|
||||
{
|
||||
> (uint) AlcremieDecoration.Ribbon => GetInvalid(LFormArgumentHigh),
|
||||
_ => GetValid(LFormArgumentValid)
|
||||
_ => GetValid(LFormArgumentValid),
|
||||
},
|
||||
_ => VerifyFormArgumentNone(pkm, f),
|
||||
};
|
||||
|
|
|
@ -81,7 +81,7 @@ namespace PKHeX.Core
|
|||
// Evolved from Azurill after transferring to keep gender
|
||||
(int) Species.Marill or (int) Species.Azumarill when pkm.Format >= 6 => pkm.Gender == 1 && (pkm.EncryptionConstant & 0xFF) > 0x3F,
|
||||
|
||||
_ => false
|
||||
_ => false,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -186,7 +186,7 @@ namespace PKHeX.Core
|
|||
WC7 wc7 when wc7.OT_Name.Length > 0 && wc7.TID != 18075 => false, // Ash Pikachu QR Gift doesn't set Current Handler
|
||||
WC8 wc8 when wc8.GetHasOT(pkm.Language) => false,
|
||||
WC8 {IsHOMEGift: true} => false,
|
||||
_ => true
|
||||
_ => true,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace PKHeX.Core
|
|||
EReaderBerryMatch.NoData => GetInvalid(LItemUnreleased),
|
||||
EReaderBerryMatch.InvalidUSA => GetInvalid(LEReaderAmerica),
|
||||
EReaderBerryMatch.InvalidJPN => GetInvalid(LEReaderJapan),
|
||||
_ => null
|
||||
_ => null,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace PKHeX.Core
|
|||
RibbonIndex.MarkMisty when pk.Met_Level < EncounterArea8.BoostLevel && EncounterArea8.IsBoostedArea60Fog(pk.Met_Location) => false,
|
||||
RibbonIndex.MarkDestiny => false,
|
||||
>= RibbonIndex.MarkCloudy and <= RibbonIndex.MarkMisty => IsWeatherPermitted(mark, x),
|
||||
_ => true
|
||||
_ => true,
|
||||
};
|
||||
|
||||
private static bool IsWeatherPermitted(RibbonIndex mark, IEncounterTemplate enc)
|
||||
|
|
|
@ -55,14 +55,14 @@ namespace PKHeX.Core
|
|||
private static bool IsUsedKeyItemUnspecific(int generation, int item) => generation switch
|
||||
{
|
||||
6 => Memories.KeyItemUsableObserve6.Contains((ushort)item),
|
||||
_ => false
|
||||
_ => false,
|
||||
};
|
||||
|
||||
private static bool IsUsedKeyItemSpecific(int generation, int item, int species) => generation switch
|
||||
{
|
||||
6 => Memories.KeyItemMemoryArgsGen6.TryGetValue(species, out var value) && value.Contains((ushort) item),
|
||||
8 => Memories.KeyItemMemoryArgsGen8.TryGetValue(species, out var value) && value.Contains((ushort) item),
|
||||
_ => false
|
||||
_ => false,
|
||||
};
|
||||
|
||||
public static bool CanBuyItem(int generation, int item, GameVersion version = GameVersion.Any)
|
||||
|
@ -199,16 +199,16 @@ namespace PKHeX.Core
|
|||
|
||||
GameVersion.AS => GetCanBeCaptured(species, SlotsA, StaticA),
|
||||
GameVersion.OR => GetCanBeCaptured(species, SlotsO, StaticO),
|
||||
_ => false
|
||||
_ => false,
|
||||
},
|
||||
8 => version switch
|
||||
{
|
||||
GameVersion.Any => GetCanBeCaptured(species, SlotsSW.Concat(SlotsSH), StaticSW.Concat(StaticSH)),
|
||||
GameVersion.SW => GetCanBeCaptured(species, SlotsSW, StaticSW),
|
||||
GameVersion.SH => GetCanBeCaptured(species, SlotsSH, StaticSH),
|
||||
_ => false
|
||||
_ => false,
|
||||
},
|
||||
_ => false
|
||||
_ => false,
|
||||
};
|
||||
|
||||
private static bool GetCanBeCaptured(int species, IEnumerable<EncounterArea> area, IEnumerable<EncounterStatic> statics)
|
||||
|
@ -229,7 +229,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
GameVersion.SW => DynamaxTrainer_SWSH.Contains(species) || IsDynamaxSW(species),
|
||||
GameVersion.SH => DynamaxTrainer_SWSH.Contains(species) || IsDynamaxSH(species),
|
||||
_ => DynamaxTrainer_SWSH.Contains(species) || IsDynamaxSW(species) || IsDynamaxSH(species)
|
||||
_ => DynamaxTrainer_SWSH.Contains(species) || IsDynamaxSW(species) || IsDynamaxSH(species),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace PKHeX.Core
|
|||
0 => (0x01FFFF03 & (1 << nature)) != 0, // MediumFast -- Can't be Brave, Adamant, Naughty, Bold, Docile, or Relaxed
|
||||
4 => (0x001FFFC0 & (1 << nature)) != 0, // Fast -- Can't be Gentle, Sassy, Careful, Quirky, Hardy, Lonely, Brave, Adamant, Naughty, or Bold
|
||||
5 => (0x01FFFCFF & (1 << nature)) != 0, // Slow -- Can't be Impish or Lax
|
||||
_ => true
|
||||
_ => true,
|
||||
};
|
||||
|
||||
private static void VerifyVCShinyXorIfShiny(LegalityAnalysis data)
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace PKHeX.Core
|
|||
WB7.SizeFull when ext == ".wb7full" => new WB7(data),
|
||||
WC6Full.Size when ext == ".wc6full" => new WC6Full(data).Gift,
|
||||
WC7Full.Size when ext == ".wc7full" => new WC7Full(data).Gift,
|
||||
_ => null
|
||||
_ => null,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
@ -59,7 +59,7 @@ namespace PKHeX.Core
|
|||
WC6.Size => BitConverter.ToUInt32(data, 0x4C) / 10000 < 2000 ? new WC7(data) : new WC6(data),
|
||||
// WC6Full/WC7Full: 0x205 has 3 * 0x46 for gen6, now only 2.
|
||||
WC6Full.Size => data[0x205] == 0 ? new WC7Full(data).Gift : new WC6Full(data).Gift,
|
||||
_ => null
|
||||
_ => null,
|
||||
};
|
||||
|
||||
public string Extension => GetType().Name.ToLowerInvariant();
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace PKHeX.Core
|
|||
AzureFlute = 10,
|
||||
PokétchApp = 11,
|
||||
Ribbon = 12,
|
||||
PokéWalkerArea = 14
|
||||
PokéWalkerArea = 14,
|
||||
}
|
||||
|
||||
public override string CardTitle { get => "Raw Gift (PGT)"; set { } }
|
||||
|
|
|
@ -178,7 +178,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
PIDType.BACD_R => seed & 0x0000FFFF, // u16
|
||||
PIDType.BACD_R_S => seed & 0x000000FF, // u8
|
||||
_ => seed
|
||||
_ => seed,
|
||||
};
|
||||
|
||||
private LanguageID GetSafeLanguage(LanguageID hatchLang)
|
||||
|
@ -207,7 +207,7 @@ namespace PKHeX.Core
|
|||
GameVersion.FRLG => GameVersion.FR + Util.Rand.Next(2), // or LG
|
||||
GameVersion.RS or GameVersion.RSE => GameVersion.S + Util.Rand.Next(2), // or R
|
||||
GameVersion.COLO or GameVersion.XD => GameVersion.CXD,
|
||||
_ => throw new Exception($"Unknown GameVersion: {version}")
|
||||
_ => throw new Exception($"Unknown GameVersion: {version}"),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
RestrictVersion = data[ofs],
|
||||
RestrictLanguage = data[ofs + 0x1FF],
|
||||
RawDate = WC6.SetDate((uint)date.Year, (uint)date.Month, (uint)date.Day)
|
||||
RawDate = WC6.SetDate((uint)date.Year, (uint)date.Month, (uint)date.Day),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
RestrictVersion = data[ofs],
|
||||
RestrictLanguage = data[ofs + 0x1FF],
|
||||
RawDate = WC7.SetDate((uint) date.Year, (uint) date.Month, (uint) date.Day)
|
||||
RawDate = WC7.SetDate((uint) date.Year, (uint) date.Month, (uint) date.Day),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ namespace PKHeX.Core
|
|||
2 => Shiny.AlwaysStar,
|
||||
3 => Shiny.AlwaysSquare,
|
||||
4 => Shiny.FixedValue,
|
||||
_ => throw new ArgumentException()
|
||||
_ => throw new ArgumentException(),
|
||||
};
|
||||
|
||||
public int MetLevel { get => Data[CardStart + 0x249]; set => Data[CardStart + 0x249] = (byte)value; }
|
||||
|
@ -511,7 +511,7 @@ namespace PKHeX.Core
|
|||
2 => (uint) (((tr.TID ^ tr.SID ^ (PID & 0xFFFF) ^ 1) << 16) | (PID & 0xFFFF)), // Fixed, Force Star
|
||||
3 => (uint) (((tr.TID ^ tr.SID ^ (PID & 0xFFFF) ^ 0) << 16) | (PID & 0xFFFF)), // Fixed, Force Square
|
||||
4 => PID, // Fixed, Force Value
|
||||
_ => throw new ArgumentException()
|
||||
_ => throw new ArgumentException(),
|
||||
};
|
||||
|
||||
static uint GetAntishiny(ITrainerID tr)
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
private static readonly ushort[] Unused =
|
||||
{
|
||||
0x42, 0x43, 0x5E, 0x63, 0x64, 0x65, 0x66, 0x67, 0x87
|
||||
0x42, 0x43, 0x5E, 0x63, 0x64, 0x65, 0x66, 0x67, 0x87,
|
||||
};
|
||||
|
||||
public override IReadOnlyList<ushort> ExtraBytes => Unused;
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
private static readonly ushort[] Unused =
|
||||
{
|
||||
0x2A, 0x2B
|
||||
0x2A, 0x2B,
|
||||
};
|
||||
|
||||
public override int SIZE_PARTY => PokeCrypto.SIZE_3PARTY;
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
private static readonly ushort[] Unused =
|
||||
{
|
||||
0x42, 0x43, 0x5E, 0x63, 0x64, 0x65, 0x66, 0x67, 0x87
|
||||
0x42, 0x43, 0x5E, 0x63, 0x64, 0x65, 0x66, 0x67, 0x87,
|
||||
};
|
||||
|
||||
public override IReadOnlyList<ushort> ExtraBytes => Unused;
|
||||
|
@ -374,7 +374,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
OT_Friendship = 70,
|
||||
// Apply new met date
|
||||
MetDate = moment
|
||||
MetDate = moment,
|
||||
};
|
||||
|
||||
// Arceus Type Changing -- Plate forcibly removed.
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace PKHeX.Core
|
|||
private static readonly ushort[] Unused =
|
||||
{
|
||||
0x36, 0x37, // Unused Ribbons
|
||||
0x58, 0x59, 0x73, 0x90, 0x91, 0x9E, 0x9F, 0xA0, 0xA1, 0xA7, 0xAA, 0xAB, 0xAC, 0xAD, 0xC8, 0xC9, 0xD7, 0xE4, 0xE5, 0xE6, 0xE7
|
||||
0x58, 0x59, 0x73, 0x90, 0x91, 0x9E, 0x9F, 0xA0, 0xA1, 0xA7, 0xAA, 0xAB, 0xAC, 0xAD, 0xC8, 0xC9, 0xD7, 0xE4, 0xE5, 0xE6, 0xE7,
|
||||
};
|
||||
|
||||
public override IReadOnlyList<ushort> ExtraBytes => Unused;
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
0x2A, // Old Marking Value (PelagoEventStatus)
|
||||
// 0x36, 0x37, // Unused Ribbons
|
||||
0x58, 0x59, 0x73, 0x90, 0x91, 0x9E, 0x9F, 0xA0, 0xA1, 0xA7, 0xAA, 0xAB, 0xAC, 0xAD, 0xC8, 0xC9, 0xD7, 0xE4, 0xE5, 0xE6, 0xE7
|
||||
0x58, 0x59, 0x73, 0x90, 0x91, 0x9E, 0x9F, 0xA0, 0xA1, 0xA7, 0xAA, 0xAB, 0xAC, 0xAD, 0xC8, 0xC9, 0xD7, 0xE4, 0xE5, 0xE6, 0xE7,
|
||||
};
|
||||
|
||||
public override IReadOnlyList<ushort> ExtraBytes => Unused;
|
||||
|
|
|
@ -544,7 +544,7 @@ namespace PKHeX.Core
|
|||
6 => gen is >= 3 and <= 6,
|
||||
7 => gen is >= 3 and <= 7 || VC,
|
||||
8 => gen is >= 3 and <= 8 || VC,
|
||||
_ => false
|
||||
_ => false,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -643,7 +643,7 @@ namespace PKHeX.Core
|
|||
<= 90 => 0,
|
||||
<= 120 => 1,
|
||||
<= 150 => 2,
|
||||
_ => 3
|
||||
_ => 3,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
@ -821,7 +821,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
Shiny.AlwaysSquare => 0,
|
||||
Shiny.AlwaysStar => 1,
|
||||
_ => Util.Rand.Next(8)
|
||||
_ => Util.Rand.Next(8),
|
||||
};
|
||||
|
||||
SID = (int)xor ^ bits;
|
||||
|
@ -1002,7 +1002,7 @@ namespace PKHeX.Core
|
|||
1 => Move2 = value,
|
||||
2 => Move3 = value,
|
||||
3 => Move4 = value,
|
||||
_ => throw new IndexOutOfRangeException(nameof(index))
|
||||
_ => throw new IndexOutOfRangeException(nameof(index)),
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
@ -1044,7 +1044,7 @@ namespace PKHeX.Core
|
|||
3 => EV_SPE,
|
||||
4 => EV_SPA,
|
||||
5 => EV_SPD,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(index))
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(index)),
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
@ -1059,7 +1059,7 @@ namespace PKHeX.Core
|
|||
3 => IV_SPE,
|
||||
4 => IV_SPA,
|
||||
5 => IV_SPD,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(index))
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(index)),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -193,7 +193,7 @@ namespace PKHeX.Core.Searching
|
|||
1 or 2 => new[]
|
||||
{
|
||||
GameVersion.RD, GameVersion.BU, GameVersion.GN, GameVersion.YW,
|
||||
GameVersion.GD, GameVersion.SV, GameVersion.C
|
||||
GameVersion.GD, GameVersion.SV, GameVersion.C,
|
||||
},
|
||||
|
||||
_ when fallback.GetGeneration() == Generation => GameUtil.GetVersionsWithinRange(sav, Generation).ToArray(),
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace PKHeX.Core.Searching
|
|||
{
|
||||
<= 2 => pk.Format <= 2, // 1-2
|
||||
<= 6 => pk.Format >= 3, // 3-6
|
||||
_ => true
|
||||
_ => true,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ namespace PKHeX.Core.Searching
|
|||
SearchComparison.LessThanEquals => pk.Stat_Level <= level,
|
||||
SearchComparison.Equals => pk.Stat_Level == level,
|
||||
SearchComparison.GreaterThanEquals => pk.Stat_Level >= level,
|
||||
_ => true
|
||||
_ => true,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ namespace PKHeX.Core.Searching
|
|||
2 => pk.EVTotal is (not 0) and < 128, // Some (127-1)
|
||||
3 => pk.EVTotal is >= 128 and < 508, // Half (128-507)
|
||||
4 => pk.EVTotal >= 508, // Full (508+)
|
||||
_ => true
|
||||
_ => true,
|
||||
};
|
||||
|
||||
public static bool SatisfiesFilterIVs(PKM pk, int option) => option switch
|
||||
|
@ -65,7 +65,7 @@ namespace PKHeX.Core.Searching
|
|||
4 => pk.IVTotal is > 150 and < 180, // 151-179
|
||||
5 => pk.IVTotal >= 180, // 180+
|
||||
6 => pk.IVTotal == 186, // == 186
|
||||
_ => true
|
||||
_ => true,
|
||||
};
|
||||
|
||||
public static bool SatisfiesFilterMoves(PKM pk, IEnumerable<int> requiredMoves)
|
||||
|
@ -93,14 +93,14 @@ namespace PKHeX.Core.Searching
|
|||
{
|
||||
1 => $"{pk.Species:000}{((PK1) pk).DV16:X4}",
|
||||
2 => $"{pk.Species:000}{((PK2) pk).DV16:X4}",
|
||||
_ => $"{pk.Species:000}{pk.PID:X8}{string.Join(" ", pk.IVs)}{pk.Form:00}"
|
||||
_ => $"{pk.Species:000}{pk.PID:X8}{string.Join(" ", pk.IVs)}{pk.Form:00}",
|
||||
};
|
||||
|
||||
public static string HashByPID(PKM pk) => pk.Format switch
|
||||
{
|
||||
1 => $"{((PK1) pk).DV16:X4}",
|
||||
2 => $"{((PK2) pk).DV16:X4}",
|
||||
_ => $"{pk.PID:X8}"
|
||||
_ => $"{pk.PID:X8}",
|
||||
};
|
||||
|
||||
public static IEnumerable<PKM> GetClones(IEnumerable<PKM> res, CloneDetectionMethod type = CloneDetectionMethod.HashDetails)
|
||||
|
|
|
@ -90,7 +90,7 @@ namespace PKHeX.Core
|
|||
PersonalInfo.RatioMagicGenderless => 2,
|
||||
PersonalInfo.RatioMagicFemale => 1,
|
||||
PersonalInfo.RatioMagicMale => 0,
|
||||
_ => IV_ATK > gv >> 4 ? 0 : 1
|
||||
_ => IV_ATK > gv >> 4 ? 0 : 1,
|
||||
};
|
||||
}
|
||||
set { }
|
||||
|
|
|
@ -52,7 +52,7 @@ namespace PKHeX.Core
|
|||
|
||||
public static readonly byte[] ValidTileTypes =
|
||||
{
|
||||
(byte)None, (byte)Sand, (byte)Grass, (byte)Rock, (byte)Cave, (byte)Water, (byte)Building, (byte)Marsh, (byte)Max_DP, (byte)Distortion, (byte)Max_Pt
|
||||
(byte)None, (byte)Sand, (byte)Grass, (byte)Rock, (byte)Cave, (byte)Water, (byte)Building, (byte)Marsh, (byte)Max_DP, (byte)Distortion, (byte)Max_Pt,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -88,7 +88,7 @@ namespace PKHeX.Core
|
|||
3 => pk.AV_SPE = value,
|
||||
4 => pk.AV_SPA = value,
|
||||
5 => pk.AV_SPD = value,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(index))
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(index)),
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
@ -104,7 +104,7 @@ namespace PKHeX.Core
|
|||
3 => pk.AV_SPE,
|
||||
4 => pk.AV_SPA,
|
||||
5 => pk.AV_SPD,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(index))
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(index)),
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
stats.CNT_Cute,
|
||||
stats.CNT_Smart,
|
||||
stats.CNT_Tough,
|
||||
stats.CNT_Sheen
|
||||
stats.CNT_Sheen,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -123,6 +123,6 @@
|
|||
{
|
||||
Valid,
|
||||
CountryAfterPreviousEmpty,
|
||||
RegionWithoutCountry
|
||||
RegionWithoutCountry,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ namespace PKHeX.Core
|
|||
(int)Species.Copperajah,
|
||||
(int)Species.Kingler,
|
||||
(int)Species.Centiskorch,
|
||||
(int)Species.Urshifu
|
||||
(int)Species.Urshifu,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace PKHeX.Core
|
|||
3 => t.HT_SPE ^= true,
|
||||
4 => t.HT_SPA ^= true,
|
||||
5 => t.HT_SPD ^= true,
|
||||
_ => false
|
||||
_ => false,
|
||||
};
|
||||
|
||||
public static bool IsHyperTrainedAll(this IHyperTrain t) => t.HyperTrainFlags == 0x3F;
|
||||
|
@ -49,7 +49,7 @@ namespace PKHeX.Core
|
|||
3 => t.HT_SPE,
|
||||
4 => t.HT_SPA,
|
||||
5 => t.HT_SPD,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(index))
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(index)),
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
PokeSize.AV => Util.Rand.Next(0xA0) + 0x30,
|
||||
PokeSize.L => Util.Rand.Next(0x20) + 0xD0,
|
||||
PokeSize.XL => Util.Rand.Next(0x10) + 0xF0,
|
||||
_ => GetRandomScalar()
|
||||
_ => GetRandomScalar(),
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -277,7 +277,7 @@ namespace PKHeX.Core
|
|||
{0xFC, '6'},
|
||||
{0xFD, '7'},
|
||||
{0xFE, '8'},
|
||||
{0xFF, '9'}
|
||||
{0xFF, '9'},
|
||||
};
|
||||
|
||||
private static readonly Dictionary<byte, char> RBY2U_J = new()
|
||||
|
@ -450,7 +450,7 @@ namespace PKHeX.Core
|
|||
{0xFC, '6'},
|
||||
{0xFD, '7'},
|
||||
{0xFE, '8'},
|
||||
{0xFF, '9'}
|
||||
{0xFF, '9'},
|
||||
};
|
||||
|
||||
internal static readonly Dictionary<char, byte> U2RBY_U = new()
|
||||
|
@ -572,7 +572,7 @@ namespace PKHeX.Core
|
|||
{'6', 0xFC},
|
||||
{'7', 0xFD},
|
||||
{'8', 0xFE},
|
||||
{'9', 0xFF}
|
||||
{'9', 0xFF},
|
||||
};
|
||||
|
||||
private static readonly Dictionary<char, byte> U2RBY_J = new()
|
||||
|
@ -749,7 +749,7 @@ namespace PKHeX.Core
|
|||
{'6', 0xFC},
|
||||
{'7', 0xFD},
|
||||
{'8', 0xFE},
|
||||
{'9', 0xFF}
|
||||
{'9', 0xFF},
|
||||
};
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -167,7 +167,7 @@ namespace PKHeX.Core
|
|||
':', 'Ä', 'Ö', 'Ü', 'ä', 'ö', 'ü', // F
|
||||
|
||||
// Make the total length 256 so that any byte access is always within the array
|
||||
Terminator, Terminator, Terminator, Terminator, Terminator, Terminator, Terminator, Terminator, Terminator
|
||||
Terminator, Terminator, Terminator, Terminator, Terminator, Terminator, Terminator, Terminator, Terminator,
|
||||
};
|
||||
|
||||
private static readonly char[] G3_JP =
|
||||
|
@ -190,7 +190,7 @@ namespace PKHeX.Core
|
|||
':', 'Ä', 'Ö', 'Ü', 'ä', 'ö', 'ü', // F
|
||||
|
||||
// Make the total length 256 so that any byte access is always within the array
|
||||
Terminator, Terminator, Terminator, Terminator, Terminator, Terminator, Terminator, Terminator, Terminator
|
||||
Terminator, Terminator, Terminator, Terminator, Terminator, Terminator, Terminator, Terminator, Terminator,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
{
|
||||
PK1 pk1 => new PokeList1(pk1).Write(),
|
||||
PK2 pk2 => new PokeList2(pk2).Write(),
|
||||
_ => gb.Data
|
||||
_ => gb.Data,
|
||||
};
|
||||
var checksum = Checksums.CRC16_CCITT(raw);
|
||||
return $"{gb.Species:000}{form}{star} - {gb.Nickname} - {checksum:X4}";
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace PKHeX.Core
|
|||
<= Legal.MaxSpeciesID_5 => GetFormsGen5(species, types, forms, generation),
|
||||
<= Legal.MaxSpeciesID_6 => GetFormsGen6(species, types, forms, genders),
|
||||
<= Legal.MaxSpeciesID_7_USUM => GetFormsGen7(species, types, forms),
|
||||
_ => GetFormsGen8(species, types, forms, genders)
|
||||
_ => GetFormsGen8(species, types, forms, genders),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ namespace PKHeX.Core
|
|||
Weezing or Ponyta or Rapidash or Slowpoke or MrMime or Farfetchd
|
||||
or Articuno or Zapdos or Moltres when generation >= 8 => GetFormsGalar(types, forms),
|
||||
|
||||
_ => GetFormsAlolan(generation, types, forms, species)
|
||||
_ => GetFormsAlolan(generation, types, forms, species),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ namespace PKHeX.Core
|
|||
Pichu when generation == 4 => GetFormsPichu(types, forms),
|
||||
Slowking or Corsola when generation >= 8 => GetFormsGalar(types, forms),
|
||||
Unown => GetFormsUnown(generation),
|
||||
_ => EMPTY
|
||||
_ => EMPTY,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ namespace PKHeX.Core
|
|||
forms[903], // Defense
|
||||
forms[904], // Speed
|
||||
},
|
||||
_ => EMPTY
|
||||
_ => EMPTY,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -436,7 +436,7 @@ namespace PKHeX.Core
|
|||
or Exeggutor
|
||||
or Marowak => new[] {
|
||||
types[000],
|
||||
forms[810] // Alolan
|
||||
forms[810], // Alolan
|
||||
},
|
||||
_ => EMPTY,
|
||||
};
|
||||
|
@ -523,7 +523,7 @@ namespace PKHeX.Core
|
|||
types[13],
|
||||
types[14],
|
||||
types[15],
|
||||
types[16] // No Fairy Type
|
||||
types[16], // No Fairy Type
|
||||
},
|
||||
5 => new[] {
|
||||
types[00], // Normal
|
||||
|
@ -542,7 +542,7 @@ namespace PKHeX.Core
|
|||
types[13],
|
||||
types[14],
|
||||
types[15],
|
||||
types[16] // No Fairy type
|
||||
types[16], // No Fairy type
|
||||
},
|
||||
_ => new[] {
|
||||
types[00], // Normal
|
||||
|
@ -620,7 +620,7 @@ namespace PKHeX.Core
|
|||
"U", "V", "W", "X", "Y",
|
||||
"Z",
|
||||
"!", "?",
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -740,7 +740,7 @@ namespace PKHeX.Core
|
|||
public static string[] GetFormArgumentStrings(int species) => species switch
|
||||
{
|
||||
(int)Alcremie => Enum.GetNames(typeof(AlcremieDecoration)),
|
||||
_ => EMPTY
|
||||
_ => EMPTY,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -198,7 +198,7 @@ namespace PKHeX.Core
|
|||
1 => 0,
|
||||
2 => (byte) srcItem,
|
||||
3 => GetItemOld3((ushort) srcItem),
|
||||
_ => srcItem
|
||||
_ => srcItem,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue