Beispiel #1
0
        //This is the timer for the quests
        public static void Timer()
        {
            //The background music
            SoundPlayer myPlayer = new SoundPlayer(@"C:\Users\vmadmin\RiderProjects\RPGProject\theme\quest.wav");

            myPlayer.Play();

            for (int a = 12; a >= 0; a--)
            {
                Console.ForegroundColor = ConsoleColor.DarkYellow;
                Console.WriteLine(@"
                    *    .  *       .             *    .  *       .             *    .  *       .             *    .  *       .        *       *     *    *
                                             *                        *                         *          .  *        *        .        .  *        *        .     *
                 *   .        *       .       .       *   .        *       .       .       *   .        *       .       .       *   . *       *       .      * .       *    *
                           .     *.     * .                       * .      .  *        *        .        .  *        *        .            .  *        *        .     
                                   .     .  *        *        .     .  *        *        .     .  *        *    *    .     .  *        *        .     .  *        *        .     .  *        *
                           .          *      .        .                    .        .   .                .        .                    .        .   .                .        . 
                                      *              *.  *           *                 .        .           .  *               *                     *                   .        .
                    .  *           *       .   *          * .  *   *.     * .     *.     * .                *            * .     *.     * .     *.     * .                  *.  *           *      
                                                 .                             .                             .   *                          .                             . 
                             *          .   *         *          .   *         *          .   *         *          .   *         *          .   *         *          .   *         *          ");
                Console.ForegroundColor = ConsoleColor.White;
                Console.Write("You are on quest {0}", a);

                System.Threading.Thread.Sleep(1000);

                Console.Clear();

                if (a <= 0)
                {
                    myPlayer.Stop();
                    Performance.gold += 50;
                    Level.Level1++;
                    Console.Clear();
                    Home.PrintMenuHome();
                    Console.WriteLine(
                        "________________________________________________________________________________________________________________________");
                    Console.ForegroundColor = ConsoleColor.Green;
                    Console.WriteLine(">You are done with the Quest, you've got {0} Gold and the quest item. You're now Level {1}.",
                                      Performance.gold, Level.Level1);
                    Console.ForegroundColor = ConsoleColor.White;
                    Home.StartHome();
                }
            }
        }
Beispiel #2
0
        //Checking if you have enough gold
        public static void CheckGold()
        {
            CharacterMethods methods = new CharacterMethods();

            if (gold < 50)
            {
                Console.Clear();
                Home.PrintMenuHome();
                Console.WriteLine(
                    "________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine(">You don't have enough gold to refill your energy!");
                Console.ForegroundColor = ConsoleColor.White;
                Console.ReadLine();
                methods.ContinueHome();
            }

            else
            {
                gold   -= 50;
                energy += 100;
                methods.ContinueHome();
            }
        }
Beispiel #3
0
        //Checking if you have enough energy
        public static void CheckEnergy()
        {
            if (energy < Home.fullEnergy)
            {
                Console.Clear();
                Home.PrintMenuHome();
                Console.WriteLine(
                    "________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine(">You don't have enough Energy to do a Quest!");
                Console.ForegroundColor = ConsoleColor.White;
                Home.StartHome();
            }

            else if (Level.Level1 == 1 || Level.Level1 == 2)
            {
                energy -= questEnergy;
                Stopwatch.Timer();
            }

            else if (Level.Level1 == 3)
            {
                energy -= questEnergy;
                Console.Clear();
                Endboss.StartGame();
            }

            else
            {
                Console.WriteLine(
                    "________________________________________________________________________________________________________________________");
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine(">You don't have enough energy to do a quest!");
                Console.ForegroundColor = ConsoleColor.White;
            }
        }
 public void ContinueHome()
 {
     Console.Clear();
     Home.PrintMenuHome();
     Home.StartHome();
 }