Example #1
0
        public async Task HealAsync(CommandContext ctx, [RemainingText, Description("Target")] string target)
        {
            var Chr = await ManageCharacter.GetChrByName(target);

            if (Chr == null)
            {
                await ctx.RespondAsync("Does not exist.");

                return;
            }
            if (Chr.HPC > 0 && await Helpers.Owners.CheckAsync(ctx.User.Id))
            {
                Chr.HPC = Chr.HPM;
                Chr.ENC = Chr.ENM;
                await ManageCharacter.UpdateAsync(Chr);

                await ctx.RespondAsync($"**{Chr.Name} has been healed**");

                return;
            }
            else if (Chr.HPC < 1 && await Helpers.Owners.CheckAsync(ctx.User.Id))
            {
                Chr.HPC = Chr.HPM;
                Chr.ENC = Chr.ENM;
                await ManageCharacter.UpdateAsync(Chr);

                await ctx.RespondAsync($"**{Chr.Name} has been healed**");

                return;
            }
            else
            {
                await ctx.RespondAsync("You can't use this cmd");
            }
        }
Example #2
0
            public async Task Bless(CommandContext ctx, [RemainingText] string Target)
            {
                var target = ctx.User;
                var Accg   = new AccountGet()
                {
                    UID = target.Id,
                    GID = ctx.Guild.Id
                };
                var Check = await ManageCharacter.GetAll(Acc : Accg);

                if (Check == null)
                {
                    await ctx.RespondAsync("You have no characters.");

                    return;
                }
                var OwnGet = new OwnerGet()
                {
                    UID  = target.Id,
                    GID  = ctx.Guild.Id,
                    Slot = Check.Slot
                };
                var Own = await ManageCharacter.GetAll(OwnGet);

                var ChrGet = new ChrGet()
                {
                    Entry = Own.CharEntry,
                };
                var Chr = await ManageCharacter.GetAll(ChrGet);

                if (Chr.SubClass != SubClasses.Priest)
                {
                    await ctx.RespondAsync("You are not a priest");

                    return;
                }
                var TChr = await ManageCharacter.GetChrByName(Target);

                if (TChr == null)
                {
                    await ctx.RespondAsync("Does not exist.");

                    return;
                }
                var Amount = Chr.SubClassAttribute + Chr.MagicEff;
                await Helpers.Cast.Heal(Amount, TChr);

                await ctx.RespondAsync($"`{Chr.Name}` blesses `{TChr.Name}`, as they heal for `{Amount} HP`");

                await Helpers.TimerChr.AddCooldown(Chr.Entry, ctx.Command.Name, 900);
            }
Example #3
0
        public async Task MagicAsync(CommandContext ctx, [RemainingText, Description("Target")] string target)
        {
            var Accg = new AccountGet()
            {
                UID = ctx.User.Id,
                GID = ctx.Guild.Id
            };
            var Check = await ManageCharacter.GetAll(Acc : Accg);

            if (Check == null)
            {
                await ctx.RespondAsync("You have no characters.");

                return;
            }
            var Chr2 = await ManageCharacter.GetChrByName(target);

            if (Chr2 == null)
            {
                await ctx.RespondAsync("Does not exist.");

                return;
            }
            var OwnGet = new OwnerGet()
            {
                UID  = ctx.User.Id,
                GID  = ctx.Guild.Id,
                Slot = Check.Slot
            };
            var Own = await ManageCharacter.GetAll(OwnGet);

            var ChrGet = new ChrGet()
            {
                Entry = Own.CharEntry,
            };
            var Chr = await ManageCharacter.GetAll(ChrGet);

            var Cdr = await Helpers.TimerChr.GetCooldown(Chr.Entry, ctx.Command.Name);

            if (Cdr != null)
            {
                await ctx.RespondAsync($"This is on cooldown, please wait {(Cdr.RemainingTime / 60).ToString() + " m " + (Cdr.RemainingTime - Convert.ToInt32(Cdr.RemainingTime / 60) * 60)} seconds please!");

                return;
            }
            await Helpers.TimerChr.AddCooldown(Chr.Entry, ctx.Command.Name, 10);

            var emm = await Helpers.Attack.RollAsync(Chr, Chr2, FightOptions.Magic);

            await ctx.RespondAsync(embed : emm);
        }
Example #4
0
        public async Task ViewOther(CommandContext ctx, [RemainingText] string Name)
        {
            var Chr = await ManageCharacter.GetChrByName(Name);

            if (Chr == null)
            {
                await ctx.RespondAsync("No character by " + Name);

                return;
            }
            var Own = await ManageCharacter.GetOwnerByEntry(Chr.Entry);

            var Embed = new DiscordEmbedBuilder();

            Embed = Embed.WithDescription($"[`Card`] → [__{Chr.Class} - {Chr.Name} - {Chr.Race}__]");
            Embed = Embed.WithImageUrl(Chr.Image);
            Embed = Embed.WithFooter(Chr.Desc);
            await ctx.RespondAsync(embed : Embed);
        }
Example #5
0
        public async Task Kiss(CommandContext ctx, [RemainingText] string Target)
        {
            var Accg = new AccountGet()
            {
                UID = ctx.User.Id,
                GID = ctx.Guild.Id
            };
            var Check = await ManageCharacter.GetAll(Acc : Accg);

            if (Check == null)
            {
                await ctx.RespondAsync("You have no characters.");

                return;
            }
            var OwnGet = new OwnerGet()
            {
                UID  = ctx.User.Id,
                GID  = ctx.Guild.Id,
                Slot = Check.Slot
            };
            var Own = await ManageCharacter.GetAll(OwnGet);

            var ChrGet = new ChrGet()
            {
                Entry = Own.CharEntry,
            };
            var Chr = await ManageCharacter.GetAll(ChrGet);

            var Chr2 = await ManageCharacter.GetChrByName(Target);

            if (Chr2 == null)
            {
                await ctx.RespondAsync("No character found by that name.");

                return;
            }
            await ctx.RespondAsync($"**{Chr.Name}** *kisses* **{Chr2.Name}**");
        }