public Frame(uint seed, FrameType type, RNG rng, LeadRequired lead) { Seed = seed; Lead = lead; FrameType = type; RNG = rng; }
public static int GetLevel(EncounterSlot slot, LeadRequired lead, uint lvlrand) { if (lead == LeadRequired.PressureHustleSpirit) { return(slot.LevelMax); } if (slot.LevelMin == slot.LevelMax) { return(slot.LevelMin); } int delta = slot.LevelMax - slot.LevelMin + 1; var adjust = (int)(lvlrand % delta); return(slot.LevelMin + adjust); }
private static bool GetCanEncounter(EncounterSlot slot, FrameType frameType, int rand, LeadRequired lead) { int proc = frameType == FrameType.MethodJ ? rand / 656 : rand % 100; if ((slot.Type & SlotType.Rock_Smash) != 0) { return(proc < 60); } if (frameType == FrameType.MethodH) { return(true); // fishing encounters are disjointed by the hooked message. } // fishing if ((slot.Type & SlotType.Old_Rod) != 0) { if (proc < 25) { return(true); } if (proc < 50) { return(lead == LeadRequired.None); } } else if ((slot.Type & SlotType.Good_Rod) != 0) { if (proc < 50) { return(true); } if (proc < 75 && lead == LeadRequired.None) { return(lead == LeadRequired.None); } } else if ((slot.Type & SlotType.Super_Rod) != 0) { if (proc < 75) { return(true); } return(lead == LeadRequired.None); // < 100 always true } return(false); // shouldn't hit here }
public static bool GetIsEncounterable(EncounterSlot slot, FrameType frameType, int rand, LeadRequired lead) { if (slot.Type.IsSweetScentType()) { return(true); } return(true); // todo //return GetCanEncounter(slot, frameType, rand, lead); }
internal static bool IsLevelOrSlotModified(this LeadRequired Lead) => Lead.RemoveFlags() > LeadRequired.Synchronize;
internal static LeadRequired RemoveFlags(this LeadRequired Lead) => Lead & ~LeadRequired.AllFlags;
public Frame GetFrame(uint seed, LeadRequired lead) => new Frame(seed, FrameType, RNG, lead);
public Frame GetFrame(uint seed, LeadRequired lead, uint esv) => new Frame(seed, FrameType, RNG, lead) { ESV = esv };
public Frame(uint seed, FrameType type, LeadRequired lead) { Seed = seed; Lead = lead; FrameType = type; }
public Frame GetFrame(uint seed, LeadRequired lead, uint esv, uint lvl, uint origin) => new Frame(seed, FrameType, RNG, lead) { RandESV = esv, RandLevel = lvl, OriginSeed = origin, };
public Frame GetFrame(uint seed, LeadRequired lead, uint esv, uint origin) => GetFrame(seed, lead, esv, esv, origin);
internal static bool NeedsLevelCall(this LeadRequired lead) => (lead & LeadRequired.UsesLevelCall) != 0;
internal static LeadRequired RemoveFlags(this LeadRequired Lead) => Lead & LeadRequired.NoFlags;