internal static EmbedBuilder StatsBuilder(OutputFormatter formatter, SocketSelfUser me, int clanLevel, int averageMS, int tapsPerCq, int[] attackers) { var absLevel = Math.Abs(clanLevel); var currentBonus = Calculator.ClanBonus(absLevel); var nextBonus = Calculator.ClanBonus(absLevel + 1); var nextTitanLordHp = Calculator.TitanLordHp(absLevel); var advanceStart = Calculator.AdvanceStart(absLevel); var avatar = me.GetAvatarUrl() == null ? null : new Uri(me.GetAvatarUrl()); var builder = new EmbedBuilder { Footer = new EmbedFooterBuilder { IconUrl = avatar, Text = me.Username + "#" + me.Discriminator }, Color = System.Drawing.Color.DarkOrange.ToDiscord(), Author = new EmbedAuthorBuilder { Name = $"Displaying stats for a level {clanLevel} clan", }, Timestamp = DateTime.Now }; builder.AddInlineField("Current CQ", formatter.Beautify(absLevel)); builder.AddInlineField("Current Bonus", formatter.Beautify(currentBonus) + "%"); builder.AddInlineField("Next Bonus", formatter.Beautify(nextBonus) + "%"); builder.AddInlineField("Next Titan Lord HP", formatter.Beautify(nextTitanLordHp)); builder.AddInlineField("Advance start", formatter.Beautify(advanceStart * 100) + "%"); attackers = attackers.Count() == 0 ? new int[] { 20, 30, 40, 50 } : attackers; builder.AddField($"Requirements per boss (assuming MS {averageMS} + {tapsPerCq} taps)", string.Join("\n", attackers.Select(num => { var dmgpp = nextTitanLordHp / num; var attacks = Calculator.AttacksNeeded(absLevel, num, averageMS, tapsPerCq); var dia = Calculator.TotalAttackCost(attacks); return($"Attackers: {num} | Damage/person: {formatter.Beautify(dmgpp)} | Attacks: {formatter.Beautify(attacks)} | Diamonds: {formatter.Beautify(dia)}"); }))); return(builder); }