mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-15 08:47:14 +00:00
Add alolan exclusive form check
Marowak and Exeggutor are exempt due to their pre-evolutions not having a form and past gen pkm evolving into the alolan variant.
This commit is contained in:
parent
fffa0e5a67
commit
671d8ef81f
2 changed files with 23 additions and 2 deletions
|
@ -1365,6 +1365,9 @@ namespace PKHeX
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pkm.Format >= 7 && pkm.AltForm != 0 && Legal.AlolanOriginForms.Contains(pkm.Species))
|
||||||
|
{ AddLine(Severity.Invalid, "Form cannot be obtained for pre-Alola generation games.", CheckIdentifier.Form); return; }
|
||||||
if (pkm.AltForm > 0 && new[] {Legal.BattleForms, Legal.BattleMegas, Legal.BattlePrimals}.Any(arr => arr.Contains(pkm.Species)))
|
if (pkm.AltForm > 0 && new[] {Legal.BattleForms, Legal.BattleMegas, Legal.BattlePrimals}.Any(arr => arr.Contains(pkm.Species)))
|
||||||
{ AddLine(Severity.Invalid, "Form cannot exist outside of a battle.", CheckIdentifier.Form); return; }
|
{ AddLine(Severity.Invalid, "Form cannot exist outside of a battle.", CheckIdentifier.Form); return; }
|
||||||
|
|
||||||
|
|
|
@ -268,8 +268,6 @@ namespace PKHeX
|
||||||
new EncounterStatic { Species = 103, Form = 1, Level = 40, Relearn = new[]{000, 000, 000, 000}, Ability = 1, Location = -1, }, // Exeggutor-1
|
new EncounterStatic { Species = 103, Form = 1, Level = 40, Relearn = new[]{000, 000, 000, 000}, Ability = 1, Location = -1, }, // Exeggutor-1
|
||||||
new EncounterStatic { Species = 785, Form = 0, Level = 60, Relearn = new[]{000, 000, 000, 000}, Shiny = false, Ability = 1, Location = 030, }, // Tapu Koko
|
new EncounterStatic { Species = 785, Form = 0, Level = 60, Relearn = new[]{000, 000, 000, 000}, Shiny = false, Ability = 1, Location = 030, }, // Tapu Koko
|
||||||
new EncounterStatic { Species = 542, Form = 0, Level = 57, Relearn = new[]{382, 437, 014, 494}, Location = -1, }, // Leavanny
|
new EncounterStatic { Species = 542, Form = 0, Level = 57, Relearn = new[]{382, 437, 014, 494}, Location = -1, }, // Leavanny
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
private static readonly EncounterTrade[] TradeGift_SM = // @ a\1\5\5
|
private static readonly EncounterTrade[] TradeGift_SM = // @ a\1\5\5
|
||||||
{
|
{
|
||||||
|
@ -293,6 +291,26 @@ namespace PKHeX
|
||||||
0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // Johto Balls
|
0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // Johto Balls
|
||||||
0x1A, // Beast
|
0x1A, // Beast
|
||||||
};
|
};
|
||||||
|
internal static readonly int[] AlolanOriginForms =
|
||||||
|
{
|
||||||
|
019, // Rattata
|
||||||
|
020, // Raticate
|
||||||
|
025, // Pikachu (Cosplay not transferrable)
|
||||||
|
026, // Raichu
|
||||||
|
027, // Sandshrew
|
||||||
|
028, // Sandslash
|
||||||
|
037, // Vulpix
|
||||||
|
038, // Ninetails
|
||||||
|
050, // Diglett
|
||||||
|
051, // Dugtrio
|
||||||
|
052, // Meowth
|
||||||
|
053, // Persian
|
||||||
|
074, // Geodude
|
||||||
|
075, // Graveler
|
||||||
|
076, // Golem
|
||||||
|
088, // Grimer
|
||||||
|
089, // Muk
|
||||||
|
};
|
||||||
internal static readonly int[] PastGenAlolanNatives =
|
internal static readonly int[] PastGenAlolanNatives =
|
||||||
{
|
{
|
||||||
010, 011, 012, 019, 020, 021, 022, 025, 026, 027, 028, 035, 036, 037, 038, 039, 040, 041, 042, 046, 047, 050,
|
010, 011, 012, 019, 020, 021, 022, 025, 026, 027, 028, 035, 036, 037, 038, 039, 040, 041, 042, 046, 047, 050,
|
||||||
|
|
Loading…
Reference in a new issue