예제 #1
0
        public async Task MoveInfo([Remainder] string name = "")
        {
            if (name == "")
            {
                return;
            }

            Move m = PsynergyDatabase.GetMove(name);

            if (!(m is Psynergy psy))
            {
                return;
            }
            if (psy.Name.ToLower().Contains("not implemented"))
            {
                var failEmbed = new EmbedBuilder();
                failEmbed.WithColor(Colors.Get("Iodem"));
                failEmbed.WithDescription("I have never heard of that kind of Psynergy");
                await Context.Channel.SendMessageAsync("", false, failEmbed.Build());

                return;
            }
            var embed = new EmbedBuilder();

            embed.WithColor(Colors.Get(psy.Element.ToString()));
            embed.WithAuthor(psy.Name);
            embed.AddField("Emote", psy.Emote, true);
            embed.AddField("PP", psy.PPCost, true);
            embed.AddField("Description", $"{psy} {(psy.HasPriority ? "Always goes first." : "")}");

            if (psy.Effects.Count > 0)
            {
                var s = string.Join("\n", psy.Effects.Select(e => $"{e}"));
                embed.AddField("Effects", s);
            }

            var classWithMove = AdeptClassSeriesManager.allClasses.Where(d => d.Classes.Any(c => c.Movepool.Contains(psy.Name)));

            if (classWithMove.Count() > 0)
            {
                embed.AddField("Learned by", string.Join(", ", classWithMove.Select(c => c.Name)));
            }

            await Context.Channel.SendMessageAsync("", false, embed.Build());

            if (Context.User is SocketGuildUser sgu)
            {
                _ = ServerGames.UserLookedUpPsynergy(sgu, (SocketTextChannel)Context.Channel);
            }
        }
예제 #2
0
        public async Task MoveInfo([Remainder] string name = "")
        {
            if (name == "")
            {
                return;
            }

            Psynergy psy = PsynergyDatabase.GetPsynergy(name);

            if (psy.name.Contains("Not Implemented"))
            {
                var failEmbed = new EmbedBuilder();
                failEmbed.WithColor(Colors.Get("Iodem"));
                failEmbed.WithDescription("I have never heard of that kind of Psynergy");
                await Context.Channel.SendMessageAsync("", false, failEmbed.Build());

                return;
            }
            var embed = new EmbedBuilder();

            embed.WithColor(Colors.Get(psy.element.ToString()));
            embed.WithAuthor(psy.name);
            embed.AddField("Emote", psy.emote, true);
            embed.AddField("PP", psy.PPCost, true);
            //embed.AddField("Element", psy.element, true);
            embed.AddField("Description", $"{psy.ToString()} {(psy.hasPriority ? "Always goes first." : "")}");
            var s = "none";

            if (psy.effects.Count > 0)
            {
                s = string.Join("\n", psy.effects.Select(e => $"{e.ToString()}"));
            }

            embed.AddField("Effects", s);
            await Context.Channel.SendMessageAsync("", false, embed.Build());

            _ = ServerGames.UserLookedUpPsynergy((SocketGuildUser)Context.User, (SocketTextChannel)Context.Channel);
        }