예제 #1
0
        public async Task CheckCard(SocketGuildUser target)
        {
            ContextIds idList = new ContextIds(Context);
            var        user   = UserHandler.GetUser(idList.UserId);
            var        other  = UserHandler.GetUser(target.Id);

            try
            {
                await UserHandler.OtherUserHasNoCards(idList, user, other);
            }
            catch (InvalidUserStateException)
            {
                return;
            }

            if (other.CombatID == -1)
            {
                foreach (BasicCard card in other.ActiveCards)
                {
                    await MessageHandler.SendEmbedMessage(idList, "", OsirisEmbedBuilder.CardList(card));
                }
            }
            else
            {
                foreach (BasicCard card in other.ActiveCards)
                {
                    await MessageHandler.SendEmbedMessage(idList, "", OsirisEmbedBuilder.PlayerTurnStatus(card, CombatHandler.GetInstance(user.CombatID).RoundNumber));
                }
            }
        }
예제 #2
0
        public async Task ListCards()
        {
            ContextIds idList = new ContextIds(Context);
            var        user   = UserHandler.GetUser(idList.UserId);

            foreach (BasicCard card in user.ActiveCards)
            {
                await MessageHandler.SendEmbedMessage(idList, "", OsirisEmbedBuilder.CardList(card));
            }
        }
예제 #3
0
        public async Task CheckCardInfo([Remainder] string str)
        {
            ContextIds idList = new ContextIds(Context);
            var        user   = UserHandler.GetUser(idList.UserId);

            var card = CardRegistration.RegisterCard(str);

            if (card.Hidden && !user.Celestial)
            {
                card = CardRegistration.RegisterCard("vrfamily");
            }

            await MessageHandler.SendEmbedMessage(idList, "", OsirisEmbedBuilder.CardList(card));
        }
예제 #4
0
        public async Task CheckCard()
        {
            ContextIds idList = new ContextIds(Context);
            var        user   = UserHandler.GetUser(idList.UserId);

            if (user.CombatID == -1)
            {
                foreach (BasicCard card in user.ActiveCards)
                {
                    await MessageHandler.SendEmbedMessage(idList, "", OsirisEmbedBuilder.CardList(card));
                }
            }
            else
            {
                foreach (BasicCard card in user.ActiveCards)
                {
                    await MessageHandler.SendEmbedMessage(idList, "", OsirisEmbedBuilder.PlayerTurnStatus(card, CombatHandler.GetInstance(user.CombatID).RoundNumber));
                }
            }
        }