Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
0
        public void Play(TurnContext context)
        {
            if(context.ActivePlayer.Hand.CardCount > 0)
            {
                var gainUtility = new GainUtility(context, context.ActivePlayer);

                var activity = Activities.SelectACardToTrash(context, context.ActivePlayer, this, card =>
                {
                    if (card is IActionCard) gainUtility.Gain<Duchy>();
                    if (card is ITreasureCard) gainUtility.Gain<Transmute>();
                    if (card is IVictoryCard) gainUtility.Gain<Gold>();
                });

                context.AddSingleActivity(activity, this);
            }
        }
Ejemplo n.º 3
0
        public void Play(TurnContext context)
        {
            var gainUtility = new GainUtility(context, context.ActivePlayer);
            Action gainSilver = () => gainUtility.Gain<Silver>(context.ActivePlayer.Hand);
            Action gainGold = () => gainUtility.Gain<Gold>(context.ActivePlayer.Hand);

            if (context.ActivePlayer.Hand.OfType<Province>().Any())
            {
                var activity = Activities.ChooseYesOrNo(
                    context.Game.Log,
                    context.ActivePlayer,
                    "Reveal a Province to gain a Gold?",
                    this,
                    gainGold,
                    gainSilver);
                context.AddSingleActivity(activity, this);
            }
            else
            {
                gainSilver();
            }
        }
Ejemplo n.º 4
0
 public void Play(TurnContext context)
 {
     context.DrawCards(3);
     if (context.ActivePlayer.Hand.CardCount > 0)
         context.AddSingleActivity(Activities.PutCardFromHandOnTopOfDeck(context, this), this);
 }
Ejemplo n.º 5
0
 public void Play(TurnContext context)
 {
     context.AddSingleActivity(
         Activities.GainACardCostingUpToX(context.Game.Log, context.ActivePlayer, 4, this), this);
 }
Ejemplo n.º 6
0
 public void Play(TurnContext context)
 {
     context.RemainingActions += 2;
     context.AddSingleActivity(
         Activities.GainAnActionCardCostingUpToX(context.Game.Log, context.ActivePlayer, 5, this, true), this);
 }
Ejemplo n.º 7
0
 public void Play(TurnContext context)
 {
     context.RemainingActions += 1;
     context.AddSingleActivity(Activities.DiscardCardsToDrawCards(context, this), this);
 }