Update internal data sources for Crown Tundra

Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
Co-Authored-By: ReignOfComputer <2667537+ReignOfComputer@users.noreply.github.com>
This commit is contained in:
Kurt
2020-10-24 11:11:05 -07:00
parent 8a2a25fde1
commit 5fa4ddd4a2
5 changed files with 128 additions and 55 deletions

View File

@@ -71,15 +71,15 @@ private static IReadOnlyList<ComboItem> GetVersionList(GameStrings s)
{
var list = s.gamelist;
var ver = Util.GetCBList(list,
Legal.Games_8swsh,
Legal.Games_7gg,
Legal.Games_7usum, Legal.Games_7sm,
Legal.Games_6oras, Legal.Games_6xy,
Legal.Games_5, Legal.Games_4, Legal.Games_4e, Legal.Games_4r,
Legal.Games_3, Legal.Games_3e, Legal.Games_3r, Legal.Games_3s);
ver.AddRange(Util.GetCBList(list, Legal.Games_7vc2).OrderBy(g => g.Value)); // stuff to end unsorted
ver.AddRange(Util.GetCBList(list, Legal.Games_7vc1).OrderBy(g => g.Value)); // stuff to end unsorted
ver.AddRange(Util.GetCBList(list, Legal.Games_7go).OrderBy(g => g.Value)); // stuff to end unsorted
Games_8swsh,
Games_7gg,
Games_7usum, Games_7sm,
Games_6oras, Games_6xy,
Games_5, Games_4, Games_4e, Games_4r,
Games_3, Games_3e, Games_3r, Games_3s);
ver.AddRange(Util.GetCBList(list, Games_7vc2).OrderBy(g => g.Value)); // stuff to end unsorted
ver.AddRange(Util.GetCBList(list, Games_7vc1).OrderBy(g => g.Value)); // stuff to end unsorted
ver.AddRange(Util.GetCBList(list, Games_7go).OrderBy(g => g.Value)); // stuff to end unsorted
return ver;
}
@@ -315,5 +315,27 @@ public static IReadOnlyList<ComboItem> LanguageDataSource(int gen)
languages.RemoveAll(l => l.Value > (int)LanguageID.Korean);
return languages;
}
#region Games
private static readonly int[] Games_8swsh = { 44, 45 };
private static readonly int[] Games_7gg = { 42, 43 };
private static readonly int[] Games_7vc2 = { 39, 40, 41 }; // Gold, Silver, Crystal
private static readonly int[] Games_7vc1 = { 35, 36, 37, 38 }; // Red, Green, Blue, Yellow
private static readonly int[] Games_7go = { 34 };
private static readonly int[] Games_7usum = { 32, 33 };
private static readonly int[] Games_7sm = { 30, 31 };
private static readonly int[] Games_6xy = { 24, 25 };
private static readonly int[] Games_6oras = { 26, 27 };
private static readonly int[] Games_5 = { 20, 21, 22, 23 };
private static readonly int[] Games_4 = { 10, 11, };
private static readonly int[] Games_4e = { 12 };
private static readonly int[] Games_4r = { 7, 8 };
private static readonly int[] Games_3 = { 1, 2 };
private static readonly int[] Games_3e = { 3 };
private static readonly int[] Games_3r = { 4, 5 };
private static readonly int[] Games_3s = { 15 };
#endregion
}
}
}

View File

@@ -163,6 +163,10 @@ private void Sanitize()
SanitizeItemNames();
SanitizeMetLocations();
// De-duplicate the Calyrex ability names
abilitylist[(int)Core.Ability.AsOneI] += $" ({specieslist[(int)Core.Species.Glastrier]})";
abilitylist[(int)Core.Ability.AsOneG] += $" ({specieslist[(int)Core.Species.Spectrier]})";
// Replace the Egg Name with ---; egg name already stored to eggname
specieslist[0] = "---";
// Fix (None) tags
@@ -224,6 +228,10 @@ private void SanitizeItemNames()
itemlist[1585] += " (3)"; // Rotom Bike
itemlist[1586] += " (4)"; // Rotom Bike
itemlist[1590] += " (1)"; // Reins of Unity
itemlist[1591] += " (2)"; // Reins of Unity
itemlist[1607] += " (3)"; // Reins of Unity
for (int i = 12; i <= 29; i++) // Differentiate DNA Samples
g3coloitems[500 + i] += $" ({i - 11:00})";
// differentiate G3 Card Key from Colo
@@ -360,6 +368,9 @@ private void SanitizeMetG8SWSH()
for (int i = 165; i <= 195; i += 2)
metSWSH_00000_good[i] = string.Empty; // clear Wild Area sub-zone strings (trips duplicate Test)
for (int i = 205; i <= 235; i += 2)
metSWSH_00000_good[i] = string.Empty; // clear Wild Area sub-zone strings (trips duplicate Test)
metSWSH_00000_good.CopyTo(metSWSH_00000, 0);
metSWSH_30000[0] += $" ({NPC})"; // Anything from an NPC

View File

@@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.Linq;
namespace PKHeX.Core
{
@@ -14,8 +13,11 @@ public static partial class Legal
public static readonly int[] Gen4EncounterTypes = { 1, 2, 4, 5, 7, 9, 10, 12, 23, 24 };
public static readonly HashSet<int> LightBall = new HashSet<int> { 25, 26, 172 };
public static readonly int[] RotomMoves = { 0, 315, 056, 059, 403, 437 };
public static readonly int[] RotomMoves = { 315, 056, 059, 403, 437 };
/// <summary>
/// Species that can be captured normally in the wild and can change between their forms.
/// </summary>
public static readonly HashSet<int> WildChangeFormAfter = new HashSet<int>
{
412, // Burmy
@@ -24,6 +26,9 @@ public static partial class Legal
741, // Oricorio
};
/// <summary>
/// Species that can yield a different baby species when bred.
/// </summary>
public static readonly HashSet<int> SplitBreed = new HashSet<int>
{
// Incense
@@ -38,7 +43,11 @@ public static partial class Legal
358, // Chimecho
};
public static readonly HashSet<int> FormChange = new HashSet<int>(WildChangeFormAfter) // Pokémon that can change between all forms
/// <summary>
/// Species that can change between their forms, regardless of origin.
/// </summary>
/// <remarks>Excludes Zygarde as it has special conditions. Check separately.</remarks>
public static readonly HashSet<int> FormChange = new HashSet<int>(WildChangeFormAfter)
{
386, // Deoxys
487, // Giratina
@@ -53,8 +62,12 @@ public static partial class Legal
720, // Hoopa
773, // Silvally
800, // Necrozma
898, // Calyrex
};
/// <summary>
/// Species that can change between their forms and get access to form-specific moves.
/// </summary>
public static readonly HashSet<int> FormChangeMoves = new HashSet<int>
{
386, // Deoxys
@@ -63,6 +76,9 @@ public static partial class Legal
720, // Hoopa
};
/// <summary>
/// Species that are male only in Generation 6; for ball inheritance, these behave the same as Genderless species.
/// </summary>
public static readonly HashSet<int> BreedMaleOnly = new HashSet<int>
{
128, // Tauros
@@ -71,6 +87,9 @@ public static partial class Legal
538, 539, // Sawk & Throh
};
/// <summary>
/// Species that cannot hatch from an egg.
/// </summary>
public static readonly HashSet<int> NoHatchFromEgg = new HashSet<int>
{
132, // Ditto
@@ -176,6 +195,12 @@ public static partial class Legal
(int)Species.Kubfu,
(int)Species.Urshifu,
(int)Species.Zarude,
(int)Species.Regieleki,
(int)Species.Regidrago,
(int)Species.Glastrier,
(int)Species.Spectrier,
(int)Species.Calyrex,
};
/// <summary>
@@ -232,6 +257,9 @@ public static partial class Legal
809, // Melmetal
};
/// <summary>
/// Species that have an alternate form that cannot exist outside of battle.
/// </summary>
public static readonly HashSet<int> BattleForms = new HashSet<int>
{
351, // Castform
@@ -252,6 +280,9 @@ public static partial class Legal
(int)Species.Eternatus,
};
/// <summary>
/// Species that have a mega form that cannot exist outside of battle.
/// </summary>
public static readonly HashSet<int> BattleMegas = new HashSet<int>
{
// XY
@@ -273,6 +304,9 @@ public static partial class Legal
800, // Ultra Necrozma
};
/// <summary>
/// Species that have a primal form that cannot exist outside of battle.
/// </summary>
public static readonly HashSet<int> BattlePrimals = new HashSet<int> { 382, 383 };
public static readonly HashSet<int> Z_Moves = new HashSet<int>
@@ -283,22 +317,38 @@ public static partial class Legal
723, 724, 725, 726, 727, 728
};
internal static readonly int[] UnreleasedMoves = {617}; // Light of Ruin
internal static readonly int[] CantSketchMoves = {165, 448}; // Struggle & Chatter
internal static readonly HashSet<int> InvalidSketch = new HashSet<int>(CantSketchMoves.Concat(Z_Moves).Concat(UnreleasedMoves));
public static readonly HashSet<int> Legends = new HashSet<int>
/// <summary>
/// Moves that can not be obtained by using Sketch with Smeargle.
/// </summary>
internal static readonly HashSet<int> InvalidSketch = new HashSet<int>(Z_Moves)
{
(int)Species.Mew, (int)Species.Mewtwo,
(int)Species.Lugia, (int)Species.HoOh, (int)Species.Celebi,
(int)Species.Kyogre, (int)Species.Groudon, (int)Species.Rayquaza,(int)Species.Jirachi, (int)Species.Deoxys,
(int)Species.Dialga, (int)Species.Palkia, (int)Species.Giratina, (int)Species.Phione, (int)Species.Manaphy, (int)Species.Darkrai, (int)Species.Shaymin, (int)Species.Arceus, (int)Species.Victini,
(int)Species.Reshiram, (int)Species.Zekrom, (int)Species.Kyurem, (int)Species.Keldeo, (int)Species.Meloetta, (int)Species.Genesect,
(int)Species.Xerneas, (int)Species.Yveltal, (int)Species.Zygarde, (int)Species.Diancie, (int)Species.Hoopa,(int)Species.Volcanion,
(int)Species.Cosmog, (int)Species.Cosmoem, (int)Species.Solgaleo, (int)Species.Lunala,(int)Species.Necrozma, (int)Species.Magearna, (int)Species.Marshadow, (int)Species.Zeraora,
(int)Species.Meltan, (int)Species.Melmetal, (int)Species.Zacian, (int)Species.Zamazenta, (int)Species.Eternatus, (int)Species.Zarude,
// Can't Sketch
165, // Struggle
448, // Chatter
// Unreleased
617, // Light of Ruin
};
/// <summary>
/// Species classified as "Legend" by the game code.
/// </summary>
public static readonly HashSet<int> Legends = new HashSet<int>
{
(int)Species.Mewtwo, (int)Species.Mew,
(int)Species.Lugia, (int)Species.HoOh, (int)Species.Celebi,
(int)Species.Kyogre, (int)Species.Groudon, (int)Species.Rayquaza, (int)Species.Jirachi, (int)Species.Deoxys,
(int)Species.Dialga, (int)Species.Palkia, (int)Species.Giratina, (int)Species.Phione, (int)Species.Manaphy, (int)Species.Darkrai, (int)Species.Shaymin, (int)Species.Arceus,
(int)Species.Victini, (int)Species.Reshiram, (int)Species.Zekrom, (int)Species.Kyurem, (int)Species.Keldeo, (int)Species.Meloetta, (int)Species.Genesect,
(int)Species.Xerneas, (int)Species.Yveltal, (int)Species.Zygarde, (int)Species.Diancie, (int)Species.Hoopa, (int)Species.Volcanion,
(int)Species.Cosmog, (int)Species.Cosmoem, (int)Species.Solgaleo, (int)Species.Lunala, (int)Species.Necrozma, (int)Species.Magearna, (int)Species.Marshadow, (int)Species.Zeraora,
(int)Species.Meltan, (int)Species.Melmetal,
(int)Species.Zacian, (int)Species.Zamazenta, (int)Species.Eternatus, (int)Species.Zarude, (int)Species.Calyrex,
};
/// <summary>
/// Species classified as "SubLegend" by the game code.
/// </summary>
public static readonly HashSet<int> SubLegends = new HashSet<int>
{
(int)Species.Articuno, (int)Species.Zapdos, (int)Species.Moltres,
@@ -306,9 +356,10 @@ public static partial class Legal
(int)Species.Regirock, (int)Species.Regice, (int)Species.Registeel, (int)Species.Latias, (int)Species.Latios,
(int)Species.Uxie, (int)Species.Mesprit, (int)Species.Azelf, (int)Species.Heatran, (int)Species.Regigigas, (int)Species.Cresselia,
(int)Species.Cobalion, (int)Species.Terrakion, (int)Species.Virizion, (int)Species.Tornadus, (int)Species.Thundurus, (int)Species.Landorus,
(int)Species.TypeNull, (int)Species.Silvally, (int)Species.TapuBulu, (int)Species.TapuFini, (int)Species.TapuKoko, (int)Species.TapuLele, (int)Species.Nihilego,
(int)Species.Buzzwole, (int)Species.Pheromosa, (int)Species.Xurkitree, (int)Species.Celesteela, (int)Species.Kartana, (int)Species.Guzzlord, (int)Species.Poipole, (int)Species.Naganadel, (int)Species.Stakataka, (int)Species.Blacephalon,
(int)Species.Kubfu, (int)Species.Urshifu,
(int)Species.TypeNull, (int)Species.Silvally, (int)Species.TapuKoko, (int)Species.TapuLele, (int)Species.TapuBulu, (int)Species.TapuFini,
(int)Species.Nihilego, (int)Species.Buzzwole, (int)Species.Pheromosa, (int)Species.Xurkitree, (int)Species.Celesteela, (int)Species.Kartana, (int)Species.Guzzlord,
(int)Species.Poipole, (int)Species.Naganadel, (int)Species.Stakataka, (int)Species.Blacephalon,
(int)Species.Kubfu, (int)Species.Urshifu, (int)Species.Regieleki, (int)Species.Regidrago, (int)Species.Glastrier, (int)Species.Spectrier,
};
public static readonly ushort[] Arceus_Plate = {303, 306, 304, 305, 309, 308, 310, 313, 298, 299, 301, 300, 307, 302, 311, 312, 644};
@@ -462,27 +513,5 @@ public static partial class Legal
677, // Espurr
678, // Meowstic (M/F) forme specific
};
#region Games
public static readonly int[] Games_8swsh = { 44, 45 };
public static readonly int[] Games_7gg = { 42, 43 };
public static readonly int[] Games_7vc2 = { 39, 40, 41 }; // Gold, Silver, Crystal
public static readonly int[] Games_7vc1 = { 35, 36, 37, 38 }; // Red, Green, Blue, Yellow
public static readonly int[] Games_7go = { 34 };
public static readonly int[] Games_7usum = { 32, 33 };
public static readonly int[] Games_7sm = { 30, 31 };
public static readonly int[] Games_6xy = { 24, 25 };
public static readonly int[] Games_6oras = { 26, 27 };
public static readonly int[] Games_5 = { 20, 21, 22, 23 };
public static readonly int[] Games_4 = { 10, 11, };
public static readonly int[] Games_4e = { 12 };
public static readonly int[] Games_4r = { 7, 8 };
public static readonly int[] Games_3 = { 1, 2 };
public static readonly int[] Games_3e = { 3 };
public static readonly int[] Games_3r = { 4, 5 };
public static readonly int[] Games_3s = { 15 };
#endregion
}
}

View File

@@ -636,6 +636,14 @@ private static string[] GetFormsGen8(int species, IReadOnlyList<string> types, I
types[0], // Normal
forms[Dada],
};
case Calyrex:
return new[]
{
types[0], // Normal
forms[CalyIce],
forms[CalyGhost],
};
}
}
@@ -983,6 +991,8 @@ private static string[] GetFormsGalarSlowbro(IReadOnlyList<string> types, IReadO
private const int SingleStrike = 1086;
private const int RapidStrike = 1087;
private const int Dada = 1088;
private const int CalyIce = 1089; // Ice
private const int CalyGhost = 1090; // Shadow
public static string[] GetAlcremieFormList(IReadOnlyList<string> forms)
{

View File

@@ -20,9 +20,10 @@ public static class SaveUtil
public const int SIZE_G8SWSH_1 = 0x17195E; // 1.0 -> 1.1
public const int SIZE_G8SWSH_2 = 0x180B19; // 1.0 -> 1.1 -> 1.2
public const int SIZE_G8SWSH_2B = 0x180AD0; // 1.0 -> 1.2
public const int SIZE_G8SWSH_3 = -1; // 1.0 -> 1.1 -> 1.2 -> 1.3 todo
public const int SIZE_G8SWSH_3B = -2; // 1.0 -> 1.2 -> 1.3 todo
public const int SIZE_G8SWSH_3C = -3; // 1.0 -> 1.3 todo
public const int SIZE_G8SWSH_3 = 0x1876B1; // 1.0 -> 1.1 -> 1.2 -> 1.3
public const int SIZE_G8SWSH_3A = 0x187693; // 1.0 -> 1.1 -> 1.3
public const int SIZE_G8SWSH_3B = 0x187668; // 1.0 -> 1.2 -> 1.3
public const int SIZE_G8SWSH_3C = 0x18764A; // 1.0 -> 1.3
public const int SIZE_G7GG = 0x100000;
public const int SIZE_G7USUM = 0x6CC00;
@@ -65,7 +66,7 @@ public static class SaveUtil
internal static readonly HashSet<int> SizesSWSH = new HashSet<int>
{
SIZE_G8SWSH, SIZE_G8SWSH_1, SIZE_G8SWSH_2, SIZE_G8SWSH_2B, SIZE_G8SWSH_3, SIZE_G8SWSH_3B, SIZE_G8SWSH_3C,
SIZE_G8SWSH, SIZE_G8SWSH_1, SIZE_G8SWSH_2, SIZE_G8SWSH_2B, SIZE_G8SWSH_3, SIZE_G8SWSH_3A, SIZE_G8SWSH_3B, SIZE_G8SWSH_3C,
};
private static readonly HashSet<int> SizesGen2 = new HashSet<int>