Exemple #1
0
        private void toolStripMenuItem5_Click(object sender, EventArgs e)
        {
            DeckList sendToGen = (DeckList)decklist.Clone();

            if (sendToGen == decklist)
            {
                printToScriptLog("HEY...");
                return;
            }
            List <Card> basics;

            foreach (Card c in sendToGen.Values.ToList())
            {
                if (typeof(Basics).GetEnumNames().Contains <string>(c.cardName))
                {
                    sendToGen.Remove(c.cardQty.ToString() + "x " + c.cardName);
                    basics = cdb.RandomBasics(c.cardName, Series.FULLART, c.cardQty);
                    foreach (Card basic in basics)
                    {
                        if (sendToGen.ContainsKey(basic.cardName))
                        {
                            sendToGen[basic.cardName].cardQty += basic.cardQty;
                        }
                        else
                        {
                            sendToGen.Add(basic.cardName, basic);
                        }
                    }
                }
            }
            Generate(sendToGen);
        }