Beispiel #1
0
        public static void Stats()
        {
            int          len   = 71;
            ConsoleColor color = ConsoleColor.Cyan;

            PrintUtils.GetHash(len, color);
            PrintUtils.CenterPadHash("STATS", len, color);
            PrintUtils.LeftPadHash($"You are {MainGame.player.name} the {MainGame.player.job.name}. ", len, color);
            PrintUtils.LeftPadHash($"You have {MainGame.player.hp} hp.", len, color);
            PrintUtils.LeftPadHash($"You have {MainGame.player.xp} xp and you are at level {Convert.ToInt32(MainGame.player.xp / 1000)}.", len, color);
            PrintUtils.LeftPadHash($"You have {MainGame.player.ap} strength.", len, color);
            PrintUtils.LeftPadHash($"You have ₴ {MainGame.player.money}", len, color);
            PrintUtils.LeftPadHash($"Your current weapon, the {MainGame.player.weapon.name} does {MainGame.player.weapon.ap} of damage.", len, color);
            String inventory = "Your Inventory contains: ";

            if (MainGame.player.inventory != null)
            {
                foreach (var item in MainGame.player.inventory)
                {
                    inventory += item.name;
                }
            }
            PrintUtils.LeftPadHash(inventory, len, color);
            String armour = "You are wearing these pieces of armour: ";

            if (MainGame.player.armour != null)
            {
                foreach (var item in MainGame.player.armour)
                {
                    armour += item.name;
                }
            }
            PrintUtils.LeftPadHash(armour, len, color);
            PrintUtils.GetHash(len, color);
        }
Beispiel #2
0
 /// <summary>
 /// Combination of GetHash and LeftPadHash to create a box
 /// </summary>
 /// <param name="text">String to left-align</param>
 /// <param name="length">Final width of box</param>
 /// <param name="color">Foreground color to print</param>
 public static void LeftBoxHash(string text, int length, ConsoleColor color = ConsoleColor.Gray)
 {
     if (color != ConsoleColor.Gray && Console.ForegroundColor == ConsoleColor.Gray)
     {
         Console.ForegroundColor = color;
     }
     PrintUtils.GetHash(length, color);
     PrintUtils.LeftPadHash(text, length, color);
     PrintUtils.GetHash(length, color);
     Console.ResetColor();
 }
Beispiel #3
0
 private static void AcknowledgementsScreen()
 {
     PrintUtils.GetHash(31);
     PrintUtils.CenterPadHash("Acknowledgements", 31);
     PrintUtils.CenterPadHash("Beta Tested by:", 31);
     PrintUtils.LeftPadHash("• appcreatorguy ", 31);
     PrintUtils.LeftPadHash("• tejmen09 ", 31);
     PrintUtils.LeftPadHash("Helped By:", 31);
     PrintUtils.LeftPadHash("• appcreatorguy", 31);
     PrintUtils.LeftPadHash("• tejmen09", 31);
     PrintUtils.CenterPadHash(" Copyright 2019 Tejas Mengle ", 31);
     PrintUtils.GetHash(31);
     TitleScreen();
 }
Beispiel #4
0
        public static void Stats()
        {
            int len = 66;

            PrintUtils.GetHash(len);
            PrintUtils.CenterPadHash("STATS", len);
            PrintUtils.LeftPadHash($"You are {MainGame.player.name} the {MainGame.player.job.name}. ", len);
            PrintUtils.LeftPadHash($"You have {MainGame.player.hp} hp.", len);
            PrintUtils.LeftPadHash($"You have {MainGame.player.xp} xp and you are at level {Convert.ToInt32(MainGame.player.xp/1000)}.", len);
            PrintUtils.LeftPadHash($"You have {MainGame.player.ap} strength.", len);
            PrintUtils.LeftPadHash($"You have ₴ {MainGame.player.money}", len);
            // @todo add rest of stats screen
            //  PrintUtils.LeftPadHash($"Your current weapon, the {} does {} of damage.", len);
            //  PrintUtils.LeftPadHash($"Your Inventory contains: , end=", len);
            //  PrintUtils.LeftPadHash($"You are wearing these pieces of armour: ', end=''", len);
            PrintUtils.GetHash(len);
        }
Beispiel #5
0
        public static void HelpScreen(string command)
        {
            switch (command)
            {
            case "move":
                int len = 52;
                PrintUtils.GetHash(len, ConsoleColor.Magenta);
                PrintUtils.CenterPadHash("Movement Help", len, ConsoleColor.Magenta);
                PrintUtils.LeftPadHash("• Type 'move' and what direction you want to go", len, ConsoleColor.Magenta);
                PrintUtils.GetHash(len, ConsoleColor.Magenta);
                break;

            case "":
            default:
                Console.WriteLine($"'{command}' is not a valid command.");
                break;
            }
        }
Beispiel #6
0
        public static void HelpScreen(bool inGame)
        {
            if (!inGame)
            {
                Console.Clear();
            }
            int width = 31;

            PrintUtils.GetHash(width, ConsoleColor.DarkBlue);
            PrintUtils.CenterPadHash("Help", width, ConsoleColor.DarkBlue);
            PrintUtils.LeftPadHash("• Type 'move' command to", width, ConsoleColor.DarkBlue);
            PrintUtils.LeftPadHash(" move", width, ConsoleColor.DarkBlue);
            PrintUtils.LeftPadHash("• Type your commands to do", width, ConsoleColor.DarkBlue);
            PrintUtils.LeftPadHash(" them", width, ConsoleColor.DarkBlue);
            PrintUtils.LeftPadHash("• Type 'look' to inspect", width, ConsoleColor.DarkBlue);
            PrintUtils.LeftPadHash(" something", width, ConsoleColor.DarkBlue);
            PrintUtils.LeftPadHash("• Type 'act' to do what you", width, ConsoleColor.DarkBlue);
            PrintUtils.LeftPadHash(" can on your place", width, ConsoleColor.DarkBlue);
            PrintUtils.LeftPadHash("• If you find a Dungeon,", width, ConsoleColor.DarkBlue);
            PrintUtils.LeftPadHash(" please help to excavate it", width, ConsoleColor.DarkBlue);
            PrintUtils.LeftPadHash("• Find more weapons hidden", width, ConsoleColor.DarkBlue);
            PrintUtils.LeftPadHash(" in chests to kill monsters", width, ConsoleColor.DarkBlue);
            PrintUtils.LeftPadHash("• Go to the store to buy", width, ConsoleColor.DarkBlue);
            PrintUtils.LeftPadHash(" armour", width, ConsoleColor.DarkBlue);
            PrintUtils.LeftPadHash("• Equip your armour for", width, ConsoleColor.DarkBlue);
            PrintUtils.LeftPadHash(" extra protection.", width, ConsoleColor.DarkBlue);
            PrintUtils.CenterPadHash("Copyright 2019 tejmen09", width, ConsoleColor.DarkBlue);
            PrintUtils.GetHash(width, ConsoleColor.DarkBlue);
            switch (inGame)
            {
            case true:
                MainGame.MainGameLoop();
                break;

            default:
                TitleScreen();
                break;
            }
        }