Add tracker unique text & setting

This commit is contained in:
Kurt 2020-02-12 18:10:24 -08:00
parent e77fa205a0
commit 63044cd3f9
3 changed files with 12 additions and 2 deletions

View File

@ -432,6 +432,7 @@ public static class LegalityCheckStrings
public static string LTransferPIDECBitFlip { get; set; } = "PID should be equal to EC [with top bit flipped]!";
public static string LTransferPIDECEquals { get; set; } = "PID should be equal to EC!";
public static string LTransferPIDECXor { get; set; } = "Encryption Constant matches shinyxored PID.";
public static string LTransferTrackerMissing { get; set; } = "Pokémon HOME Transfer Tracker is missing.";
#endregion
}

View File

@ -23,6 +23,7 @@ public static class ParseSettings
public static Severity NicknamedMysteryGift { get; set; } = Severity.Fishy;
public static Severity RNGFrameNotFound { get; set; } = Severity.Fishy;
public static Severity Gen8MemoryLocationTextVariable { get; set; } = Severity.Fishy;
public static Severity Gen8TransferTrackerNotPresent { get; set; } = Severity.Fishy;
/// <summary>
/// Checks to see if Crystal is available to visit/originate from.

View File

@ -127,8 +127,16 @@ public void VerifyTransferLegalityG8(LegalityAnalysis data)
data.AddLine(GetInvalid(LTransferBad));
}
}
if (pk.Tracker == 0) // Tracker value?
data.AddLine(GetInvalid(LTransferBad));
// Tracker value is set via Transfer across HOME.
// Can't validate the actual values (we aren't the server), so we can only check against zero.
if (pk.Tracker == 0)
{
data.AddLine(Get(LTransferTrackerMissing, ParseSettings.Gen8TransferTrackerNotPresent));
// To the reader: It seems like the best course of action for setting a tracker is:
// - Transfer a 0-Tracker pkm to HOME to get assigned a valid Tracker
// - Don't make one up.
}
}
}