public void DrawConversation(Hero hero, NPC npc) { Drawer draw = new Drawer(); Console.BackgroundColor = ConsoleColor.Black; Console.Clear(); draw.DrawImage(hero.Image, ConsoleColor.Black, 5, 5); draw.DrawImage(npc.Image, ConsoleColor.Black, 5, 55); draw.PrintConversation(npc.ConversationPath); Console.ReadLine(); Console.Clear(); Console.ResetColor(); // the matrix must be rewriten now }
private static void DrawChoosen(int choice) { Drawer draw = new Drawer(); Images startImage = new Images(); string choicePointer = "==>"; Console.ResetColor(); Console.Clear(); draw.DrawImage(startImage.IntroText, ConsoleColor.Black, 5, 10); draw.DrawString("New Game", ConsoleColor.Black, 24, 40); draw.DrawString("Load Game", ConsoleColor.Black, 26, 40); draw.DrawString("Exit", ConsoleColor.Black, 28, 40); draw.DrawString(choicePointer, ConsoleColor.DarkMagenta, (22 + choice * 2), 35); Console.SetCursorPosition(0, 0); }
private void DrawChooseHeroFromConsole(int choice, Hero hero) { Drawer draw = new Drawer(); string choicePointer = "==>"; Console.ResetColor(); Console.Clear(); draw.DrawString("Choose your hero!", ConsoleColor.Black, 5, 5); draw.DrawString("Warrior", ConsoleColor.Black, 8, 8); draw.DrawString("Rogue", ConsoleColor.Black, 10, 8); draw.DrawString("Mage", ConsoleColor.Black, 12, 8); draw.DrawString(choicePointer, ConsoleColor.DarkMagenta, (6 + choice * 2), 4); draw.DrawImage(hero.Image,ConsoleColor.Black,15,4); draw.DrawString("Strength: " + hero.Statistics.Strength, ConsoleColor.Black, 33, 55); draw.DrawString("Dexterity: " + hero.Statistics.Dexterity, ConsoleColor.Black, 35, 55); draw.DrawString("Willpower: " + hero.Statistics.EillPower, ConsoleColor.Black, 37, 55); draw.DrawString("Weapon: " + hero.Weapon.name, ConsoleColor.Black, 20, 55); draw.DrawString("Weapon Damage: " + hero.Weapon.damage, ConsoleColor.Black, 21, 55); draw.DrawString("Magic: " + hero.Weapon.magic.Name, ConsoleColor.Black, 23, 55); draw.DrawString("Magic Damage: " + hero.Weapon.magic.damage, ConsoleColor.Black, 24, 55); draw.DrawString("Magic Damage on Self: " + hero.Weapon.magic.damageOnSelf, ConsoleColor.Black, 25, 55); draw.DrawString("Magic Chance to Stun: " + hero.Weapon.magic.chanceToStun, ConsoleColor.Black, 26, 55); Console.SetCursorPosition(0, 0); }
private void MenuShowHeroStats(Hero hero) { Drawer draw = new Drawer(); Console.ResetColor(); Console.Clear(); draw.DrawString("Name : " + hero.Name, ConsoleColor.Black, 4, 8); draw.DrawImage(hero.Image, ConsoleColor.Black, 5, 4); draw.DrawString("Strength: " + hero.Statistics.Strength, ConsoleColor.Black, 23, 45); draw.DrawString("Dexterity: " + hero.Statistics.Dexterity, ConsoleColor.Black, 25, 45); draw.DrawString("Willpower: " + hero.Statistics.EillPower, ConsoleColor.Black, 27, 45); draw.DrawString("Weapon: " + hero.Weapon.name, ConsoleColor.Black, 10, 45); draw.DrawString("Weapon Damage: " + hero.Weapon.damage, ConsoleColor.Black, 11, 45); draw.DrawString("Magic: " + hero.Weapon.magic.Name, ConsoleColor.Black, 13, 45); draw.DrawString("Magic Damage: " + hero.Weapon.magic.damage, ConsoleColor.Black, 14, 45); draw.DrawString("Magic Damage on Self: " + hero.Weapon.magic.damageOnSelf, ConsoleColor.Black, 15, 45); draw.DrawString("Magic Chance to Stun: " + hero.Weapon.magic.chanceToStun, ConsoleColor.Black, 16, 45); Console.SetCursorPosition(0, 0); Console.ReadKey(); }
void DrawBattle(Hero hero, Enemy enemy) { Drawer draw = new Drawer(); Console.BackgroundColor = ConsoleColor.Black; Console.Clear(); int heroLifeBarBlocks = (int)(20 * (double)currentHeroHP / totalHeroHP); int enemyLifeBarBlocks = (int)(20 * (double)currentEnemyHP / totalEnemyHP); if (heroLifeBarBlocks < 0) { heroLifeBarBlocks = 0; } if (enemyLifeBarBlocks < 0) { enemyLifeBarBlocks = 0; } draw.DrawString(hero.Name + " (" + hero.level + ")", ConsoleColor.DarkGray, 2, 5); draw.DrawString(new string(' ', heroLifeBarBlocks), ConsoleColor.DarkRed, 3, 15); draw.DrawString(currentHeroHP + " / " + totalHeroHP, ConsoleColor.DarkRed, 3, 36); draw.DrawImage(hero.Image, ConsoleColor.Black, 5, 5); for (int i = 0; i < 7; i++) { draw.DrawString(boxRow, ConsoleColor.DarkYellow, 40 + i, 10); if (i == 1) { draw.DrawString("Press [A] to Attack", ConsoleColor.DarkYellow, 40 + i, 13); } else if (i == 3) { draw.DrawString("Press [S] to use a Spell", ConsoleColor.DarkYellow, 40 + i, 13); } else if (i == 5) { draw.DrawString("Press [E] to Escape", ConsoleColor.DarkYellow, 40 + i, 13); } } draw.DrawString(enemy.Name, ConsoleColor.DarkGray, 2, 55); draw.DrawString(new string(' ', enemyLifeBarBlocks), ConsoleColor.DarkRed, 3, 65); draw.DrawString(currentEnemyHP + " / " + totalEnemyHP, ConsoleColor.DarkRed, 3, 86); draw.DrawImage(enemy.Image, ConsoleColor.Black, 5, 55); for (int i = 0; i < 7; i++) { draw.DrawString(boxRow, ConsoleColor.DarkYellow, 40 + i, 60); draw.DrawString(message[i], ConsoleColor.DarkYellow, 40 + i, 63); } Console.BackgroundColor = ConsoleColor.Black; Console.SetCursorPosition(0,0); }