Example #1
0
        public async Task GenerateFight()
        {
            var embed = new EmbedBuilder();

            embed.WithDescription("**__The Monsters**__\n");
            for (int i = randy.Next(1, 10); i > 0; i--)
            {
                embed.Description += (DnDHelperClass.ParseMonsters((randy.Next(1, 25)).ToString()) + "\n\n");
            }
            embed.WithTitle("Your party has been attacked!");
            embed.WithColor(255, 0, 0);

            await Context.Channel.SendMessageAsync("", embed : embed.Build());
        }
Example #2
0
        public async Task GenerateFight(string cr, string amount = "1")
        {
            int j = 0;

            Int32.TryParse(amount, out j);
            var   embed           = new EmbedBuilder();
            float challengeRating = 0;

            float.TryParse(cr, out challengeRating);
            if (challengeRating <= 0 || challengeRating > 25)
            {
                embed.WithDescription("You are either way too nice or far too evil. Choose a CR between 1 and 25\n");
                embed.WithTitle("Um........no");
                embed.WithColor(255, 0, 0);
            }
            else
            {
                if (j > 20)
                {
                    embed.WithDescription("While I respect your zeal that is just too many monsters \n");
                    embed.WithTitle("Too many monsters!");
                    embed.WithColor(255, 0, 0);
                }
                else
                {
                    embed.WithDescription("__**The monsters**__\n");
                    for (int i = j; i > 0; i--)
                    {
                        embed.Description += (DnDHelperClass.ParseMonsters(cr) + "\n\n");
                    }
                    embed.WithTitle("Your party has been attacked!");
                    embed.WithColor(255, 0, 0);
                }
            }
            await Context.Channel.SendMessageAsync("", embed : embed.Build());
        }