コード例 #1
0
        private bool PickCardLogic(out ICollection <IBotTask> tasks)
        {
            tasks = new List <IBotTask>();
            if (LeaderBuffMode)
            {
                LeaderBuffMode = false;
                tasks.Add(new TooltipTask("Leader mode..."));
                foreach (var cardType in LeaderBuffList)
                {
                    if (Mulligan.Contain(cardType))
                    {
                        var zone = Mulligan.GetCard(cardType).Area;
                        tasks.Add(new TooltipTask("Buffing..."));
                        tasks.Add(new MouseMoveTask(zone));
                        tasks.Add(new LeftMouseClick());
                        tasks.Add(new SleepTask(1000));
                        return(true);
                    }
                }
            }
            else
            {
                foreach (var cardType in FromHighToLowStr)
                {
                    if (Mulligan.Contain(cardType))
                    {
                        if (GhoulMode || OzzrelMode)
                        {
                            GameMemory.DeleteFromGraveyard(cardType);
                        }
                        if (WeavessIncantationMode)
                        {
                            GameMemory.AddToGraveyard(cardType);
                        }

                        GhoulMode              = false;
                        OzzrelMode             = false;
                        WeavessIncantationMode = false;

                        var zone = Mulligan.GetCard(cardType).Area;
                        tasks.Add(new TooltipTask("Consuming..."));
                        tasks.Add(new MouseMoveTask(zone));
                        tasks.Add(new LeftMouseClick());
                        tasks.Add(new SleepTask(4000));
                        return(true);
                    }
                }
            }
            tasks.Add(new TooltipTask("Choosing random target..."));
            tasks.Add(new KeyboardTask(Messaging.VKeys.Left));
            tasks.Add(new KeyboardTask(Messaging.VKeys.Right));
            tasks.Add(new KeyboardTask(Messaging.VKeys.Enter));
            tasks.Add(new KeyboardTask(Messaging.VKeys.Enter));
            tasks.Add(new SleepTask(1000));
            return(true);
        }