Revise g5 pid bit check for forced PID statics

Closes #3027

Roamers: Get PID generated externally
NPokemon: Get PID from a fixed value
Forced (Anti)Shiny: Get PID altered

Thanks @LegoFigure11 && Princess Emily (discord 4650) !
This commit is contained in:
Kurt 2020-10-12 11:04:29 -07:00
parent 3b4fd49af9
commit 1524093099
4 changed files with 7 additions and 4 deletions

View file

@ -21,7 +21,7 @@ namespace PKHeX.Core
public virtual int Location { get; set; }
public int Ability { get; set; }
public virtual Shiny Shiny { get; set; } = Shiny.Random;
public Shiny Shiny { get; set; } = Shiny.Random;
public int Gender { get; set; } = -1;
public int EggLocation { get; set; }
public Nature Nature { get; set; } = Nature.Random;

View file

@ -3,10 +3,13 @@
internal sealed class EncounterStatic5N : EncounterStatic5
{
public readonly uint PID;
public override Shiny Shiny { get; set; } = Shiny.FixedValue;
public const bool NSparkle = true;
internal EncounterStatic5N(uint pid) => PID = pid;
internal EncounterStatic5N(uint pid)
{
Shiny = Shiny.FixedValue;
PID = pid;
}
protected override void SetPINGA(PKM pk, EncounterCriteria criteria)
{

View file

@ -51,7 +51,7 @@ namespace PKHeX.Core
break;
// Forced PID or generated without an encounter
if (s is EncounterStatic5N || (s is EncounterStatic5 s5 && s5.Roaming) || s.Shiny == Shiny.Never)
if (s is EncounterStatic5 s5 && (s5.Roaming || s5.Shiny != Shiny.Random))
break;
VerifyG5PID_IDCorrelation(data);
break;