private void Prepare(ResultW6 rt) { if (RNGPool.tinystatus == null) { rt.Slot = slot = 1; rt.Synchronize = RNGPool.AssumeSynced; return; } // Delay switch (Wildtype) { case EncounterType.RockSmash: RNGPool.time_elapse6(16); tiny_Advance(3); RNGPool.time_elapse6(RNGPool.DelayTime - 228); tiny_Advance(1); RNGPool.time_elapse6(212); rt.IsPokemon = TinyRand(100) <= 30; // To-do break; case EncounterType.CaveShadow: RNGPool.time_elapse6(32); tiny_Advance(1); RNGPool.time_elapse6(46); break; case EncounterType.OldRod: case EncounterType.GoodRod: case EncounterType.SuperRod: RNGPool.time_elapse6(RNGPool.DelayTime); tiny_Advance(3 * PartyPKM); RNGPool.time_elapse6(132); Advance(132); var fishingdelay = TinyRand(7) * 30 + 60; RNGPool.time_elapse6(fishingdelay); Advance(fishingdelay); break; default: RNGPool.time_elapse6(RNGPool.DelayTime); break; } // Sync rt.Synchronize = getSync; // Encounter Slot and Others switch (Wildtype) { case EncounterType.FriendSafari: rt.IsPokemon = TinyRand(100) < 13; rt.Slot = slot = (byte)(TinyRand(SlotNum) + 1); break; case EncounterType.OldRod: case EncounterType.GoodRod: case EncounterType.SuperRod: rt.IsPokemon = TinyRand(100) < EncounterRate; rt.Slot = slot = getslot(TinyRand(100)); break; case EncounterType.PokeRadar: rt.Slot = IsShinyLocked ? slot = 1 : getslot(TinyRand(100)); break; default: rt.Slot = getslot(TinyRand(100)); break; } // Something before generation tiny_Advance(1); // Item generated after pkm rt.Item = TinyRand(100); rt.ItemStr = getitemstr(rt.Item, CompoundEye); }
private void Prepare(ResultW6 rt) { if (RNGPool.tinystatus == null) { rt.Synchronize = RNGPool.TinySynced; return; } // Delay switch (Wildtype) { case EncounterType.RockSmash: RNGPool.time_elapse6(16); tiny_Advance(3); RNGPool.time_elapse6(RNGPool.DelayTime - 228); tiny_Advance(1); RNGPool.time_elapse6(212); RNGResult.IsPokemon = TinyRand(3) == 0; // 0 for Pokemon, 1 for item, 2 for nothing break; case EncounterType.CaveShadow: RNGPool.time_elapse6(32); tiny_Advance(1); RNGPool.time_elapse6(46); break; case EncounterType.Fishing: RNGPool.time_elapse6(RNGPool.DelayTime); tiny_Advance(3 * PartyPKM); RNGPool.time_elapse6(132); var fishingdelay = TinyRand(7) * 30 + 60; RNGPool.time_elapse6(fishingdelay); Advance(132 + fishingdelay); // Main RNG Advance due to the RANDOM delay break; default: RNGPool.time_elapse6(RNGPool.DelayTime); break; } CheckLeadAbility(TinyRand(100)); rt.Synchronize = SynchroPass; // Encounter Slot and Others switch (Wildtype) { case EncounterType.PokeRadar when IsShinyLocked: // Not first encounter, skip slot check break; case EncounterType.Normal: case EncounterType.Fishing: case EncounterType.FriendSafari: // 13% RNGResult.IsPokemon = TinyRand(100) < EncounterRate; goto default; default: rt.Slot = getslot6(); break; } // Flute if (IsORAS) { FluteBoost = getFluteBoost(TinyRand(100)); } // Something tiny_Advance(1); // Item generated after pkm rt.Item = getHeldItem(TinyRand(100), CompoundEye); }