Beispiel #1
0
        private void MoveChoice(Toon Main, Toon Other, IntMoves ManaMoves, StrMoves RageMoves, AgMoves EnergyMoves, LuckMoves luckMoves, Extras extra)
        {
            ManaMoves.InitializeMoves(Other, Main,extra);
            RageMoves.InitializeMoves(Other, Main,extra);
            EnergyMoves.InitializeMoves(Other,extra, Main);
            luckMoves.InitializeMoves(Other);

            Move ability = new Move();
            for (int i = 0; i < 4; i++)
            {
                Main.Ability[i] = new Move();
                bool Assign = true;
                if (Main.moveClass[i] == "Mana")
                {
                     ability = ManaMoves.Ability[rand.Next(0, ManaMoves.NumOfMoves)];
                     for (int k = 0; k < i; k++)
                     {
                         Assign = true;
                         if (Main.Ability[k].Name == ability.Name)
                         {
                             i--;
                             Assign = false;
                             break;
                         }
                     }
                    if (Assign == true)
                     AssignAbility(Main.Ability[i], ability);
                }
                if (Main.moveClass[i] == "Energy")
                {
                    ability = EnergyMoves.Ability[rand.Next(0, EnergyMoves.NumOfMoves)];
                    for (int k = 0; k < i; k++)
                    {
                        Assign = true;
                        if (Main.Ability[k].Name == ability.Name)
                        {
                            i--;
                            Assign = false;
                            break;
                        }
                    }
                    if (Assign == true)
                        AssignAbility(Main.Ability[i], ability);
                }
                if (Main.moveClass[i] == "Rage")
                {
                     ability = RageMoves.Ability[rand.Next(0, RageMoves.NumOfMoves)];
                     for (int k = 0; k < i; k++)
                     {
                         Assign = true;
                         if (Main.Ability[k].Name == ability.Name)
                         {
                             i--;
                             Assign = false;
                             break;
                         }
                     }
                     if (Assign == true)
                     AssignAbility(Main.Ability[i], ability);
                }
                if (Main.moveClass[i] == "Luck")
                {
                     ability = luckMoves.Ability[rand.Next(0, luckMoves.NumOfMoves)];
                     for (int k = 0; k < i; k++)
                     {
                         Assign = true;
                         if (Main.Ability[k].Name == ability.Name)
                         {
                             i--;
                             Assign = false;
                             break;
                         }
                     }
                     if (Assign == true)
                     AssignAbility(Main.Ability[i], ability);
                }
            }
        }