diff --git a/Werewolf for Telegram/Werewolf Control/Commands/AdminCommands.cs b/Werewolf for Telegram/Werewolf Control/Commands/AdminCommands.cs index 622882a24..45b199dd6 100644 --- a/Werewolf for Telegram/Werewolf Control/Commands/AdminCommands.cs +++ b/Werewolf for Telegram/Werewolf Control/Commands/AdminCommands.cs @@ -621,6 +621,7 @@ public static void ReviewGifs(Update u, string[] args) Bot.Api.SendDocumentAsync(id, pack.WolfWin, "Single Wolf Wins"); Thread.Sleep(250); Bot.Api.SendDocumentAsync(id, pack.WolvesWin, "Wolf Pack Wins"); + Thread.Sleep(500); var msg = $"Approval Status: "; switch (pack.Approved) { @@ -696,6 +697,7 @@ public static void ApproveGifs(Update u, string[] args) pack.Approved = true; pack.ApprovedBy = id; pack.NSFW = nsfw; + pack.Submitted = false; var msg = $"Approval Status: "; var by = db.Players.FirstOrDefault(x => x.TelegramId == pack.ApprovedBy); msg += "Approved By " + by.Name + "\nNSFW: " + pack.NSFW; diff --git a/Werewolf for Telegram/Werewolf Control/Commands/GifCommands.cs b/Werewolf for Telegram/Werewolf Control/Commands/GifCommands.cs index 92ef19c55..3137238bf 100644 --- a/Werewolf for Telegram/Werewolf Control/Commands/GifCommands.cs +++ b/Werewolf for Telegram/Werewolf Control/Commands/GifCommands.cs @@ -39,26 +39,8 @@ public static void Donate(Update u, string[] args) } menu.Buttons.Add(new InlineKeyboardUrlButton("PayPal", "https://PayPal.me/greywolfdevelopment")); var markup = menu.CreateMarkupFromMenu(); - var gif = "Donate $10USD or more to unlock a custom gif pack that you can choose. "; //"Custom gif packs are not available at this time, watch the update channel for more news! "; - //using (var db = new WWContext()) - //{ - // var count = db.Players.Count(x => x.GifPurchased == true); - // if (count < 100) - // gif = "Donate $10USD or more to unlock a custom gif pack that you can choose. "; - - //} - Bot.Api.SendTextMessageAsync(u.Message.Chat.Id, - "Want to help keep Werewolf online?\n" + - "We now offer some rewards for donating!\n" + - gif + "There are also donation badges you can get in game. These badges are added to the end of your name in game, so everyone can see you donated!\n\n" + - "•$10 USD: 🥉\n" + - "•$50 USD: 🥈\n" + - "•$100 USD: 🥇\n\n" + - "You might also see this special badge: 💎\nThis is reserved for people who donated prior to there being any rewards for donating\n" + - "If you donate via PayPal, you will need to contact @werewolfsupport to claim your prize. If you donate via Telegram, it's automated, no need to contact an admin :)\n" + - "More information about the Custom Gif Packs: http://telegra.ph/Custom-Gif-Packs-and-Donation-Levels-07-31\n" + - "How would you like to donate?", - replyMarkup: markup); + var txt = $"Want to help keep Werewolf Moderator online? Donate now and gets: {"Custom gifs".ToBold()} and {"Badges".ToBold()}!\n\nClick the button below to donate, and click here to claim your reward if you donate via Paypal!\n\nMore Info: https://telegra.ph/Custom-Gif-Packs-and-Donation-Levels-06-27"; + Bot.Api.SendTextMessageAsync(u.Message.Chat.Id, txt, replyMarkup: markup, parseMode: ParseMode.Html, disableWebPagePreview: true); } [Attributes.Command(Trigger = "customgif")] diff --git a/Werewolf for Telegram/Werewolf Control/Handlers/UpdateHandler.cs b/Werewolf for Telegram/Werewolf Control/Handlers/UpdateHandler.cs index cc6e86cc3..d537fb7e3 100644 --- a/Werewolf for Telegram/Werewolf Control/Handlers/UpdateHandler.cs +++ b/Werewolf for Telegram/Werewolf Control/Handlers/UpdateHandler.cs @@ -867,6 +867,7 @@ internal static void HandleCallback(CallbackQuery query) Bot.Api.SendDocumentAsync(id, pack.WolfWin, "Single Wolf Wins"); Thread.Sleep(250); Bot.Api.SendDocumentAsync(id, pack.WolvesWin, "Wolf Pack Wins"); + Thread.Sleep(500); var msg = $"Approval Status: "; switch (pack.Approved) { @@ -904,6 +905,7 @@ internal static void HandleCallback(CallbackQuery query) pack.Approved = true; pack.ApprovedBy = id; pack.NSFW = nsfw; + pack.Submitted = false; msg = $"Approval Status: "; by = DB.Players.FirstOrDefault(x => x.TelegramId == pack.ApprovedBy); msg += "Approved By " + by.Name + "\nNSFW: " + pack.NSFW; @@ -933,6 +935,7 @@ internal static void HandleCallback(CallbackQuery query) pack.Approved = true; pack.ApprovedBy = id; pack.NSFW = nsfw; + pack.Submitted = false; msg = $"Approval Status: "; by = DB.Players.FirstOrDefault(x => x.TelegramId == pack.ApprovedBy); msg += "Approved By " + by.Name + "\nNSFW: " + pack.NSFW; diff --git a/Werewolf for Telegram/Werewolf Control/Helpers/Settings.cs b/Werewolf for Telegram/Werewolf Control/Helpers/Settings.cs index ddda555ea..e40f73835 100644 --- a/Werewolf for Telegram/Werewolf Control/Helpers/Settings.cs +++ b/Werewolf for Telegram/Werewolf Control/Helpers/Settings.cs @@ -28,7 +28,7 @@ internal static class Settings public static string TcpSecret => Environment.MachineName.GetHashCode().ToString(); - public static readonly long PersianSupportChatId = -1001059174638; + public static readonly long PersianSupportChatId = -1001398432551; public static readonly long MainChatId = -1001049529775; //Beta group public static readonly long SupportChatId = -1001060486754; //@werewolfsupport public static readonly long PrimaryChatId = -1001268085464; //@werewolfgame diff --git a/Werewolf for Telegram/Werewolf Node/Werewolf.cs b/Werewolf for Telegram/Werewolf Node/Werewolf.cs index 87de845e7..3e7e200dc 100644 --- a/Werewolf for Telegram/Werewolf Node/Werewolf.cs +++ b/Werewolf for Telegram/Werewolf Node/Werewolf.cs @@ -1364,15 +1364,7 @@ private void AssignRoles() var towolf = rolesToAssign.FindIndex(x => x == IRole.Sorcerer || x == IRole.Traitor); //if there are both, the random order of rolesToAssign will choose for us which one to substitute rolesToAssign[towolf] = WolfRoles[Program.R.Next(WolfRoles.Count())]; //choose randomly from WolfRoles } - - //appseer without seer -> seer - if (rolesToAssign.Contains(IRole.ApprenticeSeer) && !rolesToAssign.Contains(IRole.Seer)) - { - //substitute with seer - var apps = rolesToAssign.IndexOf(IRole.ApprenticeSeer); - rolesToAssign[apps] = IRole.Seer; - } - + //cult without CH -> add CH if (rolesToAssign.Contains(IRole.Cultist) && !rolesToAssign.Contains(IRole.CultistHunter)) { @@ -1381,6 +1373,13 @@ private void AssignRoles() rolesToAssign[vg] = IRole.CultistHunter; } + //appseer without seer -> seer + if (rolesToAssign.Contains(IRole.ApprenticeSeer) && !rolesToAssign.Contains(IRole.Seer)) + { + //substitute with seer + var apps = rolesToAssign.IndexOf(IRole.ApprenticeSeer); + rolesToAssign[apps] = IRole.Seer; + } //make sure that we have at least two teams if ( @@ -2360,7 +2359,8 @@ private void DayCycle() //first off, chance to tell wolves if (Program.R.Next(100) < Settings.ChanceDetectiveCaught) { - foreach (var w in Players.Where(x => !x.IsDead && (x.PlayerRole == IRole.Wolf || x.PlayerRole == IRole.AlphaWolf || x.PlayerRole == IRole.WolfCub))) + IRole[] WolfRoles = new[] { IRole.Wolf, IRole.AlphaWolf, IRole.WolfCub, IRole.Lycan }; + foreach (var w in Players.Where(x => !x.IsDead && WolfRoles.Contains(x.PlayerRole))) { Send(GetLocaleString("DetectiveCaught", $"{detect.GetName()}"), w.Id); } @@ -2451,6 +2451,10 @@ private void NightCycle() foreach (var m in Players.Where(x => x.PlayerRole == IRole.Mason & !x.IsDead && x.Id != p.Id)) Send(GetLocaleString("MasonConverted", p.GetName()), m.Id); + else if (p.PlayerRole == IRole.Cultist) + foreach (var m in Players.Where(x => x.PlayerRole == IRole.Cultist & !x.IsDead && x.Id != p.Id)) + Send(GetLocaleString("CultistBitten", p.GetName()), m.Id); + p.Bitten = false; p.PlayerRole = IRole.Wolf; p.Team = ITeam.Wolf; @@ -3640,6 +3644,7 @@ private bool CheckForGameEnd(bool checkbitten = false) case IRole.Wolf: case IRole.WolfCub: case IRole.AlphaWolf: + case IRole.Lycan: return DoGameEnd(ITeam.Wolf); case IRole.CultistHunter: var cultist = alivePlayers.FirstOrDefault(x => x.PlayerRole == IRole.Cultist); @@ -4327,7 +4332,7 @@ public void HunterFinalShot(IPlayer hunter, KillMthd method) if (killed.PlayerRole == IRole.WolfCub) WolfCubKilled = true; killed.TimeDied = DateTime.Now; - if (killed.PlayerRole == IRole.Wolf || killed.PlayerRole == IRole.AlphaWolf || killed.PlayerRole == IRole.WolfCub || killed.PlayerRole == IRole.SerialKiller) + if (killed.PlayerRole == IRole.Wolf || killed.PlayerRole == IRole.AlphaWolf || killed.PlayerRole == IRole.WolfCub || killed.PlayerRole == IRole.SerialKiller || killed.PlayerRole == IRole.Lycan) AddAchievement(hunter, Achievements.HeyManNiceShot); DBKill(hunter, killed, KillMthd.HunterShot);