public async Task Fight(CommandContext ctx, [Description("Player 1")] int pl1, [Description("Player 2")] int pl2) { //should make this send an embed if (pl1 < 1 || pl1 > BotInfoHandler.participantsDiscordIds.Count()) { return; } if (pl2 < 1 || pl2 > BotInfoHandler.participantsDiscordIds.Count()) { return; } //if (pl1 == pl2) return; pl1--; pl2--; if (BotInfoHandler.gameHandler.players[pl1].lives <= 0) { return; } if (BotInfoHandler.gameHandler.players[pl2].lives <= 0) { return; } GameHandlerMethods.StartBattle(BotInfoHandler.gameHandler, pl1, pl2); var fightMessage = new DiscordEmbedBuilder { Title = $"Combat! {BotInfoHandler.gameHandler.players[pl1].name} vs {BotInfoHandler.gameHandler.players[pl2].name}", Color = DiscordColor.Gold }; string msg = string.Empty; for (int i = 0; i < BotInfoHandler.gameHandler.combatOutputCollector.introductionHeader1.Count(); i++) { msg = msg + BotInfoHandler.gameHandler.combatOutputCollector.introductionHeader1[i] + "\n"; } fightMessage.AddField($"{BotInfoHandler.gameHandler.players[pl1].name} upgraded with:", msg, true); msg = string.Empty; for (int i = 0; i < BotInfoHandler.gameHandler.combatOutputCollector.introductionHeader2.Count(); i++) { msg = msg + BotInfoHandler.gameHandler.combatOutputCollector.introductionHeader2[i] + "\n"; } fightMessage.AddField($"{BotInfoHandler.gameHandler.players[pl2].name} upgraded with:", msg, true); //msg = string.Empty; //for (int i = 0; i < BotInfoHandler.gameHandler.combatOutputCollector.statsHeader.Count(); i++) //{ // msg = msg + BotInfoHandler.gameHandler.combatOutputCollector.statsHeader[i] + "\n"; //} //fightMessage.AddField("[Stats]", msg); msg = string.Empty; for (int i = 0; i < BotInfoHandler.gameHandler.combatOutputCollector.preCombatHeader.Count(); i++) { msg = msg + BotInfoHandler.gameHandler.combatOutputCollector.preCombatHeader[i] + "\n"; } fightMessage.AddField("[Pre-Combat]", msg); msg = string.Empty; for (int i = 0; i < BotInfoHandler.gameHandler.combatOutputCollector.combatHeader.Count(); i++) { msg = msg + BotInfoHandler.gameHandler.combatOutputCollector.combatHeader[i] + "\n"; } fightMessage.AddField("[Combat]", msg); await ctx.RespondAsync(embed : fightMessage).ConfigureAwait(false); }