Update from .NET Framework 4.6 to .NET 7 (#3729)

Updates from net46->net7, dropping support for mono in favor of using the latest runtime (along with the performance/API improvements). Releases will be posted as 64bit only for now.

Refactors a good amount of internal API methods to be more performant and more customizable for future updates & fixes.

Adds functionality for Batch Editor commands to `>`, `<` and <=/>=

TID/SID properties renamed to TID16/SID16 for clarity; other properties exposed for Gen7 / display variants.

Main window has a new layout to account for DPI scaling (8 point grid)

Fixed: Tatsugiri and Paldean Tauros now output Showdown form names as Showdown expects
Changed: Gen9 species now interact based on the confirmed National Dex IDs (closes #3724)
Fixed: Pokedex set all no longer clears species with unavailable non-base forms (closes #3720)
Changed: Hyper Training suggestions now apply for level 50 in SV. (closes #3714)
Fixed: B2/W2 hatched egg met locations exclusive to specific versions are now explicitly checked (closes #3691)
Added: Properties for ribbon/mark count (closes #3659)
Fixed: Traded SV eggs are now checked correctly (closes #3692)
This commit is contained in:
Kurt 2023-01-21 20:02:33 -08:00 committed by GitHub
parent 4265407d45
commit 88830e0d00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
916 changed files with 17286 additions and 14443 deletions

View file

@ -28,9 +28,9 @@ PKHeX erwartet entschlüsselte Spielstände. Da diese konsolenspezifisch verschl
## Erstellen
PKHeX ist eine Windows Forms Anwendung, die das [.NET Framework v4.6](https://www.microsoft.com/de-de/download/details.aspx?id=48137) benötigt, mit experimenteller Unterstützung für [.NET 6.0](https://dotnet.microsoft.com/download/dotnet/6.0).
PKHeX ist eine Windows Forms Anwendung, die das [.NET 7.0](https://dotnet.microsoft.com/download/dotnet/7.0).
Die Anwendung kann mit jedem Kompiler erstellt werden, der C# 10 unterstützt.
Die Anwendung kann mit jedem Kompiler erstellt werden, der C# 11 unterstützt.
### Erstell Konfiguration
@ -47,7 +47,3 @@ PKHeXs Pokémon Legends: Arceus Sprites kommen vom [National Pokédex - Icon Dex
### IDE
PKHeX kann mit IDEs wie [Visual Studio](https://visualstudio.microsoft.com/de/downloads/) durch das Öffnen der .sln oder .csproj Dateien geöffnet werden.
### GNU/Linux
Da GNU/Linux nicht das Hauptbetriebssystem der PKHeX Entwickler ist können Bugs auftreten. Manche kommen möglicherweise von GNU/Linux spezifischem Code in Mono/Wine und können deshalb nicht von jedem reproduziert werden kann.

10
.github/README-es.md vendored
View file

@ -18,7 +18,7 @@ La interfaz gráfica puede ser traducida con archivos de texto externos para dar
Pokémon Showdown asigna un código QR que puede ser importado/exportado para ayudar al compartir.
PKHeX espera archivos de guardado que no estén cifrados con las claves específicas de la consola. Use un gestor de archivos de guardado para importar y exportar información de la consola ([Checkpoint](https://github.com/FlagBrew/Checkpoint), save_manager, [JKSM](https://github.com/J-D-K/JKSM), o SaveDataFiler).
PKHeX espera archivos de guardado que no estén cifrados con las claves específicas de la consola. Use un gestor de archivos de guardado para importar y exportar información de la consola ([Checkpoint](https://github.com/FlagBrew/Checkpoint) o [JKSM](https://github.com/J-D-K/JKSM)).
**No apoyamos ni toleramos las trampas a expensas de otros. No uses un Pokémon modificado significativamente en batalla o en intercambios con quienes no estén al tanto de que estás usando un Pokémon modificado.**
@ -28,9 +28,9 @@ PKHeX espera archivos de guardado que no estén cifrados con las claves específ
## Building
PKHeX es una aplicación de Windows Forms que requiere [.NET Framework v4.6](https://www.microsoft.com/es-es/download/details.aspx?id=48137), con soporte experimental para [.NET 6.0](https://dotnet.microsoft.com/download/dotnet/6.0).
PKHeX es una aplicación de Windows Forms que requiere [.NET 7.0](https://dotnet.microsoft.com/download/dotnet/7.0).
El archivo ejecutable puede ser construido con cualquier compilador que soporte C# 10.
El archivo ejecutable puede ser construido con cualquier compilador que soporte C# 11.
### Configuraciones del Build
@ -47,7 +47,3 @@ PKHeX's Pokémon Legends: Arceus sprite collection is taken from the [National P
### IDE
PKHeX se puede abrir con un IDE como [Visual Studio](https://visualstudio.microsoft.com/es/downloads/), abriendo los archivos .sln o .csproj.
### GNU/Linux
GNU/Linux no es el sistema operativo principal de los desarrolladores de este proyecto, así que probablemente haya errores o bugs; de los cuales algunos pueden provenir de código no específico de GNU/Linux desde Mono o de Wine, con lo cual puede haber otros usuarios que no puedan reproducir ese error.

10
.github/README-fr.md vendored
View file

@ -17,7 +17,7 @@ Les données sont affichées dans une vue qui peut être modifiée et enregistr
Les ensembles Pokémon Showdown et les QR codes peuvent être importés/exportés pour faciliter le partage.
PKHeX attend des fichiers de sauvegarde qui ne sont pas chiffrés avec des clés spécifiques à la console. Utilisez un gestionnaire de données enregistrées pour importer et exporter des données enregistrées à partir de la console ([Checkpoint](https://github.com/FlagBrew/Checkpoint), save_manager, [JKSM](https://github.com/J-D-K/JKSM) ou SaveDataFiler).
PKHeX attend des fichiers de sauvegarde qui ne sont pas chiffrés avec des clés spécifiques à la console. Utilisez un gestionnaire de données enregistrées pour importer et exporter des données enregistrées à partir de la console ([Checkpoint](https://github.com/FlagBrew/Checkpoint) ou [JKSM](https://github.com/J-D-K/JKSM)).
**Nous ne soutenons ni ne tolérons la tricherie aux dépens des autres. N'utilisez pas de Pokémon piratés de manière significative au combat ou dans des échanges avec ceux qui ne savent pas que des Pokémon piratés sont en cours d'utilisation.**
@ -27,9 +27,9 @@ PKHeX attend des fichiers de sauvegarde qui ne sont pas chiffrés avec des clés
## Construction
PKHeX est une application Windows Forms qui nécessite [.NET Framework v4.6](https://www.microsoft.com/fr-fr/download/details.aspx?id=48137), avec une prise en charge expérimentale de [.NET 6.0.](https://dotnet.microsoft.com/download/dotnet/6.0)
PKHeX est une application Windows Forms qui nécessite [.NET 7.0.](https://dotnet.microsoft.com/download/dotnet/7.0)
L'exécutable peut être construit avec n'importe quel compilateur prenant en charge C# 10.
L'exécutable peut être construit avec n'importe quel compilateur prenant en charge C# 11.
### Construire les configurations
@ -46,7 +46,3 @@ PKHeX's Pokémon Legends: Arceus sprite collection is taken from the [National P
## IDE
PKHeX peut être ouvert avec des IDE tels que [Visual Studio](https://visualstudio.microsoft.com/fr/downloads/) en ouvrant le fichier .sln ou .csproj.
## GNU/Linux
GNU/Linux n'est pas le système d'exploitation principal des développeurs de ce programme, il peut donc y avoir des bugues; certains peuvent provenir de code non spécifique à GNU/Linux de Mono/Wine, donc d'autres utilisateurs peuvent ne pas être en mesure de reproduire l'erreur que vous rencontrez.

10
.github/README-it.md vendored
View file

@ -18,7 +18,7 @@ L'interfaccia può essere tradotta con risorse/file di testo esterni, così che
Set di Pokémon Showdown e QR Code possono essere importati/esportati per agevolare la condivisione di file.
PKHeX si aspetta file di salvataggio non criptati con le chiavi specifiche della console. È possibile usare un gestore di salvataggi per importare ed esportare dati di salvataggio dalla console ([Checkpoint](https://github.com/FlagBrew/Checkpoint), save_manager, [JKSM](https://github.com/J-D-K/JKSM), o SaveDataFiler).
PKHeX si aspetta file di salvataggio non criptati con le chiavi specifiche della console. È possibile usare un gestore di salvataggi per importare ed esportare dati di salvataggio dalla console ([Checkpoint](https://github.com/FlagBrew/Checkpoint) o [JKSM](https://github.com/J-D-K/JKSM)).
**Non supportiamo e non perdoniamo l'utilizzo di cheat a scapito di altri giocatori. Non utilizzare Pokémon modificati significativamente in lotte o scambi con giocatori che non ne sono a conoscenza.**
@ -28,9 +28,9 @@ PKHeX si aspetta file di salvataggio non criptati con le chiavi specifiche della
## Building
PKHeX è un applicazione Windows Form e necessita [.NET Framework v4.6](https://www.microsoft.com/it-it/download/details.aspx?id=48137), con supporto sperimentale per [.NET 6.0](https://dotnet.microsoft.com/download/dotnet/6.0).
PKHeX è un applicazione Windows Form e necessita [.NET Framework 7.0](https://dotnet.microsoft.com/download/dotnet/7.0).
L'eseguibile può essere compilato con qualsiasi compiler che supporti C# 10.
L'eseguibile può essere compilato con qualsiasi compiler che supporti C# 11.
### Configurazioni di Build
@ -47,7 +47,3 @@ La collezione di sprite per Leggende Pokémon: Arceus è presa dal [National Pok
### IDE
PKHeX può essere aperto con IDE come [Visual Studio](https://visualstudio.microsoft.com/it/downloads/) aprendo il file .sln o il file .csproj.
### GNU/Linux
GNU/Linux non è il Sistema Operativo principale dei developer di questo programma, quindi potrebbero esserci bug; alcuni potrebbero provenire da codice GNU/Linux non specifico da Mono/Wine, per cui alcuni utenti potrebbero non essere in grado di riprodurre l'errore riscontrato.

View file

@ -28,9 +28,9 @@ PKHeX 所读取存档文件必须是未经主机唯一密钥加密,因此请
## 构建
PKHeX 是 Windows 窗口应用程序,依赖于 [.NET Framework v4.6](https://www.microsoft.com/en-us/download/details.aspx?id=48137) 而运行,同时具有对 .[NET 6.0](https://www.microsoft.com/en-us/download/details.aspx?id=48137) 的实验性支持
PKHeX 是 Windows 窗口应用程序,依赖于 [.NET 7.0](https://dotnet.microsoft.com/download/dotnet/7.0)
可以使用任何支持 C# 10 的编译器生成可执行文件。
可以使用任何支持 C# 11 的编译器生成可执行文件。
### 构建配置
@ -46,7 +46,3 @@ PKHeX 的“宝可梦传说:阿尔宙斯”精灵图片集来源于 [National
### IDE
PKHeX 可以通过打开 .sln 或 .csproj 文件来使用 [Visual Studio](https://visualstudio.microsoft.com/downloads/) 等 IDE 打开。
### GNU/Linux
GNU/Linux 非本程序开发人员主要操作系统,因此在 GNU/Linux 平台上运行本程序时可能存在 Bug 部分 Bug 可能来自于 Mono/Wine 等非 GNU/Linux 特定源代码,因而其他使用者可能无法复现你所遇到的 Bug。

View file

@ -18,7 +18,7 @@ PKHeX
可匯入/匯出 配置資訊及 QR 碼以便進行共有分享。
PKHeX 所讀取檔案須未經主機唯一密鑰加密,因而請使用儲存資料管理軟體(如 [Checkpoint](https://github.com/FlagBrew/Checkpoint) save_manager [JKSM](https://github.com/J-D-K/JKSM) 抑或是 SaveDataFiler)以從主機中匯入匯出儲存資料 .
PKHeX 所讀取檔案須未經主機唯一密鑰加密,因而請使用儲存資料管理軟體(如 [Checkpoint](https://github.com/FlagBrew/Checkpoint) [JKSM](https://github.com/J-D-K/JKSM))以從主機中匯入匯出儲存資料 .
**我們反對亦不會縱容透過作弊手段損害他人利益之行為。切勿將魔法寶可夢用於對戰,或連線交換至不知情之訓練家手中。**
@ -28,9 +28,9 @@ PKHeX 所讀取檔案須未經主機唯一密鑰加密,因而請使用儲存
## 構建
PKHeX 係 Windows 窗體應用程式,其須依賴於 [.NET Framework v4.6](https://www.microsoft.com/en-us/download/details.aspx?id=48137) 而運行,同時本程式亦實驗式地支援 [.NET 6.0](https://dotnet.microsoft.com/download/dotnet/6.0)。
PKHeX 係 Windows 窗體應用程式,其須依賴於 [.NET Framework 7.0](https://dotnet.microsoft.com/download/dotnet/7.0)。
程式可透過任意支援 C# 10 之編譯器構建。
程式可透過任意支援 C# 11 之編譯器構建。
### 構建配置
@ -46,7 +46,3 @@ PKHeX 之「寶可夢傳説:阿爾宙斯」精靈圖示集合庫來源於 [Nat
### IDE
PKHeX 可透過如 [Visual Studio](https://visualstudio.microsoft.com/downloads/) 等各類 IDE ,開啓 .sln 或 .csproj 檔案以打開。
### GNU/Linux
GNU/Linux 非本程式開發者主要作業系統,因而於 GNU/Linux 平臺上運行本程式時可能存在 Bug 部分 Bug 亦可能由 Mono/Wine 等非 GNU/Linux 特定源代碼所引入,因而其他使用者可能無法復現你所遇到之 Bug。

View file

@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<Version>22.12.18</Version>
<LangVersion>10</LangVersion>
<LangVersion>11</LangVersion>
<Nullable>enable</Nullable>
<NeutralLanguage>en</NeutralLanguage>
<Product>PKHeX</Product>

View file

@ -5,35 +5,49 @@ namespace PKHeX.Core;
/// </summary>
public static class CatchRateApplicator
{
public static int GetSuggestedCatchRate(PK1 pk1, SaveFile sav)
/// <summary>
/// Gets the suggested <see cref="PK1.Catch_Rate"/> for the entity.
/// </summary>
public static int GetSuggestedCatchRate(PK1 pk, SaveFile sav)
{
var la = new LegalityAnalysis(pk1);
return GetSuggestedCatchRate(pk1, sav, la);
var la = new LegalityAnalysis(pk);
return GetSuggestedCatchRate(pk, sav, la);
}
public static byte GetSuggestedCatchRate(PK1 pk1, SaveFile sav, LegalityAnalysis la)
/// <summary>
/// Gets the suggested <see cref="PK1.Catch_Rate"/> for the entity.
/// </summary>
public static byte GetSuggestedCatchRate(PK1 pk, SaveFile sav, LegalityAnalysis la)
{
// If it is already valid, just use the current value.
if (la.Valid)
return pk1.Catch_Rate;
return pk.Catch_Rate;
// If it has ever visited generation 2, the Held Item can be removed prior to trade back.
if (la.Info.Generation == 2)
return 0;
var v = la.EncounterMatch;
switch (v)
// Return the encounter's original value.
var enc = la.EncounterMatch;
switch (enc)
{
case EncounterTrade1 c:
return c.GetInitialCatchRate();
case EncounterStatic1E { Version: GameVersion.Stadium, Species: (int)Species.Psyduck}:
return pk1.Japanese ? (byte)167 : (byte)168; // Amnesia Psyduck has different catch rates depending on language
return pk.Japanese ? (byte)167 : (byte)168; // Amnesia Psyduck has different catch rates depending on language
default:
var pt = GetPersonalTable(sav, enc);
var pi = pt[enc.Species];
return (byte)pi.CatchRate;
}
}
private static PersonalTable1 GetPersonalTable(SaveFile sav, IEncounterable v)
{
if (sav.Version.Contains(v.Version) || v.Version.Contains(sav.Version))
return (byte)sav.Personal[v.Species].CatchRate;
if (sav.Personal is PersonalTable1 pt && (sav.Version.Contains(v.Version) || v.Version.Contains(sav.Version)))
return pt;
if (!GameVersion.RB.Contains(v.Version))
return (byte)PersonalTable.Y[v.Species].CatchRate;
return (byte)PersonalTable.RB[v.Species].CatchRate;
}
}
return PersonalTable.Y;
return PersonalTable.RB;
}
}

View file

@ -26,7 +26,7 @@ public static class GenderApplicator
/// <param name="gender">Desired <see cref="PKM.Gender"/> value to set.</param>
public static void SetGender(this PKM pk, int gender)
{
gender = Math.Min(2, Math.Max(0, gender));
gender = Math.Clamp(gender, 0, 2);
if (pk.Gender == gender)
return;
@ -52,7 +52,7 @@ public static class GenderApplicator
/// <returns>Most-legal <see cref="PKM.Gender"/> value</returns>
public static int GetSaneGender(this PKM pk)
{
int gt = pk.PersonalInfo.Gender;
var gt = pk.PersonalInfo.Gender;
switch (gt)
{
case PersonalInfo.RatioMagicGenderless: return 2;

View file

@ -46,7 +46,7 @@ public static class MoveSetApplicator
const int count = 4;
if (m.Length > count)
return m.AsSpan(m.Length - count).ToArray();
return m[^count..];
Array.Resize(ref m, count);
return m;
}

View file

@ -7,23 +7,33 @@ namespace PKHeX.Core;
/// </summary>
public static class MoveShopRecordApplicator
{
/// <summary>
/// Clears all the "purchased" and "mastered" move shop flags.
/// </summary>
public static void ClearMoveShopFlags(this IMoveShop8 shop)
{
var bits = shop.MoveShopPermitFlags;
for (int i = 0; i < bits.Length; i++)
var bits = shop.Permit;
for (int i = 0; i < bits.RecordCountUsed; i++)
shop.SetPurchasedRecordFlag(i, false);
if (shop is IMoveShop8Mastery m)
m.ClearMoveShopFlagsMastered();
}
/// <summary>
/// Clears all the "mastered" move shop flags.
/// </summary>
/// <param name="shop"></param>
public static void ClearMoveShopFlagsMastered(this IMoveShop8Mastery shop)
{
var bits = shop.MoveShopPermitFlags;
for (int i = 0; i < bits.Length; i++)
var bits = shop.Permit;
for (int i = 0; i < bits.RecordCountUsed; i++)
shop.SetMasteredRecordFlag(i, false);
}
/// <summary>
/// Sets the required move shop flags for the requested entity.
/// </summary>
public static void SetMoveShopFlags(this IMoveShop8Mastery shop, PKM pk)
{
Span<ushort> moves = stackalloc ushort[4];
@ -31,6 +41,9 @@ public static class MoveShopRecordApplicator
shop.SetMoveShopFlags(moves, pk);
}
/// <summary>
/// Sets the required move shop flags for the requested entity.
/// </summary>
public static void SetMoveShopFlags(this IMoveShop8Mastery shop, ReadOnlySpan<ushort> moves, PKM pk)
{
var index = PersonalTable.LA.GetFormIndex(pk.Species, pk.Form);
@ -41,6 +54,9 @@ public static class MoveShopRecordApplicator
shop.SetMoveShopFlags(moves, learn, mastery, level);
}
/// <summary>
/// Sets all possible move shop flags for the requested entity.
/// </summary>
public static void SetMoveShopFlagsAll(this IMoveShop8Mastery shop, PKM pk)
{
var index = PersonalTable.LA.GetFormIndex(pk.Species, pk.Form);
@ -51,36 +67,45 @@ public static class MoveShopRecordApplicator
shop.SetMoveShopFlagsAll(learn, mastery, level);
}
/// <summary>
/// Sets all possible move shop flags for the requested entity.
/// </summary>
public static void SetMoveShopFlagsAll(this IMoveShop8Mastery shop, Learnset learn, Learnset mastery, int level)
{
var possible = shop.MoveShopPermitIndexes;
var permit = shop.MoveShopPermitFlags;
for (int index = 0; index < possible.Length; index++)
var permit = shop.Permit;
var possible = permit.RecordPermitIndexes;
for (int index = 0; index < permit.RecordCountUsed; index++)
{
var move = possible[index];
var allowed = permit[index];
var allowed = permit.IsRecordPermitted(index);
if (!allowed)
continue;
var move = possible[index];
SetMasteredFlag(shop, learn, mastery, level, index, move);
}
}
/// <summary>
/// Sets all move shop flags for the currently known moves.
/// </summary>
public static void SetMoveShopFlags(this IMoveShop8Mastery shop, ReadOnlySpan<ushort> moves, Learnset learn, Learnset mastery, int level)
{
var possible = shop.MoveShopPermitIndexes;
var permit = shop.MoveShopPermitFlags;
var permit = shop.Permit;
var possible = permit.RecordPermitIndexes;
foreach (var move in moves)
{
var index = possible.IndexOf(move);
if (index == -1)
continue;
if (!permit[index])
if (!permit.IsRecordPermitted(index))
continue;
SetMasteredFlag(shop, learn, mastery, level, index, move);
}
}
/// <summary>
/// Sets the "mastered" move shop flag for the requested move.
/// </summary>
public static void SetMasteredFlag(this IMoveShop8Mastery shop, Learnset learn, Learnset mastery, int level, int index, ushort move)
{
if (shop.GetMasteredRecordFlag(index))
@ -97,16 +122,19 @@ public static class MoveShopRecordApplicator
shop.SetMasteredRecordFlag(index, true);
}
/// <summary>
/// Sets the "mastered" move shop flag for the encounter.
/// </summary>
public static void SetEncounterMasteryFlags(this IMoveShop8Mastery shop, ReadOnlySpan<ushort> moves, Learnset mastery, int level)
{
var possible = shop.MoveShopPermitIndexes;
var permit = shop.MoveShopPermitFlags;
var permit = shop.Permit;
var possible = permit.RecordPermitIndexes;
foreach (var move in moves)
{
var index = possible.IndexOf(move);
if (index == -1)
continue;
if (!permit[index])
if (!permit.IsRecordPermitted(index))
continue;
// If the Pokémon is caught with any move shop move in its learnset

View file

@ -23,7 +23,7 @@ public static class TechnicalRecordApplicator
/// Clears the Technical Record flags for the <see cref="pk"/>.
/// </summary>
/// <param name="pk">Pokémon to modify.</param>
public static void ClearRecordFlags(this ITechRecord pk) => pk.SetRecordFlags(false, pk.RecordCountTotal);
public static void ClearRecordFlags(this ITechRecord pk) => pk.SetRecordFlags(false, pk.Permit.RecordCountTotal);
/// <summary>
/// Sets the Technical Record flags for the <see cref="pk"/> based on the current moves.
@ -32,17 +32,15 @@ public static class TechnicalRecordApplicator
/// <param name="moves">Moves to set flags for. If a move is not a Technical Record, it is skipped.</param>
public static void SetRecordFlags(this ITechRecord pk, ReadOnlySpan<ushort> moves)
{
var permit = pk.TechRecordPermitFlags;
var moveIDs = pk.TechRecordPermitIndexes;
if (permit.Length != moveIDs.Length)
return;
var permit = pk.Permit;
var moveIDs = permit.RecordPermitIndexes;
foreach (var m in moves)
{
var index = moveIDs.IndexOf(m);
if (index == -1)
continue;
if (permit[index])
if (permit.IsRecordPermitted(index))
pk.SetMoveRecordFlag(index);
}
}
@ -53,10 +51,10 @@ public static class TechnicalRecordApplicator
/// <param name="pk">Pokémon to modify.</param>
public static void SetRecordFlags(this ITechRecord pk)
{
var permit = pk.TechRecordPermitFlags;
for (int i = 0; i < permit.Length; i++)
var permit = pk.Permit;
for (int i = 0; i < permit.RecordCountUsed; i++)
{
if (permit[i])
if (permit.IsRecordPermitted(i))
pk.SetMoveRecordFlag(i);
}
}

View file

@ -57,10 +57,7 @@ public static class BatchEditing
var dict = new Dictionary<string, PropertyInfo>(expectedMax);
var props = selector(type);
foreach (var p in props)
{
if (!dict.ContainsKey(p.Name))
dict.Add(p.Name, p);
}
dict.TryAdd(p.Name, p);
return dict;
}
@ -190,8 +187,12 @@ public static class BatchEditing
foreach (var i in il.Where(i => !i.PropertyValue.All(char.IsDigit)))
{
string pv = i.PropertyValue;
if (pv.StartsWith(CONST_SPECIAL) && !pv.StartsWith(CONST_BYTES, StringComparison.Ordinal) && pv.Contains(','))
i.SetRandRange(pv);
if (pv.StartsWith(CONST_SPECIAL) && !pv.StartsWith(CONST_BYTES, StringComparison.Ordinal))
{
var str = pv.AsSpan(1);
if (StringInstruction.IsRandomRange(str))
i.SetRandomRange(str);
}
SetInstructionScreenedValue(i);
}
@ -261,7 +262,7 @@ public static class BatchEditing
{
if (cmd.PropertyName is PROP_TYPENAME)
{
if ((obj.GetType().Name == cmd.PropertyValue) != cmd.Evaluator)
if (!cmd.Comparer.IsCompareEquivalence(cmd.PropertyValue == obj.GetType().Name))
return false;
continue;
}
@ -270,7 +271,7 @@ public static class BatchEditing
return false;
try
{
if (pi.IsValueEqual(obj, cmd.PropertyValue) == cmd.Evaluator)
if (cmd.Comparer.IsCompareOperator(pi.CompareTo(obj, cmd.PropertyValue)))
continue;
}
// User provided inputs can mismatch the type's required value format, and fail to be compared.
@ -359,7 +360,7 @@ public static class BatchEditing
if (cmd.PropertyValue.StartsWith(CONST_SUGGEST, StringComparison.OrdinalIgnoreCase))
return SetSuggestedPKMProperty(cmd.PropertyName, info, cmd.PropertyValue);
if (cmd.PropertyValue == CONST_RAND && cmd.PropertyName == nameof(PKM.Moves))
if (cmd is { PropertyValue: CONST_RAND, PropertyName: nameof(PKM.Moves) })
return SetMoves(pk, info.Legality.GetMoveSet(true));
if (SetComplexProperty(pk, cmd))
@ -375,7 +376,7 @@ public static class BatchEditing
if (cmd.Random)
val = cmd.RandomValue;
else if (cmd.PropertyValue.StartsWith(CONST_POINTER) && props.TryGetValue(cmd.PropertyValue[1..], out var opi))
val = opi.GetValue(pk);
val = opi.GetValue(pk) ?? throw new NullReferenceException();
else
val = cmd.PropertyValue;
@ -426,7 +427,7 @@ public static class BatchEditing
return false;
if (!pi.CanRead)
return false;
return pi.IsValueEqual(pk, cmd.PropertyValue) == cmd.Evaluator;
return cmd.Comparer.IsCompareOperator(pi.CompareTo(pk, cmd.PropertyValue));
}
/// <summary>

View file

@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using static PKHeX.Core.MessageStrings;
namespace PKHeX.Core;
@ -52,7 +51,7 @@ public sealed class BatchEditor
/// </summary>
/// <param name="sets">Collection of modifications.</param>
/// <returns>Friendly (multi-line) string indicating the result of the batch edits.</returns>
public string GetEditorResults(ICollection<StringInstructionSet> sets)
public string GetEditorResults(IReadOnlyCollection<StringInstructionSet> sets)
{
if (sets.Count == 0)
return MsgBEInstructionNone;
@ -65,10 +64,16 @@ public sealed class BatchEditor
return result;
}
public static BatchEditor Execute(IList<string> lines, IEnumerable<PKM> data)
/// <summary>
/// Executes the batch instruction <see cref="lines"/> on the input <see cref="data"/>
/// </summary>
/// <param name="lines">Batch instruction line(s)</param>
/// <param name="data">Entities to modify</param>
/// <returns>Editor object if follow up modifications are desired.</returns>
public static BatchEditor Execute(ReadOnlySpan<string> lines, IEnumerable<PKM> data)
{
var editor = new BatchEditor();
var sets = StringInstructionSet.GetBatchSets(lines).ToArray();
var sets = StringInstructionSet.GetBatchSets(lines);
foreach (var pk in data)
{
foreach (var set in sets)

View file

@ -11,18 +11,18 @@ public static class BatchFilters
public static readonly List<IComplexFilter> FilterMods = new()
{
new ComplexFilter(PROP_LEGAL,
(pk, cmd) => bool.TryParse(cmd.PropertyValue, out var b) && (b == new LegalityAnalysis(pk).Valid) == cmd.Evaluator,
(info, cmd) => bool.TryParse(cmd.PropertyValue, out var b) && (b == info.Legality.Valid) == cmd.Evaluator),
(pk, cmd) => bool.TryParse(cmd.PropertyValue, out var b) && cmd.Comparer.IsCompareEquivalence(b == new LegalityAnalysis(pk).Valid),
(info, cmd) => bool.TryParse(cmd.PropertyValue, out var b) && cmd.Comparer.IsCompareEquivalence(b == info.Legality.Valid)),
new ComplexFilter(PROP_TYPENAME,
(pk, cmd) => (pk.GetType().Name == cmd.PropertyValue) == cmd.Evaluator,
(info, cmd) => (info.Entity.GetType().Name == cmd.PropertyValue) == cmd.Evaluator),
(pk, cmd) => cmd.Comparer.IsCompareEquivalence(pk.GetType().Name == cmd.PropertyValue),
(info, cmd) => cmd.Comparer.IsCompareEquivalence(info.Entity.GetType().Name == cmd.PropertyValue)),
};
public static readonly List<IComplexFilterMeta> FilterMeta = new()
{
new MetaFilter(IdentifierContains,
(obj, cmd) => obj is SlotCache s && s.Identify().Contains(cmd.PropertyValue) == cmd.Evaluator),
(obj, cmd) => obj is SlotCache s && cmd.Comparer.IsCompareEquivalence(s.Identify().Contains(cmd.PropertyValue))),
new MetaFilter(nameof(SlotInfoBox.Box),
(obj, cmd) => obj is SlotCache { Source: SlotInfoBox b } && int.TryParse(cmd.PropertyValue, out var box) && b.Box + 1 == box),

View file

@ -19,6 +19,7 @@ public static class BatchMods
new TypeSuggestion<IHyperTrain>(nameof(Extensions.HyperTrainClear), p => p.HyperTrainClear()),
new TypeSuggestion<IGeoTrack>(nameof(Extensions.ClearGeoLocationData), p => p.ClearGeoLocationData()),
new TypeSuggestion<IAwakened>(nameof(AwakeningUtil.AwakeningClear), p => p.AwakeningClear()),
new TypeSuggestion<IAwakened>(nameof(AwakeningUtil.AwakeningMinimum), p => p.AwakeningMinimum()),
new TypeSuggestion<IAwakened>(nameof(AwakeningUtil.AwakeningMax), p => p.AwakeningMax()),
new TypeSuggestion<IGanbaru>(nameof(GanbaruExtensions.ClearGanbaruValues), p => p.ClearGanbaruValues()),
new TypeSuggestion<IGanbaru>(nameof(GanbaruExtensions.SetSuggestedGanbaruValues), p => p.SetSuggestedGanbaruValues((PKM)p)),
@ -50,7 +51,7 @@ public static class BatchMods
new ComplexSuggestion(PROP_MOVEMASTERY, (_, value, info) => BatchModifications.SetSuggestedMasteryData(info, value)),
};
private static DateTime ParseDate(string val) => DateTime.ParseExact(val, "yyyyMMdd", CultureInfo.InvariantCulture, DateTimeStyles.None);
private static DateOnly ParseDate(ReadOnlySpan<char> val) => DateOnly.ParseExact(val, "yyyyMMdd", CultureInfo.InvariantCulture);
public static readonly List<IComplexSet> ComplexMods = new()
{
@ -71,6 +72,7 @@ public static class BatchMods
new ComplexSet(nameof(PKM.PID), value => value == CONST_RAND, (pk, _) => pk.PID = Util.Rand32()),
new ComplexSet(nameof(PKM.Gender), value => value == CONST_RAND, (pk, _) => pk.SetPIDGender(pk.Gender)),
new ComplexSet(PROP_EVS, value => value == CONST_RAND, (pk, _) => SetRandomEVs(pk)),
new ComplexSet(nameof(ITeraType.TeraTypeOverride), value => value == CONST_RAND, (pk, _) => SetRandomTeraType(pk)),
// Shiny
new ComplexSet(nameof(PKM.PID),
@ -84,6 +86,12 @@ public static class BatchMods
new ComplexSet(nameof(PKM.EncryptionConstant), value => value.StartsWith(CONST_RAND), (pk, cmd) => pk.EncryptionConstant = CommonEdits.GetComplicatedEC(pk, option: cmd.PropertyValue[^1])),
};
private static void SetRandomTeraType(PKM pk)
{
if (pk is ITeraType t)
t.TeraTypeOverride = (MoveType)Util.Rand.Next(0, TeraTypeUtil.MaxType + 1);
}
private static void SetRandomEVs(PKM pk)
{
Span<int> evs = stackalloc int[6];
@ -91,7 +99,7 @@ public static class BatchMods
pk.SetEVs(evs);
}
private static Shiny GetRequestedShinyState(string text) => text.Length == 0 ? Shiny.Random : GetRequestedShinyState(text[^1]);
private static Shiny GetRequestedShinyState(ReadOnlySpan<char> text) => text.Length == 0 ? Shiny.Random : GetRequestedShinyState(text[^1]);
private static Shiny GetRequestedShinyState(char last) => last switch
{

View file

@ -1,6 +1,9 @@
using System;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Text;
using static PKHeX.Core.InstructionComparer;
namespace PKHeX.Core;
@ -10,16 +13,17 @@ namespace PKHeX.Core;
/// <remarks>
/// Can be a filter (skip), or a modification instruction (modify)
/// </remarks>
/// <see cref="Exclude"/>
/// <see cref="Require"/>
/// <see cref="FilterNotEqual"/>
/// <see cref="FilterEqual"/>
/// <see cref="Apply"/>
public sealed class StringInstruction
{
/// <summary> Property to modify. </summary>
public string PropertyName { get; }
/// <summary> Value to set to the property. </summary>
public string PropertyValue { get; private set; }
/// <summary> True if ==, false if != </summary>
public bool Evaluator { get; private init; }
/// <summary> Filter Comparison Type </summary>
public InstructionComparer Comparer { get; private init; }
public StringInstruction(string name, string value)
{
@ -27,18 +31,23 @@ public sealed class StringInstruction
PropertyValue = value;
}
public void SetScreenedValue(string[] arr)
public void SetScreenedValue(ReadOnlySpan<string> arr)
{
int index = Array.IndexOf(arr, PropertyValue);
PropertyValue = index > -1 ? index.ToString() : PropertyValue;
int index = arr.IndexOf(PropertyValue);
PropertyValue = (uint)index >= arr.Length ? index.ToString() : PropertyValue;
}
public static readonly IReadOnlyList<char> Prefixes = new[] { Apply, Require, Exclude };
private const char Exclude = '!';
private const char Require = '=';
public static readonly IReadOnlyList<char> Prefixes = new[] { Apply, FilterEqual, FilterNotEqual, FilterGreaterThan, FilterGreaterThanOrEqual, FilterLessThan, FilterLessThanOrEqual };
private const char Apply = '.';
private const char SplitRange = ',';
private const char FilterEqual = '=';
private const char FilterNotEqual = '!';
private const char FilterGreaterThan = '>';
private const char FilterLessThan = '<';
private const char FilterGreaterThanOrEqual = '≥';
private const char FilterLessThanOrEqual = '≤';
/// <summary>
/// Character which divides a property and a value.
/// </summary>
@ -54,12 +63,30 @@ public sealed class StringInstruction
public bool Random { get; private set; }
public int RandomValue => Util.Rand.Next(RandomMinimum, RandomMaximum + 1);
public void SetRandRange(string pv)
/// <summary>
/// Checks if the input <see cref="str"/> is a valid "random range" specification.
/// </summary>
public static bool IsRandomRange(ReadOnlySpan<char> str)
{
string str = pv[1..];
var split = str.Split(SplitRange);
int.TryParse(split[0], out RandomMinimum);
int.TryParse(split[1], out RandomMaximum);
// Need at least one character on either side of the splitter char.
int index = str.IndexOf(SplitRange);
return index > 0 && index < str.Length - 1;
}
/// <summary>
/// Sets a "random range" specification to the instruction.
/// </summary>
/// <exception cref="ArgumentException">When the splitter is not present.</exception>
public void SetRandomRange(ReadOnlySpan<char> str)
{
var index = str.IndexOf(SplitRange);
if (index <= 0)
throw new ArgumentException($"Invalid Random Range: {str.ToString()}", nameof(str));
var min = str[..index];
var max = str[(index + 1)..];
_ = int.TryParse(min, out RandomMinimum);
_ = int.TryParse(max, out RandomMaximum);
if (RandomMinimum == RandomMaximum)
{
@ -72,52 +99,217 @@ public sealed class StringInstruction
}
}
public static IEnumerable<StringInstruction> GetFilters(IEnumerable<string> lines)
public static List<StringInstruction> GetFilters(ReadOnlySpan<char> text) => GetFilters(text.EnumerateLines());
public static List<StringInstruction> GetFilters(ReadOnlySpan<string> lines)
{
var result = new List<StringInstruction>(lines.Length);
foreach (var line in lines)
{
if (line.Length is 0 || line[0] is not (Exclude or Require))
continue;
const int start = 1;
var splitIndex = line.IndexOf(SplitInstruction, start);
if (splitIndex == -1)
continue;
var noExtra = line.IndexOf(SplitInstruction, splitIndex + 1);
if (noExtra != -1)
continue;
var name = line.AsSpan(start, splitIndex - start);
if (name.IsWhiteSpace())
continue;
bool eval = line[0] == Require;
var value = line[(splitIndex + 1)..];
yield return new StringInstruction(name.ToString(), value) { Evaluator = eval };
if (TryParseFilter(line, out var entry))
result.Add(entry);
}
return result;
}
public static IEnumerable<StringInstruction> GetInstructions(IEnumerable<string> lines)
public static List<StringInstruction> GetFilters(SpanLineEnumerator lines)
{
var result = new List<StringInstruction>();
foreach (var line in lines)
{
if (TryParseFilter(line, out var entry))
result.Add(entry);
}
return result;
}
public static List<StringInstruction> GetFilters(IReadOnlyList<string> lines)
{
var result = new List<StringInstruction>(lines.Count);
foreach (var line in lines)
{
if (TryParseFilter(line, out var entry))
result.Add(entry);
}
return result;
}
public static List<StringInstruction> GetFilters(IEnumerable<string> lines)
{
var result = new List<StringInstruction>();
foreach (var line in lines)
{
if (TryParseFilter(line, out var entry))
result.Add(entry);
}
return result;
}
public static List<StringInstruction> GetInstructions(ReadOnlySpan<char> text) => GetInstructions(text.EnumerateLines());
public static List<StringInstruction> GetInstructions(ReadOnlySpan<string> lines)
{
var result = new List<StringInstruction>(lines.Length);
foreach (var line in lines)
{
if (TryParseInstruction(line, out var entry))
result.Add(entry);
}
return result;
}
public static List<StringInstruction> GetInstructions(SpanLineEnumerator lines)
{
var result = new List<StringInstruction>();
foreach (var line in lines)
{
if (TryParseInstruction(line, out var entry))
result.Add(entry);
}
return result;
}
public static List<StringInstruction> GetInstructions(IReadOnlyList<string> lines)
{
var result = new List<StringInstruction>(lines.Count);
foreach (var line in lines)
{
if (TryParseInstruction(line, out var entry))
result.Add(entry);
}
return result;
}
public static List<StringInstruction> GetInstructions(IEnumerable<string> lines)
{
var result = new List<StringInstruction>();
foreach (var line in lines)
{
if (TryParseInstruction(line, out var entry))
result.Add(entry);
}
return result;
}
public static bool TryParseFilter(ReadOnlySpan<char> line, [NotNullWhen(true)] out StringInstruction? entry)
{
entry = null;
if (line.Length is 0)
return false;
var comparer = GetComparer(line[0]);
if (!comparer.IsSupportedComparer())
return false;
return TryParseSplitTuple(line[1..], ref entry, comparer);
}
public static bool TryParseInstruction(ReadOnlySpan<char> line, [NotNullWhen(true)] out StringInstruction? entry)
{
entry = null;
if (line.Length is 0 || line[0] is not Apply)
continue;
return false;
return TryParseSplitTuple(line[1..], ref entry);
}
const int start = 1;
var splitIndex = line.IndexOf(SplitInstruction, start);
if (splitIndex == -1)
continue;
var noExtra = line.IndexOf(SplitInstruction, splitIndex + 1);
if (noExtra != -1)
continue;
public static bool TryParseSplitTuple(ReadOnlySpan<char> tuple, [NotNullWhen(true)] ref StringInstruction? entry, InstructionComparer eval = default)
{
if (!TryParseSplitTuple(tuple, out var name, out var value))
return false;
entry = new StringInstruction(name.ToString(), value.ToString()) { Comparer = eval };
return true;
}
var name = line.AsSpan(start, splitIndex - start);
public static bool TryParseSplitTuple(ReadOnlySpan<char> tuple, out ReadOnlySpan<char> name, out ReadOnlySpan<char> value)
{
name = default;
value = default;
var splitIndex = tuple.IndexOf(SplitInstruction);
if (splitIndex <= 0)
return false;
name = tuple[..splitIndex];
if (name.IsWhiteSpace())
continue;
return false;
var value = line[(splitIndex + 1)..];
yield return new StringInstruction(name.ToString(), value);
value = tuple[(splitIndex + 1)..];
var noExtra = value.IndexOf(SplitInstruction);
if (noExtra != -1)
return false;
return true;
}
public static InstructionComparer GetComparer(char c) => c switch
{
FilterEqual => IsEqual,
FilterNotEqual => IsNotEqual,
FilterGreaterThan => IsGreaterThan,
FilterLessThan => IsLessThan,
FilterGreaterThanOrEqual => IsGreaterThanOrEqual,
FilterLessThanOrEqual => IsLessThanOrEqual,
_ => None,
};
}
/// <summary>
/// Value comparison type
/// </summary>
public enum InstructionComparer : byte
{
None,
IsEqual,
IsNotEqual,
IsGreaterThan,
IsGreaterThanOrEqual,
IsLessThan,
IsLessThanOrEqual,
}
public static class InstructionComparerExtensions
{
/// <summary>
/// Indicates if the <see cref="comparer"/> is supported by the logic.
/// </summary>
/// <param name="comparer">Type of comparison requested</param>
/// <returns>True if supported, false if unsupported.</returns>
public static bool IsSupportedComparer(this InstructionComparer comparer) => comparer switch
{
IsEqual => true,
IsNotEqual => true,
IsGreaterThan => true,
IsGreaterThanOrEqual => true,
IsLessThan => true,
IsLessThanOrEqual => true,
_ => false,
};
/// <summary>
/// Checks if the compare operator is satisfied by a boolean comparison result.
/// </summary>
/// <param name="comparer">Type of comparison requested</param>
/// <param name="compareResult">Result from Equals comparison</param>
/// <returns>True if satisfied</returns>
/// <remarks>Only use this method if the comparison is boolean only. Use the <see cref="IsCompareOperator"/> otherwise.</remarks>
public static bool IsCompareEquivalence(this InstructionComparer comparer, bool compareResult) => comparer switch
{
IsEqual => compareResult,
IsNotEqual => !compareResult,
_ => false,
};
/// <summary>
/// Checks if the compare operator is satisfied by the <see cref="IComparable.CompareTo"/> result.
/// </summary>
/// <param name="comparer">Type of comparison requested</param>
/// <param name="compareResult">Result from CompareTo</param>
/// <returns>True if satisfied</returns>
public static bool IsCompareOperator(this InstructionComparer comparer, int compareResult) => comparer switch
{
IsEqual => compareResult is 0,
IsNotEqual => compareResult is not 0,
IsGreaterThan => compareResult > 0,
IsGreaterThanOrEqual => compareResult >= 0,
IsLessThan => compareResult < 0,
IsLessThanOrEqual => compareResult <= 0,
_ => false,
};
}

View file

@ -1,6 +1,6 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PKHeX.Core;
@ -13,6 +13,7 @@ public sealed class StringInstructionSet
public readonly IReadOnlyList<StringInstruction> Instructions;
private const string SetSeparator = ";";
private const char SetSeparatorChar = ';';
public StringInstructionSet(IReadOnlyList<StringInstruction> filters, IReadOnlyList<StringInstruction> instructions)
{
@ -20,19 +21,129 @@ public sealed class StringInstructionSet
Instructions = instructions;
}
public StringInstructionSet(ICollection<string> set)
public StringInstructionSet(ReadOnlySpan<char> text)
{
Filters = StringInstruction.GetFilters(set).ToList();
Instructions = StringInstruction.GetInstructions(set).ToList();
var set = text.EnumerateLines();
Filters = StringInstruction.GetFilters(set);
Instructions = StringInstruction.GetInstructions(set);
}
public static IEnumerable<StringInstructionSet> GetBatchSets(IList<string> lines)
public StringInstructionSet(SpanLineEnumerator set)
{
Filters = StringInstruction.GetFilters(set);
Instructions = StringInstruction.GetInstructions(set);
}
public StringInstructionSet(ReadOnlySpan<string> set)
{
Filters = StringInstruction.GetFilters(set);
Instructions = StringInstruction.GetInstructions(set);
}
/// <summary>
/// Checks if the input <see cref="text"/> is potentially formatted incorrectly.
/// </summary>
/// <remarks>Normally, no blank lines should be present in the input.</remarks>
/// <returns>True if a blank line is found in the input.</returns>
public static bool HasEmptyLine(ReadOnlySpan<char> text) => HasEmptyLine(text.EnumerateLines());
/// <inheritdoc cref="HasEmptyLine(ReadOnlySpan{char})"/>
public static bool HasEmptyLine(SpanLineEnumerator lines)
{
foreach (var line in lines)
{
if (line.IsEmpty || line.IsWhiteSpace())
return true;
}
return false;
}
public static StringInstructionSet[] GetBatchSets(ReadOnlySpan<string> lines)
{
int ctr = 0;
int start = 0;
while (start < lines.Length)
{
var slice = lines[start..];
var count = GetInstructionSetLength(slice);
ctr++;
start += count + 1;
}
var result = new StringInstructionSet[ctr];
ctr = 0;
start = 0;
while (start < lines.Length)
{
var slice = lines[start..];
var count = GetInstructionSetLength(slice);
var set = slice[..count];
result[ctr++] = new StringInstructionSet(set);
start += count + 1;
}
return result;
}
public static StringInstructionSet[] GetBatchSets(ReadOnlySpan<char> text)
{
int ctr = 0;
int start = 0;
while (start < text.Length)
{
var slice = text[start..];
var count = GetInstructionSetLength(slice);
ctr++;
start += count + 1;
}
var result = new StringInstructionSet[ctr];
ctr = 0;
start = 0;
while (start < text.Length)
{
var slice = text[start..];
var count = GetInstructionSetLength(slice);
var set = slice[..count];
result[ctr++] = new StringInstructionSet(set);
start += count + 1;
}
return result;
}
/// <summary>
/// Scans through the <see cref="text"/> to count the amount of characters to consume.
/// </summary>
/// <param name="text">Multi line string</param>
/// <returns>Amount of characters comprising a set of instructions</returns>
public static int GetInstructionSetLength(ReadOnlySpan<char> text)
{
int start = 0;
while (start < lines.Count)
while (start < text.Length)
{
var list = lines.Skip(start).TakeWhile(_ => !lines[start++].StartsWith(SetSeparator, StringComparison.Ordinal)).ToList();
yield return new StringInstructionSet(list);
}
var line = text[start..];
if (line.Length != 0 && line[0] == SetSeparatorChar)
return start;
var next = line.IndexOf('\n');
if (next == -1)
return text.Length;
start += next + 1;
}
return start;
}
/// <summary>
/// Scans through the <see cref="lines"/> to count the amount of valid lines to consume.
/// </summary>
/// <returns>Amount of lines comprising a set of instructions.</returns>
public static int GetInstructionSetLength(ReadOnlySpan<string> lines)
{
int start = 0;
while (start < lines.Length)
{
var line = lines[start++];
if (line.Length != 0 && line[0] == SetSeparatorChar)
return start;
}
return start;
}
}

View file

@ -7,10 +7,10 @@ namespace PKHeX.Core;
/// </summary>
internal static class BatchModifications
{
private static bool IsAll(string p) => p.EndsWith("All", StringComparison.OrdinalIgnoreCase);
private static bool IsNone(string p) => p.EndsWith("None", StringComparison.OrdinalIgnoreCase);
private static bool IsAll(ReadOnlySpan<char> p) => p.EndsWith("All", StringComparison.OrdinalIgnoreCase);
private static bool IsNone(ReadOnlySpan<char> p) => p.EndsWith("None", StringComparison.OrdinalIgnoreCase);
public static ModifyResult SetSuggestedRelearnData(BatchInfo info, string propValue)
public static ModifyResult SetSuggestedRelearnData(BatchInfo info, ReadOnlySpan<char> propValue)
{
var pk = info.Entity;
if (pk is ITechRecord t)
@ -32,7 +32,7 @@ internal static class BatchModifications
return ModifyResult.Modified;
}
public static ModifyResult SetSuggestedMasteryData(BatchInfo info, string propValue)
public static ModifyResult SetSuggestedMasteryData(BatchInfo info, ReadOnlySpan<char> propValue)
{
var pk = info.Entity;
if (pk is not IMoveShop8Mastery t)
@ -52,7 +52,7 @@ internal static class BatchModifications
return ModifyResult.Modified;
}
public static ModifyResult SetSuggestedRibbons(BatchInfo info, string value)
public static ModifyResult SetSuggestedRibbons(BatchInfo info, ReadOnlySpan<char> value)
{
if (IsNone(value))
RibbonApplicator.RemoveAllValidRibbons(info.Legality);
@ -111,7 +111,7 @@ internal static class BatchModifications
/// <param name="pk">Pokémon to modify.</param>
/// <param name="la">Legality Information matched to.</param>
/// <param name="option">Option to apply with</param>
public static ModifyResult SetContestStats(PKM pk, LegalityAnalysis la, string option)
public static ModifyResult SetContestStats(PKM pk, LegalityAnalysis la, ReadOnlySpan<char> option)
{
if (option.Length != 0 && option[BatchEditing.CONST_SUGGEST.Length..] is not "0")
pk.SetMaxContestStats(la.EncounterMatch, la.Info.EvoChainsAllGens);

View file

@ -142,7 +142,7 @@ public static class CommonEdits
/// <param name="nature">Desired <see cref="PKM.Nature"/> value to set.</param>
public static void SetNature(this PKM pk, int nature)
{
var value = Math.Min((int)Nature.Quirky, Math.Max((int)Nature.Hardy, nature));
var value = Math.Clamp(nature, (int)Nature.Hardy, (int)Nature.Quirky);
var format = pk.Format;
if (format >= 8)
pk.StatNature = value;
@ -192,7 +192,7 @@ public static class CommonEdits
// IVs have no side effects such as hidden power type in gen 8
// therefore all specified IVs are deliberate and should not be Hyper Trained for pokemon met in gen 8
if (!pk.Gen8)
if (pk.Generation < 8)
pk.SetSuggestedHyperTrainingData(Set.IVs);
if (ShowdownSetIVMarkings)
@ -313,7 +313,7 @@ public static class CommonEdits
var sum = pk.EVTotal - pk.GetEV(index);
int remaining = 510 - sum;
return Math.Min(Math.Max(remaining, 0), 252);
return Math.Clamp(remaining, 0, 252);
}
/// <summary>
@ -350,7 +350,7 @@ public static class CommonEdits
var loc = EncounterSuggestion.GetSuggestedEggMetLocation(pk);
if (loc >= 0)
pk.Met_Location = loc;
pk.MetDate = DateTime.Today;
pk.MetDate = DateOnly.FromDateTime(DateTime.Today);
if (pk.Gen6)
pk.SetHatchMemory6();
}
@ -364,7 +364,7 @@ public static class CommonEdits
public static void SetEggMetData(this PKM pk, GameVersion origin, GameVersion dest)
{
bool traded = origin != dest;
var today = pk.MetDate = DateTime.Today;
var today = pk.MetDate = DateOnly.FromDateTime(DateTime.Today);
pk.Egg_Location = EncounterSuggestion.GetSuggestedEncounterEggLocationEgg(pk.Generation, origin, traded);
pk.EggMetDate = today;
}
@ -403,7 +403,7 @@ public static class CommonEdits
/// <param name="la">Precomputed optional</param>
public static void SetDefaultNickname(this PKM pk, LegalityAnalysis la)
{
if (la.Parsed && la.EncounterOriginal is EncounterTrade {HasNickname: true} t)
if (la is { Parsed: true, EncounterOriginal: EncounterTrade {HasNickname: true} t })
pk.SetNickname(t.GetNickname(pk.Language));
else
pk.ClearNickname();
@ -468,7 +468,7 @@ public static class CommonEdits
'0' or '3' => 0u,
_ when pk.Species is (int)Species.Dudunsparce && pk.Form == 1 => 0, // 3 Segment
_ when pk.Species is (int)Species.Maushold && pk.Form == 0 => 0, // Family of 3
_ => (uint)rng.Next(1, 100)
_ => (uint)rng.Next(1, 100),
};
}
else if (option is >= '0' and <= '5')

View file

@ -131,7 +131,7 @@ public sealed class TrainerDatabase
{
var result = new SimpleTrainerInfo((GameVersion)pk.Version)
{
TID = pk.TID, SID = pk.SID, OT = pk.OT_Name, Gender = pk.OT_Gender,
TID16 = pk.TID16, SID16 = pk.SID16, OT = pk.OT_Name, Gender = pk.OT_Gender,
Language = pk.Language,
Generation = pk.Generation,
};

View file

@ -196,7 +196,7 @@ public static class HiddenPower
/// These are just precomputed for fast modification.
/// Individual Values (H/A/B/S/C/D)
/// </remarks>
public static readonly byte[] DefaultLowBits =
public static ReadOnlySpan<byte> DefaultLowBits => new byte[]
{
0b000011, // Fighting
0b001000, // Flying

View file

@ -6,7 +6,7 @@ namespace PKHeX.Core;
/// <summary>
/// Bindable summary object that can fetch strings that summarize a <see cref="PKM"/>.
/// </summary>
public class EntitySummary // do NOT seal, allow inheritance
public class EntitySummary : IFatefulEncounterReadOnly // do NOT seal, allow inheritance
{
private static readonly IReadOnlyList<string> GenderSymbols = GameInfo.GenderSymbolASCII;
@ -76,14 +76,14 @@ public class EntitySummary // do NOT seal, allow inheritance
public int MetLevel => pk.Met_Level;
public int OT_Gender => pk.OT_Gender;
public bool FatefulFlag => pk.FatefulEncounter;
public bool FatefulEncounter => pk.FatefulEncounter;
public bool IsEgg => pk.IsEgg;
public bool IsNicknamed => pk.IsNicknamed;
public bool IsShiny => pk.IsShiny;
public int TID => pk.DisplayTID;
public int SID => pk.DisplaySID;
public int TSV => pk.TSV;
public ushort TID16 => pk.TID16;
public ushort SID16 => pk.SID16;
public uint TSV => pk.TSV;
public int Move1_PP => pk.Move1_PP;
public int Move2_PP => pk.Move2_PP;
public int Move3_PP => pk.Move3_PP;

View file

@ -17,7 +17,7 @@ public static class EntityTemplates
pk.Move1 = (int)Move.Pound;
pk.HealPP();
pk.Ball = 4;
pk.MetDate = DateTime.Today;
pk.MetDate = DateOnly.FromDateTime(DateTime.Today);
if (tr.Game >= 0)
pk.Version = tr.Game;
@ -30,8 +30,7 @@ public static class EntityTemplates
pk.OT_Name = tr.OT;
pk.OT_Gender = tr.Gender;
pk.TID = tr.TID;
pk.SID = tr.SID;
pk.ID32 = tr.ID32;
if (tr is IRegionOrigin o && pk is IRegionOrigin gt)
{
gt.ConsoleRegion = o.ConsoleRegion;

View file

@ -1,4 +1,5 @@
using System;
using System.Buffers;
using System.Text;
namespace PKHeX.Core;
@ -20,7 +21,7 @@ public static class QRMessageUtil
/// <param name="message">QR Message</param>
/// <param name="context">Preferred <see cref="PKM.Context"/> to expect.</param>
/// <returns>Decoded <see cref="PKM"/> object, null if invalid.</returns>
public static PKM? GetPKM(string message, EntityContext context)
public static PKM? GetPKM(ReadOnlySpan<char> message, EntityContext context)
{
var data = DecodeMessagePKM(message);
if (data == null)
@ -71,13 +72,13 @@ public static class QRMessageUtil
return GetMessageBase64(data, server);
}
public static string GetMessageBase64(byte[] data, string server)
public static string GetMessageBase64(ReadOnlySpan<byte> data, string server)
{
string payload = Convert.ToBase64String(data);
return server + payload;
}
private static byte[]? DecodeMessagePKM(string message)
private static byte[]? DecodeMessagePKM(ReadOnlySpan<char> message)
{
if (message.Length < 32) // arbitrary length check; everything should be greater than this
return null;
@ -89,27 +90,24 @@ public static class QRMessageUtil
const int g7size = 0xE8;
const int g7intro = 0x30;
if (message.StartsWith("POKE", StringComparison.Ordinal) && message.Length > g7intro + g7size) // G7 data
return GetBytesFromMessage(message.AsSpan(g7intro), g7size);
return GetBytesFromMessage(message[g7intro..], g7size);
return null;
}
private static byte[]? DecodeMessageDataBase64(string url)
{
if (url.Length == 0 || url[^1] == '#')
return null;
try
private static byte[]? DecodeMessageDataBase64(ReadOnlySpan<char> url)
{
int payloadBegin = url.IndexOf('#');
if (payloadBegin < 0) // bad URL, need the payload separator
return null;
if (payloadBegin == -1)
return null; // bad URL, need the payload separator
if (payloadBegin == url.Length - 1)
return null; // no payload
url = url[(payloadBegin + 1)..]; // Trim URL to right after #
return Convert.FromBase64String(url);
}
catch (FormatException)
{
return null;
}
// Decode unicode string -- size might be pretty big (user input), so just rent instead of stackalloc
var tmp = ArrayPool<byte>.Shared.Rent(url.Length);
var result = Convert.TryFromBase64Chars(url, tmp, out int bytesWritten) ? tmp[..bytesWritten] : null;
ArrayPool<byte>.Shared.Return(tmp);
return result;
}
private static byte[] GetBytesFromMessage(ReadOnlySpan<char> input, int count)

View file

@ -113,7 +113,7 @@ public sealed class QRPK7 : IEncounterInfo
HT_Name = tr.OT,
CurrentLevel = Level,
Met_Level = Level,
MetDate = DateTime.Now,
MetDate = DateOnly.FromDateTime(DateTime.Today),
};
RecentTrainerCache.SetConsoleRegionData3DS(pk, tr);

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@ -103,7 +103,11 @@ public sealed class StartupArguments
var tr = SaveUtil.GetSafeTrainerName(current, lang);
var sav = SaveUtil.GetBlankSAV(version, tr, lang);
if (sav.Version == GameVersion.Invalid) // will fail to load
sav = SaveUtil.GetBlankSAV((GameVersion)GameInfo.VersionDataSource.Max(z => z.Value), tr, lang);
{
var max = GameInfo.VersionDataSource.MaxBy(z => z.Value) ?? throw new Exception();
var ver = (GameVersion)max.Value;
sav = SaveUtil.GetBlankSAV(ver, tr, lang);
}
return sav;
}

View file

@ -36,11 +36,13 @@ public static class BoxManipDefaults
new BoxManipSort(SortTraining, list => list.OrderByCustom(pk => (pk.MaxEV * 6) - pk.EVTotal)),
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 => ((ITeraTypeReadOnly)pk).TeraType, pk => pk is ITeraTypeReadOnly)),
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(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),
new BoxManipSort(SortRibbons, list => list.OrderByCustom(pk => pk is IRibbonSetRibbons s ? int.MaxValue - s.RibbonCount : 0), s => s.BlankPKM is IRibbonSetRibbons),
new BoxManipSort(SortMarks, list => list.OrderByCustom(pk => pk is IRibbonSetMarks s ? int.MaxValue - s.MarkCount : 0), s => s.BlankPKM is IRibbonSetMarks),
new BoxManipSort(SortLegal, list => list.OrderByCustom(pk => !new LegalityAnalysis(pk).Valid)),
new BoxManipSort(SortEncounterType, list => list.OrderByCustom(pk => new LegalityAnalysis(pk).Info.EncounterMatch.LongName)),
};

View file

@ -35,6 +35,8 @@ public enum BoxManipType
SortBST,
SortCP,
SortScale,
SortRibbons,
SortMarks,
SortLegal,
SortEncounterType,

View file

@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
namespace PKHeX.Core;
@ -12,267 +11,7 @@ public sealed class EventLabelCollection
{
var f = GameLanguage.GetStrings(game, GameInfo.CurrentLanguage, "flags");
var c = GameLanguage.GetStrings(game, GameInfo.CurrentLanguage, "const");
Flag = GetFlags(f, maxFlag);
Work = GetValues(c, maxValue);
Flag = EventLabelParsing.GetFlags(f, maxFlag);
Work = EventLabelParsing.GetWork(c, maxValue);
}
private static List<NamedEventValue> GetFlags(IReadOnlyCollection<string> strings, int maxValue)
{
var result = new List<NamedEventValue>(strings.Count);
var processed = new HashSet<int>();
foreach (var s in strings)
{
var split = s.Split('\t');
if (split.Length != 3)
continue;
var index = TryParseHexDec(split[0]);
if (index >= maxValue)
throw new ArgumentOutOfRangeException(nameof(index), index, "Value too high.");
if (processed.Contains(index))
throw new ArgumentOutOfRangeException(nameof(index), index, "Already have an entry for this!");
var type = GetEventType(split[1]);
var desc = split[2];
var item = new NamedEventValue(desc, index, type);
result.Add(item);
processed.Add(index);
}
return result;
}
private static readonly NamedEventConst Custom = new("Custom", NamedEventConst.CustomMagicValue);
private static readonly NamedEventConst[] Empty = {Custom};
private static IReadOnlyList<NamedEventWork> GetValues(IReadOnlyCollection<string> strings, int maxValue)
{
var result = new List<NamedEventWork>(strings.Count);
var processed = new HashSet<int>();
foreach (var s in strings)
{
var split = s.Split('\t');
if (split.Length is not (3 or 4))
continue;
var index = TryParseHexDecConst(split[0]);
if (index >= maxValue)
throw new ArgumentOutOfRangeException(nameof(index), index, "Value too high.");
if (processed.Contains(index))
throw new ArgumentOutOfRangeException(nameof(index), index, "Already have an entry for this!");
var type = GetEventType(split[1]);
var desc = split[2];
var predefined = split.Length is 3 ? Empty : GetPredefinedArray(split[3]);
var item = new NamedEventWork(desc, index, type, predefined);
result.Add(item);
processed.Add(index);
}
return result;
}
private static IReadOnlyList<NamedEventConst> GetPredefinedArray(string combined)
{
var result = new List<NamedEventConst> {Custom};
var split = combined.Split(',');
foreach (var entry in split)
{
var subsplit = entry.Split(':');
var name = subsplit[1];
var value = Convert.ToUInt16(subsplit[0], 10);
result.Add(new NamedEventConst(name, value));
}
return result;
}
private static int TryParseHexDec(string flag)
{
if (!flag.StartsWith("0x", StringComparison.Ordinal))
return Convert.ToInt16(flag, 10);
flag = flag[2..];
return Convert.ToInt16(flag, 16);
}
private static int TryParseHexDecConst(string c)
{
if (!c.StartsWith("0x40", StringComparison.Ordinal))
return Convert.ToInt16(c, 10);
c = c[4..];
return Convert.ToInt16(c, 16);
}
private static NamedEventType GetEventType(string s) => s.Length == 0 ? 0 : GetEventType(s[0]);
private static NamedEventType GetEventType(char c) => c switch
{
'h' => NamedEventType.HiddenItem,
'm' => NamedEventType.Misc,
'f' => NamedEventType.FlyToggle,
't' => NamedEventType.TrainerToggle,
's' => NamedEventType.StoryProgress,
'a' => NamedEventType.Achievement,
'+' => NamedEventType.Statistic,
'*' => NamedEventType.UsefulFeature,
'e' => NamedEventType.EncounterEvent,
'g' => NamedEventType.GiftAvailable,
'r' => NamedEventType.Rebattle,
_ => NamedEventType.None,
};
}
public sealed class EventLabelCollectionSystem
{
public readonly IReadOnlyList<NamedEventWork> Work;
public readonly IReadOnlyList<NamedEventValue> Flag;
public readonly IReadOnlyList<NamedEventValue> System;
public EventLabelCollectionSystem(string game, int maxFlag = int.MaxValue, int maxSystem = int.MaxValue, int maxValue = int.MaxValue)
{
var f = GameLanguage.GetStrings(game, GameInfo.CurrentLanguage, "flag");
var s = GameLanguage.GetStrings(game, GameInfo.CurrentLanguage, "system");
var c = GameLanguage.GetStrings(game, GameInfo.CurrentLanguage, "work");
Flag = GetFlags(f, maxFlag);
System = GetFlags(s, maxSystem);
Work = GetValues(c, maxValue);
}
private static List<NamedEventValue> GetFlags(IReadOnlyCollection<string> strings, int maxValue)
{
var result = new List<NamedEventValue>(strings.Count);
var processed = new HashSet<int>();
foreach (var s in strings)
{
var split = s.Split('\t');
if (split.Length != 3)
continue;
var index = TryParseHexDec(split[0]);
if (index >= maxValue)
throw new ArgumentOutOfRangeException(nameof(index), index, "Value too high.");
if (processed.Contains(index))
throw new ArgumentOutOfRangeException(nameof(index), index, "Already have an entry for this!");
var type = GetEventType(split[1]);
var desc = split[2];
var item = new NamedEventValue(desc, index, type);
result.Add(item);
processed.Add(index);
}
return result;
}
private static readonly NamedEventConst Custom = new("Custom", NamedEventConst.CustomMagicValue);
private static readonly NamedEventConst[] Empty = { Custom };
private static IReadOnlyList<NamedEventWork> GetValues(IReadOnlyCollection<string> strings, int maxValue)
{
var result = new List<NamedEventWork>(strings.Count);
var processed = new HashSet<int>();
foreach (var s in strings)
{
var split = s.Split('\t');
if (split.Length is not (3 or 4))
continue;
var index = TryParseHexDecConst(split[0]);
if (index >= maxValue)
throw new ArgumentOutOfRangeException(nameof(index), index, "Value too high.");
if (processed.Contains(index))
throw new ArgumentOutOfRangeException(nameof(index), index, "Already have an entry for this!");
var type = GetEventType(split[1]);
var desc = split[2];
var predefined = split.Length is 3 ? Empty : GetPredefinedArray(split[3]);
var item = new NamedEventWork(desc, index, type, predefined);
result.Add(item);
processed.Add(index);
}
return result;
}
private static IReadOnlyList<NamedEventConst> GetPredefinedArray(string combined)
{
var result = new List<NamedEventConst> { Custom };
var split = combined.Split(',');
foreach (var entry in split)
{
var subsplit = entry.Split(':');
var name = subsplit[1];
var value = Convert.ToUInt16(subsplit[0], 10);
result.Add(new NamedEventConst(name, value));
}
return result;
}
private static int TryParseHexDec(string flag)
{
if (!flag.StartsWith("0x", StringComparison.Ordinal))
return Convert.ToInt16(flag, 10);
flag = flag[2..];
return Convert.ToInt16(flag, 16);
}
private static int TryParseHexDecConst(string c)
{
if (!c.StartsWith("0x40", StringComparison.Ordinal))
return Convert.ToInt16(c, 10);
c = c[4..];
return Convert.ToInt16(c, 16);
}
private static NamedEventType GetEventType(string s) => s.Length == 0 ? 0 : GetEventType(s[0]);
private static NamedEventType GetEventType(char c) => c switch
{
'h' => NamedEventType.HiddenItem,
'm' => NamedEventType.Misc,
'f' => NamedEventType.FlyToggle,
't' => NamedEventType.TrainerToggle,
's' => NamedEventType.StoryProgress,
'a' => NamedEventType.Achievement,
'+' => NamedEventType.Statistic,
'*' => NamedEventType.UsefulFeature,
'e' => NamedEventType.EncounterEvent,
'g' => NamedEventType.GiftAvailable,
'r' => NamedEventType.Rebattle,
_ => NamedEventType.None,
};
}
public enum NamedEventType
{
None,
HiddenItem,
TrainerToggle,
StoryProgress,
FlyToggle,
Misc,
Statistic,
Achievement,
UsefulFeature,
EncounterEvent,
GiftAvailable,
Rebattle = 100,
}
public record NamedEventValue(string Name, int Index, NamedEventType Type);
public sealed record NamedEventWork(string Name, int Index, NamedEventType Type, IReadOnlyList<NamedEventConst> PredefinedValues) : NamedEventValue(Name, Index, Type);
public sealed record NamedEventConst(string Name, ushort Value)
{
public bool IsCustom => Value == CustomMagicValue;
public const ushort CustomMagicValue = ushort.MaxValue;
}

View file

@ -0,0 +1,20 @@
using System.Collections.Generic;
namespace PKHeX.Core;
public sealed class EventLabelCollectionSystem
{
public readonly IReadOnlyList<NamedEventWork> Work;
public readonly IReadOnlyList<NamedEventValue> Flag;
public readonly IReadOnlyList<NamedEventValue> System;
public EventLabelCollectionSystem(string game, int maxFlag = int.MaxValue, int maxSystem = int.MaxValue, int maxValue = int.MaxValue)
{
var f = GameLanguage.GetStrings(game, GameInfo.CurrentLanguage, "flag");
var s = GameLanguage.GetStrings(game, GameInfo.CurrentLanguage, "system");
var c = GameLanguage.GetStrings(game, GameInfo.CurrentLanguage, "work");
Flag = EventLabelParsing.GetFlags(f, maxFlag);
System = EventLabelParsing.GetFlags(s, maxSystem);
Work = EventLabelParsing.GetWork(c, maxValue);
}
}

View file

@ -0,0 +1,155 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
namespace PKHeX.Core;
/// <summary>
/// Logic for parsing labeled scripted event schemas into labeled tags.
/// </summary>
public static class EventLabelParsing
{
private const char Split = '\t';
private static readonly NamedEventConst Custom = new("Custom", NamedEventConst.CustomMagicValue);
private static readonly NamedEventConst[] Empty = { Custom };
public static List<NamedEventValue> GetFlags(ReadOnlySpan<string> strings, int maxValue = int.MaxValue)
{
var result = new List<NamedEventValue>(strings.Length);
var processed = new HashSet<int>(strings.Length);
foreach (var line in strings)
{
if (!TryParseValue(line, out var item))
continue;
SanityCheck(item, processed, maxValue);
result.Add(item);
}
return result;
}
public static List<NamedEventWork> GetWork(ReadOnlySpan<string> strings, int maxValue = int.MaxValue)
{
var result = new List<NamedEventWork>(strings.Length);
var processed = new HashSet<int>(strings.Length);
foreach (var line in strings)
{
if (!TryParseWork(line, out var item))
continue;
SanityCheck(item, processed, maxValue);
result.Add(item);
}
return result;
}
private static void SanityCheck(NamedEventValue item, ISet<int> processed, int maxValue)
{
var index = item.Index;
if (index >= maxValue)
throw new ArgumentOutOfRangeException(nameof(index), index, "Value too high.");
if (processed.Contains(index))
throw new ArgumentOutOfRangeException(nameof(index), index, "Already have an entry for this!");
processed.Add(index);
}
public static bool TryParseValue(ReadOnlySpan<char> value, [NotNullWhen(true)] out NamedEventValue? result)
{
result = null;
var split = value.IndexOf(Split);
if (split < 0)
return false;
var number = value[..split];
var index = TryParseHexDec(number, "0x");
value = value[(split + 1)..];
split = value.IndexOf(Split);
if (split < 0)
return false;
var category = value[..split];
var type = NamedEventTypeUtil.GetEventType(category);
value = value[(split + 1)..];
var desc = value.ToString();
result = new NamedEventValue(desc, index, type);
return true;
}
public static bool TryParseWork(ReadOnlySpan<char> value, [NotNullWhen(true)] out NamedEventWork? item)
{
item = null;
var split = value.IndexOf(Split);
if (split < 0)
return false;
var number = value[..split];
var index = TryParseHexDec(number, "0x4");
value = value[(split + 1)..];
split = value.IndexOf(Split);
if (split < 0)
return false;
var category = value[..split];
var type = NamedEventTypeUtil.GetEventType(category);
value = value[(split + 1)..];
var (desc, predefined) = GetDescPredefined(value);
item = new NamedEventWork(desc, index, type, predefined);
return true;
}
private static (string Description, IReadOnlyList<NamedEventConst> Named) GetDescPredefined(ReadOnlySpan<char> remainder)
{
var split3 = remainder.IndexOf(Split);
if (split3 < 0)
return (remainder.ToString(), Empty);
var values = remainder[(split3 + 1)..];
var desc = remainder[..split3].ToString();
var predefined = GetPredefinedArray(values);
return (desc, predefined);
}
private static IReadOnlyList<NamedEventConst> GetPredefinedArray(ReadOnlySpan<char> combined)
{
var result = new List<NamedEventConst>(Empty);
// x:y tuples separated by ,
while (true)
{
// grab the next tuple span
var next = combined.IndexOf(',');
var tuple = next < 0 ? combined : combined[..next];
var split = tuple.IndexOf(':');
if (split < 0)
break;
// parse the tuple into the name and value object
var value = tuple[..split];
var name = tuple[(split + 1)..];
var val = TryParseHexDec(value, "0x");
var item = new NamedEventConst(name.ToString(), (ushort)val);
result.Add(item);
if (next < 0)
break; // no more tuples
// advance the span to next potential tuple
combined = combined[(next + 1)..];
}
return result;
}
private static int TryParseHexDec(ReadOnlySpan<char> text, ReadOnlySpan<char> hexPrefix)
{
if (!text.StartsWith(hexPrefix))
return int.TryParse(text, out var value) ? value : 0;
text = text[hexPrefix.Length..];
return int.TryParse(text, NumberStyles.HexNumber, null, out var hex) ? hex : 0;
}
}

View file

@ -0,0 +1,46 @@
using System;
using static PKHeX.Core.NamedEventType;
namespace PKHeX.Core;
/// <summary>
/// Type of scripted event label
/// </summary>
public enum NamedEventType
{
None,
HiddenItem,
TrainerToggle,
StoryProgress,
FlyToggle,
Misc,
Statistic,
Achievement,
UsefulFeature,
EventEncounter,
GiftAvailable,
Rebattle = 100,
}
public static class NamedEventTypeUtil
{
public static NamedEventType GetEventType(ReadOnlySpan<char> s) => s.Length == 0 ? None : GetEventType(s[0]);
public static NamedEventType GetEventType(char c) => c switch
{
'h' => HiddenItem,
'm' => Misc,
'f' => FlyToggle,
't' => TrainerToggle,
's' => StoryProgress,
'a' => Achievement,
'+' => Statistic,
'*' => UsefulFeature,
'e' => EventEncounter,
'g' => GiftAvailable,
'r' => Rebattle,
_ => None,
};
}

View file

@ -0,0 +1,3 @@
namespace PKHeX.Core;
public record NamedEventValue(string Name, int Index, NamedEventType Type);

View file

@ -0,0 +1,11 @@
using System.Collections.Generic;
namespace PKHeX.Core;
public sealed record NamedEventWork(string Name, int Index, NamedEventType Type, IReadOnlyList<NamedEventConst> PredefinedValues) : NamedEventValue(Name, Index, Type);
public sealed record NamedEventConst(string Name, ushort Value)
{
public bool IsCustom => Value == CustomMagicValue;
public const ushort CustomMagicValue = ushort.MaxValue;
}

View file

@ -1,6 +1,6 @@
namespace PKHeX.Core;
namespace PKHeX.Core;
public class EventUnlocker8b : EventUnlocker<SAV8BS>
public sealed class EventUnlocker8b : EventUnlocker<SAV8BS>
{
public EventUnlocker8b(SAV8BS sav) : base(sav) { }

View file

@ -5,6 +5,9 @@ using static PKHeX.Core.EventWorkDiffCompatibility;
namespace PKHeX.Core;
/// <summary>
/// Indicates if the compared data is incompatible in any way.
/// </summary>
public enum EventWorkDiffCompatibility
{
Valid,

View file

@ -7,19 +7,19 @@ public sealed class FakeSaveFile : SaveFile
{
public static readonly FakeSaveFile Default = new();
protected internal override string ShortSummary => "Fake Save File";
protected override SaveFile CloneInternal() => this;
protected override FakeSaveFile CloneInternal() => this;
public override string Extension => string.Empty;
public override bool ChecksumsValid => true;
public override string ChecksumInfo => string.Empty;
public override int 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 IPersonalTable Personal => PersonalTable.RS;
public override PersonalTable3 Personal => PersonalTable.RS;
public override int MaxEV => 0;
public override IReadOnlyList<ushort> HeldItems => Legal.HeldItems_RS;
public override int GetBoxOffset(int box) => -1;
public override string GetBoxName(int box) => $"Box {box:00}";
public override void SetBoxName(int box, string value) { }
public override void SetBoxName(int box, ReadOnlySpan<char> value) { }
public override int MaxStringLengthOT => 5;
public override int MaxStringLengthNickname => 5;
public override ushort MaxMoveID => 5;
@ -33,9 +33,9 @@ public sealed class FakeSaveFile : SaveFile
protected override void SetChecksums() { }
public override Type PKMType => typeof(PK3);
protected override PKM GetPKM(byte[] data) => BlankPKM;
protected override PK3 GetPKM(byte[] data) => BlankPKM;
protected override byte[] DecryptPKM(byte[] data) => data;
public override PKM BlankPKM => new PK3();
public override PK3 BlankPKM => new();
public override EntityContext Context => EntityContext.Gen3;
protected override int SIZE_STORED => 0;
protected override int SIZE_PARTY => 0;

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
@ -38,8 +38,8 @@ public sealed class SavePreview
public string Played => Save.PlayTimeString.PadLeft(9, '0');
public string FileTime => File.GetLastWriteTimeUtc(FilePath).ToString("yyyy.MM.dd:hh:mm:ss");
public string TID => Save.Generation >= 7 ? Save.TrainerID7.ToString("000000") : Save.TID.ToString("00000");
public string SID => Save.Generation >= 7 ? Save.TrainerSID7.ToString("0000") : Save.SID.ToString("00000");
public string TID => Save.GetDisplayTID().ToString(Save.TrainerIDDisplayFormat.GetTrainerIDFormatStringTID());
public string SID => Save.GetDisplaySID().ToString(Save.TrainerIDDisplayFormat.GetTrainerIDFormatStringSID());
// ReSharper disable once MemberCanBePrivate.Local
// ReSharper disable once UnusedAutoPropertyAccessor.Local

View file

@ -64,7 +64,7 @@ public sealed class SlotCache : IComparable<SlotCache>
return string.CompareOrdinal(Identify(), other.Identify());
}
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
if (ReferenceEquals(this, obj))
return true;

View file

@ -23,5 +23,8 @@ public enum SlotTouchType
public static class SlotTouchTypeUtil
{
/// <summary>
/// Indicates if the <see cref="SlotTouchType"/> happens after a write operation and the underlying data has been changed.
/// </summary>
public static bool IsContentChange(this SlotTouchType t) => t > SlotTouchType.Get;
}

View file

@ -32,7 +32,7 @@ public sealed class SlotViewInfo<T> : IEquatable<T>
return other.Slot.GetType() == Slot.GetType();
}
public override bool Equals(object obj) => ReferenceEquals(this, obj) || (obj is SlotViewInfo<T> other && Equals(other));
public override bool Equals(object? obj) => ReferenceEquals(this, obj) || (obj is SlotViewInfo<T> other && Equals(other));
public override int GetHashCode() => (Slot.GetHashCode() * 397) ^ View.GetHashCode();
bool IEquatable<T>.Equals(T other) => other != null && Equals(other);
bool IEquatable<T>.Equals(T? other) => other != null && Equals(other);
}

View file

@ -85,11 +85,9 @@ public static class ShowdownParsing
(int)Necrozma when form is "Dusk" => $"{form}-Mane",
(int)Necrozma when form is "Dawn" => $"{form}-Wings",
(int)Polteageist or (int)Sinistea => form == "Antique" ? form : string.Empty,
(int)Tauros when form is "Paldea (Fire)" => "Paldea-Fire",
(int)Tauros when form is "Paldea (Water)" => "Paldea-Water",
(int)Maushold when form is "Family of Four" => "Four",
(int)Furfrou or (int)Greninja or (int)Rockruff or (int)Tatsugiri or (int)Koraidon or (int)Miraidon => string.Empty,
(int)Furfrou or (int)Greninja or (int)Rockruff or (int)Koraidon or (int)Miraidon => string.Empty,
_ => Legal.Totem_USUM.Contains(species) && form == "Large"
? Legal.Totem_Alolan.Contains(species) && species != (int)Mimikyu ? "Alola-Totem" : "Totem"
@ -121,8 +119,6 @@ public static class ShowdownParsing
(int)Zygarde when ability == 211 => $"{(string.IsNullOrWhiteSpace(form) ? "50%" : "10%")}-C",
(int)Greninja when ability == 210 => "Ash", // Battle Bond
(int)Rockruff when ability == 020 => "Dusk", // Rockruff-1
(int)Tauros when form == "Paldea-Fire" => "Paldea (Fire)",
(int)Tauros when form == "Paldea-Water" => "Paldea (Water)",
(int)Maushold when form == "Four" => "Family of Four",
(int)Urshifu or (int)Pikachu or (int)Alcremie => form.Replace('-', ' '), // Strike and Cosplay
@ -156,6 +152,63 @@ public static class ShowdownParsing
yield return new ShowdownSet(setLines);
}
/// <inheritdoc cref="GetShowdownSets(IEnumerable{string})"/>
public static IEnumerable<ShowdownSet> GetShowdownSets(ReadOnlyMemory<char> text)
{
int start = 0;
do
{
var span = text.Span;
var slice = span[start..];
var set = GetShowdownSet(slice, out int length);
if (set.Species == 0)
break;
yield return set;
start += length;
}
while (start < text.Length);
}
/// <inheritdoc cref="GetShowdownSets(ReadOnlyMemory{char})"/>
public static IEnumerable<ShowdownSet> GetShowdownSets(string text) => GetShowdownSets(text.AsMemory());
private static int GetLength(ReadOnlySpan<char> text)
{
// Find the end of the Showdown Set lines.
// The end is implied when:
// - we see a completely whitespace or empty line, or
// - we witness four 'move' definition lines.
int length = 0;
int moveCount = 4;
while (true)
{
var newline = text.IndexOf('\n');
if (newline == -1)
return length + text.Length;
var slice = text[..newline];
var used = newline + 1;
length += used;
if (slice.IsEmpty || slice.IsWhiteSpace())
return length;
if (slice.TrimStart()[0] is '-' or '' && --moveCount == 0)
return length;
text = text[used..];
}
}
public static ShowdownSet GetShowdownSet(ReadOnlySpan<char> text, out int length)
{
length = GetLength(text);
var slice = text[..length];
var set = new ShowdownSet(slice);
while (length < text.Length && text[length] is '\r' or '\n' or ' ')
length++;
return set;
}
/// <summary>
/// Converts the <see cref="PKM"/> data into an importable set format for Pokémon Showdown.
/// </summary>

View file

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Text;
using static PKHeX.Core.Species;
namespace PKHeX.Core;
@ -10,11 +11,9 @@ namespace PKHeX.Core;
public sealed class ShowdownSet : IBattleTemplate
{
private static readonly string[] StatNames = { "HP", "Atk", "Def", "Spe", "SpA", "SpD" };
private static readonly string[] Splitters = {"\r\n", "\n"};
private static readonly string[] StatSplitters = { " / ", " " };
private const string LineSplit = ": ";
private const string ItemSplit = " @ ";
private static readonly char[] ParenJunk = { '(', ')', '[', ']' };
private const string ParenJunk = "()[]";
private const int MAX_SPECIES = (int)MAX_COUNT - 1;
internal const string DefaultLanguage = GameLanguage.DefaultLanguage;
private static readonly GameStrings DefaultStrings = GameInfo.GetStrings(DefaultLanguage);
@ -86,7 +85,7 @@ public sealed class ShowdownSet : IBattleTemplate
/// <summary>
/// Any lines that failed to be parsed.
/// </summary>
public readonly List<string> InvalidLines = new();
public readonly List<string> InvalidLines = new(0);
private GameStrings Strings { get; set; } = DefaultStrings;
@ -94,7 +93,7 @@ public sealed class ShowdownSet : IBattleTemplate
/// Loads a new <see cref="ShowdownSet"/> from the input string.
/// </summary>
/// <param name="input">Single-line string which will be split before loading.</param>
public ShowdownSet(string input) : this(input.Split(Splitters, 0)) { }
public ShowdownSet(ReadOnlySpan<char> input) => LoadLines(input.EnumerateLines());
/// <summary>
/// Loads a new <see cref="ShowdownSet"/> from the input string.
@ -102,10 +101,20 @@ public sealed class ShowdownSet : IBattleTemplate
/// <param name="lines">Enumerable list of lines.</param>
public ShowdownSet(IEnumerable<string> lines) => LoadLines(lines);
private void LoadLines(SpanLineEnumerator lines)
{
ParseLines(lines);
SanitizeResult();
}
private void LoadLines(IEnumerable<string> lines)
{
ParseLines(lines);
SanitizeResult();
}
private void SanitizeResult()
{
FormName = ShowdownParsing.SetShowdownFormName(Species, FormName, Ability);
Form = ShowdownParsing.GetFormFromString(FormName, Strings, Species, Context);
@ -114,23 +123,6 @@ public sealed class ShowdownSet : IBattleTemplate
ReviseGenderedForms();
}
private static IEnumerable<string> GetSanitizedLines(IEnumerable<string> lines)
{
foreach (var line in lines)
{
var trim = line.Trim();
if (trim.Length <= 2)
continue;
// Sanitize apostrophes & dashes
if (trim.IndexOf('\'') != -1)
trim = trim.Replace('\'', '');
if (trim.IndexOf('') != -1)
trim = trim.Replace('', '-');
yield return trim;
}
}
private void ReviseGenderedForms()
{
if (Gender == 1) // Recognized with (F)
@ -147,24 +139,59 @@ public sealed class ShowdownSet : IBattleTemplate
private const int MaxMoveCount = 4;
private void ParseLines(SpanLineEnumerator lines)
{
int movectr = 0;
bool first = true;
foreach (var line in lines)
{
ReadOnlySpan<char> trim = line.Trim();
if (trim.Length is <= 2 or >= 40)
{
InvalidLines.Add(line.ToString());
continue;
}
if (first)
{
ParseFirstLine(trim);
first = false;
continue;
}
if (ParseLine(trim, ref movectr))
return; // End of moves, end of set data
}
}
private void ParseLines(IEnumerable<string> lines)
{
lines = GetSanitizedLines(lines);
using var e = lines.GetEnumerator();
if (!e.MoveNext())
return;
ParseFirstLine(e.Current!);
int movectr = 0;
while (e.MoveNext())
bool first = true;
foreach (var line in lines)
{
var line = e.Current!;
if (line.Length < 3)
ReadOnlySpan<char> trim = line.Trim();
if (trim.Length is <= 2 or >= 40)
{
InvalidLines.Add(line);
continue;
}
if (line[0] == '-')
if (first)
{
string moveString = ParseLineMove(line);
ParseFirstLine(trim);
first = false;
continue;
}
if (ParseLine(trim, ref movectr))
return; // End of moves, end of set data
}
}
private bool ParseLine(ReadOnlySpan<char> line, ref int movectr)
{
if (line[0] is '-' or '')
{
var moveString = ParseLineMove(line);
int move = StringUtil.FindIndexIgnoreCase(Strings.movelist, moveString);
if (move < 0)
InvalidLines.Add($"Unknown Move: {moveString}");
@ -173,13 +200,11 @@ public sealed class ShowdownSet : IBattleTemplate
else
Moves[movectr++] = (ushort)move;
if (movectr == MaxMoveCount)
return; // End of moves, end of set data
continue;
return movectr == MaxMoveCount;
}
if (movectr != 0)
break;
return true;
bool valid;
var split = line.IndexOf(LineSplit, StringComparison.Ordinal);
@ -193,12 +218,13 @@ public sealed class ShowdownSet : IBattleTemplate
var right = line[(split + LineSplit.Length)..].Trim();
valid = ParseEntry(left, right);
}
if (!valid)
InvalidLines.Add(line);
}
InvalidLines.Add(line.ToString());
return false;
}
private bool ParseSingle(string identifier)
private bool ParseSingle(ReadOnlySpan<char> identifier)
{
if (!identifier.EndsWith("Nature", StringComparison.OrdinalIgnoreCase))
return false;
@ -209,7 +235,7 @@ public sealed class ShowdownSet : IBattleTemplate
return (Nature = StringUtil.FindIndexIgnoreCase(Strings.natures, naturestr)) >= 0;
}
private bool ParseEntry(string identifier, string value) => identifier switch
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,
@ -224,7 +250,7 @@ public sealed class ShowdownSet : IBattleTemplate
_ => false,
};
private bool ParseLevel(string value)
private bool ParseLevel(ReadOnlySpan<char> value)
{
if (!int.TryParse(value.Trim(), out var val))
return false;
@ -234,7 +260,7 @@ public sealed class ShowdownSet : IBattleTemplate
return true;
}
private bool ParseFriendship(string value)
private bool ParseFriendship(ReadOnlySpan<char> value)
{
if (!int.TryParse(value.Trim(), out var val))
return false;
@ -244,7 +270,7 @@ public sealed class ShowdownSet : IBattleTemplate
return true;
}
private bool ParseDynamax(string value)
private bool ParseDynamax(ReadOnlySpan<char> value)
{
Context = EntityContext.Gen8;
var val = Util.ToInt32(value);
@ -253,7 +279,7 @@ public sealed class ShowdownSet : IBattleTemplate
return (DynamaxLevel = (byte)val) is (>= 0 and <= 10);
}
private bool ParseTeraType(string value)
private bool ParseTeraType(ReadOnlySpan<char> value)
{
Context = EntityContext.Gen9;
var types = Strings.types;
@ -478,7 +504,7 @@ public sealed class ShowdownSet : IBattleTemplate
FormName = ShowdownParsing.GetStringFromForm(Form = pk.Form, Strings, Species, Context);
}
private void ParseFirstLine(string first)
private void ParseFirstLine(ReadOnlySpan<char> first)
{
int itemSplit = first.IndexOf(ItemSplit, StringComparison.Ordinal);
if (itemSplit != -1)
@ -495,20 +521,20 @@ public sealed class ShowdownSet : IBattleTemplate
}
}
private void ParseItemName(string itemName)
private void ParseItemName(ReadOnlySpan<char> itemName)
{
if (TrySetItem(Context))
if (TrySetItem(Context, itemName))
return;
if (TrySetItem(EntityContext.Gen3))
if (TrySetItem(EntityContext.Gen3, itemName))
return;
if (TrySetItem(EntityContext.Gen2))
if (TrySetItem(EntityContext.Gen2, itemName))
return;
InvalidLines.Add($"Unknown Item: {itemName}");
bool TrySetItem(EntityContext context)
bool TrySetItem(EntityContext context, ReadOnlySpan<char> span)
{
var items = Strings.GetItemStrings(context);
int item = StringUtil.FindIndexIgnoreCase(items, itemName);
int item = StringUtil.FindIndexIgnoreCase(items, span);
if (item < 0)
return false;
HeldItem = item;
@ -517,7 +543,7 @@ public sealed class ShowdownSet : IBattleTemplate
}
}
private void ParseFirstLineNoItem(string line)
private void ParseFirstLineNoItem(ReadOnlySpan<char> line)
{
// Gender Detection
if (line.EndsWith("(M)", StringComparison.Ordinal))
@ -540,7 +566,7 @@ public sealed class ShowdownSet : IBattleTemplate
private const string Gmax = "-Gmax";
private bool ParseSpeciesForm(string speciesLine)
private bool ParseSpeciesForm(ReadOnlySpan<char> speciesLine)
{
speciesLine = speciesLine.Trim();
if (speciesLine.Length == 0)
@ -569,7 +595,7 @@ public sealed class ShowdownSet : IBattleTemplate
if (speciesIndex > 0)
{
Species = (ushort)speciesIndex;
FormName = speciesLine[(end + 1)..];
FormName = speciesLine[(end + 1)..].ToString();
return true;
}
@ -580,12 +606,12 @@ public sealed class ShowdownSet : IBattleTemplate
if (!speciesLine.StartsWith(sn.Replace("♂", "-M").Replace("♀", "-F"), StringComparison.Ordinal))
continue;
Species = e;
FormName = speciesLine[sn.Length..];
FormName = speciesLine[sn.Length..].ToString();
return true;
}
// Version Megas
end = speciesLine.LastIndexOf('-', Math.Max(0, end - 1));
end = speciesLine[Math.Max(0, end - 1)..].LastIndexOf('-');
if (end < 0)
return false;
@ -593,21 +619,22 @@ public sealed class ShowdownSet : IBattleTemplate
if (speciesIndex > 0)
{
Species = (ushort)speciesIndex;
FormName = speciesLine[(end + 1)..];
FormName = speciesLine[(end + 1)..].ToString();
return true;
}
return false;
}
private void ParseSpeciesNickname(string line)
private void ParseSpeciesNickname(ReadOnlySpan<char> line)
{
int index = line.LastIndexOf('(');
string species, nickname;
Span<char> species = stackalloc char[line.Length];
Span<char> nickname = stackalloc char[line.Length];
if (index > 1) // parenthesis value after: Nickname (Species), correct.
{
nickname = line[..index].Trim();
species = line[index..].Trim();
species = RemoveAll(species, ParenJunk); // Trim out excess data
line[..index].Trim().CopyTo(nickname);
line[index..].Trim().CopyTo(species);
RemoveAll(ref species, ParenJunk); // Trim out excess data
}
else // parenthesis value before: (Species) Nickname, incorrect
{
@ -616,29 +643,31 @@ public sealed class ShowdownSet : IBattleTemplate
var tmp = line[start..end];
if (end < line.Length - 2)
{
nickname = line[(end + 2)..];
species = tmp;
line[(end + 2)..].CopyTo(nickname);
tmp.CopyTo(species);
}
else // (Species), or garbage
{
species = tmp;
nickname = string.Empty;
tmp.CopyTo(species);
nickname = Span<char>.Empty;
}
}
species = species.TrimEnd('\0');
nickname = nickname.TrimEnd('\0');
if (ParseSpeciesForm(species))
Nickname = nickname;
Nickname = nickname.ToString();
else if (ParseSpeciesForm(nickname))
Nickname = species;
Nickname = species.ToString();
}
private string ParseLineMove(string line)
private ReadOnlySpan<char> ParseLineMove(ReadOnlySpan<char> line)
{
var startSearch = line[1] == ' ' ? 2 : 1;
var option = line.IndexOf('/');
line = option != -1 ? line[startSearch..option] : line[startSearch..];
string moveString = line.Trim();
var moveString = line.Trim();
var hiddenPowerName = Strings.Move[(int)Move.HiddenPower];
if (!moveString.StartsWith(hiddenPowerName, StringComparison.OrdinalIgnoreCase))
@ -648,8 +677,9 @@ public sealed class ShowdownSet : IBattleTemplate
return hiddenPowerName;
// Defined Hidden Power
string type = moveString[13..];
type = RemoveAll(type, ParenJunk); // Trim out excess data
Span<char> type = stackalloc char[moveString.Length - hiddenPowerName.Length];
moveString[hiddenPowerName.Length..].CopyTo(type);
RemoveAll(ref type, ParenJunk); // Trim out excess data
int hpVal = StringUtil.FindIndexIgnoreCase(Strings.types, type) - 1; // Get HP Type
HiddenPowerType = hpVal;
@ -669,57 +699,84 @@ public sealed class ShowdownSet : IBattleTemplate
return hiddenPowerName;
}
private bool ParseLineEVs(string line)
private bool ParseLineEVs(ReadOnlySpan<char> line)
{
var list = line.Split(StatSplitters, StringSplitOptions.None);
if ((list.Length & 1) == 1)
InvalidLines.Add("Unknown EV input.");
for (int i = 0; i < list.Length / 2; i++)
int start = 0;
while (true)
{
int pos = i * 2;
var statName = list[pos + 1];
int index = StringUtil.FindIndexIgnoreCase(StatNames, statName);
if (index < 0 || !ushort.TryParse(list[pos + 0], out var value))
{
InvalidLines.Add($"Unknown EV stat: {list[pos]}");
continue;
}
EVs[index] = value;
var chunk = line[start..];
var separator = chunk.IndexOf('/');
var len = separator == -1 ? chunk.Length : separator;
var tuple = chunk[..len].Trim();
if (!AbsorbValue(tuple))
InvalidLines.Add($"Invalid EV tuple: {tuple}");
if (separator == -1)
break; // no more stats
start += separator + 1;
}
return true;
}
private bool ParseLineIVs(string line)
bool AbsorbValue(ReadOnlySpan<char> text)
{
var list = line.Split(StatSplitters, StringSplitOptions.None);
if ((list.Length & 1) == 1)
InvalidLines.Add("Unknown IV input.");
for (int i = 0; i < list.Length / 2; i++)
{
int pos = i * 2;
var statName = list[pos + 1];
int index = StringUtil.FindIndexIgnoreCase(StatNames, statName);
if (index < 0 || !byte.TryParse(list[pos + 0], out var value))
{
InvalidLines.Add($"Unknown IV stat: {list[pos]}");
continue;
}
IVs[index] = value;
}
var space = text.IndexOf(' ');
if (space == -1)
return false;
var stat = text[(space + 1)..].Trim();
var statIndex = StringUtil.FindIndexIgnoreCase(StatNames, stat);
if (statIndex == -1)
return false;
var value = text[..space].Trim();
if (!ushort.TryParse(value, out var statValue))
return false;
EVs[statIndex] = statValue;
return true;
}
}
private static string RemoveAll(string original, ReadOnlySpan<char> remove)
private bool ParseLineIVs(ReadOnlySpan<char> line)
{
int start = 0;
while (true)
{
var chunk = line[start..];
var separator = chunk.IndexOf('/');
var len = separator == -1 ? chunk.Length : separator;
var tuple = chunk[..len].Trim();
if (!AbsorbValue(tuple))
InvalidLines.Add($"Invalid IV tuple: {tuple}");
if (separator == -1)
break; // no more stats
start += separator + 1;
}
return true;
bool AbsorbValue(ReadOnlySpan<char> text)
{
var space = text.IndexOf(' ');
if (space == -1)
return false;
var stat = text[(space + 1)..].Trim();
var statIndex = StringUtil.FindIndexIgnoreCase(StatNames, stat);
if (statIndex == -1)
return false;
var value = text[..space].Trim();
if (!byte.TryParse(value, out var statValue))
return false;
IVs[statIndex] = statValue;
return true;
}
}
private static void RemoveAll(ref Span<char> buffer, ReadOnlySpan<char> remove)
{
Span<char> result = stackalloc char[original.Length];
int ctr = 0;
foreach (var c in original)
for (var i = 0; i < buffer.Length; i++)
{
if (remove.IndexOf(c) == -1)
result[ctr++] = c;
char c = buffer[i];
if (!remove.Contains(c))
buffer[ctr++] = c;
}
if (ctr == original.Length)
return original;
return new string(result[..ctr].ToArray());
if (ctr != buffer.Length)
buffer = buffer[..ctr];
}
}

View file

@ -11,8 +11,3 @@ public enum SpriteBuilderTweak
None = 0,
BoxBackgroundRed = 1,
}
public static class SpriteBuilderTweakExtensions
{
public static bool HasFlagFast(this SpriteBuilderTweak value, SpriteBuilderTweak flag) => (value & flag) != 0;
}

View file

@ -160,7 +160,7 @@ public enum GameVersion : byte
BU = 37,
/// <summary>
/// Pokémon Yellow [JP] (3DS Virtual Console)
/// Pokémon Yellow (3DS Virtual Console)
/// </summary>
YW = 38,
#endregion

View file

@ -922,99 +922,99 @@ public enum Species : ushort
Quaquaval,
Lechonk,
Oinkologne,
Dudunsparce,
Tarountula,
Spidops,
Nymble,
Lokix,
Rellor,
Rabsca,
Greavard,
Houndstone,
Flittle,
Espathra,
Farigiraf,
Wiglett,
Wugtrio,
Dondozo,
Veluza,
Finizen,
Palafin,
Smoliv,
Dolliv,
Arboliva,
Capsakid,
Scovillain,
Tadbulb,
Bellibolt,
Varoom,
Revavroom,
Orthworm,
Tandemaus,
Maushold,
Cetoddle,
Cetitan,
Frigibax,
Arctibax,
Baxcalibur,
Tatsugiri,
Cyclizar,
Pawmi,
Pawmo,
Pawmot,
Wattrel,
Kilowattrel,
Bombirdier,
Tandemaus,
Maushold,
Fidough,
Dachsbun,
Smoliv,
Dolliv,
Arboliva,
Squawkabilly,
Flamigo,
Klawf,
Nacli,
Naclstack,
Garganacl,
Glimmet,
Glimmora,
Shroodle,
Grafaiai,
Fidough,
Dachsbun,
Maschiff,
Mabosstiff,
Bramblin,
Brambleghast,
Gimmighoul,
Gholdengo,
GreatTusk,
BruteBonnet,
_980,
SandyShocks,
ScreamTail,
FlutterMane,
SlitherWing,
RoaringMoon,
IronTreads,
_987,
IronMoth,
IronHands,
IronJugulis,
IronThorns,
IronBundle,
IronValiant,
TingLu,
ChienPao,
WoChien,
ChiYu,
Koraidon,
Miraidon,
Tinkatink,
Tinkatuff,
Tinkaton,
Charcadet,
Armarouge,
Ceruledge,
Tadbulb,
Bellibolt,
Wattrel,
Kilowattrel,
Maschiff,
Mabosstiff,
Shroodle,
Grafaiai,
Bramblin,
Brambleghast,
Toedscool,
Toedscruel,
Kingambit,
Clodsire,
Klawf,
Capsakid,
Scovillain,
Rellor,
Rabsca,
Flittle,
Espathra,
Tinkatink,
Tinkatuff,
Tinkaton,
Wiglett,
Wugtrio,
Bombirdier,
Finizen,
Palafin,
Varoom,
Revavroom,
Cyclizar,
Orthworm,
Glimmet,
Glimmora,
Greavard,
Houndstone,
Flamigo,
Cetoddle,
Cetitan,
Veluza,
Dondozo,
Tatsugiri,
Annihilape,
Clodsire,
Farigiraf,
Dudunsparce,
Kingambit,
GreatTusk,
ScreamTail,
BruteBonnet,
FlutterMane,
SlitherWing,
SandyShocks,
IronTreads,
IronBundle,
IronHands,
IronJugulis,
IronMoth,
IronThorns,
Frigibax,
Arctibax,
Baxcalibur,
Gimmighoul,
Gholdengo,
WoChien,
ChienPao,
TingLu,
ChiYu,
RoaringMoon,
IronValiant,
Koraidon,
Miraidon,
_980,
_987,
MAX_COUNT,
}

View file

@ -77,18 +77,7 @@ public sealed class GameDataSource
public readonly IReadOnlyList<ComboItem> HaXMoveDataSource;
public readonly IReadOnlyList<ComboItem> GroundTileDataSource;
private static IReadOnlyList<ComboItem> GetBalls(string[] itemList)
{
// ignores Poke/Great/Ultra
ReadOnlySpan<ushort> ball_nums = stackalloc ushort[] { 007, 576, 013, 492, 497, 014, 495, 493, 496, 494, 011, 498, 008, 006, 012, 015, 009, 005, 499, 010, 001, 016, 851, 1785, 1710, 1711, 1712, 1713, 1746, 1747, 1748, 1749, 1750, 1771 };
ReadOnlySpan<byte> ball_vals = stackalloc byte[] { 007, 025, 013, 017, 022, 014, 020, 018, 021, 019, 011, 023, 008, 006, 012, 015, 009, 005, 024, 010, 001, 016, 026, 0027, 0028, 0029, 0030, 0031, 0032, 0033, 0034, 0035, 0036, 0037 };
return Util.GetVariedCBListBall(itemList, ball_nums, ball_vals);
}
private static ComboItem[] GetVersionList(GameStrings s)
{
var list = s.gamelist;
ReadOnlySpan<byte> games = stackalloc byte[]
private static ReadOnlySpan<byte> OrderedVersionArray => new byte[]
{
50, 51, // 9 sv
47, // 8 legends arceus
@ -114,7 +103,18 @@ public sealed class GameDataSource
00,
};
return Util.GetUnsortedCBList(list, games);
private static IReadOnlyList<ComboItem> GetBalls(string[] itemList)
{
// ignores Poke/Great/Ultra
ReadOnlySpan<ushort> ball_nums = stackalloc ushort[] { 007, 576, 013, 492, 497, 014, 495, 493, 496, 494, 011, 498, 008, 006, 012, 015, 009, 005, 499, 010, 001, 016, 851, 1785, 1710, 1711, 1712, 1713, 1746, 1747, 1748, 1749, 1750, 1771 };
ReadOnlySpan<byte> ball_vals = stackalloc byte[] { 007, 025, 013, 017, 022, 014, 020, 018, 021, 019, 011, 023, 008, 006, 012, 015, 009, 005, 024, 010, 001, 016, 026, 0027, 0028, 0029, 0030, 0031, 0032, 0033, 0034, 0035, 0036, 0037 };
return Util.GetVariedCBListBall(itemList, ball_nums, ball_vals);
}
private static ComboItem[] GetVersionList(GameStrings s)
{
var list = s.gamelist;
return Util.GetUnsortedCBList(list, OrderedVersionArray);
}
public List<ComboItem> GetItemDataSource(GameVersion game, EntityContext context, IReadOnlyList<ushort> allowed, bool HaX = false)

View file

@ -158,11 +158,10 @@ public sealed class GameStrings : IBasicStrings
private string[] GetG3CXD(string[] arr, string fileName)
{
// Concatenate the Gen3 Item list with the CXD item array; CXD items starting at index 500.
// Empty slots between the two lists are marked as unused.
var item500 = Get(fileName);
var result = new string[500 + item500.Length];
for (int i = arr.Length; i < result.Length; i++)
result[i] = $"UNUSED {i}";
result[i] = string.Empty;
arr.CopyTo(result, 0);
item500.CopyTo(result, 500);
return result;
@ -479,7 +478,7 @@ public sealed class GameStrings : IBasicStrings
set.Met4[i] += " (-)";
}
private void SanitizeMetGen7b(LocationSet6 set)
private static void SanitizeMetGen7b(LocationSet6 set)
{
for (int i = 48; i < 55; i++) // distinguish Event year duplicates
set.Met4[i] += " (-)";

View file

@ -1,4 +1,4 @@
using System;
using System;
namespace PKHeX.Core;
@ -25,7 +25,7 @@ public static class GeoLocation
return UnpackList(input);
}
private static string[]?[] GetRegionList(int country)
private static string[]?[] GetRegionList(byte country)
{
var input = Util.GetStringList($"sr_{country:000}");
return UnpackList(input);
@ -51,7 +51,7 @@ public static class GeoLocation
return entries;
}
private static string GetCountryName(int country, int l)
private static string GetCountryName(byte country, int l)
{
if (l < 0)
return INVALID;
@ -63,7 +63,7 @@ public static class GeoLocation
return INVALID;
}
private static string GetRegionName(int country, int region, int l)
private static string GetRegionName(byte country, byte region, int l)
{
if (l < 0)
return INVALID;
@ -93,7 +93,7 @@ public static class GeoLocation
/// <param name="language">Language ID</param>
/// <param name="country">Country ID</param>
/// <returns>Country ID string</returns>
public static string GetCountryName(string language, int country) => GetCountryName(country, GetLanguageIndex(language));
public static string GetCountryName(string language, byte country) => GetCountryName(country, GetLanguageIndex(language));
/// <summary>
/// Gets the Region string for a specified country ID.
@ -102,7 +102,7 @@ public static class GeoLocation
/// <param name="country">Country ID</param>
/// <param name="region">Region ID</param>
/// <returns>Region ID string</returns>
public static string GetRegionName(string language, int country, int region) => GetRegionName(country, region, GetLanguageIndex(language));
public static string GetRegionName(string language, byte country, byte region) => GetRegionName(country, region, GetLanguageIndex(language));
/// <summary>
/// Gets the Country string for a given Country ID
@ -110,7 +110,7 @@ public static class GeoLocation
/// <param name="language">Language ID</param>
/// <param name="country">Country ID</param>
/// <returns>Country ID string</returns>
public static string GetCountryName(LanguageID language, int country) => GetCountryName(country, GetLanguageIndex(language));
public static string GetCountryName(LanguageID language, byte country) => GetCountryName(country, GetLanguageIndex(language));
/// <summary>
/// Gets the Region string for a specified country ID.
@ -119,7 +119,7 @@ public static class GeoLocation
/// <param name="country">Country ID</param>
/// <param name="region">Region ID</param>
/// <returns>Region ID string</returns>
public static string GetRegionName(LanguageID language, int country, int region) => GetRegionName(country, region, GetLanguageIndex(language));
public static string GetRegionName(LanguageID language, byte country, byte region) => GetRegionName(country, region, GetLanguageIndex(language));
/// <summary>
/// Gets Country and Region strings for corresponding IDs and language.
@ -128,7 +128,7 @@ public static class GeoLocation
/// <param name="region">Region ID</param>
/// <param name="language">Language ID</param>
/// <returns>Tuple containing country and region</returns>
public static (string Country, string Region) GetCountryRegionText(int country, int region, string language)
public static (string Country, string Region) GetCountryRegionText(byte country, byte region, string language)
{
// Get Language we're fetching for
int lang = Array.IndexOf(lang_geo, language);

View file

@ -184,7 +184,7 @@ public sealed class MetDataSource
private static List<ComboItem> CreateGen8b(GameStrings s)
{
// Manually add invalid (-1) location from SWSH as ID 65535
// Manually add invalid (-1) location from SW/SH as ID 65535
var locations = new List<ComboItem> { new(s.Gen8.Met0[0], Locations.Default8bNone) };
Util.AddCBWithOffset(locations, s.Gen8b.Met6, 60000, Locations.Daycare5);
Util.AddCBWithOffset(locations, s.Gen8b.Met3, 30000, Locations.LinkTrade6);

View file

@ -1,8 +1,10 @@
using System;
namespace PKHeX.Core;
internal static class Locations4
{
internal static readonly byte[] Met0 =
internal static ReadOnlySpan<byte> Met0 => new byte[]
{
000, 001, 002, 003, 004, 005, 006, 007, 008, 009,
010, 011, 012, 013, 014, 015, 016, 017, 018, 019,

View file

@ -1,8 +1,10 @@
using System;
namespace PKHeX.Core;
internal static class Locations5
{
internal static readonly byte[] Met0 =
internal static ReadOnlySpan<byte> Met0 => new byte[]
{
001, 002, 004, 005, 006, 007, 008, 009,
010, 011, 012, 013, 014, 015, 016, 017, 018, 019,

View file

@ -1,8 +1,10 @@
using System;
namespace PKHeX.Core;
internal static class Locations7
{
internal static readonly byte[] Met0 =
internal static ReadOnlySpan<byte> Met0 => new byte[]
{
002, 004, 006, 008,
010, 012, 014, 016, 018,

View file

@ -1,8 +1,10 @@
using System;
namespace PKHeX.Core;
internal static class Locations7b
{
internal static readonly byte[] Met0 =
internal static ReadOnlySpan<byte> Met0 => new byte[]
{
002, 003, 004, 005, 006, 007, 008, 009,
010, 011, 012, 013, 014, 015, 016, 017, 018, 019,

View file

@ -1,8 +1,10 @@
using System;
namespace PKHeX.Core;
internal static class Locations8
{
internal static readonly byte[] Met0 =
internal static ReadOnlySpan<byte> Met0 => new byte[]
{
002, 004, 006, 008,
012, 014, 016, 018,

View file

@ -1,8 +1,10 @@
using System;
namespace PKHeX.Core;
internal static class Locations8a
{
internal static readonly byte[] Met0 =
internal static ReadOnlySpan<byte> Met0 => new byte[]
{
000, 002, 004, 006, 007, 008, 009,
010, 011, 012, 013, 014, 015, 016, 017, 018, 019,

View file

@ -1,8 +1,10 @@
using System;
namespace PKHeX.Core;
internal static class Locations9
{
internal static readonly byte[] Met0 =
internal static ReadOnlySpan<byte> Met0 => new byte[]
{
002, 004, 006, 008,
010, 012, 014, 016, 018,

View file

@ -28,5 +28,4 @@ public abstract record EncounterArea(GameVersion Version) : IVersion
public virtual bool IsMatchLocation(int location) => Location == location;
public bool HasSpecies(ushort species) => Raw.Any(z => z.Species == species);
public IEnumerable<EncounterSlot> GetSpecies(EvoCriteria[] chain) => Raw.Where(z => chain.Any(c => z.Species == c.Species));
}

View file

@ -12,7 +12,7 @@ public sealed record EncounterArea1 : EncounterArea
public readonly int Rate;
public readonly EncounterSlot1[] Slots;
protected override IReadOnlyList<EncounterSlot> Raw => Slots;
protected override IReadOnlyList<EncounterSlot1> Raw => Slots;
public static EncounterArea1[] GetAreas(BinLinkerAccessor input, GameVersion game)
{
@ -45,7 +45,7 @@ public sealed record EncounterArea1 : EncounterArea
Slots = slots;
}
public override IEnumerable<EncounterSlot> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
public override IEnumerable<EncounterSlot1> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
{
(bool useCatchRate, byte rate) = pk is PK1 pk1 ? (true, pk1.Catch_Rate) : (false, (byte)0);
foreach (var slot in Slots)

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
namespace PKHeX.Core;
@ -9,16 +9,16 @@ namespace PKHeX.Core;
/// </summary>
public sealed record EncounterArea2 : EncounterArea
{
private static readonly byte[] BCC_SlotRates = { 20, 20, 10, 10, 05, 05, 10, 10, 05, 05 };
private static readonly byte[] RatesGrass = { 30, 30, 20, 10, 5, 4, 1 };
private static readonly byte[] RatesSurf = { 60, 30, 10 };
private static ReadOnlySpan<byte> BCC_SlotRates => new byte[] { 20, 20, 10, 10, 05, 05, 10, 10, 05, 05 };
private static ReadOnlySpan<byte> RatesGrass => new byte[] { 30, 30, 20, 10, 5, 4, 1 };
private static ReadOnlySpan<byte> RatesSurf => new byte[] { 60, 30, 10 };
internal readonly EncounterTime Time;
public readonly byte Rate;
public readonly IReadOnlyList<byte> Rates;
public readonly byte[]? Rates;
public readonly EncounterSlot2[] Slots;
protected override IReadOnlyList<EncounterSlot> Raw => Slots;
protected override IReadOnlyList<EncounterSlot2> Raw => Slots;
public static EncounterArea2[] GetAreas(BinLinkerAccessor input, GameVersion game)
{
@ -47,12 +47,7 @@ public sealed record EncounterArea2 : EncounterArea
{
const int size = 4;
int count = next.Length / size;
Rates = type switch
{
SlotType.BugContest => BCC_SlotRates,
SlotType.Grass => RatesGrass,
_ => RatesSurf,
};
Rates = null; // fetch as needed.
Slots = ReadSlots(next, count);
}
}
@ -73,13 +68,13 @@ public sealed record EncounterArea2 : EncounterArea
return slots;
}
public override IEnumerable<EncounterSlot> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
public override IEnumerable<EncounterSlot2> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
{
if (pk is not ICaughtData2 {CaughtData: not 0} pk2)
return GetSlotsFuzzy(chain);
if (pk2.Met_Location != Location)
return Array.Empty<EncounterSlot>();
return Array.Empty<EncounterSlot2>();
return GetSlotsSpecificLevelTime(chain, pk2.Met_TimeOfDay, pk2.Met_Level);
}

View file

@ -13,7 +13,7 @@ public sealed record EncounterArea3 : EncounterArea
public readonly int Rate;
public readonly EncounterSlot3[] Slots;
protected override IReadOnlyList<EncounterSlot> Raw => Slots;
protected override IReadOnlyList<EncounterSlot3> Raw => Slots;
public static EncounterArea3[] GetAreas(BinLinkerAccessor input, GameVersion game)
{
@ -112,12 +112,12 @@ public sealed record EncounterArea3 : EncounterArea
return new EncounterSlot3Swarm(this, species, min, max, slotNum, moves);
}
public override IEnumerable<EncounterSlot> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
public override IEnumerable<EncounterSlot3> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
{
if (pk.Format != 3) // Met Location and Met Level are changed on PK3->PK4
return GetSlotsFuzzy(chain);
if (pk.Met_Location != Location)
return Array.Empty<EncounterSlot>();
return Array.Empty<EncounterSlot3>();
return GetSlotsMatching(chain, pk.Met_Level);
}

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
namespace PKHeX.Core;
@ -11,7 +11,7 @@ public sealed record EncounterArea3XD : EncounterArea
{
public readonly EncounterSlot3PokeSpot[] Slots;
protected override IReadOnlyList<EncounterSlot> Raw => Slots;
protected override IReadOnlyList<EncounterSlot3PokeSpot> Raw => Slots;
public EncounterArea3XD(int loc, ushort s0, byte l0, ushort s1, byte l1, ushort s2, byte l2) : base(GameVersion.XD)
{
@ -25,7 +25,7 @@ public sealed record EncounterArea3XD : EncounterArea
};
}
public override IEnumerable<EncounterSlot> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
public override IEnumerable<EncounterSlot3PokeSpot> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
{
if (pk.Format != 3) // Met Location and Met Level are changed on PK3->PK4
return GetSlotsFuzzy(chain);

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using static System.Buffers.Binary.BinaryPrimitives;
@ -14,7 +14,7 @@ public sealed record EncounterArea4 : EncounterArea
public readonly GroundTileAllowed GroundTile;
public readonly EncounterSlot4[] Slots;
protected override IReadOnlyList<EncounterSlot> Raw => Slots;
protected override IReadOnlyList<EncounterSlot4> Raw => Slots;
public static EncounterArea4[] GetAreas(BinLinkerAccessor input, GameVersion game)
{
@ -64,7 +64,7 @@ public sealed record EncounterArea4 : EncounterArea
return new EncounterSlot4(this, species, form, min, max, slotNum, mpi, mpc, sti, stc);
}
public override IEnumerable<EncounterSlot> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
public override IEnumerable<EncounterSlot4> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
{
if (pk.Format != 4) // Met Location and Met Level are changed on PK4->PK5
return GetSlotsFuzzy(chain);
@ -103,21 +103,21 @@ public sealed record EncounterArea4 : EncounterArea
private static bool IsInaccessibleHoneySlotLocation(EncounterSlot4 slot, PKM pk)
{
// A/B/C tables, only Munchlax is a 'C' encounter, and A/B are accessible from any tree.
// C table encounters are only available from 4 trees, which are determined by TID/SID of the save file.
// C table encounters are only available from 4 trees, which are determined by TID16/SID16 of the save file.
if (slot.Species is not (int)Species.Munchlax)
return false;
// We didn't encode the honey tree index to the encounter slot resource.
// Check if any of the slot's location doesn't match any of the groupC trees' area location ID.
var location = pk.Met_Location;
var trees = SAV4Sinnoh.CalculateMunchlaxTrees(pk.TID, pk.SID);
var trees = SAV4Sinnoh.CalculateMunchlaxTrees(pk.TID16, pk.SID16);
return LocationID_HoneyTree[trees.Tree1] != location
&& LocationID_HoneyTree[trees.Tree2] != location
&& LocationID_HoneyTree[trees.Tree3] != location
&& LocationID_HoneyTree[trees.Tree4] != location;
}
private static readonly byte[] LocationID_HoneyTree =
private static ReadOnlySpan<byte> LocationID_HoneyTree => new byte[]
{
20, // 00 Route 205 Floaroma
20, // 01 Route 205 Eterna

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using static System.Buffers.Binary.BinaryPrimitives;
@ -12,7 +12,7 @@ public sealed record EncounterArea5 : EncounterArea
{
public readonly EncounterSlot5[] Slots;
protected override IReadOnlyList<EncounterSlot> Raw => Slots;
protected override IReadOnlyList<EncounterSlot5> Raw => Slots;
public static EncounterArea5[] GetAreas(BinLinkerAccessor input, GameVersion game)
{
@ -55,7 +55,7 @@ public sealed record EncounterArea5 : EncounterArea
return new EncounterSlot5(this, species, form, min, max);
}
public override IEnumerable<EncounterSlot> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
public override IEnumerable<EncounterSlot5> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
{
foreach (var slot in Slots)
{

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using static System.Buffers.Binary.BinaryPrimitives;
@ -12,7 +12,7 @@ public sealed record EncounterArea6AO : EncounterArea
{
public readonly EncounterSlot6AO[] Slots;
protected override IReadOnlyList<EncounterSlot> Raw => Slots;
protected override IReadOnlyList<EncounterSlot6AO> Raw => Slots;
public static EncounterArea6AO[] GetAreas(BinLinkerAccessor input, GameVersion game)
{
@ -59,7 +59,7 @@ public sealed record EncounterArea6AO : EncounterArea
private const int FluteBoostMax = 4; // Black Flute increases levels.
private const int DexNavBoost = 30; // Maximum DexNav chain
public override IEnumerable<EncounterSlot> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
public override IEnumerable<EncounterSlot6AO> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
{
foreach (var slot in Slots)
{

View file

@ -12,7 +12,7 @@ public sealed record EncounterArea6XY : EncounterArea
{
public readonly EncounterSlot6XY[] Slots;
protected override IReadOnlyList<EncounterSlot> Raw => Slots;
protected override IReadOnlyList<EncounterSlot6XY> Raw => Slots;
public static EncounterArea6XY[] GetAreas(BinLinkerAccessor input, GameVersion game, EncounterArea6XY safari)
{
@ -104,7 +104,7 @@ public sealed record EncounterArea6XY : EncounterArea
return slots;
}
public override IEnumerable<EncounterSlot> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
public override IEnumerable<EncounterSlot6XY> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
{
foreach (var slot in Slots)
{
@ -116,7 +116,7 @@ public sealed record EncounterArea6XY : EncounterArea
if (!slot.IsLevelWithinRange(pk.Met_Level))
break;
if (slot.Form != evo.Form && !slot.IsRandomUnspecificForm && slot.Species is not ((int)Species.Burmy or (int)Species.Furfrou))
if (slot.Form != evo.Form && slot is { IsRandomUnspecificForm: false, Species: not ((int)Species.Burmy or (int)Species.Furfrou) })
{
// Only slot that can be form-mismatched via Pressure is Flabébé
if (slot.Species != (int)Species.Flabébé)

View file

@ -12,7 +12,7 @@ public sealed record EncounterArea7 : EncounterArea
{
public readonly EncounterSlot7[] Slots;
protected override IReadOnlyList<EncounterSlot> Raw => Slots;
protected override IReadOnlyList<EncounterSlot7> Raw => Slots;
public static EncounterArea7[] GetAreas(BinLinkerAccessor input, GameVersion game)
{
@ -55,7 +55,7 @@ public sealed record EncounterArea7 : EncounterArea
return new EncounterSlot7(this, species, form, min, max);
}
public override IEnumerable<EncounterSlot> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
public override IEnumerable<EncounterSlot7> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
{
foreach (var slot in Slots)
{

View file

@ -12,7 +12,7 @@ public sealed record EncounterArea7b : EncounterArea
{
public readonly EncounterSlot7b[] Slots;
protected override IReadOnlyList<EncounterSlot> Raw => Slots;
protected override IReadOnlyList<EncounterSlot7b> Raw => Slots;
public static EncounterArea7b[] GetAreas(BinLinkerAccessor input, GameVersion game)
{
@ -54,7 +54,7 @@ public sealed record EncounterArea7b : EncounterArea
private const int CatchComboBonus = 1;
public override IEnumerable<EncounterSlot> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
public override IEnumerable<EncounterSlot7b> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
{
foreach (var slot in Slots)
{

View file

@ -17,7 +17,7 @@ public sealed record EncounterArea7g : EncounterArea, ISpeciesForm
public byte Form { get; }
public readonly EncounterSlot7GO[] Slots;
protected override IReadOnlyList<EncounterSlot> Raw => Slots;
protected override IReadOnlyList<EncounterSlot7GO> Raw => Slots;
private EncounterArea7g(ushort species, byte form, EncounterSlot7GO[] slots) : base(GameVersion.GO)
{
@ -68,17 +68,22 @@ public sealed record EncounterArea7g : EncounterArea, ISpeciesForm
return new EncounterSlot7GO(area, species, form, start, end, shiny, gender, type);
}
public override IEnumerable<EncounterSlot> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
public override IEnumerable<EncounterSlot7GO> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
{
// Find the first chain that has slots defined.
// Since it is possible to evolve before transferring, we only need the highest evolution species possible.
// PoGoEncTool has already extrapolated the evolutions to separate encounters!
var sf = Array.Find(chain, z => z.Species == Species && z.Form == Form);
if (sf == default)
yield break;
return Array.Empty<EncounterSlot7GO>();
return GetMatchingSlots(pk, sf);
}
public IEnumerable<EncounterSlot7GO> GetMatchingSlots(PKM pk, EvoCriteria evo)
{
var stamp = EncounterSlotGO.GetTimeStamp(pk.Met_Year + 2000, pk.Met_Month, pk.Met_Day);
var met = Math.Max(sf.LevelMin, pk.Met_Level);
var met = Math.Max(evo.LevelMin, pk.Met_Level);
EncounterSlot7GO? deferredIV = null;
foreach (var slot in Slots)

View file

@ -14,7 +14,7 @@ public sealed record EncounterArea8 : EncounterArea
{
public readonly EncounterSlot8[] Slots;
protected override IReadOnlyList<EncounterSlot> Raw => Slots;
protected override IReadOnlyList<EncounterSlot8> Raw => Slots;
/// <summary>
/// Slots from this area can cross over to another area, resulting in a different met location.
/// </summary>
@ -39,7 +39,7 @@ public sealed record EncounterArea8 : EncounterArea
return Array.IndexOf(others, (byte)location) != -1;
}
public override IEnumerable<EncounterSlot> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
public override IEnumerable<EncounterSlot8> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
{
var metLocation = pk.Met_Location;
// wild area gets boosted up to level 60 post-game
@ -109,6 +109,9 @@ public sealed record EncounterArea8 : EncounterArea
return true;
}
/// <summary>
/// Post-game boosts all levels to a minimum of 60.
/// </summary>
public const int BoostLevel = 60;
public static bool IsWildArea(int location) => IsWildArea8(location) || IsWildArea8Armor(location) || IsWildArea8Crown(location);

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using static System.Buffers.Binary.BinaryPrimitives;
@ -13,14 +13,14 @@ public sealed record EncounterArea8a : EncounterArea
public readonly EncounterSlot8a[] Slots;
private readonly byte[] Locations;
protected override IReadOnlyList<EncounterSlot> Raw => Slots;
protected override IReadOnlyList<EncounterSlot8a> Raw => Slots;
public override bool IsMatchLocation(int location)
{
return Array.IndexOf(Locations, (byte)location) != -1;
}
public override IEnumerable<EncounterSlot> GetMatchingSlots(PKM pk, EvoCriteria[] chain) => GetMatches(chain, pk.Met_Level);
public override IEnumerable<EncounterSlot8a> GetMatchingSlots(PKM pk, EvoCriteria[] chain) => GetMatches(chain, pk.Met_Level);
private IEnumerable<EncounterSlot8a> GetMatches(EvoCriteria[] chain, int metLevel)
{

View file

@ -12,7 +12,7 @@ public sealed record EncounterArea8b : EncounterArea
{
public readonly EncounterSlot8b[] Slots;
protected override IReadOnlyList<EncounterSlot> Raw => Slots;
protected override IReadOnlyList<EncounterSlot8b> Raw => Slots;
public static EncounterArea8b[] GetAreas(BinLinkerAccessor input, GameVersion game)
{
@ -81,7 +81,7 @@ public sealed record EncounterArea8b : EncounterArea
return false;
}
public override IEnumerable<EncounterSlot> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
public override IEnumerable<EncounterSlot8b> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
{
foreach (var slot in Slots)
{
@ -107,14 +107,14 @@ public sealed record EncounterArea8b : EncounterArea
private static bool IsInaccessibleHoneySlotLocation(EncounterSlot8b slot, PKM pk)
{
// A/B/C tables, only Munchlax is a 'C' encounter, and A/B are accessible from any tree.
// C table encounters are only available from 4 trees, which are determined by TID/SID of the save file.
// C table encounters are only available from 4 trees, which are determined by TID16/SID16 of the save file.
if (slot.Species is not (int)Species.Munchlax)
return false;
// We didn't encode the honey tree index to the encounter slot resource.
// Check if any of the slot's location doesn't match any of the groupC trees' area location ID.
var location = pk.Met_Location;
var trees = SAV4Sinnoh.CalculateMunchlaxTrees(pk.TID, pk.SID);
var trees = SAV4Sinnoh.CalculateMunchlaxTrees(pk.TID16, pk.SID16);
return LocationID_HoneyTree[trees.Tree1] != location
&& LocationID_HoneyTree[trees.Tree2] != location
&& LocationID_HoneyTree[trees.Tree3] != location

View file

@ -17,7 +17,7 @@ public sealed record EncounterArea8g : EncounterArea, ISpeciesForm
public byte Form { get; }
public readonly EncounterSlot8GO[] Slots;
protected override IReadOnlyList<EncounterSlot> Raw => Slots;
protected override IReadOnlyList<EncounterSlot8GO> Raw => Slots;
private EncounterArea8g(ushort species, byte form, EncounterSlot8GO[] slots) : base(GameVersion.GO)
{
@ -68,21 +68,23 @@ public sealed record EncounterArea8g : EncounterArea, ISpeciesForm
return new EncounterSlot8GO(area, species, form, start, end, shiny, gender, type, format);
}
public override IEnumerable<EncounterSlot> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
public override IEnumerable<EncounterSlot8GO> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
{
if (pk.TSV == 0) // HOME doesn't assign TSV=0 to accounts.
yield break;
// Find the first chain that has slots defined.
// Since it is possible to evolve before transferring, we only need the highest evolution species possible.
// PoGoEncTool has already extrapolated the evolutions to separate encounters!
var sf = FindCriteriaToIterate(pk, chain);
if (sf == default)
yield break;
return Array.Empty<EncounterSlot8GO>();
return GetMatchingSlots(pk, sf);
}
public IEnumerable<EncounterSlot8GO> GetMatchingSlots(PKM pk, EvoCriteria evo)
{
var species = pk.Species;
var ball = (Ball)pk.Ball;
var met = Math.Max(sf.LevelMin, pk.Met_Level);
var met = Math.Max(evo.LevelMin, pk.Met_Level);
EncounterSlot8GO? deferredIV = null;
foreach (var slot in Slots)

View file

@ -6,15 +6,15 @@ namespace PKHeX.Core;
/// <inheritdoc cref="EncounterArea" />
/// <summary>
/// <see cref="GameVersion.SWSH"/> encounter area
/// <see cref="GameVersion.SV"/> encounter area
/// </summary>
public sealed record EncounterArea9 : EncounterArea
{
public readonly EncounterSlot9[] Slots;
public ushort CrossFrom { get; init; }
public ushort CrossFrom { get; }
protected override IReadOnlyList<EncounterSlot> Raw => Slots;
protected override IReadOnlyList<EncounterSlot9> Raw => Slots;
public static EncounterArea9[] GetAreas(BinLinkerAccessor input, GameVersion game)
{
@ -51,7 +51,7 @@ public sealed record EncounterArea9 : EncounterArea
return result;
}
public override IEnumerable<EncounterSlot> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
public override IEnumerable<EncounterSlot9> GetMatchingSlots(PKM pk, EvoCriteria[] chain)
{
var lvl = pk.Met_Level;
foreach (var slot in Slots)

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Diagnostics;
using static System.Buffers.Binary.BinaryPrimitives;
@ -42,11 +42,14 @@ public readonly ref struct BinLinkerAccessor
/// <param name="identifier">Expected identifier (debug verification only)</param>
public static BinLinkerAccessor Get(ReadOnlySpan<byte> data, string identifier)
{
var result = new BinLinkerAccessor(data);
#if DEBUG
SanityCheckIdentifier(data, identifier);
return new BinLinkerAccessor(data);
}
[Conditional("DEBUG")]
private static void SanityCheckIdentifier(ReadOnlySpan<byte> data, string identifier)
{
Debug.Assert(data.Length > 4);
Debug.Assert(identifier[0] == data[0] && identifier[1] == data[1]);
#endif
return result;
}
}

View file

@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
using static PKHeX.Core.GameVersion;
using static PKHeX.Core.Species;
@ -54,7 +53,7 @@ public static class Breeding
if (Legal.FixedGenderFromBiGender.Contains(species)) // Nincada -> Shedinja loses gender causing 'false', edge case
return true;
var pi = PKX.Personal[species];
if (!pi.Genderless && !pi.OnlyMale)
if (pi is { Genderless: false, OnlyMale: false })
return true;
if (MixedGenderBreeding.Contains(species))
return true;
@ -64,7 +63,7 @@ public static class Breeding
private static readonly HashSet<ushort> SplitBreed_3 = new()
{
// Incense
(int)Marill, (int)Azumarill,
(int)Marill,
(int)Wobbuffet,
};
@ -74,21 +73,21 @@ public static class Breeding
private static readonly HashSet<ushort> SplitBreed = new(SplitBreed_3)
{
// Incense
(int)Chansey, (int)Blissey,
(int)MrMime, (int)MrRime,
(int)Chansey,
(int)MrMime,
(int)Snorlax,
(int)Sudowoodo,
(int)Mantine,
(int)Roselia, (int)Roserade,
(int)Roselia,
(int)Chimecho,
};
internal static ICollection<ushort> GetSplitBreedGeneration(int generation) => generation switch
internal static IReadOnlySet<ushort>? GetSplitBreedGeneration(int generation) => generation switch
{
3 => SplitBreed_3,
4 or 5 or 6 or 7 or 8 => SplitBreed,
// Gen9 does not have split-breed egg generation.
_ => Array.Empty<ushort>(),
_ => null,
};
/// <summary>
@ -99,7 +98,7 @@ public static class Breeding
public static bool CanHatchAsEgg(ushort species) => !NoHatchFromEgg.Contains(species);
/// <summary>
/// Checks if the <see cref="species"/>-<see cref="form"/> can exist as a hatched egg in the requested <see cref="generation"/>.
/// Checks if the <see cref="species"/>-<see cref="form"/> can exist as a hatched egg in the requested <see cref="context"/>.
/// </summary>
/// <remarks>Chained with the other 2 overloads for incremental checks with different parameters.</remarks>
/// <param name="species">Current species</param>
@ -120,7 +119,7 @@ public static class Breeding
}
/// <summary>
/// Some species can have forms that cannot exist as egg (event/special forms). Same idea as <see cref="FormInfo.IsTotemForm(ushort,byte,int)"/>
/// Some species can have forms that cannot exist as egg (event/special forms). Same idea as <see cref="FormInfo.IsTotemForm(ushort,byte,EntityContext)"/>
/// </summary>
/// <returns>True if can be bred.</returns>
private static bool IsBreedableForm(ushort species, byte form) => species switch
@ -132,25 +131,6 @@ public static class Breeding
_ => true,
};
/// <summary>
/// Checks if the <see cref="species"/>-<see cref="form"/> can exist as a hatched egg in the requested <see cref="game"/>.
/// </summary>
/// <remarks>Chained with the other 2 overloads for incremental checks with different parameters.</remarks>
/// <param name="species">Current species</param>
/// <param name="form">Current form</param>
/// <param name="game">Game of origin</param>
public static bool CanHatchAsEgg(ushort species, byte form, GameVersion game)
{
// If form cannot change, then it must be able to originate in the game.
var pt = GameData.GetPersonal(game);
if (pt.IsPresentInGame(species, form))
return true;
// Only way it can not exist is if it can change form.
// The only species that can do this is D/P Rotom, being changed in a future game.
return species is (int)Rotom && form <= 5 && game is D or P;
}
/// <summary>
/// Species that cannot hatch from an egg.
/// </summary>

View file

@ -99,7 +99,7 @@ public sealed class BulkAnalysis
{
var tracker = home.Tracker;
if (Trackers.TryGetValue(tracker, out var clone))
AddLine(cs, clone!, "Clone detected (Duplicate Tracker).", Encounter);
AddLine(cs, clone, "Clone detected (Duplicate Tracker).", Encounter);
else
Trackers.Add(tracker, cs);
}
@ -118,7 +118,7 @@ public sealed class BulkAnalysis
}
CloneFlags[i] = true;
AddLine(ps!, cs, "Clone detected (Details).", Encounter);
AddLine(ps, cs, "Clone detected (Details).", Encounter);
}
}
@ -135,7 +135,7 @@ public sealed class BulkAnalysis
foreach (var dupe in dupes)
{
var tidGroup = dupe.GroupBy(z => z.Slot.Entity.TID | (z.Slot.Entity.SID << 16))
var tidGroup = dupe.GroupBy(z => z.Slot.Entity.TID16 | (z.Slot.Entity.SID16 << 16))
.Select(z => z.ToList())
.Where(z => z.Count >= 2).ToList();
if (tidGroup.Count == 0)
@ -160,7 +160,7 @@ public sealed class BulkAnalysis
var id = cp.Entity.EncryptionConstant;
var cr = new CombinedReference(cp, ca);
if (!dict.TryGetValue(id, out var pa) || pa is null)
if (!dict.TryGetValue(id, out var pa))
{
dict.Add(id, cr);
continue;
@ -182,7 +182,7 @@ public sealed class BulkAnalysis
var id = g345 ? cp.Entity.EncryptionConstant : cp.Entity.PID;
var cr = new CombinedReference(cp, ca);
if (!dict.TryGetValue(id, out var pr) || pr is null)
if (!dict.TryGetValue(id, out var pr))
{
dict.Add(id, cr);
continue;
@ -203,8 +203,6 @@ public sealed class BulkAnalysis
var withOT = tr.IsFromTrainer(pk);
var flag = pk.CurrentHandler;
var expect = withOT ? 0 : 1;
if (pk.Version == 0)
expect = 0;
if (flag != expect)
AddLine(cs, LegalityCheckStrings.LTransferCurrentHandlerInvalid, CheckIdentifier.Trainer);
@ -222,17 +220,16 @@ public sealed class BulkAnalysis
private void CheckIDReuse()
{
var dict = new Dictionary<int, CombinedReference>();
var dict = new Dictionary<uint, CombinedReference>();
for (int i = 0; i < AllData.Count; i++)
{
if (CloneFlags[i])
continue; // already flagged
var cs = AllData[i];
var ca = AllAnalysis[i];
var id = cs.Entity.TID + (cs.Entity.SID << 16);
Debug.Assert(cs.Entity.TID <= ushort.MaxValue);
var id = cs.Entity.ID32;
if (!dict.TryGetValue(id, out var pr) || pr is null)
if (!dict.TryGetValue(id, out var pr))
{
var r = new CombinedReference(cs, ca);
dict.Add(id, r);
@ -241,7 +238,7 @@ public sealed class BulkAnalysis
var pa = pr.Analysis;
// ignore GB era collisions
// a 16bit TID can reasonably occur for multiple trainers, and versions
// a 16bit TID16 can reasonably occur for multiple trainers, and versions
if (ca.Info.Generation <= 2 && pa.Info.Generation <= 2)
continue;
@ -334,19 +331,19 @@ public sealed class BulkAnalysis
var pp = ps.Entity;
var cp = cs.Entity;
// 32bit ID-SID should only occur for one generation
// Trainer-ID-SID should only occur for one version
// 32bit ID-SID16 should only occur for one generation
// Trainer-ID-SID16 should only occur for one version
if (IsSharedVersion(pp, pa, cp, ca))
{
AddLine(ps, cs, "TID sharing across versions detected.", ident);
AddLine(ps, cs, "TID16 sharing across versions detected.", ident);
return true;
}
// ID-SID should only occur for one Trainer name
// ID-SID16 should only occur for one Trainer name
if (pp.OT_Name != cp.OT_Name)
{
var severity = ca.Info.Generation == 4 ? Severity.Fishy : Severity.Invalid;
AddLine(ps, cs, "TID sharing across different trainer names detected.", ident, severity);
AddLine(ps, cs, "TID16 sharing across different trainer names detected.", ident, severity);
}
return false;
@ -362,7 +359,7 @@ public sealed class BulkAnalysis
return false;
// Gen3/4 traded eggs do not have an Egg Location, and do not update the Version upon hatch.
// These eggs can obtain another trainer's TID/SID/OT and be valid with a different version ID.
// These eggs can obtain another trainer's TID16/SID16/OT and be valid with a different version ID.
if (pa.EncounterMatch.EggEncounter && IsTradedEggVersionNoUpdate(pp, pa))
return false; // version doesn't update on trade
if (ca.EncounterMatch.EggEncounter && IsTradedEggVersionNoUpdate(cp, ca))

View file

@ -63,15 +63,6 @@ public static partial class Legal
internal static readonly ushort[][] ReminderSV = EggMoves9.GetArray(Get(Util.GetBinaryResource("reminder_sv.pkl"), "sv"));
internal static readonly Learnset[] LevelUpSV = LearnsetReader.GetArray(Get(Util.GetBinaryResource("lvlmove_sv.pkl"), "sv"));
internal static int GetMaxSpeciesOrigin(PKM pk)
{
if (pk.Format == 1)
return MaxSpeciesID_1;
if (pk.Format == 2 || pk.VC)
return MaxSpeciesID_2;
return GetMaxSpeciesOrigin(pk.Generation);
}
internal static int GetMaxSpeciesOrigin(int generation) => generation switch
{
1 => MaxSpeciesID_1,
@ -110,7 +101,7 @@ public static partial class Legal
PA8 pa8 => !pa8.LA,
PB8 pb8 => !pb8.BDSP,
PK8 pk8 => pk8.IsSideTransfer || pk8.BattleVersion != 0,
PK9 pk9 => !(pk9.SV || (pk9.IsEgg && pk9.Version == 0)),
PK9 pk9 => !(pk9.SV || pk9 is { IsEgg: true, Version: 0 }),
_ => false,
};
@ -149,7 +140,7 @@ public static partial class Legal
_ => generation >= 6 ? 12 : 10,
};
public static bool GetIsFixedIVSequenceValidSkipRand(ReadOnlySpan<int> IVs, PKM pk, int max = 31)
public static bool GetIsFixedIVSequenceValidSkipRand(ReadOnlySpan<int> IVs, PKM pk, uint max = 31)
{
for (int i = 0; i < 6; i++)
{
@ -183,11 +174,4 @@ public static partial class Legal
if (IVs.SPD != pk.IV_SPD) return false;
return true;
}
public static bool IsMetAsEgg(PKM pk) => pk switch
{
PA8 or PK8 => pk.Egg_Location is not 0 || (pk.BDSP && pk.Egg_Day is not 0),
PB8 pb8 => pb8.Egg_Location is not Locations.Default8bNone,
_ => pk.Egg_Location is not 0,
};
}

View file

@ -120,7 +120,7 @@ public static class EncounterEvent
// rather than use Linq to build an array, just do it the quick way directly.
var result = new T[arr.Count];
((HashSet<T>)arr).CopyTo(result, 0);
((IReadOnlySet<T>)arr).CopyTo(result);
return result;
}
@ -166,7 +166,7 @@ public static class EncounterEvent
MGDB_G8B,
MGDB_G9,
}.SelectMany(z => z);
regular = regular.Where(mg => !mg.IsItem && mg.IsEntity && mg.Species > 0);
regular = regular.Where(mg => mg is { IsItem: false, IsEntity: true, Species: > 0 });
var result = MGDB_G3.Concat(regular);
if (sorted)
result = result.OrderBy(mg => mg.Species);

View file

@ -24,10 +24,6 @@ internal static class Encounters9
new(SV) { Gift = true, Species = 909, Shiny = Never, Level = 05, Location = 080, Ability = OnlyFirst, Size = 128 }, // Fuecoco
new(SV) { Gift = true, Species = 912, Shiny = Never, Level = 05, Location = 080, Ability = OnlyFirst, Size = 128 }, // Quaxly
// Box Legendary (Ride Form)
new(SL) { Gift = true, Species = 998, Shiny = Never, Level = 68, Location = 070, Ability = OnlyFirst, Size = 128, Nature = Nature.Quirky, TeraType = GemType.Dragon, IVs = new(31,31,28,31,31,28), Moves = new(053,878,203,851) }, // Koraidon
new(VL) { Gift = true, Species = 999, Shiny = Never, Level = 68, Location = 070, Ability = OnlyFirst, Size = 128, Nature = Nature.Quirky, TeraType = GemType.Dragon, IVs = new(31,31,28,31,31,28), Moves = new(408,879,203,851) }, // Miraidon
// Galarian Meowth from Salvatore (Specific Met Location depending on game, inside Academy's Staff Quarters)
new(SL) { Gift = true, Species = 052, Shiny = Never, Level = 05, Location = 130, Form = 2, FlawlessIVCount = 3 }, // Meowth-2
new(VL) { Gift = true, Species = 052, Shiny = Never, Level = 05, Location = 131, Form = 2, FlawlessIVCount = 3 }, // Meowth-2
@ -36,47 +32,51 @@ internal static class Encounters9
new (SV) { Gift = true, Species = 734, Level = 02, Location = 064 }, // Yungoos level 2, no Marks in Inlet Grotto. Only Poké Ball available in early game.
// Box Legendary (Battle Form)
new(SL) { Species = 998, Shiny = Never, Level = 72, Location = 124, Size = 128, Ability = OnlyFirst, Nature = Nature.Adamant, TeraType = GemType.Fighting, IVs = new(25,31,25,31,31,25), Moves = new(416,339,878,053) }, // Koraidon
new(VL) { Species = 999, Shiny = Never, Level = 72, Location = 124, Size = 128, Ability = OnlyFirst, Nature = Nature.Modest, TeraType = GemType.Electric, IVs = new(25,31,25,31,31,25), Moves = new(063,268,879,408) }, // Miraidon
new(SL) { Species = 1007, Shiny = Never, Level = 72, Location = 124, Size = 128, Ability = OnlyFirst, Nature = Nature.Adamant, TeraType = GemType.Fighting, IVs = new(25,31,25,31,31,25), Moves = new(416,339,878,053) }, // Koraidon
new(VL) { Species = 1008, Shiny = Never, Level = 72, Location = 124, Size = 128, Ability = OnlyFirst, Nature = Nature.Modest, TeraType = GemType.Electric, IVs = new(25,31,25,31,31,25), Moves = new(063,268,879,408) }, // Miraidon
// Box Legendary (Ride Form)
new(SL) { Gift = true, Species = 1007, Shiny = Never, Level = 68, Location = 070, Ability = OnlyFirst, Size = 128, Nature = Nature.Quirky, TeraType = GemType.Dragon, IVs = new(31,31,28,31,31,28), Moves = new(053,878,203,851) }, // Koraidon
new(VL) { Gift = true, Species = 1008, Shiny = Never, Level = 68, Location = 070, Ability = OnlyFirst, Size = 128, Nature = Nature.Quirky, TeraType = GemType.Dragon, IVs = new(31,31,28,31,31,28), Moves = new(408,879,203,851) }, // Miraidon
// Treasures of Ruin
new(SV) { Species = 994, Shiny = Never, Level = 60, Location = 109, Size = 128, FlawlessIVCount = 3 }, // Ting-Lu
new(SV) { Species = 995, Shiny = Never, Level = 60, Location = 022, Size = 128, FlawlessIVCount = 3 }, // Chien-Pao
new(SV) { Species = 996, Shiny = Never, Level = 60, Location = 006, Size = 128, FlawlessIVCount = 3 }, // Wo-Chien
new(SV) { Species = 997, Shiny = Never, Level = 60, Location = 048, Size = 128, FlawlessIVCount = 3 }, // Chi-Yu
new(SV) { Species = 1001, Shiny = Never, Level = 60, Location = 006, Size = 128, FlawlessIVCount = 3 }, // Wo-Chien
new(SV) { Species = 1002, Shiny = Never, Level = 60, Location = 022, Size = 128, FlawlessIVCount = 3 }, // Chien-Pao
new(SV) { Species = 1003, Shiny = Never, Level = 60, Location = 109, Size = 128, FlawlessIVCount = 3 }, // Ting-Lu
new(SV) { Species = 1004, Shiny = Never, Level = 60, Location = 048, Size = 128, FlawlessIVCount = 3 }, // Chi-Yu
// Former Titans
new(SV) { Species = 962, Shiny = Never, Level = 16, Location = 020, Size = 255, Ability = OnlyFirst, Gender = 1, Nature = Nature.Gentle, IVs = new(30,30,30,30,30,30), Moves = new(011,249,335,317), IsTitan = true }, // Klawf
new(SV) { Species = 959, Shiny = Never, Level = 20, Location = 022, Size = 255, Ability = OnlyHidden, Gender = 1, Nature = Nature.Jolly, IVs = new(30,30,30,30,30,30), Moves = new(088,017,365,259), IsTitan = true }, // Bombirdier
new(SV) { Species = 944, Shiny = Never, Level = 29, Location = 032, Size = 255, Ability = OnlyFirst, Gender = 0, Nature = Nature.Quirky, IVs = new(30,30,30,30,30,30), Moves = new(231,029,035,201), IsTitan = true }, // Orthworm
new(SL) { Species = 978, Shiny = Never, Level = 45, Location = 024, Size = 255, Ability = OnlyFirst, Nature = Nature.Naughty, IVs = new(30,30,30,30,30,30), Moves = new(229,280,282,707), IsTitan = true }, // Great Tusk
new(VL) { Species = 986, Shiny = Never, Level = 45, Location = 024, Size = 255, Ability = OnlyFirst, Nature = Nature.Naughty, IVs = new(30,30,30,30,30,30), Moves = new(229,442,282,707), IsTitan = true }, // Iron Treads
new(SV) { Species = 952, Shiny = Never, Level = 57, Location = 040, Size = 255, Ability = OnlyFirst, Gender = 0, Nature = Nature.Quiet, IVs = new(30,30,30,30,30,30), Moves = new(330,196,269,406), IsTitan = true }, // Tatsugiri
new(SV) { Species = 950, Shiny = Never, Level = 16, Location = 020, Size = 255, Ability = OnlyFirst, Gender = 1, Nature = Nature.Gentle, IVs = new(30,30,30,30,30,30), Moves = new(011,249,335,317), IsTitan = true }, // Klawf
new(SV) { Species = 962, Shiny = Never, Level = 20, Location = 022, Size = 255, Ability = OnlyHidden, Gender = 1, Nature = Nature.Jolly, IVs = new(30,30,30,30,30,30), Moves = new(088,017,365,259), IsTitan = true }, // Bombirdier
new(SV) { Species = 968, Shiny = Never, Level = 29, Location = 032, Size = 255, Ability = OnlyFirst, Gender = 0, Nature = Nature.Quirky, IVs = new(30,30,30,30,30,30), Moves = new(231,029,035,201), IsTitan = true }, // Orthworm
new(SL) { Species = 984, Shiny = Never, Level = 45, Location = 024, Size = 255, Ability = OnlyFirst, Nature = Nature.Naughty, IVs = new(30,30,30,30,30,30), Moves = new(229,280,282,707), IsTitan = true }, // Great Tusk
new(VL) { Species = 990, Shiny = Never, Level = 45, Location = 024, Size = 255, Ability = OnlyFirst, Nature = Nature.Naughty, IVs = new(30,30,30,30,30,30), Moves = new(229,442,282,707), IsTitan = true }, // Iron Treads
new(SV) { Species = 978, Shiny = Never, Level = 57, Location = 040, Size = 255, Ability = OnlyFirst, Gender = 0, Nature = Nature.Quiet, IVs = new(30,30,30,30,30,30), Moves = new(330,196,269,406), IsTitan = true }, // Tatsugiri
// Dummy Tatsugiri
new(SV) { Species = 952, Shiny = Never, Level = 45, Location = 040, Size = 128, }, // Tatsugiri
new(SV) { Species = 952, Shiny = Never, Level = 45, Location = 040, Size = 128, Form = 1 }, // Tatsugiri-1
new(SV) { Species = 952, Shiny = Never, Level = 45, Location = 040, Size = 128, Form = 2 }, // Tatsugiri-2
new(SV) { Species = 978, Shiny = Never, Level = 45, Location = 040, Size = 128 }, // Tatsugiri
new(SV) { Species = 978, Shiny = Never, Level = 45, Location = 040, Size = 128, Form = 1 }, // Tatsugiri-1
new(SV) { Species = 978, Shiny = Never, Level = 45, Location = 040, Size = 128, Form = 2 }, // Tatsugiri-2
#region Chest Form Gimmighoul
// Gimmighoul has 13 separate static encounter entries, all differing by Level. These can be placed in numerous parts of the map, so for now, manually define them all here.
new(SV) { Species = 976, Shiny = Never, Level = 05, Location = 006 }, // Gimmighoul - South Province (Area One)
new(SV) { Species = 976, Shiny = Never, Level = 10, Location = 012 }, // Gimmighoul - South Province (Area Two)
new(SV) { Species = 976, Shiny = Never, Level = 10, Location = 020 }, // Gimmighoul - South Province (Area Three)
new(SV) { Species = 976, Shiny = Never, Level = 15, Location = 014 }, // Gimmighoul - South Province (Area Four)
new(SV) { Species = 976, Shiny = Never, Level = 15, Location = 018 }, // Gimmighoul - South Province (Area Five)
new(SV) { Species = 976, Shiny = Never, Level = 15, Location = 022 }, // Gimmighoul - West Province (Area One)
new(SV) { Species = 976, Shiny = Never, Level = 15, Location = 034 }, // Gimmighoul - East Province (Area One)
new(SV) { Species = 976, Shiny = Never, Level = 20, Location = 024 }, // Gimmighoul - Asado Desert
new(SV) { Species = 976, Shiny = Never, Level = 25, Location = 032 }, // Gimmighoul - East Province (Area Three)
new(SV) { Species = 976, Shiny = Never, Level = 25, Location = 058 }, // Gimmighoul - West Paldean Sea
new(SV) { Species = 976, Shiny = Never, Level = 35, Location = 038 }, // Gimmighoul - Glaseado Mountain
new(SV) { Species = 976, Shiny = Never, Level = 40, Location = 016 }, // Gimmighoul - South Province (Area Six)
new(SV) { Species = 976, Shiny = Never, Level = 50, Location = 026 }, // Gimmighoul - West Province (Area Two)
new(SV) { Species = 976, Shiny = Never, Level = 50, Location = 040 }, // Gimmighoul - Casseroya Lake
new(SV) { Species = 976, Shiny = Never, Level = 50, Location = 046 }, // Gimmighoul - North Province (Area One)
new(SV) { Species = 976, Shiny = Never, Level = 50, Location = 048 }, // Gimmighoul - North Province (Area Two)
new(SV) { Species = 976, Shiny = Never, Level = 50, Location = 109 }, // Gimmighoul - Socarrat Trail
new(SV) { Species = 999, Shiny = Never, Level = 05, Location = 006 }, // Gimmighoul - South Province (Area One)
new(SV) { Species = 999, Shiny = Never, Level = 10, Location = 012 }, // Gimmighoul - South Province (Area Two)
new(SV) { Species = 999, Shiny = Never, Level = 10, Location = 020 }, // Gimmighoul - South Province (Area Three)
new(SV) { Species = 999, Shiny = Never, Level = 15, Location = 014 }, // Gimmighoul - South Province (Area Four)
new(SV) { Species = 999, Shiny = Never, Level = 15, Location = 018 }, // Gimmighoul - South Province (Area Five)
new(SV) { Species = 999, Shiny = Never, Level = 15, Location = 022 }, // Gimmighoul - West Province (Area One)
new(SV) { Species = 999, Shiny = Never, Level = 15, Location = 034 }, // Gimmighoul - East Province (Area One)
new(SV) { Species = 999, Shiny = Never, Level = 20, Location = 024 }, // Gimmighoul - Asado Desert
new(SV) { Species = 999, Shiny = Never, Level = 25, Location = 032 }, // Gimmighoul - East Province (Area Three)
new(SV) { Species = 999, Shiny = Never, Level = 25, Location = 058 }, // Gimmighoul - West Paldean Sea
new(SV) { Species = 999, Shiny = Never, Level = 35, Location = 038 }, // Gimmighoul - Glaseado Mountain
new(SV) { Species = 999, Shiny = Never, Level = 40, Location = 016 }, // Gimmighoul - South Province (Area Six)
new(SV) { Species = 999, Shiny = Never, Level = 50, Location = 026 }, // Gimmighoul - West Province (Area Two)
new(SV) { Species = 999, Shiny = Never, Level = 50, Location = 040 }, // Gimmighoul - Casseroya Lake
new(SV) { Species = 999, Shiny = Never, Level = 50, Location = 046 }, // Gimmighoul - North Province (Area One)
new(SV) { Species = 999, Shiny = Never, Level = 50, Location = 048 }, // Gimmighoul - North Province (Area Two)
new(SV) { Species = 999, Shiny = Never, Level = 50, Location = 109 }, // Gimmighoul - Socarrat Trail
#endregion
};
@ -85,8 +85,8 @@ internal static class Encounters9
internal static readonly EncounterTrade9[] TradeGift_SV =
{
new(SV, 872,10) { TID7 = 050724, IVs = new(31,18,13,20,28,26), OTGender = 0, Gender = 1, Nature = Nature.Bashful, }, // Snom
new(SV, 194,18) { Ability = OnlySecond, TID7 = 033081, IVs = new(27,18,25,13,16,31), OTGender = 1, Gender = 0, Nature = Nature.Relaxed, }, // Wooper
new(SV, 872,10) { TID7 = 050724, IVs = new(31,18,13,20,28,26), OTGender = 0, Gender = 1, Nature = Nature.Bashful }, // Snom
new(SV, 194,18) { Ability = OnlySecond, TID7 = 033081, IVs = new(27,18,25,13,16,31), OTGender = 1, Gender = 0, Nature = Nature.Relaxed }, // Wooper
new(SV, 093,25) { Ability = OnlyFirst, TID7 = 016519, IVs = new(14,20,25,31,28,16), OTGender = 1, Gender = 1, Nature = Nature.Lonely, EvolveOnTrade = true }, // Haunter
};

View file

@ -128,33 +128,33 @@ internal static class Encounters1
internal static readonly EncounterStatic1E[] StaticEventsVC =
{
// Event Mew
new(151, 5, RBY) { IVs = Flawless15, TID = 22796, OT_Name = "GF", Language = International },
new(151, 5, RBY) { IVs = Flawless15, TID = 22796, OT_Name = "ゲーフリ" },
new(151, 5, RBY) { IVs = Flawless15, TID16 = 22796, OT_Name = "GF", Language = International },
new(151, 5, RBY) { IVs = Flawless15, TID16 = 22796, OT_Name = "ゲーフリ" },
};
internal static readonly EncounterStatic1E[] StaticEventsGB =
{
// Stadium 1 (International)
new(001, 05, Stadium) {Moves = new(033, 045), TID = 2000, OT_Names = StadiumOT_Int, Language = International}, // Bulbasaur
new(004, 05, Stadium) {Moves = new(010, 043), TID = 2000, OT_Names = StadiumOT_Int, Language = International}, // Charmander
new(007, 05, Stadium) {Moves = new(033, 045), TID = 2000, OT_Names = StadiumOT_Int, Language = International}, // Squirtle
new(106, 20, Stadium) {Moves = new(024, 096), TID = 2000, OT_Names = StadiumOT_Int, Language = International}, // Hitmonlee
new(107, 20, Stadium) {Moves = new(004, 097), TID = 2000, OT_Names = StadiumOT_Int, Language = International}, // Hitmonchan
new(133, 25, Stadium) {Moves = new(033, 039), TID = 2000, OT_Names = StadiumOT_Int, Language = International}, // Eevee
new(138, 20, Stadium) {Moves = new(055, 110), TID = 2000, OT_Names = StadiumOT_Int, Language = International}, // Omanyte
new(140, 20, Stadium) {Moves = new(010, 106), TID = 2000, OT_Names = StadiumOT_Int, Language = International}, // Kabuto
new(054, 15, Stadium) {Moves = new(133, 010), TID = 2000, OT_Names = StadiumOT_Int, Language = International}, // Psyduck (Amnesia)
new(001, 05, Stadium) {Moves = new(033, 045), TID16 = 2000, OT_Names = StadiumOT_Int, Language = International}, // Bulbasaur
new(004, 05, Stadium) {Moves = new(010, 043), TID16 = 2000, OT_Names = StadiumOT_Int, Language = International}, // Charmander
new(007, 05, Stadium) {Moves = new(033, 045), TID16 = 2000, OT_Names = StadiumOT_Int, Language = International}, // Squirtle
new(106, 20, Stadium) {Moves = new(024, 096), TID16 = 2000, OT_Names = StadiumOT_Int, Language = International}, // Hitmonlee
new(107, 20, Stadium) {Moves = new(004, 097), TID16 = 2000, OT_Names = StadiumOT_Int, Language = International}, // Hitmonchan
new(133, 25, Stadium) {Moves = new(033, 039), TID16 = 2000, OT_Names = StadiumOT_Int, Language = International}, // Eevee
new(138, 20, Stadium) {Moves = new(055, 110), TID16 = 2000, OT_Names = StadiumOT_Int, Language = International}, // Omanyte
new(140, 20, Stadium) {Moves = new(010, 106), TID16 = 2000, OT_Names = StadiumOT_Int, Language = International}, // Kabuto
new(054, 15, Stadium) {Moves = new(133, 010), TID16 = 2000, OT_Names = StadiumOT_Int, Language = International}, // Psyduck (Amnesia)
// Stadium 2 (Japan)
new(001, 05, Stadium) {Moves = new(033, 045), TID = 1999, OT_Name = StadiumOT_JPN}, // Bulbasaur
new(004, 05, Stadium) {Moves = new(010, 043), TID = 1999, OT_Name = StadiumOT_JPN}, // Charmander
new(007, 05, Stadium) {Moves = new(033, 045), TID = 1999, OT_Name = StadiumOT_JPN}, // Squirtle
new(106, 20, Stadium) {Moves = new(024, 096), TID = 1999, OT_Name = StadiumOT_JPN}, // Hitmonlee
new(107, 20, Stadium) {Moves = new(004, 097), TID = 1999, OT_Name = StadiumOT_JPN}, // Hitmonchan
new(133, 25, Stadium) {Moves = new(033, 039), TID = 1999, OT_Name = StadiumOT_JPN}, // Eevee
new(138, 20, Stadium) {Moves = new(055, 110), TID = 1999, OT_Name = StadiumOT_JPN}, // Omanyte
new(140, 20, Stadium) {Moves = new(010, 106), TID = 1999, OT_Name = StadiumOT_JPN}, // Kabuto
new(054, 15, Stadium) {Moves = new(133, 010), TID = 1999, OT_Name = StadiumOT_JPN}, // Psyduck (Amnesia)
new(001, 05, Stadium) {Moves = new(033, 045), TID16 = 1999, OT_Name = StadiumOT_JPN}, // Bulbasaur
new(004, 05, Stadium) {Moves = new(010, 043), TID16 = 1999, OT_Name = StadiumOT_JPN}, // Charmander
new(007, 05, Stadium) {Moves = new(033, 045), TID16 = 1999, OT_Name = StadiumOT_JPN}, // Squirtle
new(106, 20, Stadium) {Moves = new(024, 096), TID16 = 1999, OT_Name = StadiumOT_JPN}, // Hitmonlee
new(107, 20, Stadium) {Moves = new(004, 097), TID16 = 1999, OT_Name = StadiumOT_JPN}, // Hitmonchan
new(133, 25, Stadium) {Moves = new(033, 039), TID16 = 1999, OT_Name = StadiumOT_JPN}, // Eevee
new(138, 20, Stadium) {Moves = new(055, 110), TID16 = 1999, OT_Name = StadiumOT_JPN}, // Omanyte
new(140, 20, Stadium) {Moves = new(010, 106), TID16 = 1999, OT_Name = StadiumOT_JPN}, // Kabuto
new(054, 15, Stadium) {Moves = new(133, 010), TID16 = 1999, OT_Name = StadiumOT_JPN}, // Psyduck (Amnesia)
new(151, 5, RB) {IVs = Yoshira, OT_Names = YoshiOT, Language = International }, // Yoshira Mew Events
new(151, 5, RB) {IVs = Yoshira, OT_Names = TourOT, Language = International }, // Pokémon 2000 Stadium Tour Mew

View file

@ -139,14 +139,14 @@ internal static class Encounters2
internal static readonly EncounterStatic2E[] StaticEventsGB =
{
// Stadium 2 Baton Pass Farfetch'd
new(083, 05, C) {Moves = new(226, 14, 97, 163), Location = 127, TID = 2000, OT_Name = "スタジアム"},
new(083, 05, C) {Moves = new(226, 14, 97, 163), Location = 127, TID = 2000, OT_Name = "Stadium", Language = International},
new(083, 05, C) {Moves = new(226, 14, 97, 163), Location = 127, TID = 2001, OT_Names = new[]{"Stade", "Stadion", "Stadio", "Estadio"}, Language = International},
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 = new[]{"Stade", "Stadion", "Stadio", "Estadio"}, Language = International},
// Stadium 2 Earthquake Gligar
new(207, 05, C) {Moves = new(89, 68, 17), Location = 127, TID = 2000, OT_Name = "スタジアム"},
new(207, 05, C) {Moves = new(89, 68, 17), Location = 127, TID = 2000, OT_Name = "Stadium", Language = International},
new(207, 05, C) {Moves = new(89, 68, 17), Location = 127, TID = 2001, OT_Names = new[]{"Stade", "Stadion", "Stadio", "Estadio"}, Language = International},
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 = new[]{"Stade", "Stadion", "Stadio", "Estadio"}, Language = International},
//New York Pokémon Center Events

View file

@ -1,3 +1,4 @@
using System;
using static PKHeX.Core.EncounterUtil;
using static PKHeX.Core.GameVersion;
using static PKHeX.Core.AbilityPermission;
@ -69,34 +70,34 @@ internal static class Encounters3FRLG
new(150, 70, FRLG) { Location = 141 }, // Mewtwo @ Cerulean Cave
// Event
new(249, 70, FRLG) { Location = 174, Fateful = true }, // Lugia @ Navel Rock
new(250, 70, FRLG) { Location = 174, Fateful = true }, // Ho-Oh @ Navel Rock
new(386, 30, FR ) { Location = 187, Fateful = true, Form = 1 }, // Deoxys @ Birth Island
new(386, 30, LG) { Location = 187, Fateful = true, Form = 2 }, // Deoxys @ Birth Island
new(249, 70, FRLG) { Location = 174, FatefulEncounter = true }, // Lugia @ Navel Rock
new(250, 70, FRLG) { Location = 174, FatefulEncounter = true }, // Ho-Oh @ Navel Rock
new(386, 30, FR ) { Location = 187, FatefulEncounter = true, Form = 1 }, // Deoxys @ Birth Island
new(386, 30, LG) { Location = 187, FatefulEncounter = true, Form = 2 }, // Deoxys @ Birth Island
};
private static readonly EncounterStatic3[] Encounter_FRLG = ArrayUtil.ConcatAll(Encounter_FRLG_Roam, Encounter_FRLG_Stationary);
private static readonly byte[] TradeContest_Cool = { 30, 05, 05, 05, 05, 10 };
private static readonly byte[] TradeContest_Beauty = { 05, 30, 05, 05, 05, 10 };
private static readonly byte[] TradeContest_Cute = { 05, 05, 30, 05, 05, 10 };
private static readonly byte[] TradeContest_Clever = { 05, 05, 05, 30, 05, 10 };
private static readonly byte[] TradeContest_Tough = { 05, 05, 05, 05, 30, 10 };
private static ReadOnlySpan<byte> TradeContest_Cool => new byte[] { 30, 05, 05, 05, 05, 10 };
private static ReadOnlySpan<byte> TradeContest_Beauty => new byte[] { 05, 30, 05, 05, 05, 10 };
private static ReadOnlySpan<byte> TradeContest_Cute => new byte[] { 05, 05, 30, 05, 05, 10 };
private static ReadOnlySpan<byte> TradeContest_Clever => new byte[] { 05, 05, 05, 30, 05, 10 };
private static ReadOnlySpan<byte> TradeContest_Tough => new byte[] { 05, 05, 05, 05, 30, 10 };
internal static readonly EncounterTrade3[] TradeGift_FRLG =
{
new(FRLG, 0x00009CAE, 122, 05) { Ability = OnlyFirst, TID = 01985, SID = 00000, OTGender = 0, Gender = 0, IVs = new(20,15,17,24,23,22), Contest = TradeContest_Clever }, // Abra (Level 5 Breeding) -> Mr. Mime
new(FR , 0x4C970B89, 029, 05) { Ability = OnlyFirst, TID = 63184, SID = 00000, OTGender = 1, Gender = 1, IVs = new(22,18,25,19,15,22), Contest = TradeContest_Tough }, // Nidoran♀
new( LG, 0x4C970B9E, 032, 05) { Ability = OnlyFirst, TID = 63184, SID = 00000, OTGender = 1, Gender = 0, IVs = new(19,25,18,22,22,15), Contest = TradeContest_Cool }, // Nidoran♂ *
new(FR , 0x00EECA15, 030, 16) { Ability = OnlyFirst, TID = 13637, SID = 00000, OTGender = 0, Gender = 1, IVs = new(22,25,18,19,22,15), Contest = TradeContest_Cute }, // Nidorina *
new( LG, 0x00EECA19, 033, 16) { Ability = OnlyFirst, TID = 13637, SID = 00000, OTGender = 0, Gender = 0, IVs = new(19,18,25,22,15,22), Contest = TradeContest_Tough }, // Nidorino *
new(FR , 0x451308AB, 108, 25) { Ability = OnlyFirst, TID = 01239, SID = 00000, OTGender = 0, Gender = 0, IVs = new(24,19,21,15,23,21), Contest = TradeContest_Tough }, // Golduck (Level 25) -> Lickitung *
new( LG, 0x451308AB, 108, 25) { Ability = OnlyFirst, TID = 01239, SID = 00000, OTGender = 0, Gender = 0, IVs = new(24,19,21,15,23,21), Contest = TradeContest_Tough }, // Slowbro (Level 25) -> Lickitung *
new(FRLG, 0x498A2E1D, 124, 20) { Ability = OnlyFirst, TID = 36728, SID = 00000, OTGender = 0, Gender = 1, IVs = new(18,17,18,22,25,21), Contest = TradeContest_Beauty }, // Poliwhirl (Level 20) -> Jynx
new(FRLG, 0x151943D7, 083, 03) { Ability = OnlyFirst, TID = 08810, SID = 00000, OTGender = 0, Gender = 0, IVs = new(20,25,21,24,15,20), Contest = TradeContest_Cool }, // Spearow (Level 3 Capture) -> Farfetch'd
new(FRLG, 0x06341016, 101, 03) { Ability = OnlySecond, TID = 50298, SID = 00000, OTGender = 0, Gender = 2, IVs = new(19,16,18,25,25,19), Contest = TradeContest_Cool }, // Raichu (Level 3) -> Electrode
new(FRLG, 0x5C77ECFA, 114, 05) { Ability = OnlyFirst, TID = 60042, SID = 00000, OTGender = 1, Gender = 0, IVs = new(22,17,25,16,23,20), Contest = TradeContest_Cute }, // Venonat (Level 5 Breeding) -> Tangela
new(FRLG, 0x482CAC89, 086, 05) { Ability = OnlyFirst, TID = 09853, SID = 00000, OTGender = 0, Gender = 0, IVs = new(24,15,22,16,23,22), Contest = TradeContest_Tough }, // Ponyta (Level 5 Breeding) -> Seel *
new(FRLG, 0x00009CAE, 122, 05) { Ability = OnlyFirst, TID16 = 01985, SID16 = 00000, OTGender = 0, Gender = 0, IVs = new(20,15,17,24,23,22), Contest = TradeContest_Clever }, // Abra (Level 5 Breeding) -> Mr. Mime
new(FR , 0x4C970B89, 029, 05) { Ability = OnlyFirst, TID16 = 63184, SID16 = 00000, OTGender = 1, Gender = 1, IVs = new(22,18,25,19,15,22), Contest = TradeContest_Tough }, // Nidoran♀
new( LG, 0x4C970B9E, 032, 05) { Ability = OnlyFirst, TID16 = 63184, SID16 = 00000, OTGender = 1, Gender = 0, IVs = new(19,25,18,22,22,15), Contest = TradeContest_Cool }, // Nidoran♂ *
new(FR , 0x00EECA15, 030, 16) { Ability = OnlyFirst, TID16 = 13637, SID16 = 00000, OTGender = 0, Gender = 1, IVs = new(22,25,18,19,22,15), Contest = TradeContest_Cute }, // Nidorina *
new( LG, 0x00EECA19, 033, 16) { Ability = OnlyFirst, TID16 = 13637, SID16 = 00000, OTGender = 0, Gender = 0, IVs = new(19,18,25,22,15,22), Contest = TradeContest_Tough }, // Nidorino *
new(FR , 0x451308AB, 108, 25) { Ability = OnlyFirst, TID16 = 01239, SID16 = 00000, OTGender = 0, Gender = 0, IVs = new(24,19,21,15,23,21), Contest = TradeContest_Tough }, // Golduck (Level 25) -> Lickitung *
new( LG, 0x451308AB, 108, 25) { Ability = OnlyFirst, TID16 = 01239, SID16 = 00000, OTGender = 0, Gender = 0, IVs = new(24,19,21,15,23,21), Contest = TradeContest_Tough }, // Slowbro (Level 25) -> Lickitung *
new(FRLG, 0x498A2E1D, 124, 20) { Ability = OnlyFirst, TID16 = 36728, SID16 = 00000, OTGender = 0, Gender = 1, IVs = new(18,17,18,22,25,21), Contest = TradeContest_Beauty }, // Poliwhirl (Level 20) -> Jynx
new(FRLG, 0x151943D7, 083, 03) { Ability = OnlyFirst, TID16 = 08810, SID16 = 00000, OTGender = 0, Gender = 0, IVs = new(20,25,21,24,15,20), Contest = TradeContest_Cool }, // Spearow (Level 3 Capture) -> Farfetch'd
new(FRLG, 0x06341016, 101, 03) { Ability = OnlySecond, TID16 = 50298, SID16 = 00000, OTGender = 0, Gender = 2, IVs = new(19,16,18,25,25,19), Contest = TradeContest_Cool }, // Raichu (Level 3) -> Electrode
new(FRLG, 0x5C77ECFA, 114, 05) { Ability = OnlyFirst, TID16 = 60042, SID16 = 00000, OTGender = 1, Gender = 0, IVs = new(22,17,25,16,23,20), Contest = TradeContest_Cute }, // Venonat (Level 5 Breeding) -> Tangela
new(FRLG, 0x482CAC89, 086, 05) { Ability = OnlyFirst, TID16 = 09853, SID16 = 00000, OTGender = 0, Gender = 0, IVs = new(24,15,22,16,23,22), Contest = TradeContest_Tough }, // Ponyta (Level 5 Breeding) -> Seel *
// If Pokémon with * is evolved in a Generation IV or V game, its Ability will become its second Ability.
};

View file

@ -1,3 +1,4 @@
using System;
using static PKHeX.Core.EncounterUtil;
using static PKHeX.Core.GameVersion;
using static PKHeX.Core.AbilityPermission;
@ -58,9 +59,9 @@ internal static class Encounters3RSE
new(378, 40, RSE) { Location = 081 }, // Regice @ Island Cave
new(379, 40, RSE) { Location = 083 }, // Registeel @ Ancient Tomb
new(380, 50, R ) { Location = 073 }, // Latias @ Southern Island
new(380, 50, E) { Location = 073, Fateful = true }, // Latias @ Southern Island
new(380, 50, E) { Location = 073, FatefulEncounter = true }, // Latias @ Southern Island
new(381, 50, S ) { Location = 073 }, // Latios @ Southern Island
new(381, 50, E) { Location = 073, Fateful = true }, // Latios @ Southern Island
new(381, 50, E) { Location = 073, FatefulEncounter = true }, // Latios @ Southern Island
new(382, 45, S ) { Location = 072 }, // Kyogre @ Cave of Origin
new(382, 70, E) { Location = 203 }, // Kyogre @ Marine Cave
new(383, 45, R ) { Location = 072 }, // Groudon @ Cave of Origin
@ -68,29 +69,29 @@ internal static class Encounters3RSE
new(384, 70, RSE) { Location = 085 }, // Rayquaza @ Sky Pillar
// Event
new(151, 30, E) { Location = 201, Fateful = true }, // Mew @ Faraway Island (Unreleased outside of Japan)
new(249, 70, E) { Location = 211, Fateful = true }, // Lugia @ Navel Rock
new(250, 70, E) { Location = 211, Fateful = true }, // Ho-Oh @ Navel Rock
new(386, 30, E) { Location = 200, Fateful = true, Form = 3 }, // Deoxys @ Birth Island
new(151, 30, E) { Location = 201, FatefulEncounter = true }, // Mew @ Faraway Island (Unreleased outside of Japan)
new(249, 70, E) { Location = 211, FatefulEncounter = true }, // Lugia @ Navel Rock
new(250, 70, E) { Location = 211, FatefulEncounter = true }, // Ho-Oh @ Navel Rock
new(386, 30, E) { Location = 200, FatefulEncounter = true, Form = 3 }, // Deoxys @ Birth Island
};
private static readonly EncounterStatic3[] Encounter_RSE = ArrayUtil.ConcatAll(Encounter_RSE_Roam, Encounter_RSE_Regular);
private static readonly byte[] TradeContest_Cool = { 30, 05, 05, 05, 05, 10 };
private static readonly byte[] TradeContest_Beauty = { 05, 30, 05, 05, 05, 10 };
private static readonly byte[] TradeContest_Cute = { 05, 05, 30, 05, 05, 10 };
private static readonly byte[] TradeContest_Clever = { 05, 05, 05, 30, 05, 10 };
private static readonly byte[] TradeContest_Tough = { 05, 05, 05, 05, 30, 10 };
private static ReadOnlySpan<byte> TradeContest_Cool => new byte[] { 30, 05, 05, 05, 05, 10 };
private static ReadOnlySpan<byte> TradeContest_Beauty => new byte[] { 05, 30, 05, 05, 05, 10 };
private static ReadOnlySpan<byte> TradeContest_Cute => new byte[] { 05, 05, 30, 05, 05, 10 };
private static ReadOnlySpan<byte> TradeContest_Clever => new byte[] { 05, 05, 05, 30, 05, 10 };
private static ReadOnlySpan<byte> TradeContest_Tough => new byte[] { 05, 05, 05, 05, 30, 10 };
internal static readonly EncounterTrade3[] TradeGift_RSE =
{
new(RS, 0x00009C40, 296, 05) { Ability = OnlySecond, TID = 49562, SID = 00000, OTGender = 0, Gender = 0, IVs = new(5,5,4,4,4,4), Contest = TradeContest_Tough }, // Slakoth (Level 5 Breeding) -> Makuhita
new(RS, 0x498A2E17, 300, 03) { Ability = OnlyFirst, TID = 02259, SID = 00000, OTGender = 1, Gender = 1, IVs = new(5,4,4,5,4,4), Contest = TradeContest_Cute }, // Pikachu (Level 3 Viridian Forest) -> Skitty
new(RS, 0x4C970B7F, 222, 21) { Ability = OnlySecond, TID = 50183, SID = 00000, OTGender = 1, Gender = 1, IVs = new(4,4,5,4,4,5), Contest = TradeContest_Beauty }, // Bellossom (Level 21 Oddish -> Gloom -> Bellossom) -> Corsola
new(E , 0x00000084, 273, 04) { Ability = OnlySecond, TID = 38726, SID = 00000, OTGender = 0, Gender = 0, IVs = new(5,4,5,4,4,4), Contest = TradeContest_Cool }, // Ralts (Level 4 Route 102) -> Seedot
new(E , 0x0000006F, 311, 05) { Ability = OnlyFirst, TID = 08460, SID = 00001, OTGender = 0, Gender = 1, IVs = new(4,4,4,5,5,4), Contest = TradeContest_Cute }, // Volbeat (Level 5 Breeding) -> Plusle
new(E , 0x0000007F, 116, 05) { Ability = OnlyFirst, TID = 46285, SID = 00000, OTGender = 0, Gender = 0, IVs = new(5,4,4,4,5,4), Contest = TradeContest_Tough }, // Bagon (Level 5 Breeding) -> Horsea*
new(E , 0x0000008B, 052, 03) { Ability = OnlyFirst, TID = 25945, SID = 00001, OTGender = 1, Gender = 0, IVs = new(4,5,4,5,4,4), Contest = TradeContest_Clever }, // Skitty (Level 3 Trade)-> Meowth*
new(RS, 0x00009C40, 296, 05) { Ability = OnlySecond, TID16 = 49562, SID16 = 00000, OTGender = 0, Gender = 0, IVs = new(5,5,4,4,4,4), Contest = TradeContest_Tough }, // Slakoth (Level 5 Breeding) -> Makuhita
new(RS, 0x498A2E17, 300, 03) { Ability = OnlyFirst, TID16 = 02259, SID16 = 00000, OTGender = 1, Gender = 1, IVs = new(5,4,4,5,4,4), Contest = TradeContest_Cute }, // Pikachu (Level 3 Viridian Forest) -> Skitty
new(RS, 0x4C970B7F, 222, 21) { Ability = OnlySecond, TID16 = 50183, SID16 = 00000, OTGender = 1, Gender = 1, IVs = new(4,4,5,4,4,5), Contest = TradeContest_Beauty }, // Bellossom (Level 21 Oddish -> Gloom -> Bellossom) -> Corsola
new(E , 0x00000084, 273, 04) { Ability = OnlySecond, TID16 = 38726, SID16 = 00000, OTGender = 0, Gender = 0, IVs = new(5,4,5,4,4,4), Contest = TradeContest_Cool }, // Ralts (Level 4 Route 102) -> Seedot
new(E , 0x0000006F, 311, 05) { Ability = OnlyFirst, TID16 = 08460, SID16 = 00001, OTGender = 0, Gender = 1, IVs = new(4,4,4,5,5,4), Contest = TradeContest_Cute }, // Volbeat (Level 5 Breeding) -> Plusle
new(E , 0x0000007F, 116, 05) { Ability = OnlyFirst, TID16 = 46285, SID16 = 00000, OTGender = 0, Gender = 0, IVs = new(5,4,4,4,5,4), Contest = TradeContest_Tough }, // Bagon (Level 5 Breeding) -> Horsea*
new(E , 0x0000008B, 052, 03) { Ability = OnlyFirst, TID16 = 25945, SID16 = 00001, OTGender = 1, Gender = 0, IVs = new(4,5,4,5,4,4), Contest = TradeContest_Clever }, // Skitty (Level 3 Trade)-> Meowth*
// If Pokémon with * is evolved in a Generation IV or V game, its Ability will become its second Ability.
};

View file

@ -6,104 +6,104 @@ internal static class Encounters3XD
{
private static readonly EncounterStatic3[] Encounter_XDGift =
{
new(133, 10, GameVersion.XD) { Fateful = true, Gift = true, Location = 000, Moves = new(044) }, // Eevee (Bite)
new(152, 05, GameVersion.XD) { Fateful = true, Gift = true, Location = 016, Moves = new(246,033,045,338) }, // Chikorita
new(155, 05, GameVersion.XD) { Fateful = true, Gift = true, Location = 016, Moves = new(179,033,043,307) }, // Cyndaquil
new(158, 05, GameVersion.XD) { Fateful = true, Gift = true, Location = 016, Moves = new(242,010,043,308) }, // Totodile
new(133, 10, GameVersion.XD) { FatefulEncounter = true, Gift = true, Location = 000, Moves = new(044) }, // Eevee (Bite)
new(152, 05, GameVersion.XD) { FatefulEncounter = true, Gift = true, Location = 016, Moves = new(246,033,045,338) }, // Chikorita
new(155, 05, GameVersion.XD) { FatefulEncounter = true, Gift = true, Location = 016, Moves = new(179,033,043,307) }, // Cyndaquil
new(158, 05, GameVersion.XD) { FatefulEncounter = true, Gift = true, Location = 016, Moves = new(242,010,043,308) }, // Totodile
};
private static readonly EncounterStaticShadow[] Encounter_XD =
{
new(GameVersion.XD, 01, 03000, First) { Fateful = true, Species = 216, Level = 11, Moves = new(216,287,122,232), Location = 143, Gift = true }, // Teddiursa: Cipher Peon Naps @ Pokémon HQ Lab -- treat as Gift as it can only be captured in a Poké Ball
new(GameVersion.XD, 02, 02000, Vulpix) { Fateful = true, Species = 037, Level = 18, Moves = new(257,204,052,091), Location = 109 }, // Vulpix: Cipher Peon Mesin @ ONBS Building
new(GameVersion.XD, 03, 01500, Spheal) { Fateful = true, Species = 363, Level = 17, Moves = new(062,204,055,189), Location = 011 }, // Spheal: Cipher Peon Blusix @ Cipher Lab
new(GameVersion.XD, 03, 01500, Spheal) { Fateful = true, Species = 363, Level = 17, Moves = new(062,204,055,189), Location = 100 }, // Spheal: Cipher Peon Blusix @ Phenac City
new(GameVersion.XD, 04, 01500, First) { Fateful = true, Species = 343, Level = 17, Moves = new(317,287,189,060), Location = 011 }, // Baltoy: Cipher Peon Browsix @ Cipher Lab
new(GameVersion.XD, 04, 01500, First) { Fateful = true, Species = 343, Level = 17, Moves = new(317,287,189,060), Location = 096 }, // Baltoy: Cipher Peon Browsix @ Phenac City
new(GameVersion.XD, 05, 01500, First) { Fateful = true, Species = 179, Level = 17, Moves = new(034,215,084,086), Location = 011 }, // Mareep: Cipher Peon Yellosix @ Cipher Lab
new(GameVersion.XD, 05, 01500, First) { Fateful = true, Species = 179, Level = 17, Moves = new(034,215,084,086), Location = 096 }, // Mareep: Cipher Peon Yellosix @ Phenac City
new(GameVersion.XD, 06, 01500, Gulpin) { Fateful = true, Species = 316, Level = 17, Moves = new(351,047,124,092), Location = 011 }, // Gulpin: Cipher Peon Purpsix @ Cipher Lab
new(GameVersion.XD, 06, 01500, Gulpin) { Fateful = true, Species = 316, Level = 17, Moves = new(351,047,124,092), Location = 100 }, // Gulpin: Cipher Peon Purpsix @ Phenac City
new(GameVersion.XD, 07, 01500, Seedot) { Fateful = true, Species = 273, Level = 17, Moves = new(202,287,331,290), Location = 011 }, // Seedot: Cipher Peon Greesix @ Cipher Lab
new(GameVersion.XD, 07, 01500, Seedot) { Fateful = true, Species = 273, Level = 17, Moves = new(202,287,331,290), Location = 100 }, // Seedot: Cipher Peon Greesix @ Phenac City
new(GameVersion.XD, 08, 01500, Spinarak) { Fateful = true, Species = 167, Level = 14, Moves = new(091,287,324,101), Location = 010 }, // Spinarak: Cipher Peon Nexir @ Cipher Lab
new(GameVersion.XD, 09, 01500, Numel) { Fateful = true, Species = 322, Level = 14, Moves = new(036,204,091,052), Location = 009 }, // Numel: Cipher Peon Solox @ Cipher Lab
new(GameVersion.XD, 10, 01700, First) { Fateful = true, Species = 318, Level = 15, Moves = new(352,287,184,044), Location = 008 }, // Carvanha: Cipher Peon Cabol @ Cipher Lab
new(GameVersion.XD, 11, 03000, Roselia) { Fateful = true, Species = 315, Level = 22, Moves = new(345,186,320,073), Location = 094 }, // Roselia: Cipher Peon Fasin @ Phenac City
new(GameVersion.XD, 12, 02500, Delcatty) { Fateful = true, Species = 301, Level = 18, Moves = new(290,186,213,351), Location = 008 }, // Delcatty: Cipher Admin Lovrina @ Cipher Lab
new(GameVersion.XD, 13, 04000, Nosepass) { Fateful = true, Species = 299, Level = 26, Moves = new(085,270,086,157), Location = 090 }, // Nosepass: Wanderer Miror B. @ Poké Spots
new(GameVersion.XD, 14, 01500, First) { Fateful = true, Species = 228, Level = 17, Moves = new(185,204,052,046), Location = 100 }, // Houndour: Cipher Peon Resix @ Phenac City
new(GameVersion.XD, 14, 01500, First) { Fateful = true, Species = 228, Level = 17, Moves = new(185,204,052,046), Location = 011 }, // Houndour: Cipher Peon Resix @ Cipher Lab
new(GameVersion.XD, 15, 02000, Makuhita) { Fateful = true, Species = 296, Level = 18, Moves = new(280,287,292,317), Location = 109 }, // Makuhita: Cipher Peon Torkin @ ONBS Building
new(GameVersion.XD, 16, 02200, Duskull) { Fateful = true, Species = 355, Level = 19, Moves = new(247,270,310,109), Location = 110 }, // Duskull: Cipher Peon Lobar @ ONBS Building
new(GameVersion.XD, 17, 02200, Ralts) { Fateful = true, Species = 280, Level = 20, Moves = new(351,047,115,093), Location = 119 }, // Ralts: Cipher Peon Feldas @ ONBS Building
new(GameVersion.XD, 18, 02500, Mawile) { Fateful = true, Species = 303, Level = 22, Moves = new(206,047,011,334), Location = 111 }, // Mawile: Cipher Cmdr Exol @ ONBS Building
new(GameVersion.XD, 19, 02500, Snorunt) { Fateful = true, Species = 361, Level = 20, Moves = new(352,047,044,196), Location = 097 }, // Snorunt: Cipher Peon Exinn @ Phenac City
new(GameVersion.XD, 20, 02500, Pineco) { Fateful = true, Species = 204, Level = 20, Moves = new(042,287,191,068), Location = 096 }, // Pineco: Cipher Peon Gonrap @ Phenac City
new(GameVersion.XD, 21, 02500, Swinub) { Fateful = true, Species = 220, Level = 22, Moves = new(246,204,054,341), Location = 100 }, // Swinub: Cipher Peon Greck @ Phenac City
new(GameVersion.XD, 22, 02500, Natu) { Fateful = true, Species = 177, Level = 22, Moves = new(248,226,101,332), Location = 094 }, // Natu: Cipher Peon Eloin @ Phenac City
new(GameVersion.XD, 23, 01800, Shroomish) { Fateful = true, Species = 285, Level = 15, Moves = new(206,287,072,078), Location = 008 }, // Shroomish: Cipher R&D Klots @ Cipher Lab
new(GameVersion.XD, 24, 03500, Meowth) { Fateful = true, Species = 052, Level = 22, Moves = new(163,047,006,044), Location = 094 }, // Meowth: Cipher Peon Fostin @ Phenac City
new(GameVersion.XD, 25, 04500, Spearow) { Fateful = true, Species = 021, Level = 22, Moves = new(206,226,043,332), Location = 107 }, // Spearow: Cipher Peon Ezin @ Phenac Stadium
new(GameVersion.XD, 26, 03000, Grimer) { Fateful = true, Species = 088, Level = 23, Moves = new(188,270,325,107), Location = 107 }, // Grimer: Cipher Peon Faltly @ Phenac Stadium
new(GameVersion.XD, 27, 03500, Seel) { Fateful = true, Species = 086, Level = 23, Moves = new(057,270,219,058), Location = 107 }, // Seel: Cipher Peon Egrog @ Phenac Stadium
new(GameVersion.XD, 28, 05000, Lunatone) { Fateful = true, Species = 337, Level = 25, Moves = new(094,226,240,317), Location = 107 }, // Lunatone: Cipher Admin Snattle @ Phenac Stadium
new(GameVersion.XD, 29, 02500, Voltorb) { Fateful = true, Species = 100, Level = 19, Moves = new(243,287,209,129), Location = 092 }, // Voltorb: Wanderer Miror B. @ Cave Poké Spot
new(GameVersion.XD, 30, 05000, First) { Fateful = true, Species = 335, Level = 28, Moves = new(280,287,068,306), Location = 071 }, // Zangoose: Thug Zook @ Cipher Key Lair
new(GameVersion.XD, 31, 04000, Growlithe) { Fateful = true, Species = 058, Level = 28, Moves = new(053,204,044,036), Location = 064 }, // Growlithe: Cipher Peon Humah @ Cipher Key Lair
new(GameVersion.XD, 32, 04000, Paras) { Fateful = true, Species = 046, Level = 28, Moves = new(147,287,163,206), Location = 064 }, // Paras: Cipher Peon Humah @ Cipher Key Lair
new(GameVersion.XD, 33, 04000, First) { Fateful = true, Species = 090, Level = 29, Moves = new(036,287,057,062), Location = 065 }, // Shellder: Cipher Peon Gorog @ Cipher Key Lair
new(GameVersion.XD, 34, 04500, First) { Fateful = true, Species = 015, Level = 30, Moves = new(188,226,041,014), Location = 066 }, // Beedrill: Cipher Peon Lok @ Cipher Key Lair
new(GameVersion.XD, 35, 04000, Pidgeotto) { Fateful = true, Species = 017, Level = 30, Moves = new(017,287,211,297), Location = 066 }, // Pidgeotto: Cipher Peon Lok @ Cipher Key Lair
new(GameVersion.XD, 36, 04000, Butterfree){ Fateful = true, Species = 012, Level = 30, Moves = new(094,234,079,332), Location = 067 }, // Butterfree: Cipher Peon Targ @ Cipher Key Lair
new(GameVersion.XD, 37, 04000, Tangela) { Fateful = true, Species = 114, Level = 30, Moves = new(076,234,241,275), Location = 067 }, // Tangela: Cipher Peon Targ @ Cipher Key Lair
new(GameVersion.XD, 38, 06000, Raticate) { Fateful = true, Species = 020, Level = 34, Moves = new(162,287,184,158), Location = 076 }, // Raticate: Chaser Furgy @ Citadark Isle
new(GameVersion.XD, 39, 04000, Venomoth) { Fateful = true, Species = 049, Level = 32, Moves = new(318,287,164,094), Location = 070 }, // Venomoth: Cipher Peon Angic @ Cipher Key Lair
new(GameVersion.XD, 40, 04000, Weepinbell){ Fateful = true, Species = 070, Level = 32, Moves = new(345,234,188,230), Location = 070 }, // Weepinbell: Cipher Peon Angic @ Cipher Key Lair
new(GameVersion.XD, 41, 05000, Arbok) { Fateful = true, Species = 024, Level = 33, Moves = new(188,287,137,044), Location = 070 }, // Arbok: Cipher Peon Smarton @ Cipher Key Lair
new(GameVersion.XD, 42, 06000, Primeape) { Fateful = true, Species = 057, Level = 34, Moves = new(238,270,116,179), Location = 069 }, // Primeape: Cipher Admin Gorigan @ Cipher Key Lair
new(GameVersion.XD, 43, 05500, Hypno) { Fateful = true, Species = 097, Level = 34, Moves = new(094,226,096,247), Location = 069 }, // Hypno: Cipher Admin Gorigan @ Cipher Key Lair
new(GameVersion.XD, 44, 06500, Golduck) { Fateful = true, Species = 055, Level = 33, Moves = new(127,204,244,280), Location = 088 }, // Golduck: Navigator Abson @ Citadark Isle
new(GameVersion.XD, 45, 07000, Sableye) { Fateful = true, Species = 302, Level = 33, Moves = new(247,270,185,105), Location = 088 }, // Sableye: Navigator Abson @ Citadark Isle
new(GameVersion.XD, 46, 04500, Magneton) { Fateful = true, Species = 082, Level = 30, Moves = new(038,287,240,087), Location = 067 }, // Magneton: Cipher Peon Snidle @ Cipher Key Lair
new(GameVersion.XD, 47, 08000, Dodrio) { Fateful = true, Species = 085, Level = 34, Moves = new(065,226,097,161), Location = 076 }, // Dodrio: Chaser Furgy @ Citadark Isle
new(GameVersion.XD, 48, 05500, Farfetchd) { Fateful = true, Species = 083, Level = 36, Moves = new(163,226,014,332), Location = 076 }, // Farfetch'd: Cipher Admin Lovrina @ Citadark Isle
new(GameVersion.XD, 49, 06500, Altaria) { Fateful = true, Species = 334, Level = 36, Moves = new(225,215,076,332), Location = 076 }, // Altaria: Cipher Admin Lovrina @ Citadark Isle
new(GameVersion.XD, 50, 06000, Kangaskhan){ Fateful = true, Species = 115, Level = 35, Moves = new(089,047,039,146), Location = 085 }, // Kangaskhan: Cipher Peon Litnar @ Citadark Isle
new(GameVersion.XD, 51, 07000, Banette) { Fateful = true, Species = 354, Level = 37, Moves = new(185,270,247,174), Location = 085 }, // Banette: Cipher Peon Litnar @ Citadark Isle
new(GameVersion.XD, 52, 07000, Magmar) { Fateful = true, Species = 126, Level = 36, Moves = new(126,266,238,009), Location = 077 }, // Magmar: Cipher Peon Grupel @ Citadark Isle
new(GameVersion.XD, 53, 07000, Pinsir) { Fateful = true, Species = 127, Level = 35, Moves = new(012,270,206,066), Location = 077 }, // Pinsir: Cipher Peon Grupel @ Citadark Isle
new(GameVersion.XD, 54, 05500, Magcargo) { Fateful = true, Species = 219, Level = 38, Moves = new(257,287,089,053), Location = 080 }, // Magcargo: Cipher Peon Kolest @ Citadark Isle
new(GameVersion.XD, 55, 06000, Rapidash) { Fateful = true, Species = 078, Level = 40, Moves = new(076,226,241,053), Location = 080 }, // Rapidash: Cipher Peon Kolest @ Citadark Isle
new(GameVersion.XD, 56, 06000, Hitmonchan){ Fateful = true, Species = 107, Level = 38, Moves = new(005,270,170,327), Location = 081 }, // Hitmonchan: Cipher Peon Karbon @ Citadark Isle
new(GameVersion.XD, 57, 07000, Hitmonlee) { Fateful = true, Species = 106, Level = 38, Moves = new(136,287,170,025), Location = 081 }, // Hitmonlee: Cipher Peon Petro @ Citadark Isle
new(GameVersion.XD, 58, 05000, Lickitung) { Fateful = true, Species = 108, Level = 38, Moves = new(038,270,111,205), Location = 084 }, // Lickitung: Cipher Peon Geftal @ Citadark Isle
new(GameVersion.XD, 59, 08000, Scyther) { Fateful = true, Species = 123, Level = 40, Moves = new(013,234,318,163), Location = 084 }, // Scyther: Cipher Peon Leden @ Citadark Isle
new(GameVersion.XD, 60, 04000, Chansey) { Fateful = true, Species = 113, Level = 39, Moves = new(085,186,135,285), Location = 084 }, // Chansey: Cipher Peon Leden @ Citadark Isle
new(GameVersion.XD, 60, 04000, Chansey) { Fateful = true, Species = 113, Level = 39, Moves = new(085,186,135,285), Location = 087 }, // Chansey: Cipher Peon Leden @ Citadark Isle
new(GameVersion.XD, 61, 07500, Solrock) { Fateful = true, Species = 338, Level = 41, Moves = new(094,226,241,322), Location = 087 }, // Solrock: Cipher Admin Snattle @ Citadark Isle
new(GameVersion.XD, 62, 07500, Starmie) { Fateful = true, Species = 121, Level = 41, Moves = new(127,287,058,105), Location = 087 }, // Starmie: Cipher Admin Snattle @ Citadark Isle
new(GameVersion.XD, 63, 07000, Electabuzz){ Fateful = true, Species = 125, Level = 43, Moves = new(238,266,086,085), Location = 087 }, // Electabuzz: Cipher Admin Ardos @ Citadark Isle
new(GameVersion.XD, 64, 07000, First) { Fateful = true, Species = 277, Level = 43, Moves = new(143,226,097,263), Location = 087 }, // Swellow: Cipher Admin Ardos @ Citadark Isle
new(GameVersion.XD, 65, 09000, Snorlax) { Fateful = true, Species = 143, Level = 43, Moves = new(090,287,174,034), Location = 087 }, // Snorlax: Cipher Admin Ardos @ Citadark Isle
new(GameVersion.XD, 66, 07500, Poliwrath) { Fateful = true, Species = 062, Level = 42, Moves = new(056,270,240,280), Location = 087 }, // Poliwrath: Cipher Admin Gorigan @ Citadark Isle
new(GameVersion.XD, 67, 06500, MrMime) { Fateful = true, Species = 122, Level = 42, Moves = new(094,266,227,009), Location = 087 }, // Mr. Mime: Cipher Admin Gorigan @ Citadark Isle
new(GameVersion.XD, 68, 05000, Dugtrio) { Fateful = true, Species = 051, Level = 40, Moves = new(089,204,201,161), Location = 075 }, // Dugtrio: Cipher Peon Kolax @ Citadark Isle
new(GameVersion.XD, 69, 07000, Manectric) { Fateful = true, Species = 310, Level = 44, Moves = new(087,287,240,044), Location = 073 }, // Manectric: Cipher Admin Eldes @ Citadark Isle
new(GameVersion.XD, 70, 09000, Salamence) { Fateful = true, Species = 373, Level = 50, Moves = new(337,287,349,332), Location = 073 }, // Salamence: Cipher Admin Eldes @ Citadark Isle
new(GameVersion.XD, 71, 06500, Marowak) { Fateful = true, Species = 105, Level = 44, Moves = new(089,047,014,157), Location = 073 }, // Marowak: Cipher Admin Eldes @ Citadark Isle
new(GameVersion.XD, 72, 06000, Lapras) { Fateful = true, Species = 131, Level = 44, Moves = new(056,215,240,059), Location = 073 }, // Lapras: Cipher Admin Eldes @ Citadark Isle
new(GameVersion.XD, 73, 12000, First) { Fateful = true, Species = 249, Level = 50, Moves = new(354,297,089,056), Location = 074 }, // Lugia: Grand Master Greevil @ Citadark Isle
new(GameVersion.XD, 74, 10000, Zapdos) { Fateful = true, Species = 145, Level = 50, Moves = new(326,226,319,085), Location = 074 }, // Zapdos: Grand Master Greevil @ Citadark Isle
new(GameVersion.XD, 75, 10000, Moltres) { Fateful = true, Species = 146, Level = 50, Moves = new(326,234,261,053), Location = 074 }, // Moltres: Grand Master Greevil @ Citadark Isle
new(GameVersion.XD, 76, 10000, Articuno) { Fateful = true, Species = 144, Level = 50, Moves = new(326,215,114,058), Location = 074 }, // Articuno: Grand Master Greevil @ Citadark Isle
new(GameVersion.XD, 77, 09000, Tauros) { Fateful = true, Species = 128, Level = 46, Moves = new(089,287,039,034), Location = 074 }, // Tauros: Grand Master Greevil @ Citadark Isle
new(GameVersion.XD, 78, 07000, First) { Fateful = true, Species = 112, Level = 46, Moves = new(224,270,184,089), Location = 074 }, // Rhydon: Grand Master Greevil @ Citadark Isle
new(GameVersion.XD, 79, 09000, Exeggutor) { Fateful = true, Species = 103, Level = 46, Moves = new(094,287,095,246), Location = 074 }, // Exeggutor: Grand Master Greevil @ Citadark Isle
new(GameVersion.XD, 80, 09000, Dragonite) { Fateful = true, Species = 149, Level = 55, Moves = new(063,215,349,089), Location = 162 }, // Dragonite: Wanderer Miror B. @ Gateon Port
new(GameVersion.XD, 81, 04500, First) { Fateful = true, Species = 175, Level = 25, Moves = new(266,161,246,270), Location = 164, Gift = true }, // Togepi: Pokémon Trainer Hordel @ Outskirt Stand
new(GameVersion.XD, 82, 02500, Poochyena) { Fateful = true, Species = 261, Level = 10, Moves = new(091,215,305,336), Location = 162 }, // Poochyena: Bodybuilder Kilen @ Gateon Port
new(GameVersion.XD, 83, 02500, Ledyba) { Fateful = true, Species = 165, Level = 10, Moves = new(060,287,332,048), Location = 153 }, // Ledyba: Casual Guy Cyle @ Gateon Port
new(GameVersion.XD, 01, 03000, First) { FatefulEncounter = true, Species = 216, Level = 11, Moves = new(216,287,122,232), Location = 143, Gift = true }, // Teddiursa: Cipher Peon Naps @ Pokémon HQ Lab -- treat as Gift as it can only be captured in a Poké Ball
new(GameVersion.XD, 02, 02000, Vulpix) { FatefulEncounter = true, Species = 037, Level = 18, Moves = new(257,204,052,091), Location = 109 }, // Vulpix: Cipher Peon Mesin @ ONBS Building
new(GameVersion.XD, 03, 01500, Spheal) { FatefulEncounter = true, Species = 363, Level = 17, Moves = new(062,204,055,189), Location = 011 }, // Spheal: Cipher Peon Blusix @ Cipher Lab
new(GameVersion.XD, 03, 01500, Spheal) { FatefulEncounter = true, Species = 363, Level = 17, Moves = new(062,204,055,189), Location = 100 }, // Spheal: Cipher Peon Blusix @ Phenac City
new(GameVersion.XD, 04, 01500, First) { FatefulEncounter = true, Species = 343, Level = 17, Moves = new(317,287,189,060), Location = 011 }, // Baltoy: Cipher Peon Browsix @ Cipher Lab
new(GameVersion.XD, 04, 01500, First) { FatefulEncounter = true, Species = 343, Level = 17, Moves = new(317,287,189,060), Location = 096 }, // Baltoy: Cipher Peon Browsix @ Phenac City
new(GameVersion.XD, 05, 01500, First) { FatefulEncounter = true, Species = 179, Level = 17, Moves = new(034,215,084,086), Location = 011 }, // Mareep: Cipher Peon Yellosix @ Cipher Lab
new(GameVersion.XD, 05, 01500, First) { FatefulEncounter = true, Species = 179, Level = 17, Moves = new(034,215,084,086), Location = 096 }, // Mareep: Cipher Peon Yellosix @ Phenac City
new(GameVersion.XD, 06, 01500, Gulpin) { FatefulEncounter = true, Species = 316, Level = 17, Moves = new(351,047,124,092), Location = 011 }, // Gulpin: Cipher Peon Purpsix @ Cipher Lab
new(GameVersion.XD, 06, 01500, Gulpin) { FatefulEncounter = true, Species = 316, Level = 17, Moves = new(351,047,124,092), Location = 100 }, // Gulpin: Cipher Peon Purpsix @ Phenac City
new(GameVersion.XD, 07, 01500, Seedot) { FatefulEncounter = true, Species = 273, Level = 17, Moves = new(202,287,331,290), Location = 011 }, // Seedot: Cipher Peon Greesix @ Cipher Lab
new(GameVersion.XD, 07, 01500, Seedot) { FatefulEncounter = true, Species = 273, Level = 17, Moves = new(202,287,331,290), Location = 100 }, // Seedot: Cipher Peon Greesix @ Phenac City
new(GameVersion.XD, 08, 01500, Spinarak) { FatefulEncounter = true, Species = 167, Level = 14, Moves = new(091,287,324,101), Location = 010 }, // Spinarak: Cipher Peon Nexir @ Cipher Lab
new(GameVersion.XD, 09, 01500, Numel) { FatefulEncounter = true, Species = 322, Level = 14, Moves = new(036,204,091,052), Location = 009 }, // Numel: Cipher Peon Solox @ Cipher Lab
new(GameVersion.XD, 10, 01700, First) { FatefulEncounter = true, Species = 318, Level = 15, Moves = new(352,287,184,044), Location = 008 }, // Carvanha: Cipher Peon Cabol @ Cipher Lab
new(GameVersion.XD, 11, 03000, Roselia) { FatefulEncounter = true, Species = 315, Level = 22, Moves = new(345,186,320,073), Location = 094 }, // Roselia: Cipher Peon Fasin @ Phenac City
new(GameVersion.XD, 12, 02500, Delcatty) { FatefulEncounter = true, Species = 301, Level = 18, Moves = new(290,186,213,351), Location = 008 }, // Delcatty: Cipher Admin Lovrina @ Cipher Lab
new(GameVersion.XD, 13, 04000, Nosepass) { FatefulEncounter = true, Species = 299, Level = 26, Moves = new(085,270,086,157), Location = 090 }, // Nosepass: Wanderer Miror B. @ Poké Spots
new(GameVersion.XD, 14, 01500, First) { FatefulEncounter = true, Species = 228, Level = 17, Moves = new(185,204,052,046), Location = 100 }, // Houndour: Cipher Peon Resix @ Phenac City
new(GameVersion.XD, 14, 01500, First) { FatefulEncounter = true, Species = 228, Level = 17, Moves = new(185,204,052,046), Location = 011 }, // Houndour: Cipher Peon Resix @ Cipher Lab
new(GameVersion.XD, 15, 02000, Makuhita) { FatefulEncounter = true, Species = 296, Level = 18, Moves = new(280,287,292,317), Location = 109 }, // Makuhita: Cipher Peon Torkin @ ONBS Building
new(GameVersion.XD, 16, 02200, Duskull) { FatefulEncounter = true, Species = 355, Level = 19, Moves = new(247,270,310,109), Location = 110 }, // Duskull: Cipher Peon Lobar @ ONBS Building
new(GameVersion.XD, 17, 02200, Ralts) { FatefulEncounter = true, Species = 280, Level = 20, Moves = new(351,047,115,093), Location = 119 }, // Ralts: Cipher Peon Feldas @ ONBS Building
new(GameVersion.XD, 18, 02500, Mawile) { FatefulEncounter = true, Species = 303, Level = 22, Moves = new(206,047,011,334), Location = 111 }, // Mawile: Cipher Cmdr Exol @ ONBS Building
new(GameVersion.XD, 19, 02500, Snorunt) { FatefulEncounter = true, Species = 361, Level = 20, Moves = new(352,047,044,196), Location = 097 }, // Snorunt: Cipher Peon Exinn @ Phenac City
new(GameVersion.XD, 20, 02500, Pineco) { FatefulEncounter = true, Species = 204, Level = 20, Moves = new(042,287,191,068), Location = 096 }, // Pineco: Cipher Peon Gonrap @ Phenac City
new(GameVersion.XD, 21, 02500, Swinub) { FatefulEncounter = true, Species = 220, Level = 22, Moves = new(246,204,054,341), Location = 100 }, // Swinub: Cipher Peon Greck @ Phenac City
new(GameVersion.XD, 22, 02500, Natu) { FatefulEncounter = true, Species = 177, Level = 22, Moves = new(248,226,101,332), Location = 094 }, // Natu: Cipher Peon Eloin @ Phenac City
new(GameVersion.XD, 23, 01800, Shroomish) { FatefulEncounter = true, Species = 285, Level = 15, Moves = new(206,287,072,078), Location = 008 }, // Shroomish: Cipher R&D Klots @ Cipher Lab
new(GameVersion.XD, 24, 03500, Meowth) { FatefulEncounter = true, Species = 052, Level = 22, Moves = new(163,047,006,044), Location = 094 }, // Meowth: Cipher Peon Fostin @ Phenac City
new(GameVersion.XD, 25, 04500, Spearow) { FatefulEncounter = true, Species = 021, Level = 22, Moves = new(206,226,043,332), Location = 107 }, // Spearow: Cipher Peon Ezin @ Phenac Stadium
new(GameVersion.XD, 26, 03000, Grimer) { FatefulEncounter = true, Species = 088, Level = 23, Moves = new(188,270,325,107), Location = 107 }, // Grimer: Cipher Peon Faltly @ Phenac Stadium
new(GameVersion.XD, 27, 03500, Seel) { FatefulEncounter = true, Species = 086, Level = 23, Moves = new(057,270,219,058), Location = 107 }, // Seel: Cipher Peon Egrog @ Phenac Stadium
new(GameVersion.XD, 28, 05000, Lunatone) { FatefulEncounter = true, Species = 337, Level = 25, Moves = new(094,226,240,317), Location = 107 }, // Lunatone: Cipher Admin Snattle @ Phenac Stadium
new(GameVersion.XD, 29, 02500, Voltorb) { FatefulEncounter = true, Species = 100, Level = 19, Moves = new(243,287,209,129), Location = 092 }, // Voltorb: Wanderer Miror B. @ Cave Poké Spot
new(GameVersion.XD, 30, 05000, First) { FatefulEncounter = true, Species = 335, Level = 28, Moves = new(280,287,068,306), Location = 071 }, // Zangoose: Thug Zook @ Cipher Key Lair
new(GameVersion.XD, 31, 04000, Growlithe) { FatefulEncounter = true, Species = 058, Level = 28, Moves = new(053,204,044,036), Location = 064 }, // Growlithe: Cipher Peon Humah @ Cipher Key Lair
new(GameVersion.XD, 32, 04000, Paras) { FatefulEncounter = true, Species = 046, Level = 28, Moves = new(147,287,163,206), Location = 064 }, // Paras: Cipher Peon Humah @ Cipher Key Lair
new(GameVersion.XD, 33, 04000, First) { FatefulEncounter = true, Species = 090, Level = 29, Moves = new(036,287,057,062), Location = 065 }, // Shellder: Cipher Peon Gorog @ Cipher Key Lair
new(GameVersion.XD, 34, 04500, First) { FatefulEncounter = true, Species = 015, Level = 30, Moves = new(188,226,041,014), Location = 066 }, // Beedrill: Cipher Peon Lok @ Cipher Key Lair
new(GameVersion.XD, 35, 04000, Pidgeotto) { FatefulEncounter = true, Species = 017, Level = 30, Moves = new(017,287,211,297), Location = 066 }, // Pidgeotto: Cipher Peon Lok @ Cipher Key Lair
new(GameVersion.XD, 36, 04000, Butterfree){ FatefulEncounter = true, Species = 012, Level = 30, Moves = new(094,234,079,332), Location = 067 }, // Butterfree: Cipher Peon Targ @ Cipher Key Lair
new(GameVersion.XD, 37, 04000, Tangela) { FatefulEncounter = true, Species = 114, Level = 30, Moves = new(076,234,241,275), Location = 067 }, // Tangela: Cipher Peon Targ @ Cipher Key Lair
new(GameVersion.XD, 38, 06000, Raticate) { FatefulEncounter = true, Species = 020, Level = 34, Moves = new(162,287,184,158), Location = 076 }, // Raticate: Chaser Furgy @ Citadark Isle
new(GameVersion.XD, 39, 04000, Venomoth) { FatefulEncounter = true, Species = 049, Level = 32, Moves = new(318,287,164,094), Location = 070 }, // Venomoth: Cipher Peon Angic @ Cipher Key Lair
new(GameVersion.XD, 40, 04000, Weepinbell){ FatefulEncounter = true, Species = 070, Level = 32, Moves = new(345,234,188,230), Location = 070 }, // Weepinbell: Cipher Peon Angic @ Cipher Key Lair
new(GameVersion.XD, 41, 05000, Arbok) { FatefulEncounter = true, Species = 024, Level = 33, Moves = new(188,287,137,044), Location = 070 }, // Arbok: Cipher Peon Smarton @ Cipher Key Lair
new(GameVersion.XD, 42, 06000, Primeape) { FatefulEncounter = true, Species = 057, Level = 34, Moves = new(238,270,116,179), Location = 069 }, // Primeape: Cipher Admin Gorigan @ Cipher Key Lair
new(GameVersion.XD, 43, 05500, Hypno) { FatefulEncounter = true, Species = 097, Level = 34, Moves = new(094,226,096,247), Location = 069 }, // Hypno: Cipher Admin Gorigan @ Cipher Key Lair
new(GameVersion.XD, 44, 06500, Golduck) { FatefulEncounter = true, Species = 055, Level = 33, Moves = new(127,204,244,280), Location = 088 }, // Golduck: Navigator Abson @ Citadark Isle
new(GameVersion.XD, 45, 07000, Sableye) { FatefulEncounter = true, Species = 302, Level = 33, Moves = new(247,270,185,105), Location = 088 }, // Sableye: Navigator Abson @ Citadark Isle
new(GameVersion.XD, 46, 04500, Magneton) { FatefulEncounter = true, Species = 082, Level = 30, Moves = new(038,287,240,087), Location = 067 }, // Magneton: Cipher Peon Snidle @ Cipher Key Lair
new(GameVersion.XD, 47, 08000, Dodrio) { FatefulEncounter = true, Species = 085, Level = 34, Moves = new(065,226,097,161), Location = 076 }, // Dodrio: Chaser Furgy @ Citadark Isle
new(GameVersion.XD, 48, 05500, Farfetchd) { FatefulEncounter = true, Species = 083, Level = 36, Moves = new(163,226,014,332), Location = 076 }, // Farfetch'd: Cipher Admin Lovrina @ Citadark Isle
new(GameVersion.XD, 49, 06500, Altaria) { FatefulEncounter = true, Species = 334, Level = 36, Moves = new(225,215,076,332), Location = 076 }, // Altaria: Cipher Admin Lovrina @ Citadark Isle
new(GameVersion.XD, 50, 06000, Kangaskhan){ FatefulEncounter = true, Species = 115, Level = 35, Moves = new(089,047,039,146), Location = 085 }, // Kangaskhan: Cipher Peon Litnar @ Citadark Isle
new(GameVersion.XD, 51, 07000, Banette) { FatefulEncounter = true, Species = 354, Level = 37, Moves = new(185,270,247,174), Location = 085 }, // Banette: Cipher Peon Litnar @ Citadark Isle
new(GameVersion.XD, 52, 07000, Magmar) { FatefulEncounter = true, Species = 126, Level = 36, Moves = new(126,266,238,009), Location = 077 }, // Magmar: Cipher Peon Grupel @ Citadark Isle
new(GameVersion.XD, 53, 07000, Pinsir) { FatefulEncounter = true, Species = 127, Level = 35, Moves = new(012,270,206,066), Location = 077 }, // Pinsir: Cipher Peon Grupel @ Citadark Isle
new(GameVersion.XD, 54, 05500, Magcargo) { FatefulEncounter = true, Species = 219, Level = 38, Moves = new(257,287,089,053), Location = 080 }, // Magcargo: Cipher Peon Kolest @ Citadark Isle
new(GameVersion.XD, 55, 06000, Rapidash) { FatefulEncounter = true, Species = 078, Level = 40, Moves = new(076,226,241,053), Location = 080 }, // Rapidash: Cipher Peon Kolest @ Citadark Isle
new(GameVersion.XD, 56, 06000, Hitmonchan){ FatefulEncounter = true, Species = 107, Level = 38, Moves = new(005,270,170,327), Location = 081 }, // Hitmonchan: Cipher Peon Karbon @ Citadark Isle
new(GameVersion.XD, 57, 07000, Hitmonlee) { FatefulEncounter = true, Species = 106, Level = 38, Moves = new(136,287,170,025), Location = 081 }, // Hitmonlee: Cipher Peon Petro @ Citadark Isle
new(GameVersion.XD, 58, 05000, Lickitung) { FatefulEncounter = true, Species = 108, Level = 38, Moves = new(038,270,111,205), Location = 084 }, // Lickitung: Cipher Peon Geftal @ Citadark Isle
new(GameVersion.XD, 59, 08000, Scyther) { FatefulEncounter = true, Species = 123, Level = 40, Moves = new(013,234,318,163), Location = 084 }, // Scyther: Cipher Peon Leden @ Citadark Isle
new(GameVersion.XD, 60, 04000, Chansey) { FatefulEncounter = true, Species = 113, Level = 39, Moves = new(085,186,135,285), Location = 084 }, // Chansey: Cipher Peon Leden @ Citadark Isle
new(GameVersion.XD, 60, 04000, Chansey) { FatefulEncounter = true, Species = 113, Level = 39, Moves = new(085,186,135,285), Location = 087 }, // Chansey: Cipher Peon Leden @ Citadark Isle
new(GameVersion.XD, 61, 07500, Solrock) { FatefulEncounter = true, Species = 338, Level = 41, Moves = new(094,226,241,322), Location = 087 }, // Solrock: Cipher Admin Snattle @ Citadark Isle
new(GameVersion.XD, 62, 07500, Starmie) { FatefulEncounter = true, Species = 121, Level = 41, Moves = new(127,287,058,105), Location = 087 }, // Starmie: Cipher Admin Snattle @ Citadark Isle
new(GameVersion.XD, 63, 07000, Electabuzz){ FatefulEncounter = true, Species = 125, Level = 43, Moves = new(238,266,086,085), Location = 087 }, // Electabuzz: Cipher Admin Ardos @ Citadark Isle
new(GameVersion.XD, 64, 07000, First) { FatefulEncounter = true, Species = 277, Level = 43, Moves = new(143,226,097,263), Location = 087 }, // Swellow: Cipher Admin Ardos @ Citadark Isle
new(GameVersion.XD, 65, 09000, Snorlax) { FatefulEncounter = true, Species = 143, Level = 43, Moves = new(090,287,174,034), Location = 087 }, // Snorlax: Cipher Admin Ardos @ Citadark Isle
new(GameVersion.XD, 66, 07500, Poliwrath) { FatefulEncounter = true, Species = 062, Level = 42, Moves = new(056,270,240,280), Location = 087 }, // Poliwrath: Cipher Admin Gorigan @ Citadark Isle
new(GameVersion.XD, 67, 06500, MrMime) { FatefulEncounter = true, Species = 122, Level = 42, Moves = new(094,266,227,009), Location = 087 }, // Mr. Mime: Cipher Admin Gorigan @ Citadark Isle
new(GameVersion.XD, 68, 05000, Dugtrio) { FatefulEncounter = true, Species = 051, Level = 40, Moves = new(089,204,201,161), Location = 075 }, // Dugtrio: Cipher Peon Kolax @ Citadark Isle
new(GameVersion.XD, 69, 07000, Manectric) { FatefulEncounter = true, Species = 310, Level = 44, Moves = new(087,287,240,044), Location = 073 }, // Manectric: Cipher Admin Eldes @ Citadark Isle
new(GameVersion.XD, 70, 09000, Salamence) { FatefulEncounter = true, Species = 373, Level = 50, Moves = new(337,287,349,332), Location = 073 }, // Salamence: Cipher Admin Eldes @ Citadark Isle
new(GameVersion.XD, 71, 06500, Marowak) { FatefulEncounter = true, Species = 105, Level = 44, Moves = new(089,047,014,157), Location = 073 }, // Marowak: Cipher Admin Eldes @ Citadark Isle
new(GameVersion.XD, 72, 06000, Lapras) { FatefulEncounter = true, Species = 131, Level = 44, Moves = new(056,215,240,059), Location = 073 }, // Lapras: Cipher Admin Eldes @ Citadark Isle
new(GameVersion.XD, 73, 12000, First) { FatefulEncounter = true, Species = 249, Level = 50, Moves = new(354,297,089,056), Location = 074 }, // Lugia: Grand Master Greevil @ Citadark Isle
new(GameVersion.XD, 74, 10000, Zapdos) { FatefulEncounter = true, Species = 145, Level = 50, Moves = new(326,226,319,085), Location = 074 }, // Zapdos: Grand Master Greevil @ Citadark Isle
new(GameVersion.XD, 75, 10000, Moltres) { FatefulEncounter = true, Species = 146, Level = 50, Moves = new(326,234,261,053), Location = 074 }, // Moltres: Grand Master Greevil @ Citadark Isle
new(GameVersion.XD, 76, 10000, Articuno) { FatefulEncounter = true, Species = 144, Level = 50, Moves = new(326,215,114,058), Location = 074 }, // Articuno: Grand Master Greevil @ Citadark Isle
new(GameVersion.XD, 77, 09000, Tauros) { FatefulEncounter = true, Species = 128, Level = 46, Moves = new(089,287,039,034), Location = 074 }, // Tauros: Grand Master Greevil @ Citadark Isle
new(GameVersion.XD, 78, 07000, First) { FatefulEncounter = true, Species = 112, Level = 46, Moves = new(224,270,184,089), Location = 074 }, // Rhydon: Grand Master Greevil @ Citadark Isle
new(GameVersion.XD, 79, 09000, Exeggutor) { FatefulEncounter = true, Species = 103, Level = 46, Moves = new(094,287,095,246), Location = 074 }, // Exeggutor: Grand Master Greevil @ Citadark Isle
new(GameVersion.XD, 80, 09000, Dragonite) { FatefulEncounter = true, Species = 149, Level = 55, Moves = new(063,215,349,089), Location = 162 }, // Dragonite: Wanderer Miror B. @ Gateon Port
new(GameVersion.XD, 81, 04500, First) { FatefulEncounter = true, Species = 175, Level = 25, Moves = new(266,161,246,270), Location = 164, Gift = true }, // Togepi: Pokémon Trainer Hordel @ Outskirt Stand
new(GameVersion.XD, 82, 02500, Poochyena) { FatefulEncounter = true, Species = 261, Level = 10, Moves = new(091,215,305,336), Location = 162 }, // Poochyena: Bodybuilder Kilen @ Gateon Port
new(GameVersion.XD, 83, 02500, Ledyba) { FatefulEncounter = true, Species = 165, Level = 10, Moves = new(060,287,332,048), Location = 153 }, // Ledyba: Casual Guy Cyle @ Gateon Port
};
internal static readonly EncounterArea3XD[] SlotsXD =
@ -113,5 +113,6 @@ internal static class Encounters3XD
new(92, 041, 21, 304, 21, 194, 21), // Cave (Zubat, Aron, Wooper)
};
internal static readonly EncounterStatic[] Encounter_CXD = ArrayUtil.ConcatAll<EncounterStatic>(Encounters3Colo.Encounter_ColoGift, Encounters3Colo.Encounter_Colo, Encounter_XDGift, Encounter_XD);
internal static readonly EncounterStatic3[] Encounter_CXDGift = ArrayUtil.ConcatAll(Encounters3Colo.Encounter_ColoGift, Encounter_XDGift);
internal static readonly EncounterStaticShadow[] Encounter_CXDShadow = ArrayUtil.ConcatAll(Encounters3Colo.Encounter_Colo, Encounter_XD);
}

View file

@ -1,4 +1,5 @@
// ReSharper disable StringLiteralTypo
using static PKHeX.Core.NPCLockDetail;
namespace PKHeX.Core;
/// <summary>
@ -28,7 +29,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XSphealCipherLab = new(
363, // Spheal
"Cipher Lab",
CipherLab,
new[] {
new NPCLock(116, 24, 0, 063), // Horsea (M) (Quirky)
new NPCLock(118, 12, 1, 127), // Goldeen (F) (Serious)
@ -36,7 +37,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XSphealPhenacCityandPost = new(
363, // Spheal
"Phenac City and Post",
PhenacCityAndPost,
new[] {
new NPCLock(116, 24, 0, 063), // Horsea (M) (Quirky)
new NPCLock(118, 12, 1, 127), // Goldeen (F) (Serious)
@ -52,7 +53,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XSeedotCipherLab = new(
273, // Seedot
"Cipher Lab",
CipherLab,
new[] {
new NPCLock(043, 06, 0, 127), // Oddish (M) (Docile)
new NPCLock(331, 24, 1, 127), // Cacnea (F) (Quirky)
@ -63,7 +64,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XSeedotPhenacCity = new(
273, // Seedot
"Phenac City",
PhenacCity,
new[] {
new NPCLock(043, 06, 0, 127), // Oddish (M) (Docile)
new NPCLock(331, 24, 1, 127), // Cacnea (F) (Quirky)
@ -74,7 +75,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XSeedotPost = new(
273, // Seedot
"Post",
Post,
new[] {
new NPCLock(045, 06, 0, 127), // Vileplume (M) (Docile)
new NPCLock(332, 24, 1, 127), // Cacturne (F) (Quirky)
@ -246,7 +247,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XGrowlitheParasSeen = new(
058, // Growlithe
"Paras Seen",
SeenParas,
new[] {
new NPCLock(336, 24, 0, 127), // Seviper (M) (Quirky)
new NPCLock(198, 06, 1, 127), // Murkrow (F) (Docile)
@ -263,7 +264,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XPidgeottoBeedrillSeen = new(
017, // Pidgeotto
"Beedrill Seen",
SeenBeedrill,
new[] {
new NPCLock(015, true), // Shadow Beedrill (Seen)
new NPCLock(162, 12, 0, 127), // Furret (M) (Serious)
@ -289,7 +290,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XButterfreeTangelaSeen = new(
012, // Butterfree
"Tangela Seen",
SeenTangela,
new[] {
new NPCLock(038, 12, 1, 191), // Ninetales (F) (Serious)
new NPCLock(189, 06, 0, 127), // Jumpluff (M) (Docile)
@ -324,7 +325,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XWeepinbellVenomothSeen = new(
070, // Weepinbell
"Venomoth Seen",
SeenVenomoth,
new[] {
new NPCLock(055, 18, 1, 127), // Golduck (F) (Bashful)
new NPCLock(237, 24, 0, 000), // Hitmontop (M) (Quirky)
@ -362,7 +363,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XHypnoPrimeapeSeen = new(
097, // Hypno
"Primeape Seen",
SeenPrimeape,
new[] {
new NPCLock(305, 18, 1, 127), // Lairon (F) (Bashful)
new NPCLock(364, 12, 1, 127), // Sealeo (F) (Serious)
@ -390,7 +391,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XSableyeGolduckSeen = new(
302, // Sableye
"Golduck Seen",
SeenGolduck,
new[] {
new NPCLock(342, 24, 0, 127), // Crawdaunt (M) (Quirky)
new NPCLock(279, 06, 1, 127), // Pelipper (F) (Docile)
@ -414,7 +415,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XRaticateDodrioSeen = new(
020, // Raticate
"Dodrio Seen",
SeenDodrio,
new[] {
new NPCLock(178, 18, 1, 127), // Xatu (F) (Bashful)
new NPCLock(085, true), // Shadow Dodrio (Seen)
@ -440,7 +441,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XAltariaFarfetchdSeen = new(
334, // Altaria
"Farfetch'd Seen",
SeenFarfetchd,
new[] {
new NPCLock(282, 12, 0, 127), // Gardevoir (M) (Serious)
new NPCLock(368, 00, 1, 127), // Gorebyss (F) (Hardy)
@ -467,7 +468,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XBanetteKangaskhanSeen = new(
354, // Banette
"Kangaskhan Seen",
SeenKangaskhan,
new[] {
new NPCLock(101, 00, 2, 255), // Electrode (-) (Hardy)
new NPCLock(200, 18, 1, 127), // Misdreavus (F) (Bashful)
@ -494,7 +495,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XPinsirMagmarSeen = new(
127, // Pinsir
"Magmar Seen",
SeenMagmar,
new[] {
new NPCLock(229, 18, 0, 127), // Houndoom (M) (Bashful)
new NPCLock(038, 18, 0, 191), // Ninetales (M) (Bashful)
@ -521,7 +522,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XMagcargoRapidashSeen = new(
219, // Magcargo
"Rapidash Seen",
SeenRapidash,
new[] {
new NPCLock(323, 24, 0, 127), // Camerupt (M) (Quirky)
new NPCLock(110, 06, 0, 127), // Weezing (M) (Docile)
@ -571,7 +572,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XChanseyScytherSeen = new(
113, // Chansey
"Scyther Seen",
SeenScyther,
new[] {
new NPCLock(234, 06, 1, 127), // Stantler (F) (Docile)
new NPCLock(295, 24, 0, 127), // Exploud (M) (Quirky)
@ -598,7 +599,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XStarmieSolrockSeen = new(
121, // Starmie
"Solrock Seen",
SeenSolrock,
new[] {
new NPCLock(375, 24, 2, 255), // Metang (-) (Quirky)
new NPCLock(195, 06, 0, 127), // Quagsire (M) (Docile)
@ -618,7 +619,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XElectabuzzSwellowSeen = new(
125, // Electabuzz
"Swellow Seen",
SeenSwellow,
new[] {
new NPCLock(277, true), // Shadow Swellow (Seen)
new NPCLock(065, 24, 0, 063), // Alakazam (M) (Quirky)
@ -638,7 +639,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XSnorlaxSwellowSeen = new(
143, // Snorlax
"Swellow Seen",
SeenSwellow,
new[] {
new NPCLock(277, true), // Shadow Swellow (Seen)
new NPCLock(065, 24, 0, 063), // Alakazam (M) (Quirky)
@ -649,7 +650,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XSnorlaxSwellowElectabuzzSeen = new(
143, // Snorlax
"Swellow & Electabuzz Seen",
SeenSwellowElectabuzz,
new[] {
new NPCLock(277, true), // Shadow Swellow (Seen)
new NPCLock(065, 24, 0, 063), // Alakazam (M) (Quirky)
@ -679,7 +680,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XMrMimePoliwrathSeen = new(
122, // Mr. Mime
"Poliwrath Seen",
SeenPoliwrath,
new[] {
new NPCLock(199, 18, 0, 127), // Slowking (M) (Bashful)
new NPCLock(217, 18, 0, 127), // Ursaring (M) (Bashful)
@ -731,7 +732,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XSalamenceManectricSeen = new(
373, // Salamence
"Manectric Seen",
SeenManectric,
new[] {
new NPCLock(291, 06, 1, 127), // Ninjask (F) (Docile)
new NPCLock(310, true), // Shadow Manectric (Seen)
@ -739,7 +740,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XMarowakManectricSeen = new(
105, // Marowak
"Manectric Seen",
SeenManectric,
new[] {
new NPCLock(291, 06, 1, 127), // Ninjask (F) (Docile)
new NPCLock(310, true), // Shadow Manectric (Seen)
@ -749,7 +750,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XMarowakManectricSalamenceSeen = new(
105, // Marowak
"Manectric & Salamence Seen",
SeenManectricSalamence,
new[] {
new NPCLock(291, 06, 1, 127), // Ninjask (F) (Docile)
new NPCLock(310, true), // Shadow Manectric (Seen)
@ -759,7 +760,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XLaprasManectricSeen = new(
131, // Lapras
"Manectric Seen",
SeenManectric,
new[] {
new NPCLock(291, 06, 1, 127), // Ninjask (F) (Docile)
new NPCLock(310, true), // Shadow Manectric (Seen)
@ -770,7 +771,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XLaprasManectricSalamenceSeen = new(
131, // Lapras
"Manectric & Salamence Seen",
SeenManectricSalamence,
new[] {
new NPCLock(291, 06, 1, 127), // Ninjask (F) (Docile)
new NPCLock(310, true), // Shadow Manectric (Seen)
@ -781,7 +782,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XLaprasManectricMarowakSeen = new(
131, // Lapras
"Manectric & Marowak Seen",
SeenManectricMarowak,
new[] {
new NPCLock(291, 06, 1, 127), // Ninjask (F) (Docile)
new NPCLock(310, true), // Shadow Manectric (Seen)
@ -792,7 +793,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XLaprasManectricSalamenceMarowakSeen = new(
131, // Lapras
"Manectric & Salamence & Marowak Seen",
SeenManectricMarowakSalamence,
new[] {
new NPCLock(291, 06, 1, 127), // Ninjask (F) (Docile)
new NPCLock(310, true), // Shadow Manectric (Seen)
@ -843,7 +844,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XExeggutorRhydonMoltresSeen = new(
103, // Exeggutor
"Rhydon & Moltres Seen",
SeenRhydonMoltres,
new[] {
new NPCLock(112, true), // Shadow Rhydon (Seen)
new NPCLock(146, true), // Shadow Moltres (Seen)
@ -851,7 +852,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XTaurosRhydonMoltresSeen = new(
128, // Tauros
"Rhydon & Moltres Seen",
SeenRhydonMoltres,
new[] {
new NPCLock(112, true), // Shadow Rhydon (Seen)
new NPCLock(146, true), // Shadow Moltres (Seen)
@ -860,7 +861,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XTaurosRhydonMoltresExeggutorSeen = new(
128, // Tauros
"Rhydon & Moltres & Exeggutor Seen",
SeenRhydonMoltresExeggutor,
new[] {
new NPCLock(112, true), // Shadow Rhydon (Seen)
new NPCLock(146, true), // Shadow Moltres (Seen)
@ -869,7 +870,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XArticunoRhydonMoltresSeen = new(
144, // Articuno
"Rhydon & Moltres Seen",
SeenRhydonMoltres,
new[] {
new NPCLock(112, true), // Shadow Rhydon (Seen)
new NPCLock(146, true), // Shadow Moltres (Seen)
@ -879,7 +880,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XArticunoRhydonMoltresTaurosSeen = new(
144, // Articuno
"Rhydon & Moltres & Tauros Seen",
SeenRhydonMoltresTauros,
new[] {
new NPCLock(112, true), // Shadow Rhydon (Seen)
new NPCLock(146, true), // Shadow Moltres (Seen)
@ -889,7 +890,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XArticunoRhydonMoltresExeggutorSeen = new(
144, // Articuno
"Rhydon & Moltres & Exeggutor Seen",
SeenRhydonMoltresExeggutor,
new[] {
new NPCLock(112, true), // Shadow Rhydon (Seen)
new NPCLock(146, true), // Shadow Moltres (Seen)
@ -899,7 +900,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XArticunoRhydonMoltresExeggutorTaurosSeen = new(
144, // Articuno
"Rhydon & Moltres & Exeggutor & Tauros Seen",
SeenRhydonMoltresExeggutorTauros,
new[] {
new NPCLock(112, true), // Shadow Rhydon (Seen)
new NPCLock(146, true), // Shadow Moltres (Seen)
@ -909,7 +910,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XZapdosRhydonMoltresSeen = new(
145, // Zapdos
"Rhydon & Moltres Seen",
SeenRhydonMoltres,
new[] {
new NPCLock(112, true), // Shadow Rhydon (Seen)
new NPCLock(146, true), // Shadow Moltres (Seen)
@ -920,7 +921,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XZapdosRhydonMoltresTaurosSeen = new(
145, // Zapdos
"Rhydon & Moltres & Tauros Seen",
SeenRhydonMoltresTauros,
new[] {
new NPCLock(112, true), // Shadow Rhydon (Seen)
new NPCLock(146, true), // Shadow Moltres (Seen)
@ -931,7 +932,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XZapdosRhydonMoltresArticunoSeen = new(
145, // Zapdos
"Rhydon & Moltres & Articuno Seen",
SeenRhydonMoltresArticuno,
new[] {
new NPCLock(112, true), // Shadow Rhydon (Seen)
new NPCLock(146, true), // Shadow Moltres (Seen)
@ -942,7 +943,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XZapdosRhydonMoltresExeggutorSeen = new(
145, // Zapdos
"Rhydon & Moltres & Exeggutor Seen",
SeenRhydonMoltresExeggutor,
new[] {
new NPCLock(112, true), // Shadow Rhydon (Seen)
new NPCLock(146, true), // Shadow Moltres (Seen)
@ -953,7 +954,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XZapdosRhydonMoltresTaurosArticunoSeen = new(
145, // Zapdos
"Rhydon & Moltres & Tauros & Articuno Seen",
SeenRhydonMoltresTaurosArticuno,
new[] {
new NPCLock(112, true), // Shadow Rhydon (Seen)
new NPCLock(146, true), // Shadow Moltres (Seen)
@ -964,7 +965,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XZapdosRhydonMoltresExeggutorTaurosSeen = new(
145, // Zapdos
"Rhydon & Moltres & Exeggutor & Tauros Seen",
SeenRhydonMoltresExeggutorTauros,
new[] {
new NPCLock(112, true), // Shadow Rhydon (Seen)
new NPCLock(146, true), // Shadow Moltres (Seen)
@ -975,7 +976,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XZapdosRhydonMoltresExeggutorArticunoSeen = new(
145, // Zapdos
"Rhydon & Moltres & Exeggutor & Articuno Seen",
SeenRhydonMoltresExeggutorArticuno,
new[] {
new NPCLock(112, true), // Shadow Rhydon (Seen)
new NPCLock(146, true), // Shadow Moltres (Seen)
@ -986,7 +987,7 @@ public static class Encounters3XDShadow
public static readonly TeamLock XZapdosRhydonMoltresExeggutorTaurosArticunoSeen = new(
145, // Zapdos
"Rhydon & Moltres & Exeggutor & Tauros & Articuno Seen",
SeenRhydonMoltresExeggutorTaurosArticuno,
new[] {
new NPCLock(112, true), // Shadow Rhydon (Seen)
new NPCLock(146, true), // Shadow Moltres (Seen)

View file

@ -14,19 +14,40 @@ internal static class EncountersWC3
{
internal static readonly WC3[] Encounter_Event3_Special =
{
new() { Species = 385, Level = 05, TID = 20043, OT_Gender = 0, Version = GameVersion.R, Method = PIDType.BACD_R, OT_Name = "WISHMKR", CardTitle = "Wishmaker Jirachi", Language = (int)LanguageID.English },
new() { Species = 385, Level = 05, TID16 = 20043, OT_Gender = 0, Version = GameVersion.R, Method = PIDType.BACD_R, OT_Name = "WISHMKR", CardTitle = "Wishmaker Jirachi", Language = (int)LanguageID.English },
};
private static IEnumerable<WC3> GetIngameCXDData()
{
var langs = new[]{LanguageID.Japanese, LanguageID.English, LanguageID.French, LanguageID.Italian, LanguageID.German, LanguageID.Spanish};
string[] p = {string.Empty, "コロシアム", "COLOS", "COLOSSEUM", "ARENA", "COLOSSEUM", string.Empty, "CLAUDIO" };
string[] c = {string.Empty, "アゲト", "AGATE", "SAMARAGD", "SOFO", "EMERITAE", string.Empty, "ÁGATA" };
string[] h = {string.Empty, "ダニー", "HORDEL", "VOLKER", "ODINO", "HORAZ", string.Empty, "HORDEL"};
string[] d = {string.Empty, "ギンザル", "DUKING", "DOKING", "RODRIGO", "GRAND", string.Empty, "GERMÁN"};
string[] m = {string.Empty, "バトルやま", "MATTLE", "MT BATAILL", "MONTE LOTT", "DUELLBERG", string.Empty, "ERNESTO"}; // truncated on ck3->pk3 transfer
string[] z = {string.Empty, "コンセント", "ZAPRONG", "ZAPRONG", "ZAPRONG", "ZAPRONG", string.Empty, "ZAPRONG"};
return langs.SelectMany(l => GetIngame((int)l));
IEnumerable<WC3> GetIngame(int l)
{
var id = (LanguageID) l;
return new WC3[]
{
// Colosseum
new() { Species = 311, Level = 13, Language = l, Location = 254, ID32 = 37149, OT_Gender = 0, OT_Name = d[l], Version = GameVersion.COLO, CardTitle = $"Special Gift ({id})", Method = PIDType.CXD, Shiny = Shiny.Never, Moves = new(045, 086, 098, 270) }, // Plusle @ Ingame Trade
// XD
new(true) { Species = 239, Level = 20, Language = l, Location = 164, TID16 = 41400, OT_Gender = 0, OT_Name = h[l], Version = GameVersion.XD, CardTitle = $"Trade Togepi ({id})", Method = PIDType.CXD, Moves = new(008, 007, 009, 238), Nickname = z[l] }, // Elekid @ Snagem Hideout
new(true) { Species = 307, Level = 20, Language = l, Location = 116, TID16 = 37149, OT_Gender = 0, OT_Name = d[l], Version = GameVersion.XD, CardTitle = $"Trade Trapinch ({id})", Method = PIDType.CXD, Moves = new(223, 093, 247, 197) }, // Meditite @ Pyrite Town
new(true) { Species = 213, Level = 20, Language = l, Location = 116, TID16 = 37149, OT_Gender = 0, OT_Name = d[l], Version = GameVersion.XD, CardTitle = $"Trade Surskit ({id})", Method = PIDType.CXD, Moves = new(092, 164, 188, 227) }, // Shuckle @ Pyrite Town
new(true) { Species = 246, Level = 20, Language = l, Location = 116, TID16 = 37149, OT_Gender = 0, OT_Name = d[l], Version = GameVersion.XD, CardTitle = $"Trade Wooper ({id})", Method = PIDType.CXD, Moves = new(201, 349, 044, 200) }, // Larvitar @ Pyrite Town
};
}
}
private static IEnumerable<WC3> GetIngameCXDDataMainline()
{
var langs = new[] { LanguageID.Japanese, LanguageID.English, LanguageID.French, LanguageID.Italian, LanguageID.German, LanguageID.Spanish };
string[] p = { string.Empty, "コロシアム", "COLOS", "COLOSSEUM", "ARENA", "COLOSSEUM", string.Empty, "CLAUDIO" };
string[] c = { string.Empty, "アゲト", "AGATE", "SAMARAGD", "SOFO", "EMERITAE", string.Empty, "ÁGATA" };
string[] m = { string.Empty, "バトルやま", "MATTLE", "MT BATAILL", "MONTE LOTT", "DUELLBERG", string.Empty, "ERNESTO" }; // truncated on ck3->pk3 transfer
return langs.SelectMany(l => GetIngame((int)l));
IEnumerable<WC3> GetIngame(int l)
{
@ -35,202 +56,199 @@ internal static class EncountersWC3
return new WC3[]
{
// Colosseum
new() { Species = 025, Level = 10, Language = l, Location = 255, TID = 31121, SID = 0, OT_Gender = 0, OT_Name = p[l], Version = GameVersion.R, CardTitle = $"Colosseum Pikachu ({id})",Method = PIDType.CXD, Shiny = Shiny.Never, NotDistributed = nd }, // Colosseum Pikachu bonus gift
new() { Species = 251, Level = 10, Language = l, Location = 255, TID = 31121, SID = 0, OT_Gender = 1, OT_Name = c[l], Version = GameVersion.R, CardTitle = $"Agate Celebi ({id})", Method = PIDType.CXD, Shiny = Shiny.Never, NotDistributed = nd }, // Ageto Celebi bonus gift
new() { Species = 311, Level = 13, Language = l, Location = 254, TID = 37149, SID = 0, OT_Gender = 0, OT_Name = d[l], Version = GameVersion.COLO, CardTitle = $"Special Gift ({id})", Method = PIDType.CXD, Shiny = Shiny.Never, Moves = new(045, 086, 098, 270) }, // Plusle @ Ingame Trade
new() { Species = 250, Level = 70, Language = l, Location = 255, TID = 10048, SID = 0, OT_Gender = 0, OT_Name = m[l], Version = GameVersion.S, CardTitle = $"Mt. Battle Ho-Oh ({id})", Method = PIDType.CXD, Shiny = Shiny.Never, Moves = new(105, 126, 241, 129) }, // Ho-oh @ Mt. Battle
// XD
new() { Species = 239, Level = 20, Language = l, Location = 164, TID = 41400, SID = -1, OT_Gender = 0, OT_Name = h[l], Version = GameVersion.XD, CardTitle = $"Trade Togepi ({id})", Method = PIDType.CXD, Moves = new(008, 007, 009, 238), Fateful = true, Nickname = z[l] }, // Elekid @ Snagem Hideout
new() { Species = 307, Level = 20, Language = l, Location = 116, TID = 37149, SID = -1, OT_Gender = 0, OT_Name = d[l], Version = GameVersion.XD, CardTitle = $"Trade Trapinch ({id})", Method = PIDType.CXD, Moves = new(223, 093, 247, 197), Fateful = true }, // Meditite @ Pyrite Town
new() { Species = 213, Level = 20, Language = l, Location = 116, TID = 37149, SID = -1, OT_Gender = 0, OT_Name = d[l], Version = GameVersion.XD, CardTitle = $"Trade Surskit ({id})", Method = PIDType.CXD, Moves = new(092, 164, 188, 227), Fateful = true }, // Shuckle @ Pyrite Town
new() { Species = 246, Level = 20, Language = l, Location = 116, TID = 37149, SID = -1, OT_Gender = 0, OT_Name = d[l], Version = GameVersion.XD, CardTitle = $"Trade Wooper ({id})", Method = PIDType.CXD, Moves = new(201, 349, 044, 200), Fateful = true }, // Larvitar @ Pyrite Town
new() { Species = 025, Level = 10, Language = l, Location = 255, ID32 = 31121, OT_Gender = 0, OT_Name = p[l], Version = GameVersion.R, CardTitle = $"Colosseum Pikachu ({id})",Method = PIDType.CXD, Shiny = Shiny.Never, NotDistributed = nd }, // Colosseum Pikachu bonus gift
new() { Species = 251, Level = 10, Language = l, Location = 255, ID32 = 31121, OT_Gender = 1, OT_Name = c[l], Version = GameVersion.R, CardTitle = $"Agate Celebi ({id})", Method = PIDType.CXD, Shiny = Shiny.Never, NotDistributed = nd }, // Ageto Celebi bonus gift
new() { Species = 250, Level = 70, Language = l, Location = 255, ID32 = 10048, OT_Gender = 0, OT_Name = m[l], Version = GameVersion.S, CardTitle = $"Mt. Battle Ho-Oh ({id})", Method = PIDType.CXD, Shiny = Shiny.Never, Moves = new(105, 126, 241, 129) }, // Ho-oh @ Mt. Battle
};
}
}
internal static readonly WC3[] Encounter_Event3 = Encounter_Event3_Special.Concat(GetIngameCXDData()).ToArray();
internal static readonly WC3[] Encounter_WC3CXD = GetIngameCXDData().ToArray();
internal static readonly WC3[] Encounter_WC3CXDMain = GetIngameCXDDataMainline().ToArray();
internal static readonly WC3[] Encounter_Event3 = ArrayUtil.ConcatAll(Encounter_Event3_Special, Encounter_WC3CXD, Encounter_WC3CXDMain);
internal static readonly WC3[] Encounter_Event3_FRLG =
{
// PCJP - Egg Pokémon Present Eggs (March 21 to April 4, 2004)
new() { Species = 043, IsEgg = true, Fateful = true, Level = 05, TID = -1, SID = -1, Version = GameVersion.FRLG, Moves = new(071,073,000,000), Method = PIDType.Method_2 }, // Oddish with Leech Seed
new() { Species = 052, IsEgg = true, Fateful = true, Level = 05, TID = -1, SID = -1, Version = GameVersion.FRLG, Moves = new(010,045,080,000), Method = PIDType.Method_2 }, // Meowth with Petal Dance
new() { Species = 060, IsEgg = true, Fateful = true, Level = 05, TID = -1, SID = -1, Version = GameVersion.FRLG, Moves = new(145,186,000,000), Method = PIDType.Method_2 }, // Poliwag with Sweet Kiss
new() { Species = 069, IsEgg = true, Fateful = true, Level = 05, TID = -1, SID = -1, Version = GameVersion.FRLG, Moves = new(022,298,000,000), Method = PIDType.Method_2 }, // Bellsprout with Teeter Dance
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
// PCNY - Wish Eggs (December 16, 2004, to January 2, 2005)
new() { Species = 083, IsEgg = true, Fateful = true, Level = 05, TID = -1, SID = -1, Version = GameVersion.FRLG, Moves = new(281,273,000,000), Method = PIDType.Method_2 }, // Farfetch'd with Wish & Yawn
new() { Species = 096, IsEgg = true, Fateful = true, Level = 05, TID = -1, SID = -1, Version = GameVersion.FRLG, Moves = new(187,273,000,000), Method = PIDType.Method_2 }, // Drowzee with Wish & Belly Drum
new() { Species = 102, IsEgg = true, Fateful = true, Level = 05, TID = -1, SID = -1, Version = GameVersion.FRLG, Moves = new(230,273,000,000), Method = PIDType.Method_2 }, // Exeggcute with Wish & Sweet Scent
new() { Species = 108, IsEgg = true, Fateful = true, Level = 05, TID = -1, SID = -1, Version = GameVersion.FRLG, Moves = new(215,273,000,000), Method = PIDType.Method_2 }, // Lickitung with Wish & Heal Bell
new() { Species = 113, IsEgg = true, Fateful = true, Level = 05, TID = -1, SID = -1, Version = GameVersion.FRLG, Moves = new(230,273,000,000), Method = PIDType.Method_2 }, // Chansey with Wish & Sweet Scent
new() { Species = 115, IsEgg = true, Fateful = true, Level = 05, TID = -1, SID = -1, Version = GameVersion.FRLG, Moves = new(281,273,000,000), Method = PIDType.Method_2 }, // Kangaskhan with Wish & Yawn
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
// PokePark Eggs - Wondercard
new() { Species = 054, IsEgg = true, Fateful = true, Level = 05, TID = -1, SID = -1, Version = GameVersion.FRLG, Moves = new(346,010,039,300), Method = PIDType.Method_2 }, // Psyduck with Mud Sport
new() { Species = 172, IsEgg = true, Fateful = true, Level = 05, TID = -1, SID = -1, Version = GameVersion.FRLG, Moves = new(084,204,266,000), Method = PIDType.Method_2 }, // Pichu with Follow me
new() { Species = 174, IsEgg = true, Fateful = true, Level = 05, TID = -1, SID = -1, Version = GameVersion.FRLG, Moves = new(047,204,111,321), Method = PIDType.Method_2 }, // Igglybuff with Tickle
new() { Species = 222, IsEgg = true, Fateful = true, Level = 05, TID = -1, SID = -1, Version = GameVersion.FRLG, Moves = new(033,300,000,000), Method = PIDType.Method_2 }, // Corsola with Mud Sport
new() { Species = 276, IsEgg = true, Fateful = true, Level = 05, TID = -1, SID = -1, Version = GameVersion.FRLG, Moves = new(064,045,116,297), Method = PIDType.Method_2 }, // Taillow with Feather Dance
new() { Species = 283, IsEgg = true, Fateful = true, Level = 05, TID = -1, SID = -1, Version = GameVersion.FRLG, Moves = new(145,300,000,000), Method = PIDType.Method_2 }, // Surskit with Mud Sport
new() { Species = 293, IsEgg = true, Fateful = true, Level = 05, TID = -1, SID = -1, Version = GameVersion.FRLG, Moves = new(001,253,298,000), Method = PIDType.Method_2 }, // Whismur with Teeter Dance
new() { Species = 300, IsEgg = true, Fateful = true, Level = 05, TID = -1, SID = -1, Version = GameVersion.FRLG, Moves = new(045,033,039,205), Method = PIDType.Method_2 }, // Skitty with Rollout
new() { Species = 311, IsEgg = true, Fateful = true, Level = 05, TID = -1, SID = -1, Version = GameVersion.FRLG, Moves = new(045,086,346,000), Method = PIDType.Method_2 }, // Plusle with Water Sport
new() { Species = 312, IsEgg = true, Fateful = true, Level = 05, TID = -1, SID = -1, Version = GameVersion.FRLG, Moves = new(045,086,300,000), Method = PIDType.Method_2 }, // Minun with Mud Sport
new() { Species = 325, IsEgg = true, Fateful = true, Level = 05, TID = -1, SID = -1, Version = GameVersion.FRLG, Moves = new(150,253,000,000), Method = PIDType.Method_2 }, // Spoink with Uproar
new() { Species = 327, IsEgg = true, Fateful = true, Level = 05, TID = -1, SID = -1, Version = GameVersion.FRLG, Moves = new(033,253,047,000), Method = PIDType.Method_2 }, // Spinda with Sing
new() { Species = 331, IsEgg = true, Fateful = true, Level = 05, TID = -1, SID = -1, Version = GameVersion.FRLG, Moves = new(040,043,071,227), Method = PIDType.Method_2 }, // Cacnea with Encore
new() { Species = 341, IsEgg = true, Fateful = true, Level = 05, TID = -1, SID = -1, Version = GameVersion.FRLG, Moves = new(145,346,000,000), Method = PIDType.Method_2 }, // Corphish with Water Sport
new() { Species = 360, IsEgg = true, Fateful = true, Level = 05, TID = -1, SID = -1, Version = GameVersion.FRLG, Moves = new(150,204,227,321), Method = PIDType.Method_2 }, // Wynaut with Tickle
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
};
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", TID = -1, SID = -1, 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", TID = -1, SID = -1, 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", TID = -1, SID = -1, 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", TID = -1, SID = -1, 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", TID = -1, SID = -1, 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", TID = -1, SID = -1, 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", TID = -1, SID = -1, 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", TID = -1, SID = -1, 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", TID = -1, SID = -1, 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", TID = -1, SID = -1, Version = GameVersion.R, Moves = new(099,044,273,000), Method = PIDType.BACD_R }, // Bagon 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 }, // 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
// Negai Boshi Jirachi
new() { Species = 385, Level = 05, TID = 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, TID = 30719, OT_Name = "ネガイボシ", Version = GameVersion.RS, Method = PIDType.BACD_U_AX, Language = (int)LanguageID.Japanese, Shiny = Shiny.Never },
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 },
// 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, TID = 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, TID = 21121, OT_Name = "サファイア", OT_Gender = 0, 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 = 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 },
// 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, TID = 30317, OT_Name = "RUBY", OT_Gender = 1 },
new() { Species = 263, Level = 5, Version = GameVersion.S, Language = (int)LanguageID.English, Method = PIDType.BACD_R_S, TID = 30317, OT_Name = "SAPHIRE", OT_Gender = 0 },
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 },
// Channel Jirachi
new() { Species = 385, Level = 5, Version = GameVersion.RS, Method = PIDType.Channel, TID = 40122, OT_Gender = 3,SID = -1, OT_Name = "CHANNEL", CardTitle = "Channel Jirachi", Met_Level = 0 },
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 },
// Aura Mew
new() { Species = 151, Level = 10, Version = GameVersion.R, Language = (int)LanguageID.English, Method = PIDType.BACD_R, TID = 20078, OT_Name = "Aura", Fateful = true, Shiny = Shiny.Never }, // Mew
new() { Species = 151, Level = 10, Version = GameVersion.R, Language = (int)LanguageID.French, Method = PIDType.BACD_R, TID = 20078, OT_Name = "Aura", Fateful = true, Shiny = Shiny.Never }, // Mew
new() { Species = 151, Level = 10, Version = GameVersion.R, Language = (int)LanguageID.Italian, Method = PIDType.BACD_R, TID = 20078, OT_Name = "Aura", Fateful = true, Shiny = Shiny.Never }, // Mew
new() { Species = 151, Level = 10, Version = GameVersion.R, Language = (int)LanguageID.German, Method = PIDType.BACD_R, TID = 20078, OT_Name = "Aura", Fateful = true, Shiny = Shiny.Never }, // Mew
new() { Species = 151, Level = 10, Version = GameVersion.R, Language = (int)LanguageID.Spanish, Method = PIDType.BACD_R, TID = 20078, OT_Name = "Aura", Fateful = true, Shiny = Shiny.Never }, // 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
// English Events
new() { Species = 006, Level = 70, Version = GameVersion.R, Moves = new(017,163,082,083), Language = (int)LanguageID.English, Method = PIDType.BACD_R, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 06227, OT_Name = "10ANNIV", Shiny = Shiny.Never }, // Latios
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
// French
new() { Species = 006, Level = 70, Version = GameVersion.R, Moves = new(017,163,082,083), Language = (int)LanguageID.French, Method = PIDType.BACD_R, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 06227, OT_Name = "10ANNIV", Shiny = Shiny.Never }, // Latios
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
// Italian
new() { Species = 006, Level = 70, Version = GameVersion.R, Moves = new(017,163,082,083), Language = (int)LanguageID.Italian, Method = PIDType.BACD_R, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 06227, OT_Name = "10ANNI", Shiny = Shiny.Never }, // Latios
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
// German
new() { Species = 006, Level = 70, Version = GameVersion.R, Moves = new(017,163,082,083), Language = (int)LanguageID.German, Method = PIDType.BACD_R, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 06227, OT_Name = "10JAHRE", Shiny = Shiny.Never }, // Latios
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
// Spanish
new() { Species = 006, Level = 70, Version = GameVersion.R, Moves = new(017,163,082,083), Language = (int)LanguageID.Spanish, Method = PIDType.BACD_R, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 06227, OT_Name = "10ANIV", Shiny = Shiny.Never }, // Latios
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() { Species = 375, Level = 30, Version = GameVersion.R, Moves = new(036,093,232,287), Language = (int)LanguageID.English, Method = PIDType.BACD_R, TID = 02005, OT_Name = "ROCKS", OT_Gender = 0, RibbonNational = true, Shiny = Shiny.Never }, // Metang
new() { Species = 386, Level = 70, Version = GameVersion.R, Moves = new(322,105,354,063), Language = (int)LanguageID.English, Method = PIDType.BACD_R, TID = 28606, OT_Name = "DOEL", Fateful = true, Shiny = Shiny.Never }, // Deoxys
new() { Species = 386, Level = 70, Version = GameVersion.R, Moves = new(322,105,354,063), Language = (int)LanguageID.English, Method = PIDType.BACD_R, TID = 00010, OT_Name = "SPACE C", Fateful = true, Shiny = Shiny.Never }, // Deoxys
new() { Species = 151, Level = 10, Version = GameVersion.R, Language = (int)LanguageID.English, Method = PIDType.BACD_U, TID = 06930, OT_Name = "MYSTRY", Fateful = true, Shiny = Shiny.Never }, // Mew
new() { Species = 151, Level = 10, Version = GameVersion.R, Language = (int)LanguageID.English, Method = PIDType.BACD_R, TID = 06930, OT_Name = "MYSTRY", Fateful = true, Shiny = Shiny.Never }, // Mew
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
// 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 06808, OT_Name = "10 ANIV", HeldItem = 191, Shiny = Shiny.Never }, // Latios
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
// 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 00010, OT_Name = "10 ANIV", HeldItem = 191, Shiny = Shiny.Never }, // Latios
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
};
internal static readonly WC3[] Encounter_Event3_Common =
@ -247,21 +265,21 @@ internal static class EncountersWC3
new() { Species = 172, IsEgg = true, Level = 05, Moves = new(084,204,057,000), Method = PIDType.BACD_U, OT_Gender = 1, OT_Name = "", Version = GameVersion.FRLG }, // Pichu Egg with Surf
// PokePark Eggs - DS Download Play
new() { Species = 054, IsEgg = true, Level = 05, Met_Level = 05, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 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, TID = 50318, OT_Gender = 0, OT_Name = "ポケパーク", Version = GameVersion.R, Moves = new(321), Method = PIDType.BACD_R }, // Wynaut with Tickle
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
};
internal static readonly WC3[] Encounter_WC3 = ArrayUtil.ConcatAll(Encounter_Event3, Encounter_Event3_RS, Encounter_Event3_FRLG, Encounter_Event3_Common);

View file

@ -79,7 +79,7 @@ internal static class Encounters4DPPt
// Event
//new(DP) { Species = 491, Level = 40, Location = 079, GroundTile = Grass }, // Darkrai @ Newmoon Island (Unreleased in Diamond and Pearl)
new(Pt) { Species = 491, Level = 50, Location = 079, GroundTile = Grass }, // Darkrai @ Newmoon Island
new(Pt) { Species = 492, Form = 0, Level = 30, Location = 063, Fateful = true }, // Shaymin @ Flower Paradise
new(Pt) { Species = 492, Form = 0, Level = 30, Location = 063, FatefulEncounter = true }, // Shaymin @ Flower Paradise
//new(DP) { Species = 492, Form = 0, Level = 30, Location = 063, Fateful = false }, // Shaymin @ Flower Paradise (Unreleased in Diamond and Pearl)
//new(DPPt) { Species = 493, Form = 0, Level = 80, Location = 086, GroundTile = Cave }, // Arceus @ Hall of Origin (Unreleased)
@ -95,36 +95,36 @@ internal static class Encounters4DPPt
private static readonly EncounterTrade4[] RanchGifts =
{
new EncounterTrade4RanchGift(323975838, 025, 18) { Moves = new(447,085,148,104), TID = 1000, SID = 19840, OTGender = 1, MetLocation = 0068, Gender = 0, Ability = OnlyFirst, CurrentLevel = 20 }, // Pikachu
new EncounterTrade4RanchGift(323977664, 037, 16) { Moves = new(412,109,053,219), TID = 1000, SID = 21150, OTGender = 1, MetLocation = 3000, Gender = 0, Ability = OnlyFirst, CurrentLevel = 30 }, // Vulpix
new EncounterTrade4RanchGift(323975579, 077, 13) { Moves = new(036,033,039,052), TID = 1000, SID = 01123, OTGender = 1, MetLocation = 3000, Gender = 0, Ability = OnlySecond, CurrentLevel = 16 }, // Ponyta
new EncounterTrade4RanchGift(323975564, 108, 34) { Moves = new(076,111,014,205), TID = 1000, SID = 03050, OTGender = 1, MetLocation = 0077, Gender = 0, Ability = OnlyFirst, CurrentLevel = 40 }, // Lickitung
new EncounterTrade4RanchGift(323977579, 114, 01) { Moves = new(437,438,079,246), TID = 1000, SID = 49497, OTGender = 1, MetLocation = 3000, Gender = 1, Ability = OnlySecond }, // Tangela
new EncounterTrade4RanchGift(323977675, 133, 16) { Moves = new(363,270,098,247), TID = 1000, SID = 47710, OTGender = 1, MetLocation = 0068, Gender = 0, Ability = OnlySecond, CurrentLevel = 30 }, // Eevee
new EncounterTrade4RanchGift(323977588, 142, 20) { Moves = new(363,089,444,332), TID = 1000, SID = 43066, OTGender = 1, MetLocation = 0094, Gender = 0, Ability = OnlyFirst, CurrentLevel = 50 }, // Aerodactyl
new EncounterTrade4RanchGift(232975554, 193, 22) { Moves = new(318,095,246,138), TID = 1000, SID = 42301, OTGender = 1, MetLocation = 0052, Gender = 0, Ability = OnlyFirst, CurrentLevel = 45, Ball = 5 }, // Yanma
new EncounterTrade4RanchGift(323975570, 241, 16) { Moves = new(208,215,360,359), TID = 1000, SID = 02707, OTGender = 1, MetLocation = 3000, Gender = 1, Ability = OnlyFirst, CurrentLevel = 48 }, // Miltank
new EncounterTrade4RanchGift(323975563, 285, 22) { Moves = new(402,147,206,078), TID = 1000, SID = 02788, OTGender = 1, MetLocation = 3000, Gender = 0, Ability = OnlySecond, CurrentLevel = 45, Ball = 5 }, // Shroomish
new EncounterTrade4RanchGift(323975559, 320, 30) { Moves = new(156,323,133,058), TID = 1000, SID = 27046, OTGender = 1, MetLocation = 0038, Gender = 0, Ability = OnlySecond, CurrentLevel = 45 }, // Wailmer
new EncounterTrade4RanchGift(323977657, 360, 01) { Moves = new(204,150,227,000), TID = 1000, SID = 01788, OTGender = 1, MetLocation = 0004, Gender = 0, Ability = OnlySecond, EggLocation = 2000 }, // Wynaut
new EncounterTrade4RanchGift(323975563, 397, 02) { Moves = new(355,017,283,018), TID = 1000, SID = 59298, OTGender = 1, MetLocation = 0016, Gender = 0, Ability = OnlySecond, CurrentLevel = 23 }, // Staravia
new EncounterTrade4RanchGift(323970584, 415, 05) { Moves = new(230,016,000,000), TID = 1000, SID = 54140, OTGender = 1, MetLocation = 0020, Gender = 1, Ability = OnlyFirst, CurrentLevel = 20 }, // Combee
new EncounterTrade4RanchGift(323977539, 417, 09) { Moves = new(447,045,351,098), TID = 1000, SID = 18830, OTGender = 1, MetLocation = 0020, Gender = 1, Ability = OnlySecond, CurrentLevel = 10 }, // Pachirisu
new EncounterTrade4RanchGift(323974107, 422, 20) { Moves = new(363,352,426,104), TID = 1000, SID = 39272, OTGender = 1, MetLocation = 0028, Gender = 0, Ability = OnlySecond, CurrentLevel = 25, Form = 1 }, // Shellos
new EncounterTrade4RanchGift(323977566, 427, 10) { Moves = new(204,193,409,098), TID = 1000, SID = 31045, OTGender = 1, MetLocation = 3000, Gender = 1, Ability = OnlyFirst, CurrentLevel = 16 }, // Buneary
new EncounterTrade4RanchGift(323975579, 453, 22) { Moves = new(310,207,426,389), TID = 1000, SID = 41342, OTGender = 1, MetLocation = 0052, Gender = 0, Ability = OnlySecond, CurrentLevel = 31, Ball = 5 }, // Croagunk
new EncounterTrade4RanchGift(323977566, 456, 15) { Moves = new(213,352,219,392), TID = 1000, SID = 48348, OTGender = 1, MetLocation = 0020, Gender = 1, Ability = OnlyFirst, CurrentLevel = 35 }, // Finneon
new EncounterTrade4RanchGift(323975582, 459, 32) { Moves = new(452,420,275,059), TID = 1000, SID = 23360, OTGender = 1, MetLocation = 0031, Gender = 0, Ability = OnlyFirst, CurrentLevel = 41 }, // Snover
new EncounterTrade4RanchSpecial(151, 50) { Moves = new(235,216,095,100), TID = 1000, SID = 59228, OTGender = 1, Ball = 0x10, Gender = 2 }, // Mew
new EncounterTrade4RanchSpecial(489, 01) { Moves = new(447,240,156,057), TID = 1000, SID = 09248, OTGender = 1, Ball = 0x10, Gender = 2, CurrentLevel = 50, EggLocation = 3000 }, // Phione
new EncounterTrade4RanchGift(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 EncounterTrade4RanchGift(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 EncounterTrade4RanchGift(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 EncounterTrade4RanchGift(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 EncounterTrade4RanchGift(323977579, 114, 01) { Moves = new(437,438,079,246), TID16 = 1000, SID16 = 49497, OTGender = 1, MetLocation = 3000, Gender = 1, Ability = OnlySecond }, // Tangela
new EncounterTrade4RanchGift(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 EncounterTrade4RanchGift(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 EncounterTrade4RanchGift(232975554, 193, 22) { Moves = new(318,095,246,138), TID16 = 1000, SID16 = 42301, OTGender = 1, MetLocation = 0052, Gender = 0, Ability = OnlyFirst, CurrentLevel = 45, Ball = 5 }, // Yanma
new EncounterTrade4RanchGift(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 EncounterTrade4RanchGift(323975563, 285, 22) { Moves = new(402,147,206,078), TID16 = 1000, SID16 = 02788, OTGender = 1, MetLocation = 3000, Gender = 0, Ability = OnlySecond, CurrentLevel = 45, Ball = 5 }, // Shroomish
new EncounterTrade4RanchGift(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 EncounterTrade4RanchGift(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 EncounterTrade4RanchGift(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 EncounterTrade4RanchGift(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 EncounterTrade4RanchGift(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 EncounterTrade4RanchGift(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 EncounterTrade4RanchGift(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 EncounterTrade4RanchGift(323975579, 453, 22) { Moves = new(310,207,426,389), TID16 = 1000, SID16 = 41342, OTGender = 1, MetLocation = 0052, Gender = 0, Ability = OnlySecond, CurrentLevel = 31, Ball = 5 }, // Croagunk
new EncounterTrade4RanchGift(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 EncounterTrade4RanchGift(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 EncounterTrade4RanchSpecial(151, 50) { Moves = new(235,216,095,100), TID16 = 1000, SID16 = 59228, OTGender = 1, Ball = 0x10, Gender = 2 }, // Mew
new EncounterTrade4RanchSpecial(489, 01) { Moves = new(447,240,156,057), TID16 = 1000, SID16 = 09248, OTGender = 1, Ball = 0x10, Gender = 2, CurrentLevel = 50, EggLocation = 3000 }, // Phione
};
private static readonly EncounterTrade4PID[] TradeGift_DPPtIngame =
{
new(DPPt, 0x0000008E, 063, 01) { Ability = OnlyFirst, TID = 25643, SID = 00000, OTGender = 1, Gender = 0, IVs = new(15,15,15,20,25,25) }, // Machop -> Abra
new(DPPt, 0x00000867, 441, 01) { Ability = OnlySecond, TID = 44142, SID = 00000, OTGender = 0, Gender = 1, IVs = new(15,20,15,25,25,15), Contest = 20 }, // Buizel -> Chatot
new(DPPt, 0x00000088, 093, 35) { Ability = OnlyFirst, TID = 19248, SID = 00000, OTGender = 1, Gender = 0, IVs = new(20,25,15,25,15,15) }, // Medicham (35 from Route 217) -> Haunter
new(DPPt, 0x0000045C, 129, 01) { Ability = OnlyFirst, TID = 53277, SID = 00000, OTGender = 0, Gender = 1, IVs = new(15,25,15,20,25,15) }, // Finneon -> Magikarp
new(DPPt, 0x0000008E, 063, 01) { Ability = OnlyFirst, TID16 = 25643, SID16 = 00000, OTGender = 1, Gender = 0, IVs = new(15,15,15,20,25,25) }, // Machop -> Abra
new(DPPt, 0x00000867, 441, 01) { Ability = OnlySecond, TID16 = 44142, SID16 = 00000, OTGender = 0, Gender = 1, IVs = new(15,20,15,25,25,15), Contest = 20 }, // Buizel -> Chatot
new(DPPt, 0x00000088, 093, 35) { Ability = OnlyFirst, TID16 = 19248, SID16 = 00000, OTGender = 1, Gender = 0, IVs = new(20,25,15,25,15,15) }, // Medicham (35 from Route 217) -> Haunter
new(DPPt, 0x0000045C, 129, 01) { Ability = OnlyFirst, TID16 = 53277, SID16 = 00000, OTGender = 0, Gender = 1, IVs = new(15,25,15,20,25,15) }, // Finneon -> Magikarp
};
internal static readonly EncounterTrade4[] TradeGift_DPPt = ArrayUtil.ConcatAll(TradeGift_DPPtIngame, RanchGifts);

View file

@ -119,20 +119,20 @@ internal static class Encounters4HGSS
#region Trade Tables
internal static readonly EncounterTrade4PID[] TradeGift_HGSS =
{
new(HGSS, 0x000025EF, 095, 01) { Ability = OnlySecond, TID = 48926, SID = 00000, OTGender = 0, Gender = 0, IVs = new(25,20,25,15,15,15) }, // Bellsprout -> Onix
new(HGSS, 0x00002310, 066, 01) { Ability = OnlyFirst, TID = 37460, SID = 00000, OTGender = 0, Gender = 1, IVs = new(15,25,20,20,15,15) }, // Drowzee -> Machop
new(HGSS, 0x000001DB, 100, 01) { Ability = OnlySecond, TID = 29189, SID = 00000, OTGender = 0, Gender = 2, IVs = new(15,20,15,25,25,15) }, // Krabby -> Voltorb
new(HGSS, 0x0001FC0A, 085, 15) { Ability = OnlyFirst, TID = 00283, SID = 00000, OTGender = 1, Gender = 1, IVs = new(20,20,20,15,15,15) }, // Dragonair (15 from DPPt) -> Dodrio
new(HGSS, 0x0000D136, 082, 19) { Ability = OnlyFirst, TID = 50082, SID = 00000, OTGender = 0, Gender = 2, IVs = new(15,20,15,20,20,20) }, // Dugtrio (19 from Diglett's Cave) -> Magneton
new(HGSS, 0x000034E4, 178, 16) { Ability = OnlyFirst, TID = 15616, SID = 00000, OTGender = 0, Gender = 0, IVs = new(15,20,15,20,20,20) }, // Haunter (16 from Old Chateau) -> Xatu
new(HGSS, 0x00485876, 025, 02) { Ability = OnlyFirst, TID = 33038, SID = 00000, OTGender = 0, Gender = 1, IVs = new(20,25,18,31,25,13) }, // Pikachu
new(HGSS, 0x0012B6D4, 374, 31) { Ability = OnlyFirst, TID = 23478, SID = 00000, OTGender = 0, Gender = 2, IVs = new(28,29,24,23,24,25) }, // Forretress -> Beldum
new(HGSS, 0x0012971C, 111, 01) { Ability = OnlyFirst, TID = 06845, SID = 00000, OTGender = 0, Gender = 1, IVs = new(22,31,13,00,22,09), Moves = new(422) }, // Bonsly -> Rhyhorn
new(HGSS, 0x00101596, 208, 01) { Ability = OnlyFirst, TID = 26491, SID = 00000, OTGender = 1, Gender = 0, IVs = new(08,30,28,06,18,20) }, // Any -> Steelix
new(HGSS, 0x000025EF, 095, 01) { Ability = OnlySecond, TID16 = 48926, SID16 = 00000, OTGender = 0, Gender = 0, IVs = new(25,20,25,15,15,15) }, // Bellsprout -> Onix
new(HGSS, 0x00002310, 066, 01) { Ability = OnlyFirst, TID16 = 37460, SID16 = 00000, OTGender = 0, Gender = 1, IVs = new(15,25,20,20,15,15) }, // Drowzee -> Machop
new(HGSS, 0x000001DB, 100, 01) { Ability = OnlySecond, TID16 = 29189, SID16 = 00000, OTGender = 0, Gender = 2, IVs = new(15,20,15,25,25,15) }, // Krabby -> Voltorb
new(HGSS, 0x0001FC0A, 085, 15) { Ability = OnlyFirst, TID16 = 00283, SID16 = 00000, OTGender = 1, Gender = 1, IVs = new(20,20,20,15,15,15) }, // Dragonair (15 from DPPt) -> Dodrio
new(HGSS, 0x0000D136, 082, 19) { Ability = OnlyFirst, TID16 = 50082, SID16 = 00000, OTGender = 0, Gender = 2, IVs = new(15,20,15,20,20,20) }, // Dugtrio (19 from Diglett's Cave) -> Magneton
new(HGSS, 0x000034E4, 178, 16) { Ability = OnlyFirst, TID16 = 15616, SID16 = 00000, OTGender = 0, Gender = 0, IVs = new(15,20,15,20,20,20) }, // Haunter (16 from Old Chateau) -> Xatu
new(HGSS, 0x00485876, 025, 02) { Ability = OnlyFirst, TID16 = 33038, SID16 = 00000, OTGender = 0, Gender = 1, IVs = new(20,25,18,31,25,13) }, // Pikachu
new(HGSS, 0x0012B6D4, 374, 31) { Ability = OnlyFirst, TID16 = 23478, SID16 = 00000, OTGender = 0, Gender = 2, IVs = new(28,29,24,23,24,25) }, // Forretress -> Beldum
new(HGSS, 0x0012971C, 111, 01) { Ability = OnlyFirst, TID16 = 06845, SID16 = 00000, OTGender = 0, Gender = 1, IVs = new(22,31,13,00,22,09), Moves = new(422) }, // Bonsly -> Rhyhorn
new(HGSS, 0x00101596, 208, 01) { Ability = OnlyFirst, TID16 = 26491, SID16 = 00000, OTGender = 1, Gender = 0, IVs = new(08,30,28,06,18,20) }, // Any -> Steelix
//Gift
new(HGSS, 0x00006B5E, 021, 20) { Ability = OnlyFirst, TID = 01001, SID = 00000, OTGender = 0, Gender = 1, IVs = new(15,20,15,20,20,20), MetLocation = 183, Moves = new(043,031,228,332) },// Webster's Spearow
new(HGSS, 0x000214D7, 213, 20) { Ability = OnlySecond, TID = 04336, SID = 00001, OTGender = 0, Gender = 0, IVs = new(15,20,15,20,20,20), MetLocation = 130, Moves = new(132,117,227,219) },// Kirk's Shuckle
new(HGSS, 0x00006B5E, 021, 20) { Ability = OnlyFirst, TID16 = 01001, SID16 = 00000, OTGender = 0, Gender = 1, IVs = new(15,20,15,20,20,20), MetLocation = 183, Moves = new(043,031,228,332) },// Webster's Spearow
new(HGSS, 0x000214D7, 213, 20) { Ability = OnlySecond, TID16 = 04336, SID16 = 00001, OTGender = 0, Gender = 0, IVs = new(15,20,15,20,20,20), MetLocation = 130, Moves = new(132,117,227,219) },// Kirk's Shuckle
};
private const string tradeHGSS = "tradehgss";

View file

@ -16,7 +16,7 @@ public static class Encounters5B2W2
static Encounters5B2W2() => MarkEncounterTradeStrings(TradeGift_B2W2_Regular, TradeB2W2);
#region DreamWorld Encounter
public static readonly EncounterStatic5[] DreamWorld_B2W2 = DreamWorldEntry.GetArray(B2W2, new DreamWorldEntry[]
public static readonly EncounterStatic5[] DreamWorld_B2W2 = DreamWorldEntry.GetArray(B2W2, stackalloc DreamWorldEntry[]
{
// Pleasant Forest
new(535, 10, 496, 414, 352), // Tympole
@ -173,13 +173,13 @@ public static class Encounters5B2W2
#region Trade Tables
internal static readonly EncounterTrade5[] TradeGift_B2W2_Regular =
{
new(B2 ) { Species = 548, Level = 20, Ability = OnlySecond, TID = 65217, SID = 00000, OTGender = 1, Gender = 1, IVs = new(20,20,20,20,31,20), Nature = Nature.Timid }, // Petilil
new( W2) { Species = 546, Level = 20, Ability = OnlyFirst, TID = 05720, SID = 00001, OTGender = 0, Gender = 0, IVs = new(20,20,20,20,31,20), Nature = Nature.Modest }, // Cottonee
new(B2W2) { Species = 526, Level = 35, Ability = OnlyFirst, TID = 11195, SID = 00000, OTGender = 0, Gender = 0, IVs = new(20,31,20,20,20,20), Nature = Nature.Adamant, IsNicknamed = false }, // Gigalith
new(B2W2) { Species = 465, Level = 45, Ability = OnlyFirst, TID = 27658, SID = 00001, OTGender = 0, Gender = 0, IVs = new(31,20,20,20,20,20), Nature = Nature.Hardy }, // Tangrowth
new(B2W2) { Species = 479, Level = 60, Ability = OnlyFirst, TID = 54673, SID = 00000, OTGender = 1, Gender = 2, IVs = new(20,20,20,20,20,31), Nature = Nature.Calm }, // Rotom
new(B2W2) { Species = 424, Level = 40, Ability = OnlySecond, TID = 17074, SID = 00001, OTGender = 1, Gender = 0, IVs = new(20,20,20,31,20,20), Nature = Nature.Jolly }, // Ambipom
new(B2W2) { Species = 065, Level = 40, Ability = OnlyFirst, TID = 17074, SID = 00001, OTGender = 1, Gender = 0, IVs = new(20,20,20,31,20,20), Nature = Nature.Timid }, // Alakazam
new(B2 ) { Species = 548, Level = 20, Ability = OnlySecond, TID16 = 65217, SID16 = 00000, OTGender = 1, Gender = 1, IVs = new(20,20,20,20,31,20), Nature = Nature.Timid }, // Petilil
new( W2) { Species = 546, Level = 20, Ability = OnlyFirst, TID16 = 05720, SID16 = 00001, OTGender = 0, Gender = 0, IVs = new(20,20,20,20,31,20), Nature = Nature.Modest }, // Cottonee
new(B2W2) { Species = 526, Level = 35, Ability = OnlyFirst, TID16 = 11195, SID16 = 00000, OTGender = 0, Gender = 0, IVs = new(20,31,20,20,20,20), Nature = Nature.Adamant, IsNicknamed = false }, // Gigalith
new(B2W2) { Species = 465, Level = 45, Ability = OnlyFirst, TID16 = 27658, SID16 = 00001, OTGender = 0, Gender = 0, IVs = new(31,20,20,20,20,20), Nature = Nature.Hardy }, // Tangrowth
new(B2W2) { Species = 479, Level = 60, Ability = OnlyFirst, TID16 = 54673, SID16 = 00000, OTGender = 1, Gender = 2, IVs = new(20,20,20,20,20,31), Nature = Nature.Calm }, // Rotom
new(B2W2) { Species = 424, Level = 40, Ability = OnlySecond, TID16 = 17074, SID16 = 00001, OTGender = 1, Gender = 0, IVs = new(20,20,20,31,20,20), Nature = Nature.Jolly }, // Ambipom
new(B2W2) { Species = 065, Level = 40, Ability = OnlyFirst, TID16 = 17074, SID16 = 00001, OTGender = 1, Gender = 0, IVs = new(20,20,20,31,20,20), Nature = Nature.Timid }, // Alakazam
};
internal const int YancyTID = 10303;
@ -190,32 +190,32 @@ public static class Encounters5B2W2
private static readonly EncounterTrade5[] TradeGift_B2W2_YancyCurtis =
{
// Player is Male
new(B2W2) { Species = 052, Level = 50, Ability = OnlyHidden, TID = 10303, SID = 00000, OTGender = 1, TrainerNames = TradeOT_B2W2_F }, // Meowth
new(B2W2) { Species = 202, Level = 50, Ability = OnlyHidden, TID = 10303, SID = 00000, OTGender = 1, TrainerNames = TradeOT_B2W2_F }, // Wobbuffet
new(B2W2) { Species = 280, Level = 50, Ability = OnlyHidden, TID = 10303, SID = 00000, OTGender = 1, TrainerNames = TradeOT_B2W2_F }, // Ralts
new(B2W2) { Species = 410, Level = 50, Ability = OnlyHidden, TID = 10303, SID = 00000, OTGender = 1, TrainerNames = TradeOT_B2W2_F }, // Shieldon
new(B2W2) { Species = 111, Level = 50, Ability = OnlyHidden, TID = 10303, SID = 00000, OTGender = 1, TrainerNames = TradeOT_B2W2_F }, // Rhyhorn
new(B2W2) { Species = 422, Level = 50, Ability = OnlyHidden, TID = 10303, SID = 00000, OTGender = 1, TrainerNames = TradeOT_B2W2_F, Form = 0 }, // Shellos-West
new(B2W2) { Species = 303, Level = 50, Ability = OnlyHidden, TID = 10303, SID = 00000, OTGender = 1, TrainerNames = TradeOT_B2W2_F }, // Mawile
new(B2W2) { Species = 442, Level = 50, Ability = OnlyHidden, TID = 10303, SID = 00000, OTGender = 1, TrainerNames = TradeOT_B2W2_F }, // Spiritomb
new(B2W2) { Species = 143, Level = 50, Ability = OnlyHidden, TID = 10303, SID = 00000, OTGender = 1, TrainerNames = TradeOT_B2W2_F }, // Snorlax
new(B2W2) { Species = 216, Level = 50, Ability = OnlyHidden, TID = 10303, SID = 00000, OTGender = 1, TrainerNames = TradeOT_B2W2_F }, // Teddiursa
new(B2W2) { Species = 327, Level = 50, Ability = OnlyHidden, TID = 10303, SID = 00000, OTGender = 1, TrainerNames = TradeOT_B2W2_F }, // Spinda
new(B2W2) { Species = 175, Level = 50, Ability = OnlyHidden, TID = 10303, SID = 00000, OTGender = 1, TrainerNames = TradeOT_B2W2_F }, // Togepi
new(B2W2) { Species = 052, Level = 50, Ability = OnlyHidden, TID16 = 10303, SID16 = 00000, OTGender = 1, TrainerNames = TradeOT_B2W2_F }, // Meowth
new(B2W2) { Species = 202, Level = 50, Ability = OnlyHidden, TID16 = 10303, SID16 = 00000, OTGender = 1, TrainerNames = TradeOT_B2W2_F }, // Wobbuffet
new(B2W2) { Species = 280, Level = 50, Ability = OnlyHidden, TID16 = 10303, SID16 = 00000, OTGender = 1, TrainerNames = TradeOT_B2W2_F }, // Ralts
new(B2W2) { Species = 410, Level = 50, Ability = OnlyHidden, TID16 = 10303, SID16 = 00000, OTGender = 1, TrainerNames = TradeOT_B2W2_F }, // Shieldon
new(B2W2) { Species = 111, Level = 50, Ability = OnlyHidden, TID16 = 10303, SID16 = 00000, OTGender = 1, TrainerNames = TradeOT_B2W2_F }, // Rhyhorn
new(B2W2) { Species = 422, Level = 50, Ability = OnlyHidden, TID16 = 10303, SID16 = 00000, OTGender = 1, TrainerNames = TradeOT_B2W2_F, Form = 0 }, // Shellos-West
new(B2W2) { Species = 303, Level = 50, Ability = OnlyHidden, TID16 = 10303, SID16 = 00000, OTGender = 1, TrainerNames = TradeOT_B2W2_F }, // Mawile
new(B2W2) { Species = 442, Level = 50, Ability = OnlyHidden, TID16 = 10303, SID16 = 00000, OTGender = 1, TrainerNames = TradeOT_B2W2_F }, // Spiritomb
new(B2W2) { Species = 143, Level = 50, Ability = OnlyHidden, TID16 = 10303, SID16 = 00000, OTGender = 1, TrainerNames = TradeOT_B2W2_F }, // Snorlax
new(B2W2) { Species = 216, Level = 50, Ability = OnlyHidden, TID16 = 10303, SID16 = 00000, OTGender = 1, TrainerNames = TradeOT_B2W2_F }, // Teddiursa
new(B2W2) { Species = 327, Level = 50, Ability = OnlyHidden, TID16 = 10303, SID16 = 00000, OTGender = 1, TrainerNames = TradeOT_B2W2_F }, // Spinda
new(B2W2) { Species = 175, Level = 50, Ability = OnlyHidden, TID16 = 10303, SID16 = 00000, OTGender = 1, TrainerNames = TradeOT_B2W2_F }, // Togepi
// Player is Female
new(B2W2) { Species = 056, Level = 50, Ability = OnlyHidden, TID = 54118, SID = 00000, OTGender = 0, TrainerNames = TradeOT_B2W2_M }, // Mankey
new(B2W2) { Species = 202, Level = 50, Ability = OnlyHidden, TID = 54118, SID = 00000, OTGender = 0, TrainerNames = TradeOT_B2W2_M }, // Wobbuffet
new(B2W2) { Species = 280, Level = 50, Ability = OnlyHidden, TID = 54118, SID = 00000, OTGender = 0, TrainerNames = TradeOT_B2W2_M }, // Ralts
new(B2W2) { Species = 408, Level = 50, Ability = OnlyHidden, TID = 54118, SID = 00000, OTGender = 0, TrainerNames = TradeOT_B2W2_M }, // Cranidos
new(B2W2) { Species = 111, Level = 50, Ability = OnlyHidden, TID = 54118, SID = 00000, OTGender = 0, TrainerNames = TradeOT_B2W2_M }, // Rhyhorn
new(B2W2) { Species = 422, Level = 50, Ability = OnlyHidden, TID = 54118, SID = 00000, OTGender = 0, TrainerNames = TradeOT_B2W2_M, Form = 1 }, // Shellos-East
new(B2W2) { Species = 302, Level = 50, Ability = OnlyHidden, TID = 54118, SID = 00000, OTGender = 0, TrainerNames = TradeOT_B2W2_M }, // Sableye
new(B2W2) { Species = 442, Level = 50, Ability = OnlyHidden, TID = 54118, SID = 00000, OTGender = 0, TrainerNames = TradeOT_B2W2_M }, // Spiritomb
new(B2W2) { Species = 143, Level = 50, Ability = OnlyHidden, TID = 54118, SID = 00000, OTGender = 0, TrainerNames = TradeOT_B2W2_M }, // Snorlax
new(B2W2) { Species = 231, Level = 50, Ability = OnlyHidden, TID = 54118, SID = 00000, OTGender = 0, TrainerNames = TradeOT_B2W2_M }, // Phanpy
new(B2W2) { Species = 327, Level = 50, Ability = OnlyHidden, TID = 54118, SID = 00000, OTGender = 0, TrainerNames = TradeOT_B2W2_M }, // Spinda
new(B2W2) { Species = 175, Level = 50, Ability = OnlyHidden, TID = 54118, SID = 00000, OTGender = 0, TrainerNames = TradeOT_B2W2_M }, // Togepi
new(B2W2) { Species = 056, Level = 50, Ability = OnlyHidden, TID16 = 54118, SID16 = 00000, OTGender = 0, TrainerNames = TradeOT_B2W2_M }, // Mankey
new(B2W2) { Species = 202, Level = 50, Ability = OnlyHidden, TID16 = 54118, SID16 = 00000, OTGender = 0, TrainerNames = TradeOT_B2W2_M }, // Wobbuffet
new(B2W2) { Species = 280, Level = 50, Ability = OnlyHidden, TID16 = 54118, SID16 = 00000, OTGender = 0, TrainerNames = TradeOT_B2W2_M }, // Ralts
new(B2W2) { Species = 408, Level = 50, Ability = OnlyHidden, TID16 = 54118, SID16 = 00000, OTGender = 0, TrainerNames = TradeOT_B2W2_M }, // Cranidos
new(B2W2) { Species = 111, Level = 50, Ability = OnlyHidden, TID16 = 54118, SID16 = 00000, OTGender = 0, TrainerNames = TradeOT_B2W2_M }, // Rhyhorn
new(B2W2) { Species = 422, Level = 50, Ability = OnlyHidden, TID16 = 54118, SID16 = 00000, OTGender = 0, TrainerNames = TradeOT_B2W2_M, Form = 1 }, // Shellos-East
new(B2W2) { Species = 302, Level = 50, Ability = OnlyHidden, TID16 = 54118, SID16 = 00000, OTGender = 0, TrainerNames = TradeOT_B2W2_M }, // Sableye
new(B2W2) { Species = 442, Level = 50, Ability = OnlyHidden, TID16 = 54118, SID16 = 00000, OTGender = 0, TrainerNames = TradeOT_B2W2_M }, // Spiritomb
new(B2W2) { Species = 143, Level = 50, Ability = OnlyHidden, TID16 = 54118, SID16 = 00000, OTGender = 0, TrainerNames = TradeOT_B2W2_M }, // Snorlax
new(B2W2) { Species = 231, Level = 50, Ability = OnlyHidden, TID16 = 54118, SID16 = 00000, OTGender = 0, TrainerNames = TradeOT_B2W2_M }, // Phanpy
new(B2W2) { Species = 327, Level = 50, Ability = OnlyHidden, TID16 = 54118, SID16 = 00000, OTGender = 0, TrainerNames = TradeOT_B2W2_M }, // Spinda
new(B2W2) { Species = 175, Level = 50, Ability = OnlyHidden, TID16 = 54118, SID16 = 00000, OTGender = 0, TrainerNames = TradeOT_B2W2_M }, // Togepi
};
private const string tradeB2W2 = "tradeb2w2";

View file

@ -15,12 +15,9 @@ public static class Encounters5BW
static Encounters5BW() => MarkEncounterTradeStrings(TradeGift_BW, TradeBW);
#region Dream Radar Tables
#endregion
#region DreamWorld Encounter
public static readonly EncounterStatic5[] DreamWorld_BW = DreamWorldEntry.GetArray(BW, new DreamWorldEntry[]
public static readonly EncounterStatic5[] DreamWorld_BW = DreamWorldEntry.GetArray(BW, stackalloc DreamWorldEntry[]
{
// Pleasant Forest
new(029, 10, 010, 389, 162), // Nidoran♀
@ -181,13 +178,13 @@ public static class Encounters5BW
#region Trade Tables
internal static readonly EncounterTrade5PID[] TradeGift_BW =
{
new(B , 0x64000000) { Species = 548, Level = 15, Ability = OnlyFirst, TID = 39922, SID = 00000, OTGender = 1, Gender = 1, IVs = new(20,20,20,20,31,20), Nature = Nature.Modest }, // Petilil
new( W, 0x6400007E) { Species = 546, Level = 15, Ability = OnlyFirst, TID = 39922, SID = 00000, OTGender = 1, Gender = 1, IVs = new(20,20,20,20,31,20), Nature = Nature.Modest }, // Cottonee
new(B , 0x9400007F) { Species = 550, Level = 25, Ability = OnlyFirst, TID = 27646, SID = 00000, OTGender = 0, Gender = 0, IVs = new(20,31,20,20,20,20), Nature = Nature.Adamant, Form = 0 }, // Basculin-Red
new( W, 0x9400007F) { Species = 550, Level = 25, Ability = OnlyFirst, TID = 27646, SID = 00000, OTGender = 0, Gender = 0, IVs = new(20,31,20,20,20,20), Nature = Nature.Adamant, Form = 1 }, // Basculin-Blue
new(BW, 0xD400007F) { Species = 587, Level = 30, Ability = OnlyFirst, TID = 11195, SID = 00000, OTGender = 0, Gender = 0, IVs = new(20,20,31,20,20,20), Nature = Nature.Lax }, // Emolga
new(BW, 0x2A000000) { Species = 479, Level = 60, Ability = OnlyFirst, TID = 54673, SID = 00000, OTGender = 1, Gender = 2, IVs = new(20,20,20,20,20,31), Nature = Nature.Gentle }, // Rotom
new(BW, 0x6200001F) { Species = 446, Level = 60, Ability = OnlySecond, TID = 40217, SID = 00000, OTGender = 0, Gender = 0, IVs = new(31,20,20,20,20,20), Nature = Nature.Serious }, // Munchlax
new(B , 0x64000000) { Species = 548, Level = 15, Ability = OnlyFirst, TID16 = 39922, SID16 = 00000, OTGender = 1, Gender = 1, IVs = new(20,20,20,20,31,20), Nature = Nature.Modest }, // Petilil
new( W, 0x6400007E) { Species = 546, Level = 15, Ability = OnlyFirst, TID16 = 39922, SID16 = 00000, OTGender = 1, Gender = 1, IVs = new(20,20,20,20,31,20), Nature = Nature.Modest }, // Cottonee
new(B , 0x9400007F) { Species = 550, Level = 25, Ability = OnlyFirst, TID16 = 27646, SID16 = 00000, OTGender = 0, Gender = 0, IVs = new(20,31,20,20,20,20), Nature = Nature.Adamant, Form = 0 }, // Basculin-Red
new( W, 0x9400007F) { Species = 550, Level = 25, Ability = OnlyFirst, TID16 = 27646, SID16 = 00000, OTGender = 0, Gender = 0, IVs = new(20,31,20,20,20,20), Nature = Nature.Adamant, Form = 1 }, // Basculin-Blue
new(BW, 0xD400007F) { Species = 587, Level = 30, Ability = OnlyFirst, TID16 = 11195, SID16 = 00000, OTGender = 0, Gender = 0, IVs = new(20,20,31,20,20,20), Nature = Nature.Lax }, // Emolga
new(BW, 0x2A000000) { Species = 479, Level = 60, Ability = OnlyFirst, TID16 = 54673, SID16 = 00000, OTGender = 1, Gender = 2, IVs = new(20,20,20,20,20,31), Nature = Nature.Gentle }, // Rotom
new(BW, 0x6200001F) { Species = 446, Level = 60, Ability = OnlySecond, TID16 = 40217, SID16 = 00000, OTGender = 0, Gender = 0, IVs = new(31,20,20,20,20,20), Nature = Nature.Serious }, // Munchlax
};
private const string tradeBW = "tradebw";

View file

@ -43,7 +43,7 @@ public static class Encounters5DR
#endregion
#region DreamWorld Encounter
public static readonly EncounterStatic5[] DreamWorld_Common = DreamWorldEntry.GetArray(Gen5, new DreamWorldEntry[]
public static readonly EncounterStatic5[] DreamWorld_Common = DreamWorldEntry.GetArray(Gen5, stackalloc DreamWorldEntry[]
{
// Pleasant Forest
new(019, 10, 098, 382, 231), // Rattata

View file

@ -91,7 +91,7 @@ internal static class Encounters6AO
new( AS) { Species = 382, Level = 45, Location = 296, Shiny = Shiny.Never, FlawlessIVCount = 3 }, // Kyogre
new(OR ) { Species = 383, Level = 45, Location = 296, Shiny = Shiny.Never, FlawlessIVCount = 3 }, // Groudon
new(ORAS) { Species = 384, Level = 70, Location = 316, Shiny = Shiny.Never, FlawlessIVCount = 3 }, // Rayquaza
new(ORAS) { Species = 386, Level = 80, Location = 316, Shiny = Shiny.Never, FlawlessIVCount = 3, Fateful = true }, // Deoxys
new(ORAS) { Species = 386, Level = 80, Location = 316, Shiny = Shiny.Never, FlawlessIVCount = 3, FatefulEncounter = true }, // Deoxys
// Hoopa Rings
new( AS) { Species = 249, Level = 50, Location = 304, FlawlessIVCount = 3 }, // Lugia
@ -118,8 +118,8 @@ internal static class Encounters6AO
new(ORAS) { Species = 646, Level = 50, Location = 342, FlawlessIVCount = 3 }, // Kyurem
// Devon Scope Kecleon
//new EncounterStatic { Species = 352, Level = 30, Location = 240 }, // Kecleon @ Route 119 -- dexnav encounter slot collision; prefer EncounterSlot
//new EncounterStatic { Species = 352, Level = 30, Location = 242 }, // Kecleon @ Route 120 -- dexnav encounter slot collision; prefer EncounterSlot
//new(ORAS) { Species = 352, Level = 30, Location = 240 }, // Kecleon @ Route 119 -- dexnav encounter slot collision; prefer EncounterSlot
//new(ORAS) { Species = 352, Level = 30, Location = 242 }, // Kecleon @ Route 120 -- dexnav encounter slot collision; prefer EncounterSlot
new(ORAS) { Species = 352, Level = 40, Location = 176, Gender = 1 }, // Kecleon @ Lavaridge
new(ORAS) { Species = 352, Level = 45, Location = 196, Ability = OnlyHidden }, // Kecleon @ Mossdeep City
@ -156,9 +156,9 @@ internal static class Encounters6AO
#region Trade Tables
internal static readonly EncounterTrade6[] TradeGift_AO =
{
new(ORAS, 01,3,05,040) { Species = 296, Level = 09, Ability = OnlySecond, TID = 30724, IVs = new(-1,31,-1,-1,-1,-1), Gender = 0, Nature = Nature.Brave }, // Makuhita
new(ORAS, 34,3,13,176) { Species = 300, Level = 30, Ability = OnlyFirst, TID = 03239, IVs = new(-1,-1,-1,31,-1,-1), Gender = 1, Nature = Nature.Naughty }, // Skitty
new(ORAS, 07,4,10,319) { Species = 222, Level = 50, Ability = OnlyHidden, TID = 00325, IVs = new(31,-1,-1,-1,-1,31), Gender = 1, Nature = Nature.Calm }, // Corsola
new(ORAS, 01,3,05,040) { Species = 296, Level = 09, Ability = OnlySecond, TID16 = 30724, IVs = new(-1,31,-1,-1,-1,-1), Gender = 0, Nature = Nature.Brave }, // Makuhita
new(ORAS, 34,3,13,176) { Species = 300, Level = 30, Ability = OnlyFirst, TID16 = 03239, IVs = new(-1,-1,-1,31,-1,-1), Gender = 1, Nature = Nature.Naughty }, // Skitty
new(ORAS, 07,4,10,319) { Species = 222, Level = 50, Ability = OnlyHidden, TID16 = 00325, IVs = new(31,-1,-1,-1,-1,31), Gender = 1, Nature = Nature.Calm }, // Corsola
};
#endregion

View file

@ -83,17 +83,17 @@ internal static class Encounters6XY
#region Trade Tables
internal static readonly EncounterTrade6[] TradeGift_XY =
{
new(XY, 01,3,23,049) { Species = 129, Level = 05, Ability = OnlyFirst, TID = 44285, IVs = new(-1,31,-1,-1,31,-1), Gender = 0, Nature = Nature.Adamant }, // Magikarp
new(XY, 10,3,00,000) { Species = 133, Level = 05, Ability = OnlyFirst, TID = 29294, Gender = 1, Nature = Nature.Docile }, // Eevee
new(XY, 01,3,23,049) { Species = 129, Level = 05, Ability = OnlyFirst, TID16 = 44285, IVs = new(-1,31,-1,-1,31,-1), Gender = 0, Nature = Nature.Adamant }, // Magikarp
new(XY, 10,3,00,000) { Species = 133, Level = 05, Ability = OnlyFirst, TID16 = 29294, Gender = 1, Nature = Nature.Docile }, // Eevee
new(XY, 15,4,13,017) { Species = 083, Level = 10, Ability = OnlyFirst, TID = 00185, IVs = new(-1,-1,-1,31,-1,-1), Gender = 0, Nature = Nature.Jolly }, // Farfetch'd
new(XY, 17,5,08,025) { Species = 208, Level = 20, Ability = OnlyFirst, TID = 19250, IVs = new(-1,-1,31,-1,-1,-1), Gender = 1, Nature = Nature.Impish }, // Steelix
new(XY, 18,7,20,709) { Species = 625, Level = 50, Ability = OnlyFirst, TID = 03447, IVs = new(-1,31,-1,-1,-1,-1), Gender = 0, Nature = Nature.Adamant }, // Bisharp
new(XY, 15,4,13,017) { Species = 083, Level = 10, Ability = OnlyFirst, TID16 = 00185, IVs = new(-1,-1,-1,31,-1,-1), Gender = 0, Nature = Nature.Jolly }, // Farfetch'd
new(XY, 17,5,08,025) { Species = 208, Level = 20, Ability = OnlyFirst, TID16 = 19250, IVs = new(-1,-1,31,-1,-1,-1), Gender = 1, Nature = Nature.Impish }, // Steelix
new(XY, 18,7,20,709) { Species = 625, Level = 50, Ability = OnlyFirst, TID16 = 03447, IVs = new(-1,31,-1,-1,-1,-1), Gender = 0, Nature = Nature.Adamant }, // Bisharp
new(XY, 02,3,11,005) { Species = 656, Level = 05, Ability = OnlyFirst, TID = 00037, IVs = new(20,20,20,31,20,20), Gender = 0, Nature = Nature.Jolly }, // Froakie
new(XY, 02,3,09,005) { Species = 650, Level = 05, Ability = OnlyFirst, TID = 00037, IVs = new(20,31,20,20,20,20), Gender = 0, Nature = Nature.Adamant }, // Chespin
new(XY, 02,3,18,005) { Species = 653, Level = 05, Ability = OnlyFirst, TID = 00037, IVs = new(20,20,20,20,31,20), Gender = 0, Nature = Nature.Modest }, // Fennekin
new(XY, 51,4,04,033) { Species = 280, Level = 05, Ability = OnlyFirst, TID = 37110, IVs = new(20,20,20,31,31,20), Gender = 1, Nature = Nature.Modest, IsNicknamed = false }, // Ralts
new(XY, 02,3,11,005) { Species = 656, Level = 05, Ability = OnlyFirst, TID16 = 00037, IVs = new(20,20,20,31,20,20), Gender = 0, Nature = Nature.Jolly }, // Froakie
new(XY, 02,3,09,005) { Species = 650, Level = 05, Ability = OnlyFirst, TID16 = 00037, IVs = new(20,31,20,20,20,20), Gender = 0, Nature = Nature.Adamant }, // Chespin
new(XY, 02,3,18,005) { Species = 653, Level = 05, Ability = OnlyFirst, TID16 = 00037, IVs = new(20,20,20,20,31,20), Gender = 0, Nature = Nature.Modest }, // Fennekin
new(XY, 51,4,04,033) { Species = 280, Level = 05, Ability = OnlyFirst, TID16 = 37110, IVs = new(20,20,20,31,31,20), Gender = 1, Nature = Nature.Modest, IsNicknamed = false }, // Ralts
};
#endregion

View file

@ -51,7 +51,7 @@ internal static class Encounters7SM
new(SM) // Magearna (Bottle Cap) 00 FF
{
Gift = true, Species = 801, Level = 50, Location = 40001, Shiny = Shiny.Never, FlawlessIVCount = 3, HeldItem = 795, Ability = OnlySecond,
Fateful = true, Relearn = new(705, 430, 381, 270), Ball = 0x10, // Cherish
FatefulEncounter = true, Relearn = new(705, 430, 381, 270), Ball = 0x10, // Cherish
},
// Static Encounters - 1.bin
@ -120,13 +120,13 @@ internal static class Encounters7SM
internal static readonly EncounterTrade7[] TradeGift_SM = // @ a\1\5\5
{
// Trades - 4.bin
new(SM) { Species = 066, Form = 0, Level = 09, Ability = OnlySecond, TID = 00410, SID = 00000, IVs = new(-1,31,-1,-1,-1,-1), OTGender = 1, Gender = 0, Nature = Nature.Brave }, // Machop
new(SM) { Species = 761, Form = 0, Level = 16, Ability = OnlyFirst, TID = 20683, SID = 00009, IVs = new(-1,31,-1,-1,-1,-1), OTGender = 0, Gender = 1, Nature = Nature.Adamant }, // Bounsweet
new(SM) { Species = 061, Form = 0, Level = 22, Ability = OnlySecond, TID = 01092, SID = 00009, IVs = new(31,-1,-1,-1,-1,-1), OTGender = 1, Gender = 1, Nature = Nature.Naughty }, // Poliwhirl
new(SM) { Species = 440, Form = 0, Level = 27, Ability = OnlySecond, TID = 10913, SID = 00000, IVs = new(-1,-1,-1,-1,31,-1), OTGender = 1, Gender = 1, Nature = Nature.Calm }, // Happiny
new(SM) { Species = 075, Form = 1, Level = 32, Ability = OnlyFirst, TID = 20778, SID = 00009, IVs = new(-1,-1,31,-1,-1,-1), OTGender = 0, Gender = 0, Nature = Nature.Impish, EvolveOnTrade = true }, // Graveler-1
new(SM) { Species = 762, Form = 0, Level = 43, Ability = OnlyFirst, TID = 20679, SID = 00009, IVs = new(-1,-1,-1,-1,-1,31), OTGender = 1, Gender = 1, Nature = Nature.Careful }, // Steenee
new(SM) { Species = 663, Form = 0, Level = 59, Ability = OnlyHidden, TID = 56734, SID = 00008, IVs = new(-1,-1,-1,31,-1,-1), OTGender = 0, Gender = 0, Nature = Nature.Jolly }, // Talonflame
new(SM) { Species = 066, Form = 0, Level = 09, Ability = OnlySecond, TID16 = 00410, SID16 = 00000, IVs = new(-1,31,-1,-1,-1,-1), OTGender = 1, Gender = 0, Nature = Nature.Brave }, // Machop
new(SM) { Species = 761, Form = 0, Level = 16, Ability = OnlyFirst, TID16 = 20683, SID16 = 00009, IVs = new(-1,31,-1,-1,-1,-1), OTGender = 0, Gender = 1, Nature = Nature.Adamant }, // Bounsweet
new(SM) { Species = 061, Form = 0, Level = 22, Ability = OnlySecond, TID16 = 01092, SID16 = 00009, IVs = new(31,-1,-1,-1,-1,-1), OTGender = 1, Gender = 1, Nature = Nature.Naughty }, // Poliwhirl
new(SM) { Species = 440, Form = 0, Level = 27, Ability = OnlySecond, TID16 = 10913, SID16 = 00000, IVs = new(-1,-1,-1,-1,31,-1), OTGender = 1, Gender = 1, Nature = Nature.Calm }, // Happiny
new(SM) { Species = 075, Form = 1, Level = 32, Ability = OnlyFirst, TID16 = 20778, SID16 = 00009, IVs = new(-1,-1,31,-1,-1,-1), OTGender = 0, Gender = 0, Nature = Nature.Impish, EvolveOnTrade = true }, // Graveler-1
new(SM) { Species = 762, Form = 0, Level = 43, Ability = OnlyFirst, TID16 = 20679, SID16 = 00009, IVs = new(-1,-1,-1,-1,-1,31), OTGender = 1, Gender = 1, Nature = Nature.Careful }, // Steenee
new(SM) { Species = 663, Form = 0, Level = 59, Ability = OnlyHidden, TID16 = 56734, SID16 = 00008, IVs = new(-1,-1,-1,31,-1,-1), OTGender = 0, Gender = 0, Nature = Nature.Jolly }, // Talonflame
};
private const string tradeSM = "tradesm";

View file

@ -59,7 +59,7 @@ internal static class Encounters7USUM
new(USUM) // Magearna (Bottle Cap)
{
Gift = true, Species = 801, Level = 50, Location = 40001, Shiny = Shiny.Never, FlawlessIVCount = 3, HeldItem = 795, Ability = OnlySecond,
Fateful = true, Relearn = new(705, 430, 381, 270), Ball = 0x10, // Cherish
FatefulEncounter = true, Relearn = new(705, 430, 381, 270), Ball = 0x10, // Cherish
},
new(USUM) { Gift = true, Species = 718, Form = 0, Level = 50, Shiny = Shiny.Never, Location = 118, FlawlessIVCount = 3 }, // Zygarde (50%)
@ -76,7 +76,7 @@ internal static class Encounters7USUM
new(USUM) { Species = 007, Level = 12, Location = 042, Relearn = new(453,110,055,033) }, // Squirtle @ Seaward Cave
new(USUM) { Species = 095, Level = 14, Location = 034, Relearn = new(563,099,317,088) }, // Onix @ Ten Carat Hill
new(USUM) { Species = 116, Level = 18, Location = 014, Relearn = new(352,239,055,043) }, // Horsea @ Kala'e Bay
new(USUM) { Species = 664, Level = 09, Location = 020, Relearn = new(476,081,078,033), Form = EncounterStatic.FormVivillon }, // Scatterbug @ Hau'oli City
new(USUM) { Species = 664, Level = 09, Location = 020, Relearn = new(476,081,078,033), Form = EncounterStatic7.FormVivillon }, // Scatterbug @ Hau'oli City
new(USUM) { Species = 001, Level = 10, Location = 012, Relearn = new(580,022,045,033) }, // Bulbasaur @ Route 2
new(USUM) { Species = 607, Level = 09, Location = 038, Relearn = new(203,052,083,123) }, // Litwick @ Hau'oli Cemetery
@ -219,13 +219,13 @@ internal static class Encounters7USUM
internal static readonly EncounterTrade7[] TradeGift_USUM =
{
// Trades - 4.bin
new(USUM) { Species = 701, Form = 0, Level = 08, Ability = OnlySecond, TID = 00410, SID = 00000, IVs = new(-1,31,-1,-1,-1,-1), OTGender = 1, Gender = 0, Nature = Nature.Brave }, // Hawlucha
new(USUM) { Species = 714, Form = 0, Level = 19, Ability = OnlyFirst, TID = 20683, SID = 00009, IVs = new(-1,-1,-1,-1,31,-1), OTGender = 0, Gender = 0, Nature = Nature.Modest }, // Noibat
new(USUM) { Species = 339, Form = 0, Level = 21, Ability = OnlySecond, TID = 01092, SID = 00009, IVs = new(31,-1,-1,-1,-1,-1), OTGender = 0, Gender = 1, Nature = Nature.Naughty }, // Barboach
new(USUM) { Species = 024, Form = 0, Level = 22, Ability = OnlyFirst, TID = 10913, SID = 00000, IVs = new(-1,-1,31,-1,-1,-1), OTGender = 1, Gender = 1, Nature = Nature.Impish }, // Arbok
new(USUM) { Species = 708, Form = 0, Level = 33, Ability = OnlyFirst, TID = 20778, SID = 00009, IVs = new(-1,-1,-1,-1,-1,31), OTGender = 0, Gender = 0, Nature = Nature.Calm, EvolveOnTrade = true }, // Phantump
new(USUM) { Species = 422, Form = 0, Level = 44, Ability = OnlySecond, TID = 20679, SID = 00009, IVs = new(-1,-1,31,-1,-1,-1), OTGender = 1, Gender = 1, Nature = Nature.Quiet }, // Shellos
new(USUM) { Species = 128, Form = 0, Level = 59, Ability = OnlyFirst, TID = 56734, SID = 00008, IVs = new(-1,-1,-1,31,-1,-1), OTGender = 0, Gender = 0, Nature = Nature.Jolly }, // Tauros
new(USUM) { Species = 701, Form = 0, Level = 08, Ability = OnlySecond, TID16 = 00410, SID16 = 00000, IVs = new(-1,31,-1,-1,-1,-1), OTGender = 1, Gender = 0, Nature = Nature.Brave }, // Hawlucha
new(USUM) { Species = 714, Form = 0, Level = 19, Ability = OnlyFirst, TID16 = 20683, SID16 = 00009, IVs = new(-1,-1,-1,-1,31,-1), OTGender = 0, Gender = 0, Nature = Nature.Modest }, // Noibat
new(USUM) { Species = 339, Form = 0, Level = 21, Ability = OnlySecond, TID16 = 01092, SID16 = 00009, IVs = new(31,-1,-1,-1,-1,-1), OTGender = 0, Gender = 1, Nature = Nature.Naughty }, // Barboach
new(USUM) { Species = 024, Form = 0, Level = 22, Ability = OnlyFirst, TID16 = 10913, SID16 = 00000, IVs = new(-1,-1,31,-1,-1,-1), OTGender = 1, Gender = 1, Nature = Nature.Impish }, // Arbok
new(USUM) { Species = 708, Form = 0, Level = 33, Ability = OnlyFirst, TID16 = 20778, SID16 = 00009, IVs = new(-1,-1,-1,-1,-1,31), OTGender = 0, Gender = 0, Nature = Nature.Calm, EvolveOnTrade = true }, // Phantump
new(USUM) { Species = 422, Form = 0, Level = 44, Ability = OnlySecond, TID16 = 20679, SID16 = 00009, IVs = new(-1,-1,31,-1,-1,-1), OTGender = 1, Gender = 1, Nature = Nature.Quiet }, // Shellos
new(USUM) { Species = 128, Form = 0, Level = 59, Ability = OnlyFirst, TID16 = 56734, SID16 = 00008, IVs = new(-1,-1,-1,31,-1,-1), OTGender = 0, Gender = 0, Nature = Nature.Jolly }, // Tauros
};
private const string tradeUSUM = "tradeusum";

View file

@ -580,7 +580,7 @@ internal static class Encounters8
new() { Species = 638, Level = 70, Location = 226, FlawlessIVCount = 3, Ability = OnlyFirst, Weather = No_Sun_Sand }, // Cobalion at the Frigid Sea
new() { Species = 639, Level = 70, Location = 232, FlawlessIVCount = 3, Ability = OnlyFirst, Weather = Overcast }, // Terrakion in Lakeside Cavern
new() { Species = 640, Level = 70, Location = 210, FlawlessIVCount = 3, Ability = OnlyFirst, Weather = All_CT }, // Virizion at Giant's Bed
new() { Species = 647, Level = 65, Location = 230, Moves = new(548,533,014,056), FlawlessIVCount = 3, Shiny = Never, Ability = OnlyFirst, Form = 01, Fateful = true, Weather = All_Ballimere }, // Keldeo-1 at Ballimere Lake
new() { Species = 647, Level = 65, Location = 230, Moves = new(548,533,014,056), FlawlessIVCount = 3, Shiny = Never, Ability = OnlyFirst, Form = 01, FatefulEncounter = true, Weather = All_Ballimere }, // Keldeo-1 at Ballimere Lake
//new() { Species = 896, Level = 75, Location = -1, Moves = new(556,037,419,023}, FlawlessIVCount = 3, Shiny = Never, Ability = OnlyFirst }, // Glastrier
//new() { Species = 897, Level = 75, Location = -1, Moves = new(247,037,506,024}, FlawlessIVCount = 3, Shiny = Never, Ability = OnlyFirst }, // Spectrier
new() { Species = 898, Level = 80, Location = 220, Moves = new(202,094,473,505), FlawlessIVCount = 3, Shiny = Never, Ability = OnlyFirst, ScriptedNoMarks = true }, // Calyrex

View file

@ -22,7 +22,7 @@ internal static class Encounters8a
new(037,001,40,M,M) { Location = 088, Gift = true, Method = Fixed, Ball = (int)Ball.LAPoke }, // Vulpix-1
new(483,000,65,M,M) { Location = 109, FlawlessIVCount = 3, Gift = true, Method = Fixed, Ball = (int)Ball.LAOrigin }, // Dialga
new(484,000,65,M,M) { Location = 109, FlawlessIVCount = 3, Gift = true, Method = Fixed, Ball = (int)Ball.LAOrigin }, // Palkia
new(493,000,75,M,M) { Location = 109, FlawlessIVCount = 3, Gift = true, Method = Fixed, Ball = (int)Ball.LAPoke, Fateful = true }, // Arceus
new(493,000,75,M,M) { Location = 109, FlawlessIVCount = 3, Gift = true, Method = Fixed, Ball = (int)Ball.LAPoke, FatefulEncounter = true }, // Arceus
// Static Encounters - Scripted Table Slots
new(480,000,70,M,M) { Location = 111, FlawlessIVCount = 3, Moves = new(129,326,832,095) }, // Uxie
@ -42,13 +42,13 @@ internal static class Encounters8a
new(570,001,28 ) { Location = 027 }, // Zorua
new(570,001,29 ) { Location = 027 }, // Zorua
new(489,000,33 ) { Location = 064, Fateful = true, Moves = new(145,352,151,428) }, // Phione
new(489,000,34 ) { Location = 064, Fateful = true, Moves = new(145,352,151,428) }, // Phione
new(489,000,35 ) { Location = 064, Fateful = true, Moves = new(145,352,151,428) }, // Phione
new(489,000,36 ) { Location = 064, Fateful = true, Moves = new(145,352,151,428) }, // Phione
new(490,000,50,M,M) { Location = 064, FlawlessIVCount = 3, Fateful = true, Moves = new(352,428,585,145) }, // Manaphy
new(491,000,70,M,M) { Location = 010, FlawlessIVCount = 3, Fateful = true, Moves = new(506,399,094,464) }, // Darkrai
new(492,000,70,M,M) { Location = 026, FlawlessIVCount = 3, Fateful = true, Moves = new(403,412,414,465) }, // Shaymin
new(489,000,33 ) { Location = 064, FatefulEncounter = true, Moves = new(145,352,151,428) }, // Phione
new(489,000,34 ) { Location = 064, FatefulEncounter = true, Moves = new(145,352,151,428) }, // Phione
new(489,000,35 ) { Location = 064, FatefulEncounter = true, Moves = new(145,352,151,428) }, // Phione
new(489,000,36 ) { Location = 064, FatefulEncounter = true, Moves = new(145,352,151,428) }, // Phione
new(490,000,50,M,M) { Location = 064, FlawlessIVCount = 3, FatefulEncounter = true, Moves = new(352,428,585,145) }, // Manaphy
new(491,000,70,M,M) { Location = 010, FlawlessIVCount = 3, FatefulEncounter = true, Moves = new(506,399,094,464) }, // Darkrai
new(492,000,70,M,M) { Location = 026, FlawlessIVCount = 3, FatefulEncounter = true, Moves = new(403,412,414,465) }, // Shaymin
// Unown Notes
new(201,000,25,U) { Location = 040, Method = Fixed }, // Unown A
@ -91,7 +91,7 @@ internal static class Encounters8a
new(642,000,70,M,M) { Location = 059, FlawlessIVCount = 3, Moves = new(326,242,087,847) }, // Thundurus (Lunkers Lair)
new(642,000,70,M,M) { Location = 129, FlawlessIVCount = 3, Moves = new(326,242,087,847) }, // Thundurus (Sands Reach)
new(488,000,70,M,M) { Location = 010, FlawlessIVCount = 3, Moves = new(427,094,585,849) }, // Cresselia (Coronet Highlands)
new(491,000,70,M,M) { Location = 074, FlawlessIVCount = 3, Fateful = true, Moves = new(506,399,094,464) }, // Darkrai (Lonely Spring)
new(491,000,70,M,M) { Location = 074, FlawlessIVCount = 3, FatefulEncounter = true, Moves = new(506,399,094,464) }, // Darkrai (Lonely Spring)
// Static Encounters
new(046,000,50,M,M) { Location = 019, Method = Fixed }, // paras01: Paras

Some files were not shown because too many files have changed in this diff Show more