Пример #1
0
        [InlineData(OR, Rotom, 0, ThunderWave, ThunderShock, ConfuseRay, Discharge)] // no inheriting levelup
        public void CheckBad(GameVersion game, Species species, int form, params Move[] movelist)
        {
            var gen   = game.GetGeneration();
            var moves = GetMoves(movelist);
            var test  = MoveBreed.Process(gen, (int)species, form, game, moves);

            test.Should().BeFalse();
        }
Пример #2
0
        [InlineData(UM, Charmander, 0, Ember, BellyDrum, Scratch, Growl)] // swap order, inherit + egg moves
        public void CheckFix(GameVersion game, Species species, int form, params Move[] movelist)
        {
            var gen   = game.GetGeneration();
            var moves = GetMoves(movelist);

            var test = MoveBreed.Process(gen, (int)species, form, game, moves, out var valid);

            valid.Should().BeFalse();
            var reorder = MoveBreed.GetExpectedMoves(gen, (int)species, form, game, moves, test);

            // fixed order should be different now.
            reorder.SequenceEqual(moves).Should().BeFalse();
            // nonzero move count should be same
            reorder.Count(z => z != 0).Should().IsSameOrEqualTo(moves.Count(z => z != 0));
        }
Пример #3
0
        public void VerifyBreed(GameVersion game, Species species, int form, params Move[] movelist)
        {
            var gen   = game.GetGeneration();
            var moves = GetMoves(movelist);
            var test  = MoveBreed.Process(gen, (int)species, form, game, moves, out var valid);

            valid.Should().BeTrue();

            var x = ((byte[])test);

            if (gen != 2)
            {
                x.SequenceEqual(x.OrderBy(z => z)).Should().BeTrue();
            }
            else
            {
                x.SequenceEqual(x.OrderBy(z => z != (byte)EggSource2.Base)).Should().BeTrue();
            }
        }