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

            context.AddEffect(this, new ApothecaryEffect());
        }
Exemplo n.º 2
0
 public void Play(TurnContext context)
 {
     context.DrawCards(1);
     context.RemainingActions += 1;
     context.Buys             += 1;
     context.AvailableSpend   += 1;
 }
Exemplo n.º 3
0
        public void Play(TurnContext context)
        {
            var leftPlayer = context.Opponents.FirstOrDefault();

            if (leftPlayer != null)
            {
                var revealZone = new RevealZone(leftPlayer);
                leftPlayer.Deck.MoveTop(2, revealZone);
                revealZone.LogReveal(context.Game.Log);

                foreach (var card in revealZone.WithDistinctTypes())
                {
                    if (card is IActionCard)
                    {
                        context.RemainingActions += 2;
                    }
                    if (card is ITreasureCard)
                    {
                        context.AvailableSpend += 2;
                    }
                    if (card is IVictoryCard)
                    {
                        context.DrawCards(2);
                    }
                }

                revealZone.MoveAll(leftPlayer.Discards);
            }
        }
Exemplo n.º 4
0
        public void Play(TurnContext context)
        {
            context.RemainingActions += 1;
            context.DrawCards(1);

            context.AddLongLivedEffect(new CaravanEffect(this));
        }
Exemplo n.º 5
0
            public override void OnTurnStarting(TurnContext context)
            {
                base.OnTurnStarting(context);

                context.DrawCards(1);
                context.Game.Log.LogMessage("Caravan draws an extra card");
            }
Exemplo n.º 6
0
 public void Play(TurnContext context)
 {
     context.DrawCards(3);
     if (context.ActivePlayer.Hand.CardCount > 0)
     {
         context.AddSingleActivity(Activities.PutCardFromHandOnTopOfDeck(context, this), this);
     }
 }
Exemplo n.º 7
0
        public void Play(TurnContext context)
        {
            context.RemainingActions += 2;
            context.DrawCards(1);

            var emptyPileCount = context.Game.Bank.EmptyPileCount;

            if (emptyPileCount >= 1)
            {
                context.DrawCards(1);
            }

            if (emptyPileCount >= 2)
            {
                context.AvailableSpend += 1;
                context.Buys           += 1;
            }
        }
Exemplo n.º 8
0
            public override void OnTurnStarting(TurnContext context)
            {
                base.OnTurnStarting(context);

                context.DrawCards(5);
                context.RemainingActions += 1;
                context.Buys             += 1;
                context.Game.Log.LogMessage("Tactician gives {0} +5 cards, +1 action and +1 buy.", context.ActivePlayer.Name);
            }
Exemplo n.º 9
0
        public void Play(TurnContext context)
        {
            context.DrawCards(4);
            context.Buys += 1;

            foreach (var opponent in context.Opponents)
            {
                opponent.DrawCards(1);
            }
        }
Exemplo n.º 10
0
        public void Play(TurnContext context)
        {
            context.RemainingActions += 2;

            context.Game.Log.LogRevealHand(context.ActivePlayer);

            if (context.ActivePlayer.Hand.OfType <IActionCard>().Count() == 0)
            {
                context.DrawCards(2);
            }
        }
Exemplo n.º 11
0
        public static IActivity DiscardCardsToDrawCards(TurnContext context, ICard source)
        {
            var activity = new SelectCardsActivity(
                context,
                "Select any number of cards to discard, you will draw 1 new card for each discard.",
                SelectionSpecifications.SelectUpToXCards(context.ActivePlayer.Hand.CardCount), source);

            activity.AfterCardsSelected = cards =>
            {
                context.DiscardCards(activity.Player, cards);
                context.DrawCards(cards.Count());
            };

            return(activity);
        }
Exemplo n.º 12
0
            public override void Resolve(TurnContext context, ICard source)
            {
                Action discardAction = () =>
                {
                    context.DiscardCards(context.ActivePlayer, context.ActivePlayer.Hand);
                    context.DrawCards(4);
                    DistributeAttacks(context, source);
                };

                Action moneyAction = () => context.AvailableSpend += 2;

                var activity = Activities.ChooseYesOrNo(context.Game.Log, context.ActivePlayer, "Discard your hand?",
                                                        source, discardAction, moneyAction);

                _activities.Add(activity);
            }
Exemplo n.º 13
0
        public void Play(TurnContext context)
        {
            var activity = Activities.GainACardCostingUpToX(context.Game.Log, context.ActivePlayer, 4, this);

            activity.AfterCardGained = card =>
            {
                if (card is IActionCard)
                {
                    context.RemainingActions += 1;
                }
                if (card is ITreasureCard)
                {
                    context.AvailableSpend += 1;
                }
                if (card is IVictoryCard)
                {
                    context.DrawCards(1);
                }
            };

            context.AddSingleActivity(activity, this);
        }
Exemplo n.º 14
0
            public override void Resolve(TurnContext context, ICard source)
            {
                if (context.ActivePlayer.Hand.CardCount > 0)
                {
                    var activity = new SelectCardsActivity(context, "Select a card to trash",
                                                           SelectionSpecifications.SelectExactlyXCards(1), source);

                    activity.AfterCardsSelected = cardList =>
                    {
                        var cardToTrash = cardList.Single();
                        var cardsToDraw = cardToTrash.Cost.Money;

                        // Notice the card doesn't say its 2 per potion (if we add cards that cost multiple potions)
                        if (cardToTrash.Cost.Potions > 0)
                        {
                            cardsToDraw += 2;
                        }

                        context.DrawCards(cardsToDraw);
                        context.Trash(context.ActivePlayer, cardToTrash);
                    };
                    _activities.Add(activity);
                }
            }
Exemplo n.º 15
0
 public void Play(TurnContext context)
 {
     context.RemainingActions += 2;
     context.DrawCards(1);
     context.Buys += 1;
 }
Exemplo n.º 16
0
 public void Play(TurnContext context)
 {
     context.DrawCards(2);
     context.AddEffect(this, new WitchAttack());
 }
Exemplo n.º 17
0
 public void Play(TurnContext context)
 {
     context.RemainingActions += 1;
     context.DrawCards(2);
 }
Exemplo n.º 18
0
 public void Play(TurnContext context)
 {
     context.DrawCards(1);
     context.RemainingActions += 1;
     context.AddEffect(this, new FamiliarAttack());
 }
Exemplo n.º 19
0
 public void Play(TurnContext context)
 {
     context.DrawCards(2);
     context.AddEffect(this, new MasqueradeEffect());
 }
Exemplo n.º 20
0
 public void Play(TurnContext context)
 {
     context.DrawCards(3);
 }
Exemplo n.º 21
0
 public override void OnTurnStarting(TurnContext context)
 {
     base.OnTurnStarting(context);
     context.DrawCards(2);
     context.Buys += 1;
 }
Exemplo n.º 22
0
 public void Play(TurnContext context)
 {
     context.DrawCards(2);
     context.Buys += 1;
     context.AddLongLivedEffect(new WharfEffect(this));
 }
Exemplo n.º 23
0
 public void Play(TurnContext context)
 {
     context.RemainingActions += 1;
     context.DrawCards(3);
     context.AddEffect(this, new WarehouseEffect());
 }
Exemplo n.º 24
0
 public void Play(TurnContext context)
 {
     context.DrawCards(3);
     context.AddEffect(this, new TorturerAttack());
 }
Exemplo n.º 25
0
        public static IActivity DiscardCardsToDrawCards(TurnContext context, ICard source)
        {
            var activity = new SelectCardsActivity(
                   context,
                   "Select any number of cards to discard, you will draw 1 new card for each discard.",
                   SelectionSpecifications.SelectUpToXCards(context.ActivePlayer.Hand.CardCount), source);

            activity.AfterCardsSelected = cards =>
            {
                context.DiscardCards(activity.Player, cards);
                context.DrawCards(cards.Count());
            };

            return activity;
        }
Exemplo n.º 26
0
 public void Play(TurnContext context)
 {
     context.DrawCards(1);
     context.RemainingActions += 2;
     context.AddEffect(this, new MiningVillageEffect(this));
 }