2023-04-20 21:23:15 -07:00
|
|
|
namespace PKHeX.Core;
|
|
|
|
|
|
|
|
public static class EggHatchLocation6
|
|
|
|
{
|
|
|
|
public static bool IsValidMet6XY(int location)
|
|
|
|
{
|
|
|
|
const int min = 6;
|
|
|
|
const int max = 168;
|
|
|
|
var delta = location - min;
|
2023-05-14 15:16:31 -04:00
|
|
|
if ((uint)delta > max - min)
|
2023-04-20 21:23:15 -07:00
|
|
|
return false;
|
|
|
|
|
|
|
|
if (location % 2 != 0)
|
|
|
|
return false; // All locations are even
|
|
|
|
return location != 80; // unused
|
|
|
|
}
|
|
|
|
|
|
|
|
public static bool IsValidMet6AO(int location)
|
|
|
|
{
|
|
|
|
const int min = 170;
|
|
|
|
const int max = 354;
|
|
|
|
var delta = location - min;
|
2023-05-14 15:16:31 -04:00
|
|
|
if ((uint)delta > max - min)
|
2023-04-20 21:23:15 -07:00
|
|
|
return false;
|
|
|
|
|
|
|
|
if (location % 2 != 0)
|
|
|
|
return false; // All locations are even
|
|
|
|
return location != 348; // unused
|
|
|
|
}
|
|
|
|
}
|