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)); } } }
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)); } }
public async Task Blind(SocketGuildChannel channel) { ContextIds idList = new ContextIds(Context); var user = UserHandler.GetUser(idList.UserId); idList.ChannelId = channel.Id; for (int i = 0; i < 10; i++) { await MessageHandler.SendEmbedMessage(idList, "", OsirisEmbedBuilder.Blinder()); } }
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)); }
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)); } } }
public async Task RoundUpdate() { ContextIds idList = new ContextIds(Context); var user = UserHandler.GetUser(Context.User.Id); //Tests each case to make sure all circumstances for the execution of this command are valid (character exists, in correct location) try { await UserHandler.UserNotInCombat(idList); } catch (InvalidUserStateException) { return; } var inst = CombatHandler.GetInstance(user.CombatID); var embeds = OsirisEmbedBuilder.RoundStart(inst); for (int i = 0; i < embeds.Count; i++) { await MessageHandler.SendEmbedMessage(inst.Location, "", embeds[i]); } }