예제 #1
0
        void SetPage(Capacite c)
        {
            lbType.Text = "Type: " + c.TypeAttaque.ToString();
            lbForce.Text = "Force: " + c.Force.ToString();
            lbPrecision.Text = "Précision: " + c.Précision.ToString();
            lbPP.Text = "PP: " + c.pp.ToString();
            if (c.numCT != 0)
                lbCTCS.Text = "CT" + c.numCT;
            else if (c.numCS != 0)
                lbCTCS.Text = "CS" + c.numCS;
            else
                lbCTCS.Text = "";
            txtDescription.Text = c.Description;

            if (c.NatureDegat != NatureDegat.NULL)
                lbNature.Text = "Nature: " + c.NatureDegat.ToString();
            else
                lbNature.Text = "Nature: ";
        }
예제 #2
0
        public FormCapacites(Capacite c)
        {
            InitializeComponent();

            CurrentCapacite = c;
        }
예제 #3
0
        void GetOutPutCapacite2(Capacite cap, double force, out int damagepvmin, out int damagepvmax, out int KOmax, out int KOmin, out double dgpourcentmin, out double dgpourcentmax)
        {
            double atq = 0.0;
            double def = 0.0;

            if (cap.NatureDegat == NatureDegat.Physique)
            {
                atq = A2;
                def = D1;
            }
            else if (cap.NatureDegat == NatureDegat.Special)
            {
                atq = AS2;
                def = DS1;
            }

            double efficacite = 0.0;
            if (CurrentPokemon1.Type2 != Type.AUCUN)
                efficacite = Xblood.Types[(int)cap.TypeAttaque, (int)CurrentPokemon1.Type1] + Xblood.Types[(int)cap.TypeAttaque, (int)CurrentPokemon1.Type2];
            else
                efficacite = Xblood.Types[(int)cap.TypeAttaque, (int)CurrentPokemon1.Type1];

            if (efficacite == 0)
                efficacite = 1;
            else if (efficacite == -2)
                efficacite = 0.50;
            else if (efficacite == -4)
                efficacite = 0.25;
            else if (efficacite > 4)
                efficacite = 0;

            bool stab = cap.TypeAttaque == CurrentPokemon2.Type1 || cap.TypeAttaque == CurrentPokemon2.Type2;

            damagepvmin = GetDamage((double)(NumUDNiveau2.Value), atq, efficacite, def, force, stab, 217.0);
            damagepvmax = GetDamage((double)(NumUDNiveau2.Value), atq, efficacite, def, force, stab, 255.0);

            if (damagepvmin != 0)
                KOmax = (int)Math.Ceiling(PV1 / damagepvmin);
            else
                KOmax = 0;
            if (damagepvmax != 0)
                KOmin = (int)Math.Ceiling(PV1 / damagepvmax);
            else
                KOmin = 0;

            dgpourcentmin = Math.Round(((double)damagepvmin / PV1) * 100, 1);
            dgpourcentmax = Math.Round(((double)damagepvmax / PV1) * 100, 1);
        }
예제 #4
0
        private bool CheckCapacite(Pokemon p)
        {
            if (chkApprenant.Checked && ComboCapacites.Text != "")
            {
                Capacite c = new Capacite();
                c.Nom = ComboCapacites.Text;

                if (!Xblood.HasMove(p, c))
                    return false;
            }
            return true;
        }
예제 #5
0
        private bool CheckCapacite4(Pokemon p)
        {
            if (cbcap4.SelectedIndex != -1 && cbcap4.Text != "-")
            {
                Capacite c = new Capacite();
                c.Nom = cbcap4.Text;

                if (!Xblood.HasMove(p, c))
                    return false;
            }
            return true;
        }