public RNGInfo(IRNG rng, int offset, Chest chestInfo1, Chest chestInfo2) { UInt32 prng1 = rng.PeekRand(offset); UInt32 prng2 = rng.PeekRand(offset + 1); UInt32 prng3 = rng.PeekRand(offset + 2); this.RawRNG = prng1; this.StealNormal = Steal.CheckSteal(prng1, prng2, prng3); this.StealWithCuffs = Steal.CheckStealCuffs(prng1, prng2, prng3); Chest1 = chestInfo1.CheckChest(prng1, prng2); Chest2 = chestInfo2.CheckChest(prng1, prng2); }
/// <summary> /// Checks result of opening chest /// </summary> /// <param name="rng"></param> /// <param name="offset"></param> public ChestResult CheckChest(IRNG rng, int offset = 0) { return(CheckChest(rng.PeekRand(offset), rng.PeekRand(offset + 1))); }
/// <summary> /// Check to see if chest spawned SpawnPosition + offset positions away. /// </summary> /// <param name="rng">RNG instance to check against</param> /// <param name="offset">Offset to use as start</param> public bool CheckSpawn(IRNG rng, int offset = 0) { return(CheckSpawn(rng.PeekRand(SpawnPosition + offset))); }
/// <summary> /// Tests if a combo reesults from the given IRNG instance and offset /// </summary> public static bool DoesCombo(IRNG rng, int offset = 0) { return(DoesCombo(rng.PeekRand(offset + ComboDeterminationPosition - 1))); }
/// <summary> /// Check steal using instance of IRNG. Does not modify state of RNG. /// </summary> /// <param name="rng">IRNG instance to check against</param> /// <param name="offset">Position in RNG to check</param> /// <param name="cuffs">Whether you have cuffs</param> /// <returns>The result of your steal command.</returns> public static StealResult CheckSteal(IRNG rng, int offset, bool cuffs = false) { return(CheckSteal(rng.PeekRand(offset + 0), rng.PeekRand(offset + 1), rng.PeekRand(offset + 2), cuffs)); }