From a66f106aeffca9342d9af1d0ad415755fd5a5015 Mon Sep 17 00:00:00 2001 From: javierhimura Date: Mon, 27 Mar 2017 01:51:19 +0200 Subject: [PATCH] Detect English faraway island mew and hall of origin arceus as invalid, they are unreleased events --- PKHeX/Legality/Checks.cs | 9 +++++++++ PKHeX/Legality/LegalityCheckStrings.cs | 2 ++ PKHeX/Legality/Tables3.cs | 2 +- PKHeX/Legality/Tables4.cs | 2 +- PKHeX/Resources/text/en/LegalityCheckStrings_en.txt | 4 +++- 5 files changed, 16 insertions(+), 3 deletions(-) diff --git a/PKHeX/Legality/Checks.cs b/PKHeX/Legality/Checks.cs index f3a08e7cd..7818f0cd0 100644 --- a/PKHeX/Legality/Checks.cs +++ b/PKHeX/Legality/Checks.cs @@ -659,6 +659,15 @@ namespace PKHeX.Core { var s = (EncounterStatic)EncounterMatch; + if (pkm.GenNumber == 4 && pkm.Species == 493 && s.Location == 086) + { + return new CheckResult(Severity.Invalid, V352, CheckIdentifier.Encounter); + } + if (pkm.GenNumber == 3 && pkm.Species == 151 && s.Location == 201 && pkm.Language != 1) + { + return new CheckResult(Severity.Invalid, V353, CheckIdentifier.Encounter); + } + // Re-parse relearn moves if (s.EggLocation != 60002 || vRelearn.Any(rl => !rl.Valid)) { diff --git a/PKHeX/Legality/LegalityCheckStrings.cs b/PKHeX/Legality/LegalityCheckStrings.cs index fd20169bc..d1501df74 100644 --- a/PKHeX/Legality/LegalityCheckStrings.cs +++ b/PKHeX/Legality/LegalityCheckStrings.cs @@ -337,6 +337,8 @@ namespace PKHeX.Core public static string V348 {get; set;} = "Inherited tutor move. Not expected in an event egg."; public static string V350 {get; set;} = "Inherited TM/HM move. Not expected in an event egg."; public static string V351 {get; set;} = "Invalid Met Location, expected Transporter or Crown."; // Invalid + public static string V352 {get; set;} = "Arceus from Hall of Origin. Unreleased event."; + public static string V353 {get; set;} = "Non japanese Mew from Faraway Island. Unreleased event."; #endregion } diff --git a/PKHeX/Legality/Tables3.cs b/PKHeX/Legality/Tables3.cs index 1c6a35ceb..7e8cca95c 100644 --- a/PKHeX/Legality/Tables3.cs +++ b/PKHeX/Legality/Tables3.cs @@ -265,7 +265,7 @@ namespace PKHeX.Core new EncounterStatic { Species = 384, Level = 70, Location = 085, }, // Rayquaza @ Sky Pillar // Event - new EncounterStatic { Species = 151, Level = 30, Location = 201, Version = GameVersion.E, Fateful = true }, // Mew @ Faraway Island + new EncounterStatic { Species = 151, Level = 30, Location = 201, Version = GameVersion.E, Fateful = true }, // Mew @ Faraway Island (Unreleased outside of Japan) new EncounterStatic { Species = 249, Level = 70, Location = 211, Version = GameVersion.E, }, // Lugia @ Navel Rock new EncounterStatic { Species = 250, Level = 70, Location = 211, Version = GameVersion.E, }, // Ho-Oh @ Navel Rock new EncounterStatic { Species = 386, Level = 30, Location = 200, Version = GameVersion.E, Form = 3, Fateful = true }, // Deoxys @ Birth Island diff --git a/PKHeX/Legality/Tables4.cs b/PKHeX/Legality/Tables4.cs index 8c6cf3c6e..ef6589dd4 100644 --- a/PKHeX/Legality/Tables4.cs +++ b/PKHeX/Legality/Tables4.cs @@ -442,7 +442,7 @@ namespace PKHeX.Core new EncounterStatic { Species = 491, Level = 40, Location = 079, Version = GameVersion.DP,}, //Darkrai @ Newmoon Island new EncounterStatic { Species = 491, Level = 50, Location = 079, Version = GameVersion.Pt,}, //Darkrai @ Newmoon Island new EncounterStatic { Species = 492, Form = 0, Level = 30, Location = 063, Fateful = true,}, //Shaymin @ Flower Paradise - //new EncounterStatic { Species = 493, Level = 80, Location = 086,}, //Arceus @ Hall of Origin + new EncounterStatic { Species = 493, Form = 0, Level = 80, Location = 086,}, //Arceus @ Hall of Origin (Unreleased) }; internal static readonly EncounterStatic[] Encounter_DPPt = Encounter_DPPt_Roam.SelectMany(e => e.Clone(Roaming_MetLocation_DPPt)).Concat(Encounter_DPPt_Regular).ToArray(); diff --git a/PKHeX/Resources/text/en/LegalityCheckStrings_en.txt b/PKHeX/Resources/text/en/LegalityCheckStrings_en.txt index 7ffc3fb82..85e0c0b12 100644 --- a/PKHeX/Resources/text/en/LegalityCheckStrings_en.txt +++ b/PKHeX/Resources/text/en/LegalityCheckStrings_en.txt @@ -271,4 +271,6 @@ V343 = Expected the following Moves: {0} V347 = Inherited move learned by Level-up. Not expected in an event egg. V348 = Inherited tutor move. Not expected in an event egg. V350 = Inherited TM/HM move. Not expected in an event egg. -V351 = Invalid Met Location, expected Transporter or Crown. \ No newline at end of file +V351 = Invalid Met Location, expected Transporter or Crown. +V352 = Arceus from Hall of Origin. Unreleased event. +V353 = Non japanese Mew from Faraway Island. Unreleased event. \ No newline at end of file