Exemplo n.º 1
0
        public void BattelMenu()
        {
            IsBattelTime = true;
            while (IsBattelTime)
            {
                int ChosenAttack = 0;
                Console.WriteLine(" Battle \n Pokemon \n Items");
                CheckStatus();
                switch (Convert.ToInt32(Console.ReadLine()))
                {
                case 1:
                    ChosenAttack = ChoseAttack();
                    break;

                case 2:
                    Bag.ChangeAktivePokemon();
                    break;

                case 3:
                    if (IsSingelPokemon)
                    {
                        Bag.ChoseItem(Enemy.Team[0]);
                    }
                    else
                    {
                        Bag.ChoseItem(null);
                    }

                    break;
                }

                BattlePhase(ChosenAttack);
                CheckStatus();
            }
            Random Rand    = new Random();
            int    mingain = 100 * Enemy.Team.Count;
            int    maxgain = 500 * Enemy.Team.Count;

            Bag.Mony = Rand.Next(mingain, maxgain);
        }
Exemplo n.º 2
0
        public void CheckStatus()
        {
            Console.WriteLine("Test Status of BagInterface Pokemon");

            if (Bag.CheckIsAktivePokemonKO())
            {
                Console.WriteLine("Active Pokemon is KO");
                if (Bag.CheckAreAllPokemonKO())
                {
                    Console.WriteLine("All Pokemons are KO");

                    IsBattelTime = false;
                }
                else
                {
                    Bag.ChangeAktivePokemon();
                }
            }

            Console.WriteLine("Test Status of Enemy Pokemon");
            if (Enemy.CheckIsAktivePokemonKO())
            {
                Console.WriteLine("Active Pokemon is KO");
                if (Enemy.CheckAreAllPokemonKO())
                {
                    Console.WriteLine("All Pokemons are KO");
                    IsBattelTime = false;
                }
                else
                {
                    Console.WriteLine("Pokemon must be changed");
                    Enemy.ChangeAktivePokemon();
                }
            }
            else
            {
                Console.WriteLine("Its All ok");
            }
        }