Example #1
0
        private void updateLegality(LegalityAnalysis la = null)
        {
            if (!fieldsLoaded)
                return;

            Legality = la ?? new LegalityAnalysis(pk6);
            PB_Legal.Image = Legality.Valid ? Properties.Resources.valid : Properties.Resources.warn;
            PB_Legal.Visible = pk6.Gen6;

            // Refresh Move Legality
            for (int i = 0; i < 4; i++)
                movePB[i].Visible = !Legality.vMoves[i].Valid;
            for (int i = 0; i < 4; i++)
                relearnPB[i].Visible = !Legality.vRelearn[i].Valid;
        }
Example #2
0
 private void showLegality(PK6 pk, bool tabs, bool verbose)
 {
     LegalityAnalysis la = new LegalityAnalysis(pk);
     if (tabs)
         updateLegality(la);
     Util.Alert(verbose ? la.VerboseReport : la.Report);
 }
Example #3
0
 private void showLegality(PKM pk, bool tabs, bool verbose)
 {
     LegalityAnalysis la = new LegalityAnalysis(pk);
     if (!la.Native)
     {
         Util.Alert($"Checking legality of PK{pk.Format} files that originated from Gen{pk.GenNumber} is not supported.");
         return;
     }
     if (tabs)
         updateLegality(la);
     Util.Alert(verbose ? la.VerboseReport : la.Report);
 }
Example #4
0
        private void updateLegality(LegalityAnalysis la = null)
        {
            if (!fieldsLoaded)
                return;
            Legality = la ?? new LegalityAnalysis(pkm);
            if (!Legality.Parsed || !Legality.Native || HaX)
            {
                PB_Legal.Visible = false;
                return;
            }
            PB_Legal.Visible = true;

            PB_Legal.Image = Legality.Valid ? Properties.Resources.valid : Properties.Resources.warn;

            // Refresh Move Legality
            for (int i = 0; i < 4; i++)
                movePB[i].Visible = !Legality.vMoves[i].Valid && !HaX;

            int[] suggested = Legality.getSuggestedRelearn();
            for (int i = 0; i < 4; i++)
            {
                if (pkm.RelearnMoves[i] == 0 && suggested[i] != 0)
                    relearnPB[i].Visible = !HaX;
                else
                    relearnPB[i].Visible = !Legality.vRelearn[i].Valid && !HaX;
            }
        }
Example #5
0
        private void updateLegality(LegalityAnalysis la = null)
        {
            if (!fieldsLoaded)
                return;
            Legality = la ?? new LegalityAnalysis(pkm);
            if (!Legality.Parsed || HaX)
            {
                PB_Legal.Visible = false;
                return;
            }
            PB_Legal.Visible = true;

            PB_Legal.Image = Legality.Valid ? Properties.Resources.valid : Properties.Resources.warn;

            // Refresh Move Legality
            for (int i = 0; i < 4; i++)
                movePB[i].Visible = !Legality.vMoves[i].Valid && !HaX;

            for (int i = 0; i < 4; i++)
                relearnPB[i].Visible = !Legality.vRelearn[i].Valid && !HaX;
        }