Example #1
0
        public override TaskState Process()
        {
            if (_opClass)
            {
                _cardClass = Controller.Opponent.HeroClass;
            }

            if (_useRandomCard)
            {
                IReadOnlyList <Card> randCards = RandomCardTask.GetCardList(Source, _cardType, _cardClass, rarity: _rarity);
                foreach (IPlayable p in IncludeTask.GetEntities(_type, Controller, Source, Target, Playables))
                {
                    Card pick = Util.Choose(randCards);

                    Generic.ChangeEntityBlock.Invoke(Controller, p, pick);

                    //TODO p[GameTag.DISPLAYED_CREATOR] = Source.Id;
                }

                return(TaskState.COMPLETE);
            }

            foreach (IPlayable p in IncludeTask.GetEntities(_type, Controller, Source, Target, Playables))
            {
                Generic.ChangeEntityBlock.Invoke(Controller, p, _card);

                // TODO p[GameTag.DISPLAYED_CREATOR] = Source.Id;
            }

            return(TaskState.COMPLETE);
        }
Example #2
0
        public override ISimpleTask Clone()
        {
            var clone = new RandomCardTask(Type, CardType, CardClass, CardSet, Opposite);

            clone.Copy(this);
            return(clone);
        }