Esempio n. 1
0
        public static Embed RoleAssignTemplate()
        {
            List <WerewolfRole> roles      = WerewolfManager.GenerateRoles(8, out WerewolfTickGenerator t);
            List <string>       addedroles = new List <string>();
            string       shift             = $"{(t.Shift > 0 ? "+" : "")}{t.Shift} Equinox";
            EmbedBuilder e = new EmbedBuilder();

            e.WithColor(EmbedData.GetColor("error"));
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("**Assigning Roles...**\n");

            foreach (WerewolfRole role in roles)
            {
                if (addedroles.Contains(role.Name))
                {
                    continue;
                }
                string pv = role.PointValue > 0 ? $"+{role.PointValue}" : $"{role.PointValue}";
                sb.AppendLine($"**x{roles.InstanceCount(role)}** | {role.Name.MarkdownBold()} ({pv})");
                sb.AppendLine($"{role.Summary}");

                addedroles.Add(role.Name);
            }
            e.WithDescription(sb.ToString());
            e.WithFooter($"{shift} | {t.PlayerCount} Players");
            return(e.Build());
        }
Esempio n. 2
0
        public WerewolfConstructor(List <ulong> players)
        {
            Roles   = WerewolfManager.GenerateRoles(players.Count, out WerewolfTickGenerator tick);
            Tick    = tick;
            Players = new List <IGamePlayer>();

            foreach (ulong player in players)
            {
                Assign(player);
            }
        }
Esempio n. 3
0
        public static Embed DeathTemplate()
        {
            EmbedBuilder e = new EmbedBuilder();

            e.WithColor(EmbedData.GetColor("error"));
            StringBuilder sb = new StringBuilder();

            sb.AppendLine($"**PLAYER_NAME** has died. {GetRandomDeathCause()}");
            sb.AppendLine($"PLAYER_NAME proved themselves to be many things, but they preferred that you call them a  **{WerewolfManager.GetAnyRole().Name}**."); // <Description based on player's influence>
            e.WithDescription(sb.ToString());
            return(e.Build());
        }