Example #1
0
        public static IActivity GainAnActionCardCostingUpToX(IGameLog log, Player player, int cost, ICard source, bool optional)
        {
            var activity = new SelectPileActivity(log, player, string.Format("Select an action card to gain of cost {0} or less.", cost),
                                                  SelectionSpecifications.SelectPileCostingUpToX(cost), source)
            {
                AfterPileSelected = pile =>
                {
                    var card = pile.TopCard;
                    card.MoveTo(player.Discards);
                    log.LogGain(player, card);
                },
                Hint = ActivityHint.GainCards
            };

            activity.Specification.CardTypeRestriction = typeof(IActionCard);
            activity.IsOptional = optional;

            return(activity);
        }
Example #2
0
        public static IActivity GainAnActionCardCostingUpToX(IGameLog log, Player player, int cost, ICard source, bool optional)
        {
            var activity = new SelectPileActivity(log, player, string.Format("Select an action card to gain of cost {0} or less.", cost),
                              SelectionSpecifications.SelectPileCostingUpToX(cost), source)
            {
                AfterPileSelected = pile =>
                {
                    var card = pile.TopCard;
                    card.MoveTo(player.Discards);
                    log.LogGain(player, card);
                },
                Hint = ActivityHint.GainCards
            };

            activity.Specification.CardTypeRestriction = typeof (IActionCard);
            activity.IsOptional = optional;

            return activity;
        }