mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-02 01:38:07 -05:00
Add Bank event checking
This commit is contained in:
@@ -45,6 +45,14 @@ public bool[] getRelearnValidity(int[] Moves)
|
||||
if (Moves.Length != 4)
|
||||
return new bool[4];
|
||||
|
||||
bool link = pk6.Met_Location == 30011;
|
||||
if (link)
|
||||
{
|
||||
if (pk6.FatefulEncounter) // Should NOT be Fateful
|
||||
return new bool[4]; // False
|
||||
int[] moves = Legal.getLinkMoves(pk6);
|
||||
return moves.SequenceEqual(Moves) ? res : new bool[4];
|
||||
}
|
||||
bool egg = Legal.EggLocations.Contains(pk6.Egg_Location) && pk6.Met_Level == 1;
|
||||
bool evnt = pk6.FatefulEncounter && pk6.Met_Location > 40000;
|
||||
bool eventEgg = pk6.FatefulEncounter && (pk6.Egg_Location > 40000 || pk6.Egg_Location == 30002) && pk6.Met_Level == 1;
|
||||
|
||||
@@ -65,6 +65,24 @@ internal static int[] getValidRelearn(PK6 pk6, int skipOption)
|
||||
r.AddRange(getLVLMoves(species, 100));
|
||||
return r.Distinct().ToArray();
|
||||
}
|
||||
internal static int[] getLinkMoves(PK6 pk6)
|
||||
{
|
||||
if (pk6.Species == 251 && pk6.Met_Level == 10) // Celebi
|
||||
return new[] {610, 0, 0, 0};
|
||||
if (pk6.Species == 154 && pk6.Met_Level == 50 && pk6.AbilityNumber == 4) // Meganium Hidden
|
||||
return new[] {0, 0, 0, 0};
|
||||
if (pk6.Species == 157 && pk6.Met_Level == 50 && pk6.AbilityNumber == 4) // Typhlosion Hidden
|
||||
return new[] {0, 0, 0, 0};
|
||||
if (pk6.Species == 160 && pk6.Met_Level == 50 && pk6.AbilityNumber == 4) // Feraligatr Hidden
|
||||
return new[] {0, 0, 0, 0};
|
||||
if (pk6.Species == 377 && pk6.Met_Level == 50 && pk6.AbilityNumber == 4) // Regirock Hidden
|
||||
return new[] {153, 8, 444, 359};
|
||||
if (pk6.Species == 378 && pk6.Met_Level == 50 && pk6.AbilityNumber == 4) // Regice Hidden
|
||||
return new[] {85, 133, 58, 258};
|
||||
if (pk6.Species == 379 && pk6.Met_Level == 50 && pk6.AbilityNumber == 4) // Registeel Hidden
|
||||
return new[] {442, 157, 356, 334};
|
||||
return new int[0];
|
||||
}
|
||||
internal static IEnumerable<WC6> getValidWC6s(PK6 pk6)
|
||||
{
|
||||
IEnumerable<DexLevel> vs = getValidPreEvolutions(pk6);
|
||||
|
||||
Reference in New Issue
Block a user