public static IEnumerable <uint> CalcBack(uint tid, uint pid, ShinyType shinyType) { // 死ね. if (shinyType == ShinyType.NotShiny) { yield break; } var psv = (pid >> 16) ^ (pid & 0xFFFF); // 菱形になるseedを返す. if ((shinyType & ShinyType.Square) != 0) { foreach (var seed in CalcBack(tid, tid ^ psv).Where(LCGExtensions.IsAccessibleInNameScreen)) { yield return(seed); } } // 星型になるseedを返す. if ((shinyType & ShinyType.Star) != 0) { for (uint bit = 1; bit < 8; bit++) { foreach (var seed in CalcBack(tid, tid ^ psv ^ bit).Where(LCGExtensions.IsAccessibleInNameScreen)) { yield return(seed); } } } }
public static bool IsShiny(this ShinyType shinyType) => !(shinyType == ShinyType.NotShiny);
public static string ToSymbol(this ShinyType shinyType) => shinySymbol[(int)shinyType];
public Individual SetShinyType(ShinyType value) { Shiny = value; return(this); }
public UnovaBattle StartWildBattle(Pokemon pokemon, int level, int mapId, ShinyType type = ShinyType.Normal, int x = 20, int y = 20) => StartWildBattle((int)pokemon, level, mapId, (int)type, x, y);
public ShinyCriteria(uint tsv, ShinyType shinyType) { this.shinyType = shinyType; this.tsv = tsv; }