Exemplo n.º 1
0
        public NPCEnemy(string name, string imgUrl, Stats stats, ElementalStats elstats, string[] movepool, bool hasAttack, bool hasDefend) : base()
        {
            this.Name    = name;
            this.ImgUrl  = imgUrl;
            this.Stats   = stats;
            this.ElStats = elstats;
            this.Moves   = PsynergyDatabase.GetMovepool(movepool, hasAttack, hasDefend);

            this.Movepool  = movepool;
            this.HasAttack = hasAttack;
            this.HasDefend = hasDefend;
        }
Exemplo n.º 2
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);
            }
        }
Exemplo n.º 3
0
        public NpcEnemy(string name, string imgUrl, Stats stats, ElementalStats elstats, string[] movepool,
                        bool hasAttack, bool hasDefend)
        {
            Name    = name;
            ImgUrl  = imgUrl;
            Stats   = stats;
            ElStats = elstats;

            Moves = PsynergyDatabase.GetMovepool(movepool, hasAttack, hasDefend);

            Movepool  = movepool;
            HasAttack = hasAttack;
            HasDefend = hasDefend;
        }
Exemplo n.º 4
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);
        }
Exemplo n.º 5
0
 public NPCEnemy(string name, string imgUrl, Stats stats, ElementalStats elstats, string[] movepool, bool hasAttack, bool hasDefend) : base(name, imgUrl, stats, elstats, PsynergyDatabase.GetMovepool(movepool, hasAttack, hasDefend))
 {
     this.Movepool  = movepool;
     this.HasAttack = hasAttack;
     this.HasDefend = hasDefend;
 }