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);
                    }
                }
            }
        }
Beispiel #2
0
 public static bool IsShiny(this ShinyType shinyType) => !(shinyType == ShinyType.NotShiny);
Beispiel #3
0
 public static string ToSymbol(this ShinyType shinyType) => shinySymbol[(int)shinyType];
Beispiel #4
0
 public Individual SetShinyType(ShinyType value)
 {
     Shiny = value; return(this);
 }
Beispiel #5
0
 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;
 }