Beispiel #1
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());
            }
        }
Beispiel #2
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);
                }
            }
        }
Beispiel #3
0
 protected override void Act(IActionHost host)
 {
     host.DrawCards(1);
     host.AddActions(1);
     host.AddBuys(1);
     host.AddCoins(1);
 }
Beispiel #4
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))
                          );
 }
Beispiel #5
0
        protected override async Task ActAsync(IActionHost host)
        {
            host.DrawCards(1);
            host.AddActions(1);

            await host.Attack(target => target.Gain("Curse"));
        }
Beispiel #6
0
 protected override void Act(IActionHost host)
 {
     host.DrawCards(2);
     if (host.Count(Zone.Hand) <= 5)
     {
         host.AddActions(2);
     }
 }
Beispiel #7
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);
        }
Beispiel #8
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);
        }
Beispiel #9
0
        protected override void Act(IActionHost host)
        {
            host.AddCoins(2);

            if (host.ActionCount >= 3)
            {
                host.DrawCards(1);
                host.AddActions(1);
            }
        }
Beispiel #10
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);
            }
        }
Beispiel #11
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);
            }
        }
Beispiel #12
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);
            }
        }
Beispiel #13
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);
            }
        }
Beispiel #14
0
        protected override async Task ActAsync(IActionHost host)
        {
            host.AddActions(2);

            var gained = await host.SelectCards(
                "Choose a card to gain, or none.",
                Zone.SupplyAvailable,
                card => card.Types.Contains(CardType.Action) && card.GetCost(host).LessThan(6),
                0, 1
                );

            await host.Gain(gained);
        }
Beispiel #15
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));
            }
        }
Beispiel #16
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);
            }
        }
Beispiel #17
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();
            }
        }
Beispiel #18
0
        protected override async Task ActAsync(IActionHost host)
        {
            host.AddActions(1);

            await host.ChooseOne("Lurker",
                                 new NamedOption("Trash an Action card from the Supply", async() =>
            {
                var trashed = await host.SelectCard("Choose a card to trash.", Zone.SupplyAvailable, cards => cards.OfType <IActionCard>());
                host.Trash(trashed, Zone.SupplyAvailable);
            }),
                                 new NamedOption("Gain an Action card from the Trash", async() =>
            {
                var gained = await host.SelectCard("Choose a card to gain.", Zone.Trash, cards => cards.OfType <IActionCard>());
                await host.GainFrom(gained, Zone.Trash);
            })
                                 );
        }
Beispiel #19
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));
            }
        }
Beispiel #20
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);
                });
            })
                                 );
        }
Beispiel #21
0
        protected override async Task ActAsync(IActionHost host)
        {
            host.AddActions(2);

            var cards = host.Examine(Zone.PlayerMat("NativeVillageMat"));

            await host.ChooseOne("Native Village",
                                 new NamedOption("Add card to mat.", () =>
            {
                var topDeck = host.Examine(Zone.DeckTop(1));
                host.PutOnMat("NativeVillageMat", topDeck, Zone.Deck);
            }),
                                 new NamedOption($"Retrieve all cards ({(cards.Any() ? cards.Length.ToString() : "none")}).", () =>
            {
                host.PutIntoHand(Zone.PlayerMat("NativeVillageMat"));
            })
                                 );
        }
Beispiel #22
0
        protected override async Task ActAsync(IActionHost host)
        {
            host.AddActions(1);

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

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

                var discarded = await host.SelectCard("Choose a card to discard.", Zone.DeckTop(2));

                if (discarded != null)
                {
                    host.Discard(discarded, Zone.Deck);
                }
            }
        }
Beispiel #23
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);
            }
        }
Beispiel #24
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);
        }
Beispiel #25
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);
                }
            }
        }
Beispiel #26
0
        protected override async Task ActAsync(IActionHost host)
        {
            host.DrawCards(1);
            host.AddActions(1);
            host.AddCoins(1);

            var emptyPiles = host.Count(Zone.SupplyEmpty);
            var handSize   = host.Count(Zone.Hand);
            var toDiscard  = Math.Min(emptyPiles, handSize);

            if (toDiscard > 0)
            {
                var discarded = await host.SelectCards(
                    toDiscard == 1? "Choose a card to discard." : $"Choose {toDiscard} cards to discard.",
                    toDiscard,
                    toDiscard
                    );

                host.Discard(discarded);
            }
        }
Beispiel #27
0
        protected override async Task ActAsync(IActionHost host)
        {
            host.AddActions(1);

            var top4            = host.Reveal(Zone.DeckTop(4));
            var victoryCards    = top4.Where(c => c.Types.Contains(CardType.Victory)).ToArray();
            var nonVictoryCards = top4.Where(c => !c.Types.Contains(CardType.Victory)).ToArray();

            if (victoryCards.Any())
            {
                host.PutIntoHand(victoryCards, Zone.Deck);
            }

            if (nonVictoryCards.Count() > 1)
            {
                var zone           = Zone.DeckTop(nonVictoryCards.Count());
                var reorderedCards = await host.OrderCards("Put these cards back in any order.", zone);

                host.Reorder(reorderedCards, zone);
            }
        }
Beispiel #28
0
 protected override async Task ActAsync(IActionHost host)
 {
     await host.OnePlayer(host.GetPlayerToLeft(), target =>
     {
         foreach (var card in target.Examine(Zone.DeckTop(2)))
         {
             target.Discard(card, Zone.Deck);
             if (card.Types.Contains(CardType.Action))
             {
                 host.AddActions(2);
             }
             if (card.Types.Contains(CardType.Treasure))
             {
                 host.AddCoins(2);
             }
             if (card.Types.Contains(CardType.Victory))
             {
                 host.DrawCards(2);
             }
         }
     });
 }
Beispiel #29
0
 protected override void Act(IActionHost host)
 {
     host.AddActions(1);
     host.AddCoins(1);
 }
Beispiel #30
0
 protected override void OnBeginTurn(IActionHost host)
 {
     host.DrawCards(5);
     host.AddActions(1);
     host.AddBuys(1);
 }