Initial Isle of Armor support

Co-Authored-By: sciresm <sciresm@users.noreply.github.com>
Co-Authored-By: Matt <sora10pls@users.noreply.github.com>
Co-Authored-By: Archit Date <architdate@gmail.com>
This commit is contained in:
Kurt 2020-06-19 18:51:15 -05:00
parent db30170cc5
commit 36dd5ece21
254 changed files with 4873 additions and 1896 deletions

View file

@ -141,7 +141,7 @@ namespace PKHeX.Core
if (pk.IsShiny)
return false;
if (pk.FatefulEncounter || type == Shiny.Random)
if (pk.FatefulEncounter || pk.Version == (int)GameVersion.GO || type == Shiny.Random)
{
pk.SetShiny();
return true;

View file

@ -634,7 +634,7 @@ namespace PKHeX.Core
private static string ConvertFormFromShowdown(string form, int spec, int ability)
{
if (form.Length == 0)
if (form.Length != 0)
form = form.Replace(' ', '-'); // inconsistencies are great
switch (spec)
@ -677,6 +677,10 @@ namespace PKHeX.Core
return "Galar Zen";
return form;
// Urshifu
case (int)Core.Species.Urshifu:
return form.Replace('-', ' ');
default:
if (Legal.Totem_USUM.Contains(spec) && form.EndsWith("Totem"))
return "Large";

View file

@ -264,6 +264,8 @@
NeutralizingGas,
PastelVeil,
HungerSwitch,
QuickDraw,
UnseenFist,
MAX_COUNT,
}
}

View file

@ -896,6 +896,9 @@
Zacian,
Zamazenta,
Eternatus,
Kubfu,
Urshifu,
Zarude,
MAX_COUNT,
}
}

View file

@ -212,6 +212,8 @@ namespace PKHeX.Core
itemlist[1081] += " (1)"; // Rotom Bike
itemlist[1266] += " (2)"; // Rotom Bike
itemlist[1585] += " (3)"; // Rotom Bike
itemlist[1586] += " (4)"; // Rotom Bike
for (int i = 12; i <= 29; i++) // Differentiate DNA Samples
g3coloitems[500 + i] += $" ({i - 11:00})";
@ -344,6 +346,9 @@ namespace PKHeX.Core
for (int i = 121; i <= 155; i+=2)
metSWSH_00000_good[i] = string.Empty; // clear Wild Area sub-zone strings (trips duplicate Test)
for (int i = 165; i <= 195; 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

@ -30,7 +30,7 @@ namespace PKHeX.Core
protected override IEnumerable<EncounterSlot> GetMatchFromEvoLevel(PKM pkm, IEnumerable<EvoCriteria> vs, int minLevel)
{
var loc = Location;
if (IsWildArea8(loc)) // wild area gets boosted up to level 60 post-game
if (IsWildArea8(loc) || IsWildArea8Armor(loc)) // wild area gets boosted up to level 60 post-game
{
const int boostTo = 60;
if (pkm.Met_Level == boostTo)
@ -59,6 +59,7 @@ namespace PKHeX.Core
protected override IEnumerable<EncounterSlot> GetFilteredSlots(PKM pkm, IEnumerable<EncounterSlot> slots, int minLevel) => slots;
public static bool IsWildArea8(int loc) => 122 <= loc && loc <= 154; // Rolling Fields -> Lake of Outrage
public static bool IsWildArea8Armor(int loc) => 164 <= loc && loc <= 194; // Fields of Honor -> Honeycalm Island
// Location, and areas that can feed encounters into it.
public static readonly IReadOnlyDictionary<int, IReadOnlyList<byte>> ConnectingArea8 = new Dictionary<int, IReadOnlyList<byte>>

View file

@ -6,6 +6,7 @@ using static PKHeX.Core.Shiny;
using static PKHeX.Core.GameVersion;
using static PKHeX.Core.Encounters8Nest;
using System.Linq;
namespace PKHeX.Core
{
@ -31,6 +32,8 @@ namespace PKHeX.Core
area.PermitCrossover = true;
foreach (var area in SlotsSH_Symbol)
area.PermitCrossover = true;
foreach (var t in TradeGift_R1)
t.TrainerNames = TradeOT_R1;
Encounter_SWSH.SetVersion(SWSH);
TradeGift_SWSH.SetVersion(SWSH);
@ -94,6 +97,25 @@ namespace PKHeX.Core
new EncounterGift8 { Gift = true, Species = 025, Shiny = Never, Level = 10, Location = 156, FlawlessIVCount = 6, CanGigantamax = true }, // Pikachu
new EncounterGift8 { Gift = true, Species = 133, Shiny = Never, Level = 10, Location = 156, FlawlessIVCount = 6, CanGigantamax = true }, // Eevee
// DLC gifts
new EncounterGift8 { Gift = true, Species = 001, Level = 05, Location = 196, Shiny = Never, Ability = 1, FlawlessIVCount = 3, CanGigantamax = true }, // Bulbasaur
new EncounterGift8 { Gift = true, Species = 007, Level = 05, Location = 196, Shiny = Never, Ability = 1, FlawlessIVCount = 3, CanGigantamax = true }, // Squirtle
new EncounterGift8 { Gift = true, Species = 137, Level = 25, Location = 196, Shiny = Never, Ability = 4, FlawlessIVCount = 3 }, // Porygon
new EncounterGift8 { Gift = true, Species = 891, Level = 10, Location = 196, Shiny = Never, FlawlessIVCount = 3 }, // Kubfu
new EncounterGift8 { Gift = true, Species = 026, Level = 30, Location = 164, Shiny = Never, FlawlessIVCount = 3, Form = 01 }, // Raichu-1
new EncounterGift8 { Gift = true, Species = 079, Level = 10, Location = 164, Shiny = Never, Ability = 4, FlawlessIVCount = 3 }, // Slowpoke
new EncounterGift8 { Gift = true, Species = 722, Level = 05, Location = 164, Shiny = Never, Ability = 4, FlawlessIVCount = 3 }, // Rowlet
new EncounterGift8 { Gift = true, Species = 725, Level = 05, Location = 164, Shiny = Never, Ability = 4, FlawlessIVCount = 3 }, // Litten
new EncounterGift8 { Gift = true, Species = 728, Level = 05, Location = 164, Shiny = Never, Ability = 4, FlawlessIVCount = 3 }, // Popplio
new EncounterGift8 { Gift = true, Species = 027, Level = 05, Location = 164, Shiny = Never, Ability = 4, FlawlessIVCount = 3, Form = 01 }, // Sandshrew-1
new EncounterGift8 { Gift = true, Species = 037, Level = 05, Location = 164, Shiny = Never, Ability = 4, FlawlessIVCount = 3, Form = 01 }, // Vulpix-1
new EncounterGift8 { Gift = true, Species = 052, Level = 05, Location = 164, Shiny = Never, Ability = 4, FlawlessIVCount = 3, Form = 01 }, // Meowth-1
new EncounterGift8 { Gift = true, Species = 103, Level = 30, Location = 164, Shiny = Never, Ability = 4, FlawlessIVCount = 3, Form = 01 }, // Exeggutor-1
new EncounterGift8 { Gift = true, Species = 105, Level = 30, Location = 164, Shiny = Never, Ability = 4, FlawlessIVCount = 3, Form = 01 }, // Marowak-1
new EncounterGift8 { Gift = true, Species = 050, Level = 20, Location = 164, Shiny = Never, Ability = 4, Gender = 0, Nature = Nature.Jolly, FlawlessIVCount = 6, Form = 01 }, // Diglett-1
#region Static Part 1
// encounters
new EncounterStatic { Species = 888, Level = 70, Location = 66, Moves = new[] {533,014,442,242}, Shiny = Never, Ability = 1, FlawlessIVCount = 3, Version = SW }, // Zacian
@ -341,15 +363,225 @@ namespace PKHeX.Core
new EncounterStatic8 { Species = 700, Level = 56, Location = 154, }, // Sylveon at the Lake of Outrage (in a Wild Area)
#endregion
// DLC
new EncounterStatic { Species = 079, Level = 12, Location = 016, Form = 01, Shiny = Never }, // Slowpoke-1 at Wedgehurst Station
#region R1 Static Encounters
new EncounterStatic { Species = 079, Level = 12, Location = 016, Form = 01, Shiny = Never }, // Slowpoke-1 at Wedgehurst Station
new EncounterStatic8 { Species = 748, Level = 20, Location = 164 }, // Toxapex in the Fields of Honor (on the Isle of Armor)
new EncounterStatic8 { Species = 099, Level = 20, Location = 164 }, // Kingler in the Fields of Honor (on the Isle of Armor)
new EncounterStatic8S{ Species = 834, Level = 20, Locations = new[] {164, 166} }, // Drednaw in the Fields of Honor, in the Soothing Wetlands (on the Isle of Armor)
new EncounterStatic8S{ Species = 687, Level = 26, Locations = new[] {164, 166} }, // Malamar in the Fields of Honor, in the Soothing Wetlands (on the Isle of Armor)
new EncounterStatic8S{ Species = 764, Level = 15, Locations = new[] {164, 166} }, // Comfey in the Fields of Honor, in the Soothing Wetlands (on the Isle of Armor)
new EncounterStatic8S{ Species = 404, Level = 20, Locations = new[] {164, 166} }, // Luxio in the Fields of Honor, in the Soothing Wetlands (on the Isle of Armor)
new EncounterStatic8S{ Species = 744, Level = 15, Locations = new[] {164, 166} }, // Rockruff in the Fields of Honor, in the Soothing Wetlands (on the Isle of Armor)
new EncounterStatic8 { Species = 195, Level = 20, Location = 166 }, // Quagsire in the Soothing Wetlands (on the Isle of Armor)
new EncounterStatic8S{ Species = 570, Level = 15, Locations = new[] {164, 166} }, // Zorua in the Fields of Honor, in the Soothing Wetlands (on the Isle of Armor)
new EncounterStatic8S{ Species = 040, Level = 27, Locations = new[] {164, 166} }, // Wigglytuff in the Fields of Honor, in the Soothing Wetlands (on the Isle of Armor)
new EncounterStatic8 { Species = 626, Level = 20, Location = 166 }, // Bouffalant in the Soothing Wetlands (on the Isle of Armor)
new EncounterStatic8 { Species = 242, Level = 22, Location = 166 }, // Blissey in the Soothing Wetlands (on the Isle of Armor)
new EncounterStatic8 { Species = 452, Level = 22, Location = 166 }, // Drapion in the Soothing Wetlands (on the Isle of Armor)
new EncounterStatic8 { Species = 463, Level = 27, Location = 166 }, // Lickilicky in the Soothing Wetlands (on the Isle of Armor)
new EncounterStatic8 { Species = 834, Level = 21, Location = -01 }, // Drednaw
new EncounterStatic8 { Species = 405, Level = 32, Location = 166 }, // Luxray in the Soothing Wetlands (on the Isle of Armor)
new EncounterStatic8 { Species = 121, Level = 20, Location = 164 }, // Starmie in the Fields of Honor (on the Isle of Armor)
new EncounterStatic8S{ Species = 428, Level = 22, Locations = new[] {164, 166} }, // Lopunny in the Fields of Honor, in the Soothing Wetlands (on the Isle of Armor)
new EncounterStatic8 { Species = 453, Level = 20, Location = 166 }, // Croagunk in the Soothing Wetlands (on the Isle of Armor)
new EncounterStatic8 { Species = 186, Level = 32, Location = 166 }, // Politoed in the Soothing Wetlands (on the Isle of Armor)
new EncounterStatic8 { Species = 061, Level = 20, Location = 166 }, // Poliwhirl in the Soothing Wetlands (on the Isle of Armor)
new EncounterStatic8S{ Species = 183, Level = 15, Locations = new[] {164, 166, 170} }, // Marill in the Fields of Honor, in the Soothing Wetlands, on Challenge Beach (on the Isle of Armor)
new EncounterStatic8S{ Species = 662, Level = 20, Locations = new[] {164, 166} }, // Fletchinder in the Fields of Honor, in the Soothing Wetlands (on the Isle of Armor)
new EncounterStatic8 { Species = 768, Level = 26, Location = -01 }, // Golisopod
new EncounterStatic8 { Species = 636, Level = 15, Location = 168 }, // Larvesta in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8 { Species = 549, Level = 22, Location = 166 }, // Lilligant in the Soothing Wetlands (on the Isle of Armor)
new EncounterStatic8 { Species = 025, Level = 22, Location = 168 }, // Pikachu in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8S{ Species = 064, Level = 20, Locations = new[] {164, 166} }, // Kadabra in the Fields of Honor, in the Soothing Wetlands (on the Isle of Armor)
new EncounterStatic8S{ Species = 026, Level = 26, Locations = new[] {166, 168} }, // Raichu in the Soothing Wetlands, in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8S{ Species = 025, Level = 15, Locations = new[] {164, 166} }, // Pikachu in the Fields of Honor, in the Soothing Wetlands (on the Isle of Armor)
new EncounterStatic8S{ Species = 184, Level = 21, Locations = new[] {166, 168} }, // Azumarill in the Soothing Wetlands, in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8 { Species = 559, Level = 20, Location = 166, Version = SW }, // Scraggy in the Soothing Wetlands (on the Isle of Armor)
new EncounterStatic8 { Species = 663, Level = 32, Location = 166 }, // Talonflame in the Soothing Wetlands (on the Isle of Armor)
new EncounterStatic8 { Species = 766, Level = 26, Location = 168, Version = SW }, // Passimian in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8 { Species = 765, Level = 26, Location = 168, Version = SH }, // Oranguru in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8 { Species = 342, Level = 26, Location = 168 }, // Crawdaunt in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8S{ Species = 754, Level = 27, Locations = new[] {168, 170} }, // Lurantis in the Forest of Focus, on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 040, Level = 26, Location = 168 }, // Wigglytuff in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8 { Species = 028, Level = 26, Location = 168 }, // Sandslash in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8 { Species = 545, Level = 32, Location = 168 }, // Scolipede in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8 { Species = 214, Level = 26, Location = 168, Version = SH }, // Heracross in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8 { Species = 704, Level = 20, Location = 168, Version = SH }, // Goomy in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8 { Species = 172, Level = 20, Location = 168 }, // Pichu in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8 { Species = 845, Level = 20, Location = 168 }, // Cramorant in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8 { Species = 465, Level = 36, Location = 168 }, // Tangrowth in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8 { Species = 589, Level = 32, Location = 168 }, // Escavalier in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8 { Species = 617, Level = 32, Location = 168 }, // Accelgor in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8 { Species = 591, Level = 26, Location = 168 }, // Amoonguss in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8 { Species = 764, Level = 22, Location = 168 }, // Comfey in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8 { Species = 570, Level = 22, Location = 168 }, // Zorua in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8 { Species = 104, Level = 20, Location = 168 }, // Cubone in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8S{ Species = 282, Level = 36, Locations = new[] {168, 180} }, // Gardevoir in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8 { Species = 127, Level = 26, Location = 168, Version = SW }, // Pinsir in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8 { Species = 055, Level = 26, Location = 168 }, // Golduck in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8 { Species = 462, Level = 36, Location = 170 }, // Magnezone on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 475, Level = 20, Location = -01 }, // Gallade
new EncounterStatic8 { Species = 625, Level = 20, Location = -01 }, // Bisharp
new EncounterStatic8 { Species = 082, Level = 27, Location = -01 }, // Magneton
new EncounterStatic8 { Species = 616, Level = 20, Location = 168, Version = SW }, // Shelmet in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8 { Species = 105, Level = 20, Location = -01 }, // Marowak
new EncounterStatic8 { Species = 637, Level = 42, Location = 170 }, // Volcarona on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 687, Level = 29, Location = 170 }, // Malamar on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 428, Level = 27, Location = 170 }, // Lopunny on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 452, Level = 27, Location = 170 }, // Drapion on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 026, Level = 29, Location = 170 }, // Raichu on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 558, Level = 20, Location = -01 }, // Crustle
new EncounterStatic8 { Species = 764, Level = 25, Location = 170 }, // Comfey on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 877, Level = 25, Location = 170 }, // Morpeko on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 834, Level = 26, Location = 170 }, // Drednaw on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 040, Level = 29, Location = 170 }, // Wigglytuff on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 528, Level = 27, Location = 170 }, // Swoobat on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 279, Level = 26, Location = 170 }, // Pelipper on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 082, Level = 26, Location = 170 }, // Magneton on Challenge Beach (on the Isle of Armor)
new EncounterStatic8S{ Species = 782, Level = 22, Locations = new[] {174, 180}, Version = SW }, // Jangmo-o on Challenge Road, in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 426, Level = 26, Location = 170 }, // Drifblim on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 768, Level = 36, Location = 170 }, // Golisopod on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 662, Level = 26, Location = 170 }, // Fletchinder on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 342, Level = 27, Location = 170 }, // Crawdaunt on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 184, Level = 27, Location = 170 }, // Azumarill on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 549, Level = 26, Location = 170 }, // Lilligant on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 845, Level = 24, Location = 170 }, // Cramorant on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 055, Level = 27, Location = 170, Ability = 2 }, // Golduck on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 702, Level = 25, Location = 170 }, // Dedenne on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 113, Level = 27, Location = -01 }, // Chansey
new EncounterStatic8 { Species = 405, Level = 36, Location = 170 }, // Luxray on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 099, Level = 26, Location = 170 }, // Kingler on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 121, Level = 26, Location = 170 }, // Starmie on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 748, Level = 26, Location = 170 }, // Toxapex on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 062, Level = 36, Location = 172 }, // Poliwrath in Brawlers Cave (on the Isle of Armor)
new EncounterStatic8 { Species = 294, Level = 26, Location = 172 }, // Loudred in Brawlers Cave (on the Isle of Armor)
new EncounterStatic8 { Species = 528, Level = 26, Location = 172 }, // Swoobat in Brawlers Cave (on the Isle of Armor)
new EncounterStatic8 { Species = 621, Level = 36, Location = 172 }, // Druddigon in Brawlers Cave (on the Isle of Armor)
new EncounterStatic8 { Species = 055, Level = 26, Location = 172 }, // Golduck in Brawlers Cave (on the Isle of Armor)
new EncounterStatic8 { Species = 526, Level = 42, Location = 172 }, // Gigalith in Brawlers Cave (on the Isle of Armor)
new EncounterStatic8 { Species = 620, Level = 28, Location = 174 }, // Mienshao on Challenge Road (on the Isle of Armor)
new EncounterStatic8 { Species = 625, Level = 36, Location = 174 }, // Bisharp on Challenge Road (on the Isle of Armor)
new EncounterStatic8S{ Species = 454, Level = 26, Locations = new[] {174, 180}, Version = SH }, // Toxicroak on Challenge Road (on the Isle of Armor)
new EncounterStatic8S{ Species = 560, Level = 26, Locations = new[] {174, 180}, Version = SW }, // Scrafty on Challenge Road, in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 758, Level = 28, Location = 174, Gender = 1 }, // Salazzle on Challenge Road (on the Isle of Armor)
new EncounterStatic8S{ Species = 558, Level = 26, Locations = new[] {174, 180} }, // Crustle on Challenge Road, in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 475, Level = 32, Location = 174 }, // Gallade on Challenge Road (on the Isle of Armor)
new EncounterStatic8 { Species = 745, Level = 32, Location = 174 }, // Lycanroc on Challenge Road (on the Isle of Armor)
new EncounterStatic8 { Species = 745, Level = 32, Location = 174, Form = 01 }, // Lycanroc-1 on Challenge Road (on the Isle of Armor)
new EncounterStatic8 { Species = 212, Level = 40, Location = 174 }, // Scizor on Challenge Road (on the Isle of Armor)
new EncounterStatic8 { Species = 214, Level = 26, Location = 174, Version = SH }, // Heracross on Challenge Road (on the Isle of Armor)
new EncounterStatic8 { Species = 744, Level = 22, Location = 174 }, // Rockruff on Challenge Road (on the Isle of Armor)
new EncounterStatic8 { Species = 127, Level = 26, Location = 174, Version = SW }, // Pinsir on Challenge Road (on the Isle of Armor)
new EncounterStatic8 { Species = 227, Level = 26, Location = 174 }, // Skarmory on Challenge Road (on the Isle of Armor)
new EncounterStatic8 { Species = 426, Level = 26, Location = 174 }, // Drifblim on Challenge Road (on the Isle of Armor)
new EncounterStatic8 { Species = 630, Level = 26, Location = 174, Version = SH }, // Mandibuzz on Challenge Road (on the Isle of Armor)
new EncounterStatic8 { Species = 628, Level = 26, Location = 174, Version = SW }, // Braviary on Challenge Road (on the Isle of Armor)
new EncounterStatic8 { Species = 082, Level = 26, Location = 174 }, // Magneton on Challenge Road (on the Isle of Armor)
new EncounterStatic8 { Species = 558, Level = 28, Location = 176 }, // Crustle in Courageous Cavern (on the Isle of Armor)
new EncounterStatic8 { Species = 526, Level = 42, Location = -01 }, // Gigalith
new EncounterStatic8 { Species = 768, Level = 32, Location = 176 }, // Golisopod in Courageous Cavern (on the Isle of Armor)
new EncounterStatic8 { Species = 528, Level = 28, Location = 176 }, // Swoobat in Courageous Cavern (on the Isle of Armor)
new EncounterStatic8 { Species = 834, Level = 28, Location = 176 }, // Drednaw in Courageous Cavern (on the Isle of Armor)
new EncounterStatic8 { Species = 113, Level = 30, Location = -01 }, // Chansey
new EncounterStatic8 { Species = 687, Level = 32, Location = 178 }, // Malamar in Loop Lagoon (on the Isle of Armor)
new EncounterStatic8 { Species = 040, Level = 32, Location = 178 }, // Wigglytuff in Loop Lagoon (on the Isle of Armor)
new EncounterStatic8 { Species = 768, Level = 32, Location = -01 }, // Golisopod
new EncounterStatic8 { Species = 404, Level = 30, Location = 178 }, // Luxio in Loop Lagoon (on the Isle of Armor)
new EncounterStatic8 { Species = 834, Level = 30, Location = 178 }, // Drednaw in Loop Lagoon (on the Isle of Armor)
new EncounterStatic8 { Species = 558, Level = 30, Location = -01 }, // Crustle
new EncounterStatic8 { Species = 871, Level = 22, Location = 178 }, // Pincurchin in Loop Lagoon (on the Isle of Armor)
new EncounterStatic8 { Species = 748, Level = 26, Location = 178 }, // Toxapex in Loop Lagoon (on the Isle of Armor)
new EncounterStatic8 { Species = 853, Level = 32, Location = 178 }, // Grapploct in Loop Lagoon (on the Isle of Armor)
new EncounterStatic8 { Species = 770, Level = 32, Location = 178 }, // Palossand in Loop Lagoon (on the Isle of Armor)
new EncounterStatic8 { Species = 065, Level = 50, Location = 178 }, // Alakazam in Loop Lagoon (on the Isle of Armor)
new EncounterStatic8 { Species = 571, Level = 50, Location = 178 }, // Zoroark in Loop Lagoon (on the Isle of Armor)
new EncounterStatic8 { Species = 462, Level = 50, Location = 178 }, // Magnezone in Loop Lagoon (on the Isle of Armor)
new EncounterStatic8 { Species = 744, Level = 40, Location = 178 }, // Rockruff in Loop Lagoon (on the Isle of Armor)
new EncounterStatic8 { Species = 636, Level = 40, Location = 178 }, // Larvesta in Loop Lagoon (on the Isle of Armor)
new EncounterStatic8 { Species = 279, Level = 42, Location = 178 }, // Pelipper in Loop Lagoon (on the Isle of Armor)
new EncounterStatic8 { Species = 405, Level = 50, Location = 178 }, // Luxray in Loop Lagoon (on the Isle of Armor)
new EncounterStatic8 { Species = 663, Level = 50, Location = 178 }, // Talonflame in Loop Lagoon (on the Isle of Armor)
new EncounterStatic8 { Species = 508, Level = 42, Location = 180 }, // Stoutland in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 625, Level = 36, Location = 180 }, // Bisharp in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 405, Level = 36, Location = 180 }, // Luxray in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 663, Level = 36, Location = 180 }, // Talonflame in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 040, Level = 30, Location = 180 }, // Wigglytuff in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 099, Level = 28, Location = 180 }, // Kingler in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 115, Level = 32, Location = 180 }, // Kangaskhan in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 123, Level = 28, Location = 180 }, // Scyther in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 404, Level = 28, Location = 180 }, // Luxio in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 764, Level = 28, Location = 180 }, // Comfey in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 452, Level = 28, Location = 180 }, // Drapion in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 279, Level = 28, Location = -01 }, // Pelipper
new EncounterStatic8 { Species = 127, Level = 28, Location = 180 }, // Pinsir in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 528, Level = 28, Location = 180 }, // Swoobat in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 241, Level = 28, Location = 180 }, // Miltank in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 082, Level = 28, Location = 180 }, // Magneton in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 662, Level = 28, Location = 180 }, // Fletchinder in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 128, Level = 28, Location = 180 }, // Tauros in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 687, Level = 28, Location = 180 }, // Malamar in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 214, Level = 28, Location = 180 }, // Heracross in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 507, Level = 28, Location = 180 }, // Herdier in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 549, Level = 28, Location = 180 }, // Lilligant in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 426, Level = 28, Location = 180 }, // Drifblim in the Training Lowlands (on the Isle of Armor
new EncounterStatic8 { Species = 055, Level = 26, Location = 180 }, // Golduck in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 184, Level = 26, Location = 180 }, // Azumarill in the Training Lowlands (on the Isle of Armor
new EncounterStatic8 { Species = 617, Level = 36, Location = 180 }, // Accelgor in the Training Lowlands (on the Isle of Armor
new EncounterStatic8 { Species = 212, Level = 42, Location = 180 }, // Scizor in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 589, Level = 36, Location = 180 }, // Escavalier in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 616, Level = 26, Location = 180 }, // Shelmet in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 588, Level = 26, Location = 180 }, // Karrablast in the Training Lowlands (on the Isle of Armor)
new EncounterStatic8 { Species = 553, Level = 50, Location = 184 }, // Krookodile in the Potbottom Desert (on the Isle of Armor)
new EncounterStatic8 { Species = 464, Level = 50, Location = 184 }, // Rhyperior in the Potbottom Desert (on the Isle of Armor)
new EncounterStatic8 { Species = 105, Level = 42, Location = 184 }, // Marowak in the Potbottom Desert (on the Isle of Armor)
new EncounterStatic8 { Species = 552, Level = 42, Location = 184 }, // Krokorok in the Potbottom Desert (on the Isle of Armor)
new EncounterStatic8 { Species = 112, Level = 42, Location = 184 }, // Rhydon in the Potbottom Desert (on the Isle of Armor)
new EncounterStatic8 { Species = 324, Level = 42, Location = 184 }, // Torkoal in the Potbottom Desert (on the Isle of Armor)
new EncounterStatic8 { Species = 844, Level = 42, Location = 184 }, // Sandaconda in the Potbottom Desert (on the Isle of Armor)
new EncounterStatic8 { Species = 637, Level = 50, Location = -01 }, // Volcarona
new EncounterStatic8 { Species = 628, Level = 42, Location = 184, Version = SW }, // Braviary in the Potbottom Desert (on the Isle of Armor)
new EncounterStatic8 { Species = 630, Level = 42, Location = 184, Version = SH }, // Mandibuzz in the Potbottom Desert (on the Isle of Armor)
new EncounterStatic8 { Species = 103, Level = 50, Location = 190 }, // Exeggutor in the Insular Sea (on the Isle of Armor)
// new EncounterStatic8 { Species = 132, Level = 50, Location = 186, FlawlessIVCount = 3 }, // Ditto in the Workout Sea (on the Isle of Armor) -- collision with wild Ditto in the same area
new EncounterStatic8 { Species = 242, Level = 50, Location = -01 }, // Blissey
new EncounterStatic8 { Species = 571, Level = 50, Location = 190 }, // Zoroark in the Insular Sea (on the Isle of Armor)
new EncounterStatic8 { Species = 462, Level = 50, Location = 190 }, // Magnezone in the Insular Sea (on the Isle of Armor)
new EncounterStatic8 { Species = 637, Level = 50, Location = 190 }, // Volcarona in the Insular Sea (on the Isle of Armor)
new EncounterStatic8 { Species = 279, Level = 45, Location = 190 }, // Pelipper in the Insular Sea (on the Isle of Armor)
new EncounterStatic8 { Species = 549, Level = 45, Location = 194 }, // Lilligant on Honeycalm Island (on the Isle of Armor)
new EncounterStatic8 { Species = 415, Level = 40, Location = 194 }, // Combee on Honeycalm Island (on the Isle of Armor)
new EncounterStatic8 { Species = 028, Level = 42, Location = 184 }, // Sandslash in the Potbottom Desert (on the Isle of Armor)
new EncounterStatic8 { Species = 587, Level = 20, Location = 168 }, // Emolga in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8 { Species = 847, Level = 42, Location = 170 }, // Barraskewda on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 224, Level = 45, Location = 170 }, // Octillery on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 171, Level = 42, Location = 170 }, // Lanturn on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 593, Level = 42, Location = 170 }, // Jellicent on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 091, Level = 42, Location = 170 }, // Cloyster on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 130, Level = 50, Location = 170 }, // Gyarados on Challenge Beach (on the Isle of Armor)
new EncounterStatic8 { Species = 073, Level = 42, Location = 176 }, // Tentacruel in Courageous Cavern (on the Isle of Armor)
new EncounterStatic8S{ Species = 340, Level = 42, Locations = new[] {172, 176} }, // Whiscash in Brawlers Cave, in Courageous Cavern (on the Isle of Armor)
new EncounterStatic8 { Species = 342, Level = 42, Location = 180 }, // Crawdaunt in the Training Lowlands (on the Isle of Armor)
// new EncounterStatic8 { Species = 479, Level = 50, Location = 186, FlawlessIVCount = 3 }, // Rotom in the Workout Sea (on the Isle of Armor) -- collision with subsequent static Rotom
new EncounterStatic8 { Species = 479, Level = 50, Location = 186, Moves = new[] {315,435,506,268}, Form = 01 }, // Rotom-1 in the Workout Sea (on the Isle of Armor)
new EncounterStatic8 { Species = 479, Level = 50, Location = 186, Moves = new[] {056,435,506,268}, Form = 02 }, // Rotom-2 in the Workout Sea (on the Isle of Armor)
new EncounterStatic8 { Species = 479, Level = 50, Location = 186, Moves = new[] {059,435,506,268}, Form = 03 }, // Rotom-3 in the Workout Sea (on the Isle of Armor)
new EncounterStatic8 { Species = 479, Level = 50, Location = 186, Moves = new[] {403,435,506,268}, Form = 04 }, // Rotom-4 in the Workout Sea (on the Isle of Armor)
new EncounterStatic8 { Species = 479, Level = 50, Location = 186, Moves = new[] {437,435,506,268}, Form = 05 }, // Rotom-5 in the Workout Sea (on the Isle of Armor)
new EncounterStatic8 { Species = 230, Level = 60, Location = 192 }, // Kingdra in the Honeycalm Sea (on the Isle of Armor)
new EncounterStatic8 { Species = 117, Level = 45, Location = 192 }, // Seadra in the Honeycalm Sea (on the Isle of Armor)
new EncounterStatic8 { Species = 321, Level = 80, Location = 186 }, // Wailord in the Workout Sea (on the Isle of Armor)
new EncounterStatic8 { Species = 039, Level = 20, Location = 168 }, // Jigglypuff in the Forest of Focus (on the Isle of Armor)
new EncounterStatic8 { Species = 764, Level = 50, Location = 190 }, // Comfey in the Insular Sea (on the Isle of Armor)
new EncounterStatic8 { Species = 621, Level = 42, Location = 176 }, // Druddigon in Courageous Cavern (on the Isle of Armor)
#endregion
};
private const string tradeSWSH = "tradeswsh";
private static readonly string[][] TradeSWSH = Util.GetLanguageStrings10(tradeSWSH, "zh2");
private static readonly string[] TradeOT_R1 = { string.Empty, "チホコ", "Regina", "Régiona", "Regionalia", "Regine", string.Empty, "Tatiana", "지민", "易蒂" };
private static readonly int[] TradeIVs = {15, 15, 15, 15, 15, 15};
internal static readonly EncounterTrade8[] TradeGift_SWSH =
internal static readonly EncounterTrade8[] TradeGift_Regular =
{
new EncounterTrade8(052,18,08,000,04,5) { Ability = 2, TID7 = 263455, IVs = TradeIVs, DynamaxLevel = 1, OTGender = 0, Gender = 0, Nature = Nature.Timid, Relearn = new[] {387,000,000,000} }, // Meowth
new EncounterTrade8(819,10,01,044,01,2) { Ability = 1, TID7 = 648753, IVs = TradeIVs, DynamaxLevel = 1, OTGender = 1, Gender = 0, Nature = Nature.Mild, }, // Skwovet
@ -363,5 +595,22 @@ namespace PKHeX.Core
new EncounterTrade8(122,40,56,000,12,4) { Ability = 1, TID7 = 891846, IVs = TradeIVs, DynamaxLevel = 1, OTGender = 0, Gender = 0, Nature = Nature.Calm, }, // Mr. Mime
new EncounterTrade8(884,50,15,038,06,2) { Ability = 2, TID7 = 101141, IVs = TradeIVs, DynamaxLevel = 3, OTGender = 0, Gender = 0, Nature = Nature.Adamant, Relearn = new[] {400,000,000,000} }, // Duraludon
};
internal static readonly EncounterTrade[] TradeGift_R1 =
{
new EncounterTrade8(052,15,01,033,04,2) { Ability = 4, TID7 = 101141, FlawlessIVCount = 3, DynamaxLevel = 5, OTGender = 1, Shiny = Shiny.Random, IsNicknamed = false, Relearn = new[] {387,000,000,000} }, // Meowth
new EncounterTrade8(083,15,01,013,10,2) { Ability = 4, TID7 = 101141, FlawlessIVCount = 3, DynamaxLevel = 5, OTGender = 1, Shiny = Shiny.Random, IsNicknamed = false, Relearn = new[] {098,000,000,000} }, // Farfetchd
new EncounterTrade8(222,15,01,069,12,2) { Ability = 4, TID7 = 101141, FlawlessIVCount = 3, DynamaxLevel = 5, OTGender = 1, Shiny = Shiny.Random, IsNicknamed = false, Relearn = new[] {457,000,000,000} }, // Corsola
new EncounterTrade8(077,15,01,047,06,2) { Ability = 4, TID7 = 101141, FlawlessIVCount = 3, DynamaxLevel = 5, OTGender = 1, Shiny = Shiny.Random, IsNicknamed = false, Relearn = new[] {234,000,000,000} }, // Ponyta
new EncounterTrade8(122,15,01,005,04,2) { Ability = 4, TID7 = 101141, FlawlessIVCount = 3, DynamaxLevel = 5, OTGender = 1, Shiny = Shiny.Random, IsNicknamed = false, Relearn = new[] {252,000,000,000} }, // Mr. Mime
new EncounterTrade8(554,15,01,040,12,2) { Ability = 4, TID7 = 101141, FlawlessIVCount = 3, DynamaxLevel = 5, OTGender = 1, Shiny = Shiny.Random, IsNicknamed = false, Relearn = new[] {326,000,000,000} }, // Darumaka
new EncounterTrade8(263,15,01,045,04,2) { Ability = 4, TID7 = 101141, FlawlessIVCount = 3, DynamaxLevel = 5, OTGender = 1, Shiny = Shiny.Random, IsNicknamed = false, Relearn = new[] {245,000,000,000} }, // Zigzagoon
new EncounterTrade8(618,15,01,050,05,2) { Ability = 4, TID7 = 101141, FlawlessIVCount = 3, DynamaxLevel = 5, OTGender = 1, Shiny = Shiny.Random, IsNicknamed = false, Relearn = new[] {281,000,000,000} }, // Stunfisk
new EncounterTrade8(110,15,01,040,12,2) { Ability = 4, TID7 = 101141, FlawlessIVCount = 3, DynamaxLevel = 5, OTGender = 1, Shiny = Shiny.Random, IsNicknamed = false, Relearn = new[] {220,000,000,000} }, // Weezing (todo: verify HA is the only used ingame trade; if not, change Ability = -1)
new EncounterTrade8(103,15,01,038,06,2) { TID7 = 101141, FlawlessIVCount = 3, DynamaxLevel = 5, OTGender = 1, Shiny = Shiny.Random, IsNicknamed = false, Relearn = new[] {246,000,000,000}, Form = 1}, // Exeggutor-1
new EncounterTrade8(105,15,01,038,06,2) { TID7 = 101141, FlawlessIVCount = 3, DynamaxLevel = 5, OTGender = 1, Shiny = Shiny.Random, IsNicknamed = false, Relearn = new[] {174,000,000,000}, Form = 1 }, // Marowak-1
};
internal static readonly EncounterTrade[] TradeGift_SWSH = TradeGift_Regular.Concat(TradeGift_R1).ToArray();
}
}

File diff suppressed because it is too large Load diff

View file

@ -6,7 +6,7 @@
{
if (lvl == Level)
return true;
if (EncounterArea8.IsWildArea8(Location))
if (EncounterArea8.IsWildArea8(Location) || EncounterArea8.IsWildArea8Armor(Location))
return lvl == 60;
return false;
}

View file

@ -26,6 +26,7 @@ namespace PKHeX.Core
public int SID { get; set; }
public GameVersion Version { get; set; } = GameVersion.Any;
public IReadOnlyList<int> IVs { get; set; } = Array.Empty<int>();
public int FlawlessIVCount { get; set; }
public int Form { get; set; }
public virtual Shiny Shiny { get; set; } = Shiny.Never;
public int Gender { get; set; } = -1;

View file

@ -28,6 +28,8 @@ namespace PKHeX.Core
{
if (pkm is IDynamaxLevel d && d.DynamaxLevel < DynamaxLevel)
return false;
if (pkm.FlawlessIVCount < FlawlessIVCount)
return false;
return base.IsMatch(pkm, lvl);
}

View file

@ -247,12 +247,25 @@ namespace PKHeX.Core
bool AllParsed() => res.All(z => z != null);
var required = pkm.Format != 1 ? 1 : GBRestrictions.GetRequiredMoveCount(pkm, source.CurrentMoves, info, source.Base);
// Special considerations!
int reset = 0;
if (pkm is IBattleVersion v && v.BattleVersion != 0)
{
reset = ((GameVersion) v.BattleVersion).GetGeneration();
source.EggEventSource = Array.Empty<int>();
source.Base = Array.Empty<int>();
source.EggLevelUpSource = Array.Empty<int>();
source.EggMoveSource = Array.Empty<int>();
source.NonTradeBackLevelUpMoves = Array.Empty<int>();
source.SpecialSource = Array.Empty<int>();
}
// Check empty moves and relearn moves before generation specific moves
for (int m = 0; m < 4; m++)
{
if (source.CurrentMoves[m] == 0)
res[m] = new CheckMoveResult(None, pkm.Format, m < required ? Fishy : Valid, LMoveSourceEmpty, Move);
else if (info.EncounterMoves.Relearn.Contains(source.CurrentMoves[m]))
else if (reset == 0 && info.EncounterMoves.Relearn.Contains(source.CurrentMoves[m]))
res[m] = new CheckMoveResult(Relearn, info.Generation, Valid, LMoveSourceRelearn, Move) { Flag = true };
}
@ -265,6 +278,8 @@ namespace PKHeX.Core
int[] generations = GetGenMovesCheckOrder(pkm);
if (pkm.Format <= 2)
generations = generations.Where(z => z < info.EncounterMoves.LevelUpMoves.Length).ToArray();
if (reset != 0)
generations = generations.Where(z => z >= reset).ToArray();
int lastgen = generations.LastOrDefault();
foreach (var gen in generations)

View file

@ -15,7 +15,7 @@ namespace PKHeX.Core
public static CheckResult[] VerifyRelearn(PKM pkm, LegalInfo info)
{
if (info.Generation < 6)
if (info.Generation < 6 || pkm is IBattleVersion v && v.BattleVersion != 0)
return VerifyRelearnNone(pkm, info);
return info.EncounterMatch switch

View file

@ -77,6 +77,8 @@ namespace PKHeX.Core
case Crit3:
case HPDownBy49:
case SpinType:
case TowerOfDarkness:
case TowerOfWaters:
return true;
case UseItemMale:
return pkm.Gender == 0;

View file

@ -170,6 +170,8 @@ namespace PKHeX.Core
BanEvo((int)Species.Raichu, 1, pkm => (pkm is IGigantamax g && g.CanGigantamax) || pkm.Gen8 || pkm.GG);
BanEvo((int)Species.Persian, 0, pkm => pkm is IGigantamax g && g.CanGigantamax);
BanEvo((int)Species.Exeggutor, 1, pkm => pkm.Gen8);
BanEvo((int)Species.Marowak, 1, pkm => pkm.Gen8);
BanEvo((int)Species.Weezing, 0, pkm => pkm.Gen8);
BanEvo((int)Species.MrMime, 0, pkm => pkm.Gen8);

View file

@ -52,6 +52,8 @@ namespace PKHeX.Core
SpinType, // Alcremie
LevelUpNatureAmped, // Toxtricity
LevelUpNatureLowKey, // Toxtricity
TowerOfDarkness, // Urshifu
TowerOfWaters, // Urshifu
}
public static class EvolutionTypeExtensions

View file

@ -412,6 +412,8 @@ namespace PKHeX.Core
public static string LStatIncorrectWeight { get; set; } = "Calculated Weight does not match stored value.";
public static string LStatIncorrectCP { get; set; } = "Calculated CP does not match stored value.";
public static string LStatGigantamaxInvalid { get; set; } = "Gigantamax Flag mismatch.";
public static string LStatNatureInvalid { get; set; } = "Stat Nature is not within the expected range";
public static string LStatBattleVersionInvalid { get; set; } = "Battle Version is not within the expected range";
public static string LSuperComplete { get; set; } = "Super Training complete flag mismatch.";
public static string LSuperDistro { get; set; } = "Distribution Super Training missions are not released.";

View file

@ -181,6 +181,12 @@ namespace PKHeX.Core
if (arr[i] == move && pi.TypeTutors[i])
return GameVersion.Gen8;
}
var tutors = Tutors_SWSH_1;
for (int i = 0; i < tutors.Length; i++)
{
if (tutors[i] == move && pi.SpecialTutors[0][i])
return GameVersion.USUM;
}
return NONE;
}
@ -272,6 +278,8 @@ namespace PKHeX.Core
if (!pi.IsPresentInGame)
return;
moves.AddRange(TypeTutor8.Where((_, i) => pi.TypeTutors[i]));
if (specialTutors)
moves.AddRange(GetTutors(pi, Tutors_SWSH_1));
}
private static IEnumerable<int> GetTutors(PersonalInfo pi, params int[][] tutors)

View file

@ -58,6 +58,7 @@ namespace PKHeX.Core
773, // Silvally
800, // Necrozma
891, // Urshifu
};
public static readonly HashSet<int> FormChangeMoves = new HashSet<int>
@ -177,8 +178,10 @@ namespace PKHeX.Core
(int)Species.Zacian,
(int)Species.Zamazenta,
(int)Species.Eternatus,
// 891, // mythical1?
// 892, // mythical2?
(int)Species.Kubfu,
(int)Species.Urshifu,
(int)Species.Zarude,
};
public static readonly HashSet<int> BattleFrontierBanlist = new HashSet<int>
@ -294,6 +297,7 @@ namespace PKHeX.Core
647, 648, 649, 716, 717, 718, 719, 720, 721, 789, 790,
791, 792, 800, 801, 802, 807, 808, 809,
(int)Species.Zacian, (int)Species.Zamazenta, (int)Species.Eternatus,
(int)Species.Zarude,
};
public static readonly HashSet<int> SubLegends = new HashSet<int>
@ -302,6 +306,7 @@ namespace PKHeX.Core
480, 481, 482, 485, 486, 488, 638, 639, 640, 641, 642,
645, 772, 773, 787, 788, 785, 786, 793, 794, 795, 796,
797, 798, 799, 803, 804, 805, 806,
(int)Species.Kubfu, (int)Species.Urshifu,
};
public static readonly ushort[] Arceus_Plate = {303, 306, 304, 305, 309, 308, 310, 313, 298, 299, 301, 300, 307, 302, 311, 312, 644};

View file

@ -281,7 +281,6 @@ namespace PKHeX.Core
internal static readonly HashSet<int> GoTransferSpeciesShinyBan = new HashSet<int>
{
(int)Species.Weedle, (int)Species.Kakuna, (int)Species.Beedrill,
(int)Species.Spearow, (int)Species.Fearow,
(int)Species.Vulpix, (int)Species.Ninetales,
(int)Species.Paras, (int)Species.Parasect,

View file

@ -5,10 +5,24 @@ namespace PKHeX.Core
{
public static partial class Legal
{
internal const int MaxSpeciesID_8 = 890; // Eternatus
internal const int MaxMoveID_8 = 796; // Steel Beam (jet fuel)
internal const int MaxItemID_8 = 1278; // Rotom Catalog, or 1578 for all catalog parts?
internal const int MaxAbilityID_8 = 258;
// Current Binaries
internal const int MaxSpeciesID_8 = MaxSpeciesID_8_R1;
internal const int MaxMoveID_8 = MaxMoveID_8_R1;
internal const int MaxItemID_8 = MaxItemID_8_R1;
internal const int MaxAbilityID_8 = MaxAbilityID_8_R1;
// Orion (No DLC)
internal const int MaxSpeciesID_8_O0 = 890; // Eternatus
internal const int MaxMoveID_8_O0 = 796; // Steel Beam (jet fuel)
internal const int MaxItemID_8_O0 = 1278; // Rotom Catalog, ignore all catalog parts
internal const int MaxAbilityID_8_O0 = 258;
// Rigel 1 (DLC 1: Isle of Armor)
internal const int MaxSpeciesID_8_R1 = 893; // Zarude
internal const int MaxMoveID_8_R1 = 818; // Surging Strikes
internal const int MaxItemID_8_R1 = 1589; // Mark Charm
internal const int MaxAbilityID_8_R1 = 260; // Unseen Fist
internal const int MaxBallID_8 = 0x1A; // 26 Beast
internal const int MaxGameID_8 = 45;
@ -31,7 +45,11 @@ namespace PKHeX.Core
130, 132, 134, 136, 138,
140, 142, 144, 146, 148,
150, 152, 154, 156, 158,
160, 162,
160, 162, 164, 166, 168,
170, 172, 174, 176, 178,
180, 182, 184, 186, 188,
190, 192, 194, 196, 198,
200, 202,
};
internal static readonly int[] Met_SWSH_3 =
@ -58,16 +76,17 @@ namespace PKHeX.Core
internal static readonly ushort[] Pouch_Regular_SWSH =
{
045, 046, 047, 048, 049, 050, 051, 052, 053, 076, 077, 079, 080, 081, 082, 083, 084, 085, 107, 108, 109,
116, 117, 118, 119, 213, 214, 215, 217, 218, 219, 220, 221, 222, 223, 224, 228, 229, 230, 231, 232, 233,
234, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 253, 254, 255, 257,
259, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305,
306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 325, 326, 537, 538, 539,
540, 541, 542, 543, 544, 545, 546, 547, 564, 565, 566, 567, 568, 569, 570, 639, 640, 644, 645, 646, 647,
648, 649, 650, 846, 849, 879, 880, 881, 882, 883, 884, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913,
914, 915, 916, 917, 918, 919, 920, 1103, 1104, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118,
1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1231, 1232, 1233, 1234, 1235, 1236, 1237,
1238, 1239, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 1250, 1251, 1252, 1253, 1254,
110, 112, 116, 117, 118, 119, 135, 136, 213, 214, 215, 217, 218, 219, 220, 221, 222, 223, 224, 225, 228,
229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
250, 251, 252, 253, 254, 255, 257, 258, 259, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297,
298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318,
319, 320, 321, 322, 323, 324, 325, 326, 485, 486, 487, 488, 489, 490, 491, 537, 538, 539, 540, 541, 542,
543, 544, 545, 546, 547, 564, 565, 566, 567, 568, 569, 570, 639, 640, 644, 645, 646, 647, 648, 649, 650,
846, 849, 879, 880, 881, 882, 883, 884, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916,
917, 918, 919, 920, 1103, 1104, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120,
1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239,
1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 1250, 1251, 1252, 1253, 1254,
1279,
1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297,
@ -86,7 +105,7 @@ namespace PKHeX.Core
1514, 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530, 1531,
1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1540, 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549,
1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1567,
1568, 1569, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578,
1568, 1569, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, 1581, 1582, 1588,
};
internal static readonly ushort[] Pouch_Ball_SWSH =
@ -99,7 +118,7 @@ namespace PKHeX.Core
internal static readonly ushort[] Pouch_Battle_SWSH =
{
055, 056, 057, 058, 059, 060, 061, 062, 063,
055, 056, 057, 058, 059, 060, 061, 062, 063, 1580
};
internal static readonly ushort[] Pouch_Items_SWSH = Pouch_Regular_SWSH.Concat(Pouch_Ball_SWSH).Concat(Pouch_Battle_SWSH).ToArray();
@ -107,11 +126,12 @@ namespace PKHeX.Core
internal static readonly ushort[] Pouch_Key_SWSH =
{
078,
628, 629, 631, 632,
628, 629, 631, 632, 638,
703,
847,
943, 944, 945, 946,
1074, 1075, 1076, 1077, 1080, 1081, 1100,
1255, 1266, 1267, 1269, 1270, 1271, 1278,
1074, 1075, 1076, 1077, 1080, 1081, 1100, 1255, 1266, 1267,
1269, 1270, 1271, 1278, 1583, 1584, 1585, 1586, 1587, 1589,
};
internal static readonly ushort[] TM_SWSH =
@ -154,6 +174,7 @@ namespace PKHeX.Core
504, 591,
708, 709,
852, 903,
1579,
};
internal static readonly ushort[] Pouch_Berries_SWSH =
@ -209,6 +230,55 @@ namespace PKHeX.Core
(int)Ball.Moon,
(int)Ball.Dream,
(int)Ball.Beast,
// DLC 1 Additions
(int)Ball.Safari,
(int)Ball.Sport,
// no cherish ball
};
internal static readonly int[] Tutors_SWSH_1 =
{
805, 807, 812, 804,
803, 813, 811, 810,
815, 814, 797, 806,
800, 809, 799, 808,
798, 802,
};
public static readonly HashSet<int> CanEatMaxSoup = new HashSet<int>
{
(int)Species.Venusaur,
(int)Species.Charizard,
(int)Species.Blastoise,
(int)Species.Rillaboom,
(int)Species.Cinderace,
(int)Species.Inteleon,
(int)Species.Butterfree,
(int)Species.Pikachu,
(int)Species.Meowth,
(int)Species.Machamp,
(int)Species.Gengar,
(int)Species.Lapras,
(int)Species.Eevee,
(int)Species.Snorlax,
(int)Species.Garbodor,
(int)Species.Drednaw,
(int)Species.Corviknight,
(int)Species.Toxtricity,
(int)Species.Alcremie,
(int)Species.Duraludon,
(int)Species.Orbeetle,
(int)Species.Coalossal,
(int)Species.Sandaconda,
(int)Species.Grimmsnarl,
(int)Species.Flapple,
(int)Species.Appletun,
(int)Species.Hatterene,
(int)Species.Copperajah,
(int)Species.Kingler,
(int)Species.Centiskorch,
(int)Species.Urshifu
};
internal static readonly HashSet<int> GalarOriginForms = new HashSet<int>
@ -314,24 +384,14 @@ namespace PKHeX.Core
10, 20, 30, 10, 10, 40, 40, 30, 20, 40, 20, 20, 10, 10, 10, 10, 05, 10, 10, 05, 05, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01,
01, 01, 01, 01, 01, 01, 01, 01, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 40, 15, 20, 30, 20, 15, 15, 20, 10, 15, 15, 10, 05, 10, 10, 20, 15, 10, 15, 15, 15, 05, 15, 20, 20, 01, 01, 01, 01, 01, 01,
01, 01, 01, 05, 05, 10, 10, 10, 20, 10, 10, 10, 05, 05, 20, 10, 10, 10, 01, 05, 15, 05, 01, 01, 01, 01, 01, 01, 10, 15, 15, 20, 20, 20, 20, 15, 15, 10, 10, 05, 20, 05, 10, 05, 15, 10, 10, 05, 15, 20,
10, 10, 15, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 05, 10, 15, 10, 15, 05, 05, 05, 10, 15, 40, 10, 10, 10, 15, 10, 10, 10, 10, 05, 05, 05,
10, 10, 15, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 05, 10, 15, 10, 15, 05, 05, 05, 10, 15, 40, 10, 10, 10, 15, 10, 10, 10, 10, 05, 05, 05, 10, 05, 20, 10,
10, 05, 20, 20, 10, 10, 05, 05, 05, 40, 10, 20, 10, 10, 10, 10, 05, 05
};
internal static readonly HashSet<int> Ban_NoHidden8 = new HashSet<int>
{
// No wild encounter with Hidden, so can't breed a hidden yet.
(int)Species.Slowpoke | 1 << 11,
(int)Species.Skwovet, (int)Species.Greedent,
(int)Species.Nickit, (int)Species.Thievul,
(int)Species.Wooloo, (int)Species.Dubwool,
(int)Species.Yamper, (int)Species.Boltund,
// Average & Super forms have hidden abilities available via raids.
710 + (1 << 11), //Pumpkaboo-Small
711 + (1 << 11), //Gourgeist-Small
710 + (2 << 11), //Pumpkaboo-Large
711 + (2 << 11), //Gourgeist-Large
// none as of DLC 1!
};
internal static readonly HashSet<int> Ban_NoHidden8Apricorn = new HashSet<int>
@ -346,10 +406,14 @@ namespace PKHeX.Core
#region Unreleased Items
internal static readonly HashSet<int> UnreleasedHeldItems_8 = new HashSet<int>
{
112, // Griseous Orb
116, // Douse Drive
117, // Shock Drive
118, // Burn Drive
119, // Chill Drive
135, // Adamant Orb
136, // Lustrous Orb
225, // Soul Dew
298, // Flame Plate
299, // Splash Plate
@ -369,6 +433,9 @@ namespace PKHeX.Core
313, // Iron Plate
// 644, // Pixie Plate
322, // Electirizer
323, // Magmarizer
// 1279, // ★And458 (Jangmo-o)
// 1280, // ★And15 (Larvitar)
// 1281, // ★And337 (Corviknight)
@ -670,9 +737,7 @@ namespace PKHeX.Core
1577, // ★Aql7602
1578, // ★Aql7235
005, // Safari Ball
016, // Cherish Ball
499, // Sport Ball
500, // Park Ball
193, // Payapa Berry

View file

@ -264,10 +264,12 @@ namespace PKHeX.Core
{
var pkm = data.pkm;
int species = data.EncounterMatch.Species;
if (722 <= species && species <= 730) // G7 Starters
return VerifyBallEquals(data, (int)Poke);
if ((int)Species.Grookey <= species && species <= (int)Species.Inteleon) // G8 Starters
return VerifyBallEquals(data, (int)Poke);
if (IsGalarBreed(species))
if (IsGalarCatchAndBreed(species))
{
if (Legal.WildPokeballs8.Contains(pkm.Ball))
return GetValid(LBallSpeciesPass);
@ -275,9 +277,6 @@ namespace PKHeX.Core
return GetInvalid(LBallSpecies);
}
if (722 <= species && species <= 730) // G7 Starters
return VerifyBallEquals(data, (int)Poke);
Ball ball = (Ball)pkm.Ball;
if (ball == Safari)
@ -346,12 +345,26 @@ namespace PKHeX.Core
return NONE;
}
public static bool IsGalarBreed(int species)
public static bool IsGalarCatchAndBreed(int species)
{
if ((int)Species.Grookey <= species && species <= (int)Species.Inteleon) // starter
return false;
var pt = PersonalTable.SWSH;
return ((PersonalInfoSWSH)pt.GetFormeEntry(species, 0)).PokeDexIndex != 0;
var pi = ((PersonalInfoSWSH) pt.GetFormeEntry(species, 0));
bool galar = pi.PokeDexIndex != 0;
if (galar)
return true;
var armor = pi.ArmorDexIndex != 0;
if (armor)
{
if (722 <= species && species <= 730) // G7 Starters
return false;
if ((int) Species.Porygon == species)
return false;
return true;
}
return true;
}
private CheckResult VerifyBallEquals(LegalityAnalysis data, int ball) => GetResult(ball == data.pkm.Ball);

View file

@ -222,6 +222,10 @@ namespace PKHeX.Core
return false;
if (species == (int) Species.Darmanitan && form == 2 && format >= 8)
return false; // this one is OK, Galarian non-Zen
if (species == (int) Species.Slowbro && form == 2 && format >= 8)
return false; // this one is OK, Galarian Slowbro (not a Mega)
if (species == (int) Species.Necrozma && form != 3)
return false; // Only mark Ultra Necrozma as Battle Only
return true;
}

View file

@ -377,9 +377,27 @@ namespace PKHeX.Core
if (pk8.Favorite)
data.AddLine(GetInvalid(LFavoriteMarkingUnavailable, Encounter));
var gflag = data.EncounterMatch is IGigantamax g && g.CanGigantamax;
if (gflag != pk8.CanGigantamax)
data.AddLine(GetInvalid(LStatGigantamaxInvalid));
var sn = pk8.StatNature;
if (sn != pk8.Nature)
{
// Only allow Serious nature (0); disallow all other neutral natures.
if (sn != 0 && (sn > 24 || sn % 6 == 0))
data.AddLine(GetInvalid(LStatNatureInvalid));
}
var bv = pk8.BattleVersion;
if (bv != 0)
{
if (bv != (int)GameVersion.SW && bv != (int)GameVersion.SH || pk8.SWSH)
data.AddLine(GetInvalid(LStatBattleVersionInvalid));
}
bool originGMax = data.EncounterMatch is IGigantamax g && g.CanGigantamax;
if (originGMax != pk8.CanGigantamax)
{
if (!Legal.CanEatMaxSoup.Contains(pk8.Species))
data.AddLine(GetInvalid(LStatGigantamaxInvalid));
}
if (pk8.DynamaxLevel != 0)
{

View file

@ -109,10 +109,6 @@ namespace PKHeX.Core
{
data.AddLine(GetInvalid(LTransferBad));
}
else if (pkm.AltForm == 0 && (species == (int)Species.Slowpoke || species == (int)Species.Slowbro))
{
data.AddLine(GetInvalid(LTransferBad)); // can't get regular slowpoke/slowbro yet
}
else if (data.Info.Generation < 8 && pkm.Format >= 8)
{
if (!pkm.GG && pkm is IScaledSize s)

View file

@ -6,12 +6,13 @@ namespace PKHeX.Core
/// <summary> Generation 8 <see cref="PKM"/> format. </summary>
public sealed class PK8 : PKM,
IRibbonSetEvent3, IRibbonSetEvent4, IRibbonSetCommon3, IRibbonSetCommon4, IRibbonSetCommon6, IRibbonSetCommon7, IRibbonSetCommon8, IRibbonSetMark8,
IContestStats, IHyperTrain, IScaledSize, IGigantamax, IFavorite, IDynamaxLevel, IRibbonIndex, IHandlerLanguage, IFormArgument, IHomeTrack
IContestStats, IHyperTrain, IScaledSize, IGigantamax, IFavorite, IDynamaxLevel, IRibbonIndex, IHandlerLanguage, IFormArgument, IHomeTrack, IBattleVersion
{
private static readonly ushort[] Unused =
{
// Alignment bytes
0x17, 0x1A, 0x1B, 0x23, 0x33, 0x3E, 0x3F,
0xE0, 0xE1,
0xC5, 0x115, 0x11F,
};
@ -481,9 +482,9 @@ namespace PKHeX.Core
public override byte Fullness { get => Data[0xDC]; set => Data[0xDC] = value; }
public override byte Enjoyment { get => Data[0xDD]; set => Data[0xDD] = value; }
public override int Version { get => Data[0xDE]; set => Data[0xDE] = (byte)value; }
public override int Country { get => Data[0xDF]; set => Data[0xDF] = (byte)value; }
public override int Region { get => Data[0xE0]; set => Data[0xE0] = (byte)value; }
public override int ConsoleRegion { get => Data[0xE1]; set => Data[0xE1] = (byte)value; }
public int BattleVersion { get => Data[0xDF]; set => Data[0xDF] = (byte)value; }
// public override int Region { get => Data[0xE0]; set => Data[0xE0] = (byte)value; }
// public override int ConsoleRegion { get => Data[0xE1]; set => Data[0xE1] = (byte)value; }
public override int Language { get => Data[0xE2]; set => Data[0xE2] = (byte)value; }
public int UnkE3 { get => Data[0xE3]; set => Data[0xE3] = (byte)value; }
public uint FormArgument { get => BitConverter.ToUInt32(Data, 0xE4); set => BitConverter.GetBytes(value).CopyTo(Data, 0xE4); }

View file

@ -0,0 +1,32 @@
namespace PKHeX.Core
{
/// <summary>
/// Interface that exposes a <see cref="BattleVersion"/> for allowing a Pokémon into ranked battles if it originated from a prior game.
/// </summary>
public interface IBattleVersion
{
/// <summary>
/// Indicates which <see cref="GameVersion"/> the Pokémon's moves were reset on.
/// </summary>
int BattleVersion { get; set; }
}
public static class BattleVersionExtensions
{
/// <summary>
/// Resets the <see cref="PKM"/>'s moves and sets the requested version.
/// </summary>
/// <param name="v">Reference to the object to set the <see cref="version"/></param>
/// <param name="pk">Reference to the same object that gets moves reset</param>
/// <param name="version">Version to apply</param>
public static void AdaptToBattleVersion(this IBattleVersion v, PKM pk, GameVersion version)
{
var moves = MoveLevelUp.GetEncounterMoves(pk, pk.CurrentLevel, version);
pk.Move1 = pk.Move2 = pk.Move3 = pk.Move4 = 0;
pk.RelearnMove1 = pk.RelearnMove2 = pk.RelearnMove3 = pk.RelearnMove4 = 0;
pk.SetMoves(moves);
pk.FixMoves();
v.BattleVersion = (int) version;
}
}
}

View file

@ -1,4 +1,6 @@
namespace PKHeX.Core
using static PKHeX.Core.Species;
namespace PKHeX.Core
{
public interface IDynamaxLevel
{
@ -11,7 +13,8 @@
{
if (pkm.IsEgg)
return false;
if (pkm.Species >= (int)Species.Zacian)
var species = pkm.Species;
if ((int)Zacian <= species && species <= (int)Eternatus)
return false;
return true;
}

View file

@ -114,6 +114,9 @@ namespace PKHeX.Core
case Farfetchd when generation >= 8:
return GetFormsGalar(types, forms);
case Slowbro when generation >= 8:
return GetFormsGalarSlowbro(types, forms);
default:
return GetFormsAlolan(generation, types, forms, species);
}
@ -617,6 +620,18 @@ namespace PKHeX.Core
types[0], // Normal
forms[Eternamax],
};
case Urshifu:
return new[]
{
forms[SingleStrike],
forms[RapidStrike],
};
case Zarude:
return new[]
{
types[0], // Normal
forms[Dada],
};
}
}
@ -654,6 +669,7 @@ namespace PKHeX.Core
case Grimer:
case Muk:
case Exeggutor:
case Marowak: // Only reached when Gen8+, as Totem logic picks up Gen7 earlier.
return new[]
{
types[000],
@ -696,6 +712,18 @@ namespace PKHeX.Core
};
case 7:
return new[]
{
types[000], // Normal
forms[813], // Original
forms[814], // Hoenn
forms[815], // Sinnoh
forms[816], // Unova
forms[817], // Kalos
forms[818], // Alola
forms[1063], // Partner
Starter,
};
case 8:
return new[]
{
@ -707,6 +735,8 @@ namespace PKHeX.Core
forms[817], // Kalos
forms[818], // Alola
forms[1063], // Partner
Starter,
forms[1085], // World
};
}
}
@ -915,6 +945,16 @@ namespace PKHeX.Core
};
}
private static string[] GetFormsGalarSlowbro(IReadOnlyList<string> types, IReadOnlyList<string> forms)
{
return new[]
{
types[000], // Normal
forms[804], // Mega
forms[Galarian], // Galarian
};
}
private const int Galarian = 1068;
// private const int Gigantamax = 1069;
private const int Gulping = 1070;
@ -936,6 +976,10 @@ namespace PKHeX.Core
private const int Crowned = 1083;
private const int Eternamax = 1084;
private const int SingleStrike = 1086;
private const int RapidStrike = 1087;
private const int Dada = 1088;
public static string[] GetAlcremieFormList(IReadOnlyList<string> forms)
{
var result = new string[63];

View file

@ -7,7 +7,7 @@ namespace PKHeX.Core
/// </summary>
public sealed class PersonalInfoSWSH : PersonalInfo
{
public const int SIZE = 0xA8;
public const int SIZE = 0xB0;
public PersonalInfoSWSH(byte[] data) : base(data)
{
@ -23,6 +23,15 @@ namespace PKHeX.Core
for (int i = 0; i < typeTutors.Length; i++)
typeTutors[i] = FlagUtil.GetFlag(Data, 0x38, i);
TypeTutors = typeTutors;
// 0xA8-0xAF are armor type tutors, one bit for each type
var armorTutors = new bool[18];
for (int i = 0; i < armorTutors.Length; i++)
armorTutors[i] = FlagUtil.GetFlag(Data, 0xA8 + (i >> 3), i);
SpecialTutors = new[]
{
armorTutors,
};
}
public override byte[] Write()
@ -34,6 +43,8 @@ namespace PKHeX.Core
}
for (int i = 0; i < TypeTutors.Length; i++)
FlagUtil.SetFlag(Data, 0x38, i, TypeTutors[i]);
for (int i = 0; i < SpecialTutors[0].Length; i++)
FlagUtil.SetFlag(Data, 0xA8 + (i >> 3), i, SpecialTutors[0][i]);
return Data;
}
@ -108,5 +119,7 @@ namespace PKHeX.Core
public int Flags { get => BitConverter.ToUInt16(Data, 0x5A); set => BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x5A); } // not sure
public int PokeDexIndex { get => BitConverter.ToUInt16(Data, 0x5C); set => BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x5C); }
public int FormIndex { get => BitConverter.ToUInt16(Data, 0x5E); set => BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x5E); } // form index of this entry
public int ArmorDexIndex { get => BitConverter.ToUInt16(Data, 0xAC); set => BitConverter.GetBytes((ushort)value).CopyTo(Data, 0xAC); }
public int CrownDexIndex { get => BitConverter.ToUInt16(Data, 0xAE); set => BitConverter.GetBytes((ushort)value).CopyTo(Data, 0xAE); }
}
}

View file

@ -256,4 +256,6 @@ Rastlose Seele
Affenfokus
Reaktionsgas
Pastellhülle
Heißhunger
Heißhunger
Schnellschuss
Verborgene Faust

View file

@ -1082,4 +1082,8 @@ Trio
Wohlfühlkopf
Kohldampfmuster
König
Unendynamax
Unendynamax
Weltreise-Kappe
Fokussierter
Fließender
Papa

View file

@ -1,4 +1,4 @@
Kein
Kein
Meisterball
Hyperball
Superball
@ -1576,4 +1576,15 @@ Rotom-Katalog
★Aql7557
★Aql7525
★Aql7602
★Aql7235
★Aql7235
Dyna-Honig
Dyna-Pilz
Galarnuss-Zweig
Galarnuss-Reif
Style-Karte
Rüstungspass
Rotom-Rad
Rotom-Rad
EP-Pin
Rüstungserz
Zeichenpin

View file

@ -794,4 +794,26 @@ Abblocker
Kniefalltrick
Sternensturm
Unendynastrahlen
Stahlstrahl
Stahlstrahl
Flächenmacht
Eisenwalze
Schuppenschuss
Meteorstrahl
Muschelwaffe
Nebelexplosion
Grasrutsche
Hochspannung
Feldimpuls
Krabbelkracher
Neidflammen
Frustventil
Poltergeist
Korrosionsgas
Coaching
Rollwende
Dreifach-Axel
Doppelflügel
Brandsand
Dschungelheilung
Finstertreffer
Trefferschwall

View file

@ -888,4 +888,7 @@ Phandra
Katapuldra
Zacian
Zamazenta
Endynalos
Endynalos
Dakuma
Wulaosu
Zarude

View file

@ -161,3 +161,43 @@ im Kampfturm
am Rose Tower
Ein Pokémon-Nest
[~ 163]
im Grußgefilde
auf der Rüstungsinsel
im Balsamsumpf
auf der Rüstungsinsel
im Fokusforst
auf der Rüstungsinsel
am Strand der Prüfung
auf der Rüstungsinsel
in der Kämpfergrotte
auf der Rüstungsinsel
auf dem Pfad der Prüfung
auf der Rüstungsinsel
in der Tapferkeitshöhle
auf der Rüstungsinsel
bei der Ringbucht
auf der Rüstungsinsel
auf der Fleißebene
auf der Rüstungsinsel
im Aufwärmtunnel
auf der Rüstungsinsel
in der Wüstensenke
auf der Rüstungsinsel
am Fitnessmeer
bei der Rüstungsinsel
am Inselkettenmeer
bei der Rüstungsinsel
beim Fernarchipel
bei der Rüstungsinsel
am Wabenmeer
bei der Rüstungsinsel
auf der Wabeninsel
bei der Rüstungsinsel
im Master-Dojo
am Turm des Unlichts
am Turm des Wassers
in der Rüstungs-Station

View file

@ -256,4 +256,6 @@ Wandering Spirit
Gorilla Tactics
Neutralizing Gas
Pastel Veil
Hunger Switch
Hunger Switch
Quick Draw
Unseen Fist

View file

@ -1576,4 +1576,15 @@ Rotom Catalog
★Aql7557
★Aql7525
★Aql7602
★Aql7235
★Aql7235
Max Honey
Max Mushrooms
Galarica Twig
Galarica Cuff
Style Card
Armor Pass
Rotom Bike
Rotom Bike
Exp. Charm
Armorite Ore
Mark Charm

View file

@ -794,4 +794,26 @@ Obstruct
False Surrender
Meteor Assault
Eternabeam
Steel Beam
Steel Beam
Expanding Force
Steel Roller
Scale Shot
Meteor Beam
Shell Side Arm
Misty Explosion
Grassy Glide
Rising Voltage
Terrain Pulse
Skitter Smack
Burning Jealousy
Lash Out
Poltergeist
Corrosive Gas
Coaching
Flip Turn
Triple Axel
Dual Wingbeat
Scorching Sands
Jungle Healing
Wicked Blow
Surging Strikes

View file

@ -888,4 +888,7 @@ Drakloak
Dragapult
Zacian
Zamazenta
Eternatus
Eternatus
Kubfu
Urshifu
Zarude

View file

@ -161,3 +161,43 @@ at the Battle Tower
at Rose Tower
in a Pokémon Den
[~ 163]
in the Fields of Honor
on the Isle of Armor
in the Soothing Wetlands
on the Isle of Armor
in the Forest of Focus
on the Isle of Armor
on Challenge Beach
on the Isle of Armor
in Brawlers Cave
on the Isle of Armor
on Challenge Road
on the Isle of Armor
in Courageous Cavern
on the Isle of Armor
in Loop Lagoon
on the Isle of Armor
in the Training Lowlands
on the Isle of Armor
in Warm-Up Tunnel
on the Isle of Armor
in the Potbottom Desert
on the Isle of Armor
in the Workout Sea
on the Isle of Armor
in the Stepping-Stone Sea
on the Isle of Armor
in the Insular Sea
on the Isle of Armor
in the Honeycalm Sea
on the Isle of Armor
on Honeycalm Island
on the Isle of Armor
at the Master Dojo
at the Tower of Darkness
at the Tower of Waters
at the Armor Station

View file

@ -256,4 +256,6 @@ Alma Errante
Monotema
Gas Reactivo
Velo Pastel
Mutapetito
Mutapetito
Mano Rápida
Puño Invisible

View file

@ -1576,4 +1576,15 @@ Catálogo Rotom
★Aql7557
★Aql7525
★Aql7602
★Aql7235
★Aql7235
Maxipanal
Maxiseta
Rama de Galanuez
Brazal Galanuez
Tarjeta Chic
Pase Armadura
Bici Rotom
Bici Rotom
Amuleto Exp
Duralium
Amuleto Emblema

View file

@ -794,4 +794,26 @@ Obstrucción
Irreverencia
Asalto Estelar
Rayo Infinito
Metaláser
Metaláser
Vasta Fuerza
Allanador Férreo
Ráfaga Escamas
Rayo Meteórico
Moluscañón
Bruma Explosiva
Fitoimpulso
Alto Voltaje
Pulso de Campo
Golpe Rastrero
Envidia Ardiente
Desahogo
Poltergeist
Gas Corrosivo
Motivación
Viraje
Triple Axel
Ala Bis
Arenas Ardientes
Cura Selvática
Golpe Oscuro
Azote Torrencial

View file

@ -888,4 +888,7 @@ Drakloak
Dragapult
Zacian
Zamazenta
Eternatus
Eternatus
Kubfu
Urshifu
Zarude

View file

@ -161,3 +161,43 @@ Torre Batalla
Torre Rose
Nido Pokémon
[~ 163]
Prado Reverencia
Isla de la Armadura
Humedal Frescor
Isla de la Armadura
Bosque Concentración
Isla de la Armadura
Playa Desafío
Isla de la Armadura
Cueva Contienda
Isla de la Armadura
Ruta Desafío
Isla de la Armadura
Cueva Tenacidad
Isla de la Armadura
Bahía Circular
Isla de la Armadura
Llano Entrenamiento
Isla de la Armadura
Gruta Calentamiento
Isla de la Armadura
Cuenca Arenosa
Isla de la Armadura
Mar Gimnástico
Isla de la Armadura
Mar Andana
Isla de la Armadura
Mar Islejos
Isla de la Armadura
Mar Meloso
Isla de la Armadura
Isla Melosa
Isla de la Armadura
Dojo Maestro
Torre de las Sombras
Torre de las Aguas
Estación Armadura

View file

@ -256,4 +256,6 @@ Corps Condamné
Entêtement
Gaz Inhibiteur
Voile Pastel
Déclic Fringale
Déclic Fringale
Tir Vif
Poing Invisible

View file

@ -1576,4 +1576,15 @@ Moti-Catalogue
★Aql7557
★Aql7525
★Aql7602
★Aql7235
★Aql7235
Maxi Miel
Maxi Champi
Branche Galanoa
Bracelet Galanoa
Carte Élégance
Pass Isolarmure
Moticyclette
Moticyclette
Charme Exp
Armurium
Charme Insigne

View file

@ -794,4 +794,26 @@ Blocage
Fourbette
Joute Astrale
Laser Infinimax
Métalaser
Métalaser
Vaste Pouvoir
Métalliroue
Rafale Écailles
Laser Météore
Kokiyarme
Explo-Brume
GlissHerbe
Monte-Tension
Champlification
Ravage Rampant
Feu Envieux
Cent Rancunes
Esprit Frappeur
Gaz Corrosif
Coaching
Eau Revoir
Triple Axel
Double Volée
Sable Ardent
Selve Salvatrice
Poing Obscur
Torrent de Coups

View file

@ -888,4 +888,7 @@ Dispareptil
Lanssorien
Zacian
Zamazenta
Éthernatos
Éthernatos
Wushours
Shifours
Zarude

View file

@ -161,3 +161,43 @@ dans les Terres Sauvages
dans la Shehroz Tower
dans un antre
[~ 163]
dans la Plaine Salutation
à Isolarmure
dans la Lande Boldair
à Isolarmure
dans la Forêt Flexion
à Isolarmure
sur la Plage de lÉpreuve
à Isolarmure
dans la Grotte du Pugilat
à Isolarmure
sur la Route de lÉpreuve
à Isolarmure
dans la Caverne Pugnacité
à Isolarmure
dans la Lagune Circulaire
à Isolarmure
dans la Plaine des Efforts
à Isolarmure
sur la Voie des Étirements
à Isolarmure
aux Sables de Kudsac
à Isolarmure
sur la Mer Eau-Hisse
à Isolarmure
dans la Mer AlignÎlots
à Isolarmure
dans la Mer IsolÎlots
à Isolarmure
dans la Mer Calméole
à Isolarmure
sur lÎlot Calméole
à Isolarmure
au Dojo de la Maîtrise
à la Tour des Ténèbres
à la Tour de lEau
à la Gare dIsolarmure

View file

@ -256,4 +256,6 @@ Anima Errante
Vigorilla
Gas Reagente
Pastelvelo
Pancialterna
Pancialterna
Colpolesto
Pugni Invisibili

View file

@ -28,7 +28,7 @@ Superpozione
Cura totale
Revitalizzante
Revitalizz. Max
Acqua Fresca
Acqua fresca
Gassosa
Lemonsucco
Latte Mumu
@ -1576,4 +1576,15 @@ Catalogo Rotom
★Aql7557
★Aql7525
★Aql7602
★Aql7235
★Aql7235
Mielemax
Fungomax
Ramo Galarnoce
Fascia Galarnoce
Tessera chic
Pass Armatura
Bici Rotom
Bici Rotom
Esperienzamuleto
Rocciarmatura
Emblemamuleto

View file

@ -373,7 +373,7 @@ Rivincita
Garanzia
Divieto
Lancio
Psicotrasfer
Psicotransfer
Asso
Anticura
Strizzata
@ -794,4 +794,26 @@ Sbarramento
Supplicolpo
Sfolgorassalto
Raggio Infinito
Raggio dAcciaio
Raggio dAcciaio
Vastenergia
Ferrorullo
Squamacolpo
Raggiometeora
Armaguscio
Nebbioscoppio
Erboscivolata
Elettroimpennata
Campopulsar
Strisciacolpo
Fiamminvidia
Sfogarabbia
Poltergeist
Gas Corrosivo
Coaching
Virata
Triplo Axel
Doppia Ala
Sabbiardente
Giunglacura
Pugnotenebra
Idroraffica

View file

@ -888,4 +888,7 @@ Drakloak
Dragapult
Zacian
Zamazenta
Eternatus
Eternatus
Kubfu
Urshifu
Zarude

View file

@ -161,3 +161,43 @@ alla Torre Lotta
alla Rose Tower
in una tana di Pokémon
[~ 163]
nella Pianura Inchino
sullIsola dellArmatura
nellAcquitrino Fresco
sullIsola dellArmatura
nel Bosco Concentrazione
sullIsola dellArmatura
sulla Spiaggia Sfida
sullIsola dellArmatura
nellAntro Scontro
sullIsola dellArmatura
nel Cammino Sfida
sullIsola dellArmatura
nella Grotta Grinta
sullIsola dellArmatura
nella Baia Circolare
sullIsola dellArmatura
nella Piana Addestramento
sullIsola dellArmatura
nel Tunnel Riscaldamento
sullIsola dellArmatura
nel Deserto Paiolo
sullIsola dellArmatura
nel Mar Ginnico
sullIsola dellArmatura
nel Mar Lineapelago
sullIsola dellArmatura
nel Mar Sperdipelago
sullIsola dellArmatura
nel Mar Quietarnia
sullIsola dellArmatura
sullIsola Quietarnia
sullIsola dellArmatura
nel Dojo Master
nella Torre Buio
nella Torre Acqua
nella Stazione dellIsola dellArmatura

View file

@ -256,4 +256,6 @@
ごりむちゅう
かがくへんかガス
パステルベール
はらぺこスイッチ
はらぺこスイッチ
クイックドロウ
ふかしのこぶし

View file

@ -1082,4 +1082,8 @@
ナイスフェイス
はらぺこもよう
けんのおう
ムゲンダイマックス
ムゲンダイマックス
ワールドキャップ
いちげきのかた
れんげきのかた
とうちゃん

View file

@ -1576,4 +1576,15 @@
★Aql7557
★Aql7525
★Aql7602
★Aql7235
★Aql7235
ダイミツ
ダイキノコ
ガラナツのえだ
ガラナツブレス
おしゃれカード
ヨロイパス
ロトムじてんしゃ
ロトムじてんしゃ
けいけんおまもり
ヨロイこうせき
あかしのおまもり

View file

@ -794,4 +794,26 @@
どげざつき
スターアサルト
ムゲンダイビーム
てっていこうせん
てっていこうせん
ワイドフォース
アイアンローラー
スケイルショット
メテオビーム
シェルアームズ
ミストバースト
グラススライダー
ライジングボルト
だいちのはどう
はいよるいちげき
しっとのほのお
うっぷんばらし
ポルターガイスト
ふしょくガス
コーチング
クイックターン
トリプルアクセル
ダブルウイング
ねっさのだいち
ジャングルヒール
あんこくきょうだ
すいりゅうれんだ

View file

@ -888,4 +888,7 @@
ドラパルト
ザシアン
ザマゼンタ
ムゲンダイナ
ムゲンダイナ
ダクマ
ウーラオス
ザルード

View file

@ -161,3 +161,43 @@
ローズタワービル
どこかのすあな
[~ 163]
いちれいのはら
ヨロイじま
せいりょうしつげん
ヨロイじま
しゅうちゅうのもり
ヨロイじま
チャレンジビーチ
ヨロイじま
ファイトケイブ
ヨロイじま
チャレンジロード
ヨロイじま
とうしんのどうくつ
ヨロイじま
えんかんのいりえ
ヨロイじま
たんれんへいげん
ヨロイじま
ならしのほらあな
ヨロイじま
なべぞこさばく
ヨロイじま
ワークアウトのうみ
ヨロイじま
ならぶじまのうみ
ヨロイじま
はなれじまかいいき
ヨロイじま
ハニカームのうみ
ヨロイじま
ハニカームじま
ヨロイじま
マスターどうじょう
あくのとう
みずのとう
ヨロイじまえき

View file

@ -256,4 +256,6 @@ AR시스템
무아지경
화학변화가스
파스텔베일
꼬르륵스위치
꼬르륵스위치
퀵드로
보이지않는주먹

View file

@ -1576,4 +1576,15 @@ PP회복캡슐토이
★Aql7557
★Aql7525
★Aql7602
★Aql7235
★Aql7235
다이꿀
다이버섯
가라두구가지
가라두구팔찌
멋쟁이카드
갑옷패스
로토무자전거
로토무자전거
경험부적
갑옷광석
증표의부적

View file

@ -794,4 +794,26 @@ G의힘
사죄의찌르기
스타어설트
무한다이빔
철제광선
철제광선
와이드포스
아이언롤러
스케일샷
메테오빔
셸암즈
미스트버스트
그래스슬라이더
라이징볼트
대지의파동
엄습하는일격
질투의불꽃
분풀이
폴터가이스트
부식가스
코칭
퀵턴
트리플악셀
더블윙
열사의대지
정글힐
암흑강타
수류연타

View file

@ -888,4 +888,7 @@
드래펄트
자시안
자마젠타
무한다이노
무한다이노
치고마
우라오스
자루도

View file

@ -161,3 +161,43 @@
로즈타워빌딩
어딘가의 굴
[~ 163]
인사의 들판
갑옷섬
청량한 습지초원
갑옷섬
집중의 숲
갑옷섬
챌린지비치
갑옷섬
파이트케이브
갑옷섬
챌린지로드
갑옷섬
투지의 동굴
갑옷섬
원환의 만
갑옷섬
단련 평원
갑옷섬
연습의 동굴
갑옷섬
냄비바닥사막
갑옷섬
워크아웃 바다
갑옷섬
열도 바다
갑옷섬
외딴섬 해역
갑옷섬
허니컴 바다
갑옷섬
허니컴섬
갑옷섬
마스터 도장
악의 탑
물의 탑
갑옷섬역

View file

@ -256,4 +256,6 @@
一猩一意
化学变化气体
粉彩护幕
饱了又饿
饱了又饿
速击
无形拳

View file

@ -1082,4 +1082,4 @@
解冻头
空腹花纹
剑之王
无极巨化
无极巨化

View file

@ -1576,4 +1576,15 @@
★Aql7557
★Aql7525
★Aql7602
★Aql7235
★Aql7235
极巨甜蜜
极巨菇菇
伽勒豆蔻枝
伽勒豆蔻手环
时尚名人卡
铠甲车票
洛托姆自行车
洛托姆自行车
经验护符
铠甲矿石
证章护符

View file

@ -794,4 +794,26 @@
假跪真撞
流星突击
无极光束
铁蹄光线
铁蹄光线
广域战力
铁滚轮
鳞射
流星光束
臂贝武器
薄雾炸裂
青草滑梯
电力上升
大地波动
爬击
妒火
泄愤
灵骚
腐蚀气体
指导
快速折返
三旋击
双翼
热沙大地
丛林治疗
暗冥强击
水流连打

View file

@ -888,4 +888,7 @@
多龙巴鲁托
苍响
藏玛然特
无极汰那
无极汰那
熊徒弟
武道熊师
萨戮德

View file

@ -889,3 +889,6 @@
蒼響
藏瑪然特
無極汰那
熊徒弟
武道熊师
萨戮德

View file

@ -161,3 +161,43 @@
洛兹大厦
某处的巢穴
[~ 163]
揖礼原野
铠岛
清凉湿原
铠岛
专注森林
铠岛
挑战海滩
铠岛
战斗洞窟
铠岛
挑战之路
铠岛
斗志洞窟
铠岛
圆环海湾
铠岛
锻炼平原
铠岛
热身洞穴
铠岛
锅底沙漠
铠岛
健身之海
铠岛
列岛海域
铠岛
离岛海域
铠岛
蜂巢海
铠岛
蜂巢岛
铠岛
马师傅武馆
恶之塔
水之塔
铠岛驿站

View file

@ -15,6 +15,7 @@
Record8 Records { get; }
TrainerCard8 TrainerCard { get; }
RaidSpawnList8 Raid { get; }
RaidSpawnList8 RaidArmor { get; }
TitleScreen8 TitleScreen { get; }
TeamIndexes8 TeamIndexes { get; }
}

View file

@ -16,6 +16,12 @@ namespace PKHeX.Core
// Binary Search doesn't require extra memory like a Dictionary would; also, we only need to find a few blocks.
public SCBlock GetBlock(uint key) => BinarySearch(BlockInfo, key);
public SCBlock GetBlockSafe(uint key)
{
try { return GetBlock(key); }
catch (KeyNotFoundException) { return new SCBlock(0); }
}
private static SCBlock BinarySearch(IReadOnlyList<SCBlock> arr, uint key)
{
int min = 0;

View file

@ -22,6 +22,7 @@ namespace PKHeX.Core
public TrainerCard8 TrainerCard{ get; }
public FashionUnlock8 Fashion { get; }
public RaidSpawnList8 Raid { get; }
public RaidSpawnList8 RaidArmor { get; }
public TitleScreen8 TitleScreen { get; }
public TeamIndexes8 TeamIndexes { get; }
public HallOfFameTime8 FameTime { get; }
@ -32,7 +33,7 @@ namespace PKHeX.Core
BoxInfo = new Box8(sav, GetBlock(KBox));
PartyInfo = new Party8(sav, GetBlock(KParty));
Items = new MyItem8(sav, GetBlock(KItem));
Zukan = new Zukan8(sav, GetBlock(KZukan));
Zukan = new Zukan8(sav, GetBlock(KZukan), GetBlockSafe(KZukanR1), GetBlockSafe(KZukanR2));
MyStatus = new MyStatus8(sav, GetBlock(KMyStatus));
Misc = new Misc8(sav, GetBlock(KMisc));
BoxLayout = new BoxLayout8(sav, GetBlock(KBoxLayout));
@ -42,7 +43,8 @@ namespace PKHeX.Core
Daycare = new Daycare8(sav, GetBlock(KDaycare));
Records = new Record8(sav, GetBlock(KRecord), Core.Records.MaxType_SWSH);
Fashion = new FashionUnlock8(sav, GetBlock(KFashionUnlock));
Raid = new RaidSpawnList8(sav, GetBlock(KRaidSpawnList));
Raid = new RaidSpawnList8(sav, GetBlock(KRaidSpawnList), RaidSpawnList8.RaidCountLegal_O0);
RaidArmor = new RaidSpawnList8(sav, GetBlockSafe(KRaidSpawnListR1), RaidSpawnList8.RaidCountLegal_R1);
TitleScreen = new TitleScreen8(sav, GetBlock(KTitleScreenTeam));
TeamIndexes = new TeamIndexes8(sav, GetBlock(KTeamIndexes));
FameTime = new HallOfFameTime8(sav, GetBlock(KEnteredHallOfFame));
@ -69,11 +71,14 @@ namespace PKHeX.Core
private const uint KDaycare = 0x2d6fba6a; // Daycare slots (2 daycares)
private const uint KTeamIndexes = 0x33F39467; // Team Indexes for competition
private const uint KRecord = 0x37da95a3;
private const uint KZukan = 0x4716c404; // PokeDex
private const uint KZukan = 0x4716c404; // ZukanData_Pokemon
private const uint KZukanR1 = 0x3F936BA9; // ZukanData_PokemonR1 (Armor)
private const uint KZukanR2 = 0x3C9366F0; // ZukanData_PokemonR2 (Crown)
private const uint KCurryDex = 0x6EB72940; // Curry Dex
private const uint KTrainerCard = 0x874da6fa; // Trainer Card
private const uint KPlayTime = 0x8cbbfd90; // Time Played
private const uint KRaidSpawnList = 0x9033eb7b; // Nest current values (hash, seed, meta)
private const uint KRaidSpawnListR1 = 0x158DA896; // Raid Data for DLC1
private const uint KFused = 0xc0de5c5f; // Fused PKM (*3)
private const uint KFashionUnlock = 0xd224f9ac; // Fashion unlock bool array (owned for (each apparel type) * 0x80, then another array for "new")
private const uint KTitleScreenTeam = 0xE9BE28BF; // Title Screen Team details

View file

@ -71,7 +71,7 @@ namespace PKHeX.Core
/// <returns>True if hash matches</returns>
public static bool GetIsHashValid(byte[] data)
{
if (data.Length != SaveUtil.SIZE_G8SWSH && data.Length != SaveUtil.SIZE_G8SWSH_1)
if (data.Length != SaveUtil.SIZE_G8SWSH && data.Length != SaveUtil.SIZE_G8SWSH_1 && data.Length != SaveUtil.SIZE_G8SWSH_2)
return false;
var hash = ComputeHash(data);

View file

@ -53,6 +53,7 @@ namespace PKHeX.Core
public abstract Record8 Records { get; }
public abstract TrainerCard8 TrainerCard { get; }
public abstract RaidSpawnList8 Raid { get; }
public abstract RaidSpawnList8 RaidArmor { get; }
public abstract TitleScreen8 TitleScreen { get; }
public abstract TeamIndexes8 TeamIndexes { get; }
#endregion

View file

@ -64,6 +64,7 @@ namespace PKHeX.Core
public override Record8 Records => Blocks.Records;
public override TrainerCard8 TrainerCard => Blocks.TrainerCard;
public override RaidSpawnList8 Raid => Blocks.Raid;
public override RaidSpawnList8 RaidArmor => Blocks.RaidArmor;
public override TitleScreen8 TitleScreen => Blocks.TitleScreen;
public override TeamIndexes8 TeamIndexes => Blocks.TeamIndexes;
@ -87,12 +88,13 @@ namespace PKHeX.Core
#endregion
public override SaveFile Clone() => new SAV8SWSH(BAK, AllBlocks.Select(z => z.Clone()).ToArray());
public override int MaxMoveID => Legal.MaxMoveID_8;
public override int MaxSpeciesID => Legal.MaxSpeciesID_8;
public override int MaxItemID => Legal.MaxItemID_8;
private int m_spec, m_item, m_move, m_abil;
public override int MaxMoveID => m_move;
public override int MaxSpeciesID => m_spec;
public override int MaxItemID => m_item;
public override int MaxBallID => Legal.MaxBallID_8;
public override int MaxGameID => Legal.MaxGameID_8;
public override int MaxAbilityID => Legal.MaxAbilityID_8;
public override int MaxAbilityID => m_abil;
private void Initialize()
{
@ -100,6 +102,22 @@ namespace PKHeX.Core
Party = 0;
PokeDex = 0;
TeamIndexes.LoadBattleTeams();
int rev = Zukan.GetRevision();
if (rev == 0)
{
m_move = Legal.MaxMoveID_8_O0;
m_spec = Legal.MaxSpeciesID_8_O0;
m_item = Legal.MaxItemID_8_O0;
m_abil = Legal.MaxAbilityID_8_O0;
}
else
{
m_move = Legal.MaxMoveID_8_R1;
m_spec = Legal.MaxSpeciesID_8_R1;
m_item = Legal.MaxItemID_8_R1;
m_abil = Legal.MaxAbilityID_8_R1;
}
}
public int GetRecord(int recordID) => Records.GetRecord(recordID);

View file

@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
namespace PKHeX.Core
{
@ -18,108 +19,230 @@ namespace PKHeX.Core
return blocks;
}
#if DEBUG
internal static IEnumerable<string> RipSizes(IReadOnlyCollection<SCBlock> blocks)
{
int ctr = 0;
foreach (var block in blocks)
{
if (block.Data.Length == 0)
continue;
if (ctr == 4)
{
yield return Environment.NewLine;
ctr = 0;
}
yield return $"0x{block.Key:X8}, 0x{block.Data.Length:X5}, ";
ctr++;
}
}
#endif
private static readonly uint[] DefaultChunkSizesSWSH =
{
0x0123EA7A, 0x00004, 0x017C3CBB, 0x00001, 0x0192A204, 0x00009, 0x02B647B4, 0x00004,
0x02C163FD, 0x00004, 0x02DD636A, 0x00004, 0x0490A3C3, 0x056F8, 0x051A8415, 0x00004,
0x053EF7F5, 0x00004, 0x066F38F5, 0x00004, 0x07165742, 0x00004, 0x071A3599, 0x00004,
0x097D2359, 0x00004, 0x0A01FC6C, 0x00004, 0x0A01FE1F, 0x00004, 0x0A0204EB, 0x00004,
0x0A02069E, 0x00004, 0x0A020851, 0x00004, 0x0A0515F5, 0x00004, 0x0A0517A8, 0x00004,
0x0A05195B, 0x00004, 0x0A051B0E, 0x00004, 0x0A051CC1, 0x00004, 0x0A051E74, 0x00004,
0x0A052027, 0x00004, 0x0A0521DA, 0x00004, 0x0A05238D, 0x00004, 0x0B90EFF8, 0x00004,
0x00A1F55B, 0x00004, 0x0123EA7A, 0x00004, 0x017C3CBB, 0x00001, 0x0192A204, 0x00009,
0x01A1F6EE, 0x00004, 0x01BFCAD0, 0x00002, 0x02B647B4, 0x00004, 0x02BFCC63, 0x00002,
0x02C163FD, 0x00004, 0x02DD636A, 0x00004, 0x034B256C, 0x00004, 0x03C18D2C, 0x00002,
0x03C550C3, 0x00004, 0x03C69A96, 0x00004, 0x044B26FF, 0x00004, 0x0490A3C3, 0x056F8,
0x04BFCF89, 0x00002, 0x04C18EBF, 0x00002, 0x04C55256, 0x00004, 0x051A8415, 0x00004,
0x053EF7F5, 0x00004, 0x05C553E9, 0x00004, 0x064B2A25, 0x00004, 0x066F38F5, 0x00004,
0x06C191E5, 0x00002, 0x07165742, 0x00004, 0x071A3599, 0x00004, 0x097D2359, 0x00004,
0x0A01FC6C, 0x00004, 0x0A01FE1F, 0x00004, 0x0A0204EB, 0x00004, 0x0A02069E, 0x00004,
0x0A020851, 0x00004, 0x0A0515F5, 0x00004, 0x0A0517A8, 0x00004, 0x0A05195B, 0x00004,
0x0A051B0E, 0x00004, 0x0A051CC1, 0x00004, 0x0A051E74, 0x00004, 0x0A052027, 0x00004,
0x0A0521DA, 0x00004, 0x0A05238D, 0x00004, 0x0AD1037C, 0x00004, 0x0B90EFF8, 0x00004,
0x0BFDEBA1, 0x00004, 0x0C7C3E38, 0x00004, 0x0CBEB855, 0x00004, 0x0CF6D916, 0x00004,
0x0D477836, 0x00004, 0x0D591902, 0x00004, 0x0D66012C, 0x50A00, 0x0D987D50, 0x00004,
0x0E11ED8C, 0x00004, 0x0E411743, 0x00001, 0x0E591A95, 0x00004, 0x0E85795E, 0x00004,
0x0F591C28, 0x00004, 0x10591DBB, 0x00004, 0x112D5141, 0x017C8, 0x11591F4E, 0x00004,
0x1177C2C4, 0x012F8, 0x125920E1, 0x00004, 0x127D6F1B, 0x00004, 0x13592274, 0x00004,
0x14592407, 0x00004, 0x149A1DD0, 0x00880, 0x14D0124C, 0x00648, 0x1559259A, 0x00004,
0x15D013DF, 0x00648, 0x15E9A450, 0x00004, 0x15E9A603, 0x00004, 0x15E9A7B6, 0x00004,
0x15E9AB1C, 0x00004, 0x15E9ACCF, 0x00004, 0x15E9AE82, 0x00004, 0x15E9B035, 0x00004,
0x15E9B701, 0x00004, 0x160CDE80, 0x00004, 0x1659272D, 0x00004, 0x169A20F6, 0x00880,
0x16AAA7FA, 0x06010, 0x175573FB, 0x00004, 0x177786BA, 0x00004, 0x179A2289, 0x00880,
0x17C4CBAC, 0x00004, 0x189A241C, 0x00880, 0x1920C1E4, 0x00084, 0x19722C89, 0x00440,
0x199A25AF, 0x00880, 0x1B4C150C, 0x00001, 0x1B882B09, 0x0021C, 0x1D482A63, 0x00004,
0x20FA6183, 0x00132, 0x224A1BD2, 0x00008, 0x24280E24, 0x00004, 0x24ADE637, 0x00004,
0x24F1F93C, 0x00004, 0x24F1FAEF, 0x00004, 0x24F1FCA2, 0x00004, 0x2575BD5B, 0x00004,
0x25A7CED1, 0x00004, 0x26A1BEDE, 0x00004, 0x26B99C02, 0x00004, 0x26FE3299, 0x00004,
0x26FE3B18, 0x00004, 0x26FE3CCB, 0x00004, 0x26FE3E7E, 0x00004, 0x26FE41E4, 0x00004,
0x26FE4397, 0x00004, 0x26FE454A, 0x00004, 0x26FE46FD, 0x00004, 0x2846B7DB, 0x00004,
0x0D0E00C9, 0x00004, 0x0D477836, 0x00004, 0x0D591902, 0x00004, 0x0D66012C, 0x50A00,
0x0D987D50, 0x00004, 0x0E11ED8C, 0x00004, 0x0E411743, 0x00001, 0x0E591A95, 0x00004,
0x0E615A8C, 0x023D4, 0x0E85795E, 0x00004, 0x0EA7CF37, 0x00004, 0x0F0F2271, 0x00004,
0x0F591C28, 0x00004, 0x0F850803, 0x00001, 0x0FA7D0CA, 0x00004, 0x10347218, 0x00004,
0x10591DBB, 0x00004, 0x10850996, 0x00001, 0x10A7D25D, 0x00004, 0x112D5141, 0x017C8,
0x11591F4E, 0x00004, 0x1177C2C4, 0x012F8, 0x11850B29, 0x00001, 0x125920E1, 0x00004,
0x127D6F1B, 0x00004, 0x12C96CFC, 0x00004, 0x13349604, 0x00001, 0x133FD4BC, 0x00002,
0x13592274, 0x00004, 0x14592407, 0x00004, 0x149A1DD0, 0x00880, 0x14C97022, 0x00004,
0x14D0124C, 0x00648, 0x151AE138, 0x00004, 0x1534992A, 0x00001, 0x153FD7E2, 0x00002,
0x1559259A, 0x00004, 0x158DA896, 0x00A68, 0x15C971B5, 0x00004, 0x15D013DF, 0x00648,
0x15E9A450, 0x00004, 0x15E9A603, 0x00004, 0x15E9A7B6, 0x00004, 0x15E9AB1C, 0x00004,
0x15E9ACCF, 0x00004, 0x15E9AE82, 0x00004, 0x15E9B035, 0x00004, 0x15E9B701, 0x00004,
0x160CDE80, 0x00004, 0x16349ABD, 0x00001, 0x163FD975, 0x00002, 0x1659272D, 0x00004,
0x169A20F6, 0x00880, 0x16AAA7FA, 0x06010, 0x171AE45E, 0x00004, 0x175573FB, 0x00004,
0x177786BA, 0x00004, 0x179A2289, 0x00880, 0x17C4CBAC, 0x00004, 0x181AE5F1, 0x00004,
0x184014A4, 0x00004, 0x189A241C, 0x00880, 0x1920C1E4, 0x00084, 0x19401637, 0x00004,
0x19722C89, 0x00440, 0x199A25AF, 0x00880, 0x1A961810, 0x00004, 0x1B40195D, 0x00004,
0x1B4C150C, 0x00001, 0x1B882B09, 0x0021C, 0x1B9619A3, 0x00004, 0x1BE94648, 0x00004,
0x1C5FAE08, 0x00002, 0x1D482A63, 0x00004, 0x1D961CC9, 0x00004, 0x1DC26AF0, 0x00001,
0x1DD41D8C, 0x00004, 0x1DE9496E, 0x00004, 0x1E5FB12E, 0x00002, 0x1EC26C83, 0x00001,
0x1EE94B01, 0x00004, 0x1F5FB2C1, 0x00002, 0x1F637658, 0x00004, 0x206377EB, 0x00004,
0x20C26FA9, 0x00001, 0x20DA9878, 0x00001, 0x20FA6183, 0x00132, 0x2163797E, 0x00004,
0x224A1BD2, 0x00008, 0x22DA9B9E, 0x00001, 0x23DA9D31, 0x00001, 0x23E747F4, 0x00001,
0x24280E24, 0x00004, 0x2454C888, 0x00001, 0x24ADE637, 0x00004, 0x24E74987, 0x00001,
0x24F1F93C, 0x00004, 0x24F1FAEF, 0x00004, 0x24F1FCA2, 0x00004, 0x2554CA1B, 0x00001,
0x2575BD5B, 0x00004, 0x25A7CED1, 0x00004, 0x25E74B1A, 0x00001, 0x2654CBAE, 0x00001,
0x26A1BEDE, 0x00004, 0x26B99C02, 0x00004, 0x26FE3299, 0x00004, 0x26FE3B18, 0x00004,
0x26FE3CCB, 0x00004, 0x26FE3E7E, 0x00004, 0x26FE41E4, 0x00004, 0x26FE4397, 0x00004,
0x26FE454A, 0x00004, 0x26FE46FD, 0x00004, 0x2846B7DB, 0x00004, 0x28BC6BDC, 0x00002,
0x28E707F5, 0x21FC0, 0x28F03D03, 0x00004, 0x29036436, 0x00004, 0x2985FE5D, 0x00814,
0x29E026C7, 0x00001, 0x2B103B06, 0x00004, 0x2D6FBA6A, 0x00570, 0x2DFA8C4E, 0x00004,
0x2EB1B190, 0x00020, 0x30080BB6, 0x00004, 0x30671AD9, 0x00008, 0x32C4F443, 0x00004,
0x33068788, 0x00004, 0x33F39467, 0x00048, 0x34E60D88, 0x00004, 0x355C8314, 0x00004,
0x363D064C, 0x00004, 0x3677602D, 0x00004, 0x36E2F1C8, 0x00004, 0x375A5D09, 0x00004,
0x37A13A2A, 0x00004, 0x37DA95A3, 0x000C8, 0x38548020, 0x00004, 0x39227A79, 0x00D50,
0x3A68EA36, 0x00004, 0x3A6B2A3F, 0x00004, 0x3B23B1E2, 0x00004, 0x3DBE736D, 0x00004,
0x29A93E10, 0x00004, 0x29BC6D6F, 0x00002, 0x29E026C7, 0x00001, 0x2A7F88A8, 0x00001,
0x2B07632B, 0x00004, 0x2B103B06, 0x00004, 0x2B232D98, 0x00001, 0x2BBC7095, 0x00002,
0x2C232F2B, 0x00001, 0x2C7F8BCE, 0x00001, 0x2D2330BE, 0x00001, 0x2D6FBA6A, 0x00570,
0x2D7F8D61, 0x00001, 0x2DFA8C4E, 0x00004, 0x2E9F837C, 0x00001, 0x2EB1B190, 0x00020,
0x2F773C75, 0x00004, 0x2F9F850F, 0x00001, 0x2FC2FD50, 0x00004, 0x30080BB6, 0x00004,
0x30396510, 0x00002, 0x30671AD9, 0x00008, 0x30C2FEE3, 0x00004, 0x313966A3, 0x00002,
0x319F8835, 0x00001, 0x31A13425, 0x00004, 0x31C30076, 0x00004, 0x32396836, 0x00002,
0x32C4F443, 0x00004, 0x32EF5030, 0x00001, 0x33068788, 0x00004, 0x331EF563, 0x00004,
0x331EF716, 0x00004, 0x335AA3F7, 0x00001, 0x33EF51C3, 0x00001, 0x33F39467, 0x00048,
0x345AA58A, 0x00001, 0x3468783B, 0x00004, 0x34E60D88, 0x00004, 0x34EF5356, 0x00001,
0x355AA71D, 0x00001, 0x355C8314, 0x00004, 0x356879CE, 0x00004, 0x363D064C, 0x00004,
0x36687B61, 0x00004, 0x3677602D, 0x00004, 0x36E2F1C8, 0x00004, 0x374090B6, 0x00004,
0x375A5D09, 0x00004, 0x37A13A2A, 0x00004, 0x37DA95A3, 0x000C8, 0x38548020, 0x00004,
0x39227A79, 0x00D50, 0x39B43CEF, 0x00004, 0x3A313F00, 0x00004, 0x3A3140B3, 0x00004,
0x3A314266, 0x00004, 0x3A314419, 0x00004, 0x3A31477F, 0x00004, 0x3A314932, 0x00004,
0x3A314AE5, 0x00004, 0x3A315364, 0x00004, 0x3A315517, 0x00004, 0x3A345DA2, 0x00004,
0x3A345F55, 0x00004, 0x3A377578, 0x00004, 0x3A37772B, 0x00004, 0x3A377A91, 0x00004,
0x3A377FAA, 0x00004, 0x3A3A90B4, 0x00004, 0x3A68EA36, 0x00004, 0x3A6B2A3F, 0x00004,
0x3A6F5768, 0x00004, 0x3B23B1E2, 0x00004, 0x3BFF8084, 0x00002, 0x3C6F5A8E, 0x00004,
0x3C7119C4, 0x00004, 0x3CF2E964, 0x00001, 0x3CFF8217, 0x00002, 0x3D6F5C21, 0x00004,
0x3DBE736D, 0x00004, 0x3DF2EAF7, 0x00001, 0x3DFF83AA, 0x00002, 0x3E711CEA, 0x00004,
0x3E8CFA15, 0x033D0, 0x3F64E8A0, 0x00004, 0x3F680229, 0x00004, 0x3F6A4232, 0x00004,
0x3F6D5BBB, 0x00004, 0x3F8120BA, 0x00002, 0x3FE99FE1, 0x00004, 0x3FF17E2F, 0x00004,
0x4033C7DB, 0x00001, 0x4034BE27, 0x00004, 0x40CC5A21, 0x00002, 0x41309084, 0x00001,
0x41DAB84F, 0x00004, 0x436CAF2B, 0x00004, 0x437E8C7C, 0x00004, 0x439116A4, 0x00001,
0x443FB19E, 0x00038, 0x4584784A, 0x00004, 0x46ACC334, 0x00028, 0x46BC63C5, 0x00004,
0x4716C404, 0x04B00, 0x48043955, 0x00004, 0x495E3674, 0x00004, 0x4A0F21AD, 0x00004,
0x4A69631D, 0x00004, 0x4A741A7A, 0x00004, 0x4ADD5E5C, 0x00001, 0x4AEA5A7E, 0x00004,
0x4B8B80F6, 0x00004, 0x4BC891F4, 0x00004, 0x4C54B0CF, 0x00004, 0x4C67BA2E, 0x00004,
0x4CDFE1B5, 0x00004, 0x50925E91, 0x02964, 0x539DD549, 0x00004, 0x54AC4B39, 0x00004,
0x5586B8F0, 0x02304, 0x5686BA83, 0x02304, 0x5786BC16, 0x02304, 0x57F29628, 0x00004,
0x582E4A5C, 0x00004, 0x5886BDA9, 0x02304, 0x5986BF3C, 0x02304, 0x5A86C0CF, 0x02304,
0x5B86C262, 0x02304, 0x5BA54B4B, 0x00004, 0x5C86C3F5, 0x02304, 0x5D77D781, 0x00004,
0x5ECE9F76, 0x00004, 0x5F135643, 0x00004, 0x5F74FCEE, 0x00002, 0x5FCEA109, 0x00004,
0x605EBC30, 0x00001, 0x6148F6AC, 0x00810, 0x6186CBD4, 0x02304, 0x61952B51, 0x00004,
0x61BC9BB4, 0x00004, 0x6226F5AD, 0x00002, 0x624C7B30, 0x00004, 0x62743428, 0x00002,
0x6286CD67, 0x02304, 0x62F05895, 0x00004, 0x64CEA8E8, 0x00004, 0x65CEAA7B, 0x00004,
0x66CEAC0E, 0x00004, 0x6701AF09, 0x00004, 0x67A659C4, 0x00004, 0x67CEADA1, 0x00004,
0x680EEB85, 0x0426C, 0x68CEAF34, 0x00004, 0x68DE4CD2, 0x00004, 0x697141AC, 0x00004,
0x697D1E29, 0x00004, 0x69CEB0C7, 0x00004, 0x6A09346C, 0x00132, 0x6ACEB25A, 0x00004,
0x6BCEB3ED, 0x00004, 0x6C3B5E62, 0x00004, 0x6C99F9A0, 0x00002, 0x6EB72940, 0x067D0,
0x6F411E56, 0x00004, 0x6F884079, 0x00004, 0x71599CC8, 0x00004, 0x7169F53F, 0x00004,
0x71825204, 0x00001, 0x718621A5, 0x00132, 0x721AE36F, 0x00004, 0x737D1964, 0x00004,
0x765468C3, 0x00004, 0x76921EEB, 0x00001, 0x7701D95E, 0x04610, 0x77275404, 0x00004,
0x77BD26F2, 0x00004, 0x783D2039, 0x00004, 0x783EEFDC, 0x00004, 0x7875451A, 0x01F50,
0x79151C13, 0x00004, 0x7964A5A9, 0x00004, 0x79C56A5C, 0x00004, 0x7AADA3E3, 0x00004,
0x7BE8A4C6, 0x00020, 0x7C86783F, 0x00008, 0x7D249649, 0x00004, 0x7E7E36B9, 0x00004,
0x7EF9C424, 0x00004, 0x81961C6F, 0x00004, 0x83978C43, 0x00004, 0x84B301C2, 0x00004,
0x84FD4F59, 0x00132, 0x85FDF16A, 0x00004, 0x865605E6, 0x00004, 0x86F9272C, 0x00004,
0x874DA6FA, 0x001D0, 0x87560779, 0x00004, 0x88F6D6AE, 0x033D0, 0x8902E727, 0x00004,
0x89048303, 0x033D0, 0x89A3A2B6, 0x00004, 0x8A4C1426, 0x00004, 0x8A4C178C, 0x00004,
0x8A4C193F, 0x00004, 0x8A4C1CA5, 0x00004, 0x8AD859BF, 0x00004, 0x8C560F58, 0x00004,
0x8C804D7B, 0x00004, 0x8CA88020, 0x00038, 0x8CBBFD90, 0x00008, 0x8CD9973A, 0x00004,
0x8D321AB8, 0x000D0, 0x8D5610EB, 0x00004, 0x8E1D74E8, 0x00004, 0x8E56127E, 0x00004,
0x8F3C763E, 0x00004, 0x8F561411, 0x00004, 0x9033EB7B, 0x00A68, 0x905615A4, 0x00004,
0x91561737, 0x00004, 0x91AC63B3, 0x00004, 0x925618CA, 0x00004, 0x92EB0306, 0x00004,
0x92F4F7F0, 0x00055, 0x93561A5D, 0x00004, 0x944481DD, 0x00132, 0x9497A849, 0x00004,
0x95F4FCA9, 0x00019, 0x96D3F39F, 0x00002, 0x9751BABE, 0x00400, 0x97D712D3, 0x00004,
0x982972C2, 0x00004, 0x996BEEAA, 0x00004, 0x99B9F60B, 0x00004, 0x99F197E9, 0x00004,
0x9ACC0AEC, 0x00004, 0x9ACC0E52, 0x00004, 0x9ACC1005, 0x00004, 0x9C781AE2, 0x00004,
0x9CE5CDB5, 0x00132, 0x9EC079DA, 0x00002, 0x9EED59DE, 0x00004, 0xA0F49CFB, 0x00004,
0xA202729F, 0x00004, 0xA3419FC7, 0x00019, 0xA4D5B8C0, 0x00004, 0xA4E3B2CF, 0x00004,
0xA5D0453A, 0x00004, 0xA7301FBD, 0x00004, 0xA7B8C97B, 0x00004, 0xA8067616, 0x00004,
0xA83021C1, 0x00268, 0xA8EB523D, 0x00004, 0xA9B04C50, 0x00004, 0xAA86248B, 0x00004,
0xAD2750BE, 0x00280, 0xAD3920F5, 0x1241C, 0xAD4E4275, 0x00004, 0xAD6F9196, 0x00004,
0xAD9DFA6A, 0x023D4, 0xAF0E8346, 0x00004, 0xAF37666F, 0x00004, 0xAF376822, 0x00004,
0xAF3769D5, 0x00004, 0xB027F396, 0x00004, 0xB125CDDC, 0x00004, 0xB1C26FB0, 0x000F8,
0xB1C7C436, 0x00004, 0xB1DDDCA8, 0x00028, 0xB2137AFE, 0x00004, 0xB25C772B, 0x50C20,
0xB47E1776, 0x0001E, 0xB9E1DE0C, 0x00004, 0xBB7B57FB, 0x00004, 0xBE3BD183, 0x00004,
0xC0362EDD, 0x00004, 0xC0DE5C5F, 0x00408, 0xC10889B1, 0x00004, 0xC1BA2375, 0x00004,
0xC23AF741, 0x00004, 0xC3FB9E77, 0x000A0, 0xC4F35C2E, 0x00004, 0xC6102A59, 0x00004,
0xC7161487, 0x00004, 0xC7652F1C, 0x00004, 0xC87219F6, 0x00132, 0xC94D1C48, 0x00004,
0xC9541EB3, 0x00002, 0xC96FEA27, 0x00004, 0xC9A133BC, 0x00004, 0xC9A138D5, 0x00004,
0xC9E6E098, 0x00004, 0xCA5FA1A3, 0x00004, 0xCA8A8CEE, 0x00004, 0xCC45DA54, 0x00004,
0xCCC153CD, 0x00004, 0xCE07D358, 0x0001C, 0xCE4AC6FA, 0x00001, 0xCE76E539, 0x00004,
0xD08391B9, 0x00004, 0xD105027A, 0x00132, 0xD14C95F9, 0x00004, 0xD224F9AC, 0x00F1C,
0xD81C8A46, 0x00004, 0xDC82C7C9, 0x00004, 0xDD12C9A5, 0x00008, 0xDFAAEECD, 0x00004,
0xE048C668, 0x00008, 0xE07F44FC, 0x02304, 0xE17F468F, 0x02304, 0xE250A142, 0x00004,
0xE2798DDE, 0x00001, 0xE2950DA8, 0x00001, 0xE2ED6B1D, 0x00320, 0xE2F6E456, 0x00008,
0xE3ABBA00, 0x00004, 0xE40A0EF4, 0x00004, 0xE47F4B48, 0x02304, 0xE57F4CDB, 0x02304,
0xE67F4E6E, 0x02304, 0xE77F5001, 0x02304, 0xE87F5194, 0x02304, 0xE97F5327, 0x02304,
0xE9BE28BF, 0x000F0, 0xEA40157B, 0x00014, 0xEA7F54BA, 0x02304, 0xEB7F564D, 0x02304,
0xECF1AE60, 0x02304, 0xEDF1AFF3, 0x02304, 0xEE7B2ABD, 0x00001, 0xEE7D64D5, 0x00538,
0xEEE5A3F8, 0x033D0, 0xEEF1B186, 0x02304, 0xEFCAE04E, 0x116C4, 0xEFF1B319, 0x02304,
0xF0159FB2, 0x00004, 0xF0576532, 0x00002, 0xF06213E4, 0x00004, 0xF0F1B4AC, 0x02304,
0x3F6D5BBB, 0x00004, 0x3F711E7D, 0x00004, 0x3F8120BA, 0x00002, 0x3F936BA9, 0x02790,
0x3FE99FE1, 0x00004, 0x3FF17E2F, 0x00004, 0x3FF2EE1D, 0x00001, 0x4033C7DB, 0x00001,
0x4034BE27, 0x00004, 0x40B20AF8, 0x00004, 0x40CC5A21, 0x00002, 0x40E9A268, 0x00001,
0x41309084, 0x00001, 0x4192B91C, 0x00004, 0x41DAB84F, 0x00004, 0x41E9A3FB, 0x00001,
0x41F566B2, 0x00004, 0x4292BAAF, 0x00004, 0x435C4F14, 0x00002, 0x436CAF2B, 0x00004,
0x437E8C7C, 0x00004, 0x439116A4, 0x00001, 0x43D3E2C3, 0x00004, 0x43E9A721, 0x00001,
0x443FB19E, 0x00038, 0x4492BDD5, 0x00004, 0x45462EBF, 0x00004, 0x455C523A, 0x00002,
0x4584784A, 0x00004, 0x465C53CD, 0x00002, 0x46ACC334, 0x00028, 0x46BC63C5, 0x00004,
0x46D1FDC7, 0x00004, 0x4716C404, 0x04B00, 0x47D73984, 0x00001, 0x48043955, 0x00004,
0x495E3674, 0x00004, 0x49D73CAA, 0x00001, 0x4A0F21AD, 0x00004, 0x4A3BED80, 0x00004,
0x4A69631D, 0x00004, 0x4A741A7A, 0x00004, 0x4AD73E3D, 0x00001, 0x4ADD5E5C, 0x00001,
0x4AEA5A7E, 0x00004, 0x4B8B80F6, 0x00004, 0x4BC891F4, 0x00004, 0x4C3BF0A6, 0x00004,
0x4C54B0CF, 0x00004, 0x4C67BA2E, 0x00004, 0x4CDFE1B5, 0x00004, 0x4D3BF239, 0x00004,
0x4D50B655, 0x00004, 0x4D52705C, 0x00001, 0x4D8DD022, 0x00004, 0x4DBB9B79, 0x00004,
0x4E5271EF, 0x00001, 0x4EF25E14, 0x00004, 0x4FF25FA7, 0x00004, 0x50359D63, 0x00004,
0x50527515, 0x00001, 0x50925E91, 0x02964, 0x50F2613A, 0x00004, 0x52689B80, 0x00004,
0x533DF099, 0x00004, 0x539DD549, 0x00004, 0x54AC4B39, 0x00004, 0x54D5CDC4, 0x00004,
0x5586B8F0, 0x02304, 0x55D5CF57, 0x00004, 0x5686BA83, 0x02304, 0x56D5D0EA, 0x00004,
0x5786BC16, 0x02304, 0x57F29628, 0x00004, 0x582E4A5C, 0x00004, 0x5886BDA9, 0x02304,
0x5986BF3C, 0x02304, 0x5A86C0CF, 0x02304, 0x5B86C262, 0x02304, 0x5BA54B4B, 0x00004,
0x5BAAACCC, 0x00004, 0x5C548FE0, 0x00001, 0x5C63C0C5, 0x00004, 0x5C86C3F5, 0x02304,
0x5D549173, 0x00001, 0x5D77D781, 0x00004, 0x5DCF71D9, 0x00004, 0x5E549306, 0x00001,
0x5ECE9F76, 0x00004, 0x5F135643, 0x00004, 0x5F1D8945, 0x00004, 0x5F74FCEE, 0x00002,
0x5FCEA109, 0x00004, 0x605EBC30, 0x00001, 0x6106657D, 0x00004, 0x6148F6AC, 0x00810,
0x6186CBD4, 0x02304, 0x61952B51, 0x00004, 0x61BC9BB4, 0x00004, 0x61D277C7, 0x00004,
0x61D2797A, 0x00004, 0x61D27B2D, 0x00004, 0x6226F5AD, 0x00002, 0x624C7B30, 0x00004,
0x62743428, 0x00002, 0x6286CD67, 0x02304, 0x62A0A180, 0x00004, 0x62F05895, 0x00004,
0x63170940, 0x00002, 0x63A0A313, 0x00004, 0x64170AD3, 0x00002, 0x64A0A4A6, 0x00004,
0x64CEA8E8, 0x00004, 0x65170C66, 0x00002, 0x65CEAA7B, 0x00004, 0x66CEAC0E, 0x00004,
0x6701AF09, 0x00004, 0x67A659C4, 0x00004, 0x67CEADA1, 0x00004, 0x67F25394, 0x00001,
0x680EEB85, 0x0426C, 0x6816DFDB, 0x00004, 0x68BBA8B1, 0x00004, 0x68CEAF34, 0x00004,
0x68DE4CD2, 0x00004, 0x697141AC, 0x00004, 0x697D1E29, 0x00004, 0x69CEB0C7, 0x00004,
0x69F256BA, 0x00001, 0x6A09346C, 0x00132, 0x6A262628, 0x00004, 0x6A614361, 0x00004,
0x6ACEB25A, 0x00004, 0x6AF2584D, 0x00001, 0x6B2627BB, 0x00004, 0x6BCEB3ED, 0x00004,
0x6C12BF1F, 0x00004, 0x6C3B5E62, 0x00004, 0x6C99F9A0, 0x00002, 0x6D12C0B2, 0x00004,
0x6D262AE1, 0x00004, 0x6D601EDD, 0x00004, 0x6E12C245, 0x00004, 0x6E972CFB, 0x00002,
0x6EB72940, 0x067D0, 0x6EEEC240, 0x00001, 0x6F411E56, 0x00004, 0x6F66951C, 0x00004,
0x6F6696CF, 0x00004, 0x6F669A35, 0x00004, 0x6F884079, 0x00004, 0x6F972E8E, 0x00002,
0x70973021, 0x00002, 0x70EEC566, 0x00001, 0x71115B78, 0x00002, 0x71599CC8, 0x00004,
0x7169F53F, 0x00004, 0x71825204, 0x00001, 0x718621A5, 0x00132, 0x71EEC6F9, 0x00001,
0x72115D0B, 0x00002, 0x721AE36F, 0x00004, 0x737D1964, 0x00004, 0x74116031, 0x00002,
0x74441C98, 0x00001, 0x748543C7, 0x0000B, 0x758C45E8, 0x00001, 0x76441FBE, 0x00001,
0x765468C3, 0x00004, 0x768C477B, 0x00001, 0x76921EEB, 0x00001, 0x7701D95E, 0x04610,
0x771E4C88, 0x00004, 0x77275404, 0x00004, 0x77442151, 0x00001, 0x77BD26F2, 0x00004,
0x780BF029, 0x00004, 0x783D2039, 0x00004, 0x783EEFDC, 0x00004, 0x7875451A, 0x01F50,
0x788C4AA1, 0x00001, 0x789FF72D, 0x00002, 0x78D78638, 0x00040, 0x79151C13, 0x00004,
0x7964A5A9, 0x00004, 0x7999DAFD, 0x00004, 0x79C56A5C, 0x00004, 0x79D787CB, 0x00040,
0x7A7A3480, 0x00004, 0x7A9B68E2, 0x00004, 0x7A9EF7D9, 0x00004, 0x7AADA3E3, 0x00004,
0x7AD7895E, 0x00040, 0x7AF09C40, 0x00002, 0x7B7A3613, 0x00004, 0x7BD78AF1, 0x00040,
0x7BE8A4C6, 0x00020, 0x7BF09DD3, 0x00002, 0x7C86783F, 0x00008, 0x7D249649, 0x00004,
0x7D6EEAB4, 0x00001, 0x7D7A3939, 0x00004, 0x7DF0A0F9, 0x00002, 0x7E6EEC47, 0x00001,
0x7E7E36B9, 0x00004, 0x7EF9C424, 0x00004, 0x7F4B4B10, 0x00004, 0x7FD700DC, 0x00001,
0x806EEF6D, 0x00001, 0x81961C6F, 0x00004, 0x81AD2AF6, 0x00004, 0x81D70402, 0x00001,
0x82D70595, 0x00001, 0x83978C43, 0x00004, 0x84B301C2, 0x00004, 0x84FD4F59, 0x00132,
0x85FDF16A, 0x00004, 0x865605E6, 0x00004, 0x86F9272C, 0x00004, 0x874DA6FA, 0x001D0,
0x87560779, 0x00004, 0x876D7A3B, 0x00004, 0x87F611F8, 0x00004, 0x87F613AB, 0x00004,
0x87F61711, 0x00004, 0x87F92D34, 0x00004, 0x886D7BCE, 0x00004, 0x88F6D6AE, 0x033D0,
0x8902E727, 0x00004, 0x89048303, 0x033D0, 0x892112D4, 0x00002, 0x896D7D61, 0x00004,
0x89A3A2B6, 0x00004, 0x8A211467, 0x00002, 0x8A468BEC, 0x00004, 0x8A4C1426, 0x00004,
0x8A4C178C, 0x00004, 0x8A4C193F, 0x00004, 0x8A4C1CA5, 0x00004, 0x8AD859BF, 0x00004,
0x8B2115FA, 0x00002, 0x8B4600C9, 0x00004, 0x8B468D7F, 0x00004, 0x8B93CB0E, 0x00004,
0x8C096F9E, 0x00004, 0x8C468F12, 0x00004, 0x8C560F58, 0x00004, 0x8C804D7B, 0x00004,
0x8CA88020, 0x00038, 0x8CBBFD90, 0x00008, 0x8CD9973A, 0x00004, 0x8D321AB8, 0x000D0,
0x8D5610EB, 0x00004, 0x8DBF8019, 0x00004, 0x8E1D74E8, 0x00004, 0x8E56127E, 0x00004,
0x8EF4E556, 0x00009, 0x8F3C763E, 0x00004, 0x8F561411, 0x00004, 0x9033EB7B, 0x00A68,
0x905615A4, 0x00004, 0x91561737, 0x00004, 0x91AC63B3, 0x00004, 0x91E09E4C, 0x00001,
0x91E89ACF, 0x00004, 0x925618CA, 0x00004, 0x92B2F3F3, 0x00004, 0x92E09FDF, 0x00001,
0x92EB0306, 0x00004, 0x92F4F7F0, 0x00055, 0x93561A5D, 0x00004, 0x944481DD, 0x00132,
0x9497A849, 0x00004, 0x94E0A305, 0x00001, 0x95A75FF8, 0x00001, 0x95F4FCA9, 0x00019,
0x96A7618B, 0x00001, 0x96D3F39F, 0x00002, 0x9751BABE, 0x00400, 0x97D712D3, 0x00004,
0x982972C2, 0x00004, 0x982FCB42, 0x00004, 0x98A764B1, 0x00001, 0x98B0956F, 0x00001,
0x996BEEAA, 0x00004, 0x99B09702, 0x00001, 0x99B9F60B, 0x00004, 0x99F197E9, 0x00004,
0x9AB09895, 0x00001, 0x9AC98C4C, 0x00004, 0x9ACC0AEC, 0x00004, 0x9ACC0E52, 0x00004,
0x9ACC1005, 0x00004, 0x9C781AE2, 0x00004, 0x9CC98F72, 0x00004, 0x9CE5CDB5, 0x00132,
0x9CF58395, 0x00001, 0x9DC99105, 0x00004, 0x9EC079DA, 0x00002, 0x9EED59DE, 0x00004,
0x9F730ECF, 0x00002, 0xA0731062, 0x00002, 0xA0F49CFB, 0x00004, 0xA17311F5, 0x00002,
0xA1D06D0C, 0x00004, 0xA1F76014, 0x00004, 0xA202729F, 0x00004, 0xA2954E3A, 0x00004,
0xA2D06E9F, 0x00004, 0xA2F761A7, 0x00004, 0xA3419FC7, 0x00019, 0xA3F7633A, 0x00004,
0xA4042B23, 0x00004, 0xA448D9F0, 0x00004, 0xA4B74E00, 0x00004, 0xA4D071C5, 0x00004,
0xA4D5B8C0, 0x00004, 0xA4E3B2CF, 0x00004, 0xA5D0453A, 0x00004, 0xA7301FBD, 0x00004,
0xA7B8C97B, 0x00004, 0xA8067616, 0x00004, 0xA83021C1, 0x00268, 0xA8533433, 0x00004,
0xA8EB523D, 0x00004, 0xA9B04C50, 0x00004, 0xAA86248B, 0x00004, 0xAD2750BE, 0x00280,
0xAD3920F5, 0x1241C, 0xAD4E4275, 0x00004, 0xAD67A297, 0x00004, 0xAD6F9196, 0x00004,
0xAD9DFA6A, 0x023D4, 0xAE3497CF, 0x00004, 0xAE474936, 0x00004, 0xAEF960AC, 0x00001,
0xAF0E8346, 0x00004, 0xAF37666F, 0x00004, 0xAF376822, 0x00004, 0xAF3769D5, 0x00004,
0xAFF9623F, 0x00001, 0xB027F396, 0x00004, 0xB046236C, 0x00004, 0xB0CD214B, 0x00004,
0xB0F963D2, 0x00001, 0xB125CDDC, 0x00004, 0xB14624FF, 0x00004, 0xB189D2B8, 0x00004,
0xB189D46B, 0x00004, 0xB189D7D1, 0x00004, 0xB1C26FB0, 0x000F8, 0xB1C7C436, 0x00004,
0xB1DDDCA8, 0x00028, 0xB2137AFE, 0x00004, 0xB25C772B, 0x50C20, 0xB3462825, 0x00004,
0xB3FF0924, 0x00001, 0xB42F0EDC, 0x00004, 0xB47E1776, 0x0001E, 0xB4FF0AB7, 0x00001,
0xB58354DB, 0x00004, 0xB5C02173, 0x00004, 0xB5FF0C4A, 0x00001, 0xB6C02306, 0x00004,
0xB7C02499, 0x00004, 0xB8495C0F, 0x00004, 0xB868EE77, 0x00040, 0xB9495DA2, 0x00004,
0xB98F962B, 0x00004, 0xB9C0ECFC, 0x00004, 0xB9E1DE0C, 0x00004, 0xBA29D287, 0x00001,
0xBA495F35, 0x00004, 0xBB1DE8EF, 0x00004, 0xBB29D41A, 0x00001, 0xBB7B57FB, 0x00004,
0xBC29D5AD, 0x00001, 0xBC4ADA83, 0x00004, 0xBE3BD183, 0x00004, 0xBF17C11F, 0x00004,
0xBF8E28DF, 0x00002, 0xC017C2B2, 0x00004, 0xC0362EDD, 0x00004, 0xC08E2A72, 0x00002,
0xC0DE5C5F, 0x00408, 0xC10889B1, 0x00004, 0xC117C445, 0x00004, 0xC1264133, 0x00001,
0xC18E2C05, 0x00002, 0xC1BA2375, 0x00004, 0xC22642C6, 0x00001, 0xC23AF741, 0x00004,
0xC2EFEC6A, 0x00004, 0xC3264459, 0x00001, 0xC35F6291, 0x00004, 0xC3FB9E77, 0x000A0,
0xC4F35C2E, 0x00004, 0xC5FC19DC, 0x00002, 0xC6102A59, 0x00004, 0xC7161487, 0x00004,
0xC7652F1C, 0x00004, 0xC7911610, 0x00004, 0xC87219F6, 0x00132, 0xC89117A3, 0x00004,
0xC8E44448, 0x00004, 0xC94D1C48, 0x00004, 0xC9541EB3, 0x00002, 0xC96FEA27, 0x00004,
0xC9A133BC, 0x00004, 0xC9A138D5, 0x00004, 0xC9E6E098, 0x00004, 0xCA0279C5, 0x00004,
0xCA5FA1A3, 0x00004, 0xCA8A8CEE, 0x00004, 0xCA911AC9, 0x00004, 0xCAE4476E, 0x00004,
0xCB135C68, 0x00004, 0xCBE44901, 0x00004, 0xCC45DA54, 0x00004, 0xCCC153CD, 0x00004,
0xCE07D358, 0x0001C, 0xCE4AC6FA, 0x00001, 0xCE76E539, 0x00004, 0xCEEB37FF, 0x00001,
0xCF5BC550, 0x00004, 0xCFEB3992, 0x00001, 0xD033E667, 0x00004, 0xD05BC6E3, 0x00004,
0xD08391B9, 0x00004, 0xD0EB3B25, 0x00001, 0xD105027A, 0x00132, 0xD14C95F9, 0x00004,
0xD15BC876, 0x00004, 0xD224F9AC, 0x00F1C, 0xD25BCA09, 0x00004, 0xD25E08A0, 0x00004,
0xD35BCB9C, 0x00004, 0xD35E0A33, 0x00004, 0xD45BCD2F, 0x00004, 0xD4F8410C, 0x00002,
0xD55BCEC2, 0x00004, 0xD65BD055, 0x00004, 0xD6F84432, 0x00002, 0xD7F845C5, 0x00002,
0xD81C8A46, 0x00004, 0xDA5E1538, 0x00004, 0xDB5E16CB, 0x00004, 0xDBEF0145, 0x00004,
0xDC5E185E, 0x00004, 0xDC82C7C9, 0x00004, 0xDCBDFB50, 0x00004, 0xDD12C9A5, 0x00008,
0xDD5E19F1, 0x00004, 0xDDBDFCE3, 0x00004, 0xDE5E1B84, 0x00004, 0xDEBDFE76, 0x00004,
0xDF5E1D17, 0x00004, 0xDFAAEECD, 0x00004, 0xDFC8508B, 0x00001, 0xE048C668, 0x00008,
0xE05E1EAA, 0x00004, 0xE07F44FC, 0x02304, 0xE0C8521E, 0x00001, 0xE15E203D, 0x00004,
0xE17F468F, 0x02304, 0xE1C853B1, 0x00001, 0xE250A142, 0x00004, 0xE2798DDE, 0x00001,
0xE2950DA8, 0x00001, 0xE2ED6B1D, 0x00320, 0xE2F6E456, 0x00008, 0xE3181BAC, 0x00001,
0xE3ABBA00, 0x00004, 0xE40A0EF4, 0x00004, 0xE479EE37, 0x00810, 0xE47F4B48, 0x02304,
0xE5004319, 0x00280, 0xE5181ED2, 0x00001, 0xE57F4CDB, 0x02304, 0xE6182065, 0x00001,
0xE64A93E0, 0x00001, 0xE67F4E6E, 0x02304, 0xE74A9573, 0x00001, 0xE75196AB, 0x00004,
0xE77F5001, 0x02304, 0xE7C7FE6B, 0x00002, 0xE851983E, 0x00004, 0xE85BEA57, 0x00004,
0xE87F5194, 0x02304, 0xE8C7FFFE, 0x00002, 0xE94A9899, 0x00001, 0xE95199D1, 0x00004,
0xE97F5327, 0x02304, 0xE9BE28BF, 0x000F0, 0xE9C80191, 0x00002, 0xEA40157B, 0x00014,
0xEA7F54BA, 0x02304, 0xEB7F564D, 0x02304, 0xECF1AE60, 0x02304, 0xEDCE8E4C, 0x00004,
0xEDF1AFF3, 0x02304, 0xEE7B2ABD, 0x00001, 0xEE7D64D5, 0x00538, 0xEE841484, 0x00004,
0xEEE5A3F8, 0x033D0, 0xEEF1B186, 0x02304, 0xEFCAE04E, 0x116C4, 0xEFCE9172, 0x00004,
0xEFF1B319, 0x02304, 0xF0159FB2, 0x00004, 0xF0576532, 0x00002, 0xF06213E4, 0x00004,
0xF0CE9305, 0x00004, 0xF0F1B4AC, 0x02304, 0xF19F7785, 0x06000, 0xF1C4948B, 0x00004,
0xF1F1B63F, 0x02304, 0xF239E881, 0x02955, 0xF25C070E, 0x00110, 0xF2F1B7D2, 0x02304,
0xF3F1B965, 0x02304, 0xF64719D9, 0x00004, 0xF75FC566, 0x00004, 0xF75FC719, 0x00004,
0xF7DFDD95, 0x00004, 0xF8154AC9, 0x00004, 0xF8A1B32F, 0x00004, 0xF8E07F9B, 0x00004,
0xF36C4BC3, 0x00004, 0xF3F1B965, 0x02304, 0xF5A72492, 0x00004, 0xF5BACCEC, 0x00004,
0xF64719D9, 0x00004, 0xF6C672E9, 0x00004, 0xF6FB2550, 0x00001, 0xF73CDD1F, 0x00004,
0xF75FC566, 0x00004, 0xF75FC719, 0x00004, 0xF7DFDD95, 0x00004, 0xF8154AC9, 0x00004,
0xF8A1B32F, 0x00004, 0xF8E07F9B, 0x00004, 0xF8FB2876, 0x00001, 0xF9FB2A09, 0x00001,
0xFA43BB59, 0x00004, 0xFAA7378A, 0x00004, 0xFAF1C46A, 0x02304, 0xFB2AE32B, 0x03208,
0xFBF1C5FD, 0x02304, 0xFBFF61F2, 0x00004, 0xFE2E9869, 0x00004, 0xFEB13D33, 0x00002,
0xFBF1C5FD, 0x02304, 0xFBFF61F2, 0x00004, 0xFC1AF2FC, 0x00001, 0xFC4493F8, 0x00002,
0xFCB63E1B, 0x00001, 0xFD1AF48F, 0x00001, 0xFDB63FAE, 0x00001, 0xFE1AF622, 0x00001,
0xFE2E9869, 0x00004, 0xFE44971E, 0x00002, 0xFE4D59C7, 0x00004, 0xFEB13D33, 0x00002,
0xFEB64141, 0x00001, 0xFF4498B1, 0x00002, 0xFFA1F3C8, 0x00004,
};
}
}

View file

@ -5,16 +5,23 @@ namespace PKHeX.Core
{
public sealed class RaidSpawnList8 : SaveBlock
{
public RaidSpawnList8(SaveFile sav, SCBlock block) : base(sav, block.Data) { }
public readonly int CountAll;
public readonly int CountUsed;
public const int RaidCountLegal = 100;
public const int RaidCount = 111;
public RaidSpawnList8(SaveFile sav, SCBlock block, int legal) : base(sav, block.Data)
{
CountAll = block.Data.Length / RaidSpawnDetail.SIZE;
CountUsed = legal;
}
public const int RaidCountLegal_O0 = 93;
public const int RaidCountLegal_R1 = 59;
public RaidSpawnDetail GetRaid(int entry) => new RaidSpawnDetail(Data, entry * RaidSpawnDetail.SIZE);
public RaidSpawnDetail[] GetAllRaids()
{
var result = new RaidSpawnDetail[RaidCount];
var result = new RaidSpawnDetail[CountAll];
for (int i = 0; i < result.Length; i++)
result[i] = GetRaid(i);
return result;
@ -23,7 +30,7 @@ namespace PKHeX.Core
public void ActivateAllRaids(bool rare, bool isEvent)
{
var rnd = Util.Rand;
for (int i = 0; i < RaidCountLegal; i++)
for (int i = 0; i < CountUsed; i++)
{
if (i == 16) // Watchtower, special
continue;
@ -36,7 +43,7 @@ namespace PKHeX.Core
public string[] DumpAll()
{
var raids = GetAllRaids();
var result = new string[RaidCount];
var result = new string[CountAll];
for (int i = 0; i < result.Length; i++)
result[i] = raids[i].Dump();
return result;

View file

@ -3,29 +3,126 @@ using System.Collections.Generic;
namespace PKHeX.Core
{
// I wish I could replace this with raw pointers via Span :)
public class Zukan8 : ZukanBase
{
private readonly SCBlock Block;
public static readonly IReadOnlyDictionary<int, int> DexLookup = GetDexLookup(PersonalTable.SWSH);
private readonly SCBlock Galar;
private readonly SCBlock Rigel1;
private readonly SCBlock Rigel2;
public readonly IReadOnlyDictionary<int, Zukan8Index> DexLookup;
public Zukan8(SAV8SWSH sav, SCBlock block) : base(sav, 0) => Block = block;
private bool GetFlag(int ofs, int bitIndex) => FlagUtil.GetFlag(Block.Data, ofs + (bitIndex >> 3), bitIndex);
private void SetFlag(int ofs, int bitIndex, bool value = true) => FlagUtil.SetFlag(Block.Data, ofs + (bitIndex >> 3), bitIndex, value);
private static Dictionary<int, int> GetDexLookup(PersonalTable pt)
public Zukan8(SAV8SWSH sav, SCBlock galar, SCBlock rigel1, SCBlock rigel2) : base(sav, 0)
{
var lookup = new Dictionary<int, int>();
Galar = galar;
Rigel1 = rigel1;
Rigel2 = rigel2;
var revision = GetRevision();
DexLookup = GetDexLookup(PersonalTable.SWSH, revision);
}
public int GetRevision()
{
if (Rigel1.Data.Length == 0)
return 0; // No DLC data allocated
return 1;
}
private byte[] GetDexBlock(Zukan8Type infoDexType)
{
return infoDexType switch
{
Zukan8Type.Galar => Galar.Data,
Zukan8Type.Armor => Rigel1.Data,
Zukan8Type.Crown => Rigel2.Data,
_ => throw new ArgumentOutOfRangeException(nameof(infoDexType), infoDexType, null)
};
}
private static bool GetFlag(byte[] data, int offset, int bitIndex) => FlagUtil.GetFlag(data, offset + (bitIndex >> 3), bitIndex);
private static void SetFlag(byte[] data, int offset, int bitIndex, bool value = true) => FlagUtil.SetFlag(data, offset + (bitIndex >> 3), bitIndex, value);
private static Dictionary<int, Zukan8Index> GetDexLookup(PersonalTable pt, int dexRevision)
{
var lookup = new Dictionary<int, Zukan8Index>();
for (int i = 1; i <= pt.MaxSpeciesID; i++)
{
var p = (PersonalInfoSWSH) pt[i];
var index = p.PokeDexIndex;
if (index != 0)
lookup.Add(i, index);
{
lookup.Add(i, new Zukan8Index(Zukan8Type.Galar, index));
continue;
}
if (dexRevision == 0)
continue;
var armor = p.ArmorDexIndex;
if (armor != 0)
{
lookup.Add(i, new Zukan8Index(Zukan8Type.Armor, armor));
continue;
}
if (dexRevision == 1)
continue;
var crown = p.CrownDexIndex;
if (crown != 0)
{
lookup.Add(i, new Zukan8Index(Zukan8Type.Crown, armor));
// continue;
}
}
return lookup;
}
public class Zukan8EntryInfo
{
public readonly int Species;
public readonly Zukan8Index Entry;
public Zukan8EntryInfo(int species, Zukan8Index entry)
{
Species = species;
Entry = entry;
}
public string GetEntryName(IReadOnlyList<string> speciesNames) => Entry.GetEntryName(speciesNames, Species);
}
public List<Zukan8EntryInfo> GetRawIndexes(PersonalTable pt, int dexRevision)
{
var result = new List<Zukan8EntryInfo>();
for (int i = 1; i <= pt.MaxSpeciesID; i++)
{
var p = (PersonalInfoSWSH)pt[i];
var index = p.PokeDexIndex;
if (index != 0)
result.Add(new Zukan8EntryInfo(i, new Zukan8Index(Zukan8Type.Galar, index)));
}
if (dexRevision == 0)
return result;
for (int i = 1; i <= pt.MaxSpeciesID; i++)
{
var p = (PersonalInfoSWSH)pt[i];
var index = p.ArmorDexIndex;
if (index != 0)
result.Add(new Zukan8EntryInfo(i, new Zukan8Index(Zukan8Type.Armor, index)));
}
if (dexRevision == 1)
return result;
for (int i = 1; i <= pt.MaxSpeciesID; i++)
{
var p = (PersonalInfoSWSH)pt[i];
var index = p.CrownDexIndex;
if (index != 0)
result.Add(new Zukan8EntryInfo(i, new Zukan8Index(Zukan8Type.Crown, index)));
}
return result;
}
private static int GetDexLangFlag(int lang)
{
if (lang > 10 || lang == 6 || lang <= 0)
@ -37,14 +134,14 @@ namespace PKHeX.Core
return lang;
}
public static IList<string> GetEntryNames(IReadOnlyList<string> Species)
public IList<string> GetEntryNames(IReadOnlyList<string> speciesNames)
{
var dex = new List<string>();
foreach (var d in DexLookup)
{
var spec = d.Key;
var index = d.Value;
var name = $"{index:000} - {Species[spec]}";
var entry = d.Value;
var name = entry.GetEntryName(speciesNames, spec);
dex.Add(name);
}
dex.Sort();
@ -52,7 +149,8 @@ namespace PKHeX.Core
}
#region Structure
private const int EntrySize = 0x30;
internal const int EntrySize = 0x30;
// First 0x20 bytes are for seen flags, allocated as 4 QWORD values.
private const int SeenRegionCount = 4;
@ -63,7 +161,7 @@ namespace PKHeX.Core
// shiny_gender_1
// Each QWORD stores the following bits:
// - FormsSeen[63], default form is index 0.
// - Gigantimax:1
// - Gigantamax:1 -- for Urshifu, they store a bit prior for the second Gigantamax form...
// Next 4 bytes are for obtained info (u32)
private const int OFS_CAUGHT = 0x20;
@ -83,26 +181,24 @@ namespace PKHeX.Core
// Next 4 bytes are Unused(?)
private const int OFS_UNK2 = 0x2C;
public static int GetOffsetEntry(int species)
{
if (!DexLookup.TryGetValue(species, out var index))
return -1;
if (index < 1)
throw new IndexOutOfRangeException();
return (index - 1) * EntrySize;
}
public bool GetEntry(int species, out Zukan8Index entry) => DexLookup.TryGetValue(species, out entry);
public override bool GetSeen(int species)
{
var index = GetOffsetEntry(species);
if (index < 0)
if (!GetEntry(species, out var entry))
return false;
return GetSeen(entry);
}
public bool GetSeen(Zukan8Index entry)
{
byte[] data = GetDexBlock(entry.DexType);
int offset = entry.Offset;
for (int i = 0; i < SeenRegionCount; i++)
{
var ofs = index + (SeenRegionSize * i);
if (BitConverter.ToUInt64(Block.Data, ofs) != 0)
var ofs = offset + (SeenRegionSize * i);
if (BitConverter.ToUInt64(data, ofs) != 0)
return true;
}
@ -111,32 +207,45 @@ namespace PKHeX.Core
public bool GetSeenRegion(int species, int form, int region)
{
if ((uint)region >= SeenRegionCount)
throw new ArgumentException(nameof(region));
if ((uint)form > 63)
if (!GetEntry(species, out var entry))
return false;
var index = GetOffsetEntry(species);
if (index < 0)
return false;
var ofs = SeenRegionSize * region;
return GetFlag(index + ofs, form);
return GetSeenRegion(entry, form, region);
}
public void SetSeenRegion(int species, int form, int region, bool value = true)
public bool GetSeenRegion(Zukan8Index entry, int form, int region)
{
if ((uint)region >= SeenRegionCount)
throw new ArgumentException(nameof(region));
if ((uint)form > 63)
return;
var index = GetOffsetEntry(species);
if (index < 0)
return;
return false;
var dex = entry.DexType;
var offset = entry.Offset;
var data = GetDexBlock(dex);
var ofs = SeenRegionSize * region;
SetFlag(index + ofs, form, value);
return GetFlag(data, offset + ofs, form);
}
public void SetSeenRegion(int species, int form, int region, bool value = true)
{
if (!GetEntry(species, out var entry))
return;
SetSeenRegion(entry, form, region, value);
}
public void SetSeenRegion(Zukan8Index entry, int form, int region, bool value = true)
{
if ((uint) region >= SeenRegionCount)
throw new ArgumentException(nameof(region));
if ((uint) form > 63)
return;
var data = GetDexBlock(entry.DexType);
int index = entry.Offset;
var ofs = SeenRegionSize * region;
SetFlag(data, index + ofs, form, value);
}
public override bool GetCaught(int species) => GetCaughtFlagID(species, 0);
@ -146,22 +255,39 @@ namespace PKHeX.Core
public bool GetIsLanguageIndexObtained(int species, int langIndex) => GetCaughtFlagID(species, 2 + langIndex);
public void SetIsLanguageIndexObtained(int species, int langIndex, bool value = true) => SetCaughtFlagID(species, 2 + langIndex, value);
private bool GetCaughtFlagID(int species, int id)
public bool GetCaught(Zukan8Index entry) => GetCaughtFlagID(entry, 0);
public void SetCaught(Zukan8Index entry, bool value = true) => SetCaughtFlagID(entry, 0, value);
public bool GetCaughtGigantamaxed(Zukan8Index entry) => GetCaughtFlagID(entry, 1);
public void SetCaughtGigantamax(Zukan8Index entry, bool value = true) => SetCaughtFlagID(entry, 1, value);
public bool GetIsLanguageIndexObtained(Zukan8Index entry, int langIndex) => GetCaughtFlagID(entry, 2 + langIndex);
public void SetIsLanguageIndexObtained(Zukan8Index entry, int langIndex, bool value = true) => SetCaughtFlagID(entry, 2 + langIndex, value);
private bool GetCaughtFlagID(int species, int bit)
{
var index = GetOffsetEntry(species);
if (index < 0)
if (!GetEntry(species, out var entry))
return false;
return GetFlag(index + OFS_CAUGHT, id);
return GetCaughtFlagID(entry, bit);
}
private void SetCaughtFlagID(int species, int id, bool value = true)
private bool GetCaughtFlagID(Zukan8Index entry, int bit)
{
var index = GetOffsetEntry(species);
if (index < 0)
var data = GetDexBlock(entry.DexType);
return GetFlag(data, entry.Offset + OFS_CAUGHT, bit);
}
public void SetCaughtFlagID(int species, int bit, bool value = true)
{
if (!GetEntry(species, out var entry))
return;
SetFlag(index + OFS_CAUGHT, id, value);
SetCaughtFlagID(entry, bit, value);
}
public void SetCaughtFlagID(Zukan8Index entry, int bit, bool value = true)
{
var data = GetDexBlock(entry.DexType);
SetFlag(data, entry.Offset + OFS_CAUGHT, bit, value);
}
public bool GetIsLanguageObtained(int species, int language)
@ -184,44 +310,68 @@ namespace PKHeX.Core
public uint GetAltFormDisplayed(int species)
{
var index = GetOffsetEntry(species);
if (index < 0)
if (!GetEntry(species, out var entry))
return 0;
var val = BitConverter.ToUInt32(Block.Data, index + OFS_CAUGHT);
return GetAltFormDisplayed(entry);
}
public uint GetAltFormDisplayed(Zukan8Index entry)
{
var data = GetDexBlock(entry.DexType);
var index = entry.Offset;
var val = BitConverter.ToUInt32(data, index + OFS_CAUGHT);
return (val >> 15) & 0x1FFF; // (0x1FFF is really overkill, GameFreak)
}
public void SetAltFormDisplayed(int species, uint value = 0)
{
var index = GetOffsetEntry(species);
if (index < 0)
if (!GetEntry(species, out var entry))
return;
var val = BitConverter.ToUInt32(Block.Data, index + OFS_CAUGHT);
SetAltFormDisplayed(entry, value);
}
public void SetAltFormDisplayed(Zukan8Index entry, uint value = 0)
{
var data = GetDexBlock(entry.DexType);
var index = entry.Offset;
var val = BitConverter.ToUInt32(data, index + OFS_CAUGHT);
uint nv = (val & ~(0x1FFFu << 15)) | ((value & 0x1FFF) << 15);
BitConverter.GetBytes(nv).CopyTo(Block.Data, index + OFS_CAUGHT);
BitConverter.GetBytes(nv).CopyTo(data, index + OFS_CAUGHT);
}
public uint GetGenderDisplayed(int species)
{
var index = GetOffsetEntry(species);
if (index < 0)
if (!GetEntry(species, out var entry))
return 0;
var val = BitConverter.ToUInt32(Block.Data, index + OFS_CAUGHT);
return GetGenderDisplayed(entry);
}
public uint GetGenderDisplayed(Zukan8Index entry)
{
var data = GetDexBlock(entry.DexType);
var index = entry.Offset;
var val = BitConverter.ToUInt32(data, index + OFS_CAUGHT);
return (val >> 29) & 3;
}
public void SetGenderDisplayed(int species, uint value = 0)
{
var index = GetOffsetEntry(species);
if (index < 0)
if (!GetEntry(species, out var entry))
return;
var val = BitConverter.ToUInt32(Block.Data, index + OFS_CAUGHT);
SetGenderDisplayed(entry, value);
}
public void SetGenderDisplayed(Zukan8Index entry, uint value = 0)
{
var data = GetDexBlock(entry.DexType);
var index = entry.Offset;
var val = BitConverter.ToUInt32(data, index + OFS_CAUGHT);
uint nv = (val & ~(3u << 29)) | ((value & 3) << 29);
BitConverter.GetBytes(nv).CopyTo(Block.Data, index + OFS_CAUGHT);
BitConverter.GetBytes(nv).CopyTo(data, index + OFS_CAUGHT);
}
public bool GetDisplayDynamaxInstead(int species) => GetCaughtFlagID(species, 28);
@ -237,31 +387,58 @@ namespace PKHeX.Core
public uint GetUnk2Count(int species) => GetU32(species, OFS_UNK2);
public void SetUnk2Count(int species, uint value) => SetU32(species, value, OFS_UNK2);
public bool GetDisplayDynamaxInstead(Zukan8Index entry) => GetCaughtFlagID(entry, 28);
public void SetDisplayDynamaxInstead(Zukan8Index entry, bool value = true) => SetCaughtFlagID(entry, 28, value);
public bool GetDisplayShiny(Zukan8Index entry) => GetCaughtFlagID(entry, 31);
public void SetDisplayShiny(Zukan8Index entry, bool value = true) => SetCaughtFlagID(entry, 31, value);
public void SetCaughtFlags32(Zukan8Index entry, uint value) => SetU32(entry, value, OFS_CAUGHT);
public uint GetBattledCount(Zukan8Index entry) => GetU32(entry, OFS_BATTLED);
public void SetBattledCount(Zukan8Index entry, uint value) => SetU32(entry, value, OFS_BATTLED);
public uint GetUnk1Count(Zukan8Index entry) => GetU32(entry, OFS_UNK1);
public void SetUnk1Count(Zukan8Index entry, uint value) => SetU32(entry, value, OFS_UNK1);
public uint GetUnk2Count(Zukan8Index entry) => GetU32(entry, OFS_UNK2);
public void SetUnk2Count(Zukan8Index entry, uint value) => SetU32(entry, value, OFS_UNK2);
private uint GetU32(int species, int ofs)
{
var index = GetOffsetEntry(species);
if (index < 0)
if (!GetEntry(species, out var entry))
return 0;
return BitConverter.ToUInt32(Block.Data, index + ofs);
return GetU32(entry, ofs);
}
private uint GetU32(Zukan8Index entry, int ofs)
{
var dex = entry.DexType;
var index = entry.Offset;
var data = GetDexBlock(dex);
return BitConverter.ToUInt32(data, index + ofs);
}
private void SetU32(int species, uint value, int ofs)
{
var index = GetOffsetEntry(species);
if (index < 0)
if (!GetEntry(species, out var entry))
return;
BitConverter.GetBytes(value).CopyTo(Block.Data, index + ofs);
SetU32(entry, value, ofs);
}
private void SetU32(Zukan8Index entry, uint value, int ofs)
{
var dex = entry.DexType;
var index = entry.Offset;
var data = GetDexBlock(dex);
BitConverter.GetBytes(value).CopyTo(data, index + ofs);
}
#endregion
#region Inherited
public override void SetDex(PKM pkm)
{
int species = pkm.Species;
var index = GetOffsetEntry(species);
if (index < 0)
if (!GetEntry(species, out _))
return;
bool owned = GetCaught(species);
@ -298,7 +475,9 @@ namespace PKHeX.Core
public override void SeenNone()
{
Array.Clear(Block.Data, 0, DexLookup.Count * EntrySize);
Array.Clear(Galar.Data, 0, Galar.Data.Length);
Array.Clear(Rigel1.Data, 0, Rigel1.Data.Length);
Array.Clear(Rigel2.Data, 0, Rigel2.Data.Length);
}
public override void CaughtNone()
@ -428,6 +607,8 @@ namespace PKHeX.Core
if (SpeciesWithGigantamaxData.Contains(species))
{
SeenAll(species, 63, value, pi, shinyToo);
if (species == (int)Species.Urshifu)
SeenAll(species, 62, value, pi, shinyToo);
SetCaughtGigantamax(species);
}
}
@ -440,10 +621,16 @@ namespace PKHeX.Core
public override void ClearDexEntryAll(int species)
{
var ofs = GetOffsetEntry(species);
if (ofs < 0)
if (!GetEntry(species, out var entry))
return;
Array.Clear(Block.Data, ofs, EntrySize);
ClearDexEntryAll(entry);
}
private void ClearDexEntryAll(Zukan8Index entry)
{
var data = GetDexBlock(entry.DexType);
Array.Clear(data, entry.Offset, EntrySize);
}
public void SetAllBattledCount(uint count = 500)
@ -483,7 +670,89 @@ namespace PKHeX.Core
(int)Species.Copperajah,
(int)Species.Duraludon,
(int)Species.Eternatus,
// DLC 1
(int)Species.Rillaboom,
(int)Species.Cinderace,
(int)Species.Inteleon,
(int)Species.Urshifu,
};
#endregion
}
}
public readonly struct Zukan8Index
{
public readonly int Index;
public readonly Zukan8Type DexType;
public Zukan8Index(Zukan8Type dexType, int index)
{
DexType = dexType;
Index = index;
}
private int GetSavedIndex()
{
var index = Index;
if (index < 1)
throw new IndexOutOfRangeException();
return (index - 1);
}
public int Offset => GetSavedIndex() * Zukan8.EntrySize;
private const int GalarCount = 400;
private const int Rigel1Count = 211;
private const int Rigel2Count = 2;
// expects zero based indexes
public static Zukan8Index GetFromRawIndex(int index)
{
if (index < 0)
return new Zukan8Index();
if (index < GalarCount)
return new Zukan8Index(Zukan8Type.Galar, index + 1);
index -= GalarCount;
if (index < Rigel1Count)
return new Zukan8Index(Zukan8Type.Armor, index + 1);
index -= Rigel1Count;
if (index < Rigel2Count)
return new Zukan8Index(Zukan8Type.Crown, index + 1);
throw new ArgumentOutOfRangeException(nameof(index));
}
public string DexPrefix => DexType switch
{
Zukan8Type.Galar => "O0",
Zukan8Type.Armor => "R1",
Zukan8Type.Crown => "R2",
_ => throw new ArgumentOutOfRangeException()
};
public int AbsoluteIndex => DexType switch
{
Zukan8Type.Galar => Index,
Zukan8Type.Armor => Index + GalarCount,
Zukan8Type.Crown => Index + GalarCount + Rigel1Count,
_ => throw new ArgumentOutOfRangeException(nameof(DexType)),
};
public string GetEntryName(IReadOnlyList<string> speciesNames, int species)
{
return $"{DexPrefix}.{Index:000} - {speciesNames[species]}";
}
}
public enum Zukan8Type : sbyte
{
None = 0,
Galar,
Armor,
Crown,
}
}

View file

@ -583,6 +583,10 @@ namespace PKHeX.Core
/* 47 */ {G8BattleTowerSingleWin, "battle_tower_single_win"},
/* 48 */ {G8BattleTowerDoubleWin, "battle_tower_double_win"},
{49, "now_money"},
// DLC
{50, "cormorant_robo"},
{51, "battle_rom_mark"},
};
public const int G8BattleTowerSingleWin = 47;

View file

@ -18,6 +18,7 @@ namespace PKHeX.Core
public const int SIZE_G8SWSH = 0x1716B3;
public const int SIZE_G8SWSH_1 = 0x17195E;
public const int SIZE_G8SWSH_2 = 0x180B19;
public const int SIZE_G7GG = 0x100000;
public const int SIZE_G7USUM = 0x6CC00;
public const int SIZE_G7SM = 0x6BE00;
@ -61,7 +62,7 @@ namespace PKHeX.Core
private static readonly HashSet<int> Sizes = new HashSet<int>(SizesGen2)
{
SIZE_G8SWSH, SIZE_G8SWSH_1,
SIZE_G8SWSH, SIZE_G8SWSH_1, SIZE_G8SWSH_2,
SIZE_G7SM, SIZE_G7USUM, SIZE_G7GG,
SIZE_G6XY, SIZE_G6ORAS, SIZE_G6ORASDEMO,
SIZE_G5RAW, SIZE_G5BW, SIZE_G5B2W2,
@ -444,7 +445,7 @@ namespace PKHeX.Core
/// <returns>Version Identifier or Invalid if type cannot be determined.</returns>
private static GameVersion GetIsG8SAV(byte[] data)
{
if (data.Length != SIZE_G8SWSH && data.Length != SIZE_G8SWSH_1)
if (data.Length != SIZE_G8SWSH && data.Length != SIZE_G8SWSH_1 && data.Length != SIZE_G8SWSH_2)
return Invalid;
return SwishCrypto.GetIsHashValid(data) ? SWSH : Invalid;

View file

@ -79,7 +79,7 @@ namespace PKHeX.Core
{
if (length <= 0x100000)
return false;
if (length == SaveUtil.SIZE_G4BR || length == SaveUtil.SIZE_G8SWSH ||length == SaveUtil.SIZE_G8SWSH_1)
if (length == SaveUtil.SIZE_G4BR || length == SaveUtil.SIZE_G8SWSH || length == SaveUtil.SIZE_G8SWSH_1 || length == SaveUtil.SIZE_G8SWSH_2)
return false;
if (SAV3GCMemoryCard.IsMemoryCardSize(length))
return false; // pbr/GC have size > 1MB

View file

@ -77,6 +77,7 @@ namespace PKHeX.Drawing
(int)Species.Mimikyu,
(int)Species.Sinistea,
(int)Species.Polteageist,
(int)Species.Urshifu,
};
/// <summary>

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