Esempio n. 1
0
        public void Play(TurnContext context)
        {
            context.DrawCards(1);
            context.RemainingActions += 1;

            context.AddEffect(this, new ApothecaryEffect());
        }
Esempio n. 2
0
        public void Play(TurnContext context)
        {
            var gainUtil = new GainUtility(context, context.ActivePlayer);

            gainUtil.Gain <Silver>(card => context.ActivePlayer.Deck.MoveToTop(card));
            context.AddEffect(this, new BureaucratAttack());
        }
Esempio n. 3
0
            private IActivity CreateChooseActionActivity(TurnContext context, RevealZone revealZone, ICard source)
            {
                var selectTreasure = new SelectFromRevealedCardsActivity(context.Game.Log, context.ActivePlayer, revealZone,
                                                                         "Select the action to play first.", SelectionSpecifications.SelectExactlyXCards(1), source);

                selectTreasure.AfterCardsSelected = cards =>
                {
                    var first  = cards.OfType <IActionCard>().Single();
                    var second = revealZone.OfType <IActionCard>().Single(c => c != first);

                    // Reverse order because we're on a stack.
                    context.AddEffect(source, new PlayCardEffect(second));
                    context.AddEffect(source, new PlayCardEffect(first));
                };

                return(selectTreasure);
            }
Esempio n. 4
0
            private void ReturnCardsAndAttack(IEnumerable <ICard> selection, TurnContext context, string name)
            {
                var pile = context.Game.Bank.Piles.SingleOrDefault(p => p.Name == name);

                if (pile != null)
                {
                    foreach (var card in selection)
                    {
                        card.MoveTo(pile);
                    }

                    context.AddEffect(_source, new AmbassadorAttack(pile));
                }
            }
Esempio n. 5
0
        public static ISelectCardsActivity SelectActionToPlayMultipleTimes(TurnContext context, Player player, IGameLog log, ICard source, int count)
        {
            var activity = new SelectCardsActivity(
                log, player,
                string.Format("Select an action to play {0} times", count),
                SelectionSpecifications.SelectExactlyXCards(1), source);

            activity.Hint = ActivityHint.PlayCards;
            activity.Specification.CardTypeRestriction = typeof(IActionCard);
            activity.AfterCardsSelected = cards =>
            {
                var actionCard = cards.OfType <IActionCard>().Single();
                log.LogMessage("{0} selected {1} to be played {2} times.", player.Name, actionCard.Name, count);

                actionCard.MoveTo(context.ActivePlayer.PlayArea);

                count.Times(() => context.AddEffect(source, new PlayCardEffect(actionCard)));
            };

            return(activity);
        }
Esempio n. 6
0
 public void Play(TurnContext context)
 {
     context.DrawCards(3);
     context.AddEffect(this, new TorturerAttack());
 }
Esempio n. 7
0
 public void Play(TurnContext context)
 {
     context.AddEffect(this, new GolemEffect());
 }
Esempio n. 8
0
 public void Play(TurnContext context)
 {
     context.AddEffect(this, new RemodelEffect());
 }
Esempio n. 9
0
 public void Play(TurnContext context)
 {
     context.AddEffect(this, new SeaHagAttack());
 }
Esempio n. 10
0
        public static ISelectCardsActivity SelectActionToPlayMultipleTimes(TurnContext context, Player player, IGameLog log, ICard source, int count)
        {
            var activity = new SelectCardsActivity(
                log, player,
                string.Format("Select an action to play {0} times", count),
                SelectionSpecifications.SelectExactlyXCards(1), source);

            activity.Hint = ActivityHint.PlayCards;
            activity.Specification.CardTypeRestriction = typeof(IActionCard);
            activity.AfterCardsSelected = cards =>
            {
                var actionCard = cards.OfType<IActionCard>().Single();
                log.LogMessage("{0} selected {1} to be played {2} times.", player.Name, actionCard.Name, count);

                actionCard.MoveTo(context.ActivePlayer.PlayArea);

                count.Times(() => context.AddEffect(source, new PlayCardEffect(actionCard)));
            };

            return activity;
        }
Esempio n. 11
0
 public void Play(TurnContext context)
 {
     context.ActivePlayer.DrawCards(2);
     context.AddEffect(this, new GhostShipAttack());
 }
Esempio n. 12
0
 public void Play(TurnContext context)
 {
     context.Buys += 1;
     context.AddEffect(this, new SalvagerEffect());
 }
Esempio n. 13
0
 public void Play(TurnContext context)
 {
     context.DrawCards(2);
     context.AddEffect(this, new MasqueradeEffect());
 }
Esempio n. 14
0
 public void Play(TurnContext context)
 {
     context.DrawCards(1);
     context.RemainingActions += 1;
     context.AddEffect(this, new FamiliarAttack());
 }
Esempio n. 15
0
 public void Play(TurnContext context)
 {
     context.DrawCards(1);
     context.RemainingActions += 2;
     context.AddEffect(this, new MiningVillageEffect(this));
 }
Esempio n. 16
0
 public void Play(TurnContext context)
 {
     context.AvailableSpend += 2;
     context.AddEffect(this, new CutpurseAttack());
 }
Esempio n. 17
0
 public void Play(TurnContext context)
 {
     context.AddEffect(this, new ThroneRoomEffect());
 }
Esempio n. 18
0
 public void Play(TurnContext context)
 {
     context.RemainingActions += 1;
     context.DrawCards(3);
     context.AddEffect(this, new WarehouseEffect());
 }
Esempio n. 19
0
 public void Play(TurnContext context)
 {
     context.RemainingActions += 1;
     context.AddEffect(this, new ApprenticeEffect());
 }
Esempio n. 20
0
 public void Play(TurnContext context)
 {
     context.AddEffect(this, new BaronEffect());
     context.Buys += 1;
 }
Esempio n. 21
0
 public void Play(TurnContext context)
 {
     context.Trash(context.ActivePlayer, this);
     context.AddEffect(this, new FeastEffect());
 }
Esempio n. 22
0
 public void Play(TurnContext context)
 {
     context.AvailableSpend += 2;
     context.AddEffect(this, new SwindlerAttack());
 }
Esempio n. 23
0
        public void Play(TurnContext context)
        {
            var effect = new EnvoyEffect();

            context.AddEffect(this, effect);
        }
Esempio n. 24
0
 public void Play(TurnContext context)
 {
     context.AddEffect(this, new NoblesEffect());
 }
Esempio n. 25
0
 public void React(AttackEffect attackEffect, Player player, TurnContext currentTurn)
 {
     currentTurn.AddEffect(this, new SecretChamberReactionEffect(player));
     currentTurn.Game.Log.LogMessage("{0} revealed a Secret Chamber.", player);
 }
Esempio n. 26
0
 public void Play(TurnContext context)
 {
     context.AvailableSpend += 2;
     context.AddEffect(this, new ChancellorEffect());
 }
Esempio n. 27
0
 public void Play(TurnContext context)
 {
     context.AddEffect(this, new SecretChamberActionEffect());
 }
Esempio n. 28
0
 public void Play(TurnContext context)
 {
     context.AddEffect(this, new ForgeEffect());
 }
Esempio n. 29
0
 public void Play(TurnContext context)
 {
     context.AddEffect(this, new AmbassadorEffect(this));
 }
Esempio n. 30
0
 public void Play(TurnContext context)
 {
     context.AddEffect(this, new ExpandEffect());
 }
Esempio n. 31
0
 public void Play(TurnContext context)
 {
     context.AddEffect(this, new AdventurerEffect());
 }