Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
        private bool MulliganLogic(out ICollection <IBotTask> tasks)
        {
            tasks = new List <IBotTask>();

            #region Replace some pairs

            if (Mulligan.Count(typeof(WildHuntRider)) == 2)
            {
                var card = Mulligan.GetCard(typeof(WildHuntRider));
                return(AddMulliganTask(tasks, card, "Replace 2 riders"));
            }

            if (Mulligan.Count(typeof(Foglet)) == 2)
            {
                var card = Mulligan.GetCard(typeof(Foglet));
                return(AddMulliganTask(tasks, card, "Replace 2 foglets"));
            }

            if (Mulligan.Count(typeof(Werewolf)) == 2)
            {
                var card = Mulligan.GetCard(typeof(Werewolf));
                return(AddMulliganTask(tasks, card, "Replace 2 werewolfs"));
            }

            if (Mulligan.Count(typeof(CelaenoHarpy)) == 2)
            {
                var card = Mulligan.GetCard(typeof(CelaenoHarpy));
                return(AddMulliganTask(tasks, card, "Replace 2 celaeno"));
            }

            if (IsRound1())
            {
                if (Mulligan.Count(typeof(Nekker)) == 2)
                {
                    var card = Mulligan.GetCard(typeof(Nekker));
                    return(AddMulliganTask(tasks, card, "Replace 2 nekkers"));
                }
            }

            #endregion

            #region Already tried to thin foglet

            if (GameMemory.InGraveyard(typeof(Foglet)) &&
                Hand.Contain(typeof(Foglet)))
            {
                var card = Mulligan.GetCard(typeof(Foglet));
                return(AddMulliganTask(tasks, card, "Already tried to thin foglet"));
            }

            #endregion

            #region Replace ozzrel and ghouls

            if (IsRound1())
            {
                if (Mulligan.Contain(typeof(Ghoul)))
                {
                    var card = Mulligan.GetCard(typeof(Ghoul));
                    return(AddMulliganTask(tasks, card, "Don't need ghoul R1"));
                }

                if (Mulligan.Contain(typeof(Ozzrel)))
                {
                    var card = Mulligan.GetCard(typeof(Ozzrel));
                    return(AddMulliganTask(tasks, card, "Don't need ozzrel R1"));
                }
            }

            #endregion

            #region Replace weak card in R2+

            if (NotRound1())
            {
                if (Mulligan.Contain(typeof(Foglet)) &&
                    GameMemory.InGraveyard(typeof(Foglet)))
                {
                    var card = Mulligan.GetCard(typeof(Foglet));
                    return(AddMulliganTask(tasks, card, "Don't need Foglet in R2+"));
                }
                if (Mulligan.Contain(typeof(Plumard)))
                {
                    var card = Mulligan.GetCard(typeof(Plumard));
                    return(AddMulliganTask(tasks, card, "Don't need Plumard in R2+"));
                }
                if (Mulligan.Contain(typeof(Nekker)))
                {
                    var card = Mulligan.GetCard(typeof(Nekker));
                    return(AddMulliganTask(tasks, card, "Don't need Nekker in R2+"));
                }
                if (Mulligan.Contain(typeof(Wyvern)))
                {
                    var card = Mulligan.GetCard(typeof(Wyvern));
                    return(AddMulliganTask(tasks, card, "Don't need Wyvern in R2+"));
                }
                if (Mulligan.Contain(typeof(NekkerWarrior)))
                {
                    var card = Mulligan.GetCard(typeof(NekkerWarrior));
                    return(AddMulliganTask(tasks, card, "Don't need NekkerWarrior in R2+"));
                }
                if (Mulligan.Contain(typeof(Brewess)))
                {
                    var card = Mulligan.GetCard(typeof(Brewess));
                    return(AddMulliganTask(tasks, card, "Don't need Brewess in R2+"));
                }
            }

            #endregion

            tasks.Add(new FinishMulliganTask());
            return(false);
        }