Ejemplo n.º 1
0
        public async Task PetWake(PetGame pet, string args)
        {
            pet.UpdateStats(false);
            await ReplyAsync(pet.asleep? "🌅 You wake up your pet." : "🌅 Your pet is already awake.");

            if (pet.asleep)
            {
                pet.ToggleSleep();
            }
        }
Ejemplo n.º 2
0
        public async Task PetSleep(PetGame pet, string args)
        {
            pet.UpdateStats(store: false);
            if (pet.energy.Ceiling() == PetGame.MaxStat && !pet.asleep)
            {
                pet.happiness = Math.Max(0, pet.happiness - 1);
                Games.Save(pet);
                await ReplyAsync($"{CustomEmoji.Cross} Your pet is not tired! (-1 happiness)");
            }
            else
            {
                string message = pet.asleep ? "Your pet is already sleeping." : "Your pet is now asleep.";
                await ReplyAsync($"{Bot.Random.Choose(PetGame.SleepEmotes)} {message}");

                if (!pet.asleep)
                {
                    pet.ToggleSleep();
                }
            }
        }