예제 #1
0
        protected override async Task ActAsync(IActionHost host)
        {
            var matted = await host.SelectCard("Choose an additional card to put on your Island mat.");

            host.PutOnMat("IslandMat", "Island", Zone.InPlay);
            host.PutOnMat("IslandMat", matted, Zone.Hand);
        }
예제 #2
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"));
            })
                                 );
        }
예제 #3
0
        protected override async Task ActAsync(IActionHost host)
        {
            var tokens = host.Count(Zone.PlayerMat("PirateShipMat"));

            await host.ChooseOne("Pirate Ship",
                                 new NamedOption($"<sym>+coin1</sym><run>per Coin token (+${tokens}).</run>", () =>
            {
                host.AddCoins(tokens);
            }),
                                 new NamedOption("Raid for Treasures!", async() =>
            {
                var anyTrashes = false;
                await host.Attack(async target =>
                {
                    var top2 = target.Reveal(Zone.DeckTop(2));
                    var top2Treasures = top2.OfType <ITreasureCard>();
                    if (top2Treasures.Count() == 1)
                    {
                        target.Trash(top2Treasures.Single(), Zone.Deck);
                        anyTrashes = true;
                    }
                    else if (top2Treasures.Count() == 2)
                    {
                        var trashed = await host.SelectCard($"Choose a Treasure for {target.Player} to trash.", top2Treasures);
                        target.Trash(trashed, Zone.Deck);
                        anyTrashes = true;
                    }
                    target.Discard(top2.Without(top2Treasures).ToArray(), Zone.Deck);
                });

                if (anyTrashes)
                {
                    host.PutOnMat("PirateShipMat", "Coin", Zone.Create);
                }
            })
                                 );
        }
예제 #4
0
 public static void PutOnMat(this IActionHost host, string mat, ICard card, Zone from)
 {
     host.PutOnMat(mat, new[] { card.Name }, from);
 }
예제 #5
0
 public static void PutOnMat(this IActionHost host, string mat, ICard[] cards, Zone from)
 {
     host.PutOnMat(mat, cards.Names(), from);
 }