diff --git a/PKHeX.Core/Editing/PKM/QR/QRPK7.cs b/PKHeX.Core/Editing/PKM/QR/QRPK7.cs index c58718055..876fcb444 100644 --- a/PKHeX.Core/Editing/PKM/QR/QRPK7.cs +++ b/PKHeX.Core/Editing/PKM/QR/QRPK7.cs @@ -11,7 +11,7 @@ public sealed class QRPK7(Memory Raw) : IEncounterInfo public const int SIZE = 0x30; private Span Data => Raw.Span; - public bool EggEncounter => false; + public bool IsEgg => false; public byte LevelMin => Level; public byte LevelMax => Level; public byte Generation => Version.GetGeneration(); diff --git a/PKHeX.Core/Legality/Bulk/DuplicateGiftChecker.cs b/PKHeX.Core/Legality/Bulk/DuplicateGiftChecker.cs index b8a212ea6..07fb8505d 100644 --- a/PKHeX.Core/Legality/Bulk/DuplicateGiftChecker.cs +++ b/PKHeX.Core/Legality/Bulk/DuplicateGiftChecker.cs @@ -21,7 +21,7 @@ private static void CheckDuplicateOwnedGifts(BulkAnalysis input) var dupes = combined.Where(z => z.Analysis.Info.Generation >= 3 - && z.Analysis.EncounterMatch is MysteryGift { EggEncounter: true } && !z.Slot.Entity.WasTradedEgg) + && z.Analysis.EncounterMatch is MysteryGift { IsEgg: true } && !z.Slot.Entity.WasTradedEgg) .GroupBy(z => ((MysteryGift)z.Analysis.EncounterMatch).CardTitle); foreach (var dupe in dupes) diff --git a/PKHeX.Core/Legality/Bulk/DuplicateTrainerChecker.cs b/PKHeX.Core/Legality/Bulk/DuplicateTrainerChecker.cs index b23683fac..5b39bd67c 100644 --- a/PKHeX.Core/Legality/Bulk/DuplicateTrainerChecker.cs +++ b/PKHeX.Core/Legality/Bulk/DuplicateTrainerChecker.cs @@ -93,9 +93,9 @@ private static bool IsSharedVersion(PKM pp, LegalityAnalysis pa, PKM cp, Legalit // Gen3/4 traded eggs do not have an Egg Location, and do not update the Version upon hatch. // These eggs can obtain another trainer's TID16/SID16/OT and be valid with a different version ID. - if (pa.EncounterMatch.EggEncounter && IsTradedEggVersionNoUpdate(pp, pa)) + if (pa.EncounterMatch.IsEgg && IsTradedEggVersionNoUpdate(pp, pa)) return false; // version doesn't update on trade - if (ca.EncounterMatch.EggEncounter && IsTradedEggVersionNoUpdate(cp, ca)) + if (ca.EncounterMatch.IsEgg && IsTradedEggVersionNoUpdate(cp, ca)) return false; // version doesn't update on trade static bool IsTradedEggVersionNoUpdate(PKM pk, LegalityAnalysis la) => la.Info.Generation switch diff --git a/PKHeX.Core/Legality/Encounters/Data/Gen2/Encounters2.cs b/PKHeX.Core/Legality/Encounters/Data/Gen2/Encounters2.cs index 4ee955722..b3507702d 100644 --- a/PKHeX.Core/Legality/Encounters/Data/Gen2/Encounters2.cs +++ b/PKHeX.Core/Legality/Encounters/Data/Gen2/Encounters2.cs @@ -21,7 +21,7 @@ internal static class Encounters2 new(155, 05, GSC) { Location = 001 }, // Cyndaquil @ New Bark Town new(158, 05, GSC) { Location = 001 }, // Totodile @ New Bark Town - new(175, 05, GSC) { Location = 000, EggEncounter = true }, // Togepi + new(175, 05, GSC) { Location = 000, IsEgg = true }, // Togepi new(131, 20, GSC) { Location = 010 }, // Lapras @ Union Cave new(133, 20, GSC) { Location = 016 }, // Eevee @ Goldenrod City @@ -95,13 +95,13 @@ internal static class Encounters2 public static readonly EncounterStatic2[] StaticOddEggC = [ - new(172, 05, C) { EggEncounter = true, Moves = new((int)Move.ThunderShock,(int)Move.Charm, (int)Move.DizzyPunch)}, // Pichu - new(173, 05, C) { EggEncounter = true, Moves = new((int)Move.Pound, (int)Move.Charm, (int)Move.DizzyPunch)}, // Cleffa - new(174, 05, C) { EggEncounter = true, Moves = new((int)Move.Sing, (int)Move.Charm, (int)Move.DizzyPunch)}, // Igglybuff - new(236, 05, C) { EggEncounter = true, Moves = new((int)Move.Tackle, (int)Move.DizzyPunch)}, // Tyrogue - new(238, 05, C) { EggEncounter = true, Moves = new((int)Move.Pound, (int)Move.Lick, (int)Move.DizzyPunch)}, // Smoochum - new(239, 05, C) { EggEncounter = true, Moves = new((int)Move.QuickAttack, (int)Move.Leer, (int)Move.DizzyPunch)}, // Elekid - new(240, 05, C) { EggEncounter = true, Moves = new((int)Move.Ember, (int)Move.DizzyPunch)}, // Magby + new(172, 05, C) { IsEgg = true, Moves = new((int)Move.ThunderShock,(int)Move.Charm, (int)Move.DizzyPunch)}, // Pichu + new(173, 05, C) { IsEgg = true, Moves = new((int)Move.Pound, (int)Move.Charm, (int)Move.DizzyPunch)}, // Cleffa + new(174, 05, C) { IsEgg = true, Moves = new((int)Move.Sing, (int)Move.Charm, (int)Move.DizzyPunch)}, // Igglybuff + new(236, 05, C) { IsEgg = true, Moves = new((int)Move.Tackle, (int)Move.DizzyPunch)}, // Tyrogue + new(238, 05, C) { IsEgg = true, Moves = new((int)Move.Pound, (int)Move.Lick, (int)Move.DizzyPunch)}, // Smoochum + new(239, 05, C) { IsEgg = true, Moves = new((int)Move.QuickAttack, (int)Move.Leer, (int)Move.DizzyPunch)}, // Elekid + new(240, 05, C) { IsEgg = true, Moves = new((int)Move.Ember, (int)Move.DizzyPunch)}, // Magby ]; internal static readonly EncounterStatic2 CelebiVC = new(251, 30, C) { Location = 014 }; // Celebi @ Ilex Forest (VC) diff --git a/PKHeX.Core/Legality/Encounters/Data/Gen3/Encounters3FRLG.cs b/PKHeX.Core/Legality/Encounters/Data/Gen3/Encounters3FRLG.cs index 98e383441..5bbc9e224 100644 --- a/PKHeX.Core/Legality/Encounters/Data/Gen3/Encounters3FRLG.cs +++ b/PKHeX.Core/Legality/Encounters/Data/Gen3/Encounters3FRLG.cs @@ -42,7 +42,7 @@ internal static class Encounters3FRLG new(129, 05, FRLG) { FixedBall = Ball.Poke, Location = 099 }, // Magikarp @ Route 4 new(131, 25, FRLG) { FixedBall = Ball.Poke, Location = 134 }, // Lapras @ Silph Co. new(133, 25, FRLG) { FixedBall = Ball.Poke, Location = 094 }, // Eevee @ Celadon City - new(175, 05, FRLG) { FixedBall = Ball.Poke, Location = 253, EggEncounter = true, Moves = new(045,204,118) }, // Togepi Egg + new(175, 05, FRLG) { FixedBall = Ball.Poke, Location = 253, IsEgg = true, Moves = new(045,204,118) }, // Togepi Egg // Stationary new(143, 30, FRLG) { Location = 112 }, // Snorlax @ Route 12 diff --git a/PKHeX.Core/Legality/Encounters/Data/Gen3/Encounters3RSE.cs b/PKHeX.Core/Legality/Encounters/Data/Gen3/Encounters3RSE.cs index 0f4ff4325..53d566abb 100644 --- a/PKHeX.Core/Legality/Encounters/Data/Gen3/Encounters3RSE.cs +++ b/PKHeX.Core/Legality/Encounters/Data/Gen3/Encounters3RSE.cs @@ -56,7 +56,7 @@ private static EncounterArea3[] GetSwarm([ConstantExpected] string resource, [Le // Gift new(351, 25, RSE) { FixedBall = Ball.Poke, Location = 034 }, // Castform @ Weather Institute new(374, 05, RSE) { FixedBall = Ball.Poke, Location = 013 }, // Beldum @ Mossdeep City - new(360, 05, RSE) { FixedBall = Ball.Poke, Location = 253, EggEncounter = true }, // Wynaut Egg + new(360, 05, RSE) { FixedBall = Ball.Poke, Location = 253, IsEgg = true }, // Wynaut Egg // Stationary new(352, 30, RSE) { Location = 034 }, // Kecleon @ Route 119 diff --git a/PKHeX.Core/Legality/Encounters/Generator/Moveset/EncounterMovesetGenerator.cs b/PKHeX.Core/Legality/Encounters/Generator/Moveset/EncounterMovesetGenerator.cs index 4057f07d6..0e8a69f3d 100644 --- a/PKHeX.Core/Legality/Encounters/Generator/Moveset/EncounterMovesetGenerator.cs +++ b/PKHeX.Core/Legality/Encounters/Generator/Moveset/EncounterMovesetGenerator.cs @@ -196,7 +196,7 @@ private static bool IsPlausibleSmeargleMoveset(EntityContext context, ReadOnlySp private readonly record struct NeededEncounter(EntityContext Context, byte Generation, GameVersion Version) : IEncounterTemplate { - public bool EggEncounter => false; + public bool IsEgg => false; public byte LevelMin => 0; public byte LevelMax => 0; diff --git a/PKHeX.Core/Legality/Encounters/Templates/GO/EncounterSlot7GO.cs b/PKHeX.Core/Legality/Encounters/Templates/GO/EncounterSlot7GO.cs index 497233ef2..60c829451 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/GO/EncounterSlot7GO.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/GO/EncounterSlot7GO.cs @@ -12,7 +12,7 @@ public sealed record EncounterSlot7GO(int StartDate, int EndDate, ushort Species public byte Generation => 7; public EntityContext Context => EntityContext.Gen7b; public Ball FixedBall => Ball.None; // GO Park can override the ball; obey capture rules for LGP/E - public bool EggEncounter => false; + public bool IsEgg => false; public AbilityPermission Ability => AbilityPermission.Any12; public bool IsShiny => Shiny.IsShiny(); public ushort EggLocation => 0; diff --git a/PKHeX.Core/Legality/Encounters/Templates/GO/EncounterSlot8GO.cs b/PKHeX.Core/Legality/Encounters/Templates/GO/EncounterSlot8GO.cs index a2197479d..13a82f841 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/GO/EncounterSlot8GO.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/GO/EncounterSlot8GO.cs @@ -14,7 +14,7 @@ public sealed record EncounterSlot8GO(int StartDate, int EndDate, ushort Species public bool IsDateRestricted => true; public bool IsShiny => Shiny.IsShiny(); public Ball FixedBall => Type.GetValidBall(); - public bool EggEncounter => false; + public bool IsEgg => false; public AbilityPermission Ability => AbilityPermission.Any12; public ushort EggLocation => 0; public GameVersion Version => GameVersion.GO; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen1/EncounterGift1.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen1/EncounterGift1.cs index f23eaba31..38942d087 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen1/EncounterGift1.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen1/EncounterGift1.cs @@ -14,7 +14,7 @@ public sealed record EncounterGift1 : IEncounterable, IEncounterMatch, IEncounte public byte Generation => 1; public EntityContext Context => EntityContext.Gen1; - public bool EggEncounter => false; + public bool IsEgg => false; public ushort EggLocation => 0; public Ball FixedBall => Ball.Poke; public AbilityPermission Ability => AbilityPermission.OnlyHidden; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen1/EncounterSlot1.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen1/EncounterSlot1.cs index 6fb938546..2bc33d408 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen1/EncounterSlot1.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen1/EncounterSlot1.cs @@ -8,7 +8,7 @@ public sealed record EncounterSlot1(EncounterArea1 Parent, ushort Species, byte { public byte Generation => 1; public EntityContext Context => EntityContext.Gen1; - public bool EggEncounter => false; + public bool IsEgg => false; public Ball FixedBall => Ball.Poke; public AbilityPermission Ability => TransporterLogic.IsHiddenDisallowedVC1(Species) ? AbilityPermission.OnlyFirst : AbilityPermission.OnlyHidden; public Shiny Shiny => Shiny.Random; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen1/EncounterStatic1.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen1/EncounterStatic1.cs index ceb114212..9b1325f2a 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen1/EncounterStatic1.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen1/EncounterStatic1.cs @@ -8,7 +8,7 @@ public sealed record EncounterStatic1(ushort Species, byte Level, GameVersion Ve { public byte Generation => 1; public EntityContext Context => EntityContext.Gen1; - public bool EggEncounter => false; + public bool IsEgg => false; public ushort EggLocation => 0; public Ball FixedBall => Ball.Poke; public AbilityPermission Ability => AbilityPermission.OnlyHidden; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen1/EncounterTrade1.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen1/EncounterTrade1.cs index 0b6c240f1..9844ff1a8 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen1/EncounterTrade1.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen1/EncounterTrade1.cs @@ -13,7 +13,7 @@ public sealed record EncounterTrade1 : IEncounterable, IEncounterMatch, IFixedTr { public byte Generation => 1; public EntityContext Context => EntityContext.Gen1; - public bool EggEncounter => false; + public bool IsEgg => false; public Ball FixedBall => Ball.Poke; public AbilityPermission Ability => Species == (ushort)Core.Species.Haunter ? AbilityPermission.OnlyFirst : AbilityPermission.OnlyHidden; public Shiny Shiny => Shiny.Random; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen2/EncounterGift2.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen2/EncounterGift2.cs index ecfa49f0c..a909a02a2 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen2/EncounterGift2.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen2/EncounterGift2.cs @@ -20,7 +20,7 @@ public sealed record EncounterGift2 public ushort EggLocation => 0; public bool IsShiny => Shiny == Shiny.Always; public AbilityPermission Ability => AbilityPermission.OnlyHidden; - public bool EggEncounter => EggCycles != 0; + public bool IsEgg => EggCycles != 0; public Moveset Moves { get; } public IndividualValueSet IVs => default; // future? @@ -127,7 +127,7 @@ public PK2 ConvertToPKM(ITrainerInfo tr, EncounterCriteria criteria) }, }; - if (EggEncounter) + if (IsEgg) { // Fake as hatched on G/S. } @@ -206,7 +206,7 @@ public bool IsMatchExact(PKM pk, EvoCriteria evo) if (!IsShinyValid(pk)) return false; - if (EggEncounter && !pk.IsEgg) + if (IsEgg && !pk.IsEgg) return true; // Check OT Details @@ -260,7 +260,7 @@ private bool IsMatchEggLocation(PKM pk) if (pk.IsEgg) { - if (!EggEncounter) + if (!IsEgg) return false; if (c2.MetLocation != 0 && c2.MetLevel != 0) return false; @@ -287,7 +287,7 @@ private bool IsMatchEggLocation(PKM pk) private bool IsMatchLocation(PKM pk) { - if (EggEncounter) + if (IsEgg) return true; if (pk is not ICaughtData2 c2) return true; @@ -314,7 +314,7 @@ private bool IsMatchLevel(PKM pk, EvoCriteria evo) if (evo.LevelMax < Level) return false; if (pk is ICaughtData2 { CaughtData: not 0 }) - return pk.MetLevel == (EggEncounter ? 1 : Level); + return pk.MetLevel == (IsEgg ? 1 : Level); return true; } diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen2/EncounterSlot2.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen2/EncounterSlot2.cs index 45f1977df..2d2da2934 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen2/EncounterSlot2.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen2/EncounterSlot2.cs @@ -14,7 +14,7 @@ public sealed record EncounterSlot2(EncounterArea2 Parent, ushort Species, byte { public byte Generation => 2; public EntityContext Context => EntityContext.Gen2; - public bool EggEncounter => false; + public bool IsEgg => false; public Ball FixedBall => Ball.Poke; public AbilityPermission Ability => TransporterLogic.IsHiddenDisallowedVC2(Species) ? AbilityPermission.OnlyFirst : AbilityPermission.OnlyHidden; public Shiny Shiny => Shiny.Random; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen2/EncounterStatic2.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen2/EncounterStatic2.cs index 655824279..7e23ddff0 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen2/EncounterStatic2.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen2/EncounterStatic2.cs @@ -10,7 +10,7 @@ public sealed record EncounterStatic2(ushort Species, byte Level, GameVersion Ve public EntityContext Context => EntityContext.Gen2; public byte Form => 0; public byte EggCycles => DizzyPunchEgg ? (byte)20 : (byte)0; - public bool DizzyPunchEgg => EggEncounter && Moves.HasMoves; + public bool DizzyPunchEgg => IsEgg && Moves.HasMoves; public Ball FixedBall => Ball.Poke; ushort ILocation.Location => Location; @@ -24,7 +24,7 @@ public sealed record EncounterStatic2(ushort Species, byte Level, GameVersion Ve public byte Gender { get; init; } = FixedGenderUtil.GenderRandom; public IndividualValueSet IVs { get; init; } public Moveset Moves { get; init; } - public bool EggEncounter { get; init; } + public bool IsEgg { get; init; } public string Name => "Static Encounter"; public string LongName => Name; @@ -55,7 +55,7 @@ public PK2 ConvertToPKM(ITrainerInfo tr, EncounterCriteria criteria) Nickname = SpeciesName.GetSpeciesNameGeneration(Species, lang, Generation), }; - if (EggEncounter) + if (IsEgg) { if (DizzyPunchEgg) // Fixed EXP value instead of exactly Level 5 pk.EXP = 125; @@ -92,7 +92,7 @@ public bool IsMatchExact(PKM pk, EvoCriteria evo) { if (Shiny == Shiny.Always && !pk.IsShiny) return false; - if (EggEncounter && Moves.HasMoves) // Odd Egg + if (IsEgg && Moves.HasMoves) // Odd Egg { if (pk.Format > 2) return false; // Can't be transferred to Gen7+ @@ -150,7 +150,7 @@ private bool IsMatchEggLocation(PKM pk) if (pk.IsEgg) { - if (!EggEncounter) + if (!IsEgg) return false; if (c2.MetLocation != 0 && c2.MetLevel != 0) return false; @@ -178,7 +178,7 @@ private bool IsMatchLevel(PKM pk, EvoCriteria evo) if (evo.LevelMax < Level) return false; if (pk is ICaughtData2 { CaughtData: not 0 }) - return pk.MetLevel == (EggEncounter ? 1 : Level); + return pk.MetLevel == (IsEgg ? 1 : Level); return true; } @@ -189,7 +189,7 @@ private bool IsMatchLevel(PKM pk, EvoCriteria evo) private bool IsMatchLocation(PKM pk) { - if (EggEncounter) + if (IsEgg) return true; if (pk is not ICaughtData2 c2) return true; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen2/EncounterTrade2.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen2/EncounterTrade2.cs index 8008c4ef1..ac406cead 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen2/EncounterTrade2.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen2/EncounterTrade2.cs @@ -12,7 +12,7 @@ public sealed record EncounterTrade2 : IEncounterable, IEncounterMatch, IFixedTr public EntityContext Context => EntityContext.Gen2; public ushort Location => Locations.LinkTrade2NPC; public GameVersion Version => GameVersion.GSC; - public bool EggEncounter => false; + public bool IsEgg => false; public Ball FixedBall => Ball.Poke; public AbilityPermission Ability => AbilityPermission.OnlyHidden; public Shiny Shiny => Shiny.Random; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen3/Colo/EncounterGift3Colo.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen3/Colo/EncounterGift3Colo.cs index 08d40497d..74c7ba35f 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen3/Colo/EncounterGift3Colo.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen3/Colo/EncounterGift3Colo.cs @@ -15,7 +15,7 @@ public sealed record EncounterGift3Colo : IEncounterable, IEncounterMatch, IEnco public bool IsShiny => false; public Shiny Shiny => Shiny.Never; public byte Form => 0; - public bool EggEncounter => false; + public bool IsEgg => false; public AbilityPermission Ability => AbilityPermission.Any12; public Ball FixedBall => Ball.Poke; public bool IsFixedTrainer => true; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen3/Colo/EncounterShadow3Colo.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen3/Colo/EncounterShadow3Colo.cs index d48c9892a..f29fcc8f0 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen3/Colo/EncounterShadow3Colo.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen3/Colo/EncounterShadow3Colo.cs @@ -19,7 +19,7 @@ public sealed record EncounterShadow3Colo(byte ID, short Gauge, ReadOnlyMemory 0; ushort ILocation.Location => Location; public bool IsShiny => false; - public bool EggEncounter => false; + public bool IsEgg => false; public Shiny Shiny => Shiny.Random; public AbilityPermission Ability => AbilityPermission.Any12; public Ball FixedBall => Ball.None; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen3/Colo/EncounterStatic3Colo.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen3/Colo/EncounterStatic3Colo.cs index d372c0a58..1c2dce0a6 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen3/Colo/EncounterStatic3Colo.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen3/Colo/EncounterStatic3Colo.cs @@ -14,7 +14,7 @@ public sealed record EncounterStatic3Colo(ushort Species, byte Level) public bool IsShiny => false; public Shiny Shiny => Shiny.Never; public byte Form => 0; - public bool EggEncounter => false; + public bool IsEgg => false; public AbilityPermission Ability => AbilityPermission.Any12; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen3/EncounterSlot3.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen3/EncounterSlot3.cs index d650fbbdd..3bd020104 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen3/EncounterSlot3.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen3/EncounterSlot3.cs @@ -12,7 +12,7 @@ public record EncounterSlot3(EncounterArea3 Parent, ushort Species, byte Form, b public byte Generation => 3; ushort ILocation.Location => Location; public EntityContext Context => EntityContext.Gen3; - public bool EggEncounter => false; + public bool IsEgg => false; public Ball FixedBall => GetRequiredBall(); public byte AreaRate => Parent.Rate; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen3/EncounterStatic3.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen3/EncounterStatic3.cs index 2db4190e7..f3632b0c5 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen3/EncounterStatic3.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen3/EncounterStatic3.cs @@ -22,7 +22,7 @@ public sealed record EncounterStatic3(ushort Species, byte Level, GameVersion Ve public required byte Location { get; init; } public byte Form { get; init; } - public bool EggEncounter { get; init; } + public bool IsEgg { get; init; } public Moveset Moves { get; init; } public string Name => "Static Encounter"; @@ -59,7 +59,7 @@ public PK3 ConvertToPKM(ITrainerInfo tr, EncounterCriteria criteria) Nickname = SpeciesName.GetSpeciesNameGeneration(Species, lang, Generation), }; - if (EggEncounter) + if (IsEgg) { // Fake as hatched. pk.MetLevel = EggStateLegality.EggMetLevel34; @@ -140,7 +140,7 @@ private bool IsMatchLevel(PKM pk, EvoCriteria evo) { if (pk.Format != 3) // Met Level lost on PK3=>PK4 return evo.LevelMax >= Level; - if (!EggEncounter) + if (!IsEgg) return pk.MetLevel == Level; return pk is { MetLevel: EggStateLegality.EggMetLevel34, CurrentLevel: >= 5 }; // met level 0, origin level 5 } @@ -150,7 +150,7 @@ private bool IsMatchLocation(PKM pk) if (pk.Format != 3) return true; // transfer location verified later - if (EggEncounter) + if (IsEgg) return !pk.IsEgg || pk.MetLocation == Location; var met = pk.MetLocation; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen3/EncounterTrade3.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen3/EncounterTrade3.cs index 71f94838d..666b9b893 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen3/EncounterTrade3.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen3/EncounterTrade3.cs @@ -11,7 +11,7 @@ public sealed record EncounterTrade3 : IEncounterable, IEncounterMatch, IFixedTr public EntityContext Context => EntityContext.Gen3; public ushort Location => Locations.LinkTrade3NPC; public Shiny Shiny => Shiny.FixedValue; - public bool EggEncounter => false; + public bool IsEgg => false; public Ball FixedBall => Ball.Poke; public bool IsShiny => false; public ushort EggLocation => 0; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen3/XD/EncounterShadow3XD.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen3/XD/EncounterShadow3XD.cs index 3ab69512e..e35b35e5d 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen3/XD/EncounterShadow3XD.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen3/XD/EncounterShadow3XD.cs @@ -19,7 +19,7 @@ public sealed record EncounterShadow3XD(byte ID, short Gauge, ReadOnlyMemory 0; ushort ILocation.Location => Location; public bool IsShiny => false; - public bool EggEncounter => false; + public bool IsEgg => false; public Shiny Shiny => Shiny.Never; // Different from Colosseum! public AbilityPermission Ability => AbilityPermission.Any12; public bool FatefulEncounter => true; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen3/XD/EncounterSlot3XD.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen3/XD/EncounterSlot3XD.cs index 9ea94336e..e92d5f51f 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen3/XD/EncounterSlot3XD.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen3/XD/EncounterSlot3XD.cs @@ -9,7 +9,7 @@ public sealed record EncounterSlot3XD(EncounterArea3XD Parent, ushort Species, b public byte Generation => 3; public EntityContext Context => EntityContext.Gen3; public bool FatefulEncounter => true; - public bool EggEncounter => false; + public bool IsEgg => false; public Ball FixedBall => Ball.None; public AbilityPermission Ability => AbilityPermission.Any12; public Shiny Shiny => Shiny.Random; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen3/XD/EncounterStatic3XD.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen3/XD/EncounterStatic3XD.cs index d2ba2d073..eefabb766 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen3/XD/EncounterStatic3XD.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen3/XD/EncounterStatic3XD.cs @@ -21,7 +21,7 @@ public sealed record EncounterStatic3XD(ushort Species, byte Level) public required byte Location { get; init; } public byte Form => 0; - public bool EggEncounter => false; + public bool IsEgg => false; public Moveset Moves { get; init; } public string Name => "Static Encounter"; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen3/XD/EncounterTrade3XD.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen3/XD/EncounterTrade3XD.cs index 75a3b459c..feae88c55 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen3/XD/EncounterTrade3XD.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen3/XD/EncounterTrade3XD.cs @@ -27,7 +27,7 @@ public sealed record EncounterTrade3XD : IEncounterable, IEncounterMatch, IEncou public required byte Location { get; init; } public byte Form => 0; - public bool EggEncounter => false; + public bool IsEgg => false; public required Moveset Moves { get; init; } public required ushort TID16 { get; init; } // SID: Based on player ID diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen4/EncounterSlot4.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen4/EncounterSlot4.cs index 9eb8c81c8..bfb3025cc 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen4/EncounterSlot4.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen4/EncounterSlot4.cs @@ -11,7 +11,7 @@ public sealed record EncounterSlot4(EncounterArea4 Parent, ushort Species, byte public byte Generation => 4; ushort ILocation.Location => Location; public EntityContext Context => EntityContext.Gen4; - public bool EggEncounter => false; + public bool IsEgg => false; public AbilityPermission Ability => AbilityPermission.Any12; public Ball FixedBall => GetRequiredBallValue(); public Shiny Shiny => Shiny.Random; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen4/EncounterStatic4.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen4/EncounterStatic4.cs index 790a47aeb..59a0fd811 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen4/EncounterStatic4.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen4/EncounterStatic4.cs @@ -14,7 +14,7 @@ public sealed record EncounterStatic4(GameVersion Version) ushort ILocation.Location => Location; ushort ILocation.EggLocation => EggLocation; public bool IsShiny => false; - public bool EggEncounter => EggLocation != 0; + public bool IsEgg => EggLocation != 0; private bool Gift => FixedBall == Ball.Poke; public Ball FixedBall { get; init; } @@ -76,7 +76,7 @@ public PK4 ConvertToPKM(ITrainerInfo tr, EncounterCriteria criteria) Nickname = SpeciesName.GetSpeciesNameGeneration(Species, lang, Generation), }; - if (EggEncounter) + if (IsEgg) { // Fake as hatched. pk.MetLocation = version is GameVersion.HG or GameVersion.SS ? Locations.HatchLocationHGSS : Locations.HatchLocationDPPt; @@ -176,7 +176,7 @@ private bool IsMatchLocation(PKM pk) return true; var met = pk4.MetLocation; - if (EggEncounter) + if (IsEgg) return true; if (!Roaming) return met == Location; @@ -191,7 +191,7 @@ private bool IsMatchLocation(PKM pk) private bool IsMatchEggLocation(PKM pk) { - if (!EggEncounter) + if (!IsEgg) { var expect = pk is PB8 ? Locations.Default8bNone : EggLocation; return pk.EggLocation == expect; @@ -239,7 +239,7 @@ private bool IsMatchLevel(PKM pk, EvoCriteria evo) if (pk.Format != 4) // Met Level lost on PK4=>PK5 return Level <= evo.LevelMax; - return pk.MetLevel == (EggEncounter ? 0 : Level); + return pk.MetLevel == (IsEgg ? 0 : Level); } private bool IsMatchPartial(PKM pk) => Gift && pk.Ball != (byte)FixedBall; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen4/EncounterStatic4Pokewalker.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen4/EncounterStatic4Pokewalker.cs index 7ccd37f02..75b88c25d 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen4/EncounterStatic4Pokewalker.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen4/EncounterStatic4Pokewalker.cs @@ -15,7 +15,7 @@ public sealed record EncounterStatic4Pokewalker(PokewalkerCourse4 Course) public ushort Location => Locations.PokeWalker4; public bool IsShiny => false; - public bool EggEncounter => false; + public bool IsEgg => false; public Ball FixedBall => Ball.Poke; public AbilityPermission Ability => AbilityPermission.Any12; public Shiny Shiny => Shiny.Never; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen4/EncounterTrade4PID.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen4/EncounterTrade4PID.cs index f2e304758..5a9a41549 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen4/EncounterTrade4PID.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen4/EncounterTrade4PID.cs @@ -13,7 +13,7 @@ public sealed record EncounterTrade4PID public Shiny Shiny => Shiny.FixedValue; public bool IsFixedNickname => true; public GameVersion Version { get; } - public bool EggEncounter => false; + public bool IsEgg => false; public ushort EggLocation => 0; public Ball FixedBall => Ball.Poke; public bool IsShiny => false; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen4/EncounterTrade4RanchGift.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen4/EncounterTrade4RanchGift.cs index dccfff2dc..6526085bc 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen4/EncounterTrade4RanchGift.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen4/EncounterTrade4RanchGift.cs @@ -21,7 +21,7 @@ public sealed record EncounterTrade4RanchGift public ushort Location { get; init; } public Shiny Shiny => FatefulEncounter ? Shiny.Never : Shiny.FixedValue; public GameVersion Version { get; } - public bool EggEncounter => false; + public bool IsEgg => false; public ushort EggLocation { get; init; } public Ball FixedBall { get; init; } = Ball.Poke; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterSlot5.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterSlot5.cs index 6cb24b167..7f03c6e92 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterSlot5.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterSlot5.cs @@ -8,7 +8,7 @@ public sealed record EncounterSlot5(EncounterArea5 Parent, ushort Species, byte { public byte Generation => 5; public EntityContext Context => EntityContext.Gen5; - public bool EggEncounter => false; + public bool IsEgg => false; public Ball FixedBall => Ball.None; public Shiny Shiny => IsHiddenGrotto ? Shiny.Never : Shiny.Random; public bool IsShiny => false; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterStatic5.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterStatic5.cs index 1ab404e7a..b9ba68f92 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterStatic5.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterStatic5.cs @@ -12,7 +12,7 @@ public sealed record EncounterStatic5(GameVersion Version) ushort ILocation.Location => Location; ushort ILocation.EggLocation => EggLocation; public bool IsShiny => false; - public bool EggEncounter => EggLocation != 0; + public bool IsEgg => EggLocation != 0; private bool Gift => FixedBall == Ball.Poke; public Ball FixedBall { get; init; } @@ -64,7 +64,7 @@ public PK5 ConvertToPKM(ITrainerInfo tr, EncounterCriteria criteria) Nickname = SpeciesName.GetSpeciesNameGeneration(Species, lang, Generation), }; - if (EggEncounter) + if (IsEgg) { // Fake as hatched. pk.MetLocation = Locations.HatchLocation5; @@ -161,7 +161,7 @@ private bool IsMatchPartial(PKM pk) private bool IsMatchLocation(PKM pk) { var met = pk.MetLocation; - if (EggEncounter) + if (IsEgg) return true; if (!Roaming) return met == Location; @@ -170,7 +170,7 @@ private bool IsMatchLocation(PKM pk) private bool IsMatchEggLocation(PKM pk) { - if (!EggEncounter) + if (!IsEgg) { var expect = pk is PB8 ? Locations.Default8bNone : EggLocation; return pk.EggLocation == expect; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterStatic5Entree.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterStatic5Entree.cs index 30b489a3d..7910199a9 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterStatic5Entree.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterStatic5Entree.cs @@ -11,7 +11,7 @@ public sealed record EncounterStatic5Entree(GameVersion Version, ushort Species, public Ball FixedBall => Ball.None; public Shiny Shiny => Shiny.Never; public bool IsShiny => false; - public bool EggEncounter => false; + public bool IsEgg => false; public ushort EggLocation => 0; public ushort Location => 075; public string Name => $"Entree Forest Encounter ({Version})"; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterStatic5N.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterStatic5N.cs index 02edb2a56..f0310901d 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterStatic5N.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterStatic5N.cs @@ -20,7 +20,7 @@ public sealed record EncounterStatic5N(uint PID) ushort ILocation.Location => Location; public bool IsShiny => false; public Shiny Shiny => Shiny.FixedValue; - public bool EggEncounter => false; + public bool IsEgg => false; public ushort EggLocation => 0; public Ball FixedBall => Species == (int)Core.Species.Zorua ? Ball.Poke : Ball.None; // Zorua can't be captured; others can. diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterStatic5Radar.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterStatic5Radar.cs index 9728a5ec9..8a705feae 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterStatic5Radar.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterStatic5Radar.cs @@ -13,7 +13,7 @@ public sealed record EncounterStatic5Radar(ushort Species, byte Form, AbilityPer public Ball FixedBall => Ball.Dream; public bool IsShiny => false; public Shiny Shiny => Shiny.Never; - public bool EggEncounter => false; + public bool IsEgg => false; public ushort EggLocation => 0; public byte LevelMin => 5; public byte LevelMax => 40; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterTrade5B2W2.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterTrade5B2W2.cs index 2b8fa2b89..54c7541e5 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterTrade5B2W2.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterTrade5B2W2.cs @@ -14,7 +14,7 @@ public sealed record EncounterTrade5B2W2 : IEncounterable, IEncounterMatch, IFix public bool IsFixedNickname { get; init; } public GameVersion Version { get; } public Shiny Shiny => Shiny.Never; - public bool EggEncounter => false; + public bool IsEgg => false; public Ball FixedBall => Ball.Poke; public bool IsShiny => false; public ushort EggLocation => 0; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterTrade5BW.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterTrade5BW.cs index f389cb8fa..c4aea7aeb 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterTrade5BW.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen5/EncounterTrade5BW.cs @@ -11,7 +11,7 @@ public sealed record EncounterTrade5BW : IEncounterable, IEncounterMatch, IFixed public bool IsFixedNickname => true; public GameVersion Version { get; } public Shiny Shiny => Shiny.Never; - public bool EggEncounter => false; + public bool IsEgg => false; public ushort EggLocation => 0; public Ball FixedBall => Ball.Poke; public bool IsShiny => false; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen6/EncounterSlot6AO.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen6/EncounterSlot6AO.cs index 09e8b0600..5f13f4d8f 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen6/EncounterSlot6AO.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen6/EncounterSlot6AO.cs @@ -11,7 +11,7 @@ public sealed record EncounterSlot6AO(EncounterArea6AO Parent, ushort Species, b { public byte Generation => 6; public EntityContext Context => EntityContext.Gen6; - public bool EggEncounter => false; + public bool IsEgg => false; public Ball FixedBall => Ball.None; public Shiny Shiny => Shiny.Random; public bool IsShiny => false; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen6/EncounterSlot6XY.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen6/EncounterSlot6XY.cs index d061220dc..42fa76a68 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen6/EncounterSlot6XY.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen6/EncounterSlot6XY.cs @@ -8,7 +8,7 @@ public sealed record EncounterSlot6XY(EncounterArea6XY Parent, ushort Species, b { public byte Generation => 6; public EntityContext Context => EntityContext.Gen6; - public bool EggEncounter => false; + public bool IsEgg => false; public Ball FixedBall => Ball.None; public Shiny Shiny => Shiny.Random; public bool IsShiny => false; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen6/EncounterStatic6.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen6/EncounterStatic6.cs index aae5c5df4..dbf586595 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen6/EncounterStatic6.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen6/EncounterStatic6.cs @@ -11,7 +11,7 @@ public sealed record EncounterStatic6(GameVersion Version) ushort ILocation.Location => Location; ushort ILocation.EggLocation => EggLocation; public bool IsShiny => false; - public bool EggEncounter => EggLocation != 0; + public bool IsEgg => EggLocation != 0; public Ball FixedBall { get; init; } public bool FatefulEncounter { get; init; } @@ -77,7 +77,7 @@ public PK6 ConvertToPKM(ITrainerInfo tr, EncounterCriteria criteria) Nickname = SpeciesName.GetSpeciesNameGeneration(Species, lang, Generation), }; - if (EggEncounter) + if (IsEgg) { // Fake as hatched. pk.MetLocation = version is GameVersion.X or GameVersion.Y ? Locations.HatchLocation6XY : Locations.HatchLocation6AO; @@ -169,7 +169,7 @@ private bool IsMatchPartial(PKM pk) private bool IsMatchLocation(PKM pk) { - if (EggEncounter) + if (IsEgg) return true; var met = pk.MetLocation; if (met == Location) @@ -184,7 +184,7 @@ private bool IsMatchLocation(PKM pk) private bool IsMatchEggLocation(PKM pk) { - if (!EggEncounter) + if (!IsEgg) { var expect = pk is PB8 ? Locations.Default8bNone : EggLocation; return pk.EggLocation == expect; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen6/EncounterTrade6.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen6/EncounterTrade6.cs index 3b22c0423..d12f7108b 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen6/EncounterTrade6.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen6/EncounterTrade6.cs @@ -11,7 +11,7 @@ public sealed record EncounterTrade6 : IEncounterable, IEncounterMatch, IFixedTr public EntityContext Context => EntityContext.Gen6; public ushort Location => Locations.LinkTrade6NPC; public Shiny Shiny => Shiny.Never; - public bool EggEncounter => false; + public bool IsEgg => false; public Ball FixedBall => Ball.Poke; public bool IsShiny => false; public ushort EggLocation => 0; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen7/EncounterSlot7.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen7/EncounterSlot7.cs index 9e1487347..730291456 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen7/EncounterSlot7.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen7/EncounterSlot7.cs @@ -8,7 +8,7 @@ public sealed record EncounterSlot7(EncounterArea7 Parent, ushort Species, byte { public byte Generation => 7; public EntityContext Context => EntityContext.Gen7; - public bool EggEncounter => false; + public bool IsEgg => false; public Ball FixedBall => Location == Locations.Pelago7 ? Ball.Poke : Ball.None; public Shiny Shiny => Shiny.Random; public bool IsShiny => false; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen7/EncounterStatic7.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen7/EncounterStatic7.cs index a57973e6d..372156da7 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen7/EncounterStatic7.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen7/EncounterStatic7.cs @@ -12,7 +12,7 @@ public sealed record EncounterStatic7(GameVersion Version) ushort ILocation.EggLocation => EggLocation; public bool RibbonWishing => Species == (int)Core.Species.Magearna; - public bool EggEncounter => EggLocation != 0; + public bool IsEgg => EggLocation != 0; public bool IsShiny => false; public Moveset Relearn { get; init; } @@ -85,7 +85,7 @@ public PK7 ConvertToPKM(ITrainerInfo tr, EncounterCriteria criteria) else pk.SetDefaultRegionOrigins(lang); - if (EggEncounter) + if (IsEgg) { // Fake as hatched. pk.MetLocation = Locations.HatchLocation7; @@ -184,7 +184,7 @@ private bool IsMatchPartial(PKM pk) private bool IsMatchLocation(PKM pk) { - if (EggEncounter) + if (IsEgg) return true; return pk.MetLocation == Location; @@ -192,7 +192,7 @@ private bool IsMatchLocation(PKM pk) private bool IsMatchEggLocation(PKM pk) { - if (!EggEncounter) + if (!IsEgg) { var expect = pk is PB8 ? Locations.Default8bNone : EggLocation; return pk.EggLocation == expect; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen7/EncounterTrade7.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen7/EncounterTrade7.cs index 3d0153d6a..e4888b055 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen7/EncounterTrade7.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen7/EncounterTrade7.cs @@ -15,7 +15,7 @@ public sealed record EncounterTrade7 : IEncounterable, IEncounterMatch, IFixedTr public byte OriginalTrainerMemoryFeeling => 5; public ushort OriginalTrainerMemoryVariable => 40; public Shiny Shiny => Shiny.Never; - public bool EggEncounter => false; + public bool IsEgg => false; public Ball FixedBall => Ball.Poke; public bool IsShiny => false; public ushort EggLocation => 0; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen7/EncounterTransfer7.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen7/EncounterTransfer7.cs index 2748d6bff..bcb9b0c40 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen7/EncounterTransfer7.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen7/EncounterTransfer7.cs @@ -13,7 +13,7 @@ public sealed record EncounterTransfer7(GameVersion Version, ushort Species, byt public byte Generation => 7; public EntityContext Context => EntityContext.Gen7; public Ball FixedBall => Ball.Poke; - public bool EggEncounter => false; + public bool IsEgg => false; public ushort EggLocation => 0; public byte Form => 0; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen7b/EncounterSlot7b.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen7b/EncounterSlot7b.cs index b718a221f..4a22a14a7 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen7b/EncounterSlot7b.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen7b/EncounterSlot7b.cs @@ -8,7 +8,7 @@ public sealed record EncounterSlot7b(EncounterArea7b Parent, ushort Species, byt { public byte Generation => 7; public EntityContext Context => EntityContext.Gen7b; - public bool EggEncounter => false; + public bool IsEgg => false; public Ball FixedBall => Ball.None; public Shiny Shiny => Shiny.Random; public AbilityPermission Ability => AbilityPermission.Any12; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen7b/EncounterStatic7b.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen7b/EncounterStatic7b.cs index 20736622a..55ac79585 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen7b/EncounterStatic7b.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen7b/EncounterStatic7b.cs @@ -11,7 +11,7 @@ public sealed record EncounterStatic7b(GameVersion Version) ushort ILocation.Location => Location; public ushort EggLocation => 0; public bool IsShiny => false; - public bool EggEncounter => false; + public bool IsEgg => false; public required ushort Species { get; init; } public required byte Level { get; init; } diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen7b/EncounterTrade7b.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen7b/EncounterTrade7b.cs index f9da01f6f..d087f5dab 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen7b/EncounterTrade7b.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen7b/EncounterTrade7b.cs @@ -11,7 +11,7 @@ public sealed record EncounterTrade7b(GameVersion Version) : IEncounterable, IEn public EntityContext Context => EntityContext.Gen7b; public ushort Location => Locations.LinkTrade6NPC; public Shiny Shiny => Shiny.Random; - public bool EggEncounter => false; + public bool IsEgg => false; public Ball FixedBall => Ball.Poke; public bool IsShiny => false; public ushort EggLocation => 0; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen8/EncounterSlot8.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen8/EncounterSlot8.cs index a4d604957..42dc90114 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen8/EncounterSlot8.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen8/EncounterSlot8.cs @@ -10,7 +10,7 @@ public sealed record EncounterSlot8(EncounterArea8 Parent, ushort Species, byte { public byte Generation => 8; public EntityContext Context => EntityContext.Gen8; - public bool EggEncounter => false; + public bool IsEgg => false; public Ball FixedBall => Ball.None; public AbilityPermission Ability => AbilityPermission.Any12; public Shiny Shiny => Shiny.Random; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen8/EncounterStatic8.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen8/EncounterStatic8.cs index 8619f8c4b..10f380755 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen8/EncounterStatic8.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen8/EncounterStatic8.cs @@ -14,7 +14,7 @@ public sealed record EncounterStatic8(GameVersion Version = GameVersion.SWSH) ushort ILocation.Location => Location; public bool Gift => FixedBall != Ball.None; public bool IsShiny => Shiny == Shiny.Always; - public bool EggEncounter => false; + public bool IsEgg => false; ushort ILocation.EggLocation => 0; public required ushort Location { get; init; } diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen8/EncounterStatic8Nest.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen8/EncounterStatic8Nest.cs index 6e07d8403..9c4073cf6 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen8/EncounterStatic8Nest.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen8/EncounterStatic8Nest.cs @@ -18,7 +18,7 @@ public abstract record EncounterStatic8Nest(GameVersion Version) private const ushort Location = SharedNest; public bool IsShiny => Shiny == Shiny.Always; - public bool EggEncounter => false; + public bool IsEgg => false; ushort ILocation.EggLocation => 0; public Ball FixedBall => Ball.None; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen8/EncounterTrade8.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen8/EncounterTrade8.cs index da09a1c69..d72d23b1c 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen8/EncounterTrade8.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen8/EncounterTrade8.cs @@ -21,7 +21,7 @@ public sealed record EncounterTrade8 : IEncounterable, IEncounterMatch, IFixedTr public byte FlawlessIVCount { get; init; } public Shiny Shiny { get; } - public bool EggEncounter => false; + public bool IsEgg => false; public Ball FixedBall => Ball.Poke; public bool IsShiny => false; public ushort EggLocation => 0; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen8a/EncounterSlot8a.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen8a/EncounterSlot8a.cs index 3e3ec8101..eca90ee15 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen8a/EncounterSlot8a.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen8a/EncounterSlot8a.cs @@ -12,7 +12,7 @@ public sealed record EncounterSlot8a(EncounterArea8a Parent, ushort Species, byt { public byte Generation => 8; public EntityContext Context => EntityContext.Gen8a; - public bool EggEncounter => false; + public bool IsEgg => false; public AbilityPermission Ability => AbilityPermission.Any12; public Ball FixedBall => Ball.None; public Shiny Shiny => Shiny.Random; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen8a/EncounterStatic8a.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen8a/EncounterStatic8a.cs index f0b586d39..c6a71b430 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen8a/EncounterStatic8a.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen8a/EncounterStatic8a.cs @@ -16,7 +16,7 @@ public sealed record EncounterStatic8a public ushort EggLocation => 0; ushort ILocation.Location => Location; public bool IsShiny => Shiny == Shiny.Always; - public bool EggEncounter => false; + public bool IsEgg => false; public AbilityPermission Ability => AbilityPermission.Any12; public ushort Species { get; } diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen8b/EncounterSlot8b.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen8b/EncounterSlot8b.cs index 18a675841..c1eab8ed3 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen8b/EncounterSlot8b.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen8b/EncounterSlot8b.cs @@ -11,7 +11,7 @@ public sealed record EncounterSlot8b(EncounterArea8b Parent, ushort Species, byt { public byte Generation => 8; public EntityContext Context => EntityContext.Gen8b; - public bool EggEncounter => false; + public bool IsEgg => false; public Shiny Shiny => Shiny.Random; public bool IsShiny => false; public ushort EggLocation => 0; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen8b/EncounterStatic8b.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen8b/EncounterStatic8b.cs index fd04dc75e..1597ae1dd 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen8b/EncounterStatic8b.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen8b/EncounterStatic8b.cs @@ -13,7 +13,7 @@ public sealed record EncounterStatic8b(GameVersion Version) public EntityContext Context => EntityContext.Gen8b; ushort ILocation.EggLocation => EggLocation; ushort ILocation.Location => Location; - public bool EggEncounter => EggLocation != None; + public bool IsEgg => EggLocation != None; private const ushort None = Locations.Default8bNone; public byte Form => 0; public bool IsShiny => Shiny == Shiny.Always; @@ -84,7 +84,7 @@ public PB8 ConvertToPKM(ITrainerInfo tr, EncounterCriteria criteria) Nickname = SpeciesName.GetSpeciesNameGeneration(Species, lang, Generation), }; - if (EggEncounter) + if (IsEgg) { // Fake as hatched. pk.MetLocation = Locations.HatchLocation8b; @@ -149,7 +149,7 @@ private bool IsMatchLocation(PKM pk) private bool IsMatchLocationExact(PKM pk) { - if (EggEncounter) + if (IsEgg) return !pk.IsEgg || pk.MetLocation == Location || pk.MetLocation == Locations.LinkTrade6NPC; if (!Roaming) return pk.MetLocation == Location; @@ -159,7 +159,7 @@ private bool IsMatchLocationExact(PKM pk) private bool IsMatchEggLocationExact(PKM pk) { var eggLoc = pk.EggLocation; - if (!EggEncounter) + if (!IsEgg) return eggLoc == EggLocation; if (!pk.IsEgg) // hatched @@ -195,7 +195,7 @@ private bool IsMatchEggLocation(PKM pk) private bool IsMatchEggLocationRemapped(PKM pk) { - if (!EggEncounter) + if (!IsEgg) return pk.EggLocation == 0; return LocationsHOME.IsLocationSWSHEgg(pk.Version, pk.MetLocation, pk.EggLocation, EggLocation); } diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen8b/EncounterTrade8b.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen8b/EncounterTrade8b.cs index 0b3866d76..1d4a785c2 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen8b/EncounterTrade8b.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen8b/EncounterTrade8b.cs @@ -11,7 +11,7 @@ public sealed record EncounterTrade8b : IEncounterable, IEncounterMatch, IFixedT public EntityContext Context => EntityContext.Gen8b; public ushort Location => Locations.LinkTrade6NPC; public Shiny Shiny => Shiny.Never; - public bool EggEncounter => false; + public bool IsEgg => false; public Ball FixedBall => Ball.Poke; public bool IsShiny => false; public ushort EggLocation => Locations.Default8bNone; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterDist9.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterDist9.cs index 8fd78fd24..3c48a9807 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterDist9.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterDist9.cs @@ -15,7 +15,7 @@ public sealed record EncounterDist9 public GameVersion Version => GameVersion.SV; public bool IsDistribution => Index != 0; public Ball FixedBall => Ball.None; - public bool EggEncounter => false; + public bool IsEgg => false; public bool IsShiny => Shiny == Shiny.Always; public ushort EggLocation => 0; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterFixed9.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterFixed9.cs index 08c27090e..40ac4c3e6 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterFixed9.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterFixed9.cs @@ -16,7 +16,7 @@ public sealed record EncounterFixed9 public EntityContext Context => EntityContext.Gen9; public GameVersion Version => GameVersion.SV; public Shiny Shiny => Shiny.Random; - public bool EggEncounter => false; + public bool IsEgg => false; public Ball FixedBall => Ball.None; public bool IsShiny => false; public ushort EggLocation => 0; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterMight9.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterMight9.cs index 12ca01e43..8043551ce 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterMight9.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterMight9.cs @@ -13,7 +13,7 @@ public sealed record EncounterMight9 public GameVersion Version => GameVersion.SV; public bool IsDistribution => Index != 0; public Ball FixedBall => Ball.None; - public bool EggEncounter => false; + public bool IsEgg => false; public bool IsShiny => Shiny == Shiny.Always; public ushort EggLocation => 0; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterOutbreak9.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterOutbreak9.cs index 63ffed196..0197b416b 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterOutbreak9.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterOutbreak9.cs @@ -15,7 +15,7 @@ public sealed record EncounterOutbreak9 public EntityContext Context => EntityContext.Gen9; public GameVersion Version => GameVersion.SV; public Shiny Shiny => IsShiny ? Shiny.Always : Shiny.Random; - public bool EggEncounter => false; + public bool IsEgg => false; public Ball FixedBall => Ball.None; public ushort EggLocation => 0; public AbilityPermission Ability => AbilityPermission.Any12; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterSlot9.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterSlot9.cs index 215ef889e..5b35bf0ab 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterSlot9.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterSlot9.cs @@ -10,7 +10,7 @@ public sealed record EncounterSlot9(EncounterArea9 Parent, ushort Species, byte { public byte Generation => 9; public EntityContext Context => EntityContext.Gen9; - public bool EggEncounter => false; + public bool IsEgg => false; public AbilityPermission Ability => AbilityPermission.Any12; public Ball FixedBall => Ball.None; public Shiny Shiny => Shiny.Random; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterStatic9.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterStatic9.cs index a8160c3be..2f7562781 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterStatic9.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterStatic9.cs @@ -11,7 +11,7 @@ public sealed record EncounterStatic9(GameVersion Version) public byte Generation => 9; public EntityContext Context => EntityContext.Gen9; public bool IsShiny => Shiny == Shiny.Always; - public bool EggEncounter => EggLocation != 0; + public bool IsEgg => EggLocation != 0; ushort ILocation.Location => Location; ushort ILocation.EggLocation => EggLocation; @@ -90,7 +90,7 @@ public PK9 ConvertToPKM(ITrainerInfo tr, EncounterCriteria criteria) ID32 = tr.ID32, }; - if (EggEncounter) + if (IsEgg) { // Fake as hatched. pk.MetLocation = Locations.HatchLocation9; @@ -192,7 +192,7 @@ public bool IsMatchExact(PKM pk, EvoCriteria evo) private bool IsMatchEggLocation(PKM pk) { var eggLoc = pk.EggLocation; - if (!EggEncounter) + if (!IsEgg) { var expect = pk is PB8 ? Locations.Default8bNone : EggLocation; return eggLoc == expect; @@ -228,7 +228,7 @@ public EncounterMatchRating GetMatchRating(PKM pk) private bool IsMatchLocationExact(PKM pk) { - if (EggEncounter) + if (IsEgg) return true; return pk.MetLocation == Location; } diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterTera9.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterTera9.cs index f851b732a..3da64720c 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterTera9.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterTera9.cs @@ -17,7 +17,7 @@ public sealed record EncounterTera9 public const ushort Location = Locations.TeraCavern9; public bool IsDistribution => Index != 0; public Ball FixedBall => Ball.None; - public bool EggEncounter => false; + public bool IsEgg => false; public bool IsShiny => Shiny == Shiny.Always; public ushort EggLocation => 0; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterTrade9.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterTrade9.cs index 61842b478..fb3566426 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterTrade9.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen9/EncounterTrade9.cs @@ -12,7 +12,7 @@ public sealed record EncounterTrade9 public EntityContext Context => EntityContext.Gen9; public ushort Location => Locations.LinkTrade6NPC; public Shiny Shiny { get; init; } = Shiny.Never; - public bool EggEncounter => false; + public bool IsEgg => false; public Ball FixedBall { get; init; } public bool IsShiny => false; public ushort EggLocation => 0; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Interfaces/IEncounterTemplate.cs b/PKHeX.Core/Legality/Encounters/Templates/Interfaces/IEncounterTemplate.cs index 17c7d84f6..fab10b837 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Interfaces/IEncounterTemplate.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Interfaces/IEncounterTemplate.cs @@ -13,7 +13,7 @@ public interface IEncounterTemplate : ISpeciesForm, IVersion, IGeneration, IShin /// /// Indicates if the encounter originated as an egg. /// - bool EggEncounter { get; } + bool IsEgg { get; } } public static partial class Extensions @@ -23,7 +23,7 @@ public static bool IsWithinEncounterRange(this IEncounterTemplate encounter, PKM var level = pk.CurrentLevel; if (!pk.HasOriginalMetLocation) return encounter.IsLevelWithinRange(level); - if (encounter.EggEncounter) + if (encounter.IsEgg) return level == encounter.LevelMin; if (encounter is MysteryGift g) return level == g.Level; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Shared/EncounterEgg.cs b/PKHeX.Core/Legality/Encounters/Templates/Shared/EncounterEgg.cs index 539652d7e..4854298d7 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Shared/EncounterEgg.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Shared/EncounterEgg.cs @@ -10,7 +10,7 @@ public sealed record EncounterEgg(ushort Species, byte Form, byte Level, byte Ge public string Name => "Egg"; public string LongName => "Egg"; - public bool EggEncounter => true; + public bool IsEgg => true; public byte LevelMin => Level; public byte LevelMax => Level; public bool IsShiny => false; diff --git a/PKHeX.Core/Legality/Encounters/Templates/Shared/EncounterInvalid.cs b/PKHeX.Core/Legality/Encounters/Templates/Shared/EncounterInvalid.cs index e566c5020..cd607c6bb 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Shared/EncounterInvalid.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Shared/EncounterInvalid.cs @@ -13,7 +13,7 @@ public sealed record EncounterInvalid : IEncounterable public byte Form { get; } public byte LevelMin { get; } public byte LevelMax { get; } - public bool EggEncounter { get; } + public bool IsEgg { get; } public byte Generation { get; } public EntityContext Context { get; } public GameVersion Version { get; } @@ -35,7 +35,7 @@ public EncounterInvalid(PKM pk) Form = pk.Form; LevelMin = pk.MetLevel; LevelMax = pk.CurrentLevel; - EggEncounter = pk.WasEgg; + IsEgg = pk.WasEgg; Generation = pk.Generation; Version = pk.Version; Context = pk.Context; diff --git a/PKHeX.Core/Legality/Encounters/Verifiers/EncounterVerifier.cs b/PKHeX.Core/Legality/Encounters/Verifiers/EncounterVerifier.cs index 5b3287f72..b390d77e3 100644 --- a/PKHeX.Core/Legality/Encounters/Verifiers/EncounterVerifier.cs +++ b/PKHeX.Core/Legality/Encounters/Verifiers/EncounterVerifier.cs @@ -27,14 +27,14 @@ public static class EncounterVerifier EncounterStatic3 { Species: (int)Species.Deoxys, Location: 200 } when pk.Language == (int)LanguageID.Japanese => GetInvalid(LEncUnreleased), EncounterStatic4 { Roaming: true } when pk is G4PKM { MetLocation: 193, GroundTile: GroundTileType.Water } => GetInvalid(LG4InvalidTileR45Surf), MysteryGift g => VerifyEncounterEvent(pk, g), - { EggEncounter: true } when !pk.IsEgg => VerifyEncounterEgg(pk, enc.Generation), + { IsEgg: true } when !pk.IsEgg => VerifyEncounterEgg(pk, enc.Generation), EncounterInvalid => GetInvalid(LEncInvalid), _ => GetValid(string.Empty), // todo: refactor }; private static CheckResult VerifyEncounterG12(PKM pk, IEncounterTemplate enc) { - if (enc.EggEncounter) + if (enc.IsEgg) return VerifyEncounterEgg(pk, 2); return enc switch diff --git a/PKHeX.Core/Legality/MoveListSuggest.cs b/PKHeX.Core/Legality/MoveListSuggest.cs index 4cd9999c0..844de375c 100644 --- a/PKHeX.Core/Legality/MoveListSuggest.cs +++ b/PKHeX.Core/Legality/MoveListSuggest.cs @@ -132,7 +132,7 @@ private static void GetSuggestedRelearnInternal(this IEncounterTemplate enc, PKM { if (enc is IRelearn { Relearn: { HasMoves: true } r }) r.CopyTo(moves); - else if (enc is EncounterEgg or EncounterInvalid { EggEncounter: true }) + else if (enc is EncounterEgg or EncounterInvalid { IsEgg: true }) GetSuggestedRelearnEgg(enc, pk, moves); } @@ -157,7 +157,7 @@ public static void GetSuggestedRelearnMovesFromEncounter(this LegalityAnalysis a if (LearnVerifierRelearn.ShouldNotHaveRelearnMoves(enc, pk)) return; - if (enc is EncounterEgg or EncounterInvalid {EggEncounter: true}) + if (enc is EncounterEgg or EncounterInvalid {IsEgg: true}) enc.GetSuggestedRelearnEgg(info.Moves, pk, moves); else enc.GetSuggestedRelearnInternal(pk, moves); diff --git a/PKHeX.Core/Legality/Restrictions/Memories/MemoryContext8.cs b/PKHeX.Core/Legality/Restrictions/Memories/MemoryContext8.cs index 01648db8d..d3a245184 100644 --- a/PKHeX.Core/Legality/Restrictions/Memories/MemoryContext8.cs +++ b/PKHeX.Core/Legality/Restrictions/Memories/MemoryContext8.cs @@ -97,7 +97,7 @@ private static bool IsInvalidGenLoc8(byte memory, ushort loc, int egg, ushort va switch (memory) { case 1 when !IsWildEncounter(pk, enc): - case 2 when !enc.EggEncounter: + case 2 when !enc.IsEgg: case 3 when !IsWildEncounterMeet(pk, enc): return true; } diff --git a/PKHeX.Core/Legality/Restrictions/Memories/MemoryRules.cs b/PKHeX.Core/Legality/Restrictions/Memories/MemoryRules.cs index 0ac6c5258..70c9b394d 100644 --- a/PKHeX.Core/Legality/Restrictions/Memories/MemoryRules.cs +++ b/PKHeX.Core/Legality/Restrictions/Memories/MemoryRules.cs @@ -38,7 +38,7 @@ public static MemorySource ReviseSourcesHandler(PKM pk, MemorySource sources, IE if (pk.IsUntraded) { // Traded eggs in SW/SH set HT memory but not HT Name. - if (enc is { Context: EntityContext.Gen8, EggEncounter: true } && pk.Context is EntityContext.Gen8) + if (enc is { Context: EntityContext.Gen8, IsEgg: true } && pk.Context is EntityContext.Gen8) { var loc = pk.IsEgg ? pk.MetLocation : pk.EggLocation; if (loc == Locations.LinkTrade6) diff --git a/PKHeX.Core/Legality/Verifiers/MemoryVerifier.cs b/PKHeX.Core/Legality/Verifiers/MemoryVerifier.cs index 230ae418a..ad3d324f0 100644 --- a/PKHeX.Core/Legality/Verifiers/MemoryVerifier.cs +++ b/PKHeX.Core/Legality/Verifiers/MemoryVerifier.cs @@ -344,7 +344,7 @@ private void VerifyOTMemory(LegalityAnalysis data) return; // {0} hatched from an Egg and saw {1} for the first time at... {2}. {4} that {3}. - case 2 when !enc.EggEncounter: + case 2 when !enc.IsEgg: data.AddLine(GetInvalid(string.Format(LMemoryArgBadHatch, L_XOT))); break; diff --git a/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs b/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs index f4f43fbd8..742c6fb5d 100644 --- a/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs +++ b/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs @@ -321,7 +321,7 @@ public void VerifyMiscG1(LegalityAnalysis data) var time = t.MetTimeOfDay; bool valid = data.EncounterOriginal switch { - EncounterGift2 g2 when (!g2.EggEncounter || pk.IsEgg) => time == 0, + EncounterGift2 g2 when (!g2.IsEgg || pk.IsEgg) => time == 0, EncounterTrade2 => time == 0, _ => time is 1 or 2 or 3, }; diff --git a/PKHeX.Core/Legality/Verifiers/NicknameVerifier.cs b/PKHeX.Core/Legality/Verifiers/NicknameVerifier.cs index f2aa274b1..ab600835f 100644 --- a/PKHeX.Core/Legality/Verifiers/NicknameVerifier.cs +++ b/PKHeX.Core/Legality/Verifiers/NicknameVerifier.cs @@ -219,7 +219,7 @@ private static int GetForeignNicknameLength(PKM pk, IEncounterTemplate match, by System.Diagnostics.Debug.Assert(match is not WC8 {IsHOMEGift:true}); int length = 0; - if (origin is (4 or 5 or 6 or 7) && match.EggEncounter && pk.WasTradedEgg) + if (origin is (4 or 5 or 6 or 7) && match.IsEgg && pk.WasTradedEgg) length = Legal.GetMaxLengthNickname(origin, English); if (pk.FatefulEncounter) diff --git a/PKHeX.Core/Legality/Verifiers/TrainerNameVerifier.cs b/PKHeX.Core/Legality/Verifiers/TrainerNameVerifier.cs index a4aca9d30..da55d1ee2 100644 --- a/PKHeX.Core/Legality/Verifiers/TrainerNameVerifier.cs +++ b/PKHeX.Core/Legality/Verifiers/TrainerNameVerifier.cs @@ -67,7 +67,7 @@ public override void Verify(LegalityAnalysis data) public static bool IsEdgeCaseLength(PKM pk, IEncounterTemplate e, ReadOnlySpan ot) { - if (e.EggEncounter) + if (e.IsEgg) { if (e is WC3 wc3 && pk.IsEgg && ot.SequenceEqual(wc3.OriginalTrainerName)) return true; // Fixed OT Mystery Gift Egg @@ -94,7 +94,7 @@ public void VerifyOTGB(LegalityAnalysis data) { // Transferring from RBY->Gen7 won't have OT Gender in PK1, nor will PK1 originated encounters. // GSC Trades already checked for OT Gender matching. - if (pk is { Format: > 2, VC1: true } || enc is { Generation: 1 } or EncounterGift2 { EggEncounter: false }) + if (pk is { Format: > 2, VC1: true } || enc is { Generation: 1 } or EncounterGift2 { IsEgg: false }) data.AddLine(GetInvalid(LG1OTGender)); } diff --git a/PKHeX.Core/MysteryGifts/MysteryGift.cs b/PKHeX.Core/MysteryGifts/MysteryGift.cs index 4775300a6..c28e5403c 100644 --- a/PKHeX.Core/MysteryGifts/MysteryGift.cs +++ b/PKHeX.Core/MysteryGifts/MysteryGift.cs @@ -164,12 +164,11 @@ public virtual Shiny Shiny public byte LevelMin => Level; public byte LevelMax => Level; public abstract byte Ball { get; set; } - public virtual bool EggEncounter => IsEgg; public abstract ushort EggLocation { get; set; } protected virtual bool IsMatchEggLocation(PKM pk) { - var expect = EggEncounter ? EggLocation : pk is PB8 ? Locations.Default8bNone : 0; + var expect = IsEgg ? EggLocation : pk is PB8 ? Locations.Default8bNone : 0; return pk.EggLocation == expect; } diff --git a/PKHeX.Core/MysteryGifts/PGT.cs b/PKHeX.Core/MysteryGifts/PGT.cs index c374d47c6..def1d92a3 100644 --- a/PKHeX.Core/MysteryGifts/PGT.cs +++ b/PKHeX.Core/MysteryGifts/PGT.cs @@ -91,7 +91,6 @@ private void EncryptPK() public bool IsHatched => GiftType == Pokémon; public override bool IsEgg { get => GiftType == PokémonEgg || IsManaphyEgg; set { if (value) { GiftType = PokémonEgg; PK.IsEgg = true; } } } public bool IsManaphyEgg { get => GiftType == ManaphyEgg; set { if (value) GiftType = ManaphyEgg; } } - public override bool EggEncounter => IsEgg; public override bool IsItem { get => GiftType == Item; set { if (value) GiftType = Item; } } public override bool IsEntity { get => GiftType is Pokémon or PokémonEgg or ManaphyEgg; set { } } @@ -145,7 +144,7 @@ public override PK4 ConvertToPKM(ITrainerInfo tr, EncounterCriteria criteria) private void SetMetData(PK4 pk4, ITrainerInfo trainer) { - if (!EggEncounter) + if (!IsEgg) { pk4.MetLocation = (ushort)(pk4.EggLocation + 3000); pk4.EggLocation = 0; diff --git a/PKHeX.Core/MysteryGifts/PL6.cs b/PKHeX.Core/MysteryGifts/PL6.cs index d9733a605..dfa14a01e 100644 --- a/PKHeX.Core/MysteryGifts/PL6.cs +++ b/PKHeX.Core/MysteryGifts/PL6.cs @@ -205,7 +205,6 @@ public Moveset Relearn public byte Generation => 6; public bool IsShiny => false; - public bool EggEncounter => false; public GameVersion Version => GameVersion.Gen6; public EntityContext Context => EntityContext.Gen6; public AbilityPermission Ability => (AbilityPermission)AbilityType; diff --git a/PKHeX.Core/PKM/Util/Conversion/IEntityRejuvenator.cs b/PKHeX.Core/PKM/Util/Conversion/IEntityRejuvenator.cs index ea705076e..47ba9f3dc 100644 --- a/PKHeX.Core/PKM/Util/Conversion/IEntityRejuvenator.cs +++ b/PKHeX.Core/PKM/Util/Conversion/IEntityRejuvenator.cs @@ -131,7 +131,7 @@ private static void RejuvenateBDSP(PKM result, PK8 original) if (enc is EncounterInvalid) return; - if (enc is { EggEncounter: true }) + if (enc is { IsEgg: true }) { result.MetLocation = Locations.HatchLocation8b; result.EggLocation = Locations.LinkTrade6NPC; @@ -154,7 +154,7 @@ private static void RejuvenateSV(PKM result, PK8 original) if (enc is EncounterInvalid) return; - if (enc is { EggEncounter: true }) + if (enc is { IsEgg: true }) { result.MetLocation = Locations.HatchLocation9; result.EggLocation = Locations.LinkTrade6NPC; diff --git a/PKHeX.Core/Saves/Substructures/Gen7/LGPE/GP1.cs b/PKHeX.Core/Saves/Substructures/Gen7/LGPE/GP1.cs index b2d674649..33df5ee55 100644 --- a/PKHeX.Core/Saves/Substructures/Gen7/LGPE/GP1.cs +++ b/PKHeX.Core/Saves/Substructures/Gen7/LGPE/GP1.cs @@ -15,7 +15,7 @@ public sealed class GP1(Memory Raw) public Span Data => Raw.Span; public GameVersion Version => GameVersion.GO; - public bool EggEncounter => false; + public bool IsEgg => false; public byte LevelMin => Level; public byte LevelMax => Level; public byte Generation => 7; diff --git a/PKHeX.Drawing.PokeSprite/Util/SpriteUtil.cs b/PKHeX.Drawing.PokeSprite/Util/SpriteUtil.cs index 6752bb90b..0ba330d3b 100644 --- a/PKHeX.Drawing.PokeSprite/Util/SpriteUtil.cs +++ b/PKHeX.Drawing.PokeSprite/Util/SpriteUtil.cs @@ -204,7 +204,7 @@ private static Bitmap ApplyExperience(PKM pk, Bitmap img, IEncounterTemplate? en if (pct is not 0) return ImageUtil.WritePixels(img, Color.DodgerBlue, start, start + (int)(SpriteWidth * pct * bpp)); - var encLevel = enc is { EggEncounter: true } ? enc.LevelMin : pk.MetLevel; + var encLevel = enc is { IsEgg: true } ? enc.LevelMin : pk.MetLevel; var color = level != encLevel && pk.HasOriginalMetLocation ? Color.DarkOrange : Color.Yellow; return ImageUtil.WritePixels(img, color, start, start + (SpriteWidth * bpp)); } @@ -258,7 +258,7 @@ public static Bitmap Sprite(this IEncounterTemplate enc) return GetMysteryGiftPreviewPoke(g); var gender = GetDisplayGender(enc); var shiny = enc.IsShiny ? Shiny.Always : Shiny.Never; - var img = GetSprite(enc.Species, enc.Form, gender, 0, 0, enc.EggEncounter, shiny, enc.Context); + var img = GetSprite(enc.Species, enc.Form, gender, 0, 0, enc.IsEgg, shiny, enc.Context); if (SpriteBuilder.ShowEncounterBall && enc is {FixedBall: not Ball.None}) { var ballSprite = GetBallSprite((byte)enc.FixedBall); diff --git a/PKHeX.WinForms/Subforms/SAV_Encounters.cs b/PKHeX.WinForms/Subforms/SAV_Encounters.cs index 617ab4c56..83cf5c8af 100644 --- a/PKHeX.WinForms/Subforms/SAV_Encounters.cs +++ b/PKHeX.WinForms/Subforms/SAV_Encounters.cs @@ -253,7 +253,7 @@ private IEnumerable SearchDatabase(CancellationToken token) var species = settings.Species == 0 ? GetFullRange(SAV.MaxSpeciesID) : [settings.Species]; var results = GetAllSpeciesFormEncounters(species, SAV.Personal, versions, moves, pk, token); if (settings.SearchEgg != null) - results = results.Where(z => z.EggEncounter == settings.SearchEgg); + results = results.Where(z => z.IsEgg == settings.SearchEgg); if (settings.SearchShiny != null) results = results.Where(z => z.IsShiny == settings.SearchShiny);