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); }) ); }
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); } } }
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); } } }
protected override async Task ActAsync(IActionHost host) { host.DrawCards(2); var selections = new Dictionary <IActionHost, string>(); await host.AllPlayers(async player => { var selected = await player.SelectCard("Choose a card to pass to your left.", Zone.Hand); selections[player] = selected.Name; }); foreach (var kvp in selections) { kvp.Key.PassCard(kvp.Key.GetPlayerToLeft(), kvp.Value); } var trashed = await host.SelectCards("Choose up to one card to trash.", Zone.Hand, 0, 1); if (trashed.Any()) { host.Trash(trashed); } }
protected override async Task ActAsync(IActionHost host) { var modifiers = host.GetModifiers(); var trashedCard = await host.SelectCard( "Choose a Treasure to trash.", cards => cards.OfType <ITreasureCard>() ); if (trashedCard != null) { host.Trash(trashedCard); var gainedCard = await host.SelectCard( "Choose a Treasure to gain.", Zone.SupplyAvailable, cards => cards .OfType <ITreasureCard>() .Where(card => card.GetCost(modifiers).LessThanOrEqual(trashedCard.GetCost(modifiers).Plus(3))) ); await host.Gain(gainedCard.Name, Zone.Hand); } }
public static void Trash(this IActionHost host, string card) { host.Trash(new[] { card }, Zone.Hand); }
public static void Trash(this IActionHost host, ICard card, Zone from) { host.Trash(new[] { card.Name }, from); }
public static void Trash(this IActionHost host, ICard[] cards, Zone from) { host.Trash(cards.Names(), from); }
public static void Trash(this IActionHost host, string card, Zone from) { host.Trash(new[] { card }, from); }
public static void Trash(this IActionHost host, ICard card) { host.Trash(new[] { card.Name }, Zone.Hand); }
public static void Trash(this IActionHost host, ICard[] cards) { host.Trash(cards.Names(), Zone.Hand); }