Пример #1
0
            private IActivity CreateChooseCardActivity(TurnContext context, RevealZone revealZone, Player player, ICard source)
            {
                var selectTreasure = new SelectFromRevealedCardsActivity(context.Game.Log, player, revealZone,
                                                                         string.Format("Select the card you do NOT want {0} to draw.", revealZone.Owner.Name), SelectionSpecifications.SelectExactlyXCards(1), source);

                selectTreasure.AfterCardsSelected = cards =>
                {
                    var discardingCard = cards.Single();
                    discardingCard.MoveTo(context.ActivePlayer.Discards);
                    revealZone.MoveAll(context.ActivePlayer.Hand);
                };

                return(selectTreasure);
            }
Пример #2
0
            private IActivity CreateChooseTreasureActivity(TurnContext context, RevealZone revealZone, ICard source)
            {
                var selectTreasure = new SelectFromRevealedCardsActivity(context.Game.Log, context.ActivePlayer, revealZone,
                                                                         "Select a treasure to trash (you will have the opportunity to gain it).", SelectionSpecifications.SelectExactlyXCards(1), source);

                selectTreasure.AfterCardsSelected = cards =>
                {
                    var trashedCard         = TrashAndDiscard(context, revealZone, cards.OfType <ITreasureCard>());
                    var gainOrTrashActivity = Activities.GainOpponentsCardChoice(context, trashedCard, revealZone.Owner, source);
                    _activities.Insert(0, gainOrTrashActivity);
                };

                return(selectTreasure);
            }
Пример #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);
            }