コード例 #1
0
ファイル: Game.cs プロジェクト: sys920/Console_RPG_Game
        //Display Hero Stats
        private void Stats()
        {
            Hero.ShowStats();

            Console.WriteLine("Press any key to return to main menu.");
            Console.ReadKey();
        }
コード例 #2
0
ファイル: Game.cs プロジェクト: zmw33/ZmW-ConsoleApp
 public void Stats()
 {
     Hero.ShowStats();
     Console.WriteLine("");
     Console.WriteLine("Press any key to return to main menu.");
     Console.ReadKey();
     this.Main();
 }
コード例 #3
0
ファイル: Game.cs プロジェクト: Dragwar/SD190-OOP-RPG
        }// End of the Main Method

        /*
         * ========================================================================================
         * Stats ---> Displays the Hero's stats
         * ========================================================================================
         */
        private void Stats()
        {
            Console.Clear();

            Console.Title = $"{Hero.Name}'s Stats: [> Str: {Hero.Strength} | Def: {Hero.Defense} | HP: {Hero.CurrentHP}/{Hero.OriginalHP} <]";
            Hero.ShowStats(true);

            Console.WriteLine("Press any key to return to main menu.");
            Console.ReadKey(true);

            Console.Title = $"Main Menu";
        }// End of the Stats Method
コード例 #4
0
ファイル: Fight.cs プロジェクト: Dragwar/SD190-OOP-RPG
        /*
         * ========================================================================================
         * Start ---> Fight menu (choose to fight, see stats, or maybe more options in the future)
         * ========================================================================================
         */
        public void Start()
        {
            Console.ForegroundColor = ConsoleColor.Cyan;
            Console.WriteLine($"\nA {CurrentMonster.Name}! (Strength = {CurrentMonster.Strength} | Defense = {CurrentMonster.Defense} | HP = {CurrentMonster.CurrentHP})");
            Console.ResetColor();

            while (CurrentMonster.CurrentHP > 0 && Hero.CurrentHP > 0)
            {
                Console.Title = $"FIGHT!!! ({Hero.Name} vs {CurrentMonster.Name}) Stats: [> Str: {Hero.Strength} | Def: {Hero.Defense} | HP: {Hero.CurrentHP}/{Hero.OriginalHP} <] | Enemy Current HP: {CurrentMonster.CurrentHP}";
                Console.WriteLine($"\nWhat will you do?");
                Console.WriteLine("1. Fight");
                Console.WriteLine("2. Use Health Potion");
                Console.WriteLine("3. Flee");
                Console.WriteLine("4. See The Enemy's Status and Your Status");

                string input = Console.ReadLine().Trim();

                if (input == "1")
                {
                    HeroTurn();
                }
                else if (input == "2")
                {
                    UseHealthPotion();
                }
                else if (input == "3")
                {
                    Flee();
                }
                else if (input == "4")
                {
                    Hero.ShowStats(false);
                    CurrentMonster.ShowStats();
                }
            }
        }
コード例 #5
0
ファイル: Fight.cs プロジェクト: Dragwar/SD190-OOP-RPG
        /*
         * ========================================================================================
         * Win ---> Win Message and returns to the Main Menu
         * ========================================================================================
         */
        private void Win(WinConditionEnum howHeroWon)
        {
            if (howHeroWon == WinConditionEnum.Kill)
            {
                Hero.AddExperiencePoints(MonstersEXPWorth);
                Hero.AddGoldCoins(MonstersGoldCoinWorth);

                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.WriteLine($"{CurrentMonster.Name} has been defeated! You win the battle!");
                Console.WriteLine($"(+ {MonstersGoldCoinWorth} Gold Coins)");
                Console.WriteLine($"(+ {MonstersEXPWorth} EXP)");
                Console.ResetColor();
                ManageAchievements.AddDeadMonster(CurrentMonster);
            }
            else if (howHeroWon == WinConditionEnum.Flee)
            {
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.WriteLine($"You have successfully fled the battle!");
                Console.ResetColor();
            }
            Hero.ShowStats(false);

            Console.Title = $"Main Menu";
        }
コード例 #6
0
ファイル: Game.cs プロジェクト: cmphayes/CMPH_OOP_RPG
 public void Stats()
 {
     Hero.ShowStats();
 }
コード例 #7
0
 public void Stats()
 {
     Hero.ShowStats();
     this.MainMenu();
 }