Beispiel #1
0
        public async Task ChomusukeTrain()
        {
            var config = GlobalUserAccounts.GetUserAccount(Context.User);

            if (config.ActiveChomusuke == 0) //if they set an active chomusuke
            {
                await SendMessage(Context, null,
                                  $"{Global.ENo}  **|**  **{Context.User.Username}**, you don't have an active {Global.EChomusuke} Chomusuke set!\n\nSet an active Chomusuke with `n!active`!");
            }
            else
            {
                var chom   = ActiveChomusuke.GetOneActiveChomusuke(config.Id);
                int choice = Global.Rng.Next(1, 3);

                if (choice == 1)
                {
                    uint xpGain = (uint)Global.Rng.Next(20, 30);
                    chom.XP += xpGain;
                    await ActiveChomusuke.ConvertOneActiveVariable(config.Id, chom);

                    GlobalUserAccounts.SaveAccounts(config.Id);
                    int    randomIndex  = Global.Rng.Next(yesTrainTexts.Length);
                    string text         = yesTrainTexts[randomIndex];
                    var    thumbnailurl = Context.User.GetAvatarUrl();
                    var    auth         = new EmbedAuthorBuilder()
                    {
                        Name    = "Success!",
                        IconUrl = thumbnailurl,
                    };
                    var embed = new EmbedBuilder()
                    {
                        Author = auth
                    };
                    embed.WithColor(0, 255, 0);
                    embed.WithThumbnailUrl(yesTrainLinks[Global.Rng.Next(yesTrainLinks.Length)]);
                    embed.WithDescription($"{text} \n**(+{xpGain} exp)**");
                    await SendMessage(Context, embed.Build());
                }

                if (choice == 2)
                {
                    int    randomIndex  = Global.Rng.Next(yesTrainTexts.Length);
                    string text         = noTrainTexts[randomIndex];
                    var    thumbnailurl = Context.User.GetAvatarUrl();
                    var    auth         = new EmbedAuthorBuilder()
                    {
                        Name    = "Try again!",
                        IconUrl = thumbnailurl,
                    };
                    var embed = new EmbedBuilder()
                    {
                        Author = auth
                    };
                    embed.WithColor(255, 0, 0);
                    embed.WithThumbnailUrl(noTrainLinks[Global.Rng.Next(noTrainLinks.Length)]);
                    embed.WithDescription($"{text}");
                    await SendMessage(Context, embed.Build());
                }
            }
        }
Beispiel #2
0
        public static async Task ChooseActionAsync(SocketUser user, string action)
        {
            var activeChomusuke = ActiveChomusuke.GetOneActiveChomusuke(user.Id);

            if (action == "cure")
            {
                activeChomusuke.Sick  = false;
                activeChomusuke.Waste = 0;
                await ActiveChomusuke.ConvertOneActiveVariable(user.Id, activeChomusuke);
            }
        }
Beispiel #3
0
        public async Task ChomusukeName([Remainder] string name)
        {
            var config = GlobalUserAccounts.GetUserAccount(Context.User);

            if (config.ActiveChomusuke == 0) //if they set an active chomusuke
            {
                await SendMessage(Context, null,
                                  $"{Global.ENo}  **|**  **{Context.User.Username}**, you don't have an active {Global.EChomusuke} Chomusuke set!\n\nSet an active Chomusuke with `n!active`!");
            }
            else
            {
                var chom = ActiveChomusuke.GetOneActiveChomusuke(config.Id);
                chom.Name = name;
                await ActiveChomusuke.ConvertOneActiveVariable(config.Id, chom);

                GlobalUserAccounts.SaveAccounts(Context.User.Id);
                await SendMessage(Context, null,
                                  $"✅   **|**  **{Context.User.Username}**, you successfully changed {Global.EChomusuke} {chom.Name}'s name to **{name}**!");
            }
        }
Beispiel #4
0
        public async Task ChomusukePlay()
        {
            var config = GlobalUserAccounts.GetUserAccount(Context.User);

            if (config.ActiveChomusuke == 0) //if they set an active chomusuke
            {
                await SendMessage(Context, null,
                                  $"{Global.ENo}  **|**  **{Context.User.Username}**, you don't have an active {Global.EChomusuke} Chomusuke set!\n\nSet an active Chomusuke with `n!active`!");
            }
            else
            {
                var chom = ActiveChomusuke.GetOneActiveChomusuke(config.Id);
                if (chom.Trust == 20)
                {
                    var thumbnailurl = Context.User.GetAvatarUrl();
                    var auth         = new EmbedAuthorBuilder()
                    {
                        Name    = "Chiiiii..",
                        IconUrl = thumbnailurl,
                    };
                    var embed = new EmbedBuilder()
                    {
                        Author = auth
                    };
                    embed.WithColor(255, 128, 0);
                    embed.WithThumbnailUrl(NoPlayLinks[Global.Rng.Next(NoPlayLinks.Length)]);
                    embed.WithDescription(
                        $":soccer:  **|**  **{Context.User.Username}, your {Global.EChomusuke} Chomusuke is bored of playing right now!**");
                    await SendMessage(Context, embed.Build());

                    return;
                }

                {
                    int    randomIndex = Global.Rng.Next(playTexts.Length);
                    string text        = playTexts[randomIndex];
                    int    trustGain   = Global.Rng.Next(4, 9);
                    chom.Trust += (byte)trustGain;
                    if (chom.Trust > 20)
                    {
                        chom.Trust = 20;
                    }

                    await ActiveChomusuke.ConvertOneActiveVariable(config.Id, chom);

                    GlobalUserAccounts.SaveAccounts(Context.User.Id);
                    var thumbnailurl = Context.User.GetAvatarUrl();
                    var auth         = new EmbedAuthorBuilder()
                    {
                        Name    = "Success!",
                        IconUrl = thumbnailurl,
                    };
                    var embed = new EmbedBuilder()
                    {
                        Author = auth
                    };
                    embed.WithColor(0, 255, 0);
                    embed.WithThumbnailUrl(YesPlayLinks[Global.Rng.Next(YesPlayLinks.Length)]);
                    embed.WithDescription(
                        $":soccer:  **|**  **{Context.User.Username}**, {text} **(+{trustGain} trust)**");
                    await SendMessage(Context, embed.Build());
                }
            }
        }
Beispiel #5
0
        public async Task ChomusukeClean()
        {
            var config = GlobalUserAccounts.GetUserAccount(Context.User.Id);

            if (config.ActiveChomusuke == 0) //if they set an active chomusuke
            {
                await SendMessage(Context, null,
                                  $"{Global.ENo}  **|**  **{Context.User.Username}**, you don't have an active {Global.EChomusuke} Chomusuke set!\n\nSet an active Chomusuke with `n!active`!");
            }
            else
            {
                var chom = ActiveChomusuke.GetOneActiveChomusuke(config.Id);
                if (chom.Waste == 0)
                {
                    var thumbnailurl = Context.User.GetAvatarUrl();
                    var auth         = new EmbedAuthorBuilder()
                    {
                        Name    = "Chiiiii..",
                        IconUrl = thumbnailurl,
                    };
                    var embed = new EmbedBuilder()
                    {
                        Author = auth
                    };
                    embed.WithColor(255, 128, 0);
                    embed.WithThumbnailUrl("https://i.imgur.com/OtVepvM.gif");
                    embed.WithDescription(
                        $":sparkles:  **|** **{Context.User.Username}, your {Global.EChomusuke} Chomusuke's room is squeaky clean!**");
                    await SendMessage(Context, embed.Build());
                }
                else
                {
                    int    randomIndex   = Global.Rng.Next(cleanTexts.Length);
                    string text          = cleanTexts[randomIndex];
                    int    cleanedAmount = Global.Rng.Next(4, 8);
                    chom.Waste -= (byte)cleanedAmount;
                    if (chom.Waste > 20)
                    {
                        chom.Waste = 0;
                    }

                    await ActiveChomusuke.ConvertOneActiveVariable(config.Id, chom);

                    GlobalUserAccounts.SaveAccounts(Context.User.Id);

                    var thumbnailurl = Context.User.GetAvatarUrl();
                    var auth         = new EmbedAuthorBuilder()
                    {
                        Name    = "Success!",
                        IconUrl = thumbnailurl,
                    };
                    var embed = new EmbedBuilder()
                    {
                        Author = auth
                    };
                    embed.WithColor(0, 255, 0);
                    embed.WithThumbnailUrl("https://i.imgur.com/PI2z8rm.gif");
                    embed.WithDescription(
                        $":sparkles:  **|**  **{Context.User.Username}**, {text} **(-{cleanedAmount} waste)**");
                    await SendMessage(Context, embed.Build());
                }
            }
        }
Beispiel #6
0
        public async Task ChomusukeFeed()
        {
            var config = GlobalUserAccounts.GetUserAccount(Context.User);

            if (config.ActiveChomusuke == 0) //if they set an active chomusuke
            {
                await SendMessage(Context, null,
                                  $"{Global.ENo}  **|**  **{Context.User.Username}**, you don't have an active {Global.EChomusuke} Chomusuke set!\n\nSet an active Chomusuke with `n!active`!");
            }
            else
            {
                var chom = ActiveChomusuke.GetOneActiveChomusuke(config.Id);
                if (chom.Hunger == 20)
                {
                    var thumbnailurl = Context.User.GetAvatarUrl();
                    var auth         = new EmbedAuthorBuilder()
                    {
                        Name    = "Chiiiii..",
                        IconUrl = thumbnailurl,
                    };
                    var embed = new EmbedBuilder()
                    {
                        Author = auth
                    };
                    embed.WithColor(255, 128, 0);
                    embed.WithThumbnailUrl("https://i.imgur.com/Sc4HGir.gif");
                    embed.WithDescription(
                        $":poultry_leg:  **|**  **{Context.User.Username}**, {Global.EChomusuke} {chom.Name} is full!");
                    await SendMessage(Context, embed.Build());
                }
                else
                {
                    int cost       = Global.Rng.Next(34, 87);
                    int hungerGain = Global.Rng.Next(4, 9);
                    chom.Hunger += (byte)hungerGain;
                    if (chom.Hunger > 20)
                    {
                        chom.Hunger = 20;
                    }

                    await ActiveChomusuke.ConvertOneActiveVariable(config.Id, chom);

                    GlobalUserAccounts.SaveAccounts(Context.User.Id);

                    var thumbnailurl = Context.User.GetAvatarUrl();
                    var auth         = new EmbedAuthorBuilder()
                    {
                        Name    = "Success!",
                        IconUrl = thumbnailurl,
                    };
                    var embed = new EmbedBuilder()
                    {
                        Author = auth
                    };
                    embed.WithColor(0, 255, 0);
                    embed.WithThumbnailUrl("https://i.imgur.com/Sc4HGir.gif");
                    embed.WithDescription(
                        $":poultry_leg:  **|**  **{Context.User.Username}**, you fill {Global.EChomusuke} {chom.Name}'s bowl with food. It looks happy! **(+{hungerGain} food [-{cost} {Global.ETaiyaki}])**");
                    await SendMessage(Context, embed.Build());
                }
            }
        }