Exemplo n.º 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);
        }
Exemplo n.º 2
0
 public static GainACardActivity GainACardCostingUpToX(IGameLog log, Player player, CardCost cost, CardZone destination, ICard source)
 {
     return(new GainACardActivity(log, player, string.Format("Select a card to gain of cost {0} or less.", cost),
                                  SelectionSpecifications.SelectPileCostingUpToX(cost), destination, source));
 }