unroll cxd seed completely

re-letter for clearer order of RNG results, don't unroll 3x to roll
forward 2x (just unroll 1,1 then 1).

Put origin seed in RNG Reporter => frame 1 result
Closes #1169
This commit is contained in:
Kurt 2017-05-27 22:18:04 -07:00
parent 2cd1a29b76
commit db2d043199
2 changed files with 8 additions and 10 deletions

View file

@ -827,20 +827,20 @@ namespace PKHeX.Core
private void verifyCXDStarterCorrelation(PIDIV pidiv)
{
var spec = ((EncounterStatic)EncounterMatch).Species;
int rev; // pidiv reversed 5x yields SID, 6x yields TID. shift by 7 if another PKM is generated prior
int rev; // pidiv reversed 2x yields SID, 3x yields TID. shift by 7 if another PKM is generated prior
switch (spec)
{
// XD
case 133: // Eevee
rev = 5;
rev = 2;
break;
// Colosseum
case 197: // Umbreon (generated before Espeon)
rev = 5;
rev = 2;
break;
case 196: // Espeon (generated after Umbreon)
rev = 5+7;
rev = 2+7;
break;
default:
return;

View file

@ -187,15 +187,13 @@ namespace PKHeX.Core
var xdc = getSeedsFromPID(RNG.XDRNG, bot, top);
foreach (var seed in xdc)
{
var C = RNG.XDRNG.Reverse(seed, 3);
var B = RNG.XDRNG.Prev(seed);
var A = RNG.XDRNG.Prev(B);
var D = RNG.XDRNG.Next(C);
var E = RNG.XDRNG.Next(D);
if (!getIVs(D >> 16, E >> 16).SequenceEqual(IVs))
if (!getIVs(A >> 16, B >> 16).SequenceEqual(IVs))
continue;
pidiv = new PIDIV {OriginSeed = seed, RNG = RNG.XDRNG, Type = PIDType.CXD};
pidiv = new PIDIV {OriginSeed = RNG.XDRNG.Prev(A), RNG = RNG.XDRNG, Type = PIDType.CXD};
return true;
}
pidiv = null;