|
@@ -280,6 +280,32 @@ namespace MafiaTelegramBot.Game
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ public void WerewolfRoleAchievementEvent(int color, bool reset = false)
|
|
|
+ {
|
|
|
+ Task.Run(async () =>
|
|
|
+ {
|
|
|
+ if (!OpenedRoles.Werewolf)
|
|
|
+ {
|
|
|
+ if (reset)
|
|
|
+ {
|
|
|
+ Achievements.PreviousGameWinColor = 0;
|
|
|
+ }
|
|
|
+ else if ((Achievements.PreviousGameWinColor == 1 && color == 2)
|
|
|
+ || (Achievements.PreviousGameWinColor == 2 && color == 1))
|
|
|
+ {
|
|
|
+ await Bot.SendWithMarkdown2(ChatId,
|
|
|
+ $"{strings.congrats} {roles.Werewolf}! {strings.you_can_use}");
|
|
|
+ await Bot.SendStickerAsync(ChatId, Stickers.Sticker[Roles.Werewolf.ToString()]);
|
|
|
+ OpenedRoles.OpenWerewolf();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Achievements.PreviousGameWinColor = color;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
public void ParasiteRoleAchievementEvent()
|
|
|
{
|
|
|
Task.Run(() =>
|