diff --git a/PKHeX.Core/Game/GameStrings/GameStrings.cs b/PKHeX.Core/Game/GameStrings/GameStrings.cs index d4af5d904..609d9c921 100644 --- a/PKHeX.Core/Game/GameStrings/GameStrings.cs +++ b/PKHeX.Core/Game/GameStrings/GameStrings.cs @@ -356,6 +356,11 @@ namespace PKHeX.Core metSWSH_40000[i] += " (-)"; metSWSH_40000[29] += " (-)"; // a Video game Event (in spanish etc) -- duplicate with line 39 metSWSH_40000[52] += " (-)"; // a Pokémon event -- duplicate with line 37 + + // metSWSH_40000[80] += " (-)"; // Pokémon GO -- duplicate with 30000's entry + // metSWSH_40000[85] += " (-)"; // Pokémon HOME -- duplicate with 30000's entry + metSWSH_30000[11] += " (-)"; // Pokémon GO -- duplicate with 40000's entry + metSWSH_30000[17] += " (-)"; // Pokémon HOME -- duplicate with 40000's entry } public IReadOnlyList GetItemStrings(int generation, GameVersion game = GameVersion.Any) diff --git a/PKHeX.Core/Legality/Verifiers/PIDVerifier.cs b/PKHeX.Core/Legality/Verifiers/PIDVerifier.cs index 5cdbaad90..d00065fb0 100644 --- a/PKHeX.Core/Legality/Verifiers/PIDVerifier.cs +++ b/PKHeX.Core/Legality/Verifiers/PIDVerifier.cs @@ -26,7 +26,16 @@ namespace PKHeX.Core var Info = data.Info; if ((Info.Generation >= 6 || (Info.Generation < 3 && pkm.Format >= 7)) && pkm.PID == pkm.EncryptionConstant) - data.AddLine(GetInvalid(LPIDEqualsEC)); // better to flag than 1:2^32 odds since RNG is not feasible to yield match + { + if (Info.EncounterMatch is WC8 wc8 && wc8.PID == 0 &&wc8.EncryptionConstant == 0) + { + // We'll allow this to pass. + } + else + { + data.AddLine(GetInvalid(LPIDEqualsEC)); // better to flag than 1:2^32 odds since RNG is not feasible to yield match + } + } VerifyShiny(data); } diff --git a/PKHeX.Core/MysteryGifts/WC8.cs b/PKHeX.Core/MysteryGifts/WC8.cs index 28f3f96ee..62a5c8581 100644 --- a/PKHeX.Core/MysteryGifts/WC8.cs +++ b/PKHeX.Core/MysteryGifts/WC8.cs @@ -294,6 +294,8 @@ namespace PKHeX.Core return 0x12C + (index * 0x1C); } + private bool IsHOMEGift => PIDType == Shiny.FixedValue && PID == 0 && EncryptionConstant == 0; + public override PKM ConvertToPKM(ITrainerInfo SAV, EncounterCriteria criteria) { if (!IsPokémon) @@ -306,7 +308,7 @@ namespace PKHeX.Core var pk = new PK8 { - EncryptionConstant = EncryptionConstant != 0 ? EncryptionConstant : Util.Rand32(), + EncryptionConstant = EncryptionConstant != 0 || IsHOMEGift ? EncryptionConstant : Util.Rand32(), TID = TID, SID = SID, Species = Species, @@ -502,7 +504,19 @@ namespace PKHeX.Core var OT = GetOT(pkm.Language); // May not be guaranteed to work. if (!string.IsNullOrEmpty(OT) && OT != pkm.OT_Name) return false; if (OriginGame != 0 && OriginGame != pkm.Version) return false; - if (EncryptionConstant != 0 && EncryptionConstant != pkm.EncryptionConstant) return false; + if (EncryptionConstant != 0) + { + if (EncryptionConstant != pkm.EncryptionConstant) + return false; + } + else if (IsHOMEGift)// 0 + { + // HOME gifts -- PID and EC are zeroes... + if (EncryptionConstant != pkm.EncryptionConstant) + return false; + if (IsShiny) + return false; + } } if (Form != pkm.AltForm && !Legal.IsFormChangeable(pkm, Species)) diff --git a/PKHeX.Core/Resources/byte/pgf.pkl b/PKHeX.Core/Resources/byte/pgf.pkl index f88b4a171..e077dd27d 100644 Binary files a/PKHeX.Core/Resources/byte/pgf.pkl and b/PKHeX.Core/Resources/byte/pgf.pkl differ diff --git a/PKHeX.Core/Resources/byte/wc4.pkl b/PKHeX.Core/Resources/byte/wc4.pkl index e9115a579..58008a9fa 100644 Binary files a/PKHeX.Core/Resources/byte/wc4.pkl and b/PKHeX.Core/Resources/byte/wc4.pkl differ diff --git a/PKHeX.Core/Resources/byte/wc8.pkl b/PKHeX.Core/Resources/byte/wc8.pkl index f6946075f..4e0f02f97 100644 Binary files a/PKHeX.Core/Resources/byte/wc8.pkl and b/PKHeX.Core/Resources/byte/wc8.pkl differ