diff --git a/Legality/Checks.cs b/Legality/Checks.cs index c5dbd40e0..6474ee733 100644 --- a/Legality/Checks.cs +++ b/Legality/Checks.cs @@ -175,6 +175,9 @@ private LegalityCheck verifyEVs() } private LegalityCheck verifyIVs() { + if (EncounterType == typeof(EncounterStatic) && (EncounterMatch as EncounterStatic)?.IV3 == true) + if (pk6.IVs.Count(iv => iv == 31) < 3) + return new LegalityCheck(Severity.Invalid, "Should have at least 3 IVs = 31."); if (pk6.IVs.Sum() == 0) return new LegalityCheck(Severity.Fishy, "All IVs are zero."); if (pk6.IVs[0] < 30 && pk6.IVs.All(iv => pk6.IVs[0] == iv)) diff --git a/Legality/Data.cs b/Legality/Data.cs index f41741c22..e7afe9d45 100644 --- a/Legality/Data.cs +++ b/Legality/Data.cs @@ -188,6 +188,7 @@ public class EncounterStatic public int Ball = 4; // Gift Only public GameVersion Version = GameVersion.Any; public int[] IVs = {-1, -1, -1, -1, -1, -1}; + public bool IV3; public int[] Contest = {0, 0, 0, 0, 0, 0}; } public class EncounterTrade diff --git a/Legality/Tables.cs b/Legality/Tables.cs index fd15337c0..62b0e2428 100644 --- a/Legality/Tables.cs +++ b/Legality/Tables.cs @@ -628,15 +628,15 @@ public static partial class Legal new EncounterStatic { Species = 569, Level = 38, Location = 142 }, // Garbodor new EncounterStatic { Species = 479, Level = 38, Location = 142 }, // Rotom - new EncounterStatic { Species = 716, Level = 50, Location = 138, Version = GameVersion.X, Shiny = false }, // Xerneas - new EncounterStatic { Species = 717, Level = 50, Location = 138, Version = GameVersion.Y, Shiny = false }, // Yveltal - new EncounterStatic { Species = 718, Level = 70, Location = 140, Shiny = false }, // Zygarde + new EncounterStatic { Species = 716, Level = 50, Location = 138, Version = GameVersion.X, Shiny = false, IV3 = true }, // Xerneas + new EncounterStatic { Species = 717, Level = 50, Location = 138, Version = GameVersion.Y, Shiny = false, IV3 = true }, // Yveltal + new EncounterStatic { Species = 718, Level = 70, Location = 140, Shiny = false, IV3 = true }, // Zygarde - new EncounterStatic { Species = 150, Level = 70, Location = 168, Shiny = false }, // Mewtwo + new EncounterStatic { Species = 150, Level = 70, Location = 168, Shiny = false, IV3 = true }, // Mewtwo - new EncounterStatic { Species = 144, Level = 70, Location = 146, Shiny = false }, // Articuno - new EncounterStatic { Species = 145, Level = 70, Location = 146, Shiny = false }, // Zapdos - new EncounterStatic { Species = 146, Level = 70, Location = 146, Shiny = false }, // Moltres + new EncounterStatic { Species = 144, Level = 70, Location = 146, Shiny = false, IV3 = true }, // Articuno + new EncounterStatic { Species = 145, Level = 70, Location = 146, Shiny = false, IV3 = true }, // Zapdos + new EncounterStatic { Species = 146, Level = 70, Location = 146, Shiny = false, IV3 = true }, // Moltres }; private static readonly EncounterStatic[] Encounter_AO = { @@ -669,56 +669,56 @@ public static partial class Legal new EncounterStatic { Species = 319, Level = 40, Location = 318, Gender = 1, Ability = 1, Nature = Nature.Adamant, Gift = true }, // Sharpedo new EncounterStatic { Species = 323, Level = 40, Location = 318, Gender = 1, Ability = 1, Nature = Nature.Quiet, Gift = true }, // Camerupt - new EncounterStatic { Species = 380, Level = 30, Location = 320, Version = GameVersion.AS, Ability = 1, Gift = true }, // Latias - new EncounterStatic { Species = 381, Level = 30, Location = 320, Version = GameVersion.OR, Ability = 1, Gift = true }, // Latios + new EncounterStatic { Species = 380, Level = 30, Location = 320, Version = GameVersion.AS, Ability = 1, Gift = true, IV3 = true }, // Latias + new EncounterStatic { Species = 381, Level = 30, Location = 320, Version = GameVersion.OR, Ability = 1, Gift = true, IV3 = true }, // Latios - new EncounterStatic { Species = 382, Level = 45, Location = 296, Version = GameVersion.AS, Shiny = false }, // Kyogre - new EncounterStatic { Species = 383, Level = 45, Location = 296, Version = GameVersion.OR, Shiny = false }, // Groudon - new EncounterStatic { Species = 384, Level = 70, Location = 316, Shiny = false }, // Rayquaza - new EncounterStatic { Species = 386, Level = 80, Location = 316, Shiny = false }, // Deoxys + new EncounterStatic { Species = 382, Level = 45, Location = 296, Version = GameVersion.AS, Shiny = false, IV3 = true }, // Kyogre + new EncounterStatic { Species = 383, Level = 45, Location = 296, Version = GameVersion.OR, Shiny = false, IV3 = true }, // Groudon + new EncounterStatic { Species = 384, Level = 70, Location = 316, Shiny = false, IV3 = true }, // Rayquaza + new EncounterStatic { Species = 386, Level = 80, Location = 316, Shiny = false, IV3 = true }, // Deoxys - new EncounterStatic { Species = 377, Level = 40, Location = 278 }, // Regirock - new EncounterStatic { Species = 378, Level = 40, Location = 306 }, // Regice - new EncounterStatic { Species = 379, Level = 40, Location = 308 }, // Registeel - new EncounterStatic { Species = 486, Level = 50, Location = 306 }, // Regigigas + new EncounterStatic { Species = 377, Level = 40, Location = 278, IV3 = true }, // Regirock + new EncounterStatic { Species = 378, Level = 40, Location = 306, IV3 = true }, // Regice + new EncounterStatic { Species = 379, Level = 40, Location = 308, IV3 = true }, // Registeel + new EncounterStatic { Species = 486, Level = 50, Location = 306, IV3 = true }, // Regigigas - new EncounterStatic { Species = 249, Level = 50, Location = 304, Version = GameVersion.AS }, // Lugia - new EncounterStatic { Species = 250, Level = 50, Location = 304, Version = GameVersion.OR }, // Ho-oh + new EncounterStatic { Species = 249, Level = 50, Location = 304, Version = GameVersion.AS, IV3 = true }, // Lugia + new EncounterStatic { Species = 250, Level = 50, Location = 304, Version = GameVersion.OR, IV3 = true }, // Ho-oh - new EncounterStatic { Species = 483, Level = 50, Location = 348, Version = GameVersion.AS }, // Dialga - new EncounterStatic { Species = 484, Level = 50, Location = 348, Version = GameVersion.OR }, // Palia + new EncounterStatic { Species = 483, Level = 50, Location = 348, Version = GameVersion.AS, IV3 = true }, // Dialga + new EncounterStatic { Species = 484, Level = 50, Location = 348, Version = GameVersion.OR, IV3 = true }, // Palia - new EncounterStatic { Species = 644, Level = 50, Location = 340, Version = GameVersion.AS }, // Zekrom - new EncounterStatic { Species = 643, Level = 50, Location = 340, Version = GameVersion.OR }, // Reshiram + new EncounterStatic { Species = 644, Level = 50, Location = 340, Version = GameVersion.AS, IV3 = true }, // Zekrom + new EncounterStatic { Species = 643, Level = 50, Location = 340, Version = GameVersion.OR, IV3 = true }, // Reshiram - new EncounterStatic { Species = 642, Level = 50, Location = 348, Version = GameVersion.AS }, // Thundurus - new EncounterStatic { Species = 641, Level = 50, Location = 348, Version = GameVersion.OR }, // Tornadus + new EncounterStatic { Species = 642, Level = 50, Location = 348, Version = GameVersion.AS, IV3 = true }, // Thundurus + new EncounterStatic { Species = 641, Level = 50, Location = 348, Version = GameVersion.OR, IV3 = true }, // Tornadus - new EncounterStatic { Species = 485, Level = 50, Location = 312 }, // Heatran - new EncounterStatic { Species = 487, Level = 50, Location = 348 }, // Giratina - new EncounterStatic { Species = 488, Level = 50, Location = 344 }, // Cresselia - new EncounterStatic { Species = 645, Level = 50, Location = 348 }, // Landorus - new EncounterStatic { Species = 646, Level = 50, Location = 342 }, // Kyurem + new EncounterStatic { Species = 485, Level = 50, Location = 312, IV3 = true }, // Heatran + new EncounterStatic { Species = 487, Level = 50, Location = 348, IV3 = true }, // Giratina + new EncounterStatic { Species = 488, Level = 50, Location = 344, IV3 = true }, // Cresselia + new EncounterStatic { Species = 645, Level = 50, Location = 348, IV3 = true }, // Landorus + new EncounterStatic { Species = 646, Level = 50, Location = 342, IV3 = true }, // Kyurem - new EncounterStatic { Species = 243, Level = 50, Location = 334 }, // Raikou - new EncounterStatic { Species = 244, Level = 50, Location = 334 }, // Entei - new EncounterStatic { Species = 245, Level = 50, Location = 334 }, // Suicune + new EncounterStatic { Species = 243, Level = 50, Location = 334, IV3 = true }, // Raikou + new EncounterStatic { Species = 244, Level = 50, Location = 334, IV3 = true }, // Entei + new EncounterStatic { Species = 245, Level = 50, Location = 334, IV3 = true }, // Suicune - new EncounterStatic { Species = 480, Level = 50, Location = 338 }, // Uxie - new EncounterStatic { Species = 481, Level = 50, Location = 338 }, // Mesprit - new EncounterStatic { Species = 482, Level = 50, Location = 338 }, // Azelf + new EncounterStatic { Species = 480, Level = 50, Location = 338, IV3 = true }, // Uxie + new EncounterStatic { Species = 481, Level = 50, Location = 338, IV3 = true }, // Mesprit + new EncounterStatic { Species = 482, Level = 50, Location = 338, IV3 = true }, // Azelf - new EncounterStatic { Species = 638, Level = 50, Location = 336 }, // Cobalion - new EncounterStatic { Species = 639, Level = 50, Location = 336 }, // Terrakion - new EncounterStatic { Species = 640, Level = 50, Location = 336 }, // Virizion + new EncounterStatic { Species = 638, Level = 50, Location = 336, IV3 = true }, // Cobalion + new EncounterStatic { Species = 639, Level = 50, Location = 336, IV3 = true }, // Terrakion + new EncounterStatic { Species = 640, Level = 50, Location = 336, IV3 = true }, // Virizion new EncounterStatic { Species = 352, Level = 30, Location = 240 }, // Kecleon @ Route 119 new EncounterStatic { Species = 352, Level = 30, Location = 242 }, // Kecleon @ Route 120 new EncounterStatic { Species = 352, Level = 40, Location = 176 }, // Kecleon @ Lavaridge new EncounterStatic { Species = 352, Level = 45, Location = 196 }, // Kecleon @ Mossdeep City - new EncounterStatic { Species = 381, Level = 30, Location = 320, Version = GameVersion.AS }, // Latios - new EncounterStatic { Species = 380, Level = 30, Location = 320, Version = GameVersion.OR }, // Latias + new EncounterStatic { Species = 381, Level = 30, Location = 320, Version = GameVersion.AS, IV3 = true }, // Latios + new EncounterStatic { Species = 380, Level = 30, Location = 320, Version = GameVersion.OR, IV3 = true }, // Latias new EncounterStatic { Species = 101, Level = 40, Location = 292, Version = GameVersion.AS }, // Electrode new EncounterStatic { Species = 101, Level = 40, Location = 314, Version = GameVersion.OR }, // Electrode