Ejemplo n.º 1
0
        private void B_LearnMetronome_Click(object sender, EventArgs e)
        {
            var settings = (LearnSettings)PG_Learn.SelectedObject;
            var moveset  = (MovesetRandSettings)PG_Move.SelectedObject;
            var rand     = new LearnsetRandomizer(ROM.Info, Editor.Learn.LoadAll(), Editor.Personal);

            rand.Initialize(ROM.Data.MoveData.LoadAll(), settings, moveset);
            rand.ExecuteMetronome();
            LoadIndex(CB_Species.SelectedIndex);
            System.Media.SystemSounds.Asterisk.Play();
        }
Ejemplo n.º 2
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();
        }
Ejemplo n.º 3
0
        private void B_LearnExpand_Click(object sender, EventArgs e)
        {
            var settings = (LearnSettings)PG_Learn.SelectedObject;

            if (!settings.Expand)
            {
                WinFormsUtil.Error("Expand moves not selected. Please double check settings.",
                                   "Not expanding learnsets.");
                return;
            }
            var rand = new LearnsetRandomizer(ROM.Info, Editor.Learn.LoadAll(), Editor.Personal);

            rand.Initialize(ROM.Data.MoveData.LoadAll(), settings, EditUtil.Settings.Move);
            rand.ExecuteExpandOnly();
            LoadIndex(CB_Species.SelectedIndex);
            System.Media.SystemSounds.Asterisk.Play();
        }