Example #1
0
        private static async Task StartBattle(IGuild guild, SocketUser battler0, SocketUser battler1, string team0Name, string team1Name, string team0Mention, string team1Mention)
        {
            PBELegalPokemonCollection p0, p1;

            // Competitively Randomized Pokémon
            p0 = PBERandomTeamGenerator.CreateRandomTeam(3);
            p1 = PBERandomTeamGenerator.CreateRandomTeam(3);

            var battle = new PBEBattle(PBEBattleFormat.Single, PBESettings.DefaultSettings, new PBETrainerInfo(p0, team0Name), new PBETrainerInfo(p1, team1Name));

            var          bc      = new BattleContext(battle, battler0, battler1);
            ITextChannel channel = await ChannelHandler.CreateChannel(guild, $"battle-{bc.BattleId}");

            await channel.SendMessageAsync($"**Battle #{bc.BattleId} ― {team0Mention} vs {team1Mention}**");

            await bc.Begin(channel);
        }