示例#1
0
 /// <summary>
 /// If action you're choosing to take is to Attack with a Move
 /// </summary>
 /// <param name="action"></param>
 /// <param name="move"></param>
 /// <param name="target"></param>
 //ToDo: Attack.Move <= (Implicit/Explicit) => Battle.Move
 public Choice(ChoiceAction action, int moveIndex, Attack.Move move, int target = -1)
 {
     Action = action;
     Index  = moveIndex;
     Move   = null;           //(Move)move;
     Target = target;
 }
示例#2
0
 /// <summary>
 /// If action you're choosing to take is to Use an Item on a Pkmn
 /// </summary>
 /// <param name="action"></param>
 /// <param name="itemIndex"></param>
 /// <param name="pkmnTarget"></param>
 public Choice(ChoiceAction action, Items itemIndex, int pkmnTarget)
 {
     Action = action;
     Index  = (int)itemIndex;
     Target = pkmnTarget;
     Move   = null;
 }
示例#3
0
 /// <summary>
 /// If action you're choosing to take is to Attack with a Move
 /// </summary>
 /// <param name="action"></param>
 /// <param name="move"></param>
 /// <param name="target"></param>
 public Choice(ChoiceAction action, int moveIndex, Move move, int target = -1)
 {
     Action = action;
     Index  = moveIndex;
     Move   = move;
     Target = target;
 }
示例#4
0
    public override void SetNodeData(string nodeStr)
    {
        Regex r = new Regex(ChooseMessageData.strPattern);
        Match m = r.Match(nodeStr);

        if (m.Success)
        {
            belongingScene = m.Groups[1].ToString();
            selectedIndex  = int.Parse(m.Groups[2].ToString());
            identifier     = m.Groups[3].ToString();

            var choiceIndex = int.Parse(identifier.Substring(8, identifier.Length - 8));
            var choiceNode  = GameApp.Instance.choices[choiceIndex];

            var choiceArr = choiceNode["actions"].AsArray;
            actions               = new ChoiceAction[2];
            actions[0]            = new ChoiceAction();
            actions[0].choice     = choiceArr[0]["choice"];
            actions[0].identifier = choiceArr[0]["identifier"];

            actions[1]            = new ChoiceAction();
            actions[1].choice     = choiceArr[1]["choice"];
            actions[1].identifier = choiceArr[1]["identifier"];
        }
    }
示例#5
0
        public void OnSpeechRecognized(object sender, SpeechRecognizedEventArgs e)
        {
            if (e.Result.Confidence < 0.4)
            {
                Status = "";
                return;
            }

            // remove trigger
            string choice = e.Result.Text;

            if (!string.IsNullOrEmpty(ConfigurationManager.AppSettings["trigger"]))
            {
                choice = choice.Replace(ConfigurationManager.AppSettings["trigger"] + " ", "");
            }
            string       semanticKey  = e.Result.Semantics.ElementAt(0).Key;
            ChoiceAction choiceAction = choicesDictionary.FirstOrDefault(ca => ca.Key == semanticKey);

            if (choiceAction != null)
            {
                Status = choice;//string.Format("{0} ({1:P})", choice, e.Result.Confidence);
                if (choiceAction.Action != null)
                {
                    choiceAction.Action(e.Result.Semantics[semanticKey]);
                }
            }
        }
示例#6
0
 /// <summary>
 /// If action you're choosing to take is to Switch Pkmns
 /// </summary>
 /// <param name="action"></param>
 /// <param name="pkmnIndex"></param>
 public Choice(ChoiceAction action, int pkmnIndex)
 {
     Action = action;
     Index  = pkmnIndex;
     Target = -1;
     Move   = null;
 }
示例#7
0
 /// <summary>
 /// If action you're choosing to take is to Flee, Call Pokemon, or Nothing
 /// </summary>
 public Choice(ChoiceAction action = 0)
 {
     Action = action;
     Move   = null;
     Target = -1;
     Index  = 0;
 }
示例#8
0
        public string GetProbability(int selectionId, ChoiceAction choice, Heroine heroine)
        {
            var p = this.RouteProbabilities
                    .GetValueOrDefault((selectionId, choice))
                    ?.GetValueOrDefault(heroine);

            return($"{p:F1} %");
        }
示例#9
0
 public CutsceneChoiceState(BoardManager boardManager, ChoiceAction cs,
                            CinematicStatus duringbattle)
     : base(boardManager)
 {
     this.cutscene = cs;
     //csController = boardManager.ui.CSController;
     this.prevStatus = duringbattle;
 }
示例#10
0
 public CutsceneChoiceState(CutsceneController controller, ChoiceAction cs,
                            CinematicStatus duringbattle)
     : base(null)
 {
     this.cutscene    = cs;
     csController     = controller;
     this.prevStatus  = duringbattle;
     this.baseManager = null;
 }
示例#11
0
    public void InitDialogChoice(ChoiceAction action)
    {
        currAction = action;

        currSelection = 0;

        choiceOne[0].text = action.choices[0];
        choiceOne[1].text = action.choices[1];

        ToggleOn();

        ShiftSelection(0);
    }
示例#12
0
        public void CreateChoiceAction()
        {
            IAction      drawCard   = new DrawCardAction(CardType.PotLuck);
            IAction      payBank    = new PayAction(50, Recipient.Bank);
            ChoiceAction choiceCard = new ChoiceAction(drawCard, payBank);

            // correct IActions stored
            Assert.AreEqual(drawCard, choiceCard.GetChoice1());
            Assert.AreEqual(payBank, choiceCard.GetChoice2());

            // implements IAction
            Assert.IsTrue(choiceCard is IAction);
        }
示例#13
0
    public override CutSceneAction Copy()
    {
        ChoiceAction action = new ChoiceAction();

        action.dialog  = dialog;
        action.actorID = actorID;

        action.choices          = choices;
        action.missionFlagToSet = missionFlagToSet;
        action.nextCutscene     = nextCutscene;
        action.eventFlagMission = eventFlagMission;

        return(action);
    }
示例#14
0
        public async Task <JsonResult> GetTestAsync()
        {
            _client = new HttpClient();
            var reponse = await _client.GetAsync(_urLLuis + "il s'appelle franck");

            var result = await reponse.Content.ReadAsStringAsync();

            var          resultObject = JsonConvert.DeserializeObject <WebServices.Models.LuisResult>(result);
            ChoiceAction choiceAction = new ChoiceAction(GetJsonModels());

            choiceAction.Process(resultObject);
            return(new JsonResult()
            {
                Data = resultObject, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
示例#15
0
        public override TaskState Process()
        {
            ChoiceAction            choiceAction = ChoiceAction.ADAPT;
            IEnumerable <IPlayable> targets      = IncludeTask.GetEntities(Type, Controller, Source, Target, Playables);

            if (!targets.Any())
            {
                return(TaskState.STOP);
            }

            //var totAdaptCards = new List<Card>()
            //{
            //    Cards.FromId("UNG_999t2"),  // [UNG_999t2] Living Spores
            //    Cards.FromId("UNG_999t3"),  // [UNG_999t3] Flaming Claws
            //    Cards.FromId("UNG_999t4"),  // [UNG_999t4] Rocky Carapace
            //    Cards.FromId("UNG_999t5"),  // [UNG_999t5] Liquid Membrane
            //    Cards.FromId("UNG_999t6"),  // [UNG_999t6] Massive
            //    Cards.FromId("UNG_999t7"),  // [UNG_999t7] Lightning Speed
            //    Cards.FromId("UNG_999t8"),  // [UNG_999t8] Crackling Shield
            //    Cards.FromId("UNG_999t10"), // [UNG_999t10] Shrouding Mist
            //    Cards.FromId("UNG_999t13"), // [UNG_999t13] Poison Spit
            //    Cards.FromId("UNG_999t14"), // [UNG_999t14] Volcanic Might
            //};
            var totAdaptCards = new List <Card>(TotalAdaptCards);

            var resultCards = new List <Card>();

            while (resultCards.Count < 3)
            {
                Card adaptCard = Util.Choose <Card>(totAdaptCards);
                resultCards.Add(adaptCard);
                totAdaptCards.Remove(adaptCard);
            }

            bool success = Generic.CreateChoiceCards.Invoke(Controller, Source, targets, ChoiceType.GENERAL, choiceAction, resultCards.ToList(), null, null);

            if (!success)
            {
                return(TaskState.STOP);
            }
            return(TaskState.COMPLETE);
        }
示例#16
0
        private void ProcessSplit(List <Card>[] cardsToDiscover, ChoiceAction choiceAction)
        {
            int neutralCnt = cardsToDiscover[0].Count;
            int classCnt   = 0;
            var uniqueList = new List <Card>(cardsToDiscover[0]);

            if (cardsToDiscover.Length > 1)
            {
                classCnt = cardsToDiscover[1].Count;
                uniqueList.AddRange(cardsToDiscover[1]);
            }
            var combinations = Util.GetDiscoverSets(uniqueList).ToList();

            Game.Log(LogLevel.INFO, BlockType.PLAY, "DiscoverTask", !Game.Logging ? "" : $"... found {combinations.Count} discovery splits [class: {classCnt}, neutral: {neutralCnt}]");
            combinations.ForEach(p =>
            {
                Game cloneGame             = Game.Clone();
                Controller cloneController = cloneGame.ControllerById(Controller.Id);
                bool success = Generic.CreateChoiceCards.Invoke(cloneController, Source, null, ChoiceType.GENERAL, choiceAction, p.ToList(), null);
                cloneGame.TaskQueue.CurrentTask.State = TaskState.COMPLETE;
            });
        }
示例#17
0
        public override TaskState Process()
        {
            ChoiceAction choiceAction = ChoiceAction.INVALID;

            List <Card>[] cardsToDiscover = Discovery(DiscoverType, out choiceAction);

            var totcardsToDiscover = new List <Card>(cardsToDiscover[0]);

            if (cardsToDiscover.Length == 2)
            {
                totcardsToDiscover.AddRange(cardsToDiscover[1]);
                totcardsToDiscover.AddRange(cardsToDiscover[1]);
                totcardsToDiscover.AddRange(cardsToDiscover[1]);
                totcardsToDiscover.AddRange(cardsToDiscover[1]);
            }

            var resultCards = new List <Card>();

            // standard discover takes 3 random cards from a set of cards
            if (cardsToDiscover.Length < 3)
            {
                while (resultCards.Count < 3 && totcardsToDiscover.Count > 0)
                {
                    Card discoveredCard = Util.Choose(totcardsToDiscover);
                    resultCards.Add(discoveredCard);
                    // remove all cards matching the discovered one,
                    // need because class cards are duplicated 4 x times
                    // to have a balance to neutral cards
                    // http://hearthstone.gamepedia.com/Discover
                    if (DiscoverType == DiscoverType.TRACKING)
                    {
                        totcardsToDiscover.Remove(discoveredCard);
                    }
                    else
                    {
                        totcardsToDiscover.RemoveAll(p => p == discoveredCard);
                    }
                }
            }
            else
            {
                // tri-class discover takes one random card from each of the three sets
                foreach (List <Card> classDiscover in cardsToDiscover)
                {
                    resultCards.ForEach(p => classDiscover.Remove(p));
                    resultCards.Add(Util.Choose <Card>(classDiscover));
                }
            }

            // TODO work on it ...
            //if (Game.Splitting)
            //{
            //    ProcessSplit(cardsToDiscover, choiceAction);
            //}

            if (resultCards.Count == 0)
            {
                Game.Log(LogLevel.INFO, BlockType.PLAY, "DiscoverTask",
                         !Game.Logging ? "" : $"Found no potential cards to use for {DiscoverType}");
            }
            else
            {
                bool success = Generic.CreateChoiceCards.Invoke(Controller, Source, null, ChoiceType.GENERAL, choiceAction, resultCards, Enchantment);
            }

            return(TaskState.COMPLETE);
        }
示例#18
0
        private List <Card>[] Discovery(DiscoverType discoverType, out ChoiceAction choiceAction)
        {
            if (!CachedDiscoverySets.TryGetValue(discoverType, out Tuple <List <Card>[], ChoiceAction> result))
            {
                switch (discoverType)
                {
                case DiscoverType.DRUID_ROGUE_SHAMAN:
                {
                    choiceAction = ChoiceAction.HAND;
                    List <Card>[] listArray = GetTriClass(CardClass.DRUID, CardClass.ROGUE, CardClass.SHAMAN);
                    var           output    = new Tuple <List <Card>[], ChoiceAction>(listArray, choiceAction);
                    CachedDiscoverySets.TryAdd(discoverType, output);
                    return(listArray);
                }

                case DiscoverType.MAGE_PRIEST_WARLOCK:
                {
                    choiceAction = ChoiceAction.HAND;
                    List <Card>[] listArray = GetTriClass(CardClass.MAGE, CardClass.PRIEST, CardClass.WARLOCK);
                    var           output    = new Tuple <List <Card>[], ChoiceAction>(listArray, choiceAction);
                    CachedDiscoverySets.TryAdd(discoverType, output);
                    return(listArray);
                }


                case DiscoverType.HUNTER_PALADIN_WARRIOR:
                {
                    choiceAction = ChoiceAction.HAND;
                    List <Card>[] listArray = GetTriClass(CardClass.HUNTER, CardClass.PALADIN, CardClass.WARRIOR);
                    var           output    = new Tuple <List <Card>[], ChoiceAction>(listArray, choiceAction);
                    CachedDiscoverySets.TryAdd(discoverType, output);
                    return(listArray);
                }

                case DiscoverType.BASIC_HEROPOWERS:
                {
                    choiceAction = ChoiceAction.HEROPOWER;
                    List <Card>[] listArray = new[] { Cards.HeroCards().Where(p => p != Controller.Hero.Card).Select(p => Cards.FromAssetId(p[GameTag.HERO_POWER])).ToList() };
                    var           output    = new Tuple <List <Card>[], ChoiceAction>(listArray, choiceAction);
                    CachedDiscoverySets.TryAdd(discoverType, output);
                    return(listArray);
                }

                case DiscoverType.DRAGON:
                {
                    choiceAction = ChoiceAction.HAND;
                    List <Card>[] listArray = GetFilter(list => list.Where(p => p.Race == Race.DRAGON));
                    var           output    = new Tuple <List <Card>[], ChoiceAction>(listArray, choiceAction);
                    CachedDiscoverySets.TryAdd(discoverType, output);
                    return(listArray);
                }


                case DiscoverType.OVERLOAD:
                {
                    choiceAction = ChoiceAction.HAND;
                    IEnumerable <Card> cardSet   = Cards.FormatTypeCards(Game.FormatType);
                    List <Card>[]      listArray = new[] { cardSet.Where(p => p.HasOverload).ToList() };
                    var output = new Tuple <List <Card>[], ChoiceAction>(listArray, choiceAction);
                    CachedDiscoverySets.TryAdd(discoverType, output);
                    return(listArray);
                }


                case DiscoverType.TAUNT:
                {
                    choiceAction = ChoiceAction.HAND;
                    List <Card>[] listArray = GetFilter(list => list.Where(p => p[GameTag.TAUNT] == 1));
                    var           output    = new Tuple <List <Card>[], ChoiceAction>(listArray, choiceAction);
                    CachedDiscoverySets.TryAdd(discoverType, output);
                    return(listArray);
                }


                case DiscoverType.SECRET:
                {
                    choiceAction = ChoiceAction.HAND;
                    CardClass classForSecret =
                        Controller.BaseClass == CardClass.PALADIN ||
                        Controller.BaseClass == CardClass.MAGE ||
                        Controller.BaseClass == CardClass.HUNTER
                                                        ? Controller.BaseClass
                                                        : CardClass.PALADIN;
                    List <Card>[] listArray = GetClassCard(classForSecret, list => list.Where(p => p[GameTag.SECRET] == 1));
                    var           output    = new Tuple <List <Card>[], ChoiceAction>(listArray, choiceAction);
                    CachedDiscoverySets.TryAdd(discoverType, output);
                    return(listArray);
                }


                case DiscoverType.BEAST:
                {
                    choiceAction = ChoiceAction.HAND;
                    List <Card>[] listArray = GetFilter(list => list.Where(p => p.Race == Race.BEAST));
                    var           output    = new Tuple <List <Card>[], ChoiceAction>(listArray, choiceAction);
                    CachedDiscoverySets.TryAdd(discoverType, output);
                    return(listArray);
                }


                case DiscoverType.MURLOC:
                {
                    choiceAction = ChoiceAction.HAND;
                    List <Card>[] listArray = GetFilter(list => list.Where(p => p.Race == Race.MURLOC));
                    var           output    = new Tuple <List <Card>[], ChoiceAction>(listArray, choiceAction);
                    CachedDiscoverySets.TryAdd(discoverType, output);
                    return(listArray);
                }


                case DiscoverType.ELEMENTAL:
                {
                    choiceAction = ChoiceAction.HAND;
                    List <Card>[] listArray = GetFilter(list => list.Where(p => p.Race == Race.ELEMENTAL));
                    var           output    = new Tuple <List <Card>[], ChoiceAction>(listArray, choiceAction);
                    CachedDiscoverySets.TryAdd(discoverType, output);
                    return(listArray);
                }


                case DiscoverType.MECHANICAL:
                {
                    choiceAction = ChoiceAction.HAND;
                    List <Card>[] listArray = GetFilter(list => list.Where(p => p.Race == Race.MECHANICAL));
                    var           output    = new Tuple <List <Card>[], ChoiceAction>(listArray, choiceAction);
                    CachedDiscoverySets.TryAdd(discoverType, output);
                    return(listArray);
                }


                case DiscoverType.ALL:
                {
                    choiceAction = ChoiceAction.HAND;
                    List <Card>[] listArray = GetFilter(list => list.Where(p => p.Cost >= 0));
                    var           output    = new Tuple <List <Card>[], ChoiceAction>(listArray, choiceAction);
                    CachedDiscoverySets.TryAdd(discoverType, output);
                    return(listArray);
                }


                case DiscoverType.ARTIFACT:
                {
                    choiceAction = ChoiceAction.HAND;
                    List <Card>[] listArray = new[]
                    {
                        new List <Card>
                        {
                            Cards.FromId("LOEA16_3"),
                            Cards.FromId("LOEA16_4"),
                            Cards.FromId("LOEA16_5")
                        }
                    };
                    var output = new Tuple <List <Card>[], ChoiceAction>(listArray, choiceAction);
                    CachedDiscoverySets.TryAdd(discoverType, output);
                    return(listArray);
                }


                case DiscoverType.ELEMENTAL_INVOCATION:
                {
                    choiceAction = ChoiceAction.SPELL;
                    List <Card>[] listArray = new[]
                    {
                        new List <Card>
                        {
                            Cards.FromId("UNG_211a"),
                            Cards.FromId("UNG_211b"),
                            Cards.FromId("UNG_211c"),
                            Cards.FromId("UNG_211d")
                        }
                    };
                    var output = new Tuple <List <Card>[], ChoiceAction>(listArray, choiceAction);
                    CachedDiscoverySets.TryAdd(discoverType, output);
                    return(listArray);
                }


                case DiscoverType.TRACKING:
                {
                    choiceAction = ChoiceAction.TRACKING;
                    var cards = new List <Card>();
                    int n     = Controller.DeckZone.Count >= 3 ? 3 : Controller.DeckZone.Count;
                    for (int i = 0; i < n; i++)
                    {
                        IPlayable item = Controller.DeckZone[0];
                        Generic.RemoveFromZone(Controller, item);
                        Controller.SetasideZone.Add(item);
                        cards.Add(item.Card);
                    }
                    List <Card>[] listArray = new[] { cards };
                    return(listArray);
                }

                case DiscoverType.MINION:
                {
                    choiceAction = ChoiceAction.HAND;
                    List <Card>[] listArray = GetFilter(list => list.Where(p => p.Type == CardType.MINION));
                    var           output    = new Tuple <List <Card>[], ChoiceAction>(listArray, choiceAction);
                    CachedDiscoverySets.TryAdd(discoverType, output);
                    return(listArray);
                }


                case DiscoverType.DECK_MINION:
                {
                    choiceAction = ChoiceAction.HAND;
                    List <Card>[] listArray = new[] { Controller.DeckZone.Where(p => p is Minion).Select(p => p.Card).ToList() };
                    return(listArray);
                }


                case DiscoverType.DEATHRATTLE:
                {
                    choiceAction = ChoiceAction.HAND;
                    List <Card>[] listArray = GetFilter(list => list.Where(p => p[GameTag.DEATHRATTLE] == 1));
                    var           output    = new Tuple <List <Card>[], ChoiceAction>(listArray, choiceAction);
                    CachedDiscoverySets.TryAdd(discoverType, output);
                    return(listArray);
                }


                case DiscoverType.ONE_COST:
                {
                    choiceAction = ChoiceAction.HAND;
                    List <Card>[] listArray = GetFilter(list => list.Where(p => p.Cost == 1));
                    var           output    = new Tuple <List <Card>[], ChoiceAction>(listArray, choiceAction);
                    CachedDiscoverySets.TryAdd(discoverType, output);
                    return(listArray);
                }


                case DiscoverType.THREE_COST:
                {
                    choiceAction = ChoiceAction.HAND;
                    List <Card>[] listArray = GetFilter(list => list.Where(p => p.Cost == 3));
                    var           output    = new Tuple <List <Card>[], ChoiceAction>(listArray, choiceAction);
                    CachedDiscoverySets.TryAdd(discoverType, output);
                    return(listArray);
                }


                case DiscoverType.SPELL:
                {
                    choiceAction = ChoiceAction.HAND;
                    List <Card>[] listArray = GetFilter(list => list.Where(p => p.Type == CardType.SPELL));
                    var           output    = new Tuple <List <Card>[], ChoiceAction>(listArray, choiceAction);
                    CachedDiscoverySets.TryAdd(discoverType, output);
                    return(listArray);
                }


                case DiscoverType.OWN_SPELL:
                {
                    choiceAction = ChoiceAction.HAND;
                    List <Card>[] listArray = new[] { Controller.DeckZone.Where(p => p is Spell).Select(p => p.Card).ToList() };
                    return(listArray);
                }


                case DiscoverType.BASIC_TOTEM:
                {
                    choiceAction = ChoiceAction.SUMMON;
                    List <Card>[] listArray = new[]
                    {
                        new List <Card>
                        {
                            Cards.FromId("AT_132_SHAMANa"),
                            Cards.FromId("AT_132_SHAMANb"),
                            Cards.FromId("AT_132_SHAMANc"),
                            Cards.FromId("AT_132_SHAMANd")
                        }
                    };
                    var output = new Tuple <List <Card>[], ChoiceAction>(listArray, choiceAction);
                    CachedDiscoverySets.TryAdd(discoverType, output);
                    return(listArray);
                }


                case DiscoverType.COST_8_MORE_SUMMON:
                {
                    choiceAction = ChoiceAction.SUMMON;
                    List <Card>[] listArray = GetFilter(list => list.Where(p => p.Cost >= 8 && p.Type == CardType.MINION));
                    var           output    = new Tuple <List <Card>[], ChoiceAction>(listArray, choiceAction);
                    CachedDiscoverySets.TryAdd(discoverType, output);
                    return(listArray);
                }


                case DiscoverType.OP_DECK:
                {
                    choiceAction = ChoiceAction.HAND;
                    List <Card>[] listArray = new[] { Controller.Opponent.DeckZone.Select(p => p.Card).ToList() };
                    return(listArray);
                }


                case DiscoverType.OP_HERO:
                {
                    choiceAction = ChoiceAction.HAND;
                    List <Card>[] listArray = GetClassCard(Controller.Opponent.HeroClass, list => list);
                    var           output    = new Tuple <List <Card>[], ChoiceAction>(listArray, choiceAction);
                    CachedDiscoverySets.TryAdd(discoverType, output);
                    return(listArray);
                }


                case DiscoverType.DIED_THIS_GAME:
                {
                    choiceAction = ChoiceAction.SUMMON;
                    List <Card>[] listArray = new[] { Controller.GraveyardZone.Where(p => p.ToBeDestroyed && p.Card.Type == CardType.MINION).Select(p => p.Card).ToList() };
                    return(listArray);
                }


                default:
                    throw new ArgumentOutOfRangeException(nameof(discoverType), discoverType, null);
                }
            }
            else
            {
                choiceAction = result.Item2;
                return(result.Item1);
            }
        }
示例#19
0
        private List <Card>[] Discovery(DiscoverType discoverType, out ChoiceAction choiceAction)
        {
            switch (discoverType)
            {
            case DiscoverType.DRUID_ROGUE_SHAMAN:
                choiceAction = ChoiceAction.HAND;
                return(GetTriClass(CardClass.DRUID, CardClass.ROGUE, CardClass.SHAMAN));

            case DiscoverType.MAGE_PRIEST_WARLOCK:
                choiceAction = ChoiceAction.HAND;
                return(GetTriClass(CardClass.MAGE, CardClass.PRIEST, CardClass.WARLOCK));

            case DiscoverType.HUNTER_PALADIN_WARRIOR:
                choiceAction = ChoiceAction.HAND;
                return(GetTriClass(CardClass.HUNTER, CardClass.PALADIN, CardClass.WARRIOR));

            case DiscoverType.BASIC_HEROPOWERS:
                choiceAction = ChoiceAction.HEROPOWER;
                return(new[] { Cards.HeroCards().Where(p => p != Controller.Hero.Card).Select(p => Cards.FromAssetId(p[GameTag.HERO_POWER])).ToList() });

            case DiscoverType.DRAGON:
                choiceAction = ChoiceAction.HAND;
                return(GetFilter(list => list.Where(p => p.Race == Race.DRAGON)));

            case DiscoverType.OVERLOAD:
                choiceAction = ChoiceAction.HAND;
                var cardSet = Cards.FormatTypeCards(Game.FormatType);
                return(new[] { cardSet.Where(p => p.HasOverload).ToList() });

            case DiscoverType.TAUNT:
                choiceAction = ChoiceAction.HAND;
                return(GetFilter(list => list.Where(p => p[GameTag.TAUNT] == 1)));

            case DiscoverType.SECRET:
                choiceAction = ChoiceAction.HAND;
                var classForSecret =
                    Controller.HeroClass == CardClass.PALADIN ||
                    Controller.HeroClass == CardClass.MAGE ||
                    Controller.HeroClass == CardClass.HUNTER
                                                ? Controller.HeroClass
                                                : CardClass.PALADIN;
                return(GetClassCard(classForSecret, list => list.Where(p => p[GameTag.SECRET] == 1)));

            case DiscoverType.BEAST:
                choiceAction = ChoiceAction.HAND;
                return(GetFilter(list => list.Where(p => p.Race == Race.BEAST)));

            case DiscoverType.MURLOC:
                choiceAction = ChoiceAction.HAND;
                return(GetFilter(list => list.Where(p => p.Race == Race.MURLOC)));

            case DiscoverType.ELEMENTAL:
                choiceAction = ChoiceAction.HAND;
                return(GetFilter(list => list.Where(p => p.Race == Race.ELEMENTAL)));

            case DiscoverType.MECHANICAL:
                choiceAction = ChoiceAction.HAND;
                return(GetFilter(list => list.Where(p => p.Race == Race.MECHANICAL)));

            case DiscoverType.ALL:
                choiceAction = ChoiceAction.HAND;
                return(GetFilter(list => list.Where(p => p.Cost >= 0)));

            case DiscoverType.ARTIFACT:
                choiceAction = ChoiceAction.HAND;
                return(new[]
                {
                    new List <Card>
                    {
                        Cards.FromId("LOEA16_3"),
                        Cards.FromId("LOEA16_4"),
                        Cards.FromId("LOEA16_5")
                    }
                });

            case DiscoverType.ELEMENTAL_INVOCATION:
                choiceAction = ChoiceAction.HAND;
                return(new[]
                {
                    new List <Card>
                    {
                        Cards.FromId("UNG_211a"),
                        Cards.FromId("UNG_211b"),
                        Cards.FromId("UNG_211c"),
                        Cards.FromId("UNG_211d")
                    }
                });

            case DiscoverType.TRACKING:
                choiceAction = ChoiceAction.TRACKING;
                var cards = new List <Card>();
                Controller.DeckZone.GetAll.Take(3).ToList().ForEach(p =>
                {
                    Generic.RemoveFromZone(Controller, p);
                    Controller.SetasideZone.Add(p);
                    cards.Add(p.Card);
                });
                return(new[] { cards });

            case DiscoverType.MINION:
                choiceAction = ChoiceAction.HAND;
                return(GetFilter(list => list.Where(p => p.Type == CardType.MINION)));

            case DiscoverType.DEATHRATTLE:
                choiceAction = ChoiceAction.HAND;
                return(GetFilter(list => list.Where(p => p[GameTag.DEATHRATTLE] == 1)));

            case DiscoverType.ONE_COST:
                choiceAction = ChoiceAction.HAND;
                return(GetFilter(list => list.Where(p => p.Cost == 1)));

            case DiscoverType.THREE_COST:
                choiceAction = ChoiceAction.HAND;
                return(GetFilter(list => list.Where(p => p.Cost == 3)));

            case DiscoverType.SPELL:
                choiceAction = ChoiceAction.HAND;
                return(GetFilter(list => list.Where(p => p.Type == CardType.SPELL)));

            case DiscoverType.OWN_SPELL:
                choiceAction = ChoiceAction.HAND;
                return(new[] { Controller.DeckZone.Where(p => p is Spell).Select(p => p.Card).ToList() });

            case DiscoverType.BASIC_TOTEM:
                choiceAction = ChoiceAction.SUMMON;
                return(new[]
                {
                    new List <Card>
                    {
                        Cards.FromId("AT_132_SHAMANa"),
                        Cards.FromId("AT_132_SHAMANb"),
                        Cards.FromId("AT_132_SHAMANc"),
                        Cards.FromId("AT_132_SHAMANd")
                    }
                });

            case DiscoverType.COST_8_MORE_SUMMON:
                choiceAction = ChoiceAction.SUMMON;
                return(GetFilter(list => list.Where(p => p.Cost >= 8 && p.Type == CardType.MINION)));

            case DiscoverType.OP_DECK:
                choiceAction = ChoiceAction.HAND;
                return(new[] { Controller.Opponent.DeckZone.Select(p => p.Card).ToList() });

            case DiscoverType.OP_HERO:
                choiceAction = ChoiceAction.HAND;
                return(GetClassCard(Controller.Opponent.HeroClass, list => list));

            default:
                throw new ArgumentOutOfRangeException(nameof(discoverType), discoverType, null);
            }
        }
示例#20
0
 private void ProcessSplit(List <Card>[] cardsToDiscover, ChoiceAction choiceAction)
 {
 }