mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-17 05:48:44 +00:00
Flag suspicious PIDs for shiny VC transfers
Configurable setting Closes #3002
This commit is contained in:
parent
cb0bbe889e
commit
6ed60fd35d
2 changed files with 11 additions and 0 deletions
|
@ -22,6 +22,7 @@
|
|||
public static Severity NicknamedTrade { get; set; } = Severity.Invalid;
|
||||
public static Severity NicknamedMysteryGift { get; set; } = Severity.Fishy;
|
||||
public static Severity RNGFrameNotFound { get; set; } = Severity.Fishy;
|
||||
public static Severity Gen7TransferStarPID { get; set; } = Severity.Fishy;
|
||||
public static Severity Gen8MemoryLocationTextVariable { get; set; } = Severity.Fishy;
|
||||
public static Severity Gen8TransferTrackerNotPresent { get; set; } = Severity.Fishy;
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ namespace PKHeX.Core
|
|||
public void VerifyTransferLegalityG12(LegalityAnalysis data)
|
||||
{
|
||||
VerifyTransferVCNatureEXP(data);
|
||||
VerifyShinyXorIfShiny(data);
|
||||
}
|
||||
|
||||
private void VerifyTransferVCNatureEXP(LegalityAnalysis data)
|
||||
|
@ -59,6 +60,15 @@ namespace PKHeX.Core
|
|||
};
|
||||
}
|
||||
|
||||
private static void VerifyShinyXorIfShiny(LegalityAnalysis data)
|
||||
{
|
||||
// Star, not square. Requires transferring a shiny and having the initially random PID to already be a Star shiny.
|
||||
// (15:65536, ~1:4096) odds on a given shiny transfer!
|
||||
var xor = data.pkm.ShinyXor;
|
||||
if (xor < 16 && xor != 0)
|
||||
data.AddLine(Get(LEncStaticPIDShiny, ParseSettings.Gen7TransferStarPID, CheckIdentifier.PID));
|
||||
}
|
||||
|
||||
public void VerifyTransferLegalityG3(LegalityAnalysis data)
|
||||
{
|
||||
var pkm = data.pkm;
|
||||
|
|
Loading…
Add table
Reference in a new issue