Esempio n. 1
0
        private void B_RandLearn_Click(object sender, EventArgs e)
        {
            SaveCurrent();
            var settings = (LearnSettings)PG_Learn.SelectedObject;
            var rand     = new LearnsetRandomizer(ROM.Info, Editor.Learn.LoadAll(), Editor.Personal);
            var moves    = ROM.Data.MoveData.LoadAll();

            int[] banned = Legal.GetBannedMoves(ROM.Info.Game, moves.Length);
            rand.Initialize(moves, settings, EditUtil.Settings.Move, banned);
            rand.Execute();
            LoadIndex(CB_Species.SelectedIndex);
            System.Media.SystemSounds.Asterisk.Play();
        }
Esempio n. 2
0
        private void B_RandAll_Click(object sender, EventArgs e)
        {
            ushort[] HMs = { 15, 19, 57, 70, 127, 249, 291 };
            ushort[] TMs = {};
            if (CHK_HMs.Checked && Main.ExeFSPath != null)
            {
                TMHMEditor6.getTMHMList(Main.Config.ORAS, out TMs, out HMs);
            }

            List <int> banned = new List <int> {
                165, 621
            };                                           // Struggle, Hyperspace Fury

            if (!CHK_HMs.Checked)
            {
                banned.AddRange(HMs.Select(z => (int)z));
            }
            if (CHK_NoFixedDamage.Checked)
            {
                banned.AddRange(MoveRandomizer.FixedDamageMoves);
            }

            setList();
            var sets = files.Select(z => new Learnset6(z)).ToArray();
            var rand = new LearnsetRandomizer(Main.Config, sets)
            {
                Expand       = CHK_Expand.Checked,
                ExpandTo     = (int)NUD_Moves.Value,
                Spread       = CHK_Spread.Checked,
                SpreadTo     = (int)NUD_Level.Value,
                STAB         = CHK_STAB.Checked,
                rSTABPercent = NUD_STAB.Value,
                STABFirst    = CHK_STAB.Checked,
                BannedMoves  = banned.ToArray(),
                Learn4Level1 = CHK_4MovesLvl1.Checked,
            };

            rand.Execute();
            sets.Select(z => z.Write()).ToArray().CopyTo(files, 0);
            getList();
            WinFormsUtil.Alert("All Pokémon's Level Up Moves have been randomized!", "Press the Dump button to see the new Level Up Moves!");
        }
Esempio n. 3
0
        private void B_RandAll_Click(object sender, EventArgs e)
        {
            setList();
            var sets = files.Select(z => new Learnset7(z)).ToArray();
            var rand = new LearnsetRandomizer(Main.Config, sets)
            {
                Expand       = CHK_Expand.Checked,
                ExpandTo     = (int)NUD_Moves.Value,
                Spread       = CHK_Spread.Checked,
                SpreadTo     = (int)NUD_Level.Value,
                STAB         = CHK_STAB.Checked,
                rSTABPercent = NUD_STAB.Value,
                BannedMoves  = new[] { 165, 621, 464 }.Concat(Legal.Z_Moves).ToArray(), // Struggle, Hyperspace Fury, Dark Void
            };

            rand.Execute();
            sets.Select(z => z.Write()).ToArray().CopyTo(files, 0);
            getList();
            WinFormsUtil.Alert("All Pokémon's Level Up Moves have been randomized!");
        }