add 7->8 transfer legality check

currently flags anything transferred as illegal, which is the right
thing to do until home is released.
This commit is contained in:
Kurt 2019-09-24 23:28:05 -07:00
parent f47382e34f
commit 7013d4f0c8
3 changed files with 16 additions and 0 deletions

View File

@ -232,6 +232,8 @@ private void ParsePK8()
if (pkm.VC)
UpdateVCTransferInfo();
UpdateChecks();
if (Info.Generation <= 7)
Transfer.VerifyTransferLegalityG8(this);
}
/// <summary>

View File

@ -105,6 +105,10 @@ public static partial class Legal
{
};
internal static readonly HashSet<int> TransferrableGalar = new HashSet<int>
{
};
#region Unreleased Items
internal static readonly HashSet<int> UnreleasedHeldItems_8 = new HashSet<int>
{

View File

@ -101,6 +101,16 @@ public void VerifyTransferLegalityG4(LegalityAnalysis data)
}
}
public void VerifyTransferLegalityG8(LegalityAnalysis data)
{
var pkm = data.pkm;
int species = pkm.Species;
if (!Legal.TransferrableGalar.Contains(species))
data.AddLine(GetInvalid(LTransferBad));
// todo: alternate forms disallowed?
}
public IEnumerable<CheckResult> VerifyVCEncounter(PKM pkm, IEncounterable encounter, ILocation transfer, IList<CheckMoveResult> Moves)
{
// Check existing EncounterMatch