Ejemplo n.º 1
0
 protected override void Act(IActionHost host)
 {
     host.DrawCards(1);
     host.AddActions(1);
     host.AddBuys(1);
     host.AddCoins(1);
 }
Ejemplo n.º 2
0
 protected override async Task ActAsync(IActionHost host)
 {
     await host.ChooseOne("Nobles",
                          new NamedOption("+3 Cards", () => host.DrawCards(3)),
                          new NamedOption("+2 Actions", () => host.AddActions(2))
                          );
 }
Ejemplo n.º 3
0
        protected override async Task ActAsync(IActionHost host)
        {
            host.DrawCards(4);
            host.AddBuys(1);

            await host.OtherPlayers(target => target.DrawCards(1));
        }
Ejemplo n.º 4
0
        protected override async Task ReactAsync(IActionHost host)
        {
            host.DrawCards(2);
            var discarded = await host.SelectCards("Choose cards to discard.", Zone.Hand, 3, 3);

            host.Discard(discarded);
        }
Ejemplo n.º 5
0
        protected override async Task ActAsync(IActionHost host)
        {
            host.DrawCards(2);
            host.AddActions(1);

            var inserted = await host.SelectCard("Choose a card to put in your deck.", Zone.Hand);

            var deckSize = host.Count(Zone.Deck);

            if (deckSize == 0)
            {
                host.PutOnDeck(inserted);
            }
            else
            {
                var options = Enumerable.Range(0, deckSize + 1).Select(i =>
                {
                    var label =
                        i == 0 ? "Top" :
                        i == deckSize ? "Bottom" :
                        i.ToString();
                    return(new NamedOption(label, () => host.InsertIntoDeck(inserted.Name, i)));
                });
                await host.ChooseOne($"Choose where to put {inserted.Name}.", options.ToArray());
            }
        }
Ejemplo n.º 6
0
        protected override async Task ActAsync(IActionHost host)
        {
            var setAside = new List <string>();

            while (host.Count(Zone.Hand) < 7)
            {
                var drawn = host.DrawCards(1).SingleOrDefault();
                if (drawn == null)
                {
                    break;                // no cards left in deck or discard
                }
                if (drawn.Types.Contains(CardType.Action))
                {
                    var shouldSkip = await host.YesNo("Library", $@"<spans>
                        <run>Skip drawing</run>
                        <card>{drawn.Name}</card>
                        <run>and put it into your discard pile?</run>
                    </spans>");

                    if (shouldSkip)
                    {
                        setAside.Add(drawn.Name);
                    }
                }
            }

            if (setAside.Any())
            {
                host.Discard(setAside.ToArray());
            }
        }
Ejemplo n.º 7
0
        protected override async Task ActAsync(IActionHost host)
        {
            host.DrawCards(1);
            host.AddActions(1);

            await host.Attack(target => target.Gain("Curse"));
        }
Ejemplo n.º 8
0
        protected override async Task ActAsync(IActionHost host)
        {
            host.DrawCards(1);
            host.AddActions(1);

            var handSize = host.Count(Zone.Hand);

            if (handSize >= 2 && await host.YesNo("Mill", "<run>Discard 2 cards for</run><sym>+coin2?</sym>"))
            {
                if (handSize > 2)
                {
                    var discarded = await host.SelectCards("Choose cards to discard.", 2, 2);

                    host.Discard(discarded);
                }
                else
                {
                    host.Discard(Zone.Hand);
                }

                if (handSize > 1)
                {
                    host.AddCoins(2);
                }
            }
        }
Ejemplo n.º 9
0
 protected override void Act(IActionHost host)
 {
     host.DrawCards(2);
     if (host.Count(Zone.Hand) <= 5)
     {
         host.AddActions(2);
     }
 }
Ejemplo n.º 10
0
        protected override async Task ActAsync(IActionHost host)
        {
            host.AddActions(1);
            var discarded = await host.SelectCards("Choose any number of cards to discard.");

            host.Discard(discarded);
            host.DrawCards(discarded.Length);
        }
Ejemplo n.º 11
0
        protected override async Task ActAsync(IActionHost host)
        {
            host.DrawCards(3);

            var put = await host.SelectCard("Choose a card to put onto your deck.");

            host.PutOnDeck(put);
        }
Ejemplo n.º 12
0
 protected override async Task ActAsync(IActionHost host)
 {
     await host.ChooseMultiple("Pawn", 2,
                               new NamedOption("<bold>+1 Card</bold>", () => host.DrawCards(1)),
                               new NamedOption("<bold>+1 Action</bold>", () => host.AddActions(1)),
                               new NamedOption("<bold>+1 Buy</bold>", () => host.AddBuys(1)),
                               new NamedOption("<bold><sym>+coin1</sym></bold>", () => host.AddCoins(1))
                               );
 }
Ejemplo n.º 13
0
        protected override async Task ActAsync(IActionHost host)
        {
            host.DrawCards(3);
            host.AddActions(1);

            var discarded = await host.SelectCards("Choose cards to discard.", 3, 3);

            host.Discard(discarded);
        }
Ejemplo n.º 14
0
        protected override void Act(IActionHost host)
        {
            host.AddCoins(2);

            if (host.ActionCount >= 3)
            {
                host.DrawCards(1);
                host.AddActions(1);
            }
        }
Ejemplo n.º 15
0
        protected override async Task ReactAsync(IActionHost host)
        {
            host.DrawCards(2);
            var put = await host.SelectCards("Choose cards to put back.", Zone.Hand, 2, 2);

            host.PutOnDeck(put);
            var ordered = await host.OrderCards("Choose the order of the cards put back.", Zone.DeckTop(2));

            host.Reorder(ordered, Zone.Deck);
        }
Ejemplo n.º 16
0
        protected override void Act(IActionHost host)
        {
            host.AddActions(2);

            var hand = host.Reveal(Zone.Hand);

            if (!hand.Any(card => card.Types.Contains(CardType.Action)))
            {
                host.DrawCards(2);
            }
        }
Ejemplo n.º 17
0
        protected override async Task ActAsync(IActionHost host)
        {
            host.DrawCards(1);
            host.AddActions(2);

            if (await host.YesNo("Mining Village", "<run>Trash</run><card>MiningVillage</card><run>for</run><sym>+coin2?</sym>"))
            {
                host.Trash("MiningVillage", Zone.InPlay);
                host.AddCoins(2);
            }
        }
Ejemplo n.º 18
0
        protected override async Task ActAsync(IActionHost host)
        {
            host.DrawCards(1);
            host.AddActions(1);

            var selected = await host.SelectCards("Choose up to one card from your discard pile.", Zone.Discard, 0, 1);

            if (selected.Any())
            {
                host.PutOnDeck(selected.Single(), Zone.Discard);
            }
        }
Ejemplo n.º 19
0
        protected override async Task ActAsync(IActionHost host)
        {
            host.DrawCards(1);
            host.AddActions(1);

            var bottomCard = host.Examine(Zone.DeckBottom).SingleOrDefault();

            if (bottomCard != null && await host.YesNo("Pearl Diver", $"<run>Put</run><card>{bottomCard.Name}</card><run>on top of your deck?</run>"))
            {
                host.PutOnDeck(bottomCard, Zone.DeckBottom);
            }
        }
Ejemplo n.º 20
0
 protected override async Task ActAsync(IActionHost host)
 {
     host.DrawCards(2);
     await host.Attack(target => target.Count(Zone.Hand) >= 4, async target =>
     {
         while (target.Count(Zone.Hand) > 3)
         {
             var put = await target.SelectCard("Choose a card to put onto your deck");
             target.PutOnDeck(put);
         }
     });
 }
Ejemplo n.º 21
0
        protected override async Task ActAsync(IActionHost host)
        {
            host.AddActions(1);

            var trashed = await host.SelectCard("Choose a card to trash.");

            if (trashed != null)
            {
                var cost = trashed.GetCost(host);
                host.Trash(trashed);

                host.DrawCards(cost.Coins + (cost.Potion ? 2 : 0));
            }
        }
Ejemplo n.º 22
0
        protected override async Task ActAsync(IActionHost host)
        {
            host.DrawCards(1);
            host.AddActions(1);

            var setAside = await host.SelectCard("Choose a card to set aside.");

            if (setAside != null)
            {
                host.Attach(setAside, Zone.Hand);
            }
            else
            {
                host.CompleteDuration();
            }
        }
Ejemplo n.º 23
0
        protected override async Task ActAsync(IActionHost host)
        {
            host.DrawCards(1);
            host.AddActions(1);

            var named = await host.SelectCard("Name a card.", Zone.SupplyAll);

            host.Name(named);

            var top1 = host.Reveal(Zone.DeckTop(1));

            if (named.Equals(top1.SingleOrDefault()))
            {
                host.PutIntoHand(named, Zone.Deck);
            }
        }
Ejemplo n.º 24
0
        protected override async Task ActAsync(IActionHost host)
        {
            host.DrawCards(1);
            host.AddActions(1);

            var top4     = host.Reveal(Zone.DeckTop(4));
            var drawn    = top4.Where(card => card.Name == "Copper" || card.Name == "Potion").ToArray();
            var notDrawn = top4.Without(drawn).ToArray();

            host.PutIntoHand(drawn, Zone.Deck);

            if (notDrawn.Length > 1)
            {
                var reordered = await host.OrderCards("Put these cards back in any order.", notDrawn);

                host.Reorder(reordered, Zone.DeckTop(notDrawn.Length));
            }
        }
Ejemplo n.º 25
0
        protected override async Task ActAsync(IActionHost host)
        {
            host.AddActions(1);

            await host.ChooseOne("Minion",
                                 new NamedOption("<sym>+coin2</sym>", () => host.AddCoins(2)),
                                 new NamedOption("<run>More</run><card suffix='s!'>Minion</card>", async() =>
            {
                host.Discard(Zone.Hand);
                host.DrawCards(4);
                await host.Attack(target => target.Count(Zone.Hand) >= 5, target =>
                {
                    target.Discard(Zone.Hand);
                    target.DrawCards(4);
                });
            })
                                 );
        }
Ejemplo n.º 26
0
        protected override async Task ActAsync(IActionHost host)
        {
            var gained = await host.SelectCard("Choose a card to gain.", Zone.SupplyAvailable, card => card.GetCost(host).LessThanOrEqual(4));

            await host.Gain(gained);

            if (gained is IActionCard)
            {
                host.AddActions(1);
            }
            if (gained is ITreasureCard)
            {
                host.AddCoins(1);
            }
            if (gained is IVictoryCard)
            {
                host.DrawCards(1);
            }
        }
Ejemplo n.º 27
0
 protected override async Task ActAsync(IActionHost host)
 {
     await host.ChooseOne("Steward",
                          new NamedOption("+2 Cards", () => host.DrawCards(2)),
                          new NamedOption("<sym>+coin2</sym>", () => host.AddCoins(2)),
                          new NamedOption("Trash 2 cards", async() =>
     {
         var handSize = host.Count(Zone.Hand);
         if (handSize > 2)
         {
             var trashed = await host.SelectCards("Choose cards to trash.", Zone.Hand, 2, 2);
             host.Trash(trashed);
         }
         else
         {
             host.Trash(Zone.Hand);
         }
     })
                          );
 }
Ejemplo n.º 28
0
        protected override async Task ActAsync(IActionHost host)
        {
            host.DrawCards(1);
            host.AddActions(1);

            await host.AllPlayers(async target =>
            {
                var revealed = target.Reveal(Zone.DeckTop(1)).SingleOrDefault();
                if (revealed != null)
                {
                    var subject = host == target ? "<run>Do you want</run>" : $"<run>Force</run><player>{target.Player}</player>";
                    if (await host.YesNo("Spy", $@"{subject}
                        <run>to discard</run>
                        <card suffix='?'>{revealed.Name}</card>"))
                    {
                        target.Discard(revealed, Zone.Deck);
                    }
                }
            }, isAttack : true);
        }
Ejemplo n.º 29
0
        protected override async Task ActAsync(IActionHost host)
        {
            host.DrawCards(1);
            host.AddActions(1);

            var trashed = await host.SelectCard("Choose a card to trash.", Zone.Hand);

            if (trashed != null)
            {
                host.Trash(trashed);

                var value  = trashed.GetCost(host).Plus(1);
                var gained = await host.SelectCard("Choose a card to gain.", Zone.SupplyAvailable, card => card.GetCost(host).Equals(value));

                if (gained != null)
                {
                    await host.Gain(gained);
                }
            }
        }
Ejemplo n.º 30
0
        protected override async Task ActAsync(IActionHost host)
        {
            host.DrawCards(3);

            var top4 = host.Reveal(Zone.DeckTop(4));
            var victoryOrCurseCards = top4.Where(card => card.Types.Contains(CardType.Victory) || card.Name == "Curse").ToArray();

            if (victoryOrCurseCards.Length > 0)
            {
                host.PutIntoHand(victoryOrCurseCards, Zone.Deck);

                if (victoryOrCurseCards.Length < 3)
                {
                    var zone           = Zone.DeckTop(4 - victoryOrCurseCards.Length);
                    var reorderedCards = await host.OrderCards("Put these cards back in any order.", zone);

                    host.Reorder(reorderedCards, zone);
                }
            }
        }