Пример #1
0
        public override void Run(BotMain bot, BotCommandController commandController, string[] rawTerms, string[] terms, string characterName, string channel, UserGeneratedCommand command)
        {
            MoveCards.Run(bot, commandController, rawTerms, terms, characterName, channel, command, CardMoveType.DiscardCard);

            //CardCommandOptions options = new CardCommandOptions(bot, commandController, rawTerms, terms, characterName, channel, command);
            //string deckTypeString = Utils.GetDeckTypeStringHidePlaying(options.deckType);
            //string cardDrawingCharacterString = Utils.GetCharacterStringFromSpecialName(options.characterDrawName);

            //int numberDiscards = 0;
            //string messageOutput = "[i]" + cardDrawingCharacterString + ": " + deckTypeString + "Card" + options.cardsS + " discarded:[/i] " + bot.DiceBot.DiscardCards(options.moveCardsList, options.all, channel, options.deckType, options.characterDrawName, out numberDiscards);
            //string trueDraw = "";
            //string privateMessageDraw = "";
            //if (options.redraw)
            //{
            //    messageOutput += "\n [i]Redrawn:[/i] " + bot.DiceBot.DrawCards(numberDiscards, false, true, channel, options.deckType, options.characterDrawName, options.secretDraw, out trueDraw);
            //    privateMessageDraw = "[i]Redrawn:[/i] " + trueDraw;
            //}

            //if (options.secretDraw && options.redraw && !(options.characterDrawName == DiceBot.DealerName || options.characterDrawName == DiceBot.BurnCardsName || options.characterDrawName == DiceBot.DiscardName))
            //{
            //    bot.SendPrivateMessage(privateMessageDraw, characterName);
            //}

            //if (options.secretDraw)
            //{
            //    string redrawSecretString = options.redraw ? " (and redrew)" : "";
            //    string newMessageOutput = "[i]" + cardDrawingCharacterString + ": " + deckTypeString + "Card" + options.cardsS + " discarded: (secret)" + redrawSecretString + "[/i] ";
            //    bot.SendMessageInChannel(newMessageOutput, channel);
            //}
            //else
            //{
            //    bot.SendMessageInChannel(messageOutput, channel);
            //}
        }
Пример #2
0
        public override void Run(BotMain bot, BotCommandController commandController, string[] rawTerms, string[] terms, string characterName, string channel, UserGeneratedCommand command)
        {
            MoveCards.Run(bot, commandController, rawTerms, terms, characterName, channel, command, CardMoveType.ToPlayFromDiscard);

            //bool all = false;
            //string characterDrawName = commandController.GetCharacterDrawNameFromCommandTerms(characterName, terms);
            //if (terms != null && terms.Length >= 1 && terms.Contains("all"))
            //    all = true;

            //List<int> drawsFromDiscardTemp = Utils.GetAllNumbersFromInputs(terms);
            //List<int> drawsFromDiscard = new List<int>();

            ////decrease all the numbers by 1 to match array indexes, rather than the card position for a player
            //if (drawsFromDiscardTemp.Count > 0)
            //{
            //    foreach (int i in drawsFromDiscardTemp)
            //    {
            //        drawsFromDiscard.Add(i - 1);
            //    }
            //}

            //string cardsS = drawsFromDiscard.Count > 1 ? "s" : "";

            //DeckType deckType = commandController.GetDeckTypeFromCommandTerms(terms);

            //string deckTypeString = Utils.GetDeckTypeStringHidePlaying(deckType);
            //string cardDrawingCharacterString = Utils.GetCharacterStringFromSpecialName(characterDrawName);

            //int movedCount = 0;
            //string messageOutput = "[i]" + cardDrawingCharacterString + ": " + deckTypeString + "Card" + cardsS + " played from discard:[/i] " + bot.DiceBot.PlayCardsFromDiscard(drawsFromDiscard, all, channel, deckType, characterDrawName, out movedCount);

            //bot.SendMessageInChannel(messageOutput, channel);
        }
Пример #3
0
        public override void Run(BotMain bot, BotCommandController commandController, string[] rawTerms, string[] terms, string characterName, string channel, UserGeneratedCommand command)
        {
            MoveCards.Run(bot, commandController, rawTerms, terms, characterName, channel, command, CardMoveType.ToDiscardFromPlay);

            //bool all = false;
            //bool redraw = false;
            //bool secretDraw = false;
            //string characterDrawName = commandController.GetCharacterDrawNameFromCommandTerms(characterName, terms);
            //if (characterDrawName == DiceBot.DiscardName)
            //    characterDrawName = characterName;

            //if (terms != null && terms.Length >= 1 && terms.Contains("all"))
            //    all = true;
            //if (terms != null && terms.Length >= 1 && terms.Contains("redraw"))
            //    redraw = true;
            //if (terms != null && terms.Length >= 1 && (terms.Contains("s") || terms.Contains("secret")))
            //    secretDraw = true;

            //List<int> discardsTemp = Utils.GetAllNumbersFromInputs(terms);
            //List<int> discards = new List<int>();

            ////decrease all the numbers by 1 to match array indexes, rather than the card position for a player
            //if (discardsTemp.Count > 0)
            //{
            //    foreach (int i in discardsTemp)
            //    {
            //        discards.Add(i - 1);
            //    }
            //}

            //string cardsS = "";
            //if (discards.Count > 1)
            //    cardsS = "s";

            //DeckType deckType = commandController.GetDeckTypeFromCommandTerms(terms);

            //string deckTypeString = Utils.GetDeckTypeStringHidePlaying(deckType);
            //string cardDrawingCharacterString = Utils.GetCharacterStringFromSpecialName(characterDrawName);

            //int numberDiscards = 0;
            //string messageOutput = "[i]" + cardDrawingCharacterString + ": " + deckTypeString + "Card" + cardsS + " discarded from play:[/i] " + bot.DiceBot.DiscardCardsFromPlay(discards, all, channel, deckType, characterDrawName, out numberDiscards);
            //if (redraw)
            //{
            //    string trueDraw = "";
            //    messageOutput += "\n [i]Redrawn:[/i] " + bot.DiceBot.DrawCards(numberDiscards, false, true, channel, deckType, characterDrawName, secretDraw, out trueDraw);
            //}

            //if (secretDraw && !(characterDrawName == DiceBot.DealerName || characterDrawName == DiceBot.BurnCardsName))
            //{
            //    bot.SendPrivateMessage(messageOutput, characterName);
            //}

            //if (secretDraw)
            //{
            //    string redrawSecretString = redraw ? " (and redrew)" : "";
            //    string newMessageOutput = "[i]" + cardDrawingCharacterString + ": " + deckTypeString + "Card" + cardsS + " discarded from play: (secret)" + redrawSecretString + "[/i] ";
            //    bot.SendMessageInChannel(newMessageOutput, channel);
            //}
            //else
            //{
            //    bot.SendMessageInChannel(messageOutput, channel);
            //}
        }