mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-03-21 17:48:28 -05:00
Refactor: Gen3/4 Lead Encounters, property fixing (#4193)
In addition to the Method 1 (and other sibling PIDIV types) correlation, an encounter can only be triggered if the calls prior land on the Method {1} seed. The RNG community has dubbed these patterns as "Method J" (D/P/Pt), "Method K" (HG/SS), and "Method H" (Gen3, coined by yours truly). The basic gist of these is that they are pre-requisites, like the Shadow locks of Colosseum/XD.
Rename/re-type a bunch of properties to get the codebase more in line with correct property names & more obvious underlying types.
This commit is contained in:
parent
eb673dcbc5
commit
95fbf66a6e
|
|
@ -22,7 +22,7 @@ public static IEnumerable<Ball> GetLegalBalls(PKM pk)
|
|||
var clone = pk.Clone();
|
||||
foreach (var b in BallList)
|
||||
{
|
||||
var ball = (int)b;
|
||||
var ball = (byte)b;
|
||||
clone.Ball = ball;
|
||||
if (clone.Ball != ball)
|
||||
continue; // Some setters guard against out of bounds values.
|
||||
|
|
@ -38,7 +38,7 @@ public static IEnumerable<Ball> GetLegalBalls(PKM pk)
|
|||
/// Requires checking the <see cref="LegalityAnalysis"/> for every <see cref="Ball"/> that is tried.
|
||||
/// </remarks>
|
||||
/// <param name="pk">Pokémon to modify.</param>
|
||||
public static int ApplyBallLegalRandom(PKM pk)
|
||||
public static byte ApplyBallLegalRandom(PKM pk)
|
||||
{
|
||||
Span<Ball> balls = stackalloc Ball[MaxBallSpanAlloc];
|
||||
var count = GetBallListFromColor(pk, balls);
|
||||
|
|
@ -54,7 +54,7 @@ public static int ApplyBallLegalRandom(PKM pk)
|
|||
/// Requires checking the <see cref="LegalityAnalysis"/> for every <see cref="Ball"/> that is tried.
|
||||
/// </remarks>
|
||||
/// <param name="pk">Pokémon to modify.</param>
|
||||
public static int ApplyBallLegalByColor(PKM pk)
|
||||
public static byte ApplyBallLegalByColor(PKM pk)
|
||||
{
|
||||
Span<Ball> balls = stackalloc Ball[MaxBallSpanAlloc];
|
||||
GetBallListFromColor(pk, balls);
|
||||
|
|
@ -65,20 +65,20 @@ public static int ApplyBallLegalByColor(PKM pk)
|
|||
/// Applies a random ball value in a cyclical manner.
|
||||
/// </summary>
|
||||
/// <param name="pk">Pokémon to modify.</param>
|
||||
public static int ApplyBallNext(PKM pk)
|
||||
public static byte ApplyBallNext(PKM pk)
|
||||
{
|
||||
Span<Ball> balls = stackalloc Ball[MaxBallSpanAlloc];
|
||||
GetBallList(pk.Ball, balls);
|
||||
var next = balls[0];
|
||||
return pk.Ball = (int)next;
|
||||
return pk.Ball = (byte)next;
|
||||
}
|
||||
|
||||
private static int ApplyFirstLegalBall(PKM pk, ReadOnlySpan<Ball> balls)
|
||||
private static byte ApplyFirstLegalBall(PKM pk, ReadOnlySpan<Ball> balls)
|
||||
{
|
||||
var initial = pk.Ball;
|
||||
foreach (var b in balls)
|
||||
{
|
||||
var test = (int)b;
|
||||
var test = (byte)b;
|
||||
pk.Ball = test;
|
||||
if (new LegalityAnalysis(pk).Valid)
|
||||
return test;
|
||||
|
|
@ -86,7 +86,7 @@ private static int ApplyFirstLegalBall(PKM pk, ReadOnlySpan<Ball> balls)
|
|||
return initial; // fail, revert
|
||||
}
|
||||
|
||||
private static int GetBallList(int ball, Span<Ball> result)
|
||||
private static int GetBallList(byte ball, Span<Ball> result)
|
||||
{
|
||||
var balls = BallList;
|
||||
var currentBall = (Ball)ball;
|
||||
|
|
|
|||
|
|
@ -40,16 +40,16 @@ public static byte GetSuggestedCatchRate(PK1 pk, SaveFile sav, LegalityAnalysis
|
|||
}
|
||||
}
|
||||
|
||||
private static PersonalTable1 GetPersonalTable(SaveFile sav, GameVersion ver)
|
||||
private static PersonalTable1 GetPersonalTable(SaveFile sav, GameVersion version)
|
||||
{
|
||||
if (sav.Personal is PersonalTable1 pt)
|
||||
{
|
||||
var other = sav.Version;
|
||||
if (other.Contains(ver) || ver.Contains(other))
|
||||
if (other.Contains(version) || version.Contains(other))
|
||||
return pt;
|
||||
}
|
||||
|
||||
if (!GameVersion.RB.Contains(ver))
|
||||
if (!GameVersion.RB.Contains(version))
|
||||
return PersonalTable.Y;
|
||||
return PersonalTable.RB;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,9 +13,16 @@ public static class GenderApplicator
|
|||
/// <param name="pk">Pokémon to modify.</param>
|
||||
/// <param name="gender">Desired <see cref="PKM.Gender"/> value to set.</param>
|
||||
/// <remarks>Has special logic for an unspecified gender.</remarks>
|
||||
public static void SetSaneGender(this PKM pk, int gender)
|
||||
public static void SetSaneGender(this PKM pk, byte gender)
|
||||
{
|
||||
int g = gender == -1 ? pk.GetSaneGender() : gender;
|
||||
var g = gender > 2 ? pk.GetSaneGender() : gender;
|
||||
pk.SetGender(g);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="SetSaneGender(PKM, byte)"/>
|
||||
public static void SetSaneGender(this PKM pk, byte? gender)
|
||||
{
|
||||
var g = gender ?? pk.GetSaneGender();
|
||||
pk.SetGender(g);
|
||||
}
|
||||
|
||||
|
|
@ -24,9 +31,9 @@ public static void SetSaneGender(this PKM pk, int gender)
|
|||
/// </summary>
|
||||
/// <param name="pk">Pokémon to modify.</param>
|
||||
/// <param name="gender">Desired <see cref="PKM.Gender"/> value to set.</param>
|
||||
public static void SetGender(this PKM pk, int gender)
|
||||
public static void SetGender(this PKM pk, byte gender)
|
||||
{
|
||||
gender = Math.Clamp(gender, 0, 2);
|
||||
gender = Math.Clamp(gender, (byte)0, (byte)2);
|
||||
if (pk.Gender == gender)
|
||||
return;
|
||||
|
||||
|
|
@ -50,7 +57,7 @@ public static void SetGender(this PKM pk, int gender)
|
|||
/// </summary>
|
||||
/// <param name="pk"></param>
|
||||
/// <returns>Most-legal <see cref="PKM.Gender"/> value</returns>
|
||||
public static int GetSaneGender(this PKM pk)
|
||||
public static byte GetSaneGender(this PKM pk)
|
||||
{
|
||||
var gt = pk.PersonalInfo.Gender;
|
||||
switch (gt)
|
||||
|
|
@ -69,7 +76,7 @@ public static int GetSaneGender(this PKM pk)
|
|||
/// </summary>
|
||||
/// <param name="pk">Pokémon to modify.</param>
|
||||
/// <param name="gender">Desired <see cref="PKM.Gender"/>.</param>
|
||||
public static void SetAttackIVFromGender(this PKM pk, int gender)
|
||||
public static void SetAttackIVFromGender(this PKM pk, byte gender)
|
||||
{
|
||||
var rnd = Util.Rand;
|
||||
while (pk.Gender != gender)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ public static class MemoryApplicator
|
|||
public static void ClearMemories(this PKM pk)
|
||||
{
|
||||
if (pk is IAffection a)
|
||||
a.OT_Affection = a.HT_Affection = 0;
|
||||
a.OriginalTrainerAffection = a.HandlingTrainerAffection = 0;
|
||||
if (pk is IMemoryOT o)
|
||||
o.ClearMemoriesOT();
|
||||
if (pk is IMemoryHT h)
|
||||
|
|
@ -27,13 +27,13 @@ public static void SetHatchMemory6(this PKM pk)
|
|||
{
|
||||
if (pk is IMemoryOT o)
|
||||
{
|
||||
o.OT_Memory = 2;
|
||||
o.OT_Feeling = MemoryContext6.GetRandomFeeling6(2);
|
||||
o.OT_Intensity = 1;
|
||||
o.OT_TextVar = pk.XY ? (ushort)43 : (ushort)27; // riverside road : battling spot
|
||||
o.OriginalTrainerMemory = 2;
|
||||
o.OriginalTrainerMemoryFeeling = MemoryContext6.GetRandomFeeling6(2);
|
||||
o.OriginalTrainerMemoryIntensity = 1;
|
||||
o.OriginalTrainerMemoryVariable = pk.XY ? (ushort)43 : (ushort)27; // riverside road : battling spot
|
||||
}
|
||||
if (pk is IAffection a)
|
||||
a.OT_Affection = 0;
|
||||
a.OriginalTrainerAffection = 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -44,8 +44,8 @@ public static void SetRandomMemory6(this PK6 pk)
|
|||
{
|
||||
// for lack of better randomization :)
|
||||
const byte memory = 63; // almost got lost when it explored a forest with {Trainer}
|
||||
pk.OT_Memory = memory;
|
||||
pk.OT_Feeling = MemoryContext6.GetRandomFeeling6(memory);
|
||||
pk.OT_Intensity = MemoryContext6.MaxIntensity;
|
||||
pk.OriginalTrainerMemory = memory;
|
||||
pk.OriginalTrainerMemoryFeeling = MemoryContext6.GetRandomFeeling6(memory);
|
||||
pk.OriginalTrainerMemoryIntensity = MemoryContext6.MaxIntensity;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -500,9 +500,9 @@ private static ModifyResult SetByteArrayProperty(PKM pk, StringInstruction cmd)
|
|||
{
|
||||
switch (cmd.PropertyName)
|
||||
{
|
||||
case nameof(PKM.Nickname_Trash): StringUtil.LoadHexBytesTo(cmd.PropertyValue.AsSpan(CONST_BYTES.Length), pk.Nickname_Trash, 3); return ModifyResult.Modified;
|
||||
case nameof(PKM.OT_Trash): StringUtil.LoadHexBytesTo(cmd.PropertyValue.AsSpan(CONST_BYTES.Length), pk.OT_Trash, 3); return ModifyResult.Modified;
|
||||
case nameof(PKM.HT_Trash): StringUtil.LoadHexBytesTo(cmd.PropertyValue.AsSpan(CONST_BYTES.Length), pk.HT_Trash, 3); return ModifyResult.Modified;
|
||||
case nameof(PKM.NicknameTrash): StringUtil.LoadHexBytesTo(cmd.PropertyValue.AsSpan(CONST_BYTES.Length), pk.NicknameTrash, 3); return ModifyResult.Modified;
|
||||
case nameof(PKM.OriginalTrainerTrash): StringUtil.LoadHexBytesTo(cmd.PropertyValue.AsSpan(CONST_BYTES.Length), pk.OriginalTrainerTrash, 3); return ModifyResult.Modified;
|
||||
case nameof(PKM.HandlingTrainerTrash): StringUtil.LoadHexBytesTo(cmd.PropertyValue.AsSpan(CONST_BYTES.Length), pk.HandlingTrainerTrash, 3); return ModifyResult.Modified;
|
||||
default:
|
||||
return ModifyResult.Error;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public static class BatchMods
|
|||
new ComplexSuggestion(PROP_EVS, (_, _, info) => BatchModifications.SetEVs(info.Entity)),
|
||||
new ComplexSuggestion(nameof(PKM.RelearnMoves), (_, value, info) => BatchModifications.SetSuggestedRelearnData(info, value)),
|
||||
new ComplexSuggestion(PROP_RIBBONS, (_, value, info) => BatchModifications.SetSuggestedRibbons(info, value)),
|
||||
new ComplexSuggestion(nameof(PKM.Met_Location), (_, _, info) => BatchModifications.SetSuggestedMetData(info)),
|
||||
new ComplexSuggestion(nameof(PKM.MetLocation), (_, _, info) => BatchModifications.SetSuggestedMetData(info)),
|
||||
new ComplexSuggestion(nameof(PKM.CurrentLevel), (_, _, info) => BatchModifications.SetMinimumCurrentLevel(info)),
|
||||
new ComplexSuggestion(PROP_CONTESTSTATS, p => p is IContestStats, (_, value, info) => BatchModifications.SetContestStats(info.Entity, info.Legality, value)),
|
||||
new ComplexSuggestion(PROP_MOVEMASTERY, (_, value, info) => BatchModifications.SetSuggestedMasteryData(info, value)),
|
||||
|
|
|
|||
|
|
@ -92,12 +92,12 @@ public static ModifyResult SetSuggestedMetData(BatchInfo info)
|
|||
if (encounter == null)
|
||||
return ModifyResult.Error;
|
||||
|
||||
int level = encounter.LevelMin;
|
||||
int location = encounter.Location;
|
||||
int minimumLevel = EncounterSuggestion.GetLowestLevel(pk, encounter.LevelMin);
|
||||
var location = encounter.Location;
|
||||
var level = encounter.LevelMin;
|
||||
var minimumLevel = EncounterSuggestion.GetLowestLevel(pk, level);
|
||||
|
||||
pk.Met_Level = level;
|
||||
pk.Met_Location = location;
|
||||
pk.MetLevel = level;
|
||||
pk.MetLocation = location;
|
||||
pk.CurrentLevel = Math.Max(minimumLevel, level);
|
||||
|
||||
return ModifyResult.Modified;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace PKHeX.Core;
|
|||
public static class CommonEdits
|
||||
{
|
||||
/// <summary>
|
||||
/// Setting which enables/disables automatic manipulation of <see cref="PKM.MarkValue"/> when importing from a <see cref="IBattleTemplate"/>.
|
||||
/// Setting which enables/disables automatic manipulation of <see cref="IAppliedMarkings"/> when importing from a <see cref="IBattleTemplate"/>.
|
||||
/// </summary>
|
||||
public static bool ShowdownSetIVMarkings { get; set; } = true;
|
||||
|
||||
|
|
@ -51,12 +51,12 @@ public static string ClearNickname(this PKM pk)
|
|||
/// Sets the <see cref="PKM.Ability"/> value by sanity checking the provided <see cref="PKM.Ability"/> against the possible pool of abilities.
|
||||
/// </summary>
|
||||
/// <param name="pk">Pokémon to modify.</param>
|
||||
/// <param name="abil">Desired <see cref="Ability"/> value to set.</param>
|
||||
public static void SetAbility(this PKM pk, int abil)
|
||||
/// <param name="abilityID">Desired <see cref="Ability"/> value to set.</param>
|
||||
public static void SetAbility(this PKM pk, int abilityID)
|
||||
{
|
||||
if (abil < 0)
|
||||
if (abilityID < 0)
|
||||
return;
|
||||
var index = pk.PersonalInfo.GetIndexOfAbility(abil);
|
||||
var index = pk.PersonalInfo.GetIndexOfAbility(abilityID);
|
||||
index = Math.Max(0, index);
|
||||
pk.SetAbilityIndex(index);
|
||||
}
|
||||
|
|
@ -82,7 +82,7 @@ public static void SetAbilityIndex(this PKM pk, int index)
|
|||
/// <param name="pk">Pokémon to modify.</param>
|
||||
public static void SetRandomEC(this PKM pk)
|
||||
{
|
||||
int gen = pk.Generation;
|
||||
var gen = pk.Generation;
|
||||
if (gen is 3 or 4 or 5)
|
||||
{
|
||||
pk.EncryptionConstant = pk.PID;
|
||||
|
|
@ -109,7 +109,7 @@ public static bool SetShiny(PKM pk, Shiny type = Shiny.Random)
|
|||
if (pk.IsShiny && type.IsValid(pk))
|
||||
return false;
|
||||
|
||||
if (type == Shiny.Random || pk.FatefulEncounter || pk.Version == (int)GameVersion.GO || pk.Format <= 2)
|
||||
if (type == Shiny.Random || pk.FatefulEncounter || pk.Version == GameVersion.GO || pk.Format <= 2)
|
||||
{
|
||||
pk.SetShiny();
|
||||
return true;
|
||||
|
|
@ -140,16 +140,18 @@ public static bool SetUnshiny(this PKM pk)
|
|||
/// </summary>
|
||||
/// <param name="pk">Pokémon to modify.</param>
|
||||
/// <param name="nature">Desired <see cref="PKM.Nature"/> value to set.</param>
|
||||
public static void SetNature(this PKM pk, int nature)
|
||||
public static void SetNature(this PKM pk, Nature nature)
|
||||
{
|
||||
var value = Math.Clamp(nature, (int)Nature.Hardy, (int)Nature.Quirky);
|
||||
if (!nature.IsFixed())
|
||||
nature = 0; // default valid
|
||||
|
||||
var format = pk.Format;
|
||||
if (format >= 8)
|
||||
pk.StatNature = value;
|
||||
pk.StatNature = nature;
|
||||
else if (format is 3 or 4)
|
||||
pk.SetPIDNature(value);
|
||||
pk.SetPIDNature(nature);
|
||||
else
|
||||
pk.Nature = value;
|
||||
pk.Nature = nature;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -344,12 +346,12 @@ public static void ForceHatchPKM(this PKM pk, ITrainerInfo? tr = null, bool reHa
|
|||
pk.ClearNickname();
|
||||
pk.CurrentFriendship = pk.PersonalInfo.BaseFriendship;
|
||||
if (pk.IsTradedEgg)
|
||||
pk.Egg_Location = pk.Met_Location;
|
||||
pk.EggLocation = pk.MetLocation;
|
||||
if (pk.Version == 0)
|
||||
pk.Version = (int)EggStateLegality.GetEggHatchVersion(pk, (GameVersion)(tr?.Game ?? RecentTrainerCache.Game));
|
||||
pk.Version = EggStateLegality.GetEggHatchVersion(pk, tr?.Version ?? RecentTrainerCache.Version);
|
||||
var loc = EncounterSuggestion.GetSuggestedEggMetLocation(pk);
|
||||
if (loc >= 0)
|
||||
pk.Met_Location = loc;
|
||||
if (loc != EncounterSuggestion.LocationNone)
|
||||
pk.MetLocation = loc;
|
||||
if (pk.Format >= 4)
|
||||
pk.MetDate = EncounterDate.GetDate(pk.Context.GetConsole());
|
||||
if (pk.Gen6)
|
||||
|
|
@ -371,7 +373,7 @@ public static void SetEggMetData(this PKM pk, GameVersion origin, GameVersion de
|
|||
var date = EncounterDate.GetDate(console);
|
||||
var today = pk.MetDate = date;
|
||||
bool traded = origin != dest;
|
||||
pk.Egg_Location = EncounterSuggestion.GetSuggestedEncounterEggLocationEgg(pk.Generation, origin, traded);
|
||||
pk.EggLocation = EncounterSuggestion.GetSuggestedEncounterEggLocationEgg(pk.Generation, origin, traded);
|
||||
pk.EggMetDate = today;
|
||||
}
|
||||
|
||||
|
|
@ -382,7 +384,7 @@ public static void SetEggMetData(this PKM pk, GameVersion origin, GameVersion de
|
|||
public static void MaximizeFriendship(this PKM pk)
|
||||
{
|
||||
if (pk.IsEgg)
|
||||
pk.OT_Friendship = 1;
|
||||
pk.OriginalTrainerFriendship = 1;
|
||||
else
|
||||
pk.CurrentFriendship = byte.MaxValue;
|
||||
if (pk is ICombatPower pb)
|
||||
|
|
@ -433,8 +435,8 @@ public static string GetLocationString(this PKM pk, bool eggmet)
|
|||
if (pk.Format < 2)
|
||||
return string.Empty;
|
||||
|
||||
int location = eggmet ? pk.Egg_Location : pk.Met_Location;
|
||||
return GameInfo.GetLocationName(eggmet, location, pk.Format, pk.Generation, (GameVersion)pk.Version);
|
||||
ushort location = eggmet ? pk.EggLocation : pk.MetLocation;
|
||||
return GameInfo.GetLocationName(eggmet, location, pk.Format, pk.Generation, pk.Version);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -16,23 +16,15 @@ public sealed class TrainerDatabase
|
|||
/// <param name="version">Version the trainer should originate from</param>
|
||||
/// <param name="language">Language to request for</param>
|
||||
/// <returns>Null if no trainer found for this version.</returns>
|
||||
public ITrainerInfo? GetTrainer(int version, LanguageID? language = null) => GetTrainer((GameVersion)version, language);
|
||||
|
||||
/// <summary>
|
||||
/// Fetches an appropriate trainer based on the requested <see cref="ver"/>.
|
||||
/// </summary>
|
||||
/// <param name="ver">Version the trainer should originate from</param>
|
||||
/// <param name="language">Language to request for</param>
|
||||
/// <returns>Null if no trainer found for this version.</returns>
|
||||
public ITrainerInfo? GetTrainer(GameVersion ver, LanguageID? language = null)
|
||||
public ITrainerInfo? GetTrainer(GameVersion version, LanguageID? language = null)
|
||||
{
|
||||
if (ver <= 0)
|
||||
if (version <= 0)
|
||||
return null;
|
||||
|
||||
if (!ver.IsValidSavedVersion())
|
||||
return GetTrainerFromGroup(ver, language);
|
||||
if (!version.IsValidSavedVersion())
|
||||
return GetTrainerFromGroup(version, language);
|
||||
|
||||
if (Database.TryGetValue(ver, out var list))
|
||||
if (Database.TryGetValue(version, out var list))
|
||||
return GetRandomChoice(list);
|
||||
|
||||
return null;
|
||||
|
|
@ -46,14 +38,14 @@ private static T GetRandomChoice<T>(IReadOnlyList<T> list)
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fetches an appropriate trainer based on the requested <see cref="ver"/> group.
|
||||
/// Fetches an appropriate trainer based on the requested <see cref="version"/> group.
|
||||
/// </summary>
|
||||
/// <param name="ver">Version the trainer should originate from</param>
|
||||
/// <param name="version">Version the trainer should originate from</param>
|
||||
/// <param name="lang">Language to request for</param>
|
||||
/// <returns>Null if no trainer found for this version.</returns>
|
||||
private ITrainerInfo? GetTrainerFromGroup(GameVersion ver, LanguageID? lang = null)
|
||||
private ITrainerInfo? GetTrainerFromGroup(GameVersion version, LanguageID? lang = null)
|
||||
{
|
||||
var possible = Database.Where(z => ver.Contains(z.Key)).ToList();
|
||||
var possible = Database.Where(z => version.Contains(z.Key)).ToList();
|
||||
if (lang != null)
|
||||
{
|
||||
possible = possible.Select(z =>
|
||||
|
|
@ -71,7 +63,7 @@ private static T GetRandomChoice<T>(IReadOnlyList<T> list)
|
|||
/// <param name="generation">Generation the trainer should inhabit</param>
|
||||
/// <param name="lang">Language to request for</param>
|
||||
/// <returns>Null if no trainer found for this version.</returns>
|
||||
public ITrainerInfo? GetTrainerFromGen(int generation, LanguageID? lang = null)
|
||||
public ITrainerInfo? GetTrainerFromGen(byte generation, LanguageID? lang = null)
|
||||
{
|
||||
var possible = Database.Where(z => z.Key.GetGeneration() == generation).ToList();
|
||||
if (lang != null)
|
||||
|
|
@ -99,12 +91,10 @@ private static T GetRandomChoice<T>(IReadOnlyList<T> list)
|
|||
/// <param name="trainer">Trainer details to add.</param>
|
||||
public void Register(ITrainerInfo trainer)
|
||||
{
|
||||
var ver = (GameVersion)trainer.Game;
|
||||
if (ver <= 0 && trainer is SaveFile s)
|
||||
ver = s.Version;
|
||||
if (!Database.TryGetValue(ver, out var list))
|
||||
var version = trainer.Version;
|
||||
if (!Database.TryGetValue(version, out var list))
|
||||
{
|
||||
Database.Add(ver, [trainer]);
|
||||
Database.Add(version, [trainer]);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -129,9 +119,9 @@ public void Register(ITrainerInfo trainer)
|
|||
|
||||
private static SimpleTrainerInfo GetTrainerReference(PKM pk)
|
||||
{
|
||||
var result = new SimpleTrainerInfo((GameVersion)pk.Version)
|
||||
var result = new SimpleTrainerInfo(pk.Version)
|
||||
{
|
||||
TID16 = pk.TID16, SID16 = pk.SID16, OT = pk.OT_Name, Gender = pk.OT_Gender,
|
||||
TID16 = pk.TID16, SID16 = pk.SID16, OT = pk.OriginalTrainerName, Gender = pk.OriginalTrainerGender,
|
||||
Language = pk.Language,
|
||||
Generation = pk.Generation,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -310,4 +310,13 @@ public static uint SetIVsBigEndian(int type, uint ivs)
|
|||
0b111101, // Dragon
|
||||
0b111111, // Dark
|
||||
];
|
||||
|
||||
/// <summary>
|
||||
/// Gets the suggested low-bits for the input Hidden Power Type
|
||||
/// </summary>
|
||||
public static byte GetLowBits(int type)
|
||||
{
|
||||
var arr = DefaultLowBits;
|
||||
return (uint)type < arr.Length ? arr[type] : (byte)0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public interface IBattleTemplate : ISpeciesForm, IGigantamaxReadOnly, IDynamaxLe
|
|||
/// <summary>
|
||||
/// <see cref="PKM.Gender"/> name of the Set entity.
|
||||
/// </summary>
|
||||
int Gender { get; }
|
||||
byte? Gender { get; }
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="PKM.HeldItem"/> of the Set entity.
|
||||
|
|
@ -33,7 +33,7 @@ public interface IBattleTemplate : ISpeciesForm, IGigantamaxReadOnly, IDynamaxLe
|
|||
/// <summary>
|
||||
/// <see cref="PKM.CurrentLevel"/> of the Set entity.
|
||||
/// </summary>
|
||||
int Level { get; }
|
||||
byte Level { get; }
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="PKM.CurrentLevel"/> of the Set entity.
|
||||
|
|
@ -43,7 +43,7 @@ public interface IBattleTemplate : ISpeciesForm, IGigantamaxReadOnly, IDynamaxLe
|
|||
/// <summary>
|
||||
/// <see cref="PKM.CurrentFriendship"/> of the Set entity.
|
||||
/// </summary>
|
||||
int Friendship { get; }
|
||||
byte Friendship { get; }
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="PKM.Form"/> name of the Set entity, stored in PKHeX style (instead of Showdown's)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ public interface ISpriteBuilder<T>
|
|||
/// <summary>
|
||||
/// Gets a sprite using the requested parameters.
|
||||
/// </summary>
|
||||
T GetSprite(ushort species, byte form, int gender, uint formarg, int heldItem, bool isEgg, Shiny shiny,
|
||||
T GetSprite(ushort species, byte form, byte gender, uint formarg, int heldItem, bool isEgg, Shiny shiny,
|
||||
EntityContext context = EntityContext.None);
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -8,12 +8,12 @@ public static class LocationEdits
|
|||
/// <summary>
|
||||
/// Gets the "None" location index for a specific <see cref="PKM"/> context.
|
||||
/// </summary>
|
||||
public static int GetNoneLocation(PKM pk) => GetNoneLocation(pk.Context);
|
||||
public static ushort GetNoneLocation(PKM pk) => GetNoneLocation(pk.Context);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the "None" location index for a specific <see cref="PKM"/> context.
|
||||
/// </summary>
|
||||
public static int GetNoneLocation(EntityContext context) => context switch
|
||||
public static ushort GetNoneLocation(EntityContext context) => context switch
|
||||
{
|
||||
EntityContext.Gen8b => Locations.Default8bNone,
|
||||
_ => 0,
|
||||
|
|
|
|||
|
|
@ -15,18 +15,18 @@ public static class NatureAmp
|
|||
/// <param name="statIndex">Stat Index to mutate</param>
|
||||
/// <param name="currentNature">Current nature to derive the current amps from</param>
|
||||
/// <returns>New nature value</returns>
|
||||
public static int GetNewNature(this NatureAmpRequest type, int statIndex, int currentNature)
|
||||
public static Nature GetNewNature(this NatureAmpRequest type, int statIndex, Nature currentNature)
|
||||
{
|
||||
if (currentNature >= NatureCount)
|
||||
return -1;
|
||||
if ((uint)currentNature >= NatureCount)
|
||||
return Nature.Random;
|
||||
|
||||
var (up, dn) = GetNatureModification(currentNature);
|
||||
|
||||
return GetNewNature(type, statIndex, up, dn);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="GetNewNature(NatureAmpRequest,int,int)"/>
|
||||
public static int GetNewNature(NatureAmpRequest type, int statIndex, int up, int dn)
|
||||
/// <inheritdoc cref="GetNewNature(NatureAmpRequest,int,Nature)"/>
|
||||
public static Nature GetNewNature(NatureAmpRequest type, int statIndex, int up, int dn)
|
||||
{
|
||||
//
|
||||
switch (type)
|
||||
|
|
@ -41,7 +41,7 @@ public static int GetNewNature(NatureAmpRequest type, int statIndex, int up, int
|
|||
up = dn = statIndex;
|
||||
break;
|
||||
default:
|
||||
return -1; // failure
|
||||
return Nature.Random; // failure
|
||||
}
|
||||
|
||||
return CreateNatureFromAmps(up, dn);
|
||||
|
|
@ -53,20 +53,20 @@ public static int GetNewNature(NatureAmpRequest type, int statIndex, int up, int
|
|||
/// <param name="up">Increased stat</param>
|
||||
/// <param name="dn">Decreased stat</param>
|
||||
/// <returns>Nature</returns>
|
||||
public static int CreateNatureFromAmps(int up, int dn)
|
||||
public static Nature CreateNatureFromAmps(int up, int dn)
|
||||
{
|
||||
if ((uint)up > 5 || (uint)dn > 5)
|
||||
return -1;
|
||||
return (up * 5) + dn;
|
||||
return Nature.Random;
|
||||
return (Nature)((up * 5) + dn);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Decompose the nature to the two stat indexes that are modified
|
||||
/// </summary>
|
||||
public static (int up, int dn) GetNatureModification(int nature)
|
||||
public static (int up, int dn) GetNatureModification(Nature nature)
|
||||
{
|
||||
var up = (nature / 5);
|
||||
var dn = (nature % 5);
|
||||
var up = ((byte)nature / 5);
|
||||
var dn = ((byte)nature % 5);
|
||||
return (up, dn);
|
||||
}
|
||||
|
||||
|
|
@ -77,13 +77,13 @@ public static (int up, int dn) GetNatureModification(int nature)
|
|||
/// <param name="up">Increased stat</param>
|
||||
/// <param name="dn">Decreased stat</param>
|
||||
/// <returns>True if nature modification values are equal or the Nature is out of range.</returns>
|
||||
public static bool IsNeutralOrInvalid(int nature, int up, int dn)
|
||||
public static bool IsNeutralOrInvalid(Nature nature, int up, int dn)
|
||||
{
|
||||
return up == dn || nature >= 25; // invalid
|
||||
return up == dn || (byte)nature >= 25; // invalid
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IsNeutralOrInvalid(int, int, int)"/>
|
||||
public static bool IsNeutralOrInvalid(int nature)
|
||||
/// <inheritdoc cref="IsNeutralOrInvalid(Nature, int, int)"/>
|
||||
public static bool IsNeutralOrInvalid(Nature nature)
|
||||
{
|
||||
var (up, dn) = GetNatureModification(nature);
|
||||
return IsNeutralOrInvalid(nature, up, dn);
|
||||
|
|
@ -94,7 +94,7 @@ public static bool IsNeutralOrInvalid(int nature)
|
|||
/// </summary>
|
||||
/// <param name="stats">Current stats to amplify if appropriate</param>
|
||||
/// <param name="nature">Nature</param>
|
||||
public static void ModifyStatsForNature(Span<ushort> stats, int nature)
|
||||
public static void ModifyStatsForNature(Span<ushort> stats, Nature nature)
|
||||
{
|
||||
var (up, dn) = GetNatureModification(nature);
|
||||
if (IsNeutralOrInvalid(nature, up, dn))
|
||||
|
|
@ -139,17 +139,17 @@ public static void ModifyStatsForNature(Span<ushort> stats, int nature)
|
|||
0, 0, 0, 0, 0, // Quirky
|
||||
];
|
||||
|
||||
private const int NatureCount = 25;
|
||||
private const byte NatureCount = 25;
|
||||
private const int AmpWidth = 5;
|
||||
|
||||
public static int AmplifyStat(int nature, int index, int initial) => GetNatureAmp(nature, index) switch
|
||||
public static int AmplifyStat(Nature nature, int index, int initial) => GetNatureAmp(nature, index) switch
|
||||
{
|
||||
1 => 110 * initial / 100, // 110%
|
||||
-1 => 90 * initial / 100, // 90%
|
||||
_ => initial,
|
||||
};
|
||||
|
||||
private static sbyte GetNatureAmp(int nature, int index)
|
||||
private static sbyte GetNatureAmp(Nature nature, int index)
|
||||
{
|
||||
if ((uint)nature >= NatureCount)
|
||||
return -1;
|
||||
|
|
@ -157,11 +157,11 @@ private static sbyte GetNatureAmp(int nature, int index)
|
|||
return amps[index];
|
||||
}
|
||||
|
||||
public static ReadOnlySpan<sbyte> GetAmps(int nature)
|
||||
public static ReadOnlySpan<sbyte> GetAmps(Nature nature)
|
||||
{
|
||||
if ((uint)nature >= NatureCount)
|
||||
nature = 0;
|
||||
return Table.Slice(AmpWidth * nature, AmpWidth);
|
||||
return Table.Slice(AmpWidth * (byte)nature, AmpWidth);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,12 +9,12 @@ namespace PKHeX.Core;
|
|||
/// </summary>
|
||||
public static class EntitySuggestionUtil
|
||||
{
|
||||
public static List<string> GetMetLocationSuggestionMessage(PKM pk, int level, int location, int minimumLevel, IEncounterable? enc)
|
||||
public static List<string> GetMetLocationSuggestionMessage(PKM pk, int level, ushort location, int minimumLevel, IEncounterable? enc)
|
||||
{
|
||||
var suggestion = new List<string> { MsgPKMSuggestionStart };
|
||||
if (pk.Format >= 3)
|
||||
{
|
||||
var metList = GameInfo.GetLocationList((GameVersion)pk.Version, pk.Context, egg: false);
|
||||
var metList = GameInfo.GetLocationList(pk.Version, pk.Context, egg: false);
|
||||
var locationName = metList.First(loc => loc.Value == location).Text;
|
||||
suggestion.Add($"{MsgPKMSuggestionMetLocation} {locationName}");
|
||||
suggestion.Add($"{MsgPKMSuggestionMetLevel} {level}");
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public class EntitySummary : IFatefulEncounterReadOnly // do NOT seal, allow inh
|
|||
public virtual string Position => "???";
|
||||
public string Nickname => pk.Nickname;
|
||||
public string Species => Get(Strings.specieslist, pk.Species);
|
||||
public string Nature => Get(Strings.natures, pk.StatNature);
|
||||
public string Nature => Get(Strings.natures, (byte)pk.StatNature);
|
||||
public string Gender => Get(GenderSymbols, pk.Gender);
|
||||
public string ESV => pk.PSV.ToString("0000");
|
||||
public string HP_Type => Get(Strings.types, pk.HPType + 1);
|
||||
|
|
@ -38,44 +38,44 @@ public class EntitySummary : IFatefulEncounterReadOnly // do NOT seal, allow inh
|
|||
public string MetLoc => pk.GetLocationString(eggmet: false);
|
||||
public string EggLoc => pk.GetLocationString(eggmet: true);
|
||||
public string Ball => Get(Strings.balllist, pk.Ball);
|
||||
public string OT => pk.OT_Name;
|
||||
public string Version => Get(Strings.gamelist, pk.Version);
|
||||
public string OT => pk.OriginalTrainerName;
|
||||
public string Version => Get(Strings.gamelist, (int)pk.Version);
|
||||
public string OTLang => ((LanguageID)pk.Language).ToString();
|
||||
public string Legal { get { var la = new LegalityAnalysis(pk); return la.Parsed ? la.Valid.ToString() : "-"; } }
|
||||
|
||||
#region Extraneous
|
||||
public string EC => pk.EncryptionConstant.ToString("X8");
|
||||
public string PID => pk.PID.ToString("X8");
|
||||
public int HP_IV => pk.IV_HP;
|
||||
public int ATK_IV => pk.IV_ATK;
|
||||
public int DEF_IV => pk.IV_DEF;
|
||||
public int SPA_IV => pk.IV_SPA;
|
||||
public int SPD_IV => pk.IV_SPD;
|
||||
public int SPE_IV => pk.IV_SPE;
|
||||
public int IV_HP => pk.IV_HP;
|
||||
public int IV_ATK => pk.IV_ATK;
|
||||
public int IV_DEF => pk.IV_DEF;
|
||||
public int IV_SPA => pk.IV_SPA;
|
||||
public int IV_SPD => pk.IV_SPD;
|
||||
public int IV_SPE => pk.IV_SPE;
|
||||
public uint EXP => pk.EXP;
|
||||
public int Level => pk.CurrentLevel;
|
||||
public int HP_EV => pk.EV_HP;
|
||||
public int ATK_EV => pk.EV_ATK;
|
||||
public int DEF_EV => pk.EV_DEF;
|
||||
public int SPA_EV => pk.EV_SPA;
|
||||
public int SPD_EV => pk.EV_SPD;
|
||||
public int SPE_EV => pk.EV_SPE;
|
||||
public int Cool => pk is IContestStatsReadOnly s ? s.CNT_Cool : 0;
|
||||
public int Beauty => pk is IContestStatsReadOnly s ? s.CNT_Beauty : 0;
|
||||
public int Cute => pk is IContestStatsReadOnly s ? s.CNT_Cute : 0;
|
||||
public int Smart => pk is IContestStatsReadOnly s ? s.CNT_Smart : 0;
|
||||
public int Tough => pk is IContestStatsReadOnly s ? s.CNT_Tough : 0;
|
||||
public int Sheen => pk is IContestStatsReadOnly s ? s.CNT_Sheen : 0;
|
||||
public int EV_HP => pk.EV_HP;
|
||||
public int EV_ATK => pk.EV_ATK;
|
||||
public int EV_DEF => pk.EV_DEF;
|
||||
public int EV_SPA => pk.EV_SPA;
|
||||
public int EV_SPD => pk.EV_SPD;
|
||||
public int EV_SPE => pk.EV_SPE;
|
||||
public int Cool => pk is IContestStatsReadOnly s ? s.ContestCool : 0;
|
||||
public int Beauty => pk is IContestStatsReadOnly s ? s.ContestBeauty : 0;
|
||||
public int Cute => pk is IContestStatsReadOnly s ? s.ContestCute : 0;
|
||||
public int Smart => pk is IContestStatsReadOnly s ? s.ContestSmart : 0;
|
||||
public int Tough => pk is IContestStatsReadOnly s ? s.ContestTough : 0;
|
||||
public int Sheen => pk is IContestStatsReadOnly s ? s.ContestSheen : 0;
|
||||
|
||||
public string NotOT => pk.Format > 5 ? pk.HT_Name : "N/A";
|
||||
public string NotOT => pk.Format > 5 ? pk.HandlingTrainerName : "N/A";
|
||||
|
||||
public int AbilityNum => pk.Format > 5 ? pk.AbilityNumber : -1;
|
||||
public int GenderFlag => pk.Gender;
|
||||
public byte GenderFlag => pk.Gender;
|
||||
public byte Form => pk.Form;
|
||||
public int PKRS_Strain => pk.PKRS_Strain;
|
||||
public int PKRS_Days => pk.PKRS_Days;
|
||||
public int MetLevel => pk.Met_Level;
|
||||
public int OT_Gender => pk.OT_Gender;
|
||||
public int PokerusStrain => pk.PokerusStrain;
|
||||
public int PokerusDays => pk.PokerusDays;
|
||||
public int MetLevel => pk.MetLevel;
|
||||
public byte OriginalTrainerGender => pk.OriginalTrainerGender;
|
||||
|
||||
public bool FatefulEncounter => pk.FatefulEncounter;
|
||||
public bool IsEgg => pk.IsEgg;
|
||||
|
|
@ -98,13 +98,13 @@ public class EntitySummary : IFatefulEncounterReadOnly // do NOT seal, allow inh
|
|||
public string Relearn3 => Get(Strings.movelist, pk.RelearnMove3);
|
||||
public string Relearn4 => Get(Strings.movelist, pk.RelearnMove4);
|
||||
public ushort Checksum => pk is ISanityChecksum s ? s.Checksum : Checksums.CRC16_CCITT(pk.Data.AsSpan(pk.SIZE_STORED));
|
||||
public int Friendship => pk.OT_Friendship;
|
||||
public int Egg_Year => pk.EggMetDate.GetValueOrDefault().Year;
|
||||
public int Egg_Month => pk.EggMetDate.GetValueOrDefault().Month;
|
||||
public int Egg_Day => pk.EggMetDate.GetValueOrDefault().Day;
|
||||
public int Met_Year => pk.MetDate.GetValueOrDefault().Year;
|
||||
public int Met_Month => pk.MetDate.GetValueOrDefault().Month;
|
||||
public int Met_Day => pk.MetDate.GetValueOrDefault().Day;
|
||||
public int Friendship => pk.OriginalTrainerFriendship;
|
||||
public int EggYear => pk.EggMetDate.GetValueOrDefault().Year;
|
||||
public int EggMonth => pk.EggMetDate.GetValueOrDefault().Month;
|
||||
public int EggDay => pk.EggMetDate.GetValueOrDefault().Day;
|
||||
public int MetYear => pk.MetDate.GetValueOrDefault().Year;
|
||||
public int MetMonth => pk.MetDate.GetValueOrDefault().Month;
|
||||
public int MetDay => pk.MetDate.GetValueOrDefault().Day;
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ public static void TemplateFields(PKM pk, ITrainerInfo tr)
|
|||
|
||||
pk.ClearNickname();
|
||||
|
||||
pk.OT_Name = tr.OT;
|
||||
pk.OT_Gender = tr.Gender;
|
||||
pk.OriginalTrainerName = tr.OT;
|
||||
pk.OriginalTrainerGender = tr.Gender;
|
||||
pk.ID32 = tr.ID32;
|
||||
if (tr is IRegionOrigin o && pk is IRegionOrigin gt)
|
||||
{
|
||||
|
|
@ -39,22 +39,14 @@ public static void TemplateFields(PKM pk, ITrainerInfo tr)
|
|||
pk.RefreshChecksum();
|
||||
}
|
||||
|
||||
private static int GetTemplateVersion(ITrainerInfo tr)
|
||||
private static GameVersion GetTemplateVersion(ITrainerInfo tr)
|
||||
{
|
||||
GameVersion version = (GameVersion)tr.Game;
|
||||
var version = tr.Version;
|
||||
if (version.IsValidSavedVersion())
|
||||
return (int)version;
|
||||
|
||||
if (tr is IVersion v)
|
||||
{
|
||||
version = v.Version;
|
||||
if (version.IsValidSavedVersion())
|
||||
return (int)version;
|
||||
version = v.GetSingleVersion();
|
||||
if (version.IsValidSavedVersion())
|
||||
return (int)version;
|
||||
}
|
||||
|
||||
return version;
|
||||
version = version.GetSingleVersion();
|
||||
if (version.IsValidSavedVersion())
|
||||
return version;
|
||||
return default; // 0
|
||||
}
|
||||
|
||||
|
|
@ -66,17 +58,17 @@ private static void ApplyTrashBytes(PKM pk, ITrainerInfo tr)
|
|||
switch (tr)
|
||||
{
|
||||
case SAV1 s1:
|
||||
s1.OT_Trash.CopyTo(pk12.OT_Trash);
|
||||
s1.OriginalTrainerTrash.CopyTo(pk12.OriginalTrainerTrash);
|
||||
break;
|
||||
case SAV2 s2:
|
||||
s2.OT_Trash.CopyTo(pk12.OT_Trash);
|
||||
s2.OriginalTrainerTrash.CopyTo(pk12.OriginalTrainerTrash);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private static ushort GetTemplateSpecies(PKM pk, ITrainerInfo tr)
|
||||
{
|
||||
ushort species = tr is IGameValueLimit s ? s.MaxSpeciesID : ((GameVersion)pk.Version).GetMaxSpeciesID();
|
||||
ushort species = tr is IGameValueLimit s ? s.MaxSpeciesID : pk.Version.GetMaxSpeciesID();
|
||||
if (species == 0)
|
||||
species = pk.MaxSpeciesID;
|
||||
return species;
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ public static class QRMessageUtil
|
|||
private const string QR6PathBad = "null/#";
|
||||
private const string QR6Path = "http://lunarcookies.github.io/b1s1.html#";
|
||||
private const string QR6PathWC = "http://lunarcookies.github.io/wc.html#";
|
||||
private static string GetExploitURLPrefixPKM(int format) => format == 6 ? QR6Path : QR6PathBad;
|
||||
private static string GetExploitURLPrefixWC(int format) => format == 6 ? QR6PathWC : QR6PathBad;
|
||||
private static string GetExploitURLPrefixPKM(byte format) => format == 6 ? QR6Path : QR6PathBad;
|
||||
private static string GetExploitURLPrefixWC(byte format) => format == 6 ? QR6PathWC : QR6PathBad;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="PKM"/> data from the message that is encoded in a QR.
|
||||
|
|
|
|||
|
|
@ -10,25 +10,24 @@ public sealed class QRPK7(byte[] Data) : IEncounterInfo
|
|||
{
|
||||
private readonly byte[] Data = (byte[])Data.Clone();
|
||||
|
||||
public GameVersion Version => (GameVersion)CassetteVersion;
|
||||
public bool EggEncounter => false;
|
||||
public byte LevelMin => Level;
|
||||
public byte LevelMax => Level;
|
||||
public int Generation => Version.GetGeneration();
|
||||
public byte Generation => Version.GetGeneration();
|
||||
public EntityContext Context => EntityContext.Gen7;
|
||||
public bool IsShiny => false;
|
||||
|
||||
public const int SIZE = 0x30;
|
||||
|
||||
public uint EncryptionConstant => ReadUInt32LittleEndian(Data.AsSpan(0));
|
||||
public byte HT_Flags => Data[4];
|
||||
public int Unk_5 => Data[5];
|
||||
public int Unk_6 => Data[6];
|
||||
public int Unk_7 => Data[7];
|
||||
public int Move1_PPUps => Data[8];
|
||||
public int Move2_PPUps => Data[9];
|
||||
public int Move3_PPUps => Data[0xA];
|
||||
public int Move4_PPUps => Data[0xB];
|
||||
public byte HyperTrainFlags => Data[4];
|
||||
public byte Unk_5 => Data[5];
|
||||
public byte Unk_6 => Data[6];
|
||||
public byte Unk_7 => Data[7];
|
||||
public byte Move1_PPUps => Data[8];
|
||||
public byte Move2_PPUps => Data[9];
|
||||
public byte Move3_PPUps => Data[0xA];
|
||||
public byte Move4_PPUps => Data[0xB];
|
||||
public uint IV32 { get => ReadUInt32LittleEndian(Data.AsSpan(0xC)); set => WriteUInt32LittleEndian(Data.AsSpan(0xC), value); }
|
||||
public int IV_HP { get => (int)(IV32 >> 00) & 0x1F; set => IV32 = (IV32 & ~(0x1Fu << 00)) | (uint)((value > 31 ? 31 : value) << 00); }
|
||||
public int IV_ATK { get => (int)(IV32 >> 05) & 0x1F; set => IV32 = (IV32 & ~(0x1Fu << 05)) | (uint)((value > 31 ? 31 : value) << 05); }
|
||||
|
|
@ -43,11 +42,11 @@ public sealed class QRPK7(byte[] Data) : IEncounterInfo
|
|||
public ushort Move2 => ReadUInt16LittleEndian(Data.AsSpan(0x1A));
|
||||
public ushort Move3 => ReadUInt16LittleEndian(Data.AsSpan(0x1C));
|
||||
public ushort Move4 => ReadUInt16LittleEndian(Data.AsSpan(0x1E));
|
||||
public int Unk_20 => Data[0x20];
|
||||
public int AbilityIndex => Data[0x21];
|
||||
public int Nature => Data[0x22];
|
||||
public byte Unk_20 => Data[0x20];
|
||||
public byte AbilityIndex => Data[0x21];
|
||||
public Nature Nature => (Nature)Data[0x22];
|
||||
public bool FatefulEncounter => (Data[0x23] & 1) == 1;
|
||||
public int Gender => (Data[0x23] >> 1) & 3;
|
||||
public byte Gender => (byte)((Data[0x23] >> 1) & 3);
|
||||
public byte Form => (byte)(Data[0x23] >> 3);
|
||||
public byte EV_HP => Data[0x24];
|
||||
public byte EV_ATK => Data[0x25];
|
||||
|
|
@ -55,12 +54,12 @@ public sealed class QRPK7(byte[] Data) : IEncounterInfo
|
|||
public byte EV_SPE => Data[0x27];
|
||||
public byte EV_SPA => Data[0x28];
|
||||
public byte EV_SPD => Data[0x29];
|
||||
public int Unk_2A => Data[0x2A];
|
||||
public int Friendship => Data[0x2B];
|
||||
public int Ball => Data[0x2C];
|
||||
public byte Unk_2A => Data[0x2A];
|
||||
public byte Friendship => Data[0x2B];
|
||||
public byte Ball => Data[0x2C];
|
||||
public byte Level => Data[0x2D];
|
||||
public int CassetteVersion => Data[0x2E];
|
||||
public int Language => Data[0x2F];
|
||||
public GameVersion Version => (GameVersion)Data[0x2E];
|
||||
public byte Language => Data[0x2F];
|
||||
|
||||
/// <summary>
|
||||
/// Converts the <see cref="Data"/> to a rough PKM.
|
||||
|
|
@ -82,7 +81,7 @@ public PKM ConvertToPKM(ITrainerInfo tr, EncounterCriteria criteria)
|
|||
Nature = Nature,
|
||||
FatefulEncounter = FatefulEncounter,
|
||||
Form = Form,
|
||||
HyperTrainFlags = HT_Flags,
|
||||
HyperTrainFlags = HyperTrainFlags,
|
||||
IV_HP = IV_HP,
|
||||
IV_ATK = IV_ATK,
|
||||
IV_DEF = IV_DEF,
|
||||
|
|
@ -104,15 +103,15 @@ public PKM ConvertToPKM(ITrainerInfo tr, EncounterCriteria criteria)
|
|||
Move3_PPUps = Move3_PPUps,
|
||||
Move4_PPUps = Move4_PPUps,
|
||||
HeldItem = HeldItem,
|
||||
HT_Friendship = Friendship,
|
||||
OT_Friendship = Friendship,
|
||||
HandlingTrainerFriendship = Friendship,
|
||||
OriginalTrainerFriendship = Friendship,
|
||||
Ball = Ball,
|
||||
Version = CassetteVersion,
|
||||
Version = Version,
|
||||
|
||||
OT_Name = tr.OT,
|
||||
HT_Name = tr.OT,
|
||||
OriginalTrainerName = tr.OT,
|
||||
HandlingTrainerName = tr.OT,
|
||||
CurrentLevel = Level,
|
||||
Met_Level = Level,
|
||||
MetLevel = Level,
|
||||
MetDate = EncounterDate.GetDate3DS(),
|
||||
};
|
||||
RecentTrainerCache.SetConsoleRegionData3DS(pk, tr);
|
||||
|
|
|
|||
|
|
@ -68,6 +68,6 @@ private static IEnumerable<string> GetHeader(PKM pk, GameStrings s)
|
|||
}
|
||||
|
||||
if (pk.Format >= 3 && (uint)pk.Nature < s.Natures.Count)
|
||||
yield return s.natures[pk.Nature];
|
||||
yield return s.natures[(byte)pk.Nature];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ public static bool IsDurationValid(int strain, int days, out int max)
|
|||
/// <remarks>Overwrites all Pokérus values even if already legal.</remarks>
|
||||
public static void Vaccinate(this PKM pk)
|
||||
{
|
||||
pk.PKRS_Strain = IsObtainable(pk) ? 1 : 0;
|
||||
pk.PKRS_Days = 0;
|
||||
pk.PokerusStrain = IsObtainable(pk) ? 1 : 0;
|
||||
pk.PokerusDays = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,11 +90,11 @@ public void ReadTemplateIfNoEntity(string path)
|
|||
private static SaveFile GetBlank(PKM pk)
|
||||
{
|
||||
var ctx = pk.Context;
|
||||
var ver = ctx.GetSingleGameVersion();
|
||||
var version = ctx.GetSingleGameVersion();
|
||||
if (pk is { Format: 1, Japanese: true })
|
||||
ver = GameVersion.BU;
|
||||
version = GameVersion.BU;
|
||||
|
||||
return SaveUtil.GetBlankSAV(ver, pk.OT_Name, (LanguageID)pk.Language);
|
||||
return SaveUtil.GetBlankSAV(version, pk.OriginalTrainerName, (LanguageID)pk.Language);
|
||||
}
|
||||
|
||||
private static SaveFile GetBlankSaveFile(GameVersion version, SaveFile? current)
|
||||
|
|
@ -105,8 +105,8 @@ private static SaveFile GetBlankSaveFile(GameVersion version, SaveFile? current)
|
|||
if (sav.Version == GameVersion.Invalid) // will fail to load
|
||||
{
|
||||
var max = GameInfo.VersionDataSource.MaxBy(z => z.Value) ?? throw new Exception();
|
||||
var ver = (GameVersion)max.Value;
|
||||
sav = SaveUtil.GetBlankSAV(ver, tr, lang);
|
||||
var maxVer = (GameVersion)max.Value;
|
||||
sav = SaveUtil.GetBlankSAV(maxVer, tr, lang);
|
||||
}
|
||||
return sav;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public static class BoxManipDefaults
|
|||
new BoxManipSortComplex(SortOwner, (list, sav) => list.OrderByOwnership(sav)),
|
||||
new BoxManipSort(SortType, list => list.OrderByCustom(pk => pk.PersonalInfo.Type1, pk => pk.PersonalInfo.Type2)),
|
||||
new BoxManipSort(SortTypeTera, list => list.OrderByCustom(pk => ((ITeraType)pk).GetTeraType()), s => s.BlankPKM is ITeraType),
|
||||
new BoxManipSort(SortVersion, list => list.OrderByCustom(pk => pk.Generation, pk => pk.Version, pk => pk.Met_Location), s => s.Generation >= 3),
|
||||
new BoxManipSort(SortVersion, list => list.OrderByCustom(pk => pk.Generation, pk => pk.Version, pk => pk.MetLocation), s => s.Generation >= 3),
|
||||
new BoxManipSort(SortBST, list => list.OrderByCustom(pk => pk.PersonalInfo.GetBaseStatTotal())),
|
||||
new BoxManipSort(SortCP, list => list.OrderByCustom(pk => pk is PB7 pb7 ? pb7.Stat_CP : 0), s => s is SAV7b),
|
||||
new BoxManipSort(SortScale, list => list.OrderByCustom(pk => pk is IScaledSize3 s3 ? s3.Scale : -1), s => s.BlankPKM is IScaledSize3),
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public void Save()
|
|||
s7.UpdateMagearnaConstant();
|
||||
}
|
||||
|
||||
private static string GetResourceSuffix(TSave ver) => GetVersion(ver) switch
|
||||
private static string GetResourceSuffix(TSave version) => GetVersion(version) switch
|
||||
{
|
||||
X or Y or XY => "xy",
|
||||
OR or AS or ORAS => "oras",
|
||||
|
|
@ -44,12 +44,12 @@ public void Save()
|
|||
FR or LG or FRLG => "frlg",
|
||||
C => "c",
|
||||
GD or SI or GS => "gs",
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(ver), ver, null),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(version), version, null),
|
||||
};
|
||||
|
||||
private static GameVersion GetVersion(TSave ver)
|
||||
private static GameVersion GetVersion(TSave version)
|
||||
{
|
||||
if (ver is IVersion v)
|
||||
if (version is IVersion v)
|
||||
return v.Version;
|
||||
return Invalid;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ public sealed class FakeSaveFile : SaveFile
|
|||
public override string Extension => string.Empty;
|
||||
public override bool ChecksumsValid => true;
|
||||
public override string ChecksumInfo => string.Empty;
|
||||
public override int Generation => 3;
|
||||
public override byte Generation => 3;
|
||||
public override string GetString(ReadOnlySpan<byte> data) => string.Empty;
|
||||
public override int SetString(Span<byte> destBuffer, ReadOnlySpan<char> value, int maxLength, StringConverterOption option) => 0;
|
||||
public override PersonalTable3 Personal => PersonalTable.RS;
|
||||
|
|
@ -25,7 +25,7 @@ public sealed class FakeSaveFile : SaveFile
|
|||
public override ushort MaxSpeciesID => 1;
|
||||
public override int MaxItemID => 5;
|
||||
public override int MaxBallID => 5;
|
||||
public override int MaxGameID => 5;
|
||||
public override GameVersion MaxGameID => GameVersion.LG;
|
||||
public override int MaxAbilityID => 0;
|
||||
public override int BoxCount => 1;
|
||||
public override int GetPartyOffset(int slot) => -1;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public sealed class ShowdownSet : IBattleTemplate
|
|||
public string Nickname { get; private set; } = string.Empty;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public int Gender { get; private set; } = -1;
|
||||
public byte? Gender { get; private set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public int HeldItem { get; private set; }
|
||||
|
|
@ -44,16 +44,16 @@ public sealed class ShowdownSet : IBattleTemplate
|
|||
public int Ability { get; private set; } = -1;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public int Level { get; private set; } = 100;
|
||||
public byte Level { get; private set; } = 100;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool Shiny { get; private set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public int Friendship { get; private set; } = 255;
|
||||
public byte Friendship { get; private set; } = 255;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public int Nature { get; private set; } = -1;
|
||||
public Nature Nature { get; private set; } = Nature.Random;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string FormName { get; private set; } = string.Empty;
|
||||
|
|
@ -254,14 +254,14 @@ private bool ParseSingle(ReadOnlySpan<char> identifier)
|
|||
var firstSpace = identifier.IndexOf(' ');
|
||||
if (firstSpace == -1)
|
||||
return false;
|
||||
var naturestr = identifier[..firstSpace];
|
||||
return (Nature = StringUtil.FindIndexIgnoreCase(Strings.natures, naturestr)) >= 0;
|
||||
var nature = identifier[..firstSpace];
|
||||
return (Nature = (Nature)StringUtil.FindIndexIgnoreCase(Strings.natures, nature)).IsFixed();
|
||||
}
|
||||
|
||||
private bool ParseEntry(ReadOnlySpan<char> identifier, ReadOnlySpan<char> value) => identifier switch
|
||||
{
|
||||
"Ability" => (Ability = StringUtil.FindIndexIgnoreCase(Strings.abilitylist, value)) >= 0,
|
||||
"Nature" => (Nature = StringUtil.FindIndexIgnoreCase(Strings.natures , value)) >= 0,
|
||||
"Nature" => (Nature = (Nature)StringUtil.FindIndexIgnoreCase(Strings.natures , value)).IsFixed(),
|
||||
"Shiny" => Shiny = StringUtil.IsMatchIgnoreCase("Yes", value),
|
||||
"Gigantamax" => CanGigantamax = StringUtil.IsMatchIgnoreCase("Yes", value),
|
||||
"Friendship" => ParseFriendship(value),
|
||||
|
|
@ -275,7 +275,7 @@ private bool ParseSingle(ReadOnlySpan<char> identifier)
|
|||
|
||||
private bool ParseLevel(ReadOnlySpan<char> value)
|
||||
{
|
||||
if (!int.TryParse(value.Trim(), out var val))
|
||||
if (!byte.TryParse(value.Trim(), out var val))
|
||||
return false;
|
||||
if ((uint)val is 0 or > 100)
|
||||
return false;
|
||||
|
|
@ -285,9 +285,7 @@ private bool ParseLevel(ReadOnlySpan<char> value)
|
|||
|
||||
private bool ParseFriendship(ReadOnlySpan<char> value)
|
||||
{
|
||||
if (!int.TryParse(value.Trim(), out var val))
|
||||
return false;
|
||||
if ((uint)val > byte.MaxValue)
|
||||
if (!byte.TryParse(value.Trim(), out var val))
|
||||
return false;
|
||||
Friendship = val;
|
||||
return true;
|
||||
|
|
@ -389,7 +387,7 @@ public List<string> GetSetLines()
|
|||
result.Add("Gigantamax: Yes");
|
||||
|
||||
if ((uint)Nature < Strings.Natures.Count)
|
||||
result.Add($"{Strings.Natures[Nature]} Nature");
|
||||
result.Add($"{Strings.Natures[(byte)Nature]} Nature");
|
||||
|
||||
// Moves
|
||||
result.AddRange(GetStringMoves());
|
||||
|
|
@ -511,7 +509,7 @@ public ShowdownSet(PKM pk)
|
|||
pk.GetIVs(IVs);
|
||||
pk.GetMoves(Moves);
|
||||
Nature = pk.StatNature;
|
||||
Gender = (uint)pk.Gender < 2 ? pk.Gender : 2;
|
||||
Gender = pk.Gender < 2 ? pk.Gender : (byte)2;
|
||||
Friendship = pk.CurrentFriendship;
|
||||
Level = pk.CurrentLevel;
|
||||
Shiny = pk.IsShiny;
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ public enum GameVersion : byte
|
|||
GSC,
|
||||
|
||||
/// <summary>
|
||||
/// Pokémon Ruby & Sapphire [<see cref="SAV3"/>] identifier.
|
||||
/// Pokémon Ruby & Sapphire [<see cref="SAV3RS"/>] identifier.
|
||||
/// </summary>
|
||||
/// <see cref="R"/>
|
||||
/// <see cref="S"/>
|
||||
|
|
@ -283,7 +283,7 @@ public enum GameVersion : byte
|
|||
RSE,
|
||||
|
||||
/// <summary>
|
||||
/// Pokémon FireRed/LeafGreen [<see cref="SAV3"/>] identifier.
|
||||
/// Pokémon FireRed/LeafGreen [<see cref="SAV3FRLG"/>] identifier.
|
||||
/// </summary>
|
||||
/// <see cref="FR"/>
|
||||
/// <see cref="LG"/>
|
||||
|
|
@ -309,7 +309,7 @@ public enum GameVersion : byte
|
|||
XD,
|
||||
|
||||
/// <summary>
|
||||
/// Pokémon Diamond & Pearl [<see cref="SAV4"/>] identifier.
|
||||
/// Pokémon Diamond & Pearl [<see cref="SAV4DP"/>] identifier.
|
||||
/// </summary>
|
||||
/// <see cref="D"/>
|
||||
/// <see cref="P"/>
|
||||
|
|
@ -325,7 +325,7 @@ public enum GameVersion : byte
|
|||
DPPt,
|
||||
|
||||
/// <summary>
|
||||
/// Pokémon HeartGold & SoulSilver [<see cref="SAV4"/>] identifier.
|
||||
/// Pokémon HeartGold & SoulSilver [<see cref="SAV4HGSS"/>] identifier.
|
||||
/// </summary>
|
||||
/// <see cref="HG"/>
|
||||
/// <see cref="SS"/>
|
||||
|
|
@ -361,7 +361,7 @@ public enum GameVersion : byte
|
|||
XY,
|
||||
|
||||
/// <summary>
|
||||
/// Pokémon Omega Ruby & Alpha Sapphire Demo [<see cref="SAV6"/>] identifier.
|
||||
/// Pokémon Omega Ruby & Alpha Sapphire Demo [<see cref="SAV6AODemo"/>] identifier.
|
||||
/// </summary>
|
||||
/// <see cref="ORAS"/>
|
||||
ORASDEMO,
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public enum MoveType : sbyte
|
|||
/// </summary>
|
||||
public static class MoveTypeExtensions
|
||||
{
|
||||
public static MoveType GetMoveTypeGeneration(this MoveType type, int generation)
|
||||
public static MoveType GetMoveTypeGeneration(this MoveType type, byte generation)
|
||||
{
|
||||
if (generation <= 2)
|
||||
return GetMoveTypeFromG12(type);
|
||||
|
|
|
|||
|
|
@ -43,10 +43,10 @@ public static class NatureUtil
|
|||
/// Gets the <see cref="Nature"/> value that corresponds to the provided <see cref="value"/>.
|
||||
/// </summary>
|
||||
/// <remarks>Actual nature values will be unchanged; only out-of-bounds values re-map to <see cref="Nature.Random"/>.</remarks>
|
||||
public static Nature GetNature(int value) => value switch
|
||||
public static Nature GetNature(Nature value) => value switch
|
||||
{
|
||||
< 0 or >= (int)Nature.Random => Nature.Random,
|
||||
_ => (Nature)value,
|
||||
>= Nature.Random => Nature.Random,
|
||||
_ => value,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -131,12 +131,12 @@ public List<ComboItem> GetItemDataSource(GameVersion game, EntityContext context
|
|||
return HaX ? Util.GetCBList(items) : Util.GetCBList(items, allowed);
|
||||
}
|
||||
|
||||
public static IReadOnlyList<ComboItem> LanguageDataSource(int gen)
|
||||
public static IReadOnlyList<ComboItem> LanguageDataSource(byte generation)
|
||||
{
|
||||
var languages = new List<ComboItem>(LanguageList);
|
||||
if (gen == 3)
|
||||
if (generation == 3)
|
||||
languages.RemoveAll(static l => l.Value >= (int)LanguageID.Korean);
|
||||
else if (gen < 7)
|
||||
else if (generation < 7)
|
||||
languages.RemoveAll(static l => l.Value > (int)LanguageID.Korean);
|
||||
return languages;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,18 +55,19 @@ public static string GetVersionName(GameVersion version)
|
|||
public static IReadOnlyList<ComboItem> GroundTileDataSource => Sources.GroundTileDataSource;
|
||||
public static IReadOnlyList<ComboItem> Regions => GameDataSource.Regions;
|
||||
|
||||
public static IReadOnlyList<ComboItem> LanguageDataSource(int gen) => GameDataSource.LanguageDataSource(gen);
|
||||
public static IReadOnlyList<ComboItem> LanguageDataSource(byte generation)
|
||||
=> GameDataSource.LanguageDataSource(generation);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the location name for the specified parameters.
|
||||
/// </summary>
|
||||
/// <param name="isEggLocation">Location is from the <see cref="PKM.Egg_Location"/></param>
|
||||
/// <param name="isEggLocation">Location is from the <see cref="PKM.EggLocation"/></param>
|
||||
/// <param name="location">Location value</param>
|
||||
/// <param name="format">Current <see cref="PKM.Format"/></param>
|
||||
/// <param name="generation"><see cref="PKM.Generation"/> of origin</param>
|
||||
/// <param name="version">Current GameVersion (only applicable for <see cref="GameVersion.Gen7b"/> differentiation)</param>
|
||||
/// <returns>Location name</returns>
|
||||
public static string GetLocationName(bool isEggLocation, int location, int format, int generation, GameVersion version)
|
||||
public static string GetLocationName(bool isEggLocation, ushort location, byte format, byte generation, GameVersion version)
|
||||
{
|
||||
return Strings.GetLocationName(isEggLocation, location, format, generation, version);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -739,13 +739,13 @@ private string[] GetItemStrings3(GameVersion game)
|
|||
/// <summary>
|
||||
/// Gets the location name for the specified parameters.
|
||||
/// </summary>
|
||||
/// <param name="isEggLocation">Location is from the <see cref="PKM.Egg_Location"/></param>
|
||||
/// <param name="isEggLocation">Location is from the <see cref="PKM.EggLocation"/></param>
|
||||
/// <param name="location">Location value</param>
|
||||
/// <param name="format">Current <see cref="PKM.Format"/></param>
|
||||
/// <param name="generation"><see cref="PKM.Generation"/> of origin</param>
|
||||
/// <param name="version">Current GameVersion (only applicable for <see cref="GameVersion.Gen7b"/> differentiation)</param>
|
||||
/// <returns>Location name. Potentially an empty string if no location name is known for that location value.</returns>
|
||||
public string GetLocationName(bool isEggLocation, int location, int format, int generation, GameVersion version)
|
||||
public string GetLocationName(bool isEggLocation, ushort location, byte format, byte generation, GameVersion version)
|
||||
{
|
||||
if (format == 1)
|
||||
{
|
||||
|
|
@ -762,7 +762,7 @@ public string GetLocationName(bool isEggLocation, int location, int format, int
|
|||
return set.GetLocationName(location);
|
||||
}
|
||||
|
||||
private static int GetGeneration(int generation, bool isEggLocation, int format)
|
||||
private static byte GetGeneration(byte generation, bool isEggLocation, byte format)
|
||||
{
|
||||
if (format == 2)
|
||||
return 2;
|
||||
|
|
@ -774,16 +774,16 @@ private static int GetGeneration(int generation, bool isEggLocation, int format)
|
|||
return generation;
|
||||
if (format >= 5)
|
||||
return format;
|
||||
return -1; // Nonsensical inputs.
|
||||
return 0; // Nonsensical inputs.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the location names array for a specified generation.
|
||||
/// </summary>
|
||||
/// <param name="gen">Generation to get location names for.</param>
|
||||
/// <param name="generation">Generation to get location names for.</param>
|
||||
/// <param name="version">Version of origin</param>
|
||||
/// <returns>List of location names.</returns>
|
||||
public ILocationSet? GetLocations(int gen, GameVersion version) => gen switch
|
||||
public ILocationSet? GetLocations(byte generation, GameVersion version) => generation switch
|
||||
{
|
||||
2 => Gen2,
|
||||
3 => GameVersion.CXD.Contains(version) ? CXD : Gen3,
|
||||
|
|
@ -803,13 +803,13 @@ private static int GetGeneration(int generation, bool isEggLocation, int format)
|
|||
/// <summary>
|
||||
/// Gets the location names array for a specified generation.
|
||||
/// </summary>
|
||||
/// <param name="gen">Generation to get location names for.</param>
|
||||
/// <param name="generation">Generation to get location names for.</param>
|
||||
/// <param name="version">Version of origin</param>
|
||||
/// <param name="bankID">BankID used to choose the text bank.</param>
|
||||
/// <returns>List of location names.</returns>
|
||||
public ReadOnlySpan<string> GetLocationNames(int gen, GameVersion version, int bankID = 0)
|
||||
public ReadOnlySpan<string> GetLocationNames(byte generation, GameVersion version, int bankID = 0)
|
||||
{
|
||||
var set = GetLocations(gen, version);
|
||||
var set = GetLocations(generation, version);
|
||||
if (set is null)
|
||||
return [];
|
||||
return set.GetLocationNames(bankID);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,10 @@
|
|||
|
||||
namespace PKHeX.Core;
|
||||
|
||||
/// <summary>
|
||||
/// Generation 2-3 specific met location name holder.
|
||||
/// </summary>
|
||||
/// <remarks>Single segment, no shift bias.</remarks>
|
||||
public sealed record LocationSet0(string[] Met0) : ILocationSet
|
||||
{
|
||||
public ReadOnlySpan<string> GetLocationNames(int bankID) => bankID switch
|
||||
|
|
|
|||
|
|
@ -3,6 +3,10 @@
|
|||
|
||||
namespace PKHeX.Core;
|
||||
|
||||
/// <summary>
|
||||
/// Generation 4 specific met location name holder.
|
||||
/// </summary>
|
||||
/// <remarks>Multi-segment, small gaps.</remarks>
|
||||
public sealed record LocationSet4(string[] Met0, string[] Met2, string[] Met3) : ILocationSet
|
||||
{
|
||||
public ReadOnlySpan<string> GetLocationNames(int bankID) => bankID switch
|
||||
|
|
@ -20,7 +24,7 @@ public sealed record LocationSet4(string[] Met0, string[] Met2, string[] Met3) :
|
|||
_ => Get(Met0, locationID),
|
||||
};
|
||||
|
||||
private static string Get(string[] names, int index)
|
||||
private static string Get(ReadOnlySpan<string> names, int index)
|
||||
{
|
||||
if ((uint)index >= names.Length)
|
||||
return string.Empty;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,10 @@
|
|||
|
||||
namespace PKHeX.Core;
|
||||
|
||||
/// <summary>
|
||||
/// Generation 5+ specific met location name holder.
|
||||
/// </summary>
|
||||
/// <remarks>Multi-segment, large gaps.</remarks>
|
||||
public sealed record LocationSet6(string[] Met0, string[] Met3, string[] Met4, string[] Met6) : ILocationSet
|
||||
{
|
||||
public ReadOnlySpan<string> GetLocationNames(int bankID) => bankID switch
|
||||
|
|
@ -22,7 +26,7 @@ public sealed record LocationSet6(string[] Met0, string[] Met3, string[] Met4, s
|
|||
_ => Get(Met0, locationID),
|
||||
};
|
||||
|
||||
private static string Get(string[] names, int index)
|
||||
private static string Get(ReadOnlySpan<string> names, int index)
|
||||
{
|
||||
if ((uint)index >= names.Length)
|
||||
return string.Empty;
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ private static GameVersion[] GetValidGameVersions()
|
|||
/// </summary>
|
||||
/// <param name="generation">Generation ID</param>
|
||||
/// <returns>Version ID from requested generation. If none, return <see cref="Invalid"/>.</returns>
|
||||
public static GameVersion GetVersion(int generation) => generation switch
|
||||
public static GameVersion GetVersion(byte generation) => generation switch
|
||||
{
|
||||
1 => RBY,
|
||||
2 => C,
|
||||
|
|
@ -107,7 +107,7 @@ private static GameVersion[] GetValidGameVersions()
|
|||
/// </summary>
|
||||
/// <param name="game">Game to retrieve the generation for</param>
|
||||
/// <returns>Generation ID</returns>
|
||||
public static int GetGeneration(this GameVersion game)
|
||||
public static byte GetGeneration(this GameVersion game)
|
||||
{
|
||||
if (Gen1.Contains(game)) return 1;
|
||||
if (Gen2.Contains(game)) return 2;
|
||||
|
|
@ -119,7 +119,7 @@ public static int GetGeneration(this GameVersion game)
|
|||
if (Gen7b.Contains(game)) return 7;
|
||||
if (Gen8.Contains(game)) return 8;
|
||||
if (Gen9.Contains(game)) return 9;
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -167,63 +167,71 @@ public static bool Contains(this GameVersion g1, GameVersion g2)
|
|||
{
|
||||
if (g1 == g2 || g1 == Any)
|
||||
return true;
|
||||
|
||||
return g1 switch
|
||||
{
|
||||
RB => g2 is RD or BU or GN,
|
||||
RBY or Stadium => RB.Contains(g2) || g2 == YW,
|
||||
Gen1 => RBY.Contains(g2) || g2 == Stadium,
|
||||
|
||||
GS => g2 is GD or SI,
|
||||
GSC or Stadium2 => GS.Contains(g2) || g2 == C,
|
||||
Gen2 => GSC.Contains(g2) || g2 == Stadium2,
|
||||
|
||||
RS => g2 is R or S,
|
||||
RSE => RS.Contains(g2) || g2 == E,
|
||||
FRLG => g2 is FR or LG,
|
||||
COLO or XD => g2 == CXD,
|
||||
CXD => g2 is COLO or XD,
|
||||
RSBOX => RS.Contains(g2) || g2 == E || FRLG.Contains(g2),
|
||||
Gen3 => RSE.Contains(g2) || FRLG.Contains(g2) || CXD.Contains(g2) || g2 == RSBOX,
|
||||
|
||||
DP => g2 is D or P,
|
||||
HGSS => g2 is HG or SS,
|
||||
DPPt => DP.Contains(g2) || g2 == Pt,
|
||||
BATREV => DP.Contains(g2) || g2 == Pt || HGSS.Contains(g2),
|
||||
Gen4 => DPPt.Contains(g2) || HGSS.Contains(g2) || g2 == BATREV,
|
||||
|
||||
BW => g2 is B or W,
|
||||
B2W2 => g2 is B2 or W2,
|
||||
Gen5 => BW.Contains(g2) || B2W2.Contains(g2),
|
||||
|
||||
XY => g2 is X or Y,
|
||||
ORAS => g2 is OR or AS,
|
||||
|
||||
Gen6 => XY.Contains(g2) || ORAS.Contains(g2),
|
||||
SM => g2 is SN or MN,
|
||||
USUM => g2 is US or UM,
|
||||
GG => g2 is GP or GE,
|
||||
Gen7 => SM.Contains(g2) || USUM.Contains(g2),
|
||||
Gen7b => GG.Contains(g2) || GO == g2,
|
||||
|
||||
SWSH => g2 is SW or SH,
|
||||
BDSP => g2 is BD or SP,
|
||||
Gen8 => SWSH.Contains(g2) || BDSP.Contains(g2) || PLA == g2,
|
||||
|
||||
SV => g2 is SL or VL,
|
||||
Gen9 => SV.Contains(g2),
|
||||
_ => false,
|
||||
};
|
||||
if (g1.IsValidSavedVersion())
|
||||
return false;
|
||||
return g1.ContainsFromLumped(g2);
|
||||
}
|
||||
|
||||
public static bool ContainsFromLumped(this GameVersion lump, GameVersion version) => lump switch
|
||||
{
|
||||
RB => version is RD or BU or GN,
|
||||
RBY => version is RD or BU or GN or YW or RB,
|
||||
Stadium => version is RD or BU or GN or YW or RB or RBY,
|
||||
StadiumJ => version is RD or BU or GN or YW or RB or RBY,
|
||||
Gen1 => version is RD or BU or GN or YW or RB or RBY or Stadium,
|
||||
|
||||
GS => version is GD or SI,
|
||||
GSC => version is GD or SI or C or GS,
|
||||
Stadium2 => version is GD or SI or C or GS or GSC,
|
||||
Gen2 => version is GD or SI or C or GS or GSC or Stadium2,
|
||||
|
||||
RS => version is R or S,
|
||||
RSE => version is R or S or E or RS,
|
||||
FRLG => version is FR or LG,
|
||||
RSBOX => version is R or S or E or FR or LG,
|
||||
Gen3 => version is R or S or E or FR or LG or CXD or RSBOX or RS or RSE or FRLG,
|
||||
COLO => version is CXD,
|
||||
XD => version is CXD,
|
||||
|
||||
DP => version is D or P,
|
||||
HGSS => version is HG or SS,
|
||||
DPPt => version is D or P or Pt or DP,
|
||||
BATREV => version is D or P or Pt or HG or SS,
|
||||
Gen4 => version is D or P or Pt or HG or SS or BATREV or DP or HGSS or DPPt,
|
||||
|
||||
BW => version is B or W,
|
||||
B2W2 => version is B2 or W2,
|
||||
Gen5 => version is B or W or B2 or W2 or BW or B2W2,
|
||||
|
||||
XY => version is X or Y,
|
||||
ORAS => version is OR or AS,
|
||||
Gen6 => version is X or Y or OR or AS or XY or ORAS,
|
||||
|
||||
SM => version is SN or MN,
|
||||
USUM => version is US or UM,
|
||||
Gen7 => version is SN or MN or US or UM or SM or USUM,
|
||||
|
||||
GG => version is GP or GE,
|
||||
Gen7b => version is GP or GE or GO,
|
||||
|
||||
SWSH => version is SW or SH,
|
||||
BDSP => version is BD or SP,
|
||||
Gen8 => version is SW or SH or BD or SP or SWSH or BDSP or PLA,
|
||||
|
||||
SV => version is SL or VL,
|
||||
Gen9 => version is SL or VL or SV,
|
||||
|
||||
_ => false,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// List of possible <see cref="GameVersion"/> values within the provided <see cref="generation"/>.
|
||||
/// </summary>
|
||||
/// <param name="generation">Generation to look within</param>
|
||||
/// <param name="pkVersion"></param>
|
||||
public static GameVersion[] GetVersionsInGeneration(int generation, int pkVersion)
|
||||
/// <param name="version"></param>
|
||||
public static GameVersion[] GetVersionsInGeneration(byte generation, GameVersion version)
|
||||
{
|
||||
if (Gen7b.Contains(pkVersion))
|
||||
if (Gen7b.Contains(version))
|
||||
return [GO, GP, GE];
|
||||
return Array.FindAll(GameVersions, z => z.GetGeneration() == generation);
|
||||
}
|
||||
|
|
@ -233,14 +241,14 @@ public static GameVersion[] GetVersionsInGeneration(int generation, int pkVersio
|
|||
/// </summary>
|
||||
/// <param name="obj">Criteria for retrieving versions</param>
|
||||
/// <param name="generation">Generation format minimum (necessary for the CXD/Gen4 swap etc.)</param>
|
||||
public static IEnumerable<GameVersion> GetVersionsWithinRange(IGameValueLimit obj, int generation = -1)
|
||||
public static IEnumerable<GameVersion> GetVersionsWithinRange(IGameValueLimit obj, byte generation = 0)
|
||||
{
|
||||
var max = obj.MaxGameID;
|
||||
if (max == Legal.MaxGameID_7b) // edge case
|
||||
return [GO, GP, GE];
|
||||
var versions = GameVersions
|
||||
.Where(version => (GameVersion)obj.MinGameID <= version && version <= (GameVersion)max);
|
||||
if (generation < 0)
|
||||
.Where(version => obj.MinGameID <= version && version <= max);
|
||||
if (generation == 0)
|
||||
return versions;
|
||||
if (max == Legal.MaxGameID_7 && generation == 7)
|
||||
versions = versions.Where(version => version != GO);
|
||||
|
|
@ -251,6 +259,9 @@ public static IEnumerable<GameVersion> GetVersionsWithinRange(IGameValueLimit ob
|
|||
return versions.Where(version => version.GetGeneration() <= generation);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds all <see cref="GameVersion"/> values within the <see cref="lump"/>.
|
||||
/// </summary>
|
||||
public static GameVersion[] GetVersionsWithinRange(this GameVersion lump, GameVersion[] source) =>
|
||||
Array.FindAll(source, z => lump.Contains(z));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,40 +110,41 @@ public static class Locations
|
|||
/// Gets the egg location value for a traded unhatched egg.
|
||||
/// </summary>
|
||||
/// <param name="generation">Generation of the egg</param>
|
||||
/// <param name="ver">Game version of the egg</param>
|
||||
/// <param name="version">Game version of the egg</param>
|
||||
/// <returns>Egg Location value</returns>
|
||||
/// <remarks>Location will be set to the Met Location until it hatches, then moves to Egg Location.</remarks>
|
||||
public static int TradedEggLocation(int generation, GameVersion ver) => generation switch
|
||||
public static ushort TradedEggLocation(byte generation, GameVersion version) => generation switch
|
||||
{
|
||||
4 => LinkTrade4,
|
||||
5 => LinkTrade5,
|
||||
8 when GameVersion.BDSP.Contains(ver) => LinkTrade6NPC,
|
||||
8 when GameVersion.BDSP.Contains(version) => LinkTrade6NPC,
|
||||
_ => LinkTrade6,
|
||||
};
|
||||
|
||||
public static bool IsPtHGSSLocation(int location) => location is > 111 and < 2000;
|
||||
public static bool IsPtHGSSLocationEgg(int location) => location is > 2010 and < 3000;
|
||||
public static bool IsEventLocation3(int location) => location is 255;
|
||||
public static bool IsEventLocation4(int location) => location is >= 3000 and <= 3076;
|
||||
public static bool IsEventLocation5(int location) => location is > 40000 and < 50000;
|
||||
public static bool IsPtHGSSLocation(ushort location) => location is > 111 and < 2000;
|
||||
public static bool IsPtHGSSLocationEgg(ushort location) => location is > 2010 and < 3000;
|
||||
public static bool IsEventLocation3(ushort location) => location is 255;
|
||||
public static bool IsEventLocation4(ushort location) => location is >= 3000 and <= 3076;
|
||||
public static bool IsEventLocation5(ushort location) => location is > 40000 and < 50000;
|
||||
|
||||
private const int SafariLocation_RSE = 57;
|
||||
private const int SafariLocation_FRLG = 136;
|
||||
public static bool IsSafariZoneLocation3(byte loc) => loc is SafariLocation_RSE or SafariLocation_FRLG;
|
||||
public static bool IsSafariZoneLocation3RSE(byte loc) => loc == SafariLocation_RSE;
|
||||
|
||||
public static bool IsEggLocationBred4(int loc, GameVersion ver)
|
||||
public static bool IsEggLocationBred4(ushort loc, GameVersion version)
|
||||
{
|
||||
if (loc is Daycare4 or LinkTrade4)
|
||||
return true;
|
||||
return loc == Faraway4 && ver is GameVersion.Pt or GameVersion.HG or GameVersion.SS;
|
||||
return loc == Faraway4 && version is GameVersion.Pt or GameVersion.HG or GameVersion.SS;
|
||||
}
|
||||
|
||||
public static bool IsEggLocationBred5(int loc) => loc is Daycare5 or LinkTrade5;
|
||||
public static bool IsEggLocationBred6(int loc) => loc is Daycare5 or LinkTrade6;
|
||||
public static bool IsEggLocationBred8b(int loc) => loc is Daycare8b or LinkTrade6NPC;
|
||||
public static bool IsEggLocationBred9(int loc) => loc is Picnic9 or LinkTrade6;
|
||||
public static bool IsEggLocationBred5(ushort loc) => loc is Daycare5 or LinkTrade5;
|
||||
public static bool IsEggLocationBred6(ushort loc) => loc is Daycare5 or LinkTrade6;
|
||||
public static bool IsEggLocationBred8b(ushort loc) => loc is Daycare8b or LinkTrade6NPC;
|
||||
public static bool IsEggLocationBred9(ushort loc) => loc is Picnic9 or LinkTrade6;
|
||||
|
||||
public static int GetDaycareLocation(int generation, GameVersion version) => generation switch
|
||||
public static ushort GetDaycareLocation(byte generation, GameVersion version) => generation switch
|
||||
{
|
||||
1 or 2 or 3 => 0,
|
||||
4 => Daycare4,
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ public static class Locations4
|
|||
{
|
||||
private const int SafariLocation_HGSS = 202;
|
||||
private const int MarshLocation_DPPt = 52;
|
||||
public static bool IsSafariZoneLocation(ushort loc) => loc is MarshLocation_DPPt or SafariLocation_HGSS;
|
||||
public static bool IsSafariBallRequired(ushort loc) => loc is MarshLocation_DPPt or SafariLocation_HGSS;
|
||||
public static bool IsMarsh(ushort loc) => loc == MarshLocation_DPPt;
|
||||
public static bool IsSafari(ushort loc) => loc == SafariLocation_HGSS;
|
||||
|
||||
/// <summary>
|
||||
/// Available location list for the 00000 set of location names.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using static PKHeX.Core.GameVersion;
|
||||
|
||||
namespace PKHeX.Core;
|
||||
|
||||
|
|
@ -22,14 +23,14 @@ public static class LocationsHOME
|
|||
/// </summary>
|
||||
/// <param name="version"></param>
|
||||
/// <returns>True if a known remap exists.</returns>
|
||||
public static bool IsVersionRemapNeeded(int version) => GetRemapIndex(version) < RemapCount;
|
||||
public static bool IsVersionRemapNeeded(GameVersion version) => GetRemapIndex(version) < RemapCount;
|
||||
|
||||
private static int GetRemapIndex(int version) => version - (int)GameVersion.PLA;
|
||||
private static int GetRemapIndex(GameVersion version) => version - PLA;
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the SW/SH-context Met Location is one of the remapped HOME locations.
|
||||
/// </summary>
|
||||
public static bool IsLocationSWSH(int met) => met switch
|
||||
public static bool IsLocationSWSH(ushort met) => met switch
|
||||
{
|
||||
SHVL or SWSL or SHSP or SWBD or SWLA => true,
|
||||
_ => false,
|
||||
|
|
@ -38,46 +39,46 @@ public static class LocationsHOME
|
|||
/// <summary>
|
||||
/// Checks if the SW/SH-context Egg Location is valid with respect to the <see cref="original"/> location.
|
||||
/// </summary>
|
||||
public static bool IsLocationSWSHEgg(int ver, int met, int egg, ushort original)
|
||||
public static bool IsLocationSWSHEgg(GameVersion version, ushort met, int egg, ushort original)
|
||||
{
|
||||
if (original > SWLA && egg == SWSHEgg)
|
||||
return true;
|
||||
|
||||
// >60000 can be reset to Link Trade (30001), then altered differently.
|
||||
var expect = GetMetSWSH(original, ver);
|
||||
var expect = GetMetSWSH(original, version);
|
||||
return expect == met && expect == egg;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the SW/SH-context Egg Location when an external entity from the input <see cref="ver"/> resides in SW/SH.
|
||||
/// Gets the SW/SH-context Egg Location when an external entity from the input <see cref="version"/> resides in SW/SH.
|
||||
/// </summary>
|
||||
public static ushort GetLocationSWSHEgg(int ver, ushort egg)
|
||||
public static ushort GetLocationSWSHEgg(GameVersion version, ushort egg)
|
||||
{
|
||||
if (egg == 0)
|
||||
return 0;
|
||||
if (egg > SWLA)
|
||||
return SWSHEgg;
|
||||
// >60000 can be reset to Link Trade (30001), then altered differently.
|
||||
return GetMetSWSH(egg, ver);
|
||||
return GetMetSWSH(egg, version);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the SW/SH-context <see cref="GameVersion"/> when an external entity from the input <see cref="ver"/> resides in SW/SH.
|
||||
/// Gets the SW/SH-context <see cref="GameVersion"/> when an external entity from the input <see cref="version"/> resides in SW/SH.
|
||||
/// </summary>
|
||||
public static int GetVersionSWSH(int ver) => (GameVersion)ver switch
|
||||
public static GameVersion GetVersionSWSH(GameVersion version) => version switch
|
||||
{
|
||||
GameVersion.PLA => (int)GameVersion.SW,
|
||||
GameVersion.BD => (int)GameVersion.SW,
|
||||
GameVersion.SP => (int)GameVersion.SH,
|
||||
GameVersion.SL => (int)GameVersion.SW,
|
||||
GameVersion.VL => (int)GameVersion.SH,
|
||||
_ => ver,
|
||||
GameVersion.PLA => GameVersion.SW,
|
||||
GameVersion.BD => GameVersion.SW,
|
||||
GameVersion.SP => GameVersion.SH,
|
||||
GameVersion.SL => GameVersion.SW,
|
||||
GameVersion.VL => GameVersion.SH,
|
||||
_ => version,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Gets the SW/SH-context Met Location when an external entity from the input <see cref="ver"/> resides in SW/SH.
|
||||
/// Gets the SW/SH-context Met Location when an external entity from the input <see cref="version"/> resides in SW/SH.
|
||||
/// </summary>
|
||||
public static ushort GetMetSWSH(ushort loc, int ver) => (GameVersion)ver switch
|
||||
public static ushort GetMetSWSH(ushort loc, GameVersion version) => version switch
|
||||
{
|
||||
GameVersion.PLA => SWLA,
|
||||
GameVersion.BD => SWBD,
|
||||
|
|
@ -87,35 +88,35 @@ public static ushort GetLocationSWSHEgg(int ver, ushort egg)
|
|||
_ => loc,
|
||||
};
|
||||
|
||||
public static int GetVersionSWSHOriginal(ushort loc) => loc switch
|
||||
public static GameVersion GetVersionSWSHOriginal(ushort loc) => loc switch
|
||||
{
|
||||
SWLA => (int)GameVersion.PLA,
|
||||
SWBD => (int)GameVersion.BD,
|
||||
SHSP => (int)GameVersion.SP,
|
||||
SWSL => (int)GameVersion.SL,
|
||||
SHVL => (int)GameVersion.VL,
|
||||
_ => int.MinValue,
|
||||
SWLA => GameVersion.PLA,
|
||||
SWBD => GameVersion.BD,
|
||||
SHSP => GameVersion.SP,
|
||||
SWSL => GameVersion.SL,
|
||||
SHVL => GameVersion.VL,
|
||||
_ => GameVersion.SW,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the met location is a valid location for the input <see cref="ver"/>.
|
||||
/// Checks if the met location is a valid location for the input <see cref="version"/>.
|
||||
/// </summary>
|
||||
/// <remarks>Relevant when an entity from BD/SP is transferred to SW/SH.</remarks>
|
||||
public static bool IsValidMetBDSP(ushort loc, int ver) => loc switch
|
||||
public static bool IsValidMetBDSP(ushort loc, GameVersion version) => loc switch
|
||||
{
|
||||
SHSP when ver == (int)GameVersion.SH => true,
|
||||
SWBD when ver == (int)GameVersion.SW => true,
|
||||
SHSP when version == SH => true,
|
||||
SWBD when version == SW => true,
|
||||
_ => false,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the met location is a valid location for the input <see cref="ver"/>.
|
||||
/// Checks if the met location is a valid location for the input <see cref="version"/>.
|
||||
/// </summary>
|
||||
/// <remarks>Relevant when an entity from S/V is transferred to SW/SH.</remarks>
|
||||
public static bool IsValidMetSV(ushort loc, int ver) => loc switch
|
||||
public static bool IsValidMetSV(ushort loc, GameVersion version) => loc switch
|
||||
{
|
||||
SHVL when ver == (int)GameVersion.SH => true,
|
||||
SWSL when ver == (int)GameVersion.SW => true,
|
||||
SHVL when version == SH => true,
|
||||
SWSL when version == SW => true,
|
||||
_ => false,
|
||||
};
|
||||
|
||||
|
|
@ -141,7 +142,7 @@ public static LocationRemapState GetRemapState(EntityContext original, EntityCon
|
|||
};
|
||||
}
|
||||
|
||||
public static bool IsMatchLocation(EntityContext original, EntityContext current, int met, int expect, int version)
|
||||
public static bool IsMatchLocation(EntityContext original, EntityContext current, ushort met, int expect, GameVersion version)
|
||||
{
|
||||
var state = GetRemapState(original, current);
|
||||
return state switch
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ internal static bool GetCanInheritMoves(ushort species)
|
|||
/// <summary>
|
||||
/// Species that can yield a different baby species when bred.
|
||||
/// </summary>
|
||||
public static bool IsSplitBreedNotBabySpecies(ushort species, int generation)
|
||||
public static bool IsSplitBreedNotBabySpecies(ushort species, byte generation)
|
||||
{
|
||||
if (generation == 3)
|
||||
return IsSplitBreedNotBabySpecies3(species);
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ private static void VerifyECShare(BulkAnalysis input, CombinedReference pr, Comb
|
|||
var (cs, ca) = cr;
|
||||
|
||||
const CheckIdentifier ident = PID;
|
||||
int gen = pa.Info.Generation;
|
||||
var gen = pa.Info.Generation;
|
||||
bool gbaNDS = gen is 3 or 4 or 5;
|
||||
|
||||
if (!gbaNDS)
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ private static void VerifyPIDShare(BulkAnalysis input, CombinedReference pr, Com
|
|||
var cs = cr.Slot;
|
||||
var ca = cr.Analysis;
|
||||
const CheckIdentifier ident = PID;
|
||||
int gen = pa.Info.Generation;
|
||||
var gen = pa.Info.Generation;
|
||||
|
||||
if (ca.Info.Generation != gen)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ private static bool VerifyIDReuse(BulkAnalysis input, SlotCache ps, LegalityAnal
|
|||
}
|
||||
|
||||
// ID-SID16 should only occur for one Trainer name
|
||||
if (pp.OT_Name != cp.OT_Name)
|
||||
if (pp.OriginalTrainerName != cp.OriginalTrainerName)
|
||||
{
|
||||
var severity = ca.Info.Generation == 4 ? Severity.Fishy : Severity.Invalid;
|
||||
input.AddLine(ps, cs, "TID sharing across different trainer names detected.", ident, severity);
|
||||
|
|
|
|||
|
|
@ -35,9 +35,9 @@ private static void Verify(BulkAnalysis input, SlotCache cs)
|
|||
if (flag != 1)
|
||||
return;
|
||||
|
||||
if (pk.HT_Name != tr.OT)
|
||||
if (pk.HandlingTrainerName != tr.OT)
|
||||
input.AddLine(cs, LegalityCheckStrings.LTransferHTMismatchName, Trainer);
|
||||
if (pk is IHandlerLanguage h && h.HT_Language != tr.Language)
|
||||
if (pk is IHandlerLanguage h && h.HandlingTrainerLanguage != tr.Language)
|
||||
input.AddLine(cs, LegalityCheckStrings.LTransferHTMismatchLanguage, Trainer);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ private static void CheckClonedTrackerHOME(BulkAnalysis input, IHomeTrack home,
|
|||
|
||||
private static void CheckTrackerMissing(BulkAnalysis input, SlotCache cs, LegalityAnalysis ca)
|
||||
{
|
||||
if (ca.Info.Generation is (< 8 and not -1))
|
||||
if (ca.Info.Generation is (< 8 and not 0))
|
||||
input.AddLine(cs, "Missing tracker.", Encounter);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public static class Legal
|
|||
internal const int MaxItemID_3_XD = 593;
|
||||
internal const int MaxAbilityID_3 = 77;
|
||||
internal const int MaxBallID_3 = 0xC;
|
||||
internal const int MaxGameID_3 = 15; // CXD
|
||||
internal const GameVersion MaxGameID_3 = GameVersion.CXD;
|
||||
|
||||
internal const int MaxSpeciesID_4 = 493;
|
||||
internal const int MaxMoveID_4 = 467;
|
||||
|
|
@ -34,7 +34,7 @@ public static class Legal
|
|||
internal const int MaxItemID_4_HGSS = 536;
|
||||
internal const int MaxAbilityID_4 = 123;
|
||||
internal const int MaxBallID_4 = 0x18;
|
||||
internal const int MaxGameID_4 = 15; // CXD
|
||||
internal const GameVersion MaxGameID_4 = GameVersion.CXD;
|
||||
|
||||
internal const int MaxSpeciesID_5 = 649;
|
||||
internal const int MaxMoveID_5 = 559;
|
||||
|
|
@ -42,7 +42,7 @@ public static class Legal
|
|||
internal const int MaxItemID_5_B2W2 = 638;
|
||||
internal const int MaxAbilityID_5 = 164;
|
||||
internal const int MaxBallID_5 = 0x19;
|
||||
internal const int MaxGameID_5 = 23; // B2
|
||||
internal const GameVersion MaxGameID_5 = GameVersion.B2;
|
||||
|
||||
internal const int MaxSpeciesID_6 = 721;
|
||||
internal const int MaxMoveID_6_XY = 617;
|
||||
|
|
@ -52,14 +52,14 @@ public static class Legal
|
|||
internal const int MaxAbilityID_6_XY = 188;
|
||||
internal const int MaxAbilityID_6_AO = 191;
|
||||
internal const int MaxBallID_6 = 0x19;
|
||||
internal const int MaxGameID_6 = 27; // OR
|
||||
internal const GameVersion MaxGameID_6 = GameVersion.OR;
|
||||
|
||||
internal const int MaxSpeciesID_7 = 802;
|
||||
internal const int MaxMoveID_7 = 719;
|
||||
internal const int MaxItemID_7 = 920;
|
||||
internal const int MaxAbilityID_7 = 232;
|
||||
internal const int MaxBallID_7 = 0x1A; // 26
|
||||
internal const int MaxGameID_7 = 41; // Crystal (VC?)
|
||||
internal const GameVersion MaxGameID_7 = GameVersion.C;
|
||||
|
||||
internal const int MaxSpeciesID_7_USUM = 807;
|
||||
internal const int MaxMoveID_7_USUM = 728;
|
||||
|
|
@ -70,7 +70,7 @@ public static class Legal
|
|||
internal const int MaxMoveID_7b = 742; // Double Iron Bash
|
||||
internal const int MaxItemID_7b = 1057; // Magmar Candy
|
||||
internal const int MaxBallID_7b = (int)Ball.Beast;
|
||||
internal const int MaxGameID_7b = (int)GameVersion.GE;
|
||||
internal const GameVersion MaxGameID_7b = GameVersion.GE;
|
||||
internal const int MaxAbilityID_7b = MaxAbilityID_7_USUM;
|
||||
|
||||
// Current Binaries
|
||||
|
|
@ -98,20 +98,20 @@ public static class Legal
|
|||
internal const int MaxAbilityID_8_R2 = 267; // As One (Glastrier)
|
||||
|
||||
internal const int MaxBallID_8 = 0x1A; // 26 Beast
|
||||
internal const int MaxGameID_8 = 45; // Shield
|
||||
internal const GameVersion MaxGameID_8 = GameVersion.SH;
|
||||
|
||||
internal const int MaxSpeciesID_8a = (int)Species.Enamorus;
|
||||
internal const int MaxMoveID_8a = (int)Move.TakeHeart;
|
||||
internal const int MaxItemID_8a = 1828; // Legend Plate
|
||||
internal const int MaxBallID_8a = (int)Ball.LAOrigin;
|
||||
//internal const int MaxGameID_8a = (int)GameVersion.SP;
|
||||
//internal const GameVersion MaxGameID_8a = GameVersion.SP;
|
||||
internal const int MaxAbilityID_8a = MaxAbilityID_8_R2;
|
||||
|
||||
internal const int MaxSpeciesID_8b = MaxSpeciesID_4; // Arceus-493
|
||||
internal const int MaxMoveID_8b = MaxMoveID_8_R2;
|
||||
internal const int MaxItemID_8b = 1822; // DS Sounds
|
||||
internal const int MaxBallID_8b = (int)Ball.LAOrigin;
|
||||
//internal const int MaxGameID_8b = (int)GameVersion.SP;
|
||||
//internal const GameVersion MaxGameID_8b = GameVersion.SP;
|
||||
internal const int MaxAbilityID_8b = MaxAbilityID_8_R2;
|
||||
|
||||
internal const int MaxSpeciesID_9 = MaxSpeciesID_9_T2;
|
||||
|
|
@ -135,8 +135,8 @@ public static class Legal
|
|||
internal const int MaxAbilityID_9_T2 = (int)Ability.PoisonPuppeteer;
|
||||
|
||||
internal const int MaxBallID_9 = (int)Ball.LAOrigin;
|
||||
internal const int MaxGameID_9 = (int)GameVersion.VL;
|
||||
internal const int MaxGameID_HOME = MaxGameID_9;
|
||||
internal const GameVersion MaxGameID_9 = GameVersion.VL;
|
||||
internal const GameVersion MaxGameID_HOME = MaxGameID_9;
|
||||
|
||||
internal static readonly ushort[] HeldItems_GSC = ItemStorage2.GetAllHeld();
|
||||
internal static readonly ushort[] HeldItems_RS = ItemStorage3RS.GetAllHeld();
|
||||
|
|
@ -154,7 +154,7 @@ public static class Legal
|
|||
internal static readonly ushort[] HeldItems_LA = [];
|
||||
internal static readonly ushort[] HeldItems_SV = ItemStorage9SV.GetAllHeld();
|
||||
|
||||
internal static int GetMaxLanguageID(int generation) => generation switch
|
||||
internal static int GetMaxLanguageID(byte generation) => generation switch
|
||||
{
|
||||
1 => (int) LanguageID.Spanish, // 1-7 except 6
|
||||
3 => (int) LanguageID.Spanish, // 1-7 except 6
|
||||
|
|
@ -208,7 +208,7 @@ public static bool IsPPUpAvailable(PKM pk)
|
|||
/// </summary>
|
||||
/// <param name="generation">Generation of the Trainer</param>
|
||||
/// <param name="language">Language of the Trainer</param>
|
||||
public static int GetMaxLengthOT(int generation, LanguageID language) => language switch
|
||||
public static int GetMaxLengthOT(byte generation, LanguageID language) => language switch
|
||||
{
|
||||
LanguageID.ChineseS or LanguageID.ChineseT => 6,
|
||||
LanguageID.Japanese or LanguageID.Korean => generation >= 6 ? 6 : 5,
|
||||
|
|
@ -220,7 +220,7 @@ public static bool IsPPUpAvailable(PKM pk)
|
|||
/// </summary>
|
||||
/// <param name="generation">Generation of the Trainer</param>
|
||||
/// <param name="language">Language of the Trainer</param>
|
||||
public static int GetMaxLengthNickname(int generation, LanguageID language) => language switch
|
||||
public static int GetMaxLengthNickname(byte generation, LanguageID language) => language switch
|
||||
{
|
||||
LanguageID.ChineseS or LanguageID.ChineseT => 6,
|
||||
LanguageID.Japanese or LanguageID.Korean => generation >= 6 ? 6 : 5,
|
||||
|
|
|
|||
|
|
@ -11,28 +11,28 @@ internal static class Encounters1GBEra
|
|||
internal static readonly EncounterGift1[] Gifts =
|
||||
[
|
||||
// Stadium 1 (International)
|
||||
new(001, 05, GameVersion.Stadium) {Moves = new(033, 045), TID16 = 2000, OT_Names = StadiumOT_Int, Language = EncounterGBLanguage.International}, // Bulbasaur
|
||||
new(004, 05, GameVersion.Stadium) {Moves = new(010, 043), TID16 = 2000, OT_Names = StadiumOT_Int, Language = EncounterGBLanguage.International}, // Charmander
|
||||
new(007, 05, GameVersion.Stadium) {Moves = new(033, 045), TID16 = 2000, OT_Names = StadiumOT_Int, Language = EncounterGBLanguage.International}, // Squirtle
|
||||
new(106, 20, GameVersion.Stadium) {Moves = new(024, 096), TID16 = 2000, OT_Names = StadiumOT_Int, Language = EncounterGBLanguage.International}, // Hitmonlee
|
||||
new(107, 20, GameVersion.Stadium) {Moves = new(004, 097), TID16 = 2000, OT_Names = StadiumOT_Int, Language = EncounterGBLanguage.International}, // Hitmonchan
|
||||
new(133, 25, GameVersion.Stadium) {Moves = new(033, 039), TID16 = 2000, OT_Names = StadiumOT_Int, Language = EncounterGBLanguage.International}, // Eevee
|
||||
new(138, 20, GameVersion.Stadium) {Moves = new(055, 110), TID16 = 2000, OT_Names = StadiumOT_Int, Language = EncounterGBLanguage.International}, // Omanyte
|
||||
new(140, 20, GameVersion.Stadium) {Moves = new(010, 106), TID16 = 2000, OT_Names = StadiumOT_Int, Language = EncounterGBLanguage.International}, // Kabuto
|
||||
new(054, 15, GameVersion.Stadium) {Moves = new(133, 010), TID16 = 2000, OT_Names = StadiumOT_Int, Language = EncounterGBLanguage.International}, // Psyduck (Amnesia)
|
||||
new(001, 05, GameVersion.Stadium) {Moves = new(033, 045), TID16 = 2000, TrainerNames = StadiumOT_Int, Language = EncounterGBLanguage.International}, // Bulbasaur
|
||||
new(004, 05, GameVersion.Stadium) {Moves = new(010, 043), TID16 = 2000, TrainerNames = StadiumOT_Int, Language = EncounterGBLanguage.International}, // Charmander
|
||||
new(007, 05, GameVersion.Stadium) {Moves = new(033, 045), TID16 = 2000, TrainerNames = StadiumOT_Int, Language = EncounterGBLanguage.International}, // Squirtle
|
||||
new(106, 20, GameVersion.Stadium) {Moves = new(024, 096), TID16 = 2000, TrainerNames = StadiumOT_Int, Language = EncounterGBLanguage.International}, // Hitmonlee
|
||||
new(107, 20, GameVersion.Stadium) {Moves = new(004, 097), TID16 = 2000, TrainerNames = StadiumOT_Int, Language = EncounterGBLanguage.International}, // Hitmonchan
|
||||
new(133, 25, GameVersion.Stadium) {Moves = new(033, 039), TID16 = 2000, TrainerNames = StadiumOT_Int, Language = EncounterGBLanguage.International}, // Eevee
|
||||
new(138, 20, GameVersion.Stadium) {Moves = new(055, 110), TID16 = 2000, TrainerNames = StadiumOT_Int, Language = EncounterGBLanguage.International}, // Omanyte
|
||||
new(140, 20, GameVersion.Stadium) {Moves = new(010, 106), TID16 = 2000, TrainerNames = StadiumOT_Int, Language = EncounterGBLanguage.International}, // Kabuto
|
||||
new(054, 15, GameVersion.Stadium) {Moves = new(133, 010), TID16 = 2000, TrainerNames = StadiumOT_Int, Language = EncounterGBLanguage.International}, // Psyduck (Amnesia)
|
||||
|
||||
// Stadium 2 (Japan)
|
||||
new(001, 05, GameVersion.Stadium) {Moves = new(033, 045), TID16 = 1999, OT_Name = StadiumOT_JPN}, // Bulbasaur
|
||||
new(004, 05, GameVersion.Stadium) {Moves = new(010, 043), TID16 = 1999, OT_Name = StadiumOT_JPN}, // Charmander
|
||||
new(007, 05, GameVersion.Stadium) {Moves = new(033, 045), TID16 = 1999, OT_Name = StadiumOT_JPN}, // Squirtle
|
||||
new(106, 20, GameVersion.Stadium) {Moves = new(024, 096), TID16 = 1999, OT_Name = StadiumOT_JPN}, // Hitmonlee
|
||||
new(107, 20, GameVersion.Stadium) {Moves = new(004, 097), TID16 = 1999, OT_Name = StadiumOT_JPN}, // Hitmonchan
|
||||
new(133, 25, GameVersion.Stadium) {Moves = new(033, 039), TID16 = 1999, OT_Name = StadiumOT_JPN}, // Eevee
|
||||
new(138, 20, GameVersion.Stadium) {Moves = new(055, 110), TID16 = 1999, OT_Name = StadiumOT_JPN}, // Omanyte
|
||||
new(140, 20, GameVersion.Stadium) {Moves = new(010, 106), TID16 = 1999, OT_Name = StadiumOT_JPN}, // Kabuto
|
||||
new(054, 15, GameVersion.Stadium) {Moves = new(133, 010), TID16 = 1999, OT_Name = StadiumOT_JPN}, // Psyduck (Amnesia)
|
||||
new(001, 05, GameVersion.Stadium) {Moves = new(033, 045), TID16 = 1999, OriginalTrainerName = StadiumOT_JPN}, // Bulbasaur
|
||||
new(004, 05, GameVersion.Stadium) {Moves = new(010, 043), TID16 = 1999, OriginalTrainerName = StadiumOT_JPN}, // Charmander
|
||||
new(007, 05, GameVersion.Stadium) {Moves = new(033, 045), TID16 = 1999, OriginalTrainerName = StadiumOT_JPN}, // Squirtle
|
||||
new(106, 20, GameVersion.Stadium) {Moves = new(024, 096), TID16 = 1999, OriginalTrainerName = StadiumOT_JPN}, // Hitmonlee
|
||||
new(107, 20, GameVersion.Stadium) {Moves = new(004, 097), TID16 = 1999, OriginalTrainerName = StadiumOT_JPN}, // Hitmonchan
|
||||
new(133, 25, GameVersion.Stadium) {Moves = new(033, 039), TID16 = 1999, OriginalTrainerName = StadiumOT_JPN}, // Eevee
|
||||
new(138, 20, GameVersion.Stadium) {Moves = new(055, 110), TID16 = 1999, OriginalTrainerName = StadiumOT_JPN}, // Omanyte
|
||||
new(140, 20, GameVersion.Stadium) {Moves = new(010, 106), TID16 = 1999, OriginalTrainerName = StadiumOT_JPN}, // Kabuto
|
||||
new(054, 15, GameVersion.Stadium) {Moves = new(133, 010), TID16 = 1999, OriginalTrainerName = StadiumOT_JPN}, // Psyduck (Amnesia)
|
||||
|
||||
new(151, 5, GameVersion.RB) {IVs = Yoshira, OT_Names = YoshiOT, Language = EncounterGBLanguage.International }, // Yoshira Mew Events
|
||||
new(151, 5, GameVersion.RB) {IVs = Yoshira, OT_Names = TourOT, Language = EncounterGBLanguage.International }, // Pokémon 2000 Stadium Tour Mew
|
||||
new(151, 5, GameVersion.RB) {IVs = Yoshira, TrainerNames = YoshiOT, Language = EncounterGBLanguage.International }, // Yoshira Mew Events
|
||||
new(151, 5, GameVersion.RB) {IVs = Yoshira, TrainerNames = TourOT, Language = EncounterGBLanguage.International }, // Pokémon 2000 Stadium Tour Mew
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ internal static class Encounters1VC
|
|||
internal static readonly EncounterGift1[] Gifts =
|
||||
[
|
||||
// Event Mew
|
||||
new(151, 5, GameVersion.RBY) { IVs = Flawless15, TID16 = 22796, OT_Name = "GF", Language = EncounterGBLanguage.International },
|
||||
new(151, 5, GameVersion.RBY) { IVs = Flawless15, TID16 = 22796, OT_Name = "ゲーフリ" },
|
||||
new(151, 5, GameVersion.RBY) { IVs = Flawless15, TID16 = 22796, OriginalTrainerName = "GF", Language = EncounterGBLanguage.International },
|
||||
new(151, 5, GameVersion.RBY) { IVs = Flawless15, TID16 = 22796, OriginalTrainerName = "ゲーフリ" },
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,218 +11,218 @@ internal static class Encounters2GBEra
|
|||
internal static readonly EncounterGift2[] StaticEventsGB =
|
||||
[
|
||||
// Stadium 2 Baton Pass Farfetch'd
|
||||
new(083, 05, C) {Moves = new(226, 14, 97, 163), Location = 127, TID16 = 2000, OT_Name = "スタジアム"},
|
||||
new(083, 05, C) {Moves = new(226, 14, 97, 163), Location = 127, TID16 = 2000, OT_Name = "Stadium", Language = International},
|
||||
new(083, 05, C) {Moves = new(226, 14, 97, 163), Location = 127, TID16 = 2001, OT_Names = Stadium2, Language = International},
|
||||
new(083, 05, C) {Moves = new(226, 14, 97, 163), Location = 127, TID16 = 2000, OriginalTrainerName = "スタジアム"},
|
||||
new(083, 05, C) {Moves = new(226, 14, 97, 163), Location = 127, TID16 = 2000, OriginalTrainerName = "Stadium", Language = International},
|
||||
new(083, 05, C) {Moves = new(226, 14, 97, 163), Location = 127, TID16 = 2001, TrainerNames = Stadium2, Language = International},
|
||||
|
||||
// Stadium 2 Earthquake Gligar
|
||||
new(207, 05, C) {Moves = new(89, 68, 17), Location = 127, TID16 = 2000, OT_Name = "スタジアム"},
|
||||
new(207, 05, C) {Moves = new(89, 68, 17), Location = 127, TID16 = 2000, OT_Name = "Stadium", Language = International},
|
||||
new(207, 05, C) {Moves = new(89, 68, 17), Location = 127, TID16 = 2001, OT_Names = Stadium2, Language = International},
|
||||
new(207, 05, C) {Moves = new(89, 68, 17), Location = 127, TID16 = 2000, OriginalTrainerName = "スタジアム"},
|
||||
new(207, 05, C) {Moves = new(89, 68, 17), Location = 127, TID16 = 2000, OriginalTrainerName = "Stadium", Language = International},
|
||||
new(207, 05, C) {Moves = new(89, 68, 17), Location = 127, TID16 = 2001, TrainerNames = Stadium2, Language = International},
|
||||
|
||||
//New York Pokémon Center Events
|
||||
|
||||
// Legendary Beasts (November 22 to 29, 2001)
|
||||
new(243, 05, C) {OT_Names = PCNYx, CurrentLevel = 40, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Raikou
|
||||
new(244, 05, C) {OT_Names = PCNYx, CurrentLevel = 40, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Entei
|
||||
new(245, 05, C) {OT_Names = PCNYx, CurrentLevel = 40, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Suicune
|
||||
new(243, 05, C) {TrainerNames = PCNYx, CurrentLevel = 40, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Raikou
|
||||
new(244, 05, C) {TrainerNames = PCNYx, CurrentLevel = 40, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Entei
|
||||
new(245, 05, C) {TrainerNames = PCNYx, CurrentLevel = 40, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Suicune
|
||||
|
||||
// Legendary Birds (November 30 to December 6, 2001)
|
||||
new(144, 05, C) {OT_Names = PCNYx, CurrentLevel = 50, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Articuno
|
||||
new(145, 05, C) {OT_Names = PCNYx, CurrentLevel = 50, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Zapdos
|
||||
new(146, 05, C) {OT_Names = PCNYx, CurrentLevel = 50, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Moltres
|
||||
new(144, 05, C) {TrainerNames = PCNYx, CurrentLevel = 50, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Articuno
|
||||
new(145, 05, C) {TrainerNames = PCNYx, CurrentLevel = 50, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Zapdos
|
||||
new(146, 05, C) {TrainerNames = PCNYx, CurrentLevel = 50, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Moltres
|
||||
|
||||
// Christmas Week (December 21 to 27, 2001)
|
||||
new(225, 05, GS) {OT_Names = PCNYx, Moves = new(006), EggCycles = 10, Language = International}, // Pay Day Delibird
|
||||
new(251, 05, C) {OT_Names = PCNYx, Location = 127, Language = International}, // Celebi
|
||||
new(225, 05, GS) {TrainerNames = PCNYx, Moves = new(006), EggCycles = 10, Language = International}, // Pay Day Delibird
|
||||
new(251, 05, C) {TrainerNames = PCNYx, Location = 127, Language = International}, // Celebi
|
||||
|
||||
// The Initial Three Set (December 28, 2001, to January 31, 2002)
|
||||
new(001, 05, GS) {OT_Names = PCNYx, Moves = new(246), EggCycles = 10, Language = International}, // Bulbasaur Ancientpower
|
||||
new(004, 05, GS) {OT_Names = PCNYx, Moves = new(242), EggCycles = 10, Language = International}, // Charmander Crunch
|
||||
new(007, 05, GS) {OT_Names = PCNYx, Moves = new(192), EggCycles = 10, Language = International}, // Squirtle Zap Cannon
|
||||
new(152, 05, GS) {OT_Names = PCNYx, Moves = new(080), EggCycles = 10, Language = International}, // Chikorita Petal Dance
|
||||
new(155, 05, GS) {OT_Names = PCNYx, Moves = new(038), EggCycles = 10, Language = International}, // Cyndaquil Double-Edge
|
||||
new(158, 05, GS) {OT_Names = PCNYx, Moves = new(066), EggCycles = 10, Language = International}, // Totodile Submission
|
||||
new(001, 05, GS) {TrainerNames = PCNYx, Moves = new(246), EggCycles = 10, Language = International}, // Bulbasaur Ancientpower
|
||||
new(004, 05, GS) {TrainerNames = PCNYx, Moves = new(242), EggCycles = 10, Language = International}, // Charmander Crunch
|
||||
new(007, 05, GS) {TrainerNames = PCNYx, Moves = new(192), EggCycles = 10, Language = International}, // Squirtle Zap Cannon
|
||||
new(152, 05, GS) {TrainerNames = PCNYx, Moves = new(080), EggCycles = 10, Language = International}, // Chikorita Petal Dance
|
||||
new(155, 05, GS) {TrainerNames = PCNYx, Moves = new(038), EggCycles = 10, Language = International}, // Cyndaquil Double-Edge
|
||||
new(158, 05, GS) {TrainerNames = PCNYx, Moves = new(066), EggCycles = 10, Language = International}, // Totodile Submission
|
||||
|
||||
// Valentine Week (February 1 to 14, 2002)
|
||||
new(029, 05, GS) {OT_Names = PCNYx, Moves = new(142), EggCycles = 10, Language = International}, // Nidoran (F) Lovely Kiss
|
||||
new(029, 05, GS) {OT_Names = PCNYx, Moves = new(186), EggCycles = 10, Language = International}, // Nidoran (F) Sweet Kiss
|
||||
new(032, 05, GS) {OT_Names = PCNYx, Moves = new(142), EggCycles = 10, Language = International}, // Nidoran (M) Lovely Kiss
|
||||
new(032, 05, GS) {OT_Names = PCNYx, Moves = new(186), EggCycles = 10, Language = International}, // Nidoran (M) Sweet Kiss
|
||||
new(069, 05, GS) {OT_Names = PCNYx, Moves = new(142), EggCycles = 10, Language = International}, // Bellsprout Lovely Kiss
|
||||
new(069, 05, GS) {OT_Names = PCNYx, Moves = new(186), EggCycles = 10, Language = International}, // Bellsprout Sweet Kiss
|
||||
new(029, 05, GS) {TrainerNames = PCNYx, Moves = new(142), EggCycles = 10, Language = International}, // Nidoran (F) Lovely Kiss
|
||||
new(029, 05, GS) {TrainerNames = PCNYx, Moves = new(186), EggCycles = 10, Language = International}, // Nidoran (F) Sweet Kiss
|
||||
new(032, 05, GS) {TrainerNames = PCNYx, Moves = new(142), EggCycles = 10, Language = International}, // Nidoran (M) Lovely Kiss
|
||||
new(032, 05, GS) {TrainerNames = PCNYx, Moves = new(186), EggCycles = 10, Language = International}, // Nidoran (M) Sweet Kiss
|
||||
new(069, 05, GS) {TrainerNames = PCNYx, Moves = new(142), EggCycles = 10, Language = International}, // Bellsprout Lovely Kiss
|
||||
new(069, 05, GS) {TrainerNames = PCNYx, Moves = new(186), EggCycles = 10, Language = International}, // Bellsprout Sweet Kiss
|
||||
|
||||
// Swarm Week (February 22 to March 14, 2002)
|
||||
new(183, 05, GS) {OT_Names = PCNYx, Moves = new(056), EggCycles = 10, Language = International}, // Marill Hydro Pump
|
||||
new(193, 05, GS) {OT_Names = PCNYx, Moves = new(211), EggCycles = 10, Language = International}, // Yanma Steel Wing
|
||||
new(206, 05, GS) {OT_Names = PCNYx, Moves = new(032), EggCycles = 10, Language = International}, // Dunsparce Horn Drill
|
||||
new(209, 05, GS) {OT_Names = PCNYx, Moves = new(142), EggCycles = 10, Language = International}, // Snubbull Lovely Kiss
|
||||
new(211, 05, GS) {OT_Names = PCNYx, Moves = new(038), EggCycles = 10, Language = International}, // Qwilfish Double-Edge
|
||||
new(223, 05, GS) {OT_Names = PCNYx, Moves = new(133), EggCycles = 10, Language = International}, // Remoraid Amnesia
|
||||
new(183, 05, GS) {TrainerNames = PCNYx, Moves = new(056), EggCycles = 10, Language = International}, // Marill Hydro Pump
|
||||
new(193, 05, GS) {TrainerNames = PCNYx, Moves = new(211), EggCycles = 10, Language = International}, // Yanma Steel Wing
|
||||
new(206, 05, GS) {TrainerNames = PCNYx, Moves = new(032), EggCycles = 10, Language = International}, // Dunsparce Horn Drill
|
||||
new(209, 05, GS) {TrainerNames = PCNYx, Moves = new(142), EggCycles = 10, Language = International}, // Snubbull Lovely Kiss
|
||||
new(211, 05, GS) {TrainerNames = PCNYx, Moves = new(038), EggCycles = 10, Language = International}, // Qwilfish Double-Edge
|
||||
new(223, 05, GS) {TrainerNames = PCNYx, Moves = new(133), EggCycles = 10, Language = International}, // Remoraid Amnesia
|
||||
|
||||
// Shiny RBY Starters (March 15 to 21, 2002)
|
||||
new(003, 05, C) {OT_Names = PCNYx, CurrentLevel = 40, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Venusaur
|
||||
new(006, 05, C) {OT_Names = PCNYx, CurrentLevel = 40, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Charizard
|
||||
new(009, 05, C) {OT_Names = PCNYx, CurrentLevel = 40, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Blastoise
|
||||
new(003, 05, C) {TrainerNames = PCNYx, CurrentLevel = 40, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Venusaur
|
||||
new(006, 05, C) {TrainerNames = PCNYx, CurrentLevel = 40, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Charizard
|
||||
new(009, 05, C) {TrainerNames = PCNYx, CurrentLevel = 40, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Blastoise
|
||||
|
||||
// Babies Week (March 22 to April 11, 2002)
|
||||
new(172, 05, GS) {OT_Names = PCNYx, Moves = new(047), EggCycles = 10, Language = International}, // Pichu Sing
|
||||
new(173, 05, GS) {OT_Names = PCNYx, Moves = new(129), EggCycles = 10, Language = International}, // Cleffa Swift
|
||||
new(174, 05, GS) {OT_Names = PCNYx, Moves = new(102), EggCycles = 10, Language = International}, // Igglybuff Mimic
|
||||
new(238, 05, GS) {OT_Names = PCNYx, Moves = new(118), EggCycles = 10, Language = International}, // Smoochum Metronome
|
||||
new(239, 05, GS) {OT_Names = PCNYx, Moves = new(228), EggCycles = 10, Language = International}, // Elekid Pursuit
|
||||
new(240, 05, GS) {OT_Names = PCNYx, Moves = new(185), EggCycles = 10, Language = International}, // Magby Faint Attack
|
||||
new(172, 05, GS) {TrainerNames = PCNYx, Moves = new(047), EggCycles = 10, Language = International}, // Pichu Sing
|
||||
new(173, 05, GS) {TrainerNames = PCNYx, Moves = new(129), EggCycles = 10, Language = International}, // Cleffa Swift
|
||||
new(174, 05, GS) {TrainerNames = PCNYx, Moves = new(102), EggCycles = 10, Language = International}, // Igglybuff Mimic
|
||||
new(238, 05, GS) {TrainerNames = PCNYx, Moves = new(118), EggCycles = 10, Language = International}, // Smoochum Metronome
|
||||
new(239, 05, GS) {TrainerNames = PCNYx, Moves = new(228), EggCycles = 10, Language = International}, // Elekid Pursuit
|
||||
new(240, 05, GS) {TrainerNames = PCNYx, Moves = new(185), EggCycles = 10, Language = International}, // Magby Faint Attack
|
||||
|
||||
// Spring Into Spring (April 12 to May 4, 2002)
|
||||
new(054, 05, GS) {OT_Names = PCNYx, Moves = new(080), EggCycles = 10, Language = International}, // Psyduck Petal Dance
|
||||
new(152, 05, GS) {OT_Names = PCNYx, Moves = new(080), EggCycles = 10, Language = International}, // Chikorita Petal Dance
|
||||
new(172, 05, GS) {OT_Names = PCNYx, Moves = new(080), EggCycles = 10, Language = International}, // Pichu Petal Dance
|
||||
new(173, 05, GS) {OT_Names = PCNYx, Moves = new(080), EggCycles = 10, Language = International}, // Cleffa Petal Dance
|
||||
new(174, 05, GS) {OT_Names = PCNYx, Moves = new(080), EggCycles = 10, Language = International}, // Igglybuff Petal Dance
|
||||
new(238, 05, GS) {OT_Names = PCNYx, Moves = new(080), EggCycles = 10, Language = International}, // Smoochum Petal Dance
|
||||
new(054, 05, GS) {TrainerNames = PCNYx, Moves = new(080), EggCycles = 10, Language = International}, // Psyduck Petal Dance
|
||||
new(152, 05, GS) {TrainerNames = PCNYx, Moves = new(080), EggCycles = 10, Language = International}, // Chikorita Petal Dance
|
||||
new(172, 05, GS) {TrainerNames = PCNYx, Moves = new(080), EggCycles = 10, Language = International}, // Pichu Petal Dance
|
||||
new(173, 05, GS) {TrainerNames = PCNYx, Moves = new(080), EggCycles = 10, Language = International}, // Cleffa Petal Dance
|
||||
new(174, 05, GS) {TrainerNames = PCNYx, Moves = new(080), EggCycles = 10, Language = International}, // Igglybuff Petal Dance
|
||||
new(238, 05, GS) {TrainerNames = PCNYx, Moves = new(080), EggCycles = 10, Language = International}, // Smoochum Petal Dance
|
||||
|
||||
// Baby Weeks (May 5 to June 7, 2002)
|
||||
new(194, 05, GS) {Moves = new(187), EggCycles = 10, Language = International}, // Wooper Belly Drum
|
||||
|
||||
// Tropical Promotion to Summer Festival 1 (June 8 to 21, 2002)
|
||||
new(060, 05, GS) {OT_Names = PCNYx, Moves = new(074), EggCycles = 10, Language = International}, // Poliwag Growth
|
||||
new(116, 05, GS) {OT_Names = PCNYx, Moves = new(114), EggCycles = 10, Language = International}, // Horsea Haze
|
||||
new(118, 05, GS) {OT_Names = PCNYx, Moves = new(014), EggCycles = 10, Language = International}, // Goldeen Swords Dance
|
||||
new(129, 05, GS) {OT_Names = PCNYx, Moves = new(179), EggCycles = 10, Language = International}, // Magikarp Reversal
|
||||
new(183, 05, GS) {OT_Names = PCNYx, Moves = new(146), EggCycles = 10, Language = International}, // Marill Dizzy Punch
|
||||
new(060, 05, GS) {TrainerNames = PCNYx, Moves = new(074), EggCycles = 10, Language = International}, // Poliwag Growth
|
||||
new(116, 05, GS) {TrainerNames = PCNYx, Moves = new(114), EggCycles = 10, Language = International}, // Horsea Haze
|
||||
new(118, 05, GS) {TrainerNames = PCNYx, Moves = new(014), EggCycles = 10, Language = International}, // Goldeen Swords Dance
|
||||
new(129, 05, GS) {TrainerNames = PCNYx, Moves = new(179), EggCycles = 10, Language = International}, // Magikarp Reversal
|
||||
new(183, 05, GS) {TrainerNames = PCNYx, Moves = new(146), EggCycles = 10, Language = International}, // Marill Dizzy Punch
|
||||
|
||||
// Tropical Promotion to Summer Festival 2 (July 12 to August 8, 2002)
|
||||
new(054, 05, GS) {OT_Names = PCNYx, Moves = new(161), EggCycles = 10, Language = International}, // Psyduck Tri Attack
|
||||
new(072, 05, GS) {OT_Names = PCNYx, Moves = new(109), EggCycles = 10, Language = International}, // Tentacool Confuse Ray
|
||||
new(131, 05, GS) {OT_Names = PCNYx, Moves = new(044), EggCycles = 10, Language = International}, // Lapras Bite
|
||||
new(170, 05, GS) {OT_Names = PCNYx, Moves = new(113), EggCycles = 10, Language = International}, // Chinchou Light Screen
|
||||
new(223, 05, GS) {OT_Names = PCNYx, Moves = new(054), EggCycles = 10, Language = International}, // Remoraid Mist
|
||||
new(226, 05, GS) {OT_Names = PCNYx, Moves = new(016), EggCycles = 10, Language = International}, // Mantine Gust
|
||||
new(054, 05, GS) {TrainerNames = PCNYx, Moves = new(161), EggCycles = 10, Language = International}, // Psyduck Tri Attack
|
||||
new(072, 05, GS) {TrainerNames = PCNYx, Moves = new(109), EggCycles = 10, Language = International}, // Tentacool Confuse Ray
|
||||
new(131, 05, GS) {TrainerNames = PCNYx, Moves = new(044), EggCycles = 10, Language = International}, // Lapras Bite
|
||||
new(170, 05, GS) {TrainerNames = PCNYx, Moves = new(113), EggCycles = 10, Language = International}, // Chinchou Light Screen
|
||||
new(223, 05, GS) {TrainerNames = PCNYx, Moves = new(054), EggCycles = 10, Language = International}, // Remoraid Mist
|
||||
new(226, 05, GS) {TrainerNames = PCNYx, Moves = new(016), EggCycles = 10, Language = International}, // Mantine Gust
|
||||
|
||||
// Safari Week (August 9 to 29, 2002)
|
||||
new(029, 05, GS) {OT_Names = PCNYx, Moves = new(236), EggCycles = 10, Language = International}, // Nidoran (F) Moonlight
|
||||
new(032, 05, GS) {OT_Names = PCNYx, Moves = new(234), EggCycles = 10, Language = International}, // Nidoran (M) Morning Sun
|
||||
new(113, 05, GS) {OT_Names = PCNYx, Moves = new(230), EggCycles = 10, Language = International}, // Chansey Sweet Scent
|
||||
new(115, 05, GS) {OT_Names = PCNYx, Moves = new(185), EggCycles = 10, Language = International}, // Kangaskhan Faint Attack
|
||||
new(128, 05, GS) {OT_Names = PCNYx, Moves = new(098), EggCycles = 10, Language = International}, // Tauros Quick Attack
|
||||
new(147, 05, GS) {OT_Names = PCNYx, Moves = new(056), EggCycles = 10, Language = International}, // Dratini Hydro Pump
|
||||
new(029, 05, GS) {TrainerNames = PCNYx, Moves = new(236), EggCycles = 10, Language = International}, // Nidoran (F) Moonlight
|
||||
new(032, 05, GS) {TrainerNames = PCNYx, Moves = new(234), EggCycles = 10, Language = International}, // Nidoran (M) Morning Sun
|
||||
new(113, 05, GS) {TrainerNames = PCNYx, Moves = new(230), EggCycles = 10, Language = International}, // Chansey Sweet Scent
|
||||
new(115, 05, GS) {TrainerNames = PCNYx, Moves = new(185), EggCycles = 10, Language = International}, // Kangaskhan Faint Attack
|
||||
new(128, 05, GS) {TrainerNames = PCNYx, Moves = new(098), EggCycles = 10, Language = International}, // Tauros Quick Attack
|
||||
new(147, 05, GS) {TrainerNames = PCNYx, Moves = new(056), EggCycles = 10, Language = International}, // Dratini Hydro Pump
|
||||
|
||||
// Sky Week (August 30 to September 26, 2002)
|
||||
new(021, 05, GS) {OT_Names = PCNYx, Moves = new(049), EggCycles = 10, Language = International}, // Spearow SonicBoom
|
||||
new(083, 05, GS) {OT_Names = PCNYx, Moves = new(210), EggCycles = 10, Language = International}, // Farfetch'd Fury Cutter
|
||||
new(084, 05, GS) {OT_Names = PCNYx, Moves = new(067), EggCycles = 10, Language = International}, // Doduo Low Kick
|
||||
new(177, 05, GS) {OT_Names = PCNYx, Moves = new(219), EggCycles = 10, Language = International}, // Natu Safeguard
|
||||
new(198, 05, GS) {OT_Names = PCNYx, Moves = new(251), EggCycles = 10, Language = International}, // Murkrow Beat Up
|
||||
new(227, 05, GS) {OT_Names = PCNYx, Moves = new(210), EggCycles = 10, Language = International}, // Skarmory Fury Cutter
|
||||
new(021, 05, GS) {TrainerNames = PCNYx, Moves = new(049), EggCycles = 10, Language = International}, // Spearow SonicBoom
|
||||
new(083, 05, GS) {TrainerNames = PCNYx, Moves = new(210), EggCycles = 10, Language = International}, // Farfetch'd Fury Cutter
|
||||
new(084, 05, GS) {TrainerNames = PCNYx, Moves = new(067), EggCycles = 10, Language = International}, // Doduo Low Kick
|
||||
new(177, 05, GS) {TrainerNames = PCNYx, Moves = new(219), EggCycles = 10, Language = International}, // Natu Safeguard
|
||||
new(198, 05, GS) {TrainerNames = PCNYx, Moves = new(251), EggCycles = 10, Language = International}, // Murkrow Beat Up
|
||||
new(227, 05, GS) {TrainerNames = PCNYx, Moves = new(210), EggCycles = 10, Language = International}, // Skarmory Fury Cutter
|
||||
|
||||
// The Kanto Initial Three Pokémon (September 27 to October 3, 2002)
|
||||
new(150, 05, C) {OT_Names = PCNYx, CurrentLevel = 70, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Mewtwo
|
||||
new(150, 05, C) {TrainerNames = PCNYx, CurrentLevel = 70, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Mewtwo
|
||||
|
||||
// Power Plant Pokémon (October 4 to October 10, 2002)
|
||||
new(172, 05, GS) {OT_Names = PCNYx, Moves = new(146), EggCycles = 10, Language = International}, // Pichu Dizzy Punch
|
||||
new(081, 05, GS) {OT_Names = PCNYx, Moves = new(097), EggCycles = 10, Language = International}, // Magnemite Agility
|
||||
new(239, 05, GS) {OT_Names = PCNYx, Moves = new(146), EggCycles = 10, Language = International}, // Elekid Dizzy Punch
|
||||
new(100, 05, GS) {OT_Names = PCNYx, Moves = new(097), EggCycles = 10, Language = International}, // Voltorb Agility
|
||||
new(172, 05, GS) {TrainerNames = PCNYx, Moves = new(146), EggCycles = 10, Language = International}, // Pichu Dizzy Punch
|
||||
new(081, 05, GS) {TrainerNames = PCNYx, Moves = new(097), EggCycles = 10, Language = International}, // Magnemite Agility
|
||||
new(239, 05, GS) {TrainerNames = PCNYx, Moves = new(146), EggCycles = 10, Language = International}, // Elekid Dizzy Punch
|
||||
new(100, 05, GS) {TrainerNames = PCNYx, Moves = new(097), EggCycles = 10, Language = International}, // Voltorb Agility
|
||||
|
||||
// Scary Face Pokémon (October 25 to October 31, 2002)
|
||||
new(173, 05, GS) {OT_Names = PCNYx, Moves = new(184), EggCycles = 10, Language = International}, // Cleffa Scary Face
|
||||
new(174, 05, GS) {OT_Names = PCNYx, Moves = new(184), EggCycles = 10, Language = International}, // Igglybuff Scary Face
|
||||
new(183, 05, GS) {OT_Names = PCNYx, Moves = new(184), EggCycles = 10, Language = International}, // Marill Scary Face
|
||||
new(172, 05, GS) {OT_Names = PCNYx, Moves = new(184), EggCycles = 10, Language = International}, // Pichu Scary Face
|
||||
new(194, 05, GS) {OT_Names = PCNYx, Moves = new(184), EggCycles = 10, Language = International}, // Wooper Scary Face
|
||||
new(173, 05, GS) {TrainerNames = PCNYx, Moves = new(184), EggCycles = 10, Language = International}, // Cleffa Scary Face
|
||||
new(174, 05, GS) {TrainerNames = PCNYx, Moves = new(184), EggCycles = 10, Language = International}, // Igglybuff Scary Face
|
||||
new(183, 05, GS) {TrainerNames = PCNYx, Moves = new(184), EggCycles = 10, Language = International}, // Marill Scary Face
|
||||
new(172, 05, GS) {TrainerNames = PCNYx, Moves = new(184), EggCycles = 10, Language = International}, // Pichu Scary Face
|
||||
new(194, 05, GS) {TrainerNames = PCNYx, Moves = new(184), EggCycles = 10, Language = International}, // Wooper Scary Face
|
||||
|
||||
// Silver Cave (November 1 to November 7, 2002)
|
||||
new(114, 05, GS) {OT_Names = PCNYx, Moves = new(235), EggCycles = 10, Language = International}, // Tangela Synthesis
|
||||
new(077, 05, GS) {OT_Names = PCNYx, Moves = new(067), EggCycles = 10, Language = International}, // Ponyta Low Kick
|
||||
new(200, 05, GS) {OT_Names = PCNYx, Moves = new(095), EggCycles = 10, Language = International}, // Misdreavus Hypnosis
|
||||
new(246, 05, GS) {OT_Names = PCNYx, Moves = new(099), EggCycles = 10, Language = International}, // Larvitar Rage
|
||||
new(114, 05, GS) {TrainerNames = PCNYx, Moves = new(235), EggCycles = 10, Language = International}, // Tangela Synthesis
|
||||
new(077, 05, GS) {TrainerNames = PCNYx, Moves = new(067), EggCycles = 10, Language = International}, // Ponyta Low Kick
|
||||
new(200, 05, GS) {TrainerNames = PCNYx, Moves = new(095), EggCycles = 10, Language = International}, // Misdreavus Hypnosis
|
||||
new(246, 05, GS) {TrainerNames = PCNYx, Moves = new(099), EggCycles = 10, Language = International}, // Larvitar Rage
|
||||
|
||||
// Union Cave Pokémon (November 8 to 14, 2002)
|
||||
new(120, 05, GS) {OT_Names = PCNYx, Moves = new(239), EggCycles = 10, Language = International}, // Staryu Twister
|
||||
new(098, 05, GS) {OT_Names = PCNYx, Moves = new(232), EggCycles = 10, Language = International}, // Krabby Metal Claw
|
||||
new(095, 05, GS) {OT_Names = PCNYx, Moves = new(159), EggCycles = 10, Language = International}, // Onix Sharpen
|
||||
new(131, 05, GS) {OT_Names = PCNYx, Moves = new(248), EggCycles = 10, Language = International}, // Lapras Future Sight
|
||||
new(120, 05, GS) {TrainerNames = PCNYx, Moves = new(239), EggCycles = 10, Language = International}, // Staryu Twister
|
||||
new(098, 05, GS) {TrainerNames = PCNYx, Moves = new(232), EggCycles = 10, Language = International}, // Krabby Metal Claw
|
||||
new(095, 05, GS) {TrainerNames = PCNYx, Moves = new(159), EggCycles = 10, Language = International}, // Onix Sharpen
|
||||
new(131, 05, GS) {TrainerNames = PCNYx, Moves = new(248), EggCycles = 10, Language = International}, // Lapras Future Sight
|
||||
|
||||
// Johto Legendary (November 15 to 21, 2002)
|
||||
new(250, 05, C) {OT_Names = PCNYx, CurrentLevel = 40, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Ho-Oh
|
||||
new(249, 05, C) {OT_Names = PCNYx, CurrentLevel = 40, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Lugia
|
||||
new(250, 05, C) {TrainerNames = PCNYx, CurrentLevel = 40, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Ho-Oh
|
||||
new(249, 05, C) {TrainerNames = PCNYx, CurrentLevel = 40, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Lugia
|
||||
|
||||
// Celebi Present SP (November 22 to 28, 2002)
|
||||
new(151, 05, C) {OT_Names = PCNYx, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Mew
|
||||
new(151, 05, C) {TrainerNames = PCNYx, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Mew
|
||||
|
||||
// Psychic Type Pokémon (November 29 to December 5, 2002)
|
||||
new(063, 05, GS) {OT_Names = PCNYx, Moves = new(193), EggCycles = 10, Language = International}, // Abra Foresight
|
||||
new(096, 05, GS) {OT_Names = PCNYx, Moves = new(133), EggCycles = 10, Language = International}, // Drowzee Amnesia
|
||||
new(102, 05, GS) {OT_Names = PCNYx, Moves = new(230), EggCycles = 10, Language = International}, // Exeggcute Sweet Scent
|
||||
new(122, 05, GS) {OT_Names = PCNYx, Moves = new(170), EggCycles = 10, Language = International}, // Mr. Mime Mind Reader
|
||||
new(063, 05, GS) {TrainerNames = PCNYx, Moves = new(193), EggCycles = 10, Language = International}, // Abra Foresight
|
||||
new(096, 05, GS) {TrainerNames = PCNYx, Moves = new(133), EggCycles = 10, Language = International}, // Drowzee Amnesia
|
||||
new(102, 05, GS) {TrainerNames = PCNYx, Moves = new(230), EggCycles = 10, Language = International}, // Exeggcute Sweet Scent
|
||||
new(122, 05, GS) {TrainerNames = PCNYx, Moves = new(170), EggCycles = 10, Language = International}, // Mr. Mime Mind Reader
|
||||
|
||||
// The Johto Initial Three Pokémon (December 6 to 12, 2002)
|
||||
new(154, 05, C) {OT_Names = PCNYx, CurrentLevel = 40, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Meganium
|
||||
new(157, 05, C) {OT_Names = PCNYx, CurrentLevel = 40, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Typhlosion
|
||||
new(160, 05, C) {OT_Names = PCNYx, CurrentLevel = 40, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Feraligatr
|
||||
new(154, 05, C) {TrainerNames = PCNYx, CurrentLevel = 40, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Meganium
|
||||
new(157, 05, C) {TrainerNames = PCNYx, CurrentLevel = 40, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Typhlosion
|
||||
new(160, 05, C) {TrainerNames = PCNYx, CurrentLevel = 40, Shiny = Shiny.Always, Location = 127, Language = International}, // Shiny Feraligatr
|
||||
|
||||
// Rock Tunnel Pokémon (December 13 to December 19, 2002)
|
||||
new(074, 05, GS) {OT_Names = PCNYx, Moves = new(229), EggCycles = 10, Language = International}, // Geodude Rapid Spin
|
||||
new(041, 05, GS) {OT_Names = PCNYx, Moves = new(175), EggCycles = 10, Language = International}, // Zubat Flail
|
||||
new(066, 05, GS) {OT_Names = PCNYx, Moves = new(037), EggCycles = 10, Language = International}, // Machop Thrash
|
||||
new(104, 05, GS) {OT_Names = PCNYx, Moves = new(031), EggCycles = 10, Language = International}, // Cubone Fury Attack
|
||||
new(074, 05, GS) {TrainerNames = PCNYx, Moves = new(229), EggCycles = 10, Language = International}, // Geodude Rapid Spin
|
||||
new(041, 05, GS) {TrainerNames = PCNYx, Moves = new(175), EggCycles = 10, Language = International}, // Zubat Flail
|
||||
new(066, 05, GS) {TrainerNames = PCNYx, Moves = new(037), EggCycles = 10, Language = International}, // Machop Thrash
|
||||
new(104, 05, GS) {TrainerNames = PCNYx, Moves = new(031), EggCycles = 10, Language = International}, // Cubone Fury Attack
|
||||
|
||||
// Ice Type Pokémon (December 20 to 26, 2002)
|
||||
new(225, 05, GS) {OT_Names = PCNYx, Moves = new(191), EggCycles = 10, Language = International}, // Delibird Spikes
|
||||
new(086, 05, GS) {OT_Names = PCNYx, Moves = new(175), EggCycles = 10, Language = International}, // Seel Flail
|
||||
new(220, 05, GS) {OT_Names = PCNYx, Moves = new(018), EggCycles = 10, Language = International}, // Swinub Whirlwind
|
||||
new(225, 05, GS) {TrainerNames = PCNYx, Moves = new(191), EggCycles = 10, Language = International}, // Delibird Spikes
|
||||
new(086, 05, GS) {TrainerNames = PCNYx, Moves = new(175), EggCycles = 10, Language = International}, // Seel Flail
|
||||
new(220, 05, GS) {TrainerNames = PCNYx, Moves = new(018), EggCycles = 10, Language = International}, // Swinub Whirlwind
|
||||
|
||||
// Pokémon that Appear at Night only (December 27, 2002, to January 2, 2003)
|
||||
new(163, 05, GS) {OT_Names = PCNYx, Moves = new(101), EggCycles = 10, Language = International}, // Hoothoot Night Shade
|
||||
new(215, 05, GS) {OT_Names = PCNYx, Moves = new(236), EggCycles = 10, Language = International}, // Sneasel Moonlight
|
||||
new(163, 05, GS) {TrainerNames = PCNYx, Moves = new(101), EggCycles = 10, Language = International}, // Hoothoot Night Shade
|
||||
new(215, 05, GS) {TrainerNames = PCNYx, Moves = new(236), EggCycles = 10, Language = International}, // Sneasel Moonlight
|
||||
|
||||
// Grass Type ( January 3 to 9, 2003)
|
||||
new(191, 05, GS) {OT_Names = PCNYx, Moves = new(150), EggCycles = 10, Language = International}, // Sunkern Splash
|
||||
new(046, 05, GS) {OT_Names = PCNYx, Moves = new(235), EggCycles = 10, Language = International}, // Paras Synthesis
|
||||
new(187, 05, GS) {OT_Names = PCNYx, Moves = new(097), EggCycles = 10, Language = International}, // Hoppip Agility
|
||||
new(043, 05, GS) {OT_Names = PCNYx, Moves = new(073), EggCycles = 10, Language = International}, // Oddish Leech Seed
|
||||
new(191, 05, GS) {TrainerNames = PCNYx, Moves = new(150), EggCycles = 10, Language = International}, // Sunkern Splash
|
||||
new(046, 05, GS) {TrainerNames = PCNYx, Moves = new(235), EggCycles = 10, Language = International}, // Paras Synthesis
|
||||
new(187, 05, GS) {TrainerNames = PCNYx, Moves = new(097), EggCycles = 10, Language = International}, // Hoppip Agility
|
||||
new(043, 05, GS) {TrainerNames = PCNYx, Moves = new(073), EggCycles = 10, Language = International}, // Oddish Leech Seed
|
||||
|
||||
// Normal Pokémon (January 10 to 16, 2003)
|
||||
new(161, 05, GS) {OT_Names = PCNYx, Moves = new(146), EggCycles = 10, Language = International}, // Sentret Dizzy Punch
|
||||
new(234, 05, GS) {OT_Names = PCNYx, Moves = new(219), EggCycles = 10, Language = International}, // Stantler Safeguard
|
||||
new(241, 05, GS) {OT_Names = PCNYx, Moves = new(025), EggCycles = 10, Language = International}, // Miltank Mega Kick
|
||||
new(190, 05, GS) {OT_Names = PCNYx, Moves = new(102), EggCycles = 10, Language = International}, // Aipom Mimic
|
||||
new(108, 05, GS) {OT_Names = PCNYx, Moves = new(003), EggCycles = 10, Language = International}, // Lickitung DoubleSlap
|
||||
new(143, 05, GS) {OT_Names = PCNYx, Moves = new(150), EggCycles = 10, Language = International}, // Snorlax Splash
|
||||
new(161, 05, GS) {TrainerNames = PCNYx, Moves = new(146), EggCycles = 10, Language = International}, // Sentret Dizzy Punch
|
||||
new(234, 05, GS) {TrainerNames = PCNYx, Moves = new(219), EggCycles = 10, Language = International}, // Stantler Safeguard
|
||||
new(241, 05, GS) {TrainerNames = PCNYx, Moves = new(025), EggCycles = 10, Language = International}, // Miltank Mega Kick
|
||||
new(190, 05, GS) {TrainerNames = PCNYx, Moves = new(102), EggCycles = 10, Language = International}, // Aipom Mimic
|
||||
new(108, 05, GS) {TrainerNames = PCNYx, Moves = new(003), EggCycles = 10, Language = International}, // Lickitung DoubleSlap
|
||||
new(143, 05, GS) {TrainerNames = PCNYx, Moves = new(150), EggCycles = 10, Language = International}, // Snorlax Splash
|
||||
|
||||
// Mt. Mortar (January 24 to 30, 2003)
|
||||
new(066, 05, GS) {OT_Names = PCNYx, Moves = new(206), EggCycles = 10, Language = International}, // Machop False Swipe
|
||||
new(129, 05, GS) {OT_Names = PCNYx, Moves = new(145), EggCycles = 10, Language = International}, // Magikarp Bubble
|
||||
new(236, 05, GS) {OT_Names = PCNYx, Moves = new(099), EggCycles = 10, Language = International}, // Tyrogue Rage
|
||||
new(066, 05, GS) {TrainerNames = PCNYx, Moves = new(206), EggCycles = 10, Language = International}, // Machop False Swipe
|
||||
new(129, 05, GS) {TrainerNames = PCNYx, Moves = new(145), EggCycles = 10, Language = International}, // Magikarp Bubble
|
||||
new(236, 05, GS) {TrainerNames = PCNYx, Moves = new(099), EggCycles = 10, Language = International}, // Tyrogue Rage
|
||||
|
||||
// Dark Cave Pokémon (January 31 to February 6, 2003)
|
||||
new(206, 05, GS) {OT_Names = PCNYx, Moves = new(031), EggCycles = 10, Language = International}, // Dunsparce Fury Attack
|
||||
new(202, 05, GS) {OT_Names = PCNYx, Moves = new(102), EggCycles = 10, Language = International}, // Wobbuffet Mimic
|
||||
new(231, 05, GS) {OT_Names = PCNYx, Moves = new(071), EggCycles = 10, Language = International}, // Phanpy Absorb
|
||||
new(216, 05, GS) {OT_Names = PCNYx, Moves = new(230), EggCycles = 10, Language = International}, // Teddiursa Sweet Scent
|
||||
new(206, 05, GS) {TrainerNames = PCNYx, Moves = new(031), EggCycles = 10, Language = International}, // Dunsparce Fury Attack
|
||||
new(202, 05, GS) {TrainerNames = PCNYx, Moves = new(102), EggCycles = 10, Language = International}, // Wobbuffet Mimic
|
||||
new(231, 05, GS) {TrainerNames = PCNYx, Moves = new(071), EggCycles = 10, Language = International}, // Phanpy Absorb
|
||||
new(216, 05, GS) {TrainerNames = PCNYx, Moves = new(230), EggCycles = 10, Language = International}, // Teddiursa Sweet Scent
|
||||
|
||||
// Valentine's Day Special (February 7 to 13, 2003)
|
||||
new(060, 05, GS) {OT_Names = PCNYx, Moves = new(186), EggCycles = 10, Language = International}, // Poliwag Sweet Kiss
|
||||
new(060, 05, GS) {OT_Names = PCNYx, Moves = new(142), EggCycles = 10, Language = International}, // Poliwag Lovely Kiss
|
||||
new(143, 05, GS) {OT_Names = PCNYx, Moves = new(186), EggCycles = 10, Language = International}, // Snorlax Sweet Kiss
|
||||
new(143, 05, GS) {OT_Names = PCNYx, Moves = new(142), EggCycles = 10, Language = International}, // Snorlax Lovely Kiss
|
||||
new(060, 05, GS) {TrainerNames = PCNYx, Moves = new(186), EggCycles = 10, Language = International}, // Poliwag Sweet Kiss
|
||||
new(060, 05, GS) {TrainerNames = PCNYx, Moves = new(142), EggCycles = 10, Language = International}, // Poliwag Lovely Kiss
|
||||
new(143, 05, GS) {TrainerNames = PCNYx, Moves = new(186), EggCycles = 10, Language = International}, // Snorlax Sweet Kiss
|
||||
new(143, 05, GS) {TrainerNames = PCNYx, Moves = new(142), EggCycles = 10, Language = International}, // Snorlax Lovely Kiss
|
||||
|
||||
// Rare Pokémon (February 21 to 27, 2003)
|
||||
new(140, 05, GS) {OT_Names = PCNYx, Moves = new(088), EggCycles = 10, Language = International}, // Kabuto Rock Throw
|
||||
new(138, 05, GS) {OT_Names = PCNYx, Moves = new(088), EggCycles = 10, Language = International}, // Omanyte Rock Throw
|
||||
new(142, 05, GS) {OT_Names = PCNYx, Moves = new(088), EggCycles = 10, Language = International}, // Aerodactyl Rock Throw
|
||||
new(137, 05, GS) {OT_Names = PCNYx, Moves = new(112), EggCycles = 10, Language = International}, // Porygon Barrier
|
||||
new(133, 05, GS) {OT_Names = PCNYx, Moves = new(074), EggCycles = 10, Language = International}, // Eevee Growth
|
||||
new(185, 05, GS) {OT_Names = PCNYx, Moves = new(164), EggCycles = 10, Language = International}, // Sudowoodo Substitute
|
||||
new(140, 05, GS) {TrainerNames = PCNYx, Moves = new(088), EggCycles = 10, Language = International}, // Kabuto Rock Throw
|
||||
new(138, 05, GS) {TrainerNames = PCNYx, Moves = new(088), EggCycles = 10, Language = International}, // Omanyte Rock Throw
|
||||
new(142, 05, GS) {TrainerNames = PCNYx, Moves = new(088), EggCycles = 10, Language = International}, // Aerodactyl Rock Throw
|
||||
new(137, 05, GS) {TrainerNames = PCNYx, Moves = new(112), EggCycles = 10, Language = International}, // Porygon Barrier
|
||||
new(133, 05, GS) {TrainerNames = PCNYx, Moves = new(074), EggCycles = 10, Language = International}, // Eevee Growth
|
||||
new(185, 05, GS) {TrainerNames = PCNYx, Moves = new(164), EggCycles = 10, Language = International}, // Sudowoodo Substitute
|
||||
|
||||
// Bug Type Pokémon (February 28 to March 6, 2003)
|
||||
new(123, 05, GS) {OT_Names = PCNYx, Moves = new(049), EggCycles = 10, Language = International}, // Scyther SonicBoom
|
||||
new(214, 05, GS) {OT_Names = PCNYx, Moves = new(069), EggCycles = 10, Language = International}, // Heracross Seismic Toss
|
||||
new(127, 05, GS) {OT_Names = PCNYx, Moves = new(088), EggCycles = 10, Language = International}, // Pinsir Rock Throw
|
||||
new(165, 05, GS) {OT_Names = PCNYx, Moves = new(112), EggCycles = 10, Language = International}, // Ledyba Barrier
|
||||
new(167, 05, GS) {OT_Names = PCNYx, Moves = new(074), EggCycles = 10, Language = International}, // Spinarak Growth
|
||||
new(193, 05, GS) {OT_Names = PCNYx, Moves = new(186), EggCycles = 10, Language = International}, // Yanma Sweet Kiss
|
||||
new(204, 05, GS) {OT_Names = PCNYx, Moves = new(164), EggCycles = 10, Language = International}, // Pineco Substitute
|
||||
new(123, 05, GS) {TrainerNames = PCNYx, Moves = new(049), EggCycles = 10, Language = International}, // Scyther SonicBoom
|
||||
new(214, 05, GS) {TrainerNames = PCNYx, Moves = new(069), EggCycles = 10, Language = International}, // Heracross Seismic Toss
|
||||
new(127, 05, GS) {TrainerNames = PCNYx, Moves = new(088), EggCycles = 10, Language = International}, // Pinsir Rock Throw
|
||||
new(165, 05, GS) {TrainerNames = PCNYx, Moves = new(112), EggCycles = 10, Language = International}, // Ledyba Barrier
|
||||
new(167, 05, GS) {TrainerNames = PCNYx, Moves = new(074), EggCycles = 10, Language = International}, // Spinarak Growth
|
||||
new(193, 05, GS) {TrainerNames = PCNYx, Moves = new(186), EggCycles = 10, Language = International}, // Yanma Sweet Kiss
|
||||
new(204, 05, GS) {TrainerNames = PCNYx, Moves = new(164), EggCycles = 10, Language = International}, // Pineco Substitute
|
||||
|
||||
// Japanese Only (all below)
|
||||
new(251, 30, GSC) {Location = 014}, // Celebi @ Ilex Forest (GBC)
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ internal static class Encounters3Colo
|
|||
internal static readonly EncounterGift3Colo[] Gifts =
|
||||
[
|
||||
// In-Game without Bonus Disk
|
||||
new(311, 13, TrainerNameDuking, GameVersion.CXD) { Location = 254, TID16 = 37149, OT_Gender = 0, Moves = new(045, 086, 098, 270) }, // Plusle @ Ingame Trade
|
||||
new(311, 13, TrainerNameDuking, GameVersion.CXD) { Location = 254, TID16 = 37149, OriginalTrainerGender = 0, Moves = new(045, 086, 098, 270) }, // Plusle @ Ingame Trade
|
||||
];
|
||||
|
||||
internal static readonly EncounterShadow3Colo[] Shadow =
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ internal static class Encounters3FRLG
|
|||
internal static readonly EncounterArea3[] SlotsFR = GetRegular("fr", "fr"u8, FR);
|
||||
internal static readonly EncounterArea3[] SlotsLG = GetRegular("lg", "lg"u8, LG);
|
||||
|
||||
private static EncounterArea3[] GetRegular([ConstantExpected] string resource, [Length(2, 2)] ReadOnlySpan<byte> ident, GameVersion game) => EncounterArea3.GetAreas(Get(resource, ident), game);
|
||||
private static EncounterArea3[] GetRegular([ConstantExpected] string resource, [Length(2, 2)] ReadOnlySpan<byte> ident, [ConstantExpected] GameVersion game) => EncounterArea3.GetAreas(Get(resource, ident), game);
|
||||
|
||||
private const string tradeFRLG = "tradefrlg";
|
||||
private static readonly string[][] TradeNames = Util.GetLanguageStrings7(tradeFRLG);
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ internal static class Encounters3RSE
|
|||
internal static readonly EncounterArea3[] SlotsS = GetRegular("s", "sa"u8, S);
|
||||
internal static readonly EncounterArea3[] SlotsE = GetRegular("e", "em"u8, E);
|
||||
|
||||
private static EncounterArea3[] GetRegular([ConstantExpected] string resource, [Length(2, 2)] ReadOnlySpan<byte> ident, GameVersion game)
|
||||
private static EncounterArea3[] GetRegular([ConstantExpected] string resource, [Length(2, 2)] ReadOnlySpan<byte> ident, [ConstantExpected] GameVersion game)
|
||||
=> EncounterArea3.GetAreas(Get(resource, ident), game);
|
||||
private static EncounterArea3[] GetSwarm([ConstantExpected] string resource, [Length(2, 2)] ReadOnlySpan<byte> ident, GameVersion game)
|
||||
private static EncounterArea3[] GetSwarm([ConstantExpected] string resource, [Length(2, 2)] ReadOnlySpan<byte> ident, [ConstantExpected] GameVersion game)
|
||||
=> EncounterArea3.GetAreasSwarm(Get(resource, ident), game);
|
||||
|
||||
private static readonly string[] TrainersPikachu = [string.Empty, "コロシアム", "COLOS", "COLOSSEUM", "ARENA", "COLOSSEUM", string.Empty, "CLAUDIO"];
|
||||
|
|
@ -29,14 +29,14 @@ private static EncounterArea3[] GetSwarm([ConstantExpected] string resource, [Le
|
|||
internal static readonly EncounterGift3Colo[] ColoGiftsR =
|
||||
[
|
||||
// In-Game Bonus Disk (Japan only)
|
||||
new(025, 10, TrainersPikachu, R) { Location = 255, TID16 = 31121, OT_Gender = 0 }, // Colosseum Pikachu bonus gift
|
||||
new(251, 10, TrainersCelebi, R) { Location = 255, TID16 = 31121, OT_Gender = 1 }, // Ageto Celebi bonus gift
|
||||
new(025, 10, TrainersPikachu, R) { Location = 255, TID16 = 31121, OriginalTrainerGender = 0 }, // Colosseum Pikachu bonus gift
|
||||
new(251, 10, TrainersCelebi, R) { Location = 255, TID16 = 31121, OriginalTrainerGender = 1 }, // Ageto Celebi bonus gift
|
||||
];
|
||||
|
||||
internal static readonly EncounterGift3Colo[] ColoGiftsS =
|
||||
[
|
||||
// In-Game without Bonus Disk
|
||||
new(250, 70, TrainersMattle, S) { Location = 255, TID16 = 10048, OT_Gender = 0, Moves = new(105, 126, 241, 129) }, // Ho-oh @ Mt. Battle
|
||||
new(250, 70, TrainersMattle, S) { Location = 255, TID16 = 10048, OriginalTrainerGender = 0, Moves = new(105, 126, 241, 129) }, // Ho-oh @ Mt. Battle
|
||||
];
|
||||
|
||||
private const string tradeRSE = "traderse";
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
using static PKHeX.Core.GameVersion;
|
||||
using static PKHeX.Core.PIDType;
|
||||
using static PKHeX.Core.Shiny;
|
||||
using static PKHeX.Core.LanguageID;
|
||||
|
||||
namespace PKHeX.Core;
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -11,7 +16,7 @@ internal static class EncountersWC3
|
|||
{
|
||||
internal static readonly WC3[] Encounter_Event3_Special =
|
||||
[
|
||||
new() { Species = 385, Level = 05, ID32 = 20043, OT_Gender = 0, Version = GameVersion.R, Method = PIDType.BACD_R, OT_Name = "WISHMKR", CardTitle = "Wishmaker Jirachi", Language = (int)LanguageID.English },
|
||||
new(R) { Species = 385, Level = 05, ID32 = 20043, OriginalTrainerGender = 0, Method = BACD_R, OriginalTrainerName = "WISHMKR", CardTitle = "Wishmaker Jirachi", Language = (int)English },
|
||||
];
|
||||
|
||||
internal static readonly WC3[] Encounter_Event3 = Encounter_Event3_Special;
|
||||
|
|
@ -19,215 +24,215 @@ internal static class EncountersWC3
|
|||
internal static readonly WC3[] Encounter_Event3_FRLG =
|
||||
[
|
||||
// PCJP - Egg Pokémon Present Eggs (March 21 to April 4, 2004)
|
||||
new(true) { Species = 043, IsEgg = true, Level = 05, Version = GameVersion.FRLG, Moves = new(071,073,000,000), Method = PIDType.Method_2 }, // Oddish with Leech Seed
|
||||
new(true) { Species = 052, IsEgg = true, Level = 05, Version = GameVersion.FRLG, Moves = new(010,045,080,000), Method = PIDType.Method_2 }, // Meowth with Petal Dance
|
||||
new(true) { Species = 060, IsEgg = true, Level = 05, Version = GameVersion.FRLG, Moves = new(145,186,000,000), Method = PIDType.Method_2 }, // Poliwag with Sweet Kiss
|
||||
new(true) { Species = 069, IsEgg = true, Level = 05, Version = GameVersion.FRLG, Moves = new(022,298,000,000), Method = PIDType.Method_2 }, // Bellsprout with Teeter Dance
|
||||
new(FRLG, true) { Species = 043, IsEgg = true, Level = 05, Moves = new(071,073,000,000), Method = Method_2 }, // Oddish with Leech Seed
|
||||
new(FRLG, true) { Species = 052, IsEgg = true, Level = 05, Moves = new(010,045,080,000), Method = Method_2 }, // Meowth with Petal Dance
|
||||
new(FRLG, true) { Species = 060, IsEgg = true, Level = 05, Moves = new(145,186,000,000), Method = Method_2 }, // Poliwag with Sweet Kiss
|
||||
new(FRLG, true) { Species = 069, IsEgg = true, Level = 05, Moves = new(022,298,000,000), Method = Method_2 }, // Bellsprout with Teeter Dance
|
||||
|
||||
// PCNY - Wish Eggs (December 16, 2004, to January 2, 2005)
|
||||
new(true) { Species = 083, IsEgg = true, Level = 05, Version = GameVersion.FRLG, Moves = new(281,273,000,000), Method = PIDType.Method_2 }, // Farfetch'd with Wish & Yawn
|
||||
new(true) { Species = 096, IsEgg = true, Level = 05, Version = GameVersion.FRLG, Moves = new(187,273,000,000), Method = PIDType.Method_2 }, // Drowzee with Wish & Belly Drum
|
||||
new(true) { Species = 102, IsEgg = true, Level = 05, Version = GameVersion.FRLG, Moves = new(230,273,000,000), Method = PIDType.Method_2 }, // Exeggcute with Wish & Sweet Scent
|
||||
new(true) { Species = 108, IsEgg = true, Level = 05, Version = GameVersion.FRLG, Moves = new(215,273,000,000), Method = PIDType.Method_2 }, // Lickitung with Wish & Heal Bell
|
||||
new(true) { Species = 113, IsEgg = true, Level = 05, Version = GameVersion.FRLG, Moves = new(230,273,000,000), Method = PIDType.Method_2 }, // Chansey with Wish & Sweet Scent
|
||||
new(true) { Species = 115, IsEgg = true, Level = 05, Version = GameVersion.FRLG, Moves = new(281,273,000,000), Method = PIDType.Method_2 }, // Kangaskhan with Wish & Yawn
|
||||
new(FRLG, true) { Species = 083, IsEgg = true, Level = 05, Moves = new(281,273,000,000), Method = Method_2 }, // Farfetch'd with Wish & Yawn
|
||||
new(FRLG, true) { Species = 096, IsEgg = true, Level = 05, Moves = new(187,273,000,000), Method = Method_2 }, // Drowzee with Wish & Belly Drum
|
||||
new(FRLG, true) { Species = 102, IsEgg = true, Level = 05, Moves = new(230,273,000,000), Method = Method_2 }, // Exeggcute with Wish & Sweet Scent
|
||||
new(FRLG, true) { Species = 108, IsEgg = true, Level = 05, Moves = new(215,273,000,000), Method = Method_2 }, // Lickitung with Wish & Heal Bell
|
||||
new(FRLG, true) { Species = 113, IsEgg = true, Level = 05, Moves = new(230,273,000,000), Method = Method_2 }, // Chansey with Wish & Sweet Scent
|
||||
new(FRLG, true) { Species = 115, IsEgg = true, Level = 05, Moves = new(281,273,000,000), Method = Method_2 }, // Kangaskhan with Wish & Yawn
|
||||
|
||||
// PokePark Eggs - Wondercard
|
||||
new(true) { Species = 054, IsEgg = true, Level = 05, Version = GameVersion.FRLG, Moves = new(346,010,039,300), Method = PIDType.Method_2 }, // Psyduck with Mud Sport
|
||||
new(true) { Species = 172, IsEgg = true, Level = 05, Version = GameVersion.FRLG, Moves = new(084,204,266,000), Method = PIDType.Method_2 }, // Pichu with Follow me
|
||||
new(true) { Species = 174, IsEgg = true, Level = 05, Version = GameVersion.FRLG, Moves = new(047,204,111,321), Method = PIDType.Method_2 }, // Igglybuff with Tickle
|
||||
new(true) { Species = 222, IsEgg = true, Level = 05, Version = GameVersion.FRLG, Moves = new(033,300,000,000), Method = PIDType.Method_2 }, // Corsola with Mud Sport
|
||||
new(true) { Species = 276, IsEgg = true, Level = 05, Version = GameVersion.FRLG, Moves = new(064,045,116,297), Method = PIDType.Method_2 }, // Taillow with Feather Dance
|
||||
new(true) { Species = 283, IsEgg = true, Level = 05, Version = GameVersion.FRLG, Moves = new(145,300,000,000), Method = PIDType.Method_2 }, // Surskit with Mud Sport
|
||||
new(true) { Species = 293, IsEgg = true, Level = 05, Version = GameVersion.FRLG, Moves = new(001,253,298,000), Method = PIDType.Method_2 }, // Whismur with Teeter Dance
|
||||
new(true) { Species = 300, IsEgg = true, Level = 05, Version = GameVersion.FRLG, Moves = new(045,033,039,205), Method = PIDType.Method_2 }, // Skitty with Rollout
|
||||
new(true) { Species = 311, IsEgg = true, Level = 05, Version = GameVersion.FRLG, Moves = new(045,086,346,000), Method = PIDType.Method_2 }, // Plusle with Water Sport
|
||||
new(true) { Species = 312, IsEgg = true, Level = 05, Version = GameVersion.FRLG, Moves = new(045,086,300,000), Method = PIDType.Method_2 }, // Minun with Mud Sport
|
||||
new(true) { Species = 325, IsEgg = true, Level = 05, Version = GameVersion.FRLG, Moves = new(150,253,000,000), Method = PIDType.Method_2 }, // Spoink with Uproar
|
||||
new(true) { Species = 327, IsEgg = true, Level = 05, Version = GameVersion.FRLG, Moves = new(033,253,047,000), Method = PIDType.Method_2 }, // Spinda with Sing
|
||||
new(true) { Species = 331, IsEgg = true, Level = 05, Version = GameVersion.FRLG, Moves = new(040,043,071,227), Method = PIDType.Method_2 }, // Cacnea with Encore
|
||||
new(true) { Species = 341, IsEgg = true, Level = 05, Version = GameVersion.FRLG, Moves = new(145,346,000,000), Method = PIDType.Method_2 }, // Corphish with Water Sport
|
||||
new(true) { Species = 360, IsEgg = true, Level = 05, Version = GameVersion.FRLG, Moves = new(150,204,227,321), Method = PIDType.Method_2 }, // Wynaut with Tickle
|
||||
new(FRLG, true) { Species = 054, IsEgg = true, Level = 05, Moves = new(346,010,039,300), Method = Method_2 }, // Psyduck with Mud Sport
|
||||
new(FRLG, true) { Species = 172, IsEgg = true, Level = 05, Moves = new(084,204,266,000), Method = Method_2 }, // Pichu with Follow me
|
||||
new(FRLG, true) { Species = 174, IsEgg = true, Level = 05, Moves = new(047,204,111,321), Method = Method_2 }, // Igglybuff with Tickle
|
||||
new(FRLG, true) { Species = 222, IsEgg = true, Level = 05, Moves = new(033,300,000,000), Method = Method_2 }, // Corsola with Mud Sport
|
||||
new(FRLG, true) { Species = 276, IsEgg = true, Level = 05, Moves = new(064,045,116,297), Method = Method_2 }, // Taillow with Feather Dance
|
||||
new(FRLG, true) { Species = 283, IsEgg = true, Level = 05, Moves = new(145,300,000,000), Method = Method_2 }, // Surskit with Mud Sport
|
||||
new(FRLG, true) { Species = 293, IsEgg = true, Level = 05, Moves = new(001,253,298,000), Method = Method_2 }, // Whismur with Teeter Dance
|
||||
new(FRLG, true) { Species = 300, IsEgg = true, Level = 05, Moves = new(045,033,039,205), Method = Method_2 }, // Skitty with Rollout
|
||||
new(FRLG, true) { Species = 311, IsEgg = true, Level = 05, Moves = new(045,086,346,000), Method = Method_2 }, // Plusle with Water Sport
|
||||
new(FRLG, true) { Species = 312, IsEgg = true, Level = 05, Moves = new(045,086,300,000), Method = Method_2 }, // Minun with Mud Sport
|
||||
new(FRLG, true) { Species = 325, IsEgg = true, Level = 05, Moves = new(150,253,000,000), Method = Method_2 }, // Spoink with Uproar
|
||||
new(FRLG, true) { Species = 327, IsEgg = true, Level = 05, Moves = new(033,253,047,000), Method = Method_2 }, // Spinda with Sing
|
||||
new(FRLG, true) { Species = 331, IsEgg = true, Level = 05, Moves = new(040,043,071,227), Method = Method_2 }, // Cacnea with Encore
|
||||
new(FRLG, true) { Species = 341, IsEgg = true, Level = 05, Moves = new(145,346,000,000), Method = Method_2 }, // Corphish with Water Sport
|
||||
new(FRLG, true) { Species = 360, IsEgg = true, Level = 05, Moves = new(150,204,227,321), Method = Method_2 }, // Wynaut with Tickle
|
||||
];
|
||||
|
||||
internal static readonly WC3[] Encounter_Event3_RS =
|
||||
[
|
||||
// PCJP - Pokémon Center 5th Anniversary Eggs (April 25 to May 18, 2003)
|
||||
new() { Species = 172, IsEgg = true, Level = 05, OT_Name = "オヤNAME", Version = GameVersion.R, Moves = new(084,204,298,000), Method = PIDType.BACD_R }, // Pichu with Teeter Dance
|
||||
new() { Species = 172, IsEgg = true, Level = 05, OT_Name = "オヤNAME", Version = GameVersion.R, Moves = new(084,204,273,000), Method = PIDType.BACD_R }, // Pichu with Wish
|
||||
new() { Species = 172, IsEgg = true, Level = 05, OT_Name = "オヤNAME", Version = GameVersion.R, Moves = new(084,204,298,000), Method = PIDType.BACD_R_S }, // Pichu with Teeter Dance
|
||||
new() { Species = 172, IsEgg = true, Level = 05, OT_Name = "オヤNAME", Version = GameVersion.R, Moves = new(084,204,273,000), Method = PIDType.BACD_R_S }, // Pichu with Wish
|
||||
new() { Species = 280, IsEgg = true, Level = 05, OT_Name = "オヤNAME", Version = GameVersion.R, Moves = new(045,204,000,000), Method = PIDType.BACD_R }, // Ralts with Charm
|
||||
new() { Species = 280, IsEgg = true, Level = 05, OT_Name = "オヤNAME", Version = GameVersion.R, Moves = new(045,273,000,000), Method = PIDType.BACD_R }, // Ralts with Wish
|
||||
new() { Species = 359, IsEgg = true, Level = 05, OT_Name = "オヤNAME", Version = GameVersion.R, Moves = new(010,043,180,000), Method = PIDType.BACD_R }, // Absol with Spite
|
||||
new() { Species = 359, IsEgg = true, Level = 05, OT_Name = "オヤNAME", Version = GameVersion.R, Moves = new(010,043,273,000), Method = PIDType.BACD_R }, // Absol with Wish
|
||||
new() { Species = 371, IsEgg = true, Level = 05, OT_Name = "オヤNAME", Version = GameVersion.R, Moves = new(099,044,334,000), Method = PIDType.BACD_R }, // Bagon with Iron Defense
|
||||
new() { Species = 371, IsEgg = true, Level = 05, OT_Name = "オヤNAME", Version = GameVersion.R, Moves = new(099,044,273,000), Method = PIDType.BACD_R }, // Bagon with Wish
|
||||
new(R) { Species = 172, IsEgg = true, Level = 05, OriginalTrainerName = "オヤNAME", Moves = new(084,204,298,000), Method = BACD_R }, // Pichu with Teeter Dance
|
||||
new(R) { Species = 172, IsEgg = true, Level = 05, OriginalTrainerName = "オヤNAME", Moves = new(084,204,273,000), Method = BACD_R }, // Pichu with Wish
|
||||
new(R) { Species = 172, IsEgg = true, Level = 05, OriginalTrainerName = "オヤNAME", Moves = new(084,204,298,000), Method = BACD_R_S }, // Pichu with Teeter Dance
|
||||
new(R) { Species = 172, IsEgg = true, Level = 05, OriginalTrainerName = "オヤNAME", Moves = new(084,204,273,000), Method = BACD_R_S }, // Pichu with Wish
|
||||
new(R) { Species = 280, IsEgg = true, Level = 05, OriginalTrainerName = "オヤNAME", Moves = new(045,204,000,000), Method = BACD_R }, // Ralts with Charm
|
||||
new(R) { Species = 280, IsEgg = true, Level = 05, OriginalTrainerName = "オヤNAME", Moves = new(045,273,000,000), Method = BACD_R }, // Ralts with Wish
|
||||
new(R) { Species = 359, IsEgg = true, Level = 05, OriginalTrainerName = "オヤNAME", Moves = new(010,043,180,000), Method = BACD_R }, // Absol with Spite
|
||||
new(R) { Species = 359, IsEgg = true, Level = 05, OriginalTrainerName = "オヤNAME", Moves = new(010,043,273,000), Method = BACD_R }, // Absol with Wish
|
||||
new(R) { Species = 371, IsEgg = true, Level = 05, OriginalTrainerName = "オヤNAME", Moves = new(099,044,334,000), Method = BACD_R }, // Bagon with Iron Defense
|
||||
new(R) { Species = 371, IsEgg = true, Level = 05, OriginalTrainerName = "オヤNAME", Moves = new(099,044,273,000), Method = BACD_R }, // Bagon with Wish
|
||||
|
||||
// Negai Boshi Jirachi
|
||||
new() { Species = 385, Level = 05, ID32 = 30719, OT_Gender = 0, OT_Name = "ネガイボシ", Version = GameVersion.R, Method = PIDType.BACD_R, Language = (int)LanguageID.Japanese, Shiny = Shiny.Never },
|
||||
new() { Species = 385, Level = 05, ID32 = 30719, OT_Name = "ネガイボシ", Version = GameVersion.RS, Method = PIDType.BACD_U_AX, Language = (int)LanguageID.Japanese, Shiny = Shiny.Never },
|
||||
new(R) { Species = 385, Level = 05, ID32 = 30719, OriginalTrainerGender = 0, OriginalTrainerName = "ネガイボシ", Method = BACD_R, Language = (int)Japanese, Shiny = Never },
|
||||
new(RS) { Species = 385, Level = 05, ID32 = 30719, OriginalTrainerName = "ネガイボシ", Method = BACD_U_AX, Language = (int)Japanese, Shiny = Never },
|
||||
|
||||
// Berry Glitch Fix
|
||||
// PCJP - (December 29, 2003, to March 31, 2004)
|
||||
new() { Species = 263, Level = 5, Version = GameVersion.S, Language = (int)LanguageID.Japanese, Method = PIDType.BACD_R_S, ID32 = 21121, OT_Name = "ルビー", OT_Gender = 1, Shiny = Shiny.Always },
|
||||
new() { Species = 263, Level = 5, Version = GameVersion.S, Language = (int)LanguageID.Japanese, Method = PIDType.BACD_R_S, ID32 = 21121, OT_Name = "サファイア", OT_Gender = 0, Shiny = Shiny.Always },
|
||||
new(S) { Species = 263, Level = 5, Language = (int)Japanese, Method = BACD_R_S, ID32 = 21121, OriginalTrainerName = "ルビー", OriginalTrainerGender = 1, Shiny = Always },
|
||||
new(S) { Species = 263, Level = 5, Language = (int)Japanese, Method = BACD_R_S, ID32 = 21121, OriginalTrainerName = "サファイア", OriginalTrainerGender = 0, Shiny = Always },
|
||||
|
||||
// EBGames/GameStop (March 1, 2004, to April 22, 2007), also via multi-game discs
|
||||
new() { Species = 263, Level = 5, Version = GameVersion.S, Language = (int)LanguageID.English, Method = PIDType.BACD_R_S, ID32 = 30317, OT_Name = "RUBY", OT_Gender = 1 },
|
||||
new() { Species = 263, Level = 5, Version = GameVersion.S, Language = (int)LanguageID.English, Method = PIDType.BACD_R_S, ID32 = 30317, OT_Name = "SAPHIRE", OT_Gender = 0 },
|
||||
new(S) { Species = 263, Level = 5, Language = (int)English, Method = BACD_R_S, ID32 = 30317, OriginalTrainerName = "RUBY", OriginalTrainerGender = 1 },
|
||||
new(S) { Species = 263, Level = 5, Language = (int)English, Method = BACD_R_S, ID32 = 30317, OriginalTrainerName = "SAPHIRE", OriginalTrainerGender = 0 },
|
||||
|
||||
// Channel Jirachi
|
||||
new() { Species = 385, Level = 5, Version = GameVersion.RS, Method = PIDType.Channel, TID16 = 40122, OT_Gender = 3, OT_Name = "CHANNEL", CardTitle = "Channel Jirachi", Met_Level = 0 },
|
||||
new(RS) { Species = 385, Level = 5, Method = Channel, TID16 = 40122, OriginalTrainerGender = 3, OriginalTrainerName = "CHANNEL", CardTitle = "Channel Jirachi", MetLevel = 0 },
|
||||
|
||||
// Aura Mew
|
||||
new(true) { Species = 151, Level = 10, Version = GameVersion.R, Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 20078, OT_Name = "Aura", Shiny = Shiny.Never }, // Mew
|
||||
new(true) { Species = 151, Level = 10, Version = GameVersion.R, Language = (int)LanguageID.French, Method = PIDType.BACD_R, ID32 = 20078, OT_Name = "Aura", Shiny = Shiny.Never }, // Mew
|
||||
new(true) { Species = 151, Level = 10, Version = GameVersion.R, Language = (int)LanguageID.Italian, Method = PIDType.BACD_R, ID32 = 20078, OT_Name = "Aura", Shiny = Shiny.Never }, // Mew
|
||||
new(true) { Species = 151, Level = 10, Version = GameVersion.R, Language = (int)LanguageID.German, Method = PIDType.BACD_R, ID32 = 20078, OT_Name = "Aura", Shiny = Shiny.Never }, // Mew
|
||||
new(true) { Species = 151, Level = 10, Version = GameVersion.R, Language = (int)LanguageID.Spanish, Method = PIDType.BACD_R, ID32 = 20078, OT_Name = "Aura", Shiny = Shiny.Never }, // Mew
|
||||
new(R, true) { Species = 151, Level = 10, Language = (int)English, Method = BACD_R, ID32 = 20078, OriginalTrainerName = "Aura", Shiny = Never }, // Mew
|
||||
new(R, true) { Species = 151, Level = 10, Language = (int)French, Method = BACD_R, ID32 = 20078, OriginalTrainerName = "Aura", Shiny = Never }, // Mew
|
||||
new(R, true) { Species = 151, Level = 10, Language = (int)Italian, Method = BACD_R, ID32 = 20078, OriginalTrainerName = "Aura", Shiny = Never }, // Mew
|
||||
new(R, true) { Species = 151, Level = 10, Language = (int)German, Method = BACD_R, ID32 = 20078, OriginalTrainerName = "Aura", Shiny = Never }, // Mew
|
||||
new(R, true) { Species = 151, Level = 10, Language = (int)Spanish, Method = BACD_R, ID32 = 20078, OriginalTrainerName = "Aura", Shiny = Never }, // Mew
|
||||
|
||||
// English Events
|
||||
new() { Species = 006, Level = 70, Version = GameVersion.R, Moves = new(017,163,082,083), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNIV", Shiny = Shiny.Never }, // Charizard
|
||||
new() { Species = 025, Level = 70, Version = GameVersion.R, Moves = new(085,097,087,113), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNIV", Shiny = Shiny.Never }, // Pikachu
|
||||
new() { Species = 144, Level = 70, Version = GameVersion.R, Moves = new(097,170,058,115), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNIV", Shiny = Shiny.Never }, // Articuno
|
||||
new() { Species = 243, Level = 70, Version = GameVersion.R, Moves = new(098,209,115,242), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNIV", Shiny = Shiny.Never }, // Raikou
|
||||
new() { Species = 244, Level = 70, Version = GameVersion.R, Moves = new(083,023,053,207), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNIV", Shiny = Shiny.Never }, // Entei
|
||||
new() { Species = 245, Level = 70, Version = GameVersion.R, Moves = new(016,062,054,243), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNIV", Shiny = Shiny.Never }, // Suicune
|
||||
new() { Species = 249, Level = 70, Version = GameVersion.R, Moves = new(105,056,240,129), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNIV", Shiny = Shiny.Never }, // Lugia
|
||||
new() { Species = 250, Level = 70, Version = GameVersion.R, Moves = new(105,126,241,129), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNIV", Shiny = Shiny.Never }, // Ho-Oh
|
||||
new() { Species = 380, Level = 70, Version = GameVersion.R, Moves = new(296,094,105,204), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNIV", Shiny = Shiny.Never }, // Latias
|
||||
new() { Species = 381, Level = 70, Version = GameVersion.R, Moves = new(295,094,105,349), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNIV", Shiny = Shiny.Never }, // Latios
|
||||
new(R) { Species = 006, Level = 70, Moves = new(017,163,082,083), Language = (int)English, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNIV", Shiny = Never }, // Charizard
|
||||
new(R) { Species = 025, Level = 70, Moves = new(085,097,087,113), Language = (int)English, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNIV", Shiny = Never }, // Pikachu
|
||||
new(R) { Species = 144, Level = 70, Moves = new(097,170,058,115), Language = (int)English, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNIV", Shiny = Never }, // Articuno
|
||||
new(R) { Species = 243, Level = 70, Moves = new(098,209,115,242), Language = (int)English, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNIV", Shiny = Never }, // Raikou
|
||||
new(R) { Species = 244, Level = 70, Moves = new(083,023,053,207), Language = (int)English, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNIV", Shiny = Never }, // Entei
|
||||
new(R) { Species = 245, Level = 70, Moves = new(016,062,054,243), Language = (int)English, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNIV", Shiny = Never }, // Suicune
|
||||
new(R) { Species = 249, Level = 70, Moves = new(105,056,240,129), Language = (int)English, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNIV", Shiny = Never }, // Lugia
|
||||
new(R) { Species = 250, Level = 70, Moves = new(105,126,241,129), Language = (int)English, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNIV", Shiny = Never }, // Ho-Oh
|
||||
new(R) { Species = 380, Level = 70, Moves = new(296,094,105,204), Language = (int)English, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNIV", Shiny = Never }, // Latias
|
||||
new(R) { Species = 381, Level = 70, Moves = new(295,094,105,349), Language = (int)English, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNIV", Shiny = Never }, // Latios
|
||||
|
||||
// French
|
||||
new() { Species = 006, Level = 70, Version = GameVersion.R, Moves = new(017,163,082,083), Language = (int)LanguageID.French, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNIV", Shiny = Shiny.Never }, // Charizard
|
||||
new() { Species = 025, Level = 70, Version = GameVersion.R, Moves = new(085,097,087,113), Language = (int)LanguageID.French, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNIV", Shiny = Shiny.Never }, // Pikachu
|
||||
new() { Species = 144, Level = 70, Version = GameVersion.R, Moves = new(097,170,058,115), Language = (int)LanguageID.French, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNIV", Shiny = Shiny.Never }, // Articuno
|
||||
new() { Species = 243, Level = 70, Version = GameVersion.R, Moves = new(098,209,115,242), Language = (int)LanguageID.French, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNIV", Shiny = Shiny.Never }, // Raikou
|
||||
new() { Species = 244, Level = 70, Version = GameVersion.R, Moves = new(083,023,053,207), Language = (int)LanguageID.French, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNIV", Shiny = Shiny.Never }, // Entei
|
||||
new() { Species = 245, Level = 70, Version = GameVersion.R, Moves = new(016,062,054,243), Language = (int)LanguageID.French, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNIV", Shiny = Shiny.Never }, // Suicune
|
||||
new() { Species = 249, Level = 70, Version = GameVersion.R, Moves = new(105,056,240,129), Language = (int)LanguageID.French, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNIV", Shiny = Shiny.Never }, // Lugia
|
||||
new() { Species = 250, Level = 70, Version = GameVersion.R, Moves = new(105,126,241,129), Language = (int)LanguageID.French, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNIV", Shiny = Shiny.Never }, // Ho-Oh
|
||||
new() { Species = 380, Level = 70, Version = GameVersion.R, Moves = new(296,094,105,204), Language = (int)LanguageID.French, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNIV", Shiny = Shiny.Never }, // Latias
|
||||
new() { Species = 381, Level = 70, Version = GameVersion.R, Moves = new(295,094,105,349), Language = (int)LanguageID.French, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNIV", Shiny = Shiny.Never }, // Latios
|
||||
new(R) { Species = 006, Level = 70, Moves = new(017,163,082,083), Language = (int)French, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNIV", Shiny = Never }, // Charizard
|
||||
new(R) { Species = 025, Level = 70, Moves = new(085,097,087,113), Language = (int)French, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNIV", Shiny = Never }, // Pikachu
|
||||
new(R) { Species = 144, Level = 70, Moves = new(097,170,058,115), Language = (int)French, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNIV", Shiny = Never }, // Articuno
|
||||
new(R) { Species = 243, Level = 70, Moves = new(098,209,115,242), Language = (int)French, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNIV", Shiny = Never }, // Raikou
|
||||
new(R) { Species = 244, Level = 70, Moves = new(083,023,053,207), Language = (int)French, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNIV", Shiny = Never }, // Entei
|
||||
new(R) { Species = 245, Level = 70, Moves = new(016,062,054,243), Language = (int)French, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNIV", Shiny = Never }, // Suicune
|
||||
new(R) { Species = 249, Level = 70, Moves = new(105,056,240,129), Language = (int)French, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNIV", Shiny = Never }, // Lugia
|
||||
new(R) { Species = 250, Level = 70, Moves = new(105,126,241,129), Language = (int)French, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNIV", Shiny = Never }, // Ho-Oh
|
||||
new(R) { Species = 380, Level = 70, Moves = new(296,094,105,204), Language = (int)French, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNIV", Shiny = Never }, // Latias
|
||||
new(R) { Species = 381, Level = 70, Moves = new(295,094,105,349), Language = (int)French, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNIV", Shiny = Never }, // Latios
|
||||
|
||||
// Italian
|
||||
new() { Species = 006, Level = 70, Version = GameVersion.R, Moves = new(017,163,082,083), Language = (int)LanguageID.Italian, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNI", Shiny = Shiny.Never }, // Charizard
|
||||
new() { Species = 025, Level = 70, Version = GameVersion.R, Moves = new(085,097,087,113), Language = (int)LanguageID.Italian, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNI", Shiny = Shiny.Never }, // Pikachu
|
||||
new() { Species = 144, Level = 70, Version = GameVersion.R, Moves = new(097,170,058,115), Language = (int)LanguageID.Italian, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNI", Shiny = Shiny.Never }, // Articuno
|
||||
new() { Species = 243, Level = 70, Version = GameVersion.R, Moves = new(098,209,115,242), Language = (int)LanguageID.Italian, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNI", Shiny = Shiny.Never }, // Raikou
|
||||
new() { Species = 244, Level = 70, Version = GameVersion.R, Moves = new(083,023,053,207), Language = (int)LanguageID.Italian, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNI", Shiny = Shiny.Never }, // Entei
|
||||
new() { Species = 245, Level = 70, Version = GameVersion.R, Moves = new(016,062,054,243), Language = (int)LanguageID.Italian, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNI", Shiny = Shiny.Never }, // Suicune
|
||||
new() { Species = 249, Level = 70, Version = GameVersion.R, Moves = new(105,056,240,129), Language = (int)LanguageID.Italian, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNI", Shiny = Shiny.Never }, // Lugia
|
||||
new() { Species = 250, Level = 70, Version = GameVersion.R, Moves = new(105,126,241,129), Language = (int)LanguageID.Italian, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNI", Shiny = Shiny.Never }, // Ho-Oh
|
||||
new() { Species = 380, Level = 70, Version = GameVersion.R, Moves = new(296,094,105,204), Language = (int)LanguageID.Italian, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNI", Shiny = Shiny.Never }, // Latias
|
||||
new() { Species = 381, Level = 70, Version = GameVersion.R, Moves = new(295,094,105,349), Language = (int)LanguageID.Italian, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANNI", Shiny = Shiny.Never }, // Latios
|
||||
new(R) { Species = 006, Level = 70, Moves = new(017,163,082,083), Language = (int)Italian, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNI", Shiny = Never }, // Charizard
|
||||
new(R) { Species = 025, Level = 70, Moves = new(085,097,087,113), Language = (int)Italian, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNI", Shiny = Never }, // Pikachu
|
||||
new(R) { Species = 144, Level = 70, Moves = new(097,170,058,115), Language = (int)Italian, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNI", Shiny = Never }, // Articuno
|
||||
new(R) { Species = 243, Level = 70, Moves = new(098,209,115,242), Language = (int)Italian, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNI", Shiny = Never }, // Raikou
|
||||
new(R) { Species = 244, Level = 70, Moves = new(083,023,053,207), Language = (int)Italian, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNI", Shiny = Never }, // Entei
|
||||
new(R) { Species = 245, Level = 70, Moves = new(016,062,054,243), Language = (int)Italian, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNI", Shiny = Never }, // Suicune
|
||||
new(R) { Species = 249, Level = 70, Moves = new(105,056,240,129), Language = (int)Italian, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNI", Shiny = Never }, // Lugia
|
||||
new(R) { Species = 250, Level = 70, Moves = new(105,126,241,129), Language = (int)Italian, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNI", Shiny = Never }, // Ho-Oh
|
||||
new(R) { Species = 380, Level = 70, Moves = new(296,094,105,204), Language = (int)Italian, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNI", Shiny = Never }, // Latias
|
||||
new(R) { Species = 381, Level = 70, Moves = new(295,094,105,349), Language = (int)Italian, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANNI", Shiny = Never }, // Latios
|
||||
|
||||
// German
|
||||
new() { Species = 006, Level = 70, Version = GameVersion.R, Moves = new(017,163,082,083), Language = (int)LanguageID.German, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10JAHRE", Shiny = Shiny.Never }, // Charizard
|
||||
new() { Species = 025, Level = 70, Version = GameVersion.R, Moves = new(085,097,087,113), Language = (int)LanguageID.German, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10JAHRE", Shiny = Shiny.Never }, // Pikachu
|
||||
new() { Species = 144, Level = 70, Version = GameVersion.R, Moves = new(097,170,058,115), Language = (int)LanguageID.German, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10JAHRE", Shiny = Shiny.Never }, // Articuno
|
||||
new() { Species = 243, Level = 70, Version = GameVersion.R, Moves = new(098,209,115,242), Language = (int)LanguageID.German, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10JAHRE", Shiny = Shiny.Never }, // Raikou
|
||||
new() { Species = 244, Level = 70, Version = GameVersion.R, Moves = new(083,023,053,207), Language = (int)LanguageID.German, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10JAHRE", Shiny = Shiny.Never }, // Entei
|
||||
new() { Species = 245, Level = 70, Version = GameVersion.R, Moves = new(016,062,054,243), Language = (int)LanguageID.German, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10JAHRE", Shiny = Shiny.Never }, // Suicune
|
||||
new() { Species = 249, Level = 70, Version = GameVersion.R, Moves = new(105,056,240,129), Language = (int)LanguageID.German, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10JAHRE", Shiny = Shiny.Never }, // Lugia
|
||||
new() { Species = 250, Level = 70, Version = GameVersion.R, Moves = new(105,126,241,129), Language = (int)LanguageID.German, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10JAHRE", Shiny = Shiny.Never }, // Ho-Oh
|
||||
new() { Species = 380, Level = 70, Version = GameVersion.R, Moves = new(296,094,105,204), Language = (int)LanguageID.German, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10JAHRE", Shiny = Shiny.Never }, // Latias
|
||||
new() { Species = 381, Level = 70, Version = GameVersion.R, Moves = new(295,094,105,349), Language = (int)LanguageID.German, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10JAHRE", Shiny = Shiny.Never }, // Latios
|
||||
new(R) { Species = 006, Level = 70, Moves = new(017,163,082,083), Language = (int)German, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10JAHRE", Shiny = Never }, // Charizard
|
||||
new(R) { Species = 025, Level = 70, Moves = new(085,097,087,113), Language = (int)German, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10JAHRE", Shiny = Never }, // Pikachu
|
||||
new(R) { Species = 144, Level = 70, Moves = new(097,170,058,115), Language = (int)German, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10JAHRE", Shiny = Never }, // Articuno
|
||||
new(R) { Species = 243, Level = 70, Moves = new(098,209,115,242), Language = (int)German, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10JAHRE", Shiny = Never }, // Raikou
|
||||
new(R) { Species = 244, Level = 70, Moves = new(083,023,053,207), Language = (int)German, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10JAHRE", Shiny = Never }, // Entei
|
||||
new(R) { Species = 245, Level = 70, Moves = new(016,062,054,243), Language = (int)German, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10JAHRE", Shiny = Never }, // Suicune
|
||||
new(R) { Species = 249, Level = 70, Moves = new(105,056,240,129), Language = (int)German, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10JAHRE", Shiny = Never }, // Lugia
|
||||
new(R) { Species = 250, Level = 70, Moves = new(105,126,241,129), Language = (int)German, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10JAHRE", Shiny = Never }, // Ho-Oh
|
||||
new(R) { Species = 380, Level = 70, Moves = new(296,094,105,204), Language = (int)German, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10JAHRE", Shiny = Never }, // Latias
|
||||
new(R) { Species = 381, Level = 70, Moves = new(295,094,105,349), Language = (int)German, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10JAHRE", Shiny = Never }, // Latios
|
||||
|
||||
// Spanish
|
||||
new() { Species = 006, Level = 70, Version = GameVersion.R, Moves = new(017,163,082,083), Language = (int)LanguageID.Spanish, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANIV", Shiny = Shiny.Never }, // Charizard
|
||||
new() { Species = 025, Level = 70, Version = GameVersion.R, Moves = new(085,097,087,113), Language = (int)LanguageID.Spanish, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANIV", Shiny = Shiny.Never }, // Pikachu
|
||||
new() { Species = 144, Level = 70, Version = GameVersion.R, Moves = new(097,170,058,115), Language = (int)LanguageID.Spanish, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANIV", Shiny = Shiny.Never }, // Articuno
|
||||
new() { Species = 243, Level = 70, Version = GameVersion.R, Moves = new(098,209,115,242), Language = (int)LanguageID.Spanish, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANIV", Shiny = Shiny.Never }, // Raikou
|
||||
new() { Species = 244, Level = 70, Version = GameVersion.R, Moves = new(083,023,053,207), Language = (int)LanguageID.Spanish, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANIV", Shiny = Shiny.Never }, // Entei
|
||||
new() { Species = 245, Level = 70, Version = GameVersion.R, Moves = new(016,062,054,243), Language = (int)LanguageID.Spanish, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANIV", Shiny = Shiny.Never }, // Suicune
|
||||
new() { Species = 249, Level = 70, Version = GameVersion.R, Moves = new(105,056,240,129), Language = (int)LanguageID.Spanish, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANIV", Shiny = Shiny.Never }, // Lugia
|
||||
new() { Species = 250, Level = 70, Version = GameVersion.R, Moves = new(105,126,241,129), Language = (int)LanguageID.Spanish, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANIV", Shiny = Shiny.Never }, // Ho-Oh
|
||||
new() { Species = 380, Level = 70, Version = GameVersion.R, Moves = new(296,094,105,204), Language = (int)LanguageID.Spanish, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANIV", Shiny = Shiny.Never }, // Latias
|
||||
new() { Species = 381, Level = 70, Version = GameVersion.R, Moves = new(295,094,105,349), Language = (int)LanguageID.Spanish, Method = PIDType.BACD_R, ID32 = 06227, OT_Name = "10ANIV", Shiny = Shiny.Never }, // Latios
|
||||
new(R) { Species = 006, Level = 70, Moves = new(017,163,082,083), Language = (int)Spanish, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANIV", Shiny = Never }, // Charizard
|
||||
new(R) { Species = 025, Level = 70, Moves = new(085,097,087,113), Language = (int)Spanish, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANIV", Shiny = Never }, // Pikachu
|
||||
new(R) { Species = 144, Level = 70, Moves = new(097,170,058,115), Language = (int)Spanish, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANIV", Shiny = Never }, // Articuno
|
||||
new(R) { Species = 243, Level = 70, Moves = new(098,209,115,242), Language = (int)Spanish, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANIV", Shiny = Never }, // Raikou
|
||||
new(R) { Species = 244, Level = 70, Moves = new(083,023,053,207), Language = (int)Spanish, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANIV", Shiny = Never }, // Entei
|
||||
new(R) { Species = 245, Level = 70, Moves = new(016,062,054,243), Language = (int)Spanish, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANIV", Shiny = Never }, // Suicune
|
||||
new(R) { Species = 249, Level = 70, Moves = new(105,056,240,129), Language = (int)Spanish, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANIV", Shiny = Never }, // Lugia
|
||||
new(R) { Species = 250, Level = 70, Moves = new(105,126,241,129), Language = (int)Spanish, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANIV", Shiny = Never }, // Ho-Oh
|
||||
new(R) { Species = 380, Level = 70, Moves = new(296,094,105,204), Language = (int)Spanish, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANIV", Shiny = Never }, // Latias
|
||||
new(R) { Species = 381, Level = 70, Moves = new(295,094,105,349), Language = (int)Spanish, Method = BACD_R, ID32 = 06227, OriginalTrainerName = "10ANIV", Shiny = Never }, // Latios
|
||||
|
||||
new() { Species = 375, Level = 30, Version = GameVersion.R, Moves = new(036,093,232,287), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 02005, OT_Name = "ROCKS", OT_Gender = 0, RibbonNational = true, Shiny = Shiny.Never }, // Metang
|
||||
new(true) { Species = 386, Level = 70, Version = GameVersion.R, Moves = new(322,105,354,063), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 28606, OT_Name = "DOEL", Shiny = Shiny.Never }, // Deoxys
|
||||
new(true) { Species = 386, Level = 70, Version = GameVersion.R, Moves = new(322,105,354,063), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 00010, OT_Name = "SPACE C", Shiny = Shiny.Never }, // Deoxys
|
||||
new(true) { Species = 151, Level = 10, Version = GameVersion.R, Language = (int)LanguageID.English, Method = PIDType.BACD_U, ID32 = 06930, OT_Name = "MYSTRY", Shiny = Shiny.Never }, // Mew
|
||||
new(true) { Species = 151, Level = 10, Version = GameVersion.R, Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06930, OT_Name = "MYSTRY", Shiny = Shiny.Never }, // Mew
|
||||
new(R) { Species = 375, Level = 30, Moves = new(036,093,232,287), Language = (int)English, Method = BACD_R, ID32 = 02005, OriginalTrainerName = "ROCKS", OriginalTrainerGender = 0, RibbonNational = true, Shiny = Never }, // Metang
|
||||
new(R, true) { Species = 386, Level = 70, Moves = new(322,105,354,063), Language = (int)English, Method = BACD_R, ID32 = 28606, OriginalTrainerName = "DOEL", Shiny = Never }, // Deoxys
|
||||
new(R, true) { Species = 386, Level = 70, Moves = new(322,105,354,063), Language = (int)English, Method = BACD_R, ID32 = 00010, OriginalTrainerName = "SPACE C", Shiny = Never }, // Deoxys
|
||||
new(R, true) { Species = 151, Level = 10, Language = (int)English, Method = BACD_U, ID32 = 06930, OriginalTrainerName = "MYSTRY", Shiny = Never }, // Mew
|
||||
new(R, true) { Species = 151, Level = 10, Language = (int)English, Method = BACD_R, ID32 = 06930, OriginalTrainerName = "MYSTRY", Shiny = Never }, // Mew
|
||||
|
||||
// Party of the Decade
|
||||
new() { Species = 001, Level = 70, Version = GameVersion.R, Moves = new(230,074,076,235), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06808, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Bulbasaur
|
||||
new() { Species = 006, Level = 70, Version = GameVersion.R, Moves = new(017,163,082,083), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06808, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Charizard
|
||||
new() { Species = 009, Level = 70, Version = GameVersion.R, Moves = new(182,240,130,056), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06808, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Blastoise
|
||||
new() { Species = 025, Level = 70, Version = GameVersion.R, Moves = new(085,087,113,019), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06808, OT_Name = "10 ANIV", HeldItem = 202, Shiny = Shiny.Never }, // Pikachu (Fly)
|
||||
new() { Species = 065, Level = 70, Version = GameVersion.R, Moves = new(248,347,094,271), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06808, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Alakazam
|
||||
new() { Species = 144, Level = 70, Version = GameVersion.R, Moves = new(097,170,058,115), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06808, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Articuno
|
||||
new() { Species = 145, Level = 70, Version = GameVersion.R, Moves = new(097,197,065,268), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06808, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Zapdos
|
||||
new() { Species = 146, Level = 70, Version = GameVersion.R, Moves = new(097,203,053,219), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06808, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Moltres
|
||||
new() { Species = 149, Level = 70, Version = GameVersion.R, Moves = new(097,219,017,200), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06808, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Dragonite
|
||||
new() { Species = 157, Level = 70, Version = GameVersion.R, Moves = new(098,172,129,053), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06808, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Typhlosion
|
||||
new() { Species = 196, Level = 70, Version = GameVersion.R, Moves = new(060,244,094,234), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06808, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Espeon
|
||||
new() { Species = 197, Level = 70, Version = GameVersion.R, Moves = new(185,212,103,236), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06808, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Umbreon
|
||||
new() { Species = 243, Level = 70, Version = GameVersion.R, Moves = new(098,209,115,242), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06808, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Raikou
|
||||
new() { Species = 244, Level = 70, Version = GameVersion.R, Moves = new(083,023,053,207), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06808, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Entei
|
||||
new() { Species = 245, Level = 70, Version = GameVersion.R, Moves = new(016,062,054,243), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06808, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Suicune
|
||||
new() { Species = 248, Level = 70, Version = GameVersion.R, Moves = new(037,184,242,089), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06808, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Tyranitar
|
||||
new() { Species = 257, Level = 70, Version = GameVersion.R, Moves = new(299,163,119,327), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06808, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Blaziken
|
||||
new() { Species = 359, Level = 70, Version = GameVersion.R, Moves = new(104,163,248,195), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06808, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Absol
|
||||
new() { Species = 380, Level = 70, Version = GameVersion.R, Moves = new(296,094,105,204), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06808, OT_Name = "10 ANIV", HeldItem = 191, Shiny = Shiny.Never }, // Latias
|
||||
new() { Species = 381, Level = 70, Version = GameVersion.R, Moves = new(295,094,105,349), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 06808, OT_Name = "10 ANIV", HeldItem = 191, Shiny = Shiny.Never }, // Latios
|
||||
new(R) { Species = 001, Level = 70, Moves = new(230,074,076,235), Language = (int)English, Method = BACD_R, ID32 = 06808, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Bulbasaur
|
||||
new(R) { Species = 006, Level = 70, Moves = new(017,163,082,083), Language = (int)English, Method = BACD_R, ID32 = 06808, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Charizard
|
||||
new(R) { Species = 009, Level = 70, Moves = new(182,240,130,056), Language = (int)English, Method = BACD_R, ID32 = 06808, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Blastoise
|
||||
new(R) { Species = 025, Level = 70, Moves = new(085,087,113,019), Language = (int)English, Method = BACD_R, ID32 = 06808, OriginalTrainerName = "10 ANIV", HeldItem = 202, Shiny = Never }, // Pikachu (Fly)
|
||||
new(R) { Species = 065, Level = 70, Moves = new(248,347,094,271), Language = (int)English, Method = BACD_R, ID32 = 06808, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Alakazam
|
||||
new(R) { Species = 144, Level = 70, Moves = new(097,170,058,115), Language = (int)English, Method = BACD_R, ID32 = 06808, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Articuno
|
||||
new(R) { Species = 145, Level = 70, Moves = new(097,197,065,268), Language = (int)English, Method = BACD_R, ID32 = 06808, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Zapdos
|
||||
new(R) { Species = 146, Level = 70, Moves = new(097,203,053,219), Language = (int)English, Method = BACD_R, ID32 = 06808, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Moltres
|
||||
new(R) { Species = 149, Level = 70, Moves = new(097,219,017,200), Language = (int)English, Method = BACD_R, ID32 = 06808, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Dragonite
|
||||
new(R) { Species = 157, Level = 70, Moves = new(098,172,129,053), Language = (int)English, Method = BACD_R, ID32 = 06808, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Typhlosion
|
||||
new(R) { Species = 196, Level = 70, Moves = new(060,244,094,234), Language = (int)English, Method = BACD_R, ID32 = 06808, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Espeon
|
||||
new(R) { Species = 197, Level = 70, Moves = new(185,212,103,236), Language = (int)English, Method = BACD_R, ID32 = 06808, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Umbreon
|
||||
new(R) { Species = 243, Level = 70, Moves = new(098,209,115,242), Language = (int)English, Method = BACD_R, ID32 = 06808, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Raikou
|
||||
new(R) { Species = 244, Level = 70, Moves = new(083,023,053,207), Language = (int)English, Method = BACD_R, ID32 = 06808, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Entei
|
||||
new(R) { Species = 245, Level = 70, Moves = new(016,062,054,243), Language = (int)English, Method = BACD_R, ID32 = 06808, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Suicune
|
||||
new(R) { Species = 248, Level = 70, Moves = new(037,184,242,089), Language = (int)English, Method = BACD_R, ID32 = 06808, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Tyranitar
|
||||
new(R) { Species = 257, Level = 70, Moves = new(299,163,119,327), Language = (int)English, Method = BACD_R, ID32 = 06808, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Blaziken
|
||||
new(R) { Species = 359, Level = 70, Moves = new(104,163,248,195), Language = (int)English, Method = BACD_R, ID32 = 06808, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Absol
|
||||
new(R) { Species = 380, Level = 70, Moves = new(296,094,105,204), Language = (int)English, Method = BACD_R, ID32 = 06808, OriginalTrainerName = "10 ANIV", HeldItem = 191, Shiny = Never }, // Latias
|
||||
new(R) { Species = 381, Level = 70, Moves = new(295,094,105,349), Language = (int)English, Method = BACD_R, ID32 = 06808, OriginalTrainerName = "10 ANIV", HeldItem = 191, Shiny = Never }, // Latios
|
||||
|
||||
// Journey Across America
|
||||
new() { Species = 001, Level = 70, Version = GameVersion.R, Moves = new(230,074,076,235), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 00010, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Bulbasaur
|
||||
new() { Species = 006, Level = 70, Version = GameVersion.R, Moves = new(017,163,082,083), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 00010, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Charizard
|
||||
new() { Species = 009, Level = 70, Version = GameVersion.R, Moves = new(182,240,130,056), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 00010, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Blastoise
|
||||
new() { Species = 025, Level = 70, Version = GameVersion.R, Moves = new(085,097,087,113), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 00010, OT_Name = "10 ANIV", HeldItem = 202, Shiny = Shiny.Never }, // Pikachu (No Fly)
|
||||
new() { Species = 065, Level = 70, Version = GameVersion.R, Moves = new(248,347,094,271), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 00010, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Alakazam
|
||||
new() { Species = 144, Level = 70, Version = GameVersion.R, Moves = new(097,170,058,115), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 00010, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Articuno
|
||||
new() { Species = 145, Level = 70, Version = GameVersion.R, Moves = new(097,197,065,268), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 00010, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Zapdos
|
||||
new() { Species = 146, Level = 70, Version = GameVersion.R, Moves = new(097,203,053,219), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 00010, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Moltres
|
||||
new() { Species = 149, Level = 70, Version = GameVersion.R, Moves = new(097,219,017,200), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 00010, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Dragonite
|
||||
new() { Species = 157, Level = 70, Version = GameVersion.R, Moves = new(098,172,129,053), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 00010, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Typhlosion
|
||||
new() { Species = 196, Level = 70, Version = GameVersion.R, Moves = new(060,244,094,234), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 00010, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Espeon
|
||||
new() { Species = 197, Level = 70, Version = GameVersion.R, Moves = new(185,212,103,236), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 00010, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Umbreon
|
||||
new() { Species = 243, Level = 70, Version = GameVersion.R, Moves = new(098,209,115,242), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 00010, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Raikou
|
||||
new() { Species = 244, Level = 70, Version = GameVersion.R, Moves = new(083,023,053,207), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 00010, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Entei
|
||||
new() { Species = 245, Level = 70, Version = GameVersion.R, Moves = new(016,062,054,243), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 00010, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Suicune
|
||||
new() { Species = 248, Level = 70, Version = GameVersion.R, Moves = new(037,184,242,089), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 00010, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Tyranitar
|
||||
new() { Species = 251, Level = 70, Version = GameVersion.R, Moves = new(246,248,226,195), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 00010, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Celebi
|
||||
new() { Species = 257, Level = 70, Version = GameVersion.R, Moves = new(299,163,119,327), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 00010, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Blaziken
|
||||
new() { Species = 359, Level = 70, Version = GameVersion.R, Moves = new(104,163,248,195), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 00010, OT_Name = "10 ANIV", Shiny = Shiny.Never }, // Absol
|
||||
new() { Species = 380, Level = 70, Version = GameVersion.R, Moves = new(296,094,105,204), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 00010, OT_Name = "10 ANIV", HeldItem = 191, Shiny = Shiny.Never }, // Latias
|
||||
new() { Species = 381, Level = 70, Version = GameVersion.R, Moves = new(295,094,105,349), Language = (int)LanguageID.English, Method = PIDType.BACD_R, ID32 = 00010, OT_Name = "10 ANIV", HeldItem = 191, Shiny = Shiny.Never }, // Latios
|
||||
new(R) { Species = 001, Level = 70, Moves = new(230,074,076,235), Language = (int)English, Method = BACD_R, ID32 = 00010, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Bulbasaur
|
||||
new(R) { Species = 006, Level = 70, Moves = new(017,163,082,083), Language = (int)English, Method = BACD_R, ID32 = 00010, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Charizard
|
||||
new(R) { Species = 009, Level = 70, Moves = new(182,240,130,056), Language = (int)English, Method = BACD_R, ID32 = 00010, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Blastoise
|
||||
new(R) { Species = 025, Level = 70, Moves = new(085,097,087,113), Language = (int)English, Method = BACD_R, ID32 = 00010, OriginalTrainerName = "10 ANIV", HeldItem = 202, Shiny = Never }, // Pikachu (No Fly)
|
||||
new(R) { Species = 065, Level = 70, Moves = new(248,347,094,271), Language = (int)English, Method = BACD_R, ID32 = 00010, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Alakazam
|
||||
new(R) { Species = 144, Level = 70, Moves = new(097,170,058,115), Language = (int)English, Method = BACD_R, ID32 = 00010, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Articuno
|
||||
new(R) { Species = 145, Level = 70, Moves = new(097,197,065,268), Language = (int)English, Method = BACD_R, ID32 = 00010, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Zapdos
|
||||
new(R) { Species = 146, Level = 70, Moves = new(097,203,053,219), Language = (int)English, Method = BACD_R, ID32 = 00010, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Moltres
|
||||
new(R) { Species = 149, Level = 70, Moves = new(097,219,017,200), Language = (int)English, Method = BACD_R, ID32 = 00010, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Dragonite
|
||||
new(R) { Species = 157, Level = 70, Moves = new(098,172,129,053), Language = (int)English, Method = BACD_R, ID32 = 00010, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Typhlosion
|
||||
new(R) { Species = 196, Level = 70, Moves = new(060,244,094,234), Language = (int)English, Method = BACD_R, ID32 = 00010, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Espeon
|
||||
new(R) { Species = 197, Level = 70, Moves = new(185,212,103,236), Language = (int)English, Method = BACD_R, ID32 = 00010, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Umbreon
|
||||
new(R) { Species = 243, Level = 70, Moves = new(098,209,115,242), Language = (int)English, Method = BACD_R, ID32 = 00010, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Raikou
|
||||
new(R) { Species = 244, Level = 70, Moves = new(083,023,053,207), Language = (int)English, Method = BACD_R, ID32 = 00010, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Entei
|
||||
new(R) { Species = 245, Level = 70, Moves = new(016,062,054,243), Language = (int)English, Method = BACD_R, ID32 = 00010, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Suicune
|
||||
new(R) { Species = 248, Level = 70, Moves = new(037,184,242,089), Language = (int)English, Method = BACD_R, ID32 = 00010, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Tyranitar
|
||||
new(R) { Species = 251, Level = 70, Moves = new(246,248,226,195), Language = (int)English, Method = BACD_R, ID32 = 00010, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Celebi
|
||||
new(R) { Species = 257, Level = 70, Moves = new(299,163,119,327), Language = (int)English, Method = BACD_R, ID32 = 00010, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Blaziken
|
||||
new(R) { Species = 359, Level = 70, Moves = new(104,163,248,195), Language = (int)English, Method = BACD_R, ID32 = 00010, OriginalTrainerName = "10 ANIV", Shiny = Never }, // Absol
|
||||
new(R) { Species = 380, Level = 70, Moves = new(296,094,105,204), Language = (int)English, Method = BACD_R, ID32 = 00010, OriginalTrainerName = "10 ANIV", HeldItem = 191, Shiny = Never }, // Latias
|
||||
new(R) { Species = 381, Level = 70, Moves = new(295,094,105,349), Language = (int)English, Method = BACD_R, ID32 = 00010, OriginalTrainerName = "10 ANIV", HeldItem = 191, Shiny = Never }, // Latios
|
||||
];
|
||||
|
||||
internal static readonly WC3[] Encounter_Event3_Common =
|
||||
[
|
||||
// Pokémon Box -- RSE Recipient
|
||||
new() { Species = 333, IsEgg = true, Level = 05, Moves = new(064,045,206,000), Method = PIDType.BACD_U, OT_Gender = 1, OT_Name = "AZUSA", Version = GameVersion.RSE }, // Swablu Egg with False Swipe
|
||||
new() { Species = 263, IsEgg = true, Level = 05, Moves = new(033,045,039,245), Method = PIDType.BACD_U, OT_Gender = 1, OT_Name = "AZUSA", Version = GameVersion.RSE }, // Zigzagoon Egg with Extreme Speed
|
||||
new() { Species = 300, IsEgg = true, Level = 05, Moves = new(045,033,039,006), Method = PIDType.BACD_U, OT_Gender = 1, OT_Name = "AZUSA", Version = GameVersion.RSE }, // Skitty Egg with Pay Day
|
||||
new() { Species = 172, IsEgg = true, Level = 05, Moves = new(084,204,057,000), Method = PIDType.BACD_U, OT_Gender = 1, OT_Name = "AZUSA", Version = GameVersion.RSE }, // Pichu Egg with Surf
|
||||
new(RSE) { Species = 333, IsEgg = true, Level = 05, Moves = new(064,045,206,000), Method = BACD_U, OriginalTrainerGender = 1, OriginalTrainerName = "AZUSA" }, // Swablu Egg with False Swipe
|
||||
new(RSE) { Species = 263, IsEgg = true, Level = 05, Moves = new(033,045,039,245), Method = BACD_U, OriginalTrainerGender = 1, OriginalTrainerName = "AZUSA" }, // Zigzagoon Egg with Extreme Speed
|
||||
new(RSE) { Species = 300, IsEgg = true, Level = 05, Moves = new(045,033,039,006), Method = BACD_U, OriginalTrainerGender = 1, OriginalTrainerName = "AZUSA" }, // Skitty Egg with Pay Day
|
||||
new(RSE) { Species = 172, IsEgg = true, Level = 05, Moves = new(084,204,057,000), Method = BACD_U, OriginalTrainerGender = 1, OriginalTrainerName = "AZUSA" }, // Pichu Egg with Surf
|
||||
// Pokémon Box -- FRLG Recipient
|
||||
new() { Species = 333, IsEgg = true, Level = 05, Moves = new(064,045,206,000), Method = PIDType.BACD_U, OT_Gender = 1, OT_Name = "AZUSA", Version = GameVersion.FRLG }, // Swablu Egg with False Swipe
|
||||
new() { Species = 263, IsEgg = true, Level = 05, Moves = new(033,045,039,245), Method = PIDType.BACD_U, OT_Gender = 1, OT_Name = "AZUSA", Version = GameVersion.FRLG }, // Zigzagoon Egg with Extreme Speed
|
||||
new() { Species = 300, IsEgg = true, Level = 05, Moves = new(045,033,039,006), Method = PIDType.BACD_U, OT_Gender = 1, OT_Name = "AZUSA", Version = GameVersion.FRLG }, // Skitty Egg with Pay Day
|
||||
new() { Species = 172, IsEgg = true, Level = 05, Moves = new(084,204,057,000), Method = PIDType.BACD_U, OT_Gender = 1, OT_Name = "AZUSA", Version = GameVersion.FRLG }, // Pichu Egg with Surf
|
||||
new(FRLG) { Species = 333, IsEgg = true, Level = 05, Moves = new(064,045,206,000), Method = BACD_U, OriginalTrainerGender = 1, OriginalTrainerName = "AZUSA" }, // Swablu Egg with False Swipe
|
||||
new(FRLG) { Species = 263, IsEgg = true, Level = 05, Moves = new(033,045,039,245), Method = BACD_U, OriginalTrainerGender = 1, OriginalTrainerName = "AZUSA" }, // Zigzagoon Egg with Extreme Speed
|
||||
new(FRLG) { Species = 300, IsEgg = true, Level = 05, Moves = new(045,033,039,006), Method = BACD_U, OriginalTrainerGender = 1, OriginalTrainerName = "AZUSA" }, // Skitty Egg with Pay Day
|
||||
new(FRLG) { Species = 172, IsEgg = true, Level = 05, Moves = new(084,204,057,000), Method = BACD_U, OriginalTrainerGender = 1, OriginalTrainerName = "AZUSA" }, // Pichu Egg with Surf
|
||||
|
||||
// PokePark Eggs - DS Download Play
|
||||
new() { Species = 054, IsEgg = true, Level = 05, Met_Level = 05, TID16 = 50318, OT_Gender = 0, OT_Name = "ポケパーク", Version = GameVersion.R, Moves = new(300), Method = PIDType.BACD_R }, // Psyduck with Mud Sport
|
||||
new() { Species = 172, IsEgg = true, Level = 05, Met_Level = 05, TID16 = 50318, OT_Gender = 0, OT_Name = "ポケパーク", Version = GameVersion.R, Moves = new(266), Method = PIDType.BACD_R }, // Pichu with Follow Me
|
||||
new() { Species = 174, IsEgg = true, Level = 05, Met_Level = 05, TID16 = 50318, OT_Gender = 0, OT_Name = "ポケパーク", Version = GameVersion.R, Moves = new(321), Method = PIDType.BACD_R }, // Igglybuff with Tickle
|
||||
new() { Species = 222, IsEgg = true, Level = 05, Met_Level = 05, TID16 = 50318, OT_Gender = 0, OT_Name = "ポケパーク", Version = GameVersion.R, Moves = new(300), Method = PIDType.BACD_R }, // Corsola with Mud Sport
|
||||
new() { Species = 276, IsEgg = true, Level = 05, Met_Level = 05, TID16 = 50318, OT_Gender = 0, OT_Name = "ポケパーク", Version = GameVersion.R, Moves = new(297), Method = PIDType.BACD_R }, // Taillow with Feather Dance
|
||||
new() { Species = 283, IsEgg = true, Level = 05, Met_Level = 05, TID16 = 50318, OT_Gender = 0, OT_Name = "ポケパーク", Version = GameVersion.R, Moves = new(300), Method = PIDType.BACD_R }, // Surskit with Mud Sport
|
||||
new() { Species = 293, IsEgg = true, Level = 05, Met_Level = 05, TID16 = 50318, OT_Gender = 0, OT_Name = "ポケパーク", Version = GameVersion.R, Moves = new(298), Method = PIDType.BACD_R }, // Whismur with Teeter Dance
|
||||
new() { Species = 300, IsEgg = true, Level = 05, Met_Level = 05, TID16 = 50318, OT_Gender = 0, OT_Name = "ポケパーク", Version = GameVersion.R, Moves = new(205), Method = PIDType.BACD_R }, // Skitty with Rollout
|
||||
new() { Species = 311, IsEgg = true, Level = 05, Met_Level = 05, TID16 = 50318, OT_Gender = 0, OT_Name = "ポケパーク", Version = GameVersion.R, Moves = new(346), Method = PIDType.BACD_R }, // Plusle with Water Sport
|
||||
new() { Species = 312, IsEgg = true, Level = 05, Met_Level = 05, TID16 = 50318, OT_Gender = 0, OT_Name = "ポケパーク", Version = GameVersion.R, Moves = new(300), Method = PIDType.BACD_R }, // Minun with Mud Sport
|
||||
new() { Species = 325, IsEgg = true, Level = 05, Met_Level = 05, TID16 = 50318, OT_Gender = 0, OT_Name = "ポケパーク", Version = GameVersion.R, Moves = new(253), Method = PIDType.BACD_R }, // Spoink with Uproar
|
||||
new() { Species = 327, IsEgg = true, Level = 05, Met_Level = 05, TID16 = 50318, OT_Gender = 0, OT_Name = "ポケパーク", Version = GameVersion.R, Moves = new(047), Method = PIDType.BACD_R }, // Spinda with Sing
|
||||
new() { Species = 331, IsEgg = true, Level = 05, Met_Level = 05, TID16 = 50318, OT_Gender = 0, OT_Name = "ポケパーク", Version = GameVersion.R, Moves = new(227), Method = PIDType.BACD_R }, // Cacnea with Encore
|
||||
new() { Species = 341, IsEgg = true, Level = 05, Met_Level = 05, TID16 = 50318, OT_Gender = 0, OT_Name = "ポケパーク", Version = GameVersion.R, Moves = new(346), Method = PIDType.BACD_R }, // Corphish with Water Sport
|
||||
new() { Species = 360, IsEgg = true, Level = 05, Met_Level = 05, TID16 = 50318, OT_Gender = 0, OT_Name = "ポケパーク", Version = GameVersion.R, Moves = new(321), Method = PIDType.BACD_R }, // Wynaut with Tickle
|
||||
new(R) { Species = 054, IsEgg = true, Level = 05, MetLevel = 05, TID16 = 50318, OriginalTrainerGender = 0, OriginalTrainerName = "ポケパーク", Moves = new(300), Method = BACD_R }, // Psyduck with Mud Sport
|
||||
new(R) { Species = 172, IsEgg = true, Level = 05, MetLevel = 05, TID16 = 50318, OriginalTrainerGender = 0, OriginalTrainerName = "ポケパーク", Moves = new(266), Method = BACD_R }, // Pichu with Follow Me
|
||||
new(R) { Species = 174, IsEgg = true, Level = 05, MetLevel = 05, TID16 = 50318, OriginalTrainerGender = 0, OriginalTrainerName = "ポケパーク", Moves = new(321), Method = BACD_R }, // Igglybuff with Tickle
|
||||
new(R) { Species = 222, IsEgg = true, Level = 05, MetLevel = 05, TID16 = 50318, OriginalTrainerGender = 0, OriginalTrainerName = "ポケパーク", Moves = new(300), Method = BACD_R }, // Corsola with Mud Sport
|
||||
new(R) { Species = 276, IsEgg = true, Level = 05, MetLevel = 05, TID16 = 50318, OriginalTrainerGender = 0, OriginalTrainerName = "ポケパーク", Moves = new(297), Method = BACD_R }, // Taillow with Feather Dance
|
||||
new(R) { Species = 283, IsEgg = true, Level = 05, MetLevel = 05, TID16 = 50318, OriginalTrainerGender = 0, OriginalTrainerName = "ポケパーク", Moves = new(300), Method = BACD_R }, // Surskit with Mud Sport
|
||||
new(R) { Species = 293, IsEgg = true, Level = 05, MetLevel = 05, TID16 = 50318, OriginalTrainerGender = 0, OriginalTrainerName = "ポケパーク", Moves = new(298), Method = BACD_R }, // Whismur with Teeter Dance
|
||||
new(R) { Species = 300, IsEgg = true, Level = 05, MetLevel = 05, TID16 = 50318, OriginalTrainerGender = 0, OriginalTrainerName = "ポケパーク", Moves = new(205), Method = BACD_R }, // Skitty with Rollout
|
||||
new(R) { Species = 311, IsEgg = true, Level = 05, MetLevel = 05, TID16 = 50318, OriginalTrainerGender = 0, OriginalTrainerName = "ポケパーク", Moves = new(346), Method = BACD_R }, // Plusle with Water Sport
|
||||
new(R) { Species = 312, IsEgg = true, Level = 05, MetLevel = 05, TID16 = 50318, OriginalTrainerGender = 0, OriginalTrainerName = "ポケパーク", Moves = new(300), Method = BACD_R }, // Minun with Mud Sport
|
||||
new(R) { Species = 325, IsEgg = true, Level = 05, MetLevel = 05, TID16 = 50318, OriginalTrainerGender = 0, OriginalTrainerName = "ポケパーク", Moves = new(253), Method = BACD_R }, // Spoink with Uproar
|
||||
new(R) { Species = 327, IsEgg = true, Level = 05, MetLevel = 05, TID16 = 50318, OriginalTrainerGender = 0, OriginalTrainerName = "ポケパーク", Moves = new(047), Method = BACD_R }, // Spinda with Sing
|
||||
new(R) { Species = 331, IsEgg = true, Level = 05, MetLevel = 05, TID16 = 50318, OriginalTrainerGender = 0, OriginalTrainerName = "ポケパーク", Moves = new(227), Method = BACD_R }, // Cacnea with Encore
|
||||
new(R) { Species = 341, IsEgg = true, Level = 05, MetLevel = 05, TID16 = 50318, OriginalTrainerGender = 0, OriginalTrainerName = "ポケパーク", Moves = new(346), Method = BACD_R }, // Corphish with Water Sport
|
||||
new(R) { Species = 360, IsEgg = true, Level = 05, MetLevel = 05, TID16 = 50318, OriginalTrainerGender = 0, OriginalTrainerName = "ポケパーク", Moves = new(321), Method = BACD_R }, // Wynaut with Tickle
|
||||
];
|
||||
|
||||
internal static readonly WC3[] Encounter_WC3 = [..Encounter_Event3, ..Encounter_Event3_RS, ..Encounter_Event3_FRLG, ..Encounter_Event3_Common];
|
||||
|
|
|
|||
|
|
@ -112,26 +112,26 @@ internal static class Encounters4DPPt
|
|||
|
||||
internal static readonly EncounterTrade4RanchGift[] RanchGifts =
|
||||
[
|
||||
new(323975838, 025, 18) { Moves = new(447,085,148,104), TID16 = 1000, SID16 = 19840, OTGender = 1, MetLocation = 0068, Gender = 0, Ability = OnlyFirst, CurrentLevel = 20 }, // Pikachu
|
||||
new(323977664, 037, 16) { Moves = new(412,109,053,219), TID16 = 1000, SID16 = 21150, OTGender = 1, MetLocation = 3000, Gender = 0, Ability = OnlyFirst, CurrentLevel = 30 }, // Vulpix
|
||||
new(323975579, 077, 13) { Moves = new(036,033,039,052), TID16 = 1000, SID16 = 01123, OTGender = 1, MetLocation = 3000, Gender = 0, Ability = OnlySecond, CurrentLevel = 16 }, // Ponyta
|
||||
new(323975564, 108, 34) { Moves = new(076,111,014,205), TID16 = 1000, SID16 = 03050, OTGender = 1, MetLocation = 0077, Gender = 0, Ability = OnlyFirst, CurrentLevel = 40 }, // Lickitung
|
||||
new(323977579, 114, 01) { Moves = new(437,438,079,246), TID16 = 1000, SID16 = 49497, OTGender = 1, MetLocation = 3000, Gender = 1, Ability = OnlySecond }, // Tangela
|
||||
new(323977675, 133, 16) { Moves = new(363,270,098,247), TID16 = 1000, SID16 = 47710, OTGender = 1, MetLocation = 0068, Gender = 0, Ability = OnlySecond, CurrentLevel = 30 }, // Eevee
|
||||
new(323977588, 142, 20) { Moves = new(363,089,444,332), TID16 = 1000, SID16 = 43066, OTGender = 1, MetLocation = 0094, Gender = 0, Ability = OnlyFirst, CurrentLevel = 50 }, // Aerodactyl
|
||||
new(232975554, 193, 22) { Moves = new(318,095,246,138), TID16 = 1000, SID16 = 42301, OTGender = 1, MetLocation = 0052, Gender = 0, Ability = OnlyFirst, CurrentLevel = 45, FixedBall = Ball.Safari }, // Yanma
|
||||
new(323975570, 241, 16) { Moves = new(208,215,360,359), TID16 = 1000, SID16 = 02707, OTGender = 1, MetLocation = 3000, Gender = 1, Ability = OnlyFirst, CurrentLevel = 48 }, // Miltank
|
||||
new(323975563, 285, 22) { Moves = new(402,147,206,078), TID16 = 1000, SID16 = 02788, OTGender = 1, MetLocation = 3000, Gender = 0, Ability = OnlySecond, CurrentLevel = 45, FixedBall = Ball.Safari }, // Shroomish
|
||||
new(323975559, 320, 30) { Moves = new(156,323,133,058), TID16 = 1000, SID16 = 27046, OTGender = 1, MetLocation = 0038, Gender = 0, Ability = OnlySecond, CurrentLevel = 45 }, // Wailmer
|
||||
new(323977657, 360, 01) { Moves = new(204,150,227,000), TID16 = 1000, SID16 = 01788, OTGender = 1, MetLocation = 0004, Gender = 0, Ability = OnlySecond, EggLocation = 2000 }, // Wynaut
|
||||
new(323975563, 397, 02) { Moves = new(355,017,283,018), TID16 = 1000, SID16 = 59298, OTGender = 1, MetLocation = 0016, Gender = 0, Ability = OnlySecond, CurrentLevel = 23 }, // Staravia
|
||||
new(323970584, 415, 05) { Moves = new(230,016,000,000), TID16 = 1000, SID16 = 54140, OTGender = 1, MetLocation = 0020, Gender = 1, Ability = OnlyFirst, CurrentLevel = 20 }, // Combee
|
||||
new(323977539, 417, 09) { Moves = new(447,045,351,098), TID16 = 1000, SID16 = 18830, OTGender = 1, MetLocation = 0020, Gender = 1, Ability = OnlySecond, CurrentLevel = 10 }, // Pachirisu
|
||||
new(323974107, 422, 20) { Moves = new(363,352,426,104), TID16 = 1000, SID16 = 39272, OTGender = 1, MetLocation = 0028, Gender = 0, Ability = OnlySecond, CurrentLevel = 25, Form = 1 }, // Shellos
|
||||
new(323977566, 427, 10) { Moves = new(204,193,409,098), TID16 = 1000, SID16 = 31045, OTGender = 1, MetLocation = 3000, Gender = 1, Ability = OnlyFirst, CurrentLevel = 16 }, // Buneary
|
||||
new(323975579, 453, 22) { Moves = new(310,207,426,389), TID16 = 1000, SID16 = 41342, OTGender = 1, MetLocation = 0052, Gender = 0, Ability = OnlySecond, CurrentLevel = 31, FixedBall = Ball.Safari }, // Croagunk
|
||||
new(323977566, 456, 15) { Moves = new(213,352,219,392), TID16 = 1000, SID16 = 48348, OTGender = 1, MetLocation = 0020, Gender = 1, Ability = OnlyFirst, CurrentLevel = 35 }, // Finneon
|
||||
new(323975582, 459, 32) { Moves = new(452,420,275,059), TID16 = 1000, SID16 = 23360, OTGender = 1, MetLocation = 0031, Gender = 0, Ability = OnlyFirst, CurrentLevel = 41 }, // Snover
|
||||
new(323975838, 025, 18) { Moves = new(447,085,148,104), TID16 = 1000, SID16 = 19840, OTGender = 1, Location = 0068, Gender = 0, Ability = OnlyFirst, CurrentLevel = 20 }, // Pikachu
|
||||
new(323977664, 037, 16) { Moves = new(412,109,053,219), TID16 = 1000, SID16 = 21150, OTGender = 1, Location = 3000, Gender = 0, Ability = OnlyFirst, CurrentLevel = 30 }, // Vulpix
|
||||
new(323975579, 077, 13) { Moves = new(036,033,039,052), TID16 = 1000, SID16 = 01123, OTGender = 1, Location = 3000, Gender = 0, Ability = OnlySecond, CurrentLevel = 16 }, // Ponyta
|
||||
new(323975564, 108, 34) { Moves = new(076,111,014,205), TID16 = 1000, SID16 = 03050, OTGender = 1, Location = 0077, Gender = 0, Ability = OnlyFirst, CurrentLevel = 40 }, // Lickitung
|
||||
new(323977579, 114, 01) { Moves = new(437,438,079,246), TID16 = 1000, SID16 = 49497, OTGender = 1, Location = 3000, Gender = 1, Ability = OnlySecond }, // Tangela
|
||||
new(323977675, 133, 16) { Moves = new(363,270,098,247), TID16 = 1000, SID16 = 47710, OTGender = 1, Location = 0068, Gender = 0, Ability = OnlySecond, CurrentLevel = 30 }, // Eevee
|
||||
new(323977588, 142, 20) { Moves = new(363,089,444,332), TID16 = 1000, SID16 = 43066, OTGender = 1, Location = 0094, Gender = 0, Ability = OnlyFirst, CurrentLevel = 50 }, // Aerodactyl
|
||||
new(232975554, 193, 22) { Moves = new(318,095,246,138), TID16 = 1000, SID16 = 42301, OTGender = 1, Location = 0052, Gender = 0, Ability = OnlyFirst, CurrentLevel = 45, FixedBall = Ball.Safari }, // Yanma
|
||||
new(323975570, 241, 16) { Moves = new(208,215,360,359), TID16 = 1000, SID16 = 02707, OTGender = 1, Location = 3000, Gender = 1, Ability = OnlyFirst, CurrentLevel = 48 }, // Miltank
|
||||
new(323975563, 285, 22) { Moves = new(402,147,206,078), TID16 = 1000, SID16 = 02788, OTGender = 1, Location = 3000, Gender = 0, Ability = OnlySecond, CurrentLevel = 45, FixedBall = Ball.Safari }, // Shroomish
|
||||
new(323975559, 320, 30) { Moves = new(156,323,133,058), TID16 = 1000, SID16 = 27046, OTGender = 1, Location = 0038, Gender = 0, Ability = OnlySecond, CurrentLevel = 45 }, // Wailmer
|
||||
new(323977657, 360, 01) { Moves = new(204,150,227,000), TID16 = 1000, SID16 = 01788, OTGender = 1, Location = 0004, Gender = 0, Ability = OnlySecond, EggLocation = 2000 }, // Wynaut
|
||||
new(323975563, 397, 02) { Moves = new(355,017,283,018), TID16 = 1000, SID16 = 59298, OTGender = 1, Location = 0016, Gender = 0, Ability = OnlySecond, CurrentLevel = 23 }, // Staravia
|
||||
new(323970584, 415, 05) { Moves = new(230,016,000,000), TID16 = 1000, SID16 = 54140, OTGender = 1, Location = 0020, Gender = 1, Ability = OnlyFirst, CurrentLevel = 20 }, // Combee
|
||||
new(323977539, 417, 09) { Moves = new(447,045,351,098), TID16 = 1000, SID16 = 18830, OTGender = 1, Location = 0020, Gender = 1, Ability = OnlySecond, CurrentLevel = 10 }, // Pachirisu
|
||||
new(323974107, 422, 20) { Moves = new(363,352,426,104), TID16 = 1000, SID16 = 39272, OTGender = 1, Location = 0028, Gender = 0, Ability = OnlySecond, CurrentLevel = 25, Form = 1 }, // Shellos
|
||||
new(323977566, 427, 10) { Moves = new(204,193,409,098), TID16 = 1000, SID16 = 31045, OTGender = 1, Location = 3000, Gender = 1, Ability = OnlyFirst, CurrentLevel = 16 }, // Buneary
|
||||
new(323975579, 453, 22) { Moves = new(310,207,426,389), TID16 = 1000, SID16 = 41342, OTGender = 1, Location = 0052, Gender = 0, Ability = OnlySecond, CurrentLevel = 31, FixedBall = Ball.Safari }, // Croagunk
|
||||
new(323977566, 456, 15) { Moves = new(213,352,219,392), TID16 = 1000, SID16 = 48348, OTGender = 1, Location = 0020, Gender = 1, Ability = OnlyFirst, CurrentLevel = 35 }, // Finneon
|
||||
new(323975582, 459, 32) { Moves = new(452,420,275,059), TID16 = 1000, SID16 = 23360, OTGender = 1, Location = 0031, Gender = 0, Ability = OnlyFirst, CurrentLevel = 41 }, // Snover
|
||||
new(151, 50) { Moves = new(235,216,095,100), TID16 = 1000, SID16 = 59228, OTGender = 1, FixedBall = Ball.Cherish, Gender = 2, Ability = Any12 }, // Mew
|
||||
new(489, 01) { Moves = new(447,240,156,057), TID16 = 1000, SID16 = 09248, OTGender = 1, FixedBall = Ball.Cherish, Gender = 2, Ability = Any12, CurrentLevel = 50, EggLocation = 3000 }, // Phione
|
||||
];
|
||||
|
|
|
|||
|
|
@ -25,11 +25,11 @@ internal static class Encounters6AO
|
|||
Gender = 1,
|
||||
Ability = OnlyHidden,
|
||||
FlawlessIVCount = 3,
|
||||
CNT_Cool = 70,
|
||||
CNT_Beauty = 70,
|
||||
CNT_Cute = 70,
|
||||
CNT_Tough = 70,
|
||||
CNT_Smart = 70,
|
||||
ContestCool = 70,
|
||||
ContestBeauty = 70,
|
||||
ContestCute = 70,
|
||||
ContestTough = 70,
|
||||
ContestSmart = 70,
|
||||
FixedBall = Ball.Poke,
|
||||
Shiny = Shiny.Never,
|
||||
};
|
||||
|
|
@ -72,7 +72,7 @@ internal static class Encounters6AO
|
|||
|
||||
// Gift
|
||||
new(ORAS) { Species = 374, Level = 01, Location = 196, Ability = OnlyFirst, FixedBall = Ball.Poke, IVs = new(-1,-1,31,-1,-1,31) }, // Beldum
|
||||
new(ORAS) { Species = 351, Level = 30, Location = 240, Ability = OnlyFirst, FixedBall = Ball.Poke, IVs = new(-1,-1,-1,-1,31,-1), CNT_Beauty = 100, Gender = 1, Nature = Nature.Lax }, // Castform
|
||||
new(ORAS) { Species = 351, Level = 30, Location = 240, Ability = OnlyFirst, FixedBall = Ball.Poke, IVs = new(-1,-1,-1,-1,31,-1), ContestBeauty = 100, Gender = 1, Nature = Nature.Lax }, // Castform
|
||||
new(ORAS) { Species = 319, Level = 40, Location = 318, Ability = OnlyFirst, FixedBall = Ball.Poke, Gender = 1, Nature = Nature.Adamant }, // Sharpedo
|
||||
new(ORAS) { Species = 323, Level = 40, Location = 318, Ability = OnlyFirst, FixedBall = Ball.Poke, Gender = 1, Nature = Nature.Quiet }, // Camerupt
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ private static IEnumerable<IEncounterable> GetEncounters(PKM pk, EvoCriteria[] c
|
|||
yield return enc.Encounter;
|
||||
}
|
||||
|
||||
private const int Generation = 2;
|
||||
private const byte Generation = 2;
|
||||
private const EntityContext Context = EntityContext.Gen2;
|
||||
private const byte EggLevel = 5;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace PKHeX.Core;
|
||||
|
|
@ -28,60 +27,71 @@ public IEnumerable<IEncounterable> GetEncounters(PKM pk, EvoCriteria[] chain, Le
|
|||
yield break;
|
||||
|
||||
info.PIDIV = MethodFinder.Analyze(pk);
|
||||
IEncounterable? partial = null;
|
||||
|
||||
foreach (var z in GetEncountersInner(pk, chain, info))
|
||||
{
|
||||
if (IsTypeCompatible(z, pk, info.PIDIV.Type))
|
||||
yield return z;
|
||||
else
|
||||
partial ??= z;
|
||||
}
|
||||
static bool IsTypeCompatible(IEncounterTemplate enc, PKM pk, PIDType type)
|
||||
{
|
||||
if (enc is IRandomCorrelation r)
|
||||
return r.IsCompatible(type, pk);
|
||||
return type == PIDType.None;
|
||||
}
|
||||
|
||||
if (partial == null)
|
||||
yield break;
|
||||
|
||||
info.PIDIVMatches = false;
|
||||
yield return partial;
|
||||
}
|
||||
|
||||
private static IEnumerable<IEncounterable> GetEncountersInner(PKM pk, EvoCriteria[] chain, LegalInfo info)
|
||||
{
|
||||
var game = (GameVersion)pk.Version;
|
||||
var game = pk.Version;
|
||||
var iterator = new EncounterEnumerator3(pk, chain, game);
|
||||
IEncounterable? deferType = null;
|
||||
EncounterSlot3? deferSlot = null;
|
||||
List<Frame>? frames = null;
|
||||
var leadQueue = new LeadEncounterQueue<EncounterSlot3>();
|
||||
|
||||
bool emerald = pk.E;
|
||||
byte gender = pk.Gender;
|
||||
if (pk.Species is (int)Species.Marill or (int)Species.Azumarill)
|
||||
gender = EntityGender.GetFromPIDAndRatio(pk.EncryptionConstant, 0x3F);
|
||||
|
||||
foreach (var enc in iterator)
|
||||
{
|
||||
var e = enc.Encounter;
|
||||
if (e is not EncounterSlot3 s3 || s3 is EncounterSlot3Swarm)
|
||||
if (!IsTypeCompatible(e, pk, info.PIDIV.Type))
|
||||
{
|
||||
deferType ??= e;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (e is not EncounterSlot3 slot)
|
||||
{
|
||||
yield return e;
|
||||
continue;
|
||||
}
|
||||
|
||||
var wildFrames = frames ?? AnalyzeFrames(pk, info);
|
||||
var frame = wildFrames.Find(s => s.IsSlotCompatibile(s3, pk));
|
||||
if (frame != null)
|
||||
yield return s3;
|
||||
deferSlot ??= s3;
|
||||
var evo = LeadFinder.GetLevelConstraint(pk, chain, slot, 3);
|
||||
var lead = LeadFinder.GetLeadInfo3(slot, info.PIDIV, evo, emerald, gender, pk.Format);
|
||||
if (!lead.IsValid())
|
||||
{
|
||||
deferSlot ??= slot;
|
||||
continue;
|
||||
}
|
||||
leadQueue.Insert(lead, slot);
|
||||
}
|
||||
|
||||
foreach (var cache in leadQueue.List)
|
||||
{
|
||||
info.PIDIV = info.PIDIV.AsEncounteredVia(cache.Lead);
|
||||
yield return cache.Encounter;
|
||||
}
|
||||
if (leadQueue.List.Count != 0)
|
||||
yield break;
|
||||
|
||||
// Error will be flagged later if this is chosen.
|
||||
if (deferSlot != null)
|
||||
{
|
||||
info.ManualFlag = EncounterYieldFlag.InvalidFrame;
|
||||
yield return deferSlot;
|
||||
}
|
||||
else if (deferType != null)
|
||||
{
|
||||
info.ManualFlag = EncounterYieldFlag.InvalidPIDIV;
|
||||
yield return deferType;
|
||||
}
|
||||
}
|
||||
|
||||
private static List<Frame> AnalyzeFrames(PKM pk, LegalInfo info)
|
||||
private static bool IsTypeCompatible(IEncounterTemplate enc, PKM pk, PIDType type)
|
||||
{
|
||||
return FrameFinder.GetFrames(info.PIDIV, pk).ToList();
|
||||
if (enc is IRandomCorrelation r)
|
||||
return r.IsCompatible(type, pk);
|
||||
return type == PIDType.None;
|
||||
}
|
||||
|
||||
private const int Generation = 3;
|
||||
private const byte Generation = 3;
|
||||
private const EntityContext Context = EntityContext.Gen3;
|
||||
private const byte EggLevel = 5;
|
||||
|
||||
|
|
|
|||
|
|
@ -56,11 +56,11 @@ static bool IsTypeCompatible(IEncounterTemplate enc, PKM pk, PIDType type)
|
|||
partial ??= z;
|
||||
}
|
||||
|
||||
if (partial == null)
|
||||
yield break;
|
||||
|
||||
info.PIDIVMatches = false;
|
||||
yield return partial;
|
||||
if (partial != null)
|
||||
{
|
||||
info.ManualFlag = EncounterYieldFlag.InvalidPIDIV;
|
||||
yield return partial;
|
||||
}
|
||||
}
|
||||
|
||||
private static IEnumerable<IEncounterable> IterateInner(PKM pk, EvoCriteria[] chain)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace PKHeX.Core;
|
||||
|
|
@ -30,77 +29,85 @@ public IEnumerable<IEncounterable> GetPossible(PKM pk, EvoCriteria[] chain, Game
|
|||
public IEnumerable<IEncounterable> GetEncounters(PKM pk, EvoCriteria[] chain, LegalInfo info)
|
||||
{
|
||||
info.PIDIV = MethodFinder.Analyze(pk);
|
||||
var deferredPIDIV = new List<IEncounterable>();
|
||||
var deferredEType = new List<IEncounterable>();
|
||||
|
||||
foreach (var z in GetEncountersInner(pk, chain, info))
|
||||
{
|
||||
if (!IsTypeCompatible(z, pk, info.PIDIV.Type))
|
||||
deferredPIDIV.Add(z);
|
||||
else if (!IsTileCompatible(z, pk))
|
||||
deferredEType.Add(z);
|
||||
else
|
||||
yield return z;
|
||||
}
|
||||
|
||||
static bool IsTileCompatible(IEncounterable encounterable, PKM pk)
|
||||
{
|
||||
if (pk is not IGroundTile e)
|
||||
return true; // No longer has the data to check
|
||||
if (encounterable is not IGroundTypeTile t)
|
||||
return e.GroundTile == 0;
|
||||
return t.GroundTile.Contains(e.GroundTile);
|
||||
}
|
||||
|
||||
static bool IsTypeCompatible(IEncounterTemplate enc, PKM pk, PIDType type)
|
||||
{
|
||||
if (enc is IRandomCorrelation r)
|
||||
return r.IsCompatible(type, pk);
|
||||
return type == PIDType.None;
|
||||
}
|
||||
|
||||
foreach (var z in deferredEType)
|
||||
yield return z;
|
||||
|
||||
if (deferredPIDIV.Count == 0)
|
||||
yield break;
|
||||
|
||||
info.PIDIVMatches = false;
|
||||
foreach (var z in deferredPIDIV)
|
||||
yield return z;
|
||||
}
|
||||
|
||||
private static IEnumerable<IEncounterable> GetEncountersInner(PKM pk, EvoCriteria[] chain, LegalInfo info)
|
||||
{
|
||||
var game = (GameVersion)pk.Version;
|
||||
var game = pk.Version;
|
||||
var iterator = new EncounterEnumerator4(pk, chain, game);
|
||||
EncounterSlot4? deferSlot = null;
|
||||
List<Frame>? frames = null;
|
||||
IEncounterable? deferTile = null;
|
||||
IEncounterable? deferType = null;
|
||||
var leadQueue = new LeadEncounterQueue<EncounterSlot4>();
|
||||
|
||||
foreach (var enc in iterator)
|
||||
{
|
||||
var e = enc.Encounter;
|
||||
if (e is not EncounterSlot4 s4)
|
||||
if (!IsTileCompatible(e, pk))
|
||||
{
|
||||
deferTile ??= e;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (e is not EncounterSlot4 slot)
|
||||
{
|
||||
yield return e;
|
||||
continue;
|
||||
}
|
||||
if (!IsTypeCompatible(e, pk, info.PIDIV.Type))
|
||||
{
|
||||
deferSlot ??= slot;
|
||||
continue;
|
||||
}
|
||||
|
||||
var wildFrames = frames ?? AnalyzeFrames(pk, info);
|
||||
var frame = wildFrames.Find(s => s.IsSlotCompatibile(s4, pk));
|
||||
if (frame != null)
|
||||
yield return s4;
|
||||
deferSlot ??= s4;
|
||||
var evo = LeadFinder.GetLevelConstraint(pk, chain, slot, 4);
|
||||
var lead = LeadFinder.GetLeadInfo4(pk, slot, info.PIDIV, evo);
|
||||
if (!lead.IsValid())
|
||||
{
|
||||
deferSlot ??= slot;
|
||||
continue;
|
||||
}
|
||||
leadQueue.Insert(lead, slot);
|
||||
}
|
||||
if (deferSlot != null)
|
||||
|
||||
foreach (var cache in leadQueue.List)
|
||||
{
|
||||
info.PIDIV = info.PIDIV.AsEncounteredVia(cache.Lead);
|
||||
yield return cache.Encounter;
|
||||
}
|
||||
if (leadQueue.List.Count != 0)
|
||||
yield break;
|
||||
|
||||
// Error will be flagged later if this is chosen.
|
||||
if (deferTile != null)
|
||||
{
|
||||
yield return deferTile;
|
||||
}
|
||||
else if (deferSlot != null)
|
||||
{
|
||||
info.ManualFlag = EncounterYieldFlag.InvalidFrame;
|
||||
yield return deferSlot;
|
||||
}
|
||||
else if (deferType != null)
|
||||
{
|
||||
info.ManualFlag = EncounterYieldFlag.InvalidPIDIV;
|
||||
yield return deferType;
|
||||
}
|
||||
}
|
||||
|
||||
private static List<Frame> AnalyzeFrames(PKM pk, LegalInfo info)
|
||||
private static bool IsTileCompatible(IEncounterTemplate enc, PKM pk)
|
||||
{
|
||||
return FrameFinder.GetFrames(info.PIDIV, pk).ToList();
|
||||
if (pk is not IGroundTile e)
|
||||
return true; // No longer has the data to check
|
||||
if (enc is not IGroundTypeTile t)
|
||||
return e.GroundTile == 0;
|
||||
return t.GroundTile.Contains(e.GroundTile);
|
||||
}
|
||||
|
||||
private const int Generation = 4;
|
||||
private static bool IsTypeCompatible(IEncounterTemplate enc, PKM pk, PIDType type)
|
||||
{
|
||||
if (enc is IRandomCorrelation r)
|
||||
return r.IsCompatible(type, pk);
|
||||
return type == PIDType.None;
|
||||
}
|
||||
|
||||
private const byte Generation = 4;
|
||||
private const EntityContext Context = EntityContext.Gen4;
|
||||
private const byte EggLevel = 1;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,12 +25,12 @@ public IEnumerable<IEncounterable> GetPossible(PKM _, EvoCriteria[] chain, GameV
|
|||
|
||||
public IEnumerable<IEncounterable> GetEncounters(PKM pk, EvoCriteria[] chain, LegalInfo info)
|
||||
{
|
||||
var iterator = new EncounterEnumerator5(pk, chain, (GameVersion)pk.Version);
|
||||
var iterator = new EncounterEnumerator5(pk, chain, pk.Version);
|
||||
foreach (var enc in iterator)
|
||||
yield return enc.Encounter;
|
||||
}
|
||||
|
||||
private const int Generation = 5;
|
||||
private const byte Generation = 5;
|
||||
private const EntityContext Context = EntityContext.Gen5;
|
||||
private const byte EggLevel = EggStateLegality.EggMetLevel;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,12 +23,12 @@ public IEnumerable<IEncounterable> GetEncounters(PKM pk, LegalInfo info)
|
|||
|
||||
public IEnumerable<IEncounterable> GetEncounters(PKM pk, EvoCriteria[] chain, LegalInfo info)
|
||||
{
|
||||
var iterator = new EncounterEnumerator6(pk, chain, (GameVersion)pk.Version);
|
||||
var iterator = new EncounterEnumerator6(pk, chain, pk.Version);
|
||||
foreach (var enc in iterator)
|
||||
yield return enc.Encounter;
|
||||
}
|
||||
|
||||
private const int Generation = 6;
|
||||
private const byte Generation = 6;
|
||||
private const EntityContext Context = EntityContext.Gen6;
|
||||
private const byte EggLevel = EggStateLegality.EggMetLevel;
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public IEnumerable<IEncounterable> GetPossible(PKM _, EvoCriteria[] chain, GameV
|
|||
|
||||
public IEnumerable<IEncounterable> GetEncounters(PKM pk, EvoCriteria[] chain, LegalInfo info)
|
||||
{
|
||||
var iterator = new EncounterEnumerator7(pk, chain, (GameVersion)pk.Version);
|
||||
var iterator = new EncounterEnumerator7(pk, chain, pk.Version);
|
||||
foreach (var enc in iterator)
|
||||
yield return enc.Encounter;
|
||||
}
|
||||
|
|
@ -25,7 +25,7 @@ public IEnumerable<IEncounterable> GetEncounters(PKM pk, EvoCriteria[] chain, Le
|
|||
internal static EncounterTransfer7 GetVCStaticTransferEncounter(PKM pk, ushort encSpecies, ReadOnlySpan<EvoCriteria> chain)
|
||||
{
|
||||
// Obtain the lowest evolution species with matching OT friendship. Not all species chains have the same base friendship.
|
||||
var met = (byte)pk.Met_Level;
|
||||
var met = pk.MetLevel;
|
||||
if (pk.VC1)
|
||||
{
|
||||
// Only yield a VC1 template if it could originate in VC1.
|
||||
|
|
@ -43,7 +43,7 @@ internal static EncounterTransfer7 GetVCStaticTransferEncounter(PKM pk, ushort e
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the most devolved species that matches the <see cref="pk"/> <see cref="PKM.OT_Friendship"/>.
|
||||
/// Get the most devolved species that matches the <see cref="pk"/> <see cref="PKM.OriginalTrainerFriendship"/>.
|
||||
/// </summary>
|
||||
private static ushort GetVCSpecies(ReadOnlySpan<EvoCriteria> chain, PKM pk, ushort maxSpecies)
|
||||
{
|
||||
|
|
@ -54,14 +54,14 @@ private static ushort GetVCSpecies(ReadOnlySpan<EvoCriteria> chain, PKM pk, usho
|
|||
continue;
|
||||
if (evo.Form != 0)
|
||||
continue;
|
||||
if (PersonalTable.SM.GetFormEntry(evo.Species, evo.Form).BaseFriendship != pk.OT_Friendship)
|
||||
if (PersonalTable.SM.GetFormEntry(evo.Species, evo.Form).BaseFriendship != pk.OriginalTrainerFriendship)
|
||||
continue;
|
||||
return evo.Species;
|
||||
}
|
||||
return pk.Species;
|
||||
}
|
||||
|
||||
private const int Generation = 7;
|
||||
private const byte Generation = 7;
|
||||
private const EntityContext Context = EntityContext.Gen7;
|
||||
private const byte EggLevel = EggStateLegality.EggMetLevel;
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public IEnumerable<IEncounterable> GetPossible(PKM _, EvoCriteria[] chain, GameV
|
|||
|
||||
public IEnumerable<IEncounterable> GetEncounters(PKM pk, EvoCriteria[] chain, LegalInfo info)
|
||||
{
|
||||
var iterator = new EncounterEnumerator7GG(pk, chain, (GameVersion)pk.Version);
|
||||
var iterator = new EncounterEnumerator7GG(pk, chain, pk.Version);
|
||||
foreach (var enc in iterator)
|
||||
yield return enc.Encounter;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,12 +17,12 @@ public IEnumerable<IEncounterable> GetPossible(PKM _, EvoCriteria[] chain, GameV
|
|||
|
||||
public IEnumerable<IEncounterable> GetEncounters(PKM pk, EvoCriteria[] chain, LegalInfo info)
|
||||
{
|
||||
var iterator = new EncounterEnumerator8(pk, chain, (GameVersion)pk.Version);
|
||||
var iterator = new EncounterEnumerator8(pk, chain, pk.Version);
|
||||
foreach (var enc in iterator)
|
||||
yield return enc.Encounter;
|
||||
}
|
||||
|
||||
private const int Generation = 8;
|
||||
private const byte Generation = 8;
|
||||
private const EntityContext Context = EntityContext.Gen8;
|
||||
private const byte EggLevel = 1;
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public IEnumerable<IEncounterable> GetPossible(PKM pk, EvoCriteria[] chain, Game
|
|||
|
||||
public IEnumerable<IEncounterable> GetEncounters(PKM pk, EvoCriteria[] chain, LegalInfo info)
|
||||
{
|
||||
var game = (GameVersion)pk.Version;
|
||||
var game = pk.Version;
|
||||
var iterator = new EncounterEnumerator8b(pk, chain, game);
|
||||
foreach (var enc in iterator)
|
||||
yield return enc.Encounter;
|
||||
|
|
@ -30,7 +30,7 @@ public IEnumerable<IEncounterable> GetEncountersSWSH(PKM pk, EvoCriteria[] chain
|
|||
yield return enc.Encounter;
|
||||
}
|
||||
|
||||
private const int Generation = 8;
|
||||
private const byte Generation = 8;
|
||||
private const EntityContext Context = EntityContext.Gen8b;
|
||||
private const byte EggLevel = 1;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@ public IEnumerable<IEncounterable> GetEncounters(PKM pk, LegalInfo info)
|
|||
if (chain.Length == 0)
|
||||
return [];
|
||||
|
||||
return (GameVersion)pk.Version switch
|
||||
return pk.Version switch
|
||||
{
|
||||
SW when pk.Met_Location == LocationsHOME.SWSL => Instance.GetEncountersSWSH(pk, chain, SL),
|
||||
SH when pk.Met_Location == LocationsHOME.SHVL => Instance.GetEncountersSWSH(pk, chain, VL),
|
||||
SW when pk.MetLocation == LocationsHOME.SWSL => Instance.GetEncountersSWSH(pk, chain, SL),
|
||||
SH when pk.MetLocation == LocationsHOME.SHVL => Instance.GetEncountersSWSH(pk, chain, VL),
|
||||
_ => GetEncounters(pk, chain, info),
|
||||
};
|
||||
}
|
||||
|
|
@ -38,12 +38,12 @@ public IEnumerable<IEncounterable> GetEncountersSWSH(PKM pk, EvoCriteria[] chain
|
|||
|
||||
public IEnumerable<IEncounterable> GetEncounters(PKM pk, EvoCriteria[] chain, LegalInfo info)
|
||||
{
|
||||
var iterator = new EncounterEnumerator9(pk, chain, (GameVersion)pk.Version);
|
||||
var iterator = new EncounterEnumerator9(pk, chain, pk.Version);
|
||||
foreach (var enc in iterator)
|
||||
yield return enc.Encounter;
|
||||
}
|
||||
|
||||
private const int Generation = 9;
|
||||
private const byte Generation = 9;
|
||||
private const EntityContext Context = EntityContext.Gen9;
|
||||
private const byte EggLevel = 1;
|
||||
|
||||
|
|
|
|||
|
|
@ -27,11 +27,11 @@ public static bool CanBeWildEncounter(PKM pk)
|
|||
/// <remarks>Only applicable for Generation 4 origins and above.</remarks>
|
||||
public static bool IsMetAsEgg(PKM pk) => pk switch
|
||||
{
|
||||
// This all could be simplified to just checking Egg_Day != 0 without type checks.
|
||||
// Leaving like this to indicate how Egg_Location is not a true indicator due to quirks from BD/SP.
|
||||
// This all could be simplified to just checking EggDay != 0 without type checks.
|
||||
// Leaving like this to indicate how EggLocation is not a true indicator due to quirks from BD/SP.
|
||||
|
||||
PA8 or PK8 => pk.Egg_Location is not 0 || pk is { BDSP: true, Egg_Day: not 0 },
|
||||
PB8 pb8 => pb8.Egg_Location is not Locations.Default8bNone,
|
||||
_ => pk.Egg_Location is not 0,
|
||||
PA8 or PK8 => pk.EggLocation is not 0 || pk is { BDSP: true, EggDay: not 0 },
|
||||
PB8 pb8 => pb8.EggLocation is not Locations.Default8bNone,
|
||||
_ => pk.EggLocation is not 0,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public IEnumerable<IEncounterable> GetEncounters(PKM pk, LegalInfo info)
|
|||
private static IEnumerable<IEncounterable> GetEncounters(PKM pk)
|
||||
{
|
||||
// If the current data indicates that it must have originated from Crystal, only yield encounter data from Crystal.
|
||||
bool crystal = pk is ICaughtData2 { CaughtData: not 0 } or { Format: >= 7, OT_Gender: 1 };
|
||||
bool crystal = pk is ICaughtData2 { CaughtData: not 0 } or { Format: >= 7, OriginalTrainerGender: 1 };
|
||||
if (crystal)
|
||||
return EncounterGenerator2.Instance.GetEncounters(pk, GameVersion.C);
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ public sealed class EncounterGenerator7X : IEncounterGenerator
|
|||
|
||||
public IEnumerable<IEncounterable> GetPossible(PKM pk, EvoCriteria[] chain, GameVersion game, EncounterTypeGroup groups) => pk.Version switch
|
||||
{
|
||||
(int)GameVersion.GO => EncounterGenerator7GO.Instance.GetPossible(pk, chain, game, groups),
|
||||
> (int)GameVersion.GO => EncounterGenerator7GG.Instance.GetPossible(pk, chain, game, groups),
|
||||
GameVersion.GO => EncounterGenerator7GO.Instance.GetPossible(pk, chain, game, groups),
|
||||
> GameVersion.GO => EncounterGenerator7GG.Instance.GetPossible(pk, chain, game, groups),
|
||||
_ => EncounterGenerator7.Instance.GetPossible(pk, chain, game, groups),
|
||||
};
|
||||
|
||||
|
|
@ -21,8 +21,8 @@ public IEnumerable<IEncounterable> GetEncounters(PKM pk, LegalInfo info)
|
|||
|
||||
public IEnumerable<IEncounterable> GetEncounters(PKM pk, EvoCriteria[] chain, LegalInfo info) => pk.Version switch
|
||||
{
|
||||
(int)GameVersion.GO => EncounterGenerator7GO.Instance.GetEncounters(pk, chain, info),
|
||||
> (int)GameVersion.GO => EncounterGenerator7GG.Instance.GetEncounters(pk, chain, info),
|
||||
GameVersion.GO => EncounterGenerator7GO.Instance.GetEncounters(pk, chain, info),
|
||||
> GameVersion.GO => EncounterGenerator7GG.Instance.GetEncounters(pk, chain, info),
|
||||
_ => EncounterGenerator7.Instance.GetEncounters(pk, chain, info),
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,16 +21,16 @@ public IEnumerable<IEncounterable> GetEncounters(PKM pk, LegalInfo info)
|
|||
return GetEncounters(pk, chain, info);
|
||||
}
|
||||
|
||||
public IEnumerable<IEncounterable> GetEncounters(PKM pk, EvoCriteria[] chain, LegalInfo info) => (GameVersion)pk.Version switch
|
||||
public IEnumerable<IEncounterable> GetEncounters(PKM pk, EvoCriteria[] chain, LegalInfo info) => pk.Version switch
|
||||
{
|
||||
GO => EncounterGeneratorGO.Instance.GetEncounters(pk, chain, info),
|
||||
PLA => EncounterGenerator8a.Instance.GetEncounters(pk, chain, info),
|
||||
BD or SP => EncounterGenerator8b.Instance.GetEncounters(pk, chain, info),
|
||||
SW when pk.Met_Location == LocationsHOME.SWLA => EncounterGenerator8a.Instance.GetEncounters(pk, chain, info),
|
||||
SW when pk.Met_Location == LocationsHOME.SWBD => EncounterGenerator8b.Instance.GetEncountersSWSH(pk, chain, BD),
|
||||
SH when pk.Met_Location == LocationsHOME.SHSP => EncounterGenerator8b.Instance.GetEncountersSWSH(pk, chain, SP),
|
||||
SW when pk.Met_Location == LocationsHOME.SWSL => EncounterGenerator9.Instance.GetEncountersSWSH(pk, chain, SL),
|
||||
SH when pk.Met_Location == LocationsHOME.SHVL => EncounterGenerator9.Instance.GetEncountersSWSH(pk, chain, VL),
|
||||
SW when pk.MetLocation == LocationsHOME.SWLA => EncounterGenerator8a.Instance.GetEncounters(pk, chain, info),
|
||||
SW when pk.MetLocation == LocationsHOME.SWBD => EncounterGenerator8b.Instance.GetEncountersSWSH(pk, chain, BD),
|
||||
SH when pk.MetLocation == LocationsHOME.SHSP => EncounterGenerator8b.Instance.GetEncountersSWSH(pk, chain, SP),
|
||||
SW when pk.MetLocation == LocationsHOME.SWSL => EncounterGenerator9.Instance.GetEncountersSWSH(pk, chain, SL),
|
||||
SH when pk.MetLocation == LocationsHOME.SHVL => EncounterGenerator9.Instance.GetEncountersSWSH(pk, chain, VL),
|
||||
_ => EncounterGenerator8.Instance.GetEncounters(pk, chain, info),
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ public sealed class EncounterGeneratorGO : IEncounterGenerator
|
|||
|
||||
public IEnumerable<IEncounterable> GetEncounters(PKM pk, EvoCriteria[] chain, LegalInfo info)
|
||||
{
|
||||
var loc = pk.Met_Location;
|
||||
var loc = pk.MetLocation;
|
||||
if (loc == Locations.GO7)
|
||||
return EncounterGenerator7GO.Instance.GetEncounters(pk, chain, info);
|
||||
if (loc == Locations.GO8 && pk is not PB7)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace PKHeX.Core;
|
|||
/// <summary>
|
||||
/// Object that can be fed to a <see cref="IEncounterConvertible"/> converter to ensure that the resulting <see cref="PKM"/> meets rough specifications.
|
||||
/// </summary>
|
||||
public sealed record EncounterCriteria : IFixedNature, IFixedGender, IFixedAbilityNumber, IShinyPotential
|
||||
public sealed record EncounterCriteria : IFixedNature, IFixedAbilityNumber, IShinyPotential
|
||||
{
|
||||
/// <summary>
|
||||
/// Default criteria with no restrictions (random) for all fields.
|
||||
|
|
@ -14,8 +14,8 @@ public sealed record EncounterCriteria : IFixedNature, IFixedGender, IFixedAbili
|
|||
public static readonly EncounterCriteria Unrestricted = new();
|
||||
|
||||
/// <summary> End result's gender. </summary>
|
||||
/// <remarks> Leave as -1 to not restrict gender. </remarks>
|
||||
public byte Gender { get; init; } = FixedGenderUtil.GenderRandom;
|
||||
/// <remarks> Leave as null to not restrict gender. </remarks>
|
||||
public byte? Gender { get; init; }
|
||||
|
||||
/// <summary> End result's ability numbers permitted. </summary>
|
||||
/// <remarks> Leave as <see cref="Any12H"/> to not restrict ability. </remarks>
|
||||
|
|
@ -48,13 +48,23 @@ public sealed record EncounterCriteria : IFixedNature, IFixedGender, IFixedAbili
|
|||
|
||||
private const int RandomIV = -1;
|
||||
|
||||
public bool IsSpecifiedNature() => Nature != Nature.Random;
|
||||
public bool IsSpecifiedTeraType() => TeraType != -1;
|
||||
|
||||
public bool IsSpecifiedIVs() => IV_HP != RandomIV
|
||||
&& IV_ATK != RandomIV
|
||||
&& IV_DEF != RandomIV
|
||||
&& IV_SPA != RandomIV
|
||||
&& IV_SPD != RandomIV
|
||||
&& IV_SPE != RandomIV;
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the IVs are compatible with the encounter's defined IV restrictions.
|
||||
/// </summary>
|
||||
/// <param name="encounterIVs">Encounter template's IV restrictions. Speed is last!</param>
|
||||
/// <param name="generation">Destination generation</param>
|
||||
/// <returns>True if compatible, false if incompatible.</returns>
|
||||
public bool IsIVsCompatibleSpeedLast(Span<int> encounterIVs, int generation)
|
||||
public bool IsIVsCompatibleSpeedLast(Span<int> encounterIVs, byte generation)
|
||||
{
|
||||
var IVs = encounterIVs;
|
||||
if (!ivCanMatch(IV_HP , IVs[0])) return false;
|
||||
|
|
@ -91,7 +101,7 @@ public static EncounterCriteria GetCriteria(IBattleTemplate s, IPersonalTable t)
|
|||
/// <returns>Initialized criteria data to be passed to generators.</returns>
|
||||
public static EncounterCriteria GetCriteria(IBattleTemplate s, IPersonalInfo pi) => new()
|
||||
{
|
||||
Gender = (byte)s.Gender,
|
||||
Gender = s.Gender,
|
||||
IV_HP = s.IVs[0],
|
||||
IV_ATK = s.IVs[1],
|
||||
IV_DEF = s.IVs[2],
|
||||
|
|
@ -146,27 +156,45 @@ public Nature GetNature()
|
|||
return (Nature)Util.Rand.Next(25);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if the <see cref="Gender"/> is specified.
|
||||
/// </summary>
|
||||
public bool IsGenderSpecified => Gender != null;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if the requested gender matches the criteria.
|
||||
/// </summary>
|
||||
public bool IsGenderSatisfied(byte gender) => !IsGenderSpecified || gender == Gender;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the gender to generate, random if unspecified by the template or criteria.
|
||||
/// </summary>
|
||||
public int GetGender(int gender, IGenderDetail pkPersonalInfo)
|
||||
public byte GetGender(byte gender, IGenderDetail pkPersonalInfo)
|
||||
{
|
||||
if ((uint)gender < 3)
|
||||
return gender;
|
||||
return GetGender(pkPersonalInfo);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="GetGender(byte, IGenderDetail)"/>
|
||||
public byte GetGender(Gender gender, IGenderDetail pkPersonalInfo)
|
||||
{
|
||||
if (gender == Core.Gender.Random)
|
||||
return GetGender(pkPersonalInfo);
|
||||
return (byte)gender;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the gender to generate, random if unspecified.
|
||||
/// </summary>
|
||||
public int GetGender(IGenderDetail pkPersonalInfo)
|
||||
public byte GetGender(IGenderDetail pkPersonalInfo)
|
||||
{
|
||||
if (!pkPersonalInfo.IsDualGender)
|
||||
return pkPersonalInfo.FixedGender();
|
||||
if (pkPersonalInfo.Genderless)
|
||||
return 2;
|
||||
if (Gender is 0 or 1)
|
||||
return Gender;
|
||||
if (Gender is { } request and (0 or 1))
|
||||
return request;
|
||||
return pkPersonalInfo.RandomGender();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,10 +67,14 @@ public static void FindVerifiedEncounter(PKM pk, LegalInfo info)
|
|||
break;
|
||||
}
|
||||
|
||||
if (info is { FrameMatches: false }) // if false, all valid RNG frame matches have already been consumed
|
||||
info.Parse.Add(new CheckResult(ParseSettings.RNGFrameNotFound, CheckIdentifier.PID, LEncConditionBadRNGFrame)); // todo for further confirmation
|
||||
if (!info.PIDIVMatches) // if false, all valid PIDIV matches have already been consumed
|
||||
info.Parse.Add(new CheckResult(Severity.Invalid, CheckIdentifier.PID, LPIDTypeMismatch));
|
||||
var manual = info.ManualFlag;
|
||||
if (manual != EncounterYieldFlag.None)
|
||||
{
|
||||
if (!info.FrameMatches) // if false, all valid RNG frame matches have already been consumed
|
||||
info.Parse.Add(new CheckResult(info.Generation == 3 ? ParseSettings.RNGFrameNotFound3 : ParseSettings.RNGFrameNotFound4, CheckIdentifier.PID, LEncConditionBadRNGFrame));
|
||||
else if (!info.PIDIVMatches) // if false, all valid PIDIV matches have already been consumed
|
||||
info.Parse.Add(new CheckResult(Severity.Invalid, CheckIdentifier.PID, LPIDTypeMismatch));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -115,14 +119,14 @@ private static bool VerifySecondaryChecks(PKM pk, LegalInfo info, PeekEnumerator
|
|||
// Memories of Knowing a move which is later forgotten can be problematic with encounters that have special moves.
|
||||
if (pk is ITrainerMemories m)
|
||||
{
|
||||
if (m is IMemoryOT o && MemoryPermissions.IsMemoryOfKnownMove(o.OT_Memory))
|
||||
if (m is IMemoryOT o && MemoryPermissions.IsMemoryOfKnownMove(o.OriginalTrainerMemory))
|
||||
{
|
||||
var mem = MemoryVariableSet.Read(m, 0);
|
||||
bool valid = MemoryPermissions.CanKnowMove(pk, mem, info.EncounterMatch.Context, info);
|
||||
if (!valid && iterator.PeekIsNext())
|
||||
return false;
|
||||
}
|
||||
if (m is IMemoryHT h && MemoryPermissions.IsMemoryOfKnownMove(h.HT_Memory) && !pk.HasMove(h.HT_TextVar))
|
||||
if (m is IMemoryHT h && MemoryPermissions.IsMemoryOfKnownMove(h.HandlingTrainerMemory) && !pk.HasMove(h.HandlingTrainerMemoryVariable))
|
||||
{
|
||||
var mem = MemoryVariableSet.Read(m, 1);
|
||||
|
||||
|
|
@ -167,9 +171,9 @@ private static void VerifyWithoutEncounter(PKM pk, LegalInfo info)
|
|||
LearnVerifier.Verify(info.Moves, pk, info.EncounterMatch, info.EvoChainsAllGens);
|
||||
}
|
||||
|
||||
private static string GetHintWhyNotFound(PKM pk, int generation)
|
||||
private static string GetHintWhyNotFound(PKM pk, byte generation)
|
||||
{
|
||||
if (WasGiftEgg(pk, generation, (ushort)pk.Egg_Location))
|
||||
if (WasGiftEgg(pk, generation, pk.EggLocation))
|
||||
return LEncGift;
|
||||
if (WasEventEgg(pk, generation))
|
||||
return LEncGiftEggEvent;
|
||||
|
|
@ -178,29 +182,29 @@ private static string GetHintWhyNotFound(PKM pk, int generation)
|
|||
return LEncInvalid;
|
||||
}
|
||||
|
||||
private static bool WasGiftEgg(PKM pk, int generation, ushort eggLocation) => !pk.FatefulEncounter && generation switch
|
||||
private static bool WasGiftEgg(PKM pk, byte generation, ushort eggLocation) => !pk.FatefulEncounter && generation switch
|
||||
{
|
||||
3 => pk.IsEgg && (byte)pk.Met_Location == 253, // Gift Egg, indistinguishable from normal eggs after hatch
|
||||
3 => pk.IsEgg && (byte)pk.MetLocation == 253, // Gift Egg, indistinguishable from normal eggs after hatch
|
||||
4 => eggLocation - 2009u <= (2014 - 2009) || (pk.Format != 4 && (eggLocation == Locations.Faraway4 && pk.HGSS)),
|
||||
5 => eggLocation is Locations.Breeder5,
|
||||
_ => eggLocation is Locations.Breeder6,
|
||||
};
|
||||
|
||||
private static bool WasEventEgg(PKM pk, int gen) => gen switch
|
||||
private static bool WasEventEgg(PKM pk, byte generation) => generation switch
|
||||
{
|
||||
// Event Egg, indistinguishable from normal eggs after hatch
|
||||
// can't tell after transfer
|
||||
3 => pk is { Context: EntityContext.Gen3, IsEgg: true } && Locations.IsEventLocation3(pk.Met_Location),
|
||||
3 => pk is { Context: EntityContext.Gen3, IsEgg: true } && Locations.IsEventLocation3(pk.MetLocation),
|
||||
|
||||
// Manaphy was the only generation 4 released event egg
|
||||
_ => pk.FatefulEncounter && pk.Egg_Day != 0,
|
||||
_ => pk.FatefulEncounter && pk.EggDay != 0,
|
||||
};
|
||||
|
||||
private static bool WasEvent(PKM pk, int gen) => pk.FatefulEncounter || gen switch
|
||||
private static bool WasEvent(PKM pk, byte generation) => pk.FatefulEncounter || generation switch
|
||||
{
|
||||
3 => Locations.IsEventLocation3(pk.Met_Location) && pk.Format == 3,
|
||||
4 => Locations.IsEventLocation4(pk.Met_Location) && pk.Format == 4,
|
||||
>=5 => Locations.IsEventLocation5(pk.Met_Location),
|
||||
3 => Locations.IsEventLocation3(pk.MetLocation) && pk.Format == 3,
|
||||
4 => Locations.IsEventLocation4(pk.MetLocation) && pk.Format == 4,
|
||||
>=5 => Locations.IsEventLocation5(pk.MetLocation),
|
||||
_ => false,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public static class EncounterGenerator
|
|||
{
|
||||
1 => EncounterGenerator12.Instance.GetEncounters(pk, info),
|
||||
2 => EncounterGenerator12.Instance.GetEncounters(pk, info),
|
||||
3 => pk.Version == (int)GameVersion.CXD
|
||||
3 => pk.Version == GameVersion.CXD
|
||||
? EncounterGenerator3GC.Instance.GetEncounters(pk, info)
|
||||
: EncounterGenerator3.Instance.GetEncounters(pk, info),
|
||||
4 => EncounterGenerator4.Instance.GetEncounters(pk, info),
|
||||
|
|
@ -44,7 +44,7 @@ public static class EncounterGenerator
|
|||
/// </summary>
|
||||
/// <param name="version">Original encounter version</param>
|
||||
/// <param name="generation">Generation group</param>
|
||||
public static IEncounterGenerator GetGeneration(GameVersion version, int generation) => generation switch
|
||||
public static IEncounterGenerator GetGeneration(GameVersion version, byte generation) => generation switch
|
||||
{
|
||||
1 => EncounterGenerator1.Instance,
|
||||
2 => EncounterGenerator2.Instance,
|
||||
|
|
|
|||
|
|
@ -38,9 +38,9 @@ public static IEnumerable<IEncounterable> GenerateEncounters(PKM pk, ITrainerInf
|
|||
|
||||
OptimizeCriteria(pk, info);
|
||||
var vers = versions.Length >= 1 ? versions : GameUtil.GetVersionsWithinRange(pk, pk.Format);
|
||||
foreach (var ver in vers)
|
||||
foreach (var version in vers)
|
||||
{
|
||||
var encounters = GenerateVersionEncounters(pk, moves, ver);
|
||||
var encounters = GenerateVersionEncounters(pk, moves, version);
|
||||
foreach (var enc in encounters)
|
||||
yield return enc;
|
||||
}
|
||||
|
|
@ -54,7 +54,7 @@ public static IEnumerable<IEncounterable> GenerateEncounters(PKM pk, ITrainerInf
|
|||
public static void OptimizeCriteria(PKM pk, ITrainerID32 info)
|
||||
{
|
||||
pk.ID32 = info.ID32; // Necessary for Gen2 Headbutt encounters and Honey Tree encounters
|
||||
var htTrash = pk.HT_Trash;
|
||||
var htTrash = pk.HandlingTrainerTrash;
|
||||
if (htTrash.Length != 0)
|
||||
htTrash[0] = 1; // Fake Trash to indicate trading.
|
||||
}
|
||||
|
|
@ -66,7 +66,7 @@ public static void OptimizeCriteria(PKM pk, ITrainerID32 info)
|
|||
/// <param name="generation">Specific generation to iterate versions for.</param>
|
||||
/// <param name="moves">Moves that the resulting <see cref="IEncounterable"/> must be able to learn.</param>
|
||||
/// <returns>A consumable <see cref="IEncounterable"/> list of possible encounters.</returns>
|
||||
public static IEnumerable<IEncounterable> GenerateEncounter(PKM pk, int generation, ReadOnlyMemory<ushort> moves)
|
||||
public static IEnumerable<IEncounterable> GenerateEncounter(PKM pk, byte generation, ReadOnlyMemory<ushort> moves)
|
||||
{
|
||||
var vers = GameUtil.GetVersionsInGeneration(generation, pk.Version);
|
||||
return GenerateEncounters(pk, moves, vers);
|
||||
|
|
@ -92,9 +92,9 @@ public static IEnumerable<IEncounterable> GenerateEncounters(PKM pk, ReadOnlyMem
|
|||
}
|
||||
|
||||
var vers = GameUtil.GetVersionsWithinRange(pk, pk.Format);
|
||||
foreach (var ver in vers)
|
||||
foreach (var version in vers)
|
||||
{
|
||||
foreach (var enc in GenerateVersionEncounters(pk, moves, ver))
|
||||
foreach (var enc in GenerateVersionEncounters(pk, moves, version))
|
||||
yield return enc;
|
||||
}
|
||||
}
|
||||
|
|
@ -111,9 +111,9 @@ public static IEnumerable<IEncounterable> GenerateEncounters(PKM pk, ReadOnlyMem
|
|||
if (!IsSane(pk, moves.Span))
|
||||
yield break;
|
||||
|
||||
foreach (var ver in vers)
|
||||
foreach (var version in vers)
|
||||
{
|
||||
foreach (var enc in GenerateVersionEncounters(pk, moves, ver))
|
||||
foreach (var enc in GenerateVersionEncounters(pk, moves, version))
|
||||
yield return enc;
|
||||
}
|
||||
}
|
||||
|
|
@ -127,9 +127,9 @@ public static IEnumerable<IEncounterable> GenerateEncounters(PKM pk, ReadOnlyMem
|
|||
/// <returns>A consumable <see cref="IEncounterable"/> list of possible encounters.</returns>
|
||||
private static IEnumerable<IEncounterable> GenerateVersionEncounters(PKM pk, ReadOnlyMemory<ushort> moves, GameVersion version)
|
||||
{
|
||||
pk.Version = (byte)version;
|
||||
pk.Version = version;
|
||||
var context = version.GetContext();
|
||||
var generation = (byte)version.GetGeneration();
|
||||
var generation = version.GetGeneration();
|
||||
foreach (var enc in GenerateVersionEncounters(pk, moves, version, generation, context))
|
||||
yield return enc;
|
||||
|
||||
|
|
@ -145,7 +145,7 @@ private static IEnumerable<IEncounterable> GenerateVersionEncounters(PKM pk, Rea
|
|||
|
||||
private static IEnumerable<IEncounterable> GenerateVersionEncounters(PKM pk, ReadOnlyMemory<ushort> moves, GameVersion version, byte generation, EntityContext context)
|
||||
{
|
||||
var origin = new EvolutionOrigin(pk.Species, (byte)version, generation, 1, 100, OriginOptions.EncounterTemplate);
|
||||
var origin = new EvolutionOrigin(pk.Species, version, generation, 1, 100, OriginOptions.EncounterTemplate);
|
||||
var chain = EvolutionChain.GetOriginChain(pk, origin);
|
||||
if (chain.Length == 0)
|
||||
yield break;
|
||||
|
|
@ -193,7 +193,7 @@ private static bool IsPlausibleSmeargleMoveset(EntityContext context, ReadOnlySp
|
|||
return true;
|
||||
}
|
||||
|
||||
private readonly record struct NeededEncounter(EntityContext Context, int Generation, GameVersion Version)
|
||||
private readonly record struct NeededEncounter(EntityContext Context, byte Generation, GameVersion Version)
|
||||
: IEncounterTemplate
|
||||
{
|
||||
public bool EggEncounter => false;
|
||||
|
|
@ -205,7 +205,7 @@ private static bool IsPlausibleSmeargleMoveset(EntityContext context, ReadOnlySp
|
|||
public bool IsShiny => false;
|
||||
}
|
||||
|
||||
private static ushort[] GetNeededMoves(PKM pk, ReadOnlySpan<ushort> moves, GameVersion ver, int generation, EntityContext context)
|
||||
private static ushort[] GetNeededMoves(PKM pk, ReadOnlySpan<ushort> moves, GameVersion version, byte generation, EntityContext context)
|
||||
{
|
||||
if (pk.Species == (int)Species.Smeargle)
|
||||
return [];
|
||||
|
|
@ -213,9 +213,9 @@ private static ushort[] GetNeededMoves(PKM pk, ReadOnlySpan<ushort> moves, GameV
|
|||
var length = pk.MaxMoveID + 1;
|
||||
var rent = ArrayPool<bool>.Shared.Rent(length);
|
||||
var permitted = rent.AsSpan(0, length);
|
||||
var enc = new EvolutionOrigin(pk.Species, (byte)ver, (byte)generation, 1, 100, OriginOptions.EncounterTemplate);
|
||||
var enc = new EvolutionOrigin(pk.Species, version, generation, 1, 100, OriginOptions.EncounterTemplate);
|
||||
var history = EvolutionChain.GetEvolutionChainsSearch(pk, enc, context, 0);
|
||||
var e = new NeededEncounter(context, generation, ver); // default empty
|
||||
var e = new NeededEncounter(context, generation, version); // default empty
|
||||
LearnPossible.Get(pk, e, history, permitted);
|
||||
|
||||
int ctr = 0; // count of moves that can be learned
|
||||
|
|
|
|||
|
|
@ -61,8 +61,8 @@ public bool MoveNext()
|
|||
|
||||
case YieldState.Bred:
|
||||
// try with specific version, for yielded metadata purposes.
|
||||
var ver = Version is GameVersion.GD or GameVersion.SI ? Version : GameVersion.GS;
|
||||
if (!EncounterGenerator2.TryGetEgg(Chain, ver, out var egg))
|
||||
var version = Version is GameVersion.GD or GameVersion.SI ? Version : GameVersion.GS;
|
||||
if (!EncounterGenerator2.TryGetEgg(Chain, version, out var egg))
|
||||
goto case YieldState.TradeStart;
|
||||
State = ParseSettings.AllowGen2Crystal(Entity) ? YieldState.BredCrystal : YieldState.TradeStart;
|
||||
return SetCurrent(egg);
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ private bool TryGetNext(EncounterArea4[] areas)
|
|||
for (; Index < db.Length;)
|
||||
{
|
||||
var enc = db[Index++];
|
||||
if (!enc.CanBeReceivedByVersion((int)Version))
|
||||
if (!enc.CanBeReceivedByVersion(Version))
|
||||
continue;
|
||||
foreach (var evo in Chain)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ public bool MoveNext()
|
|||
for (; Index < db.Length;)
|
||||
{
|
||||
var enc = db[Index++];
|
||||
if (!enc.CanBeReceivedByVersion((int)Version))
|
||||
if (!enc.CanBeReceivedByVersion(Version))
|
||||
continue;
|
||||
foreach (var evo in Chain)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ public bool MoveNext()
|
|||
for (; Index < db.Length;)
|
||||
{
|
||||
var enc = db[Index++];
|
||||
if (!enc.CanBeReceivedByVersion((int)Version))
|
||||
if (!enc.CanBeReceivedByVersion(Version))
|
||||
continue;
|
||||
foreach (var evo in Chain)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ public bool MoveNext()
|
|||
for (; Index < db.Length;)
|
||||
{
|
||||
var enc = db[Index++];
|
||||
if (!enc.CanBeReceivedByVersion((int)Version))
|
||||
if (!enc.CanBeReceivedByVersion(Version))
|
||||
continue;
|
||||
foreach (var evo in Chain)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ public bool MoveNext()
|
|||
for (; Index < db.Length;)
|
||||
{
|
||||
var enc = db[Index++];
|
||||
if (!enc.CanBeReceivedByVersion((int)Version))
|
||||
if (!enc.CanBeReceivedByVersion(Version))
|
||||
continue;
|
||||
foreach (var evo in Chain)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public record struct EncounterEnumerator8bSWSH(PKM Entity, EvoCriteria[] Chain,
|
|||
private bool Yielded;
|
||||
public MatchedEncounter<IEncounterable> Current { get; private set; }
|
||||
private YieldState State;
|
||||
private int met;
|
||||
private ushort met;
|
||||
private bool hasOriginalLocation;
|
||||
private bool mustBeWild;
|
||||
readonly object IEnumerator.Current => Current;
|
||||
|
|
@ -152,23 +152,23 @@ public bool MoveNext()
|
|||
return false;
|
||||
}
|
||||
|
||||
private readonly bool WasBredEggBDSP() => Entity.Met_Level == EggStateLegality.EggMetLevel && Entity.Egg_Location switch
|
||||
private readonly bool WasBredEggBDSP() => Entity.MetLevel == EggStateLegality.EggMetLevel && Entity.EggLocation switch
|
||||
{
|
||||
LocationsHOME.SWSHEgg => true, // Regular hatch location (not link trade)
|
||||
LocationsHOME.SWBD => Entity.Met_Location == LocationsHOME.SWBD, // Link Trade transferred over must match Met Location
|
||||
LocationsHOME.SHSP => Entity.Met_Location == LocationsHOME.SHSP, // Link Trade transferred over must match Met Location
|
||||
LocationsHOME.SWBD => Entity.MetLocation == LocationsHOME.SWBD, // Link Trade transferred over must match Met Location
|
||||
LocationsHOME.SHSP => Entity.MetLocation == LocationsHOME.SHSP, // Link Trade transferred over must match Met Location
|
||||
_ => false,
|
||||
};
|
||||
|
||||
private void InitializeWildLocationInfo()
|
||||
{
|
||||
mustBeWild = Entity.Ball == (byte)Ball.Safari;
|
||||
met = Entity.Met_Location;
|
||||
met = Entity.MetLocation;
|
||||
var location = met;
|
||||
var remap = LocationsHOME.GetRemapState(EntityContext.Gen8b, Entity.Context);
|
||||
hasOriginalLocation = true;
|
||||
if (remap.HasFlag(LocationRemapState.Remapped))
|
||||
hasOriginalLocation = location != LocationsHOME.GetMetSWSH((ushort)location, (int)Version);
|
||||
hasOriginalLocation = location != LocationsHOME.GetMetSWSH(location, Version);
|
||||
}
|
||||
|
||||
private bool TryGetNext<TArea, TSlot>(TArea[] areas)
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public record struct EncounterEnumerator9SWSH(PKM Entity, EvoCriteria[] Chain, G
|
|||
private bool Yielded;
|
||||
public MatchedEncounter<IEncounterable> Current { get; private set; }
|
||||
private YieldState State;
|
||||
//private int met;
|
||||
//private ushort met;
|
||||
private bool mustBeSlot;
|
||||
readonly object IEnumerator.Current => Current;
|
||||
|
||||
|
|
@ -80,7 +80,7 @@ public bool MoveNext()
|
|||
goto case YieldState.TradeStart;
|
||||
|
||||
case YieldState.TradeStart:
|
||||
//if (Entity.Met_Location == Locations.LinkTrade6NPC)
|
||||
//if (Entity.MetLocation == Locations.LinkTrade6NPC)
|
||||
// goto case YieldState.Trade;
|
||||
goto case YieldState.StartCaptures;
|
||||
case YieldState.Trade:
|
||||
|
|
@ -170,18 +170,18 @@ public bool MoveNext()
|
|||
return false;
|
||||
}
|
||||
|
||||
private readonly bool WasBredEggSWSH() => Entity.Met_Level == EggStateLegality.EggMetLevel && Entity.Egg_Location switch
|
||||
private readonly bool WasBredEggSWSH() => Entity.MetLevel == EggStateLegality.EggMetLevel && Entity.EggLocation switch
|
||||
{
|
||||
LocationsHOME.SWSHEgg => true, // Regular hatch location (not link trade)
|
||||
LocationsHOME.SWSL => Entity.Met_Location == LocationsHOME.SWSL, // Link Trade transferred over must match Met Location
|
||||
LocationsHOME.SHVL => Entity.Met_Location == LocationsHOME.SHVL, // Link Trade transferred over must match Met Location
|
||||
LocationsHOME.SWSL => Entity.MetLocation == LocationsHOME.SWSL, // Link Trade transferred over must match Met Location
|
||||
LocationsHOME.SHVL => Entity.MetLocation == LocationsHOME.SHVL, // Link Trade transferred over must match Met Location
|
||||
_ => false,
|
||||
};
|
||||
|
||||
private void InitializeWildLocationInfo()
|
||||
{
|
||||
mustBeSlot = Entity is IRibbonIndex r && r.HasEncounterMark();
|
||||
//met = Entity.Met_Location;
|
||||
//met = Entity.MetLocation;
|
||||
}
|
||||
|
||||
private bool TryGetNext<TArea, TSlot>(TArea[] areas)
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public record struct EncounterEnumerator2 : IEnumerator<MatchedEncounter<IEncoun
|
|||
private YieldState State;
|
||||
private readonly PKM Entity;
|
||||
private readonly EvoCriteria[] Chain;
|
||||
private readonly int met;
|
||||
private readonly ushort met;
|
||||
private readonly bool hasOriginalMet;
|
||||
private readonly bool canOriginateCrystal;
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ public EncounterEnumerator2(PKM pk, EvoCriteria[] chain)
|
|||
{
|
||||
canOriginateCrystal = true;
|
||||
hasOriginalMet = true;
|
||||
met = c2.Met_Location;
|
||||
met = c2.MetLocation;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -116,7 +116,7 @@ public bool MoveNext()
|
|||
case YieldState.StaticC:
|
||||
if (TryGetNext(Encounters2.StaticC))
|
||||
return true;
|
||||
if (hasOriginalMet || Entity.OT_Gender == 1)
|
||||
if (hasOriginalMet || Entity.OriginalTrainerGender == 1)
|
||||
{ Index = 0; State = YieldState.StaticShared; goto case YieldState.StaticShared; }
|
||||
Index = 0; State = YieldState.StaticGD; goto case YieldState.StaticGD;
|
||||
case YieldState.StaticGD:
|
||||
|
|
@ -143,7 +143,7 @@ public bool MoveNext()
|
|||
case YieldState.SlotC:
|
||||
if (TryGetNextLocation<EncounterArea2, EncounterSlot2>(Encounters2.SlotsC))
|
||||
return true;
|
||||
if (hasOriginalMet || Entity.OT_Gender == 1)
|
||||
if (hasOriginalMet || Entity.OriginalTrainerGender == 1)
|
||||
{ Index = 0; goto case YieldState.SlotEnd; }
|
||||
Index = 0; State = YieldState.SlotGD; goto case YieldState.SlotGD;
|
||||
case YieldState.SlotGD:
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ public record struct EncounterEnumerator3(PKM Entity, EvoCriteria[] Chain, GameV
|
|||
private EncounterMatchRating Rating = EncounterMatchRating.MaxNotMatch;
|
||||
public MatchedEncounter<IEncounterable> Current { get; private set; }
|
||||
private YieldState State;
|
||||
private int met;
|
||||
private ushort met;
|
||||
private bool mustBeSlot;
|
||||
private bool hasOriginalLocation;
|
||||
|
||||
|
|
@ -244,7 +244,7 @@ public bool MoveNext()
|
|||
|
||||
private void InitializeWildLocationInfo()
|
||||
{
|
||||
met = Entity.Met_Location;
|
||||
met = Entity.MetLocation;
|
||||
mustBeSlot = Entity.Ball is (int)Ball.Safari; // never static
|
||||
hasOriginalLocation = Entity.Format == 3;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ public record struct EncounterEnumerator3GC(PKM Entity, EvoCriteria[] Chain) : I
|
|||
private EncounterMatchRating Rating = EncounterMatchRating.MaxNotMatch;
|
||||
public MatchedEncounter<IEncounterable> Current { get; private set; }
|
||||
private YieldState State;
|
||||
private int met;
|
||||
private ushort met;
|
||||
private bool hasOriginalLocation;
|
||||
|
||||
readonly object IEnumerator.Current => Current;
|
||||
|
|
@ -103,7 +103,7 @@ public bool MoveNext()
|
|||
|
||||
private void InitializeWildLocationInfo()
|
||||
{
|
||||
met = Entity.Met_Location;
|
||||
met = Entity.MetLocation;
|
||||
hasOriginalLocation = Entity.Format == 3;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public record struct EncounterEnumerator4(PKM Entity, EvoCriteria[] Chain, GameV
|
|||
private bool Yielded;
|
||||
public MatchedEncounter<IEncounterable> Current { get; private set; }
|
||||
private YieldState State;
|
||||
private int met;
|
||||
private ushort met;
|
||||
private bool mustBeSlot;
|
||||
private bool hasOriginalLocation;
|
||||
|
||||
|
|
@ -98,7 +98,7 @@ public bool MoveNext()
|
|||
Index = 0; goto case YieldState.Bred;
|
||||
|
||||
case YieldState.Bred:
|
||||
if (!Locations.IsEggLocationBred4(Entity.Egg_Location, Version))
|
||||
if (!Locations.IsEggLocationBred4(Entity.EggLocation, Version))
|
||||
goto case YieldState.TradeStart;
|
||||
if (!EncounterGenerator4.TryGetEgg(Chain, Version, out var egg))
|
||||
goto case YieldState.TradeStart;
|
||||
|
|
@ -241,8 +241,8 @@ public bool MoveNext()
|
|||
|
||||
private void InitializeWildLocationInfo()
|
||||
{
|
||||
met = Entity.Met_Location;
|
||||
mustBeSlot = Entity is { Egg_Location: 0, Ball: (int)Ball.Sport or (int)Ball.Safari }; // never static
|
||||
met = Entity.MetLocation;
|
||||
mustBeSlot = Entity is { EggLocation: 0, Ball: (int)Ball.Sport or (int)Ball.Safari }; // never static
|
||||
hasOriginalLocation = Entity.Format == 4;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public record struct EncounterEnumerator5(PKM Entity, EvoCriteria[] Chain, GameV
|
|||
private bool Yielded;
|
||||
public MatchedEncounter<IEncounterable> Current { get; private set; }
|
||||
private YieldState State;
|
||||
private int met;
|
||||
private ushort met;
|
||||
readonly object IEnumerator.Current => Current;
|
||||
|
||||
public readonly void Reset() => throw new NotSupportedException();
|
||||
|
|
@ -73,7 +73,7 @@ public bool MoveNext()
|
|||
if (Chain.Length == 0)
|
||||
break;
|
||||
|
||||
if (Entity.Met_Location == Locations.LinkTrade5NPC)
|
||||
if (Entity.MetLocation == Locations.LinkTrade5NPC)
|
||||
goto case YieldState.TradeStart;
|
||||
if (!Entity.FatefulEncounter)
|
||||
goto case YieldState.Bred;
|
||||
|
|
@ -91,14 +91,14 @@ public bool MoveNext()
|
|||
Index = 0; goto case YieldState.Bred;
|
||||
|
||||
case YieldState.Bred:
|
||||
if (!Locations.IsEggLocationBred5(Entity.Egg_Location))
|
||||
if (!Locations.IsEggLocationBred5(Entity.EggLocation))
|
||||
goto case YieldState.StartCaptures;
|
||||
if (!EncounterGenerator5.TryGetEgg(Chain, Version, out var egg))
|
||||
goto case YieldState.StartCaptures;
|
||||
State = YieldState.BredSplit;
|
||||
return SetCurrent(egg);
|
||||
case YieldState.BredSplit:
|
||||
bool daycare = Entity.Egg_Location == Locations.Daycare5;
|
||||
bool daycare = Entity.EggLocation == Locations.Daycare5;
|
||||
State = daycare ? YieldState.End : YieldState.StartCaptures;
|
||||
if (EncounterGenerator5.TryGetSplit((EncounterEgg)Current.Encounter, Chain, out egg))
|
||||
return SetCurrent(egg);
|
||||
|
|
@ -259,7 +259,7 @@ public bool MoveNext()
|
|||
|
||||
private void InitializeWildLocationInfo()
|
||||
{
|
||||
met = Entity.Met_Location;
|
||||
met = Entity.MetLocation;
|
||||
}
|
||||
|
||||
private bool TryGetNext<TArea, TSlot>(TArea[] areas)
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public record struct EncounterEnumerator6(PKM Entity, EvoCriteria[] Chain, GameV
|
|||
private bool Yielded;
|
||||
public MatchedEncounter<IEncounterable> Current { get; private set; }
|
||||
private YieldState State;
|
||||
private int met;
|
||||
private ushort met;
|
||||
readonly object IEnumerator.Current => Current;
|
||||
|
||||
public readonly void Reset() => throw new NotSupportedException();
|
||||
|
|
@ -66,10 +66,10 @@ public bool MoveNext()
|
|||
if (Chain.Length == 0)
|
||||
break;
|
||||
|
||||
if (Entity.Met_Location == Locations.LinkTrade6NPC)
|
||||
if (Entity.MetLocation == Locations.LinkTrade6NPC)
|
||||
goto case YieldState.TradeStart;
|
||||
|
||||
if (Entity.FatefulEncounter || Entity.Met_Location == Locations.LinkGift6)
|
||||
if (Entity.FatefulEncounter || Entity.MetLocation == Locations.LinkGift6)
|
||||
{ State = YieldState.Event; goto case YieldState.Event; }
|
||||
goto case YieldState.Bred;
|
||||
|
||||
|
|
@ -85,7 +85,7 @@ public bool MoveNext()
|
|||
Index = 0; goto case YieldState.Bred;
|
||||
|
||||
case YieldState.Bred:
|
||||
if (!Locations.IsEggLocationBred6(Entity.Egg_Location))
|
||||
if (!Locations.IsEggLocationBred6(Entity.EggLocation))
|
||||
goto case YieldState.StartCaptures;
|
||||
if (!EncounterGenerator6.TryGetEgg(Chain, Version, out var egg))
|
||||
break;
|
||||
|
|
@ -93,7 +93,7 @@ public bool MoveNext()
|
|||
return SetCurrent(egg);
|
||||
case YieldState.BredTrade:
|
||||
State = YieldState.BredSplit;
|
||||
if (Entity.Egg_Location != Locations.LinkTrade6)
|
||||
if (Entity.EggLocation != Locations.LinkTrade6)
|
||||
goto case YieldState.BredSplit;
|
||||
egg = EncounterGenerator6.MutateEggTrade((EncounterEgg)Current.Encounter);
|
||||
return SetCurrent(egg);
|
||||
|
|
@ -106,7 +106,7 @@ public bool MoveNext()
|
|||
return SetCurrent(egg);
|
||||
case YieldState.BredSplitTrade:
|
||||
State = YieldState.StartCaptures;
|
||||
if (Entity.Egg_Location != Locations.LinkTrade6)
|
||||
if (Entity.EggLocation != Locations.LinkTrade6)
|
||||
goto case YieldState.StartCaptures;
|
||||
egg = EncounterGenerator6.MutateEggTrade((EncounterEgg)Current.Encounter);
|
||||
return SetCurrent(egg);
|
||||
|
|
@ -213,7 +213,7 @@ public bool MoveNext()
|
|||
|
||||
private void InitializeWildLocationInfo()
|
||||
{
|
||||
met = Entity.Met_Location;
|
||||
met = Entity.MetLocation;
|
||||
}
|
||||
|
||||
private bool TryGetNext<TArea, TSlot>(TArea[] areas)
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public record struct EncounterEnumerator7(PKM Entity, EvoCriteria[] Chain, GameV
|
|||
private bool Yielded;
|
||||
public MatchedEncounter<IEncounterable> Current { get; private set; }
|
||||
private YieldState State;
|
||||
private int met;
|
||||
private ushort met;
|
||||
readonly object IEnumerator.Current => Current;
|
||||
|
||||
public readonly void Reset() => throw new NotSupportedException();
|
||||
|
|
@ -66,7 +66,7 @@ public bool MoveNext()
|
|||
if (Chain.Length == 0)
|
||||
break;
|
||||
|
||||
if (Entity.Met_Location == Locations.LinkTrade6NPC)
|
||||
if (Entity.MetLocation == Locations.LinkTrade6NPC)
|
||||
goto case YieldState.TradeStart;
|
||||
if (!Entity.FatefulEncounter)
|
||||
goto case YieldState.Bred;
|
||||
|
|
@ -84,7 +84,7 @@ public bool MoveNext()
|
|||
Index = 0; goto case YieldState.Bred;
|
||||
|
||||
case YieldState.Bred:
|
||||
if (!Locations.IsEggLocationBred6(Entity.Egg_Location))
|
||||
if (!Locations.IsEggLocationBred6(Entity.EggLocation))
|
||||
goto case YieldState.StartCaptures;
|
||||
if (!EncounterGenerator7.TryGetEgg(Chain, Version, out var egg))
|
||||
goto case YieldState.StartCaptures;
|
||||
|
|
@ -92,7 +92,7 @@ public bool MoveNext()
|
|||
return SetCurrent(egg);
|
||||
case YieldState.BredTrade:
|
||||
State = YieldState.BredSplit;
|
||||
if (Entity.Egg_Location != Locations.LinkTrade6)
|
||||
if (Entity.EggLocation != Locations.LinkTrade6)
|
||||
goto case YieldState.BredSplit;
|
||||
egg = EncounterGenerator7.MutateEggTrade((EncounterEgg)Current.Encounter);
|
||||
return SetCurrent(egg);
|
||||
|
|
@ -105,7 +105,7 @@ public bool MoveNext()
|
|||
return SetCurrent(egg);
|
||||
case YieldState.BredSplitTrade:
|
||||
State = YieldState.End;
|
||||
if (Entity.Egg_Location != Locations.LinkTrade6)
|
||||
if (Entity.EggLocation != Locations.LinkTrade6)
|
||||
break;
|
||||
egg = EncounterGenerator7.MutateEggTrade((EncounterEgg)Current.Encounter);
|
||||
return SetCurrent(egg);
|
||||
|
|
@ -212,7 +212,7 @@ public bool MoveNext()
|
|||
|
||||
private void InitializeWildLocationInfo()
|
||||
{
|
||||
met = Entity.Met_Location;
|
||||
met = Entity.MetLocation;
|
||||
}
|
||||
|
||||
private bool TryGetNext<TArea, TSlot>(TArea[] areas)
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public record struct EncounterEnumerator7GG(PKM Entity, EvoCriteria[] Chain, Gam
|
|||
private bool Yielded;
|
||||
public MatchedEncounter<IEncounterable> Current { get; private set; }
|
||||
private YieldState State;
|
||||
private int met;
|
||||
private ushort met;
|
||||
readonly object IEnumerator.Current => Current;
|
||||
|
||||
public readonly void Reset() => throw new NotSupportedException();
|
||||
|
|
@ -145,7 +145,7 @@ public bool MoveNext()
|
|||
|
||||
private void InitializeWildLocationInfo()
|
||||
{
|
||||
met = Entity.Met_Location;
|
||||
met = Entity.MetLocation;
|
||||
}
|
||||
|
||||
private bool TryGetNext<TArea, TSlot>(TArea[] areas)
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public record struct EncounterEnumerator8(PKM Entity, EvoCriteria[] Chain, GameV
|
|||
private bool Yielded;
|
||||
public MatchedEncounter<IEncounterable> Current { get; private set; }
|
||||
private YieldState State;
|
||||
private int met;
|
||||
private ushort met;
|
||||
private bool mustBeSlot;
|
||||
readonly object IEnumerator.Current => Current;
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ public bool MoveNext()
|
|||
if (Chain.Length == 0)
|
||||
break;
|
||||
|
||||
if (Entity.Met_Location == Locations.LinkTrade6NPC)
|
||||
if (Entity.MetLocation == Locations.LinkTrade6NPC)
|
||||
goto case YieldState.TradeStart;
|
||||
if (!Entity.FatefulEncounter)
|
||||
goto case YieldState.Bred;
|
||||
|
|
@ -83,7 +83,7 @@ public bool MoveNext()
|
|||
Index = 0; goto case YieldState.Bred;
|
||||
|
||||
case YieldState.Bred:
|
||||
if (!Locations.IsEggLocationBred6(Entity.Egg_Location))
|
||||
if (!Locations.IsEggLocationBred6(Entity.EggLocation))
|
||||
goto case YieldState.StartCaptures;
|
||||
if (!EncounterGenerator8.TryGetEgg(Chain, Version, out var egg))
|
||||
goto case YieldState.StartCaptures;
|
||||
|
|
@ -213,7 +213,7 @@ public bool MoveNext()
|
|||
private void InitializeWildLocationInfo()
|
||||
{
|
||||
mustBeSlot = Entity is IRibbonIndex r && r.HasEncounterMark();
|
||||
met = Entity.Met_Location;
|
||||
met = Entity.MetLocation;
|
||||
}
|
||||
|
||||
private bool TryGetNext<TArea, TSlot>(TArea[] areas)
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public record struct EncounterEnumerator8a(PKM Entity, EvoCriteria[] Chain) : IE
|
|||
private bool Yielded;
|
||||
public MatchedEncounter<IEncounterable> Current { get; private set; }
|
||||
private YieldState State;
|
||||
private int met;
|
||||
private ushort met;
|
||||
private bool hasOriginalMet;
|
||||
readonly object IEnumerator.Current => Current;
|
||||
|
||||
|
|
@ -89,7 +89,7 @@ public bool MoveNext()
|
|||
|
||||
private void InitializeWildLocationInfo()
|
||||
{
|
||||
met = Entity.Met_Location;
|
||||
met = Entity.MetLocation;
|
||||
var remap = LocationsHOME.GetRemapState(EntityContext.Gen8a, Entity.Context);
|
||||
hasOriginalMet = true;
|
||||
if (remap.HasFlag(LocationRemapState.Remapped))
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public record struct EncounterEnumerator8b(PKM Entity, EvoCriteria[] Chain, Game
|
|||
private bool Yielded;
|
||||
public MatchedEncounter<IEncounterable> Current { get; private set; }
|
||||
private YieldState State;
|
||||
private int met;
|
||||
private ushort met;
|
||||
private bool hasOriginalLocation;
|
||||
private bool mustBeSlot;
|
||||
readonly object IEnumerator.Current => Current;
|
||||
|
|
@ -77,20 +77,20 @@ public bool MoveNext()
|
|||
Index = 0; goto case YieldState.Bred;
|
||||
|
||||
case YieldState.Bred:
|
||||
if (!Locations.IsEggLocationBred8b(Entity.Egg_Location))
|
||||
if (!Locations.IsEggLocationBred8b(Entity.EggLocation))
|
||||
goto case YieldState.TradeStart;
|
||||
if (!EncounterGenerator8b.TryGetEgg(Chain, Version, out var egg))
|
||||
goto case YieldState.TradeStart;
|
||||
State = YieldState.BredSplit;
|
||||
return SetCurrent(egg);
|
||||
case YieldState.BredSplit:
|
||||
State = Entity.Egg_Location == Locations.Daycare8b ? YieldState.End : YieldState.StartCaptures;
|
||||
State = Entity.EggLocation == Locations.Daycare8b ? YieldState.End : YieldState.StartCaptures;
|
||||
if (EncounterGenerator8b.TryGetSplit((EncounterEgg)Current.Encounter, Chain, out egg))
|
||||
return SetCurrent(egg);
|
||||
break;
|
||||
|
||||
case YieldState.TradeStart:
|
||||
if (Entity.Met_Location != Locations.LinkTrade6NPC)
|
||||
if (Entity.MetLocation != Locations.LinkTrade6NPC)
|
||||
goto case YieldState.StartCaptures;
|
||||
State = YieldState.Trade; goto case YieldState.Trade;
|
||||
case YieldState.Trade:
|
||||
|
|
@ -160,12 +160,12 @@ public bool MoveNext()
|
|||
private void InitializeWildLocationInfo()
|
||||
{
|
||||
mustBeSlot = Entity.Ball == (byte)Ball.Safari;
|
||||
met = Entity.Met_Location;
|
||||
met = Entity.MetLocation;
|
||||
var location = met;
|
||||
var remap = LocationsHOME.GetRemapState(EntityContext.Gen8b, Entity.Context);
|
||||
hasOriginalLocation = true;
|
||||
if (remap.HasFlag(LocationRemapState.Remapped))
|
||||
hasOriginalLocation = location != LocationsHOME.GetMetSWSH((ushort)location, (int)Version);
|
||||
hasOriginalLocation = location != LocationsHOME.GetMetSWSH(location, Version);
|
||||
}
|
||||
|
||||
private bool TryGetNext<TArea, TSlot>(TArea[] areas)
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public record struct EncounterEnumerator9(PKM Entity, EvoCriteria[] Chain, GameV
|
|||
private bool Yielded;
|
||||
public MatchedEncounter<IEncounterable> Current { get; private set; }
|
||||
private YieldState State;
|
||||
private int met;
|
||||
private ushort met;
|
||||
private bool mustBeSlot;
|
||||
readonly object IEnumerator.Current => Current;
|
||||
|
||||
|
|
@ -80,14 +80,14 @@ public bool MoveNext()
|
|||
|
||||
case YieldState.Bred:
|
||||
State = Entity.IsEgg ? YieldState.StaticShared : YieldState.TradeStart;
|
||||
if (Locations.IsEggLocationBred9(Entity.Egg_Location) && EncounterGenerator9.TryGetEgg(Entity, Chain, Version, out var egg))
|
||||
if (Locations.IsEggLocationBred9(Entity.EggLocation) && EncounterGenerator9.TryGetEgg(Entity, Chain, Version, out var egg))
|
||||
return SetCurrent(egg);
|
||||
if (Entity.IsEgg)
|
||||
goto case YieldState.StaticShared;
|
||||
goto case YieldState.TradeStart;
|
||||
|
||||
case YieldState.TradeStart:
|
||||
if (Entity.Met_Location != Locations.LinkTrade6NPC)
|
||||
if (Entity.MetLocation != Locations.LinkTrade6NPC)
|
||||
goto case YieldState.StartCaptures;
|
||||
State = YieldState.Trade; goto case YieldState.Trade;
|
||||
case YieldState.Trade:
|
||||
|
|
@ -180,7 +180,7 @@ public bool MoveNext()
|
|||
private void InitializeWildLocationInfo()
|
||||
{
|
||||
mustBeSlot = Entity is IRibbonIndex r && r.HasEncounterMark();
|
||||
met = Entity.Met_Location;
|
||||
met = Entity.MetLocation;
|
||||
}
|
||||
|
||||
private bool TryGetNext<TArea, TSlot>(TArea[] areas)
|
||||
|
|
|
|||
|
|
@ -14,20 +14,21 @@ public static class EncounterSuggestion
|
|||
/// </summary>
|
||||
public static EncounterSuggestionData? GetSuggestedMetInfo(PKM pk)
|
||||
{
|
||||
int loc = GetSuggestedTransferLocation(pk);
|
||||
var loc = TryGetSuggestedTransferLocation(pk);
|
||||
|
||||
if (pk.WasEgg)
|
||||
return GetSuggestedEncounterEgg(pk, loc);
|
||||
|
||||
Span<EvoCriteria> chain = stackalloc EvoCriteria[EvolutionTree.MaxEvolutions];
|
||||
var origin = new EvolutionOrigin(pk.Species, (byte)pk.Version, (byte)pk.Generation, (byte)pk.CurrentLevel, (byte)pk.CurrentLevel, OriginOptions.SkipChecks);
|
||||
var lvl = pk.CurrentLevel;
|
||||
var origin = new EvolutionOrigin(pk.Species, pk.Version, pk.Generation, lvl, lvl, OriginOptions.SkipChecks);
|
||||
var count = EvolutionChain.GetOriginChain(chain, pk, origin);
|
||||
var ver = (GameVersion)pk.Version;
|
||||
var generator = EncounterGenerator.GetGenerator(ver);
|
||||
var version = pk.Version;
|
||||
var generator = EncounterGenerator.GetGenerator(version);
|
||||
|
||||
var evos = chain[..count].ToArray();
|
||||
var w = EncounterSelection.GetMinByLevel(evos, generator.GetPossible(pk, evos, ver, EncounterTypeGroup.Slot));
|
||||
var s = EncounterSelection.GetMinByLevel(evos, generator.GetPossible(pk, evos, ver, EncounterTypeGroup.Static));
|
||||
var w = EncounterSelection.GetMinByLevel(evos, generator.GetPossible(pk, evos, version, EncounterTypeGroup.Slot));
|
||||
var s = EncounterSelection.GetMinByLevel(evos, generator.GetPossible(pk, evos, version, EncounterTypeGroup.Static));
|
||||
|
||||
if (w is null)
|
||||
return s is null ? null : GetSuggestedEncounter(pk, s, loc);
|
||||
|
|
@ -52,10 +53,10 @@ public static class EncounterSuggestion
|
|||
return false;
|
||||
}
|
||||
|
||||
private static EncounterSuggestionData GetSuggestedEncounterEgg(PKM pk, int loc = -1)
|
||||
private static EncounterSuggestionData GetSuggestedEncounterEgg(PKM pk, ushort loc = LocationNone)
|
||||
{
|
||||
int lvl = GetSuggestedEncounterEggMetLevel(pk);
|
||||
var met = loc != -1 ? loc : GetSuggestedEggMetLocation(pk);
|
||||
var met = loc != LocationNone ? loc : GetSuggestedEggMetLocation(pk);
|
||||
return new EncounterSuggestionData(pk, met, (byte)lvl);
|
||||
}
|
||||
|
||||
|
|
@ -64,16 +65,16 @@ public static int GetSuggestedEncounterEggMetLevel(PKM pk)
|
|||
if (pk is { IsNative: false, Generation: < 5 })
|
||||
return pk.CurrentLevel; // be generous with transfer conditions
|
||||
if (pk.Format < 5) // and native
|
||||
return pk.Format == 2 && pk.Met_Location != 0 ? 1 : 0;
|
||||
return pk.Format == 2 && pk.MetLocation != 0 ? 1 : 0;
|
||||
return 1; // Gen5+
|
||||
}
|
||||
|
||||
public static int GetSuggestedEncounterEggLocationEgg(PKM pk, bool traded = false)
|
||||
public static ushort GetSuggestedEncounterEggLocationEgg(PKM pk, bool traded = false)
|
||||
{
|
||||
return GetSuggestedEncounterEggLocationEgg(pk.Generation, (GameVersion)pk.Version, traded);
|
||||
return GetSuggestedEncounterEggLocationEgg(pk.Generation, pk.Version, traded);
|
||||
}
|
||||
|
||||
public static int GetSuggestedEncounterEggLocationEgg(int generation, GameVersion version, bool traded = false) => generation switch
|
||||
public static ushort GetSuggestedEncounterEggLocationEgg(byte generation, GameVersion version, bool traded = false) => generation switch
|
||||
{
|
||||
1 or 2 or 3 => 0,
|
||||
4 => traded ? Locations.LinkTrade4 : Locations.Daycare4,
|
||||
|
|
@ -83,28 +84,28 @@ public static int GetSuggestedEncounterEggLocationEgg(PKM pk, bool traded = fals
|
|||
_ => traded ? Locations.LinkTrade6 : Locations.Daycare5,
|
||||
};
|
||||
|
||||
private static EncounterSuggestionData GetSuggestedEncounter(PKM pk, IEncounterable enc, int loc = -1)
|
||||
private static EncounterSuggestionData GetSuggestedEncounter(PKM pk, IEncounterable enc, ushort loc = LocationNone)
|
||||
{
|
||||
var met = loc != -1 ? loc : enc.Location;
|
||||
var met = loc != LocationNone ? loc : enc.Location;
|
||||
return new EncounterSuggestionData(pk, enc, met);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="EggStateLegality.GetEggHatchLocation"/>
|
||||
public static int GetSuggestedEggMetLocation(PKM pk) => EggStateLegality.GetEggHatchLocation((GameVersion)pk.Version, pk.Format);
|
||||
public static ushort GetSuggestedEggMetLocation(PKM pk) => EggStateLegality.GetEggHatchLocation(pk.Version, pk.Format);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the correct Transfer Met location for the origin game.
|
||||
/// </summary>
|
||||
/// <param name="pk">Pokémon data to suggest for</param>
|
||||
/// <remarks>
|
||||
/// Returns -1 if the met location is not overriden with a transfer location
|
||||
/// Returns default if the met location is not overriden with a transfer location
|
||||
/// </remarks>
|
||||
public static int GetSuggestedTransferLocation(PKM pk)
|
||||
public static ushort TryGetSuggestedTransferLocation(PKM pk)
|
||||
{
|
||||
if (pk.Version == (int)GO)
|
||||
if (pk.Version == GO)
|
||||
return Locations.GO8;
|
||||
if (pk.HasOriginalMetLocation)
|
||||
return -1;
|
||||
return LocationNone;
|
||||
if (pk.VC1)
|
||||
return Locations.Transfer1;
|
||||
if (pk.VC2)
|
||||
|
|
@ -113,22 +114,24 @@ public static int GetSuggestedTransferLocation(PKM pk)
|
|||
return Locations.Transfer3;
|
||||
if (pk.Format >= 5) // Transporter
|
||||
return PK5.GetTransferMetLocation4(pk);
|
||||
return -1;
|
||||
return LocationNone;
|
||||
}
|
||||
|
||||
public static int GetLowestLevel(PKM pk, byte startLevel)
|
||||
public const ushort LocationNone = 0;
|
||||
|
||||
public static byte GetLowestLevel(PKM pk, byte startLevel)
|
||||
{
|
||||
if (startLevel >= 100)
|
||||
startLevel = 100;
|
||||
|
||||
int most = 1;
|
||||
Span<EvoCriteria> chain = stackalloc EvoCriteria[EvolutionTree.MaxEvolutions];
|
||||
var origin = new EvolutionOrigin(pk.Species, (byte)pk.Version, (byte)pk.Generation, startLevel, 100, OriginOptions.SkipChecks);
|
||||
var origin = new EvolutionOrigin(pk.Species, pk.Version, pk.Generation, startLevel, 100, OriginOptions.SkipChecks);
|
||||
while (true)
|
||||
{
|
||||
var count = EvolutionChain.GetOriginChain(chain, pk, origin);
|
||||
if (count < most) // lost an evolution, prior level was minimum current level
|
||||
return GetMaxLevelMax(chain) + 1;
|
||||
return unchecked((byte)(GetMaxLevelMax(chain) + 1));
|
||||
most = count;
|
||||
if (origin.LevelMax == origin.LevelMin)
|
||||
return startLevel;
|
||||
|
|
@ -151,7 +154,7 @@ private static int GetMaxLevelMax(ReadOnlySpan<EvoCriteria> evos)
|
|||
/// <param name="isLegal">Current state is legal or invalid (false)</param>
|
||||
/// <param name="level">Maximum level to iterate down from</param>
|
||||
/// <returns>True if the level was changed, false if it was already at the lowest level possible or impossible.</returns>
|
||||
public static bool IterateMinimumCurrentLevel(PKM pk, bool isLegal, int level = 100)
|
||||
public static bool IterateMinimumCurrentLevel(PKM pk, bool isLegal, byte level = 100)
|
||||
{
|
||||
// Find the lowest level possible while still remaining legal.
|
||||
var growth = pk.PersonalInfo.EXPGrowth;
|
||||
|
|
@ -166,7 +169,7 @@ public static bool IterateMinimumCurrentLevel(PKM pk, bool isLegal, int level =
|
|||
return false;
|
||||
|
||||
// Skip to original - 1, since all levels [original,max] are already legal.
|
||||
level = original - 1;
|
||||
level = unchecked((byte)(original - 1));
|
||||
}
|
||||
// If it's not legal, then we'll first try the max level and abort if it will never be legal.
|
||||
|
||||
|
|
@ -183,7 +186,7 @@ public static bool IterateMinimumCurrentLevel(PKM pk, bool isLegal, int level =
|
|||
}
|
||||
|
||||
// First illegal level found, revert to the previous level.
|
||||
level = Math.Min(100, level + 1);
|
||||
level = Math.Min((byte)100, unchecked((byte)(level + 1)));
|
||||
if (level == original) // same, revert actual EXP value.
|
||||
{
|
||||
pk.EXP = originalEXP;
|
||||
|
|
@ -199,19 +202,19 @@ public static bool IterateMinimumCurrentLevel(PKM pk, bool isLegal, int level =
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the suggested <see cref="PKM.Met_Level"/> based on a baseline <see cref="minLevel"/> and the <see cref="pk"/>'s current moves.
|
||||
/// Gets the suggested <see cref="PKM.MetLevel"/> based on a baseline <see cref="minLevel"/> and the <see cref="pk"/>'s current moves.
|
||||
/// </summary>
|
||||
/// <param name="pk">Entity to calculate for</param>
|
||||
/// <param name="minLevel">Encounter minimum level to calculate for</param>
|
||||
/// <returns>Minimum level the <see cref="pk"/> can have for its <see cref="PKM.Met_Level"/></returns>
|
||||
/// <remarks>Brute-forces the value by cloning the <see cref="pk"/> and adjusting the <see cref="PKM.Met_Level"/> and returning the lowest valid value.</remarks>
|
||||
public static int GetSuggestedMetLevel(PKM pk, int minLevel)
|
||||
/// <returns>Minimum level the <see cref="pk"/> can have for its <see cref="PKM.MetLevel"/></returns>
|
||||
/// <remarks>Brute-forces the value by cloning the <see cref="pk"/> and adjusting the <see cref="PKM.MetLevel"/> and returning the lowest valid value.</remarks>
|
||||
public static int GetSuggestedMetLevel(PKM pk, byte minLevel)
|
||||
{
|
||||
var clone = pk.Clone();
|
||||
int minMove = -1;
|
||||
for (int i = clone.CurrentLevel; i >= minLevel; i--)
|
||||
for (byte i = clone.CurrentLevel; i >= minLevel; i--)
|
||||
{
|
||||
clone.Met_Level = i;
|
||||
clone.MetLevel = i;
|
||||
var la = new LegalityAnalysis(clone);
|
||||
if (la.Valid)
|
||||
return i;
|
||||
|
|
|
|||
|
|
@ -9,14 +9,14 @@ public sealed class EncounterSuggestionData : ISpeciesForm, IRelearn, ILevelRang
|
|||
|
||||
public ushort Species { get; }
|
||||
public byte Form { get; }
|
||||
public int Location { get; }
|
||||
public ushort Location { get; }
|
||||
|
||||
public byte LevelMin { get; }
|
||||
public byte LevelMax { get; }
|
||||
|
||||
public Moveset Relearn => Encounter is IRelearn r ? r.Relearn : default;
|
||||
|
||||
public EncounterSuggestionData(PKM pk, IEncounterable enc, int met)
|
||||
public EncounterSuggestionData(PKM pk, IEncounterable enc, ushort met)
|
||||
{
|
||||
Encounter = enc;
|
||||
Species = pk.Species;
|
||||
|
|
@ -27,7 +27,7 @@ public EncounterSuggestionData(PKM pk, IEncounterable enc, int met)
|
|||
LevelMax = enc.LevelMax;
|
||||
}
|
||||
|
||||
public EncounterSuggestionData(PKM pk, int met, byte lvl)
|
||||
public EncounterSuggestionData(PKM pk, ushort met, byte lvl)
|
||||
{
|
||||
Species = pk.Species;
|
||||
Form = pk.Form;
|
||||
|
|
@ -39,5 +39,5 @@ public EncounterSuggestionData(PKM pk, int met, byte lvl)
|
|||
|
||||
public int GetSuggestedMetLevel(PKM pk) => EncounterSuggestion.GetSuggestedMetLevel(pk, LevelMin);
|
||||
public GroundTileType GetSuggestedGroundTile() => Encounter is IGroundTypeTile t ? t.GroundTile.GetIndex() : 0;
|
||||
public bool HasGroundTile(int format) => Encounter is IGroundTypeTile t && t.HasGroundTile(format);
|
||||
public bool HasGroundTile(byte format) => Encounter is IGroundTypeTile t && t.HasGroundTile(format);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,18 +19,18 @@ private EncounterSummary(IEncounterTemplate z)
|
|||
|
||||
private static string GetLocationName(IEncounterTemplate z)
|
||||
{
|
||||
var gen = z.Generation;
|
||||
var generation = z.Generation;
|
||||
var version = z.Version;
|
||||
if (gen < 0 && version > 0)
|
||||
gen = version.GetGeneration();
|
||||
if (generation == 0 && version > 0)
|
||||
generation = version.GetGeneration();
|
||||
|
||||
if (z is not ILocation l)
|
||||
return $"[Gen{gen}]\t";
|
||||
var loc = l.GetEncounterLocation(gen, (int)version);
|
||||
return $"[Gen{generation}]\t";
|
||||
var loc = l.GetEncounterLocation(generation, version);
|
||||
|
||||
if (string.IsNullOrWhiteSpace(loc))
|
||||
return $"[Gen{gen}]\t";
|
||||
return $"[Gen{gen}]\t{loc}: ";
|
||||
return $"[Gen{generation}]\t";
|
||||
return $"[Gen{generation}]\t{loc}: ";
|
||||
}
|
||||
|
||||
public static IEnumerable<string> SummarizeGroup(IEnumerable<IEncounterTemplate> items, string header = "", bool advanced = false)
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public static IReadOnlyList<string> GetTextLines(this IEncounterInfo enc, GameSt
|
|||
}
|
||||
|
||||
var el = enc as ILocation;
|
||||
var loc = el?.GetEncounterLocation(enc.Generation, (int)enc.Version);
|
||||
var loc = el?.GetEncounterLocation(enc.Generation, enc.Version);
|
||||
if (!string.IsNullOrEmpty(loc))
|
||||
lines.Add(string.Format(L_F0_1, "Location", loc));
|
||||
|
||||
|
|
|
|||
|
|
@ -68,6 +68,6 @@ public static bool IsSquareShinyExist(PKM pk)
|
|||
{
|
||||
if (pk.Format < 8 && !ShowSquareBeforeGen8)
|
||||
return false;
|
||||
return pk.ShinyXor == 0 || pk.FatefulEncounter || pk.Version == (int)GameVersion.GO;
|
||||
return pk.ShinyXor == 0 || pk.FatefulEncounter || pk.Version == GameVersion.GO;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user