Example #1
0
        static void Main(string[] args)
        {
            Game      game = new Game();
            BattleBot bot  = game.PromptUserForBot(0);

            SpeakingConsole.WriteLine("Bot stats:\nName: " + bot.Name + ",\nWeapon: " + bot.Weapon + ",\nCondition Level: " + bot.HP + ",\nFuel Level: " + bot.Fuel);
            game.Battle(ref bot);
            Console.ReadLine();
        }
Example #2
0
        public BattleBot PromptUserForBot(int highScore)
        {
            openingSound.Play();
            Console.WriteLine("Do you want to enable the reading out of all the text?");
            if (Console.ReadLine().Trim().ToLower()[0] != 'y')
            {
                SpeakingConsole.EnableSpeaking = false;
            }
            Console.WriteLine("\n Welcome to Battle Bots, the theme of this game is Pokémon!");
            Console.WriteLine("\n You will choose a pokémon and are given its strengths, and its weaknesses.\n After choosing your pokémon you are set into a battle.\n Every pokémon has HP and Power Points, more commonly known as PP");
            Console.WriteLine("\n When you have ran out of either of those, youre pokémon faints..");
            Console.WriteLine("\n After the Music stops press Enter to see what Prof. Oak has in store for us....");
            Console.ReadLine();
            openingSound.Stop();
            MeetingOak.Play();
            Console.ForegroundColor = ConsoleColor.DarkYellow;

            Console.WriteLine("Prof.Oak <> Hello there! Welcome to the world of pokémon!\nMy name is Oak! People call me the pokémon Prof!\nThis world is inhabited by creatures called pokémon!\nFor some people, pokémon are pets. Others use them for fights.\nMyself...I study pokémon as a profession.");
            Console.ForegroundColor = ConsoleColor.White;
            Console.WriteLine("What is your name, younge trainer?");
            string strName = Console.ReadLine();

            Console.ForegroundColor = ConsoleColor.DarkYellow;
            Console.WriteLine("\n ahhh, " + strName + " was it? Do you see that ball on the table? It's called a Poké Ball.\nIt holds a Pokémon inside. You may have it! Go on, take it! Go ahead, it's yours!");
            Console.ForegroundColor = ConsoleColor.White;
            SpeakingConsole.WriteLine("\nPlease choose a Pokemon from the following:");

            foreach (string weapon in WEAPONS)
            {
                string[] beatableWeapons   = Array.FindAll(WEAPONS, w => CanBeat(weapon, w));
                string[] unbeatableWeapons = Array.FindAll(WEAPONS, w => (!CanBeat(weapon, w)) && w != weapon);

                Console.ForegroundColor = GetColorForWeapon(weapon);
                SpeakingConsole.WriteLine("\n " + weapon + ": " + GetTypeForWeapon(weapon));
                SpeakingConsole.WriteLine("\n     Strengths: " + string.Join(" And ", beatableWeapons));
                SpeakingConsole.WriteLine("\n     Weekness: " + string.Join(" And ", unbeatableWeapons));
            }

            Console.ForegroundColor = ConsoleColor.White;


            string strWeapon;

            while (((strWeapon = SpeakingConsole.ReadLine()) == "" || !IsValidWeapon(strWeapon)) && strName != "")
            {
                SpeakingConsole.WriteLine("Please enter a valid weapon from above");
            }
            openingSound.Stop();
            MeetingOak.Stop();
            timer.Start();
            intTimeSinceGameStart = 0;
            BattleBot result;

            if (IsValidWeapon(strWeapon))
            {
                if (strName != "")
                {
                    result = new BattleBot(strName, GetValidWeaponName(strWeapon));
                }
                else
                {
                    result = new BattleBot(GetValidWeaponName(strWeapon));
                }
            }
            else
            {
                result = new BattleBot();
            }
            result.UpdateHighScore(highScore);
            return(result);
        }
Example #3
0
        public void Battle(ref BattleBot battleBot)
        {
            if (!blnIsBattleSoundPlaying)
            {
                battleSound.PlayLooping();
                blnIsBattleSoundPlaying = true;
            }

            if (battleBot.Fuel > 0 && battleBot.HP > 0)
            {
                intBattleStartTime = intTimeSinceGameStart;
                string computerWeapon = WEAPONS[rGen.Next(WEAPONS.Length)];
                Console.ForegroundColor = GetColorForWeapon(battleBot.Weapon);
                Console.WriteLine("███████████████████████████");
                SpeakingConsole.WriteLine("\n\t" + battleBot.Weapon + "           ");

                Console.ForegroundColor = ConsoleColor.White;
                SpeakingConsole.WriteLine("\n\t----- VS -----   ");

                Console.ForegroundColor = GetColorForWeapon(computerWeapon);
                SpeakingConsole.WriteLine("\n\t" + computerWeapon);    // Pokemon
                Console.WriteLine("███████████████████████████");

                Console.ForegroundColor = ConsoleColor.White;
                //SpeakingConsole.WriteLine("\nYou are being attacked by a " + computerWeapon + ". What do you do?");
                bool blnValidAction = false;
                char charReadKey    = '\0';
                while (!blnValidAction)
                {
                    bool blnCheatCodeWorked = false;
                    SpeakingConsole.WriteLine("\nAttack, Defend, or Retreat");
                    for (int i = 0; i < KONAMI_CODE.Length; i++)
                    {
                        ConsoleKeyInfo key = Console.ReadKey();
                        charReadKey = key.KeyChar;
                        if (key.Key != KONAMI_CODE[i])
                        {
                            break;
                        }
                        if (i == KONAMI_CODE.Length - 1)
                        {
                            battleBot.addScore(20);
                            SpeakingConsole.WriteLine("\nYou have cheated, trainer!! But you will get 20 extra points because that's just how the world is (unfair)");
                            blnCheatCodeWorked = true;
                        }
                    }
                    if (blnCheatCodeWorked)
                    {
                        continue;
                    }

                    string strAction = SpeakingConsole.SpeakAndReturn(charReadKey + Console.ReadLine());
                    switch (strAction.Trim().ToLower())
                    {
                    case "attack":
                        blnValidAction = true;
                        if (CanBeat(battleBot.Weapon, computerWeapon))
                        {
                            if (IsCriticalTo(battleBot.Weapon, computerWeapon))
                            {
                                battleBot.addScore(rGen.Next(6, 11));
                                SpeakingConsole.WriteLine("You have critically destroyed your opponent!!");
                            }
                            else
                            {
                                battleBot.addScore(5);
                                SpeakingConsole.WriteLine("You have destroyed your opponent!!");
                            }
                        }
                        else
                        {
                            if (IsCriticalTo(battleBot.Weapon, computerWeapon))
                            {
                                battleBot.HPDown(rGen.Next(6, 11));
                                SpeakingConsole.WriteLine("You have tragically lost!!");
                            }
                            else
                            {
                                battleBot.HPDown(5);
                                SpeakingConsole.WriteLine("You have lost!!");
                            }
                        }
                        battleBot.FuelDown(2 * intTimeElapsed);
                        break;

                    case "defend":
                        blnValidAction = true;
                        if (CanBeat(battleBot.Weapon, computerWeapon))
                        {
                            battleBot.addScore(2);
                            SpeakingConsole.WriteLine("You have defended yourself like a noble man!!");
                        }
                        else
                        {
                            if (IsCriticalTo(battleBot.Weapon, computerWeapon))
                            {
                                battleBot.HPDown(rGen.Next(3, 5));
                                SpeakingConsole.WriteLine("Whoops, your shield has completely failed!!");
                            }
                            else
                            {
                                battleBot.HPDown(2);
                                SpeakingConsole.WriteLine("Whoops, your shield has failed!!");
                            }
                        }
                        battleBot.FuelDown(intTimeElapsed);
                        break;

                    case "retreat":
                        blnValidAction = true;
                        if (rGen.Next(0, 4) == 0)
                        {
                            SpeakingConsole.WriteLine("Unfortunately, you couldn't escape in time!!");
                            battleBot.HPDown(7);
                        }
                        else
                        {
                            SpeakingConsole.WriteLine("You have succesfully escaped from the battle like a coward!! No points for you!!");
                        }
                        battleBot.FuelDown(3 * intTimeElapsed);
                        break;

                    case "absorb":
                        if (battleBot.Weapon == computerWeapon)
                        {
                            blnValidAction = true;
                            SpeakingConsole.WriteLine("You have succesfully absorbed the opponent's power!! This tastes yummy OwO");
                            Console.WriteLine("Professor Oak<> MMMMMmmmm... Fried " + battleBot.Weapon);
                            battleBot.Refuel(10);
                            battleBot.Heal(10);
                        }
                        break;
                    }
                    if (blnValidAction)
                    {
                        GetSoundForWeapon(battleBot.Weapon).PlaySync();
                        battleSound.Play();
                    }
                }
                Thread.Sleep(1000);
                SpeakingConsole.WriteLine("\nBot stats:\nName: " + battleBot.Name + "\nWeapon: " + battleBot.Weapon + "\nHP: " + battleBot.HP + "\nPower Points Left: " + battleBot.Fuel + "\nTurn Time: " + intTimeElapsed + "\nTotal Battle Time: " + intTimeSinceGameStart + "\nPoints: " + battleBot.Score + "\nHighest Score: " + battleBot.HighestScore);
                Thread.Sleep(1000);
                Battle(ref battleBot);
            }
            else
            {
                battleBot.UpdateHighScore(battleBot.Score);
                SpeakingConsole.WriteLine("Your bot has lost. Do you want to play again?");
                string strInput = "";
                if ((strInput = SpeakingConsole.ReadLine()) != "" && strInput.Trim().ToLower()[0] == 'y')
                {
                    battleBot = PromptUserForBot(battleBot.HighestScore);
                    Battle(ref battleBot);
                }
            }
        }
Example #4
0
        public BattleBot PromptUserForBot(int highScore)
        {
            openingSound.Play();
            Console.WriteLine("Do you want to enable the reading out of all the text?");
            if (Console.ReadLine().Trim().ToLower()[0] != 'y')
            {
                SpeakingConsole.EnableSpeaking = false;
            }
            openingSound.Stop();
            meetingOakSound.PlayLooping();
            Console.ForegroundColor = ConsoleColor.DarkYellow;
            SpeakingConsole.WriteLine("Welcome to Rock Paper Scissors Lizard Spock");
            Console.WriteLine("\n Press Enter...");
            Console.ReadLine();

            SpeakingConsole.WriteLine("\n ...");
            Console.ReadLine();
            SpeakingConsole.WriteLine("\n  Opps, Wrong Program..");
            Console.ReadLine();
            SpeakingConsole.WriteLine("\n Welcome to Battle Bots");
            Console.ReadLine();
            SpeakingConsole.WriteLine("\n This is a Battle to the Dea... err of the Pokemon ");
            Console.ReadLine();
            SpeakingConsole.WriteLine("\n My name is Professor Oak, Welcome to the World of Pokemon");
            Console.ReadLine();
            Console.WriteLine("\n This world is inhabited by creatures called pokémon!");
            Console.WriteLine("\n For some people, pokémon are pets. Others use them for fights.");
            Console.WriteLine("\n Myself...I study pokémon as a profession.");
            Console.ReadLine();
            Console.ForegroundColor = ConsoleColor.White;
            SpeakingConsole.WriteLine("\n Professor Oak: what is your Name?");

            string strName = SpeakingConsole.ReadLine();

            ///////////////////////////////////////////////////////////////////////
            SpeakingConsole.WriteLine("\nPlease choose a Pokemon from the following:");

            foreach (string weapon in WEAPONS)
            {
                string[] beatableWeapons   = Array.FindAll(WEAPONS, w => CanBeat(weapon, w));
                string[] unbeatableWeapons = Array.FindAll(WEAPONS, w => (!CanBeat(weapon, w)) && w != weapon);

                Console.ForegroundColor = GetColorForWeapon(weapon);
                SpeakingConsole.WriteLine("\n " + weapon + ": " + GetTypeForWeapon(weapon));
                SpeakingConsole.WriteLine("\n\tStrengths: " + string.Join(" And ", beatableWeapons));
                SpeakingConsole.WriteLine("\n\tWeekness: " + string.Join(" And ", unbeatableWeapons));
            }
            //////////////////////////////////////////////////////////////////
            Console.ForegroundColor = ConsoleColor.White;

            string strWeapon;

            while (((strWeapon = SpeakingConsole.ReadLine()) == "" || !IsValidWeapon(strWeapon)) && strName != "")
            {
                SpeakingConsole.WriteLine("Please enter a valid weapon from above");
            }
            meetingOakSound.Stop();
            timer.Start();
            intTimeSinceGameStart = 0;
            BattleBot result;

            if (IsValidWeapon(strWeapon))
            {
                if (strName != "")
                {
                    result = new BattleBot(strName, GetValidWeaponName(strWeapon));
                }
                else
                {
                    result = new BattleBot(GetValidWeaponName(strWeapon));
                }
            }
            else
            {
                result = new BattleBot();
            }
            result.UpdateHighScore(highScore);
            return(result);
        }
Example #5
0
        public BattleBot PromptUserForBot(int highScore)
        {
            OpenSFX.Play();
            // Plays Sound
            Console.WriteLine("\n Version 42.069");
            Console.WriteLine("\n Copyright (©) The Pokemon Company 2019");
            Console.WriteLine("\n Copyright (©) Nintendo 2019");
            Console.WriteLine("\n Copyright (©) MrLettsGiveUseAnA.Inc 2019\n");

            Console.WriteLine("Do you want to enable the reading out of all the text?");
            if (Console.ReadLine().Trim().ToLower()[0] != 'y')
            {
                SpeakingConsole.EnableSpeaking = false;
            }
            OpenSFX.Stop();
            MeetOakSFX.PlayLooping();
            Console.ForegroundColor = ConsoleColor.DarkYellow;
            SpeakingConsole.WriteLine("Welcome to Rock Paper Scissors Lizard Spock");
            Console.WriteLine("\n Press Enter...");
            Console.ReadLine();

            Console.WriteLine("\n ...");
            Console.ReadLine();
            SpeakingConsole.WriteLine("\n  Opps, Wrong Program..");
            Console.ReadLine();
            SpeakingConsole.WriteLine("\n Welcome to Battle Bots");
            Console.ReadLine();
            SpeakingConsole.WriteLine("\n This is a Battle to the Dea... err of the Pokemon ");
            Console.ReadLine();
            SpeakingConsole.WriteLine("\n My name is Professor Oak, Welcome to the World of Pokemon");
            Console.ReadLine();
            Console.WriteLine("\n This world is inhabited by creatures called pokémon!");
            Console.WriteLine("\n For some people, pokémon are pets. Others use them for fights.");
            Console.WriteLine("\n Myself...I study pokémon as a profession.");
            Console.ReadLine();
            Console.ForegroundColor = ConsoleColor.White;
            SpeakingConsole.WriteLine("\n Professor Oak: what is your Name?");

            string strName = SpeakingConsole.ReadLine();



            SpeakingConsole.WriteLine("\n Please choose a Pokemon:");

            //foreach (string weapon in WEAPONS)
            //{
            //string[] beatableWeapons = Array.FindAll(WEAPONS, w => CanBeat(weapon, w));
            //SpeakingConsole.WriteLine("\n" + weapon + " Beats " + String.Join(" And ", beatableWeapons));
            //}

            ///////////////////////////////////////////////////////////////////////
            //Console.WriteLine("\n Please type your Choice of Pokemon:");
            //Console.ForegroundColor = ConsoleColor.Yellow;
            //Console.WriteLine("\n Pikachu: Electric");
            //Console.WriteLine("\n     Strengths: Squirtle and Pidgey");
            //Console.WriteLine("\n     Weekness: Geodude and Swadloon");

            //Console.ForegroundColor = ConsoleColor.Blue;
            //Console.WriteLine("\n Squirtle: Water");
            //Console.WriteLine("\n     Strengths: Swadloon and Geodude");
            //Console.WriteLine("\n     Weekness: Pickachu and Pidgey");

            //Console.ForegroundColor = ConsoleColor.DarkRed;
            //Console.WriteLine("\n Charmander: Fire");
            //Console.WriteLine("\n     Strengths: Squirtle and Swadloon");
            //Console.WriteLine("\n     Weekness: Pickachu and Geodude");

            //Console.ForegroundColor = ConsoleColor.Gray;
            //Console.WriteLine("\n Geodude: Rock/Ground");
            //Console.WriteLine("\n     Strengths: Pikachu and Pidgey");
            //Console.WriteLine("\n     Weekness: Swadloon and Squirtle");

            //Console.ForegroundColor = ConsoleColor.Green;
            //Console.WriteLine("\n Bulbasaur: Grass");
            //Console.WriteLine("\n     Strengths: Geodude and Pikachu");
            //Console.WriteLine("\n     Weekness: Squirtle and Pidgey");

            SpeakingConsole.WriteLine("\nPlease choose a Pokemon from the following:");

            foreach (string weapon in WEAPONS)
            {
                string[] beatableWeapons   = Array.FindAll(WEAPONS, w => CanBeat(weapon, w));
                string[] unbeatableWeapons = Array.FindAll(WEAPONS, w => (!CanBeat(weapon, w)) && w != weapon);

                Console.ForegroundColor = GetColorForWeapon(weapon);
                SpeakingConsole.WriteLine("\n " + weapon + ": " + GetTypeForWeapon(weapon));
                SpeakingConsole.WriteLine("\n     Strengths: " + string.Join(" And ", beatableWeapons));
                SpeakingConsole.WriteLine("\n     Weekness: " + string.Join(" And ", unbeatableWeapons));
            }
            Console.ForegroundColor = ConsoleColor.White;


            //////////////////////////////////////////////////////////////////

            string strWeapon;

            while (((strWeapon = SpeakingConsole.ReadLine()) == "" || !IsValidWeapon(strWeapon)) && strName != "")
            {
                SpeakingConsole.WriteLine("Please enter a valid weapon from above");
            }
            MeetOakSFX.Stop();

            timer.Start();
            intTimeSinceGameStart = 0;
            BattleBot result;

            if (IsValidWeapon(strWeapon))
            {
                if (strName != "")
                {
                    result = new BattleBot(strName, GetValidWeaponName(strWeapon));
                }
                else
                {
                    result = new BattleBot(GetValidWeaponName(strWeapon));
                }
            }
            else
            {
                result = new BattleBot();
            }
            result.UpdateHighScore(highScore);
            return(result);
        }
Example #6
0
        public void Battle(ref BattleBot battleBot)
        {
            if (!blnIsBattleSoundPlaying)
            {
                BattleSFX.PlayLooping();
                blnIsBattleSoundPlaying = true;
            }

            if (battleBot.FuelLevel > 0 && battleBot.ConditionLevel > 0)
            {
                intBattleStartTime = intTimeSinceGameStart;
                string computerWeapon = WEAPONS[rGen.Next(WEAPONS.Length)];
                //////////////////////////////////
                Console.ForegroundColor = GetColorForWeapon(battleBot.Weapon);
                Console.WriteLine("███████████████████████████");
                SpeakingConsole.WriteLine("\n\t\t" + battleBot.Weapon + "           ");

                Console.ForegroundColor = ConsoleColor.White;
                SpeakingConsole.WriteLine("\n\t\t----- VS -----   ");

                Console.ForegroundColor = GetColorForWeapon(computerWeapon);
                SpeakingConsole.WriteLine("\n\t\t" + computerWeapon);    // Pokemon
                Console.WriteLine("███████████████████████████");

                Console.ForegroundColor = ConsoleColor.White;
                //////////////////////////////////
                //SpeakingConsole.WriteLine("\nYou are being attacked by a " + computerWeapon + ". What do you do?");
                bool blnValidAction = false;
                char charReadKey    = '\0';
                while (!blnValidAction)
                {
                    bool blnCheatCodeWorked = false;
                    SpeakingConsole.WriteLine("\nAttack, Defend, or Retreat");
                    for (int i = 0; i < KONAMI_CODE.Length; i++)
                    {
                        ConsoleKeyInfo key = Console.ReadKey();
                        charReadKey = key.KeyChar;
                        if (key.Key != KONAMI_CODE[i])
                        {
                            break;
                        }
                        if (i == KONAMI_CODE.Length - 1)
                        {
                            battleBot.GainPoints(20);
                            SpeakingConsole.WriteLine("\nYou have cheated, trainer!! But you will get 20 extra points because that's just how the world is (unfair)");
                            PokeBallOpenSFX.PlaySync();

                            blnCheatCodeWorked = true;
                            BattleSFX.PlayLooping();
                        }
                    }
                    if (blnCheatCodeWorked)
                    {
                        continue;
                    }

                    string strAction = SpeakingConsole.SpeakAndReturn(charReadKey + Console.ReadLine());
                    switch (strAction.Trim().ToLower())
                    {
                    case "attack":
                        blnValidAction = true;
                        if (CanBeat(battleBot.Weapon, computerWeapon))
                        {
                            if (IsCriticalTo(battleBot.Weapon, computerWeapon))
                            {
                                battleBot.GainPoints(rGen.Next(6, 11));
                                SpeakingConsole.WriteLine("Professor Oak: You have critically destroyed your opponent!!");

                                //////////////////////////////////
                                ///////////////////////////////////
                                /////////////////////////////////
                            }
                            else
                            {
                                battleBot.GainPoints(5);
                                SpeakingConsole.WriteLine("Professor Oak: You have destroyed your opponent!!");
                            }
                        }
                        else
                        {
                            if (IsCriticalTo(battleBot.Weapon, computerWeapon))
                            {
                                battleBot.HandleDamage(rGen.Next(6, 11));
                                SpeakingConsole.WriteLine("Professor Oak: You have tragically lost!!");
                            }
                            else
                            {
                                battleBot.HandleDamage(5);
                                SpeakingConsole.WriteLine("Professor Oak: You have lost!!");
                            }
                        }
                        battleBot.ConsumeFuel(2 * intTimeElapsed);
                        break;

                    case "defend":
                        blnValidAction = true;
                        if (CanBeat(battleBot.Weapon, computerWeapon))
                        {
                            battleBot.GainPoints(2);
                            SpeakingConsole.WriteLine("Professor Oak: You have defended yourself like a noble man!!");
                        }
                        else
                        {
                            if (IsCriticalTo(battleBot.Weapon, computerWeapon))
                            {
                                battleBot.HandleDamage(rGen.Next(3, 5));
                                SpeakingConsole.WriteLine("Professor Oak: Whoops, your shield has completely failed!!");
                            }
                            else
                            {
                                battleBot.HandleDamage(2);
                                SpeakingConsole.WriteLine("Professor Oak: Whoops, your shield has failed!!");
                            }
                        }
                        battleBot.ConsumeFuel(intTimeElapsed);
                        break;

                    case "retreat":
                        blnValidAction = true;
                        if (rGen.Next(0, 4) == 0)
                        {
                            SpeakingConsole.WriteLine("Professor Oak: Unfortunately, you couldn't escape in time!!");
                            battleBot.HandleDamage(7);
                        }
                        else
                        {
                            SpeakingConsole.WriteLine("Professor Oak: You have succesfully escaped from the battle like a coward!! No points for you!!");
                        }
                        battleBot.ConsumeFuel(3 * intTimeElapsed);
                        break;

                    case "absorb":
                        if (battleBot.Weapon == computerWeapon)
                        {
                            blnValidAction = true;
                            SpeakingConsole.WriteLine("You have succesfully absorbed the opponent's power!! This tastes yummy OwO");
                            SpeakingConsole.WriteLine("Professor Oak: Mmmmm... Fried " + computerWeapon);
                            battleBot.Refuel(10);
                            battleBot.Heal(10);
                        }
                        break;
                    }

                    if (blnValidAction)
                    {
                        GetSoundForWeapon(battleBot.Weapon).PlaySync();
                        BattleSFX.Play();
                    }
                }
                Thread.Sleep(1000);
                SpeakingConsole.WriteLine("\nBot stats:");

                if (battleBot.Name == "PokeBall")
                {
                    Console.WriteLine("────────▄███████████▄────────");
                    Console.WriteLine("─────▄███▓▓▓▓▓▓▓▓▓▓▓███▄─────");
                    Console.WriteLine("────███▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓███────");
                    Console.WriteLine("───██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██───");
                    Console.WriteLine("──██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██──");
                    Console.WriteLine("─██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██─");
                    Console.WriteLine("██▓▓▓▓▓▓▓▓▓███████▓▓▓▓▓▓▓▓▓██");
                    Console.WriteLine("██▓▓▓▓▓▓▓▓██░░░░░██▓▓▓▓▓▓▓▓██");
                    Console.WriteLine("██▓▓▓▓▓▓▓██░░███░░██▓▓▓▓▓▓▓██");
                    Console.WriteLine("███████████░░███░░███████████");
                    Console.WriteLine("██░░░░░░░██░░███░░██░░░░░░░██");
                    Console.WriteLine("██░░░░░░░░██░░░░░██░░░░░░░░██");
                    Console.WriteLine("██░░░░░░░░░███████░░░░░░░░░██");
                    Console.WriteLine("─██░░░░░░░░░░░░░░░░░░░░░░░██─");
                    Console.WriteLine("──██░░░░░░░░░░░░░░░░░░░░░██──");
                    Console.WriteLine("───██░░░░░░░░░░░░░░░░░░░██───");
                    Console.WriteLine("────███░░░░░░░░░░░░░░░███────");
                    Console.WriteLine("─────▀███░░░░░░░░░░░███▀─────");
                    Console.WriteLine("────────▀███████████▀────────");
                }

                SpeakingConsole.WriteLine("Trainers Name: " + battleBot.Name + ",");

                // Color Desiders
                if (battleBot.Weapon == "Pickachu")
                {
                    Console.ForegroundColor = ConsoleColor.Yellow;
                }
                else if (battleBot.Weapon == "Geodude")
                {
                    Console.ForegroundColor = ConsoleColor.Gray;
                }
                else if (battleBot.Weapon == "Squirtle")
                {
                    Console.ForegroundColor = ConsoleColor.Blue;
                }
                else if (battleBot.Weapon == "Swadloon")
                {
                    Console.ForegroundColor = ConsoleColor.Green;
                }
                else if (battleBot.Weapon == "Charmander")
                {
                    Console.ForegroundColor = ConsoleColor.DarkRed;
                }



                SpeakingConsole.WriteLine("Pokemon: " + battleBot.Weapon + ",");
                Console.ForegroundColor = ConsoleColor.White;
                SpeakingConsole.WriteLine("Condition Level: " + battleBot.ConditionLevel + ",");
                SpeakingConsole.WriteLine("Power Points:" + battleBot.FuelLevel + ",\nTurn Time: " + intTimeElapsed + ",\nTotal Battle Time: " + intTimeSinceGameStart + ",\nPoints: " + battleBot.Score + ",\nHighest Score: " + battleBot.HighScore);

                SpeakingConsole.WriteLine("\n Health Left: ##");
                SpeakingConsole.WriteLine("\n Power Left: ");
                //Console.WriteLine("\n Next Move: ");

                Thread.Sleep(1000);
                Battle(ref battleBot);
            }
            else
            {
                battleBot.UpdateHighScore(battleBot.Score);
                SpeakingConsole.WriteLine("Your pokemon has lost. Do you want to play again?");
                if (SpeakingConsole.ReadLine().Trim().ToLower()[0] == 'y')
                {
                    battleBot = PromptUserForBot(battleBot.HighScore);
                    Battle(ref battleBot);
                }
            }
        }
Example #7
0
        static void Main(string[] args)
        {
            //Starting Sound (Welcome to BATTLE BOTS)

            Game      game = new Game();
            BattleBot bot  = game.PromptUserForBot(0);

            SpeakingConsole.WriteLine("Bot stats:\nName: " + bot.Name + ",\nWeapon: " + bot.Weapon + ",\nCondition Level: " + bot.ConditionLevel + ",\nFuel Level: " + bot.FuelLevel);
            game.Battle(ref bot);
            Console.ReadLine();



            ////////////////////////////////////////////////

            Player p;

            System.Media.SoundPlayer Open = new System.Media.SoundPlayer(GameR.Pokemon_Open);
            Open.Play();
            Console.WriteLine("Welcome to Rock Paper Scissors Lizard Spock");

            Console.WriteLine("\n ...");

            Console.WriteLine("\n  Opps, Wrong Program..");

            Console.WriteLine("\n Welcome to Battle Bots");

            Console.WriteLine("\n This is a Battle to the Dea... err of the Pokemon ");

            Console.WriteLine("\n My name is Professor Oak, Welcome to the World of Pokemon");
            Console.WriteLine("\n Professor Oak: what is your Name?");
            int Number = 0;

            do
            {
                //...............................STILL IN WORK, DONT USE...................
                string strName = Console.ReadLine();

                if (strName.Trim() == "")
                {
                    p = new Player();
                }
                else
                {
                    p      = new Player(strName);
                    Number = 1;
                }
            }while (Number == 0);

            Console.WriteLine("\n Please type your Choice of Pokemon:");
            Console.ForegroundColor = ConsoleColor.Yellow;
            Console.WriteLine("\n Pikachu: ## Damage");
            Console.WriteLine("\n     Weekness: Squirtle and Pidgey");

            Console.ForegroundColor = ConsoleColor.Blue;
            Console.WriteLine("\n Squirtle: ## Damage");
            Console.WriteLine("\n     Weekness: Swadloon and Geodude");

            Console.ForegroundColor = ConsoleColor.White;
            Console.WriteLine("\n Pidgey: ## Damage");
            Console.WriteLine("\n     Weekness: Swadloon and Squirtle");

            Console.ForegroundColor = ConsoleColor.Gray;
            Console.WriteLine("\n Geodude: ## HP");
            Console.WriteLine("\n               ## Damage");

            Console.ForegroundColor = ConsoleColor.Green;
            Console.WriteLine("\n Swadloon: ## HP");
            Console.WriteLine("\n               ## Damage");

            Console.ForegroundColor = ConsoleColor.White;

            string strUserBotChoice = Console.ReadLine();

            //User then Will Choice the "Bot"

            // For Fightinging
            Console.WriteLine("\n Pokemon Name: ## HP");
            Console.WriteLine("\n               ## Damage");

            Console.WriteLine("\n     ----- VS -----   ");


            Console.WriteLine("\n Pokemon Name: ## HP");
            Console.WriteLine("\n               ## Damage");

            // for Move Input

            Console.WriteLine("\n Health Left: ##");
            Console.WriteLine("\n Energy Left: ##%");
            Console.WriteLine("\n Next Move: ");



            Console.ReadLine();
        }