Add Bank event checking

This commit is contained in:
Kaphotics
2016-03-06 11:19:09 -08:00
parent ff64a875fc
commit b1dfbdd419
2 changed files with 26 additions and 0 deletions

View File

@@ -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;

View File

@@ -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);