예제 #1
0
        public void ShowEnemies()
        {
            var i = 1;

            foreach (var enemy in Enemies)
            {
                mMessageService.ShowMessage(new Message(i + ")" + enemy.Name, ConsoleColor.Yellow));
                mMessageService.ShowMessage(new Message(enemy.AsciiArt, ConsoleColor.Cyan));
                ConsoleMessageService.ShowConsoleBoxedInfo(enemy.Stats.ToDictionary(x => x.Key, x => x.Value.ToString()));
                i++;
            }
        }
예제 #2
0
 public void ShowPlayerDeathScreen(Player player, Enemy killerEnemy)
 {
     mMessageService.ClearTextField();
     mMessageService.ShowMessage(new Message("В следующий раз вам повезет больше!", ConsoleColor.Cyan));
     Thread.Sleep(2000);
     mMessageService.ShowMessage(new Message($"Вы дошли до {player.CurrentLevel.Number} уровня!", ConsoleColor.Cyan));
     Thread.Sleep(2000);
     mMessageService.ShowMessage(new Message($"Вы набрали {player.Points} очков!", ConsoleColor.Yellow));
     Thread.Sleep(2000);
     mMessageService.ShowMessage(new Message($"Вы погибли от:", ConsoleColor.Cyan));
     mMessageService.ShowMessage(new Message(killerEnemy.Name, ConsoleColor.Red));
     ConsoleMessageService.ShowConsoleBoxedInfo(killerEnemy.BaseStats.ToDictionary(x => x.Key, x => x.Value.ToString()));
     Thread.Sleep(1000);
     Interface.ShowConsolePlayerUi(player,
                                   new InterfaceBuilder().AddPart(InterfacePartType.Name)
                                   .AddPart(InterfacePartType.Gold)
                                   .AddPart(InterfacePartType.Inventory)
                                   .AddPart(InterfacePartType.Talents)
                                   .BuildInterface());
 }
예제 #3
0
 public static void ShowConsoleItemInfo(Item item, bool abilityOnly = false)
 {
     if (!abilityOnly)
     {
         Program.MessageService.ShowMessage(new Message($"Тип:{Game.EnumToString(item.Type)}", ConsoleColor.DarkCyan));
         var isWeapon = item.Type < (ItemType)2;
         if (isWeapon)
         {
             ShowWeaponType((Weapon)item);
         }
         Program.MessageService.ShowMessage(new Message($"Характеристики:", ConsoleColor.Cyan));
         ConsoleMessageService.ShowConsoleBoxedInfo(item.Stats.ToDictionary(x => x.Key, x => x.Value.ToString()));
     }
     if (item.ItemAbility != null)
     {
         Program.MessageService.ShowMessage(new Message($"Способность({(item.ItemAbility.IsActiveType ? "Активная" : "Пассивная")}):", ConsoleColor.DarkCyan));
         if (item.ItemAbility.IsActiveType)
         {
             var activeAbility = item.ItemAbility as ActiveAbility;
             Program.MessageService.ShowMessage(new Message("Ходы:", ConsoleColor.DarkCyan));
             ConsoleMessageService.ShowConsoleBoxedInfo(new Dictionary <string, string>()
             {
                 { "Дейсвует", $"{activeAbility.TurnDuration.ToString()}({activeAbility.CurrentDuration})" },
                 { "Перезарядка", $"{activeAbility.Cooldown.ToString()}({activeAbility.CurrentCooldown})" }
             });
         }
         ConsoleMessageService.ShowConsoleBoxedInfo(new Dictionary <string, string>()
         {
             { item.ItemAbility.Name, item.ItemAbility.Description }
         });
         ConsoleMessageService.ShowConsoleBoxedInfo(item.ItemAbility.ValueIncreases.ToDictionary(x => x.Key, x => x.Value.ToString()));
         if (item.ItemAbility.PercentIncreases.Count > 0)
         {
             Program.MessageService.ShowMessage(new Message("Усиления в процентах:", ConsoleColor.DarkCyan));
             ConsoleMessageService.ShowConsoleBoxedInfo(item.ItemAbility.PercentIncreases.ToDictionary(x => x.Key, x => (x.Value * 100).ToString()));
         }
     }
 }
예제 #4
0
 public static void ShowStats(Dictionary <string, int> stats)
 {
     Program.MessageService.ShowMessage(new Message($"Характеристики:", ConsoleColor.Blue));
     ConsoleMessageService.ShowConsoleBoxedInfo(stats.ToDictionary(x => x.Key, x => x.Value.ToString()));
 }
예제 #5
0
 private static void ShowTalents(IEnumerable <Ability> abilities)
 {
     Program.MessageService.ShowMessage(new Message($"Таланты:", ConsoleColor.Blue));
     ConsoleMessageService.ShowConsoleBoxedInfo(abilities.ToDictionary(x => x.Name, x => x.Description));
 }