Begin adding EncounterTrade

Fixed a few things in the EncounterStatic, added a few attributes
(antishiny, Gender, Ability, IV, Contest) for appropriate pkm
This commit is contained in:
Kaphotics 2016-03-16 23:29:28 -07:00
parent b0c4eb561d
commit 0fc4da3431
19 changed files with 583 additions and 10 deletions

View file

@ -193,6 +193,21 @@ namespace PKHeX
}
return null;
}
internal static EncounterTrade getIngameTrade(PK6 pk6)
{
int lang = pk6.Language;
if (lang == 0)
return null;
// Get valid pre-evolutions
IEnumerable<DexLevel> p = getValidPreEvolutions(pk6);
if (pk6.XY)
return lang == 6 ? null : TradeGift_XY.FirstOrDefault(f => p.Any(r => r.Species == f.Species));
if (pk6.AO)
return lang == 6 ? null : TradeGift_AO.FirstOrDefault(f => p.Any(r => r.Species == f.Species));
return null;
}
private static int getBaseSpecies(PK6 pk6, int skipOption = 0)
{
@ -339,8 +354,8 @@ namespace PKHeX
new EncounterStatic { Species = 4, Level = 10, Location = 22, Gift = true }, // Charmander
new EncounterStatic { Species = 7, Level = 10, Location = 22, Gift = true }, // Squirtle
new EncounterStatic { Species = 448, Level = 32, Location = 22, Ability = 1, Nature = Nature.Hasty, Gift = true }, // Lucario
new EncounterStatic { Species = 448, Level = 32, Location = 22, Ability = 1, Nature = Nature.Docile, Gift = true }, // Lapras
new EncounterStatic { Species = 448, Level = 32, Location = 60, Ability = 1, Nature = Nature.Hasty, Gender = 0, IVs = new[] {6, 25, 16, 31, 25, 19}, Gift = true, Shiny = false }, // Lucario
new EncounterStatic { Species = 131, Level = 32, Location = 62, Nature = Nature.Docile, IVs = new[] {31, 20, 20, 20, 20, 20}, Gift = true }, // Lapras
new EncounterStatic { Species = 143, Level = 15, Location = 38 }, // Snorlax
@ -372,17 +387,18 @@ namespace PKHeX
new EncounterStatic { Species = 498, Level = 5, Location = 204, Gift = true }, // Tepig
new EncounterStatic { Species = 501, Level = 5, Location = 204, Gift = true }, // Oshawott
new EncounterStatic { Species = 25, Level = 20, Location = 186, Gender = 1, Ability = 4, Gift = true }, // Pikachu
new EncounterStatic { Species = 360, Level = 1, EggLocation = 60004, Gift = true }, // Wynaut
new EncounterStatic { Species = 25, Level = 20, Location = 186, Gender = 1, Ability = 4, Form = 1, IVs = new[] {-1, -1, -1, 31, -1, -1}, Contest = new[] {70,70,70,70,70,0}, Gift = true, Shiny = false }, // Pikachu
new EncounterStatic { Species = 25, Level = 20, Location = 186, Gender = 1, Ability = 4, Form = 3, IVs = new[] {-1, -1, -1, 31, -1, -1}, Contest = new[] {70,70,70,70,70,0}, Gift = true, Shiny = false }, // Pikachu
new EncounterStatic { Species = 360, Level = 1, EggLocation = 60004, Ability = 1, Gift = true }, // Wynaut
new EncounterStatic { Species = 175, Level = 1, EggLocation = 60004, Ability = 1, Gift = true }, // Togepi
new EncounterStatic { Species = 374, Level = 1, Location = 196, Gift = true }, // Beldum
new EncounterStatic { Species = 374, Level = 1, Location = 196, Ability = 1, IVs = new[] {-1, -1, 31, -1, -1, 31}, Gift = true }, // Beldum
new EncounterStatic { Species = 351, Level = 30, Location = 240, Nature = Nature.Lax, Gift = true }, // Castform
new EncounterStatic { Species = 319, Level = 40, Location = 318, Ability = 1, Nature = Nature.Adamant, Gift = true }, // Sharpedo
new EncounterStatic { Species = 323, Level = 40, Location = 318, Ability = 1, Nature = Nature.Quiet, Gift = true }, // Camerupt
new EncounterStatic { Species = 351, Level = 30, Location = 240, Nature = Nature.Lax, Ability = 1, IVs = new[] {-1, -1, -1, -1, 31, -1}, Contest = new[] {0,100,0,0,0,0}, Gift = true }, // Castform
new EncounterStatic { Species = 319, Level = 40, Location = 318, Gender = 1, Ability = 1, Nature = Nature.Adamant, Gift = true }, // Sharpedo
new EncounterStatic { Species = 323, Level = 40, Location = 318, Gender = 1, Ability = 1, Nature = Nature.Quiet, Gift = true }, // Camerupt
new EncounterStatic { Species = 380, Level = 30, Location = 320, Version = GameVersion.AS, Gift = true }, // Latias
new EncounterStatic { Species = 381, Level = 30, Location = 320, Version = GameVersion.OR, Gift = true }, // Latios
new EncounterStatic { Species = 380, Level = 30, Location = 320, Version = GameVersion.AS, Ability = 1, Gift = true }, // Latias
new EncounterStatic { Species = 381, Level = 30, Location = 320, Version = GameVersion.OR, Ability = 1, Gift = true }, // Latios
new EncounterStatic { Species = 382, Level = 45, Location = 296, Version = GameVersion.AS, Shiny = false }, // Kyogre
new EncounterStatic { Species = 383, Level = 45, Location = 296, Version = GameVersion.OR, Shiny = false }, // Groudon
@ -450,5 +466,40 @@ namespace PKHeX
// else if (Game == GameVersion.AS || Game == GameVersion.OR)
return Encounter_AO.Where(s => s.Version == GameVersion.Any || s.Version == Game).ToArray();
}
private static readonly string[][] TradeXY =
{
new string[0], // 0 - None
Util.getStringList("tradexy", "ja"), // 1
Util.getStringList("tradexy", "en"), // 2
Util.getStringList("tradexy", "fr"), // 3
Util.getStringList("tradexy", "it"), // 4
Util.getStringList("tradexy", "de"), // 5
new string[0], // 6 - None
Util.getStringList("tradexy", "es"), // 7
Util.getStringList("tradexy", "ko"), // 8
};
private static readonly string[][] TradeAO =
{
new string[0], // 0 - None
Util.getStringList("tradeao", "ja"), // 1
Util.getStringList("tradeao", "en"), // 2
Util.getStringList("tradeao", "fr"), // 3
Util.getStringList("tradeao", "it"), // 4
Util.getStringList("tradeao", "de"), // 5
new string[0], // 6 - None
Util.getStringList("tradeao", "es"), // 7
Util.getStringList("tradeao", "ko"), // 8
};
#region Static Encounter/Gift Tables
private static readonly EncounterTrade[] TradeGift_XY =
{
new EncounterTrade { Species = 296, Ability = 2, Gender = 0, TID = 30724, Nature = Nature.Brave, },
};
private static readonly EncounterTrade[] TradeGift_AO =
{
new EncounterTrade { Species = 296, Ability = 2, Gender = 0, TID = 30724, Nature = Nature.Brave, },
};
#endregion
}
}

View file

@ -150,6 +150,24 @@ namespace PKHeX
public Nature Nature = Nature.Random;
public bool Gift = false;
public GameVersion Version = GameVersion.Any;
public int[] IVs = {-1, -1, -1, -1, -1, -1};
public int[] Contest = {0, 0, 0, 0, 0, 0};
}
public class EncounterTrade
{
public int Species;
public int Level;
public int Location = 30001;
public int Ability = 0;
public Nature Nature = Nature.Random;
public int TID;
public int SID = 0;
public int[] IVs = { -1, -1, -1, -1, -1, -1 };
public int[] Moves;
public int Form = 0;
public bool? Shiny = false;
public int Gender = -1;
}
public enum Nature
{

View file

@ -379,12 +379,26 @@
<None Include="Resources\img\warn.png" />
<None Include="Resources\img\valid.png" />
<Content Include="Resources\text\de\text_Pokeblock_de.txt" />
<None Include="Resources\text\de\text_tradeao_de.txt" />
<None Include="Resources\text\de\text_tradexy_de.txt" />
<Content Include="Resources\text\en\text_Pokeblock_en.txt" />
<None Include="Resources\text\en\text_tradeao_en.txt" />
<None Include="Resources\text\en\text_tradexy_en.txt" />
<Content Include="Resources\text\es\text_Pokeblock_es.txt" />
<None Include="Resources\text\es\text_tradeao_es.txt" />
<None Include="Resources\text\es\text_tradexy_es.txt" />
<Content Include="Resources\text\fr\text_Pokeblock_fr.txt" />
<None Include="Resources\text\fr\text_tradeao_fr.txt" />
<None Include="Resources\text\fr\text_tradexy_fr.txt" />
<Content Include="Resources\text\it\text_Pokeblock_it.txt" />
<None Include="Resources\text\it\text_tradeao_it.txt" />
<None Include="Resources\text\it\text_tradexy_it.txt" />
<Content Include="Resources\text\ja\text_Pokeblock_ja.txt" />
<None Include="Resources\text\ja\text_tradeao_ja.txt" />
<None Include="Resources\text\ja\text_tradexy_ja.txt" />
<Content Include="Resources\text\ko\text_Pokeblock_ko.txt" />
<None Include="Resources\text\ko\text_tradeao_ko.txt" />
<None Include="Resources\text\ko\text_tradexy_ko.txt" />
<Content Include="Resources\text\zh\text_Pokeblock_zh.txt" />
<None Include="Resources\text\it\lang_it.txt" />
<None Include="Resources\img\Pokemon Sprites\414-2.png" />

View file

@ -25699,6 +25699,286 @@ namespace PKHeX.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Makuhipsta
///Conec
///Coraso
///Maik
///Madina
///Liana.
/// </summary>
internal static string text_tradeao_de {
get {
return ResourceManager.GetString("text_tradeao_de", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Makit
///Skitit
///Coroso
///Darrell
///Elyssa
///Lane.
/// </summary>
internal static string text_tradeao_en {
get {
return ResourceManager.GetString("text_tradeao_en", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Makit
///Skitit
///Coroso
///Evelio
///Dalila
///Laila.
/// </summary>
internal static string text_tradeao_es {
get {
return ResourceManager.GetString("text_tradeao_es", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Edmond
///Minetou
///Rosie
///Allan
///Dorothée
///Marsantes.
/// </summary>
internal static string text_tradeao_fr {
get {
return ResourceManager.GetString("text_tradeao_fr", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Maku
///Pucci
///Corsolina
///Marchetto
///Ele
///Simo.
/// </summary>
internal static string text_tradeao_it {
get {
return ResourceManager.GetString("text_tradeao_it", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to ポテマル
///ベルベル
///モモちゃん
///モーリン
///ユキポン
///サトチン.
/// </summary>
internal static string text_tradeao_ja {
get {
return ResourceManager.GetString("text_tradeao_ja", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 감자군
///베르베르
///분홍이
///모린
///에이펀
///스태틴.
/// </summary>
internal static string text_tradeao_ko {
get {
return ResourceManager.GetString("text_tradeao_ko", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Karpiranha
///Ravioli
///Rentata
///Stadida
///Sharpo
///Frops
///Zackaroni
///Fayana
///Trasla
///Pompador
///Reichedel
///Olli
///Uno
///Henrike
///Sannah
///Sannah
///Sannah
///Diantha.
/// </summary>
internal static string text_tradexy_de {
get {
return ResourceManager.GetString("text_tradexy_de", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Carpe Diem
///Stevie
///Quacklin
///Thumper
///Pierce
///Froabble
///Chester
///Kinniekins
///Ralts
///Caveat
///Elena
///Cliff
///Farris
///Punky
///Shauna
///Shauna
///Shauna
///Diantha.
/// </summary>
internal static string text_tradexy_en {
get {
return ResourceManager.GetString("text_tradexy_en", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Karpirinha
///Fortunyet
///Sr.Puerró
///Titanix
///Sharpblade
///Froakikín
///Chespinete
///Fennechín
///Ralts
///Karpman
///Lupe
///Mr Poireau
///Ferrer
///Filo
///Xana
///Xana
///Xana
///Dianta.
/// </summary>
internal static string text_tradexy_es {
get {
return ResourceManager.GetString("text_tradexy_es", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Ouïe-Ouïe
///Décorum
///Insp. Magret
///Megascolide
///Voldinou
///Kermimi
///M. Pointu
///Mulder
///Tarsal
///Enid
///Heleina
///Henry
///Andreï
///Sophia
///Sannah
///Sannah
///Sannah
///Dianthéa.
/// </summary>
internal static string text_tradexy_fr {
get {
return ResourceManager.GetString("text_tradexy_fr", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Karkarp
///Ottolnarg
///Rosto
///Rock
///Ziffzaf
///Froaxy
///Chespy
///Fennekino
///Ralts
///Mr.Karp
///Helen
///Reinhold
///Accio
///Punkie
///Shana
///Shana
///Shana
///Diantha.
/// </summary>
internal static string text_tradexy_it {
get {
return ResourceManager.GetString("text_tradexy_it", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to こいこい
///アマヤル
///マー
///カッチ
///キール
///ゲコっち
///ハリぼん
///フォッぷ
///ラルトス
///カープ
///ヘレン
///ぐりお
///アイン
///パンク
///サナ
///サナ
///サナ
///カルネ.
/// </summary>
internal static string text_tradexy_ja {
get {
return ResourceManager.GetString("text_tradexy_ja", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 맞고
///달고나
///마
///카치
///절각
///개굴팅
///도치봉
///푸호뽀
///랄토스
///카프
///헬렌
///그리오
///아인
///펑크
///사나
///사나
///사나
///카르네.
/// </summary>
internal static string text_tradexy_ko {
get {
return ResourceManager.GetString("text_tradexy_ko", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to
///KP-Sack S

View file

@ -5779,4 +5779,46 @@
<data name="text_xy_60000_zh" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\text\zh\text_xy_60000_zh.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="text_tradeao_de" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\text\de\text_tradeao_de.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="text_tradeao_en" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\text\en\text_tradeao_en.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="text_tradeao_es" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\text\es\text_tradeao_es.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="text_tradeao_fr" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\text\fr\text_tradeao_fr.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="text_tradeao_it" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\text\it\text_tradeao_it.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="text_tradeao_ja" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\text\ja\text_tradeao_ja.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="text_tradeao_ko" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\text\ko\text_tradeao_ko.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="text_tradexy_de" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\text\de\text_tradexy_de.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="text_tradexy_en" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\text\en\text_tradexy_en.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="text_tradexy_es" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\text\es\text_tradexy_es.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="text_tradexy_fr" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\text\fr\text_tradexy_fr.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="text_tradexy_it" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\text\it\text_tradexy_it.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="text_tradexy_ja" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\text\ja\text_tradexy_ja.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="text_tradexy_ko" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\text\ko\text_tradexy_ko.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
</root>

View file

@ -0,0 +1,6 @@
Makuhipsta
Conec
Coraso
Maik
Madina
Liana

View file

@ -0,0 +1,18 @@
Karpiranha
Ravioli
Rentata
Stadida
Sharpo
Frops
Zackaroni
Fayana
Trasla
Pompador
Reichedel
Olli
Uno
Henrike
Sannah
Sannah
Sannah
Diantha

View file

@ -0,0 +1,6 @@
Makit
Skitit
Coroso
Darrell
Elyssa
Lane

View file

@ -0,0 +1,18 @@
Carpe Diem
Stevie
Quacklin
Thumper
Pierce
Froabble
Chester
Kinniekins
Ralts
Caveat
Elena
Cliff
Farris
Punky
Shauna
Shauna
Shauna
Diantha

View file

@ -0,0 +1,6 @@
Makit
Skitit
Coroso
Evelio
Dalila
Laila

View file

@ -0,0 +1,18 @@
Karpirinha
Fortunyet
Sr.Puerró
Titanix
Sharpblade
Froakikín
Chespinete
Fennechín
Ralts
Karpman
Lupe
Mr Poireau
Ferrer
Filo
Xana
Xana
Xana
Dianta

View file

@ -0,0 +1,6 @@
Edmond
Minetou
Rosie
Allan
Dorothée
Marsantes

View file

@ -0,0 +1,18 @@
Ouïe-Ouïe
Décorum
Insp. Magret
Megascolide
Voldinou
Kermimi
M. Pointu
Mulder
Tarsal
Enid
Heleina
Henry
Andreï
Sophia
Sannah
Sannah
Sannah
Dianthéa

View file

@ -0,0 +1,6 @@
Maku
Pucci
Corsolina
Marchetto
Ele
Simo

View file

@ -0,0 +1,18 @@
Karkarp
Ottolnarg
Rosto
Rock
Ziffzaf
Froaxy
Chespy
Fennekino
Ralts
Mr.Karp
Helen
Reinhold
Accio
Punkie
Shana
Shana
Shana
Diantha

View file

@ -0,0 +1,6 @@
ポテマル
ベルベル
モモちゃん
モーリン
ユキポン
サトチン

View file

@ -0,0 +1,18 @@
こいこい
アマヤル
マー
カッチ
キール
ゲコっち
ハリぼん
フォッぷ
ラルトス
カープ
ヘレン
ぐりお
アイン
パンク
サナ
サナ
サナ
カルネ

View file

@ -0,0 +1,6 @@
감자군
베르베르
분홍이
모린
에이펀
스태틴

View file

@ -0,0 +1,18 @@
맞고
달고나
카치
절각
개굴팅
도치봉
푸호뽀
랄토스
카프
헬렌
그리오
아인
펑크
사나
사나
사나
카르네