PKHeX/PKHeX.Core/Legality/RNG/Frame/FrameCheckDetails.cs
Kurt 95fbf66a6e
Refactor: Gen3/4 Lead Encounters, property fixing (#4193)
In addition to the Method 1 (and other sibling PIDIV types) correlation, an encounter can only be triggered if the calls prior land on the Method {1} seed. The RNG community has dubbed these patterns as "Method J" (D/P/Pt), "Method K" (HG/SS), and "Method H" (Gen3, coined by yours truly). The basic gist of these is that they are pre-requisites, like the Shadow locks of Colosseum/XD. 

Rename/re-type a bunch of properties to get the codebase more in line with correct property names & more obvious underlying types.
2024-02-22 21:20:54 -06:00

28 lines
793 B
C#

namespace PKHeX.Core;
public readonly ref struct FrameCheckDetails<T>
{
public readonly T Encounter;
public readonly byte LevelMin;
public readonly byte LevelMax;
public readonly uint Seed1;
public readonly uint Seed2;
public readonly uint Seed3;
public readonly byte Format;
public uint Seed4 => LCRNG.Prev(Seed3);
public uint Prev1 => Seed1 >> 16;
public uint Prev2 => Seed2 >> 16;
public uint Prev3 => Seed3 >> 16;
public FrameCheckDetails(T enc, uint seed, byte levelMin, byte levelMax, byte format)
{
Encounter = enc;
LevelMin = levelMin;
LevelMax = levelMax;
Format = format;
seed = Seed1 = LCRNG.Prev(seed);
seed = Seed2 = LCRNG.Prev(seed);
Seed3 = LCRNG.Prev(seed);
}
}