zelpold 4 лет назад
Родитель
Сommit
8ca16b628e

+ 28 - 1
MafiaTelegramBot/Game/GameRooms/GameRoom.GameProcess.cs

@@ -183,8 +183,33 @@ namespace MafiaTelegramBot.Game.GameRooms
 
         private async Task DefencePhase()
         {
-            await Task.Run( () =>
+            await Task.Run( async () =>
             {
+                try
+                {
+                    var voteUpPlayers = VoteUpList.Where(p => p.VotedCount == LargeVote);
+                    //проверяем есть ли кому защищаться
+                    if (voteUpPlayers.Count() > 1)
+                    {
+                        foreach (var defender in VoteUpList)
+                        {
+                            await defender.CurrentRole.DefenceAction();
+                        
+                        }
+                        var alivePlayers = Players.Values.Where(p => p.IsAlive).ToList();
+                        foreach (var player in alivePlayers)
+                        {
+                            if (!player.IsPlaying || !player.IsAlive) continue;
+                            await player.CurrentRole.VotingUpDefenders();
+                        }
+                    }
+                }
+                catch (Exception e)
+                {
+                    Console.WriteLine(e);
+                    throw;
+                }
+                
                 
             });
         }
@@ -204,6 +229,8 @@ namespace MafiaTelegramBot.Game.GameRooms
             if (playerId != targetId)
             {
                 var target = Players[targetId];
+                target.VotedCount++;
+                if (target.VotedCount > LargeVote) LargeVote = target.VotedCount; 
                 await PlayersCh.SendExcept(player.ChatId, $"{player.NickName} {strings.vote_to} {target.NickName}");
                 return await Bot.SendWithMarkdown2(player.ChatId, $"{strings.you_vote_player} {target.NickName}");
             }

+ 39 - 0
MafiaTelegramBot/Game/GameRooms/GameRoom.Role.cs

@@ -20,6 +20,7 @@ namespace MafiaTelegramBot.Game.GameRooms
             public readonly List<Player> KnownRoles = new();
             protected long NightTargetId = -1;
             public readonly ManualResetEvent DayActionComplete = new(false);
+            public readonly ManualResetEvent DefenceActionComplete = new(false);
             public ManualResetEvent VoteEvent = new(false);
             protected int MessageId = -1;
             public abstract Roles RoleKey { get; }
@@ -55,6 +56,7 @@ namespace MafiaTelegramBot.Game.GameRooms
                 Player.IsSpeaker = false;
                 if (!Room.IsFirstCycle) await VotingAction();
             }
+            
 
             private async Task VotingAction()
             {
@@ -79,6 +81,43 @@ namespace MafiaTelegramBot.Game.GameRooms
                 if(message!=null) await Bot.Get().DeleteMessageAsync(Player.ChatId, message.MessageId);
             }
 
+            public async Task VotingUpDefenders()
+            {
+                var voteTimer = new Timer(10 * 1000);
+                var defenders = Room.VoteUpList.Where(p => p.IsAlive).ToList();
+                var message = await Bot.SendWithMarkdown2(Player.ChatId, strings.put_up_vote, Keyboard.VoteKeyboard(defenders, Player.Id, !Player.IsFirst));
+                voteTimer.Elapsed += async (_, _) =>
+                {
+                    await Bot.Get().EditMessageReplyMarkupAsync(Player.ChatId, message.MessageId);
+                    if (Player.IsFirst)
+                        await Room.PutUpVote(Player.Id, Player.Id);
+                    else
+                        await Room.PlayersCh.SendExcept(Player.Id, $"{Player.NickName} {strings.didnt_put_anyone}");
+                    VoteEvent.Set();
+                };
+                await Bot.SendWithMarkdown2(Player.Id, strings.you_have_ten_seconds);
+                if(Player.IsFirst) await Bot.SendWithMarkdown2(Player.Id, strings.user_not_choose);
+                voteTimer.Start();
+                VoteEvent.WaitOne();
+                VoteEvent.Reset();
+                voteTimer.Stop();
+                if(message!=null) await Bot.Get().DeleteMessageAsync(Player.ChatId, message.MessageId);
+            }
+            public async Task DefenceAction()
+            {
+                await Room.PlayersCh.SendExcept(Player.Id, $"{strings.now_defence} {Player.NickName}");
+                await Bot.SendWithMarkdown2(Player.ChatId, $"{strings.your_turn}\n{strings.you_turn_say}", Keyboard.InGamePlayerMenuWithEndTurn);
+                Player.IsSpeaker = true;
+                var timer = new Timer(60 * 1000);
+                timer.Elapsed += (_, _) => DefenceActionComplete.Set();
+                timer.AutoReset = false;
+                timer.Start();
+                DayActionComplete.WaitOne();
+                DayActionComplete.Reset();
+                timer.Stop();
+                await Bot.SendWithMarkdown2(Player.ChatId, strings.your_turn_ended, Keyboard.InGamePlayerMenu);
+                Player.IsSpeaker = false;
+            }
             public static Role GetNewRoleInstance(Roles roleKey, GameRoom room, Player player)
             {
                 return roleKey switch

+ 3 - 0
MafiaTelegramBot/Game/GameRooms/GameRoom.Structure.cs

@@ -18,6 +18,8 @@ namespace MafiaTelegramBot.Game.GameRooms
         public string RoomName { get; init; } = "NoNameRoom";
         public Player Owner { get; init; } = new();
 
+        public int LargeVote = 0; //большее из количеств голосов за игроков 
+
         protected readonly List<Player> VoteUpList = new();
 
         public readonly MessageHandler MHandler;
@@ -32,6 +34,7 @@ namespace MafiaTelegramBot.Game.GameRooms
         public readonly Dictionary<Roles, int> Settings = new();
 
         public abstract Dictionary<Roles, List<Player>> PlayersRole { get; set; }
+        
 
         public GameRoom()
         {

+ 1 - 0
MafiaTelegramBot/Game/Player.cs

@@ -26,6 +26,7 @@ namespace MafiaTelegramBot.Game
         public bool CanBeHealed = true;
         public bool CanBeBlockedNight = true;
         public bool CanBeBlockedDay = true;
+        public int VotedCount = 0; //количество голосов за игрока
 
         public readonly StatisticsList Statistics = new();
 

+ 563 - 218
MafiaTelegramBot/Resources/strings.Designer.cs

@@ -1,6 +1,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.
@@ -11,32 +12,46 @@ namespace MafiaTelegramBot {
     using System;
     
     
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
-    [System.Diagnostics.DebuggerNonUserCodeAttribute()]
-    [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    /// <summary>
+    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
     internal class strings {
         
-        private static System.Resources.ResourceManager resourceMan;
+        private static global::System.Resources.ResourceManager resourceMan;
         
-        private static System.Globalization.CultureInfo resourceCulture;
+        private static global::System.Globalization.CultureInfo resourceCulture;
         
-        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
         internal strings() {
         }
         
-        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static System.Resources.ResourceManager ResourceManager {
+        /// <summary>
+        ///   Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
             get {
-                if (object.Equals(null, resourceMan)) {
-                    System.Resources.ResourceManager temp = new System.Resources.ResourceManager("MafiaTelegramBot.Resources.strings", typeof(strings).Assembly);
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MafiaTelegramBot.Resources.strings", typeof(strings).Assembly);
                     resourceMan = temp;
                 }
                 return resourceMan;
             }
         }
         
-        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static System.Globalization.CultureInfo Culture {
+        /// <summary>
+        ///   Overrides the current thread's CurrentUICulture property for all
+        ///   resource lookups using this strongly typed resource class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
             get {
                 return resourceCulture;
             }
@@ -45,645 +60,975 @@ namespace MafiaTelegramBot {
             }
         }
         
-        internal static string start_message {
+        /// <summary>
+        ///   Looks up a localized string similar to Приватная.
+        /// </summary>
+        internal static string _private {
             get {
-                return ResourceManager.GetString("start_message", resourceCulture);
+                return ResourceManager.GetString("private", resourceCulture);
             }
         }
         
-        internal static string statistics_for {
+        /// <summary>
+        ///   Looks up a localized string similar to Публичная.
+        /// </summary>
+        internal static string _public {
             get {
-                return ResourceManager.GetString("statistics_for", resourceCulture);
+                return ResourceManager.GetString("public", resourceCulture);
             }
         }
         
-        internal static string games_count {
+        /// <summary>
+        ///   Looks up a localized string similar to живой.
+        /// </summary>
+        internal static string alive {
             get {
-                return ResourceManager.GetString("games_count", resourceCulture);
+                return ResourceManager.GetString("alive", resourceCulture);
             }
         }
         
-        internal static string wins_count {
+        /// <summary>
+        ///   Looks up a localized string similar to Этой ночью был убит.
+        /// </summary>
+        internal static string at_this_night {
             get {
-                return ResourceManager.GetString("wins_count", resourceCulture);
+                return ResourceManager.GetString("at_this_night", resourceCulture);
             }
         }
         
-        internal static string winrate {
+        /// <summary>
+        ///   Looks up a localized string similar to Игра начинается....
+        /// </summary>
+        internal static string bot_starting_game {
             get {
-                return ResourceManager.GetString("winrate", resourceCulture);
+                return ResourceManager.GetString("bot_starting_game", resourceCulture);
             }
         }
         
-        internal static string shop {
+        /// <summary>
+        ///   Looks up a localized string similar to Сменить имя.
+        /// </summary>
+        internal static string change_name {
             get {
-                return ResourceManager.GetString("shop", resourceCulture);
+                return ResourceManager.GetString("change_name", resourceCulture);
             }
         }
         
-        internal static string my_roles {
+        /// <summary>
+        ///   Looks up a localized string similar to Выберите режим игры.
+        /// </summary>
+        internal static string choose_game_type {
             get {
-                return ResourceManager.GetString("my_roles", resourceCulture);
+                return ResourceManager.GetString("choose_game_type", resourceCulture);
             }
         }
         
-        internal static string settings {
+        /// <summary>
+        ///   Looks up a localized string similar to Выберите игрока для проверки роли.
+        /// </summary>
+        internal static string choose_player_to_check_role {
             get {
-                return ResourceManager.GetString("settings", resourceCulture);
+                return ResourceManager.GetString("choose_player_to_check_role", resourceCulture);
             }
         }
         
-        internal static string your_name {
+        /// <summary>
+        ///   Looks up a localized string similar to Выберите игрока для лечения.
+        /// </summary>
+        internal static string choose_player_to_heal {
             get {
-                return ResourceManager.GetString("your_name", resourceCulture);
+                return ResourceManager.GetString("choose_player_to_heal", resourceCulture);
             }
         }
         
-        internal static string change_name {
+        /// <summary>
+        ///   Looks up a localized string similar to Выберите свою жертву.
+        /// </summary>
+        internal static string choose_player_to_kill {
             get {
-                return ResourceManager.GetString("change_name", resourceCulture);
+                return ResourceManager.GetString("choose_player_to_kill", resourceCulture);
             }
         }
         
-        internal static string enter_your_name {
+        /// <summary>
+        ///   Looks up a localized string similar to Выберите тип комнаты.
+        /// </summary>
+        internal static string choose_type_room {
             get {
-                return ResourceManager.GetString("enter_your_name", resourceCulture);
+                return ResourceManager.GetString("choose_type_room", resourceCulture);
             }
         }
         
-        internal static string name_updated {
+        /// <summary>
+        ///   Looks up a localized string similar to Город засыпает.
+        /// </summary>
+        internal static string city_falls_asleep {
             get {
-                return ResourceManager.GetString("name_updated", resourceCulture);
+                return ResourceManager.GetString("city_falls_asleep", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Город просыпается и обнаруживает, что... .
+        /// </summary>
+        internal static string city_wakes_up {
+            get {
+                return ResourceManager.GetString("city_wakes_up", resourceCulture);
             }
         }
         
+        /// <summary>
+        ///   Looks up a localized string similar to Команда не найдена.
+        /// </summary>
         internal static string command_not_found {
             get {
                 return ResourceManager.GetString("command_not_found", resourceCulture);
             }
         }
         
-        internal static string settings_room {
+        /// <summary>
+        ///   Looks up a localized string similar to подключился к игре.
+        /// </summary>
+        internal static string connected_to_game {
             get {
-                return ResourceManager.GetString("settings_room", resourceCulture);
+                return ResourceManager.GetString("connected_to_game", resourceCulture);
             }
         }
         
-        internal static string choose_game_type {
+        /// <summary>
+        ///   Looks up a localized string similar to Дама заблокировала вас. Вы не сможете разговаривать и голосовать в этот день..
+        /// </summary>
+        internal static string dame_block_you {
             get {
-                return ResourceManager.GetString("choose_game_type", resourceCulture);
+                return ResourceManager.GetString("dame_block_you", resourceCulture);
             }
         }
         
-        internal static string enter_room_name {
+        /// <summary>
+        ///   Looks up a localized string similar to никого не выставил на голосование.
+        /// </summary>
+        internal static string didnt_put_anyone {
             get {
-                return ResourceManager.GetString("enter_room_name", resourceCulture);
+                return ResourceManager.GetString("didnt_put_anyone", resourceCulture);
             }
         }
         
-        internal static string room_with_name {
+        /// <summary>
+        ///   Looks up a localized string similar to мертвый.
+        /// </summary>
+        internal static string died {
             get {
-                return ResourceManager.GetString("room_with_name", resourceCulture);
+                return ResourceManager.GetString("died", resourceCulture);
             }
         }
         
-        internal static string was_created {
+        /// <summary>
+        ///   Looks up a localized string similar to Отключить.
+        /// </summary>
+        internal static string disable {
             get {
-                return ResourceManager.GetString("was_created", resourceCulture);
+                return ResourceManager.GetString("disable", resourceCulture);
             }
         }
         
-        internal static string unexpected_error {
+        /// <summary>
+        ///   Looks up a localized string similar to отключен.
+        /// </summary>
+        internal static string disabled {
             get {
-                return ResourceManager.GetString("unexpected_error", resourceCulture);
+                return ResourceManager.GetString("disabled", resourceCulture);
             }
         }
         
-        internal static string game_already_exists {
+        /// <summary>
+        ///   Looks up a localized string similar to Доктор вылечил вас.
+        /// </summary>
+        internal static string doctor_heals_you {
             get {
-                return ResourceManager.GetString("game_already_exists", resourceCulture);
+                return ResourceManager.GetString("doctor_heals_you", resourceCulture);
             }
         }
         
-        internal static string leave_from_game {
+        /// <summary>
+        ///   Looks up a localized string similar to Доктор спас вас от смерти.
+        /// </summary>
+        internal static string doctor_save_you {
             get {
-                return ResourceManager.GetString("leave_from_game", resourceCulture);
+                return ResourceManager.GetString("doctor_save_you", resourceCulture);
             }
         }
         
-        internal static string user_not_in_game {
+        /// <summary>
+        ///   Looks up a localized string similar to Включить.
+        /// </summary>
+        internal static string enable {
             get {
-                return ResourceManager.GetString("user_not_in_game", resourceCulture);
+                return ResourceManager.GetString("enable", resourceCulture);
             }
         }
         
-        internal static string standart {
+        /// <summary>
+        ///   Looks up a localized string similar to включен.
+        /// </summary>
+        internal static string enabled {
             get {
-                return ResourceManager.GetString("standart", resourceCulture);
+                return ResourceManager.GetString("enabled", resourceCulture);
             }
         }
         
-        internal static string extended {
+        /// <summary>
+        ///   Looks up a localized string similar to Введите код от комнаты.
+        /// </summary>
+        internal static string enter_private_code {
             get {
-                return ResourceManager.GetString("extended", resourceCulture);
+                return ResourceManager.GetString("enter_private_code", resourceCulture);
             }
         }
         
-        internal static string secret_key_is {
+        /// <summary>
+        ///   Looks up a localized string similar to Введите название комнаты.
+        /// </summary>
+        internal static string enter_room_name {
             get {
-                return ResourceManager.GetString("secret_key_is", resourceCulture);
+                return ResourceManager.GetString("enter_room_name", resourceCulture);
             }
         }
         
-        internal static string choose_type_room {
+        /// <summary>
+        ///   Looks up a localized string similar to Введите ваше имя.
+        /// </summary>
+        internal static string enter_your_name {
             get {
-                return ResourceManager.GetString("choose_type_room", resourceCulture);
+                return ResourceManager.GetString("enter_your_name", resourceCulture);
             }
         }
         
-        internal static string enter_private_code {
+        /// <summary>
+        ///   Looks up a localized string similar to все игроки остались в живых!.
+        /// </summary>
+        internal static string everyone_survived {
             get {
-                return ResourceManager.GetString("enter_private_code", resourceCulture);
+                return ResourceManager.GetString("everyone_survived", resourceCulture);
             }
         }
         
-        internal static string room_is_filled {
+        /// <summary>
+        ///   Looks up a localized string similar to Расширенный.
+        /// </summary>
+        internal static string extended {
             get {
-                return ResourceManager.GetString("room_is_filled", resourceCulture);
+                return ResourceManager.GetString("extended", resourceCulture);
             }
         }
         
-        internal static string user_already_in_game {
+        /// <summary>
+        ///   Looks up a localized string similar to Пока мирные жители спали, в городе завелась мафия. Город собрался на главной площади и жители решают, кто среди них предатель..
+        /// </summary>
+        internal static string first_day_message {
             get {
-                return ResourceManager.GetString("user_already_in_game", resourceCulture);
+                return ResourceManager.GetString("first_day_message", resourceCulture);
             }
         }
         
-        internal static string successful_entry_into_room {
+        /// <summary>
+        ///   Looks up a localized string similar to Комната с таким именем уже существует.
+        /// </summary>
+        internal static string game_already_exists {
             get {
-                return ResourceManager.GetString("successful_entry_into_room", resourceCulture);
+                return ResourceManager.GetString("game_already_exists", resourceCulture);
             }
         }
         
-        internal static string users_list {
+        /// <summary>
+        ///   Looks up a localized string similar to Игра уже запущена.
+        /// </summary>
+        internal static string game_already_running {
             get {
-                return ResourceManager.GetString("users_list", resourceCulture);
+                return ResourceManager.GetString("game_already_running", resourceCulture);
             }
         }
         
-        internal static string users_list_empty {
+        /// <summary>
+        ///   Looks up a localized string similar to Процесс подготовки комнаты начался.
+        /// </summary>
+        internal static string game_process_started {
             get {
-                return ResourceManager.GetString("users_list_empty", resourceCulture);
+                return ResourceManager.GetString("game_process_started", resourceCulture);
             }
         }
         
-        internal static string max_capacity_message {
+        /// <summary>
+        ///   Looks up a localized string similar to Число игр:.
+        /// </summary>
+        internal static string games_count {
             get {
-                return ResourceManager.GetString("max_capacity_message", resourceCulture);
+                return ResourceManager.GetString("games_count", resourceCulture);
             }
         }
         
-        internal static string prefer_leave_from_room {
+        /// <summary>
+        ///   Looks up a localized string similar to Проститутка переспала с вами. Ваши действия этой ночью ограничены..
+        /// </summary>
+        internal static string hooker_block_you {
             get {
-                return ResourceManager.GetString("prefer_leave_from_room", resourceCulture);
+                return ResourceManager.GetString("hooker_block_you", resourceCulture);
             }
         }
         
-        internal static string room_does_not_exists {
+        /// <summary>
+        ///   Looks up a localized string similar to В этой игре участвовали:.
+        /// </summary>
+        internal static string in_this_game_roles {
             get {
-                return ResourceManager.GetString("room_does_not_exists", resourceCulture);
+                return ResourceManager.GetString("in_this_game_roles", resourceCulture);
             }
         }
         
-        internal static string public_rooms_are_not_exist {
+        /// <summary>
+        ///   Looks up a localized string similar to Исключить.
+        /// </summary>
+        internal static string kick {
             get {
-                return ResourceManager.GetString("public_rooms_are_not_exist", resourceCulture);
+                return ResourceManager.GetString("kick", resourceCulture);
             }
         }
         
-        internal static string rooms {
+        /// <summary>
+        ///   Looks up a localized string similar to Исключить пользователя.
+        /// </summary>
+        internal static string kick_user {
             get {
-                return ResourceManager.GetString("rooms", resourceCulture);
+                return ResourceManager.GetString("kick_user", resourceCulture);
             }
         }
         
-        internal static string too_many_players {
+        /// <summary>
+        ///   Looks up a localized string similar to покинул игру.
+        /// </summary>
+        internal static string leave_from_game {
             get {
-                return ResourceManager.GetString("too_many_players", resourceCulture);
+                return ResourceManager.GetString("leave_from_game", resourceCulture);
             }
         }
         
-        internal static string too_few_players {
+        /// <summary>
+        ///   Looks up a localized string similar to Ссылка для подключения к комнате.
+        /// </summary>
+        internal static string link {
             get {
-                return ResourceManager.GetString("too_few_players", resourceCulture);
+                return ResourceManager.GetString("link", resourceCulture);
             }
         }
         
-        internal static string game_already_running {
+        /// <summary>
+        ///   Looks up a localized string similar to В первую ночь мафия получает список соучастников..
+        /// </summary>
+        internal static string mafia_get_mail {
             get {
-                return ResourceManager.GetString("game_already_running", resourceCulture);
+                return ResourceManager.GetString("mafia_get_mail", resourceCulture);
             }
         }
         
-        internal static string minimum_players_count {
+        /// <summary>
+        ///   Looks up a localized string similar to Ура! Победила мафия....
+        /// </summary>
+        internal static string mafia_won {
             get {
-                return ResourceManager.GetString("minimum_players_count", resourceCulture);
+                return ResourceManager.GetString("mafia_won", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Максимальное кол-во игроков.
+        /// </summary>
+        internal static string max_capacity_message {
+            get {
+                return ResourceManager.GetString("max_capacity_message", resourceCulture);
             }
         }
         
+        /// <summary>
+        ///   Looks up a localized string similar to Максимум - 16 игроков.
+        /// </summary>
         internal static string maximum_players_count {
             get {
                 return ResourceManager.GetString("maximum_players_count", resourceCulture);
             }
         }
         
+        /// <summary>
+        ///   Looks up a localized string similar to Максимум был установлен на.
+        /// </summary>
         internal static string maximum_was_set_to {
             get {
                 return ResourceManager.GetString("maximum_was_set_to", resourceCulture);
             }
         }
         
-        internal static string players {
+        /// <summary>
+        ///   Looks up a localized string similar to Минимум - 6 игроков.
+        /// </summary>
+        internal static string minimum_players_count {
             get {
-                return ResourceManager.GetString("players", resourceCulture);
+                return ResourceManager.GetString("minimum_players_count", resourceCulture);
             }
         }
         
-        internal static string kick {
+        /// <summary>
+        ///   Looks up a localized string similar to Мои роли.
+        /// </summary>
+        internal static string my_roles {
             get {
-                return ResourceManager.GetString("kick", resourceCulture);
+                return ResourceManager.GetString("my_roles", resourceCulture);
             }
         }
         
-        internal static string kick_user {
+        /// <summary>
+        ///   Looks up a localized string similar to Имя было обновлено на.
+        /// </summary>
+        internal static string name_updated {
             get {
-                return ResourceManager.GetString("kick_user", resourceCulture);
+                return ResourceManager.GetString("name_updated", resourceCulture);
             }
         }
         
-        internal static string you_were_kicked {
+        /// <summary>
+        ///   Looks up a localized string similar to Данная команда не поддерживается во время игры.
+        /// </summary>
+        internal static string not_supported_in_game {
             get {
-                return ResourceManager.GetString("you_were_kicked", resourceCulture);
+                return ResourceManager.GetString("not_supported_in_game", resourceCulture);
             }
         }
         
-        internal static string room_dissolved {
+        /// <summary>
+        ///   Looks up a localized string similar to Вам некого лечить этой ночью.
+        /// </summary>
+        internal static string nothing_to_heal {
             get {
-                return ResourceManager.GetString("room_dissolved", resourceCulture);
+                return ResourceManager.GetString("nothing_to_heal", resourceCulture);
             }
         }
         
-        internal static string timer {
+        /// <summary>
+        ///   Looks up a localized string similar to Сейчас оправдывается.
+        /// </summary>
+        internal static string now_defence {
             get {
-                return ResourceManager.GetString("timer", resourceCulture);
+                return ResourceManager.GetString("now_defence", resourceCulture);
             }
         }
         
-        internal static string enabled {
+        /// <summary>
+        ///   Looks up a localized string similar to Сейчас не ваш ход.
+        /// </summary>
+        internal static string now_is_not_your_turn {
             get {
-                return ResourceManager.GetString("enabled", resourceCulture);
+                return ResourceManager.GetString("now_is_not_your_turn", resourceCulture);
             }
         }
         
-        internal static string disabled {
+        /// <summary>
+        ///   Looks up a localized string similar to Сейчас ходит.
+        /// </summary>
+        internal static string now_turn {
             get {
-                return ResourceManager.GetString("disabled", resourceCulture);
+                return ResourceManager.GetString("now_turn", resourceCulture);
             }
         }
         
-        internal static string enable {
+        /// <summary>
+        ///   Looks up a localized string similar to игроков.
+        /// </summary>
+        internal static string players {
             get {
-                return ResourceManager.GetString("enable", resourceCulture);
+                return ResourceManager.GetString("players", resourceCulture);
             }
         }
         
-        internal static string disable {
+        /// <summary>
+        ///   Looks up a localized string similar to Список игроков.
+        /// </summary>
+        internal static string players_list {
             get {
-                return ResourceManager.GetString("disable", resourceCulture);
+                return ResourceManager.GetString("players_list", resourceCulture);
             }
         }
         
-        internal static string _public {
+        /// <summary>
+        ///   Looks up a localized string similar to Сначала покиньте комнату.
+        /// </summary>
+        internal static string prefer_leave_from_room {
             get {
-                return ResourceManager.GetString("public", resourceCulture);
+                return ResourceManager.GetString("prefer_leave_from_room", resourceCulture);
             }
         }
         
-        internal static string _private {
+        /// <summary>
+        ///   Looks up a localized string similar to Нет свободных публичных комнат.
+        /// </summary>
+        internal static string public_rooms_are_not_exist {
             get {
-                return ResourceManager.GetString("private", resourceCulture);
+                return ResourceManager.GetString("public_rooms_are_not_exist", resourceCulture);
             }
         }
         
-        internal static string bot_starting_game {
+        /// <summary>
+        ///   Looks up a localized string similar to Кого вы хотите выставить на голосование?.
+        /// </summary>
+        internal static string put_up_vote {
             get {
-                return ResourceManager.GetString("bot_starting_game", resourceCulture);
+                return ResourceManager.GetString("put_up_vote", resourceCulture);
             }
         }
         
-        internal static string game_process_started {
+        /// <summary>
+        ///   Looks up a localized string similar to Роль игрока.
+        /// </summary>
+        internal static string role_of_your_target {
             get {
-                return ResourceManager.GetString("game_process_started", resourceCulture);
+                return ResourceManager.GetString("role_of_your_target", resourceCulture);
             }
         }
         
-        internal static string connected_to_game {
+        /// <summary>
+        ///   Looks up a localized string similar to Комната распущена.
+        /// </summary>
+        internal static string room_dissolved {
             get {
-                return ResourceManager.GetString("connected_to_game", resourceCulture);
+                return ResourceManager.GetString("room_dissolved", resourceCulture);
             }
         }
         
-        internal static string your_turn_order {
+        /// <summary>
+        ///   Looks up a localized string similar to Комната не существует.
+        /// </summary>
+        internal static string room_does_not_exists {
             get {
-                return ResourceManager.GetString("your_turn_order", resourceCulture);
+                return ResourceManager.GetString("room_does_not_exists", resourceCulture);
             }
         }
         
-        internal static string your_role {
+        /// <summary>
+        ///   Looks up a localized string similar to Комната заполнена.
+        /// </summary>
+        internal static string room_is_filled {
             get {
-                return ResourceManager.GetString("your_role", resourceCulture);
+                return ResourceManager.GetString("room_is_filled", resourceCulture);
             }
         }
         
-        internal static string thanks_for_game {
+        /// <summary>
+        ///   Looks up a localized string similar to владелец комнаты.
+        /// </summary>
+        internal static string room_owner {
             get {
-                return ResourceManager.GetString("thanks_for_game", resourceCulture);
+                return ResourceManager.GetString("room_owner", resourceCulture);
             }
         }
         
-        internal static string link {
+        /// <summary>
+        ///   Looks up a localized string similar to Комната с именем.
+        /// </summary>
+        internal static string room_with_name {
             get {
-                return ResourceManager.GetString("link", resourceCulture);
+                return ResourceManager.GetString("room_with_name", resourceCulture);
             }
         }
         
-        internal static string you_leave_from_game {
+        /// <summary>
+        ///   Looks up a localized string similar to Комнаты.
+        /// </summary>
+        internal static string rooms {
             get {
-                return ResourceManager.GetString("you_leave_from_game", resourceCulture);
+                return ResourceManager.GetString("rooms", resourceCulture);
             }
         }
         
-        internal static string your_teammates {
+        /// <summary>
+        ///   Looks up a localized string similar to Секретный код для подключения к комнате.
+        /// </summary>
+        internal static string secret_key_is {
             get {
-                return ResourceManager.GetString("your_teammates", resourceCulture);
+                return ResourceManager.GetString("secret_key_is", resourceCulture);
             }
         }
         
-        internal static string first_day_message {
+        /// <summary>
+        ///   Looks up a localized string similar to Настройки.
+        /// </summary>
+        internal static string settings {
             get {
-                return ResourceManager.GetString("first_day_message", resourceCulture);
+                return ResourceManager.GetString("settings", resourceCulture);
             }
         }
         
-        internal static string city_falls_asleep {
+        /// <summary>
+        ///   Looks up a localized string similar to Задайте настройки комнаты.
+        /// </summary>
+        internal static string settings_room {
             get {
-                return ResourceManager.GetString("city_falls_asleep", resourceCulture);
+                return ResourceManager.GetString("settings_room", resourceCulture);
             }
         }
         
-        internal static string now_turn {
+        /// <summary>
+        ///   Looks up a localized string similar to Магазин.
+        /// </summary>
+        internal static string shop {
             get {
-                return ResourceManager.GetString("now_turn", resourceCulture);
+                return ResourceManager.GetString("shop", resourceCulture);
             }
         }
         
-        internal static string your_turn_ended {
+        /// <summary>
+        ///   Looks up a localized string similar to Пропустить.
+        /// </summary>
+        internal static string skip {
             get {
-                return ResourceManager.GetString("your_turn_ended", resourceCulture);
+                return ResourceManager.GetString("skip", resourceCulture);
             }
         }
         
-        internal static string now_is_not_your_turn {
+        /// <summary>
+        ///   Looks up a localized string similar to Стандартный.
+        /// </summary>
+        internal static string standart {
             get {
-                return ResourceManager.GetString("now_is_not_your_turn", resourceCulture);
+                return ResourceManager.GetString("standart", resourceCulture);
             }
         }
         
-        internal static string your_turn {
+        /// <summary>
+        ///   Looks up a localized string similar to Что вы хотите сделать?.
+        /// </summary>
+        internal static string start_message {
             get {
-                return ResourceManager.GetString("your_turn", resourceCulture);
+                return ResourceManager.GetString("start_message", resourceCulture);
             }
         }
         
-        internal static string players_list {
+        /// <summary>
+        ///   Looks up a localized string similar to Статистика для.
+        /// </summary>
+        internal static string statistics_for {
             get {
-                return ResourceManager.GetString("players_list", resourceCulture);
+                return ResourceManager.GetString("statistics_for", resourceCulture);
             }
         }
         
-        internal static string you_now_died {
+        /// <summary>
+        ///   Looks up a localized string similar to Вы были добавлены в комнату.
+        /// </summary>
+        internal static string successful_entry_into_room {
             get {
-                return ResourceManager.GetString("you_now_died", resourceCulture);
+                return ResourceManager.GetString("successful_entry_into_room", resourceCulture);
             }
         }
         
-        internal static string villagers_are_sleep {
+        /// <summary>
+        ///   Looks up a localized string similar to Игра окончена, спасибо за игру!.
+        /// </summary>
+        internal static string thanks_for_game {
             get {
-                return ResourceManager.GetString("villagers_are_sleep", resourceCulture);
+                return ResourceManager.GetString("thanks_for_game", resourceCulture);
             }
         }
         
-        internal static string mafia_get_mail {
+        /// <summary>
+        ///   Looks up a localized string similar to Таймер.
+        /// </summary>
+        internal static string timer {
             get {
-                return ResourceManager.GetString("mafia_get_mail", resourceCulture);
+                return ResourceManager.GetString("timer", resourceCulture);
             }
         }
         
-        internal static string alive {
+        /// <summary>
+        ///   Looks up a localized string similar to Недостаточно игроков для старта игры.
+        /// </summary>
+        internal static string too_few_players {
             get {
-                return ResourceManager.GetString("alive", resourceCulture);
+                return ResourceManager.GetString("too_few_players", resourceCulture);
             }
         }
         
-        internal static string died {
+        /// <summary>
+        ///   Looks up a localized string similar to Количество игроков превышает максимальное.
+        /// </summary>
+        internal static string too_many_players {
             get {
-                return ResourceManager.GetString("died", resourceCulture);
+                return ResourceManager.GetString("too_many_players", resourceCulture);
             }
         }
         
-        internal static string room_owner {
+        /// <summary>
+        ///   Looks up a localized string similar to Произошла неожиданная ошибка... Попробуйте ещё раз..
+        /// </summary>
+        internal static string unexpected_error {
             get {
-                return ResourceManager.GetString("room_owner", resourceCulture);
+                return ResourceManager.GetString("unexpected_error", resourceCulture);
             }
         }
         
-        internal static string put_up_vote {
+        /// <summary>
+        ///   Looks up a localized string similar to Вы уже находитесь в игре.
+        /// </summary>
+        internal static string user_already_in_game {
             get {
-                return ResourceManager.GetString("put_up_vote", resourceCulture);
+                return ResourceManager.GetString("user_already_in_game", resourceCulture);
             }
         }
         
-        internal static string didnt_put_anyone {
+        /// <summary>
+        ///   Looks up a localized string similar to Иначе вы будете выставлены на голосование.
+        /// </summary>
+        internal static string user_not_choose {
             get {
-                return ResourceManager.GetString("didnt_put_anyone", resourceCulture);
+                return ResourceManager.GetString("user_not_choose", resourceCulture);
             }
         }
         
-        internal static string skip {
+        /// <summary>
+        ///   Looks up a localized string similar to Вы не находитесь сейчас в игре.
+        /// </summary>
+        internal static string user_not_in_game {
             get {
-                return ResourceManager.GetString("skip", resourceCulture);
+                return ResourceManager.GetString("user_not_in_game", resourceCulture);
             }
         }
         
-        internal static string user_not_choose {
+        /// <summary>
+        ///   Looks up a localized string similar to Участники в комнате.
+        /// </summary>
+        internal static string users_list {
             get {
-                return ResourceManager.GetString("user_not_choose", resourceCulture);
+                return ResourceManager.GetString("users_list", resourceCulture);
             }
         }
         
-        internal static string not_supported_in_game {
+        /// <summary>
+        ///   Looks up a localized string similar to В комнате нет игроков, кроме Вас.
+        /// </summary>
+        internal static string users_list_empty {
             get {
-                return ResourceManager.GetString("not_supported_in_game", resourceCulture);
+                return ResourceManager.GetString("users_list_empty", resourceCulture);
             }
         }
         
-        internal static string you_skip_vote {
+        /// <summary>
+        ///   Looks up a localized string similar to Жители ночью спят, а не разговаривают!.
+        /// </summary>
+        internal static string villagers_are_sleep {
             get {
-                return ResourceManager.GetString("you_skip_vote", resourceCulture);
+                return ResourceManager.GetString("villagers_are_sleep", resourceCulture);
             }
         }
         
-        internal static string you_vote_player {
+        /// <summary>
+        ///   Looks up a localized string similar to Ура! Победили мирные жители....
+        /// </summary>
+        internal static string villagers_won {
             get {
-                return ResourceManager.GetString("you_vote_player", resourceCulture);
+                return ResourceManager.GetString("villagers_won", resourceCulture);
             }
         }
         
+        /// <summary>
+        ///   Looks up a localized string similar to выставил.
+        /// </summary>
         internal static string vote_to {
             get {
                 return ResourceManager.GetString("vote_to", resourceCulture);
             }
         }
         
+        /// <summary>
+        ///   Looks up a localized string similar to выставил самого себя..
+        /// </summary>
         internal static string vote_to_self {
             get {
                 return ResourceManager.GetString("vote_to_self", resourceCulture);
             }
         }
         
-        internal static string you_vote_to_self {
+        /// <summary>
+        ///   Looks up a localized string similar to была создана.
+        /// </summary>
+        internal static string was_created {
             get {
-                return ResourceManager.GetString("you_vote_to_self", resourceCulture);
+                return ResourceManager.GetString("was_created", resourceCulture);
             }
         }
         
-        internal static string choose_player_to_check_role {
+        /// <summary>
+        ///   Looks up a localized string similar to Винрейт:.
+        /// </summary>
+        internal static string winrate {
             get {
-                return ResourceManager.GetString("choose_player_to_check_role", resourceCulture);
+                return ResourceManager.GetString("winrate", resourceCulture);
             }
         }
         
-        internal static string you_have_not_choosen_target {
+        /// <summary>
+        ///   Looks up a localized string similar to Число побед:.
+        /// </summary>
+        internal static string wins_count {
             get {
-                return ResourceManager.GetString("you_have_not_choosen_target", resourceCulture);
+                return ResourceManager.GetString("wins_count", resourceCulture);
             }
         }
         
+        /// <summary>
+        ///   Looks up a localized string similar to Вы выбрали игрока.
+        /// </summary>
         internal static string you_choose_target {
             get {
                 return ResourceManager.GetString("you_choose_target", resourceCulture);
             }
         }
         
-        internal static string role_of_your_target {
-            get {
-                return ResourceManager.GetString("role_of_your_target", resourceCulture);
-            }
-        }
-        
-        internal static string choose_player_to_heal {
+        /// <summary>
+        ///   Looks up a localized string similar to Вы не выбрали цель.
+        /// </summary>
+        internal static string you_have_not_choosen_target {
             get {
-                return ResourceManager.GetString("choose_player_to_heal", resourceCulture);
+                return ResourceManager.GetString("you_have_not_choosen_target", resourceCulture);
             }
         }
         
-        internal static string you_turn_say {
+        /// <summary>
+        ///   Looks up a localized string similar to У вас есть десять секунд, чтобы выставить игрока на голосование.
+        /// </summary>
+        internal static string you_have_ten_seconds {
             get {
-                return ResourceManager.GetString("you_turn_say", resourceCulture);
+                return ResourceManager.GetString("you_have_ten_seconds", resourceCulture);
             }
         }
         
-        internal static string doctor_heals_you {
+        /// <summary>
+        ///   Looks up a localized string similar to Вы покинули игру.
+        /// </summary>
+        internal static string you_leave_from_game {
             get {
-                return ResourceManager.GetString("doctor_heals_you", resourceCulture);
+                return ResourceManager.GetString("you_leave_from_game", resourceCulture);
             }
         }
         
-        internal static string dame_block_you {
+        /// <summary>
+        ///   Looks up a localized string similar to Вы мертвы и не можете говорить!.
+        /// </summary>
+        internal static string you_now_died {
             get {
-                return ResourceManager.GetString("dame_block_you", resourceCulture);
+                return ResourceManager.GetString("you_now_died", resourceCulture);
             }
         }
         
-        internal static string hooker_block_you {
+        /// <summary>
+        ///   Looks up a localized string similar to Вы спасли игрока.
+        /// </summary>
+        internal static string you_save_player {
             get {
-                return ResourceManager.GetString("hooker_block_you", resourceCulture);
+                return ResourceManager.GetString("you_save_player", resourceCulture);
             }
         }
         
-        internal static string you_save_player {
+        /// <summary>
+        ///   Looks up a localized string similar to Вы пропустили голосование.
+        /// </summary>
+        internal static string you_skip_vote {
             get {
-                return ResourceManager.GetString("you_save_player", resourceCulture);
+                return ResourceManager.GetString("you_skip_vote", resourceCulture);
             }
         }
         
-        internal static string nothing_to_heal {
+        /// <summary>
+        ///   Looks up a localized string similar to У Вас есть минута, чтобы что-то сказать.
+        /// </summary>
+        internal static string you_turn_say {
             get {
-                return ResourceManager.GetString("nothing_to_heal", resourceCulture);
+                return ResourceManager.GetString("you_turn_say", resourceCulture);
             }
         }
         
-        internal static string doctor_save_you {
+        /// <summary>
+        ///   Looks up a localized string similar to Вы выставили игрока.
+        /// </summary>
+        internal static string you_vote_player {
             get {
-                return ResourceManager.GetString("doctor_save_you", resourceCulture);
+                return ResourceManager.GetString("you_vote_player", resourceCulture);
             }
         }
         
-        internal static string at_this_night {
+        /// <summary>
+        ///   Looks up a localized string similar to Вы выставили самого себя.
+        /// </summary>
+        internal static string you_vote_to_self {
             get {
-                return ResourceManager.GetString("at_this_night", resourceCulture);
+                return ResourceManager.GetString("you_vote_to_self", resourceCulture);
             }
         }
         
-        internal static string city_wakes_up {
+        /// <summary>
+        ///   Looks up a localized string similar to Вы были исключены.
+        /// </summary>
+        internal static string you_were_kicked {
             get {
-                return ResourceManager.GetString("city_wakes_up", resourceCulture);
+                return ResourceManager.GetString("you_were_kicked", resourceCulture);
             }
         }
         
-        internal static string everyone_survived {
+        /// <summary>
+        ///   Looks up a localized string similar to Ваше имя:.
+        /// </summary>
+        internal static string your_name {
             get {
-                return ResourceManager.GetString("everyone_survived", resourceCulture);
+                return ResourceManager.GetString("your_name", resourceCulture);
             }
         }
         
-        internal static string you_have_ten_seconds {
+        /// <summary>
+        ///   Looks up a localized string similar to Ваша роль.
+        /// </summary>
+        internal static string your_role {
             get {
-                return ResourceManager.GetString("you_have_ten_seconds", resourceCulture);
+                return ResourceManager.GetString("your_role", resourceCulture);
             }
         }
         
-        internal static string choose_player_to_kill {
+        /// <summary>
+        ///   Looks up a localized string similar to Команда мафии на эту игру:.
+        /// </summary>
+        internal static string your_teammates {
             get {
-                return ResourceManager.GetString("choose_player_to_kill", resourceCulture);
+                return ResourceManager.GetString("your_teammates", resourceCulture);
             }
         }
         
-        internal static string villagers_won {
+        /// <summary>
+        ///   Looks up a localized string similar to Ваш ход.
+        /// </summary>
+        internal static string your_turn {
             get {
-                return ResourceManager.GetString("villagers_won", resourceCulture);
+                return ResourceManager.GetString("your_turn", resourceCulture);
             }
         }
         
-        internal static string mafia_won {
+        /// <summary>
+        ///   Looks up a localized string similar to Ваш ход закончился.
+        /// </summary>
+        internal static string your_turn_ended {
             get {
-                return ResourceManager.GetString("mafia_won", resourceCulture);
+                return ResourceManager.GetString("your_turn_ended", resourceCulture);
             }
         }
         
-        internal static string in_this_game_roles {
+        /// <summary>
+        ///   Looks up a localized string similar to Вы ходите под номером.
+        /// </summary>
+        internal static string your_turn_order {
             get {
-                return ResourceManager.GetString("in_this_game_roles", resourceCulture);
+                return ResourceManager.GetString("your_turn_order", resourceCulture);
             }
         }
     }

+ 3 - 0
MafiaTelegramBot/Resources/strings.resx

@@ -339,4 +339,7 @@
     <data name="in_this_game_roles" xml:space="preserve">
         <value>В этой игре участвовали:</value>
     </data>
+    <data name="now_defence" xml:space="preserve">
+        <value>Сейчас оправдывается</value>
+    </data>
 </root>