2017-05-14 21:42:18 +00:00
|
|
|
|
namespace PKHeX.Core
|
|
|
|
|
{
|
|
|
|
|
public class Frame
|
|
|
|
|
{
|
2017-05-15 06:21:34 +00:00
|
|
|
|
public readonly uint Seed;
|
2017-05-14 21:42:18 +00:00
|
|
|
|
public readonly LeadRequired Lead;
|
2017-05-15 06:21:34 +00:00
|
|
|
|
|
|
|
|
|
private readonly FrameType FrameType;
|
|
|
|
|
private readonly RNG RNG;
|
2017-05-14 21:42:18 +00:00
|
|
|
|
|
|
|
|
|
public uint ESV { get; set; }
|
2017-05-15 06:21:34 +00:00
|
|
|
|
public int EncounterSlot(SlotType t) => SlotRange.GetSlot(t, ESV, FrameType);
|
2017-06-18 01:37:19 +00:00
|
|
|
|
public void SetOriginSeed(int Offset) => OriginSeed = RNG.Reverse(Seed, Offset);
|
2017-05-15 06:21:34 +00:00
|
|
|
|
public bool LevelSlotModified => Lead > LeadRequired.SynchronizeFail;
|
|
|
|
|
|
|
|
|
|
public uint OriginSeed;
|
2017-05-14 21:42:18 +00:00
|
|
|
|
|
2017-05-15 06:21:34 +00:00
|
|
|
|
public Frame(uint seed, FrameType type, RNG rng, LeadRequired lead)
|
2017-05-14 21:42:18 +00:00
|
|
|
|
{
|
|
|
|
|
Seed = seed;
|
|
|
|
|
Lead = lead;
|
|
|
|
|
FrameType = type;
|
2017-05-15 06:21:34 +00:00
|
|
|
|
RNG = rng;
|
2017-05-14 21:42:18 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|