Пример #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 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));
                }
            }
        }