More pogo rules

This commit is contained in:
Kurt 2020-11-11 21:03:47 -08:00
parent df5ebd1f54
commit edd9ace51e
3 changed files with 16 additions and 2 deletions

View File

@ -8,17 +8,24 @@ namespace PKHeX.Core
/// </summary>
internal static class EncountersGO
{
/// <summary> Clamp for generating encounters; no species allowed above this value except for those in <see cref="ExtraSpecies"/>. </summary>
private const int MaxSpeciesID_GO_HOME = Legal.MaxSpeciesID_6;
/// <summary> When generating encounters, these species will be skipped. </summary>
private static readonly HashSet<int> DisallowedSpecies = new HashSet<int>
{
(int)Spinda,
};
/// <summary> Species beyond <see cref="MaxSpeciesID_GO_HOME"/> </summary>
private static readonly int[] ExtraSpecies =
{
(int)Meltan,
(int)Melmetal,
(int)Obstagoon,
(int)Perrserker,
(int)Runerigus,
};
internal static readonly EncounterArea7g[] SlotsGO_GG = EncounterArea7g.GetArea();

View File

@ -201,7 +201,7 @@ bool IsValidPikachuCap()
{
// We're okay with a Mime Jr. that has evolved via level up.
}
else
else if (EncounterMatch.Version != GameVersion.GO)
{
return GetInvalid(LFormInvalidGame);
}

View File

@ -66,7 +66,7 @@ private void VerifyIVsSlot(LegalityAnalysis data, EncounterSlot w)
{
case 6: VerifyIVsGen6(data, w); break;
case 7: VerifyIVsGen7(data); break;
// case 8: VerifyIVsGen8(data); break; // No rules for IV generation.
case 8: VerifyIVsGen8(data); break;
}
}
@ -79,6 +79,13 @@ private void VerifyIVsGen7(LegalityAnalysis data)
VerifyIVsFlawless(data, 2); // Chain of 10 yields 5% HA and 2 flawless IVs
}
private void VerifyIVsGen8(LegalityAnalysis data)
{
var pkm = data.pkm;
if (pkm.GO)
VerifyIVsGoTransfer(data);
}
private void VerifyIVsGen6(LegalityAnalysis data, EncounterSlot w)
{
var pkm = data.pkm;