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); }
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")); }) ); }
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); } }) ); }
public static void PutOnMat(this IActionHost host, string mat, ICard card, Zone from) { host.PutOnMat(mat, new[] { card.Name }, from); }
public static void PutOnMat(this IActionHost host, string mat, ICard[] cards, Zone from) { host.PutOnMat(mat, cards.Names(), from); }