protected override async Task ActAsync(IActionHost host) { var doubledCard = await host.SelectCard("Choose an Action card.", Zone.Hand, cards => cards.OfType <IActionCard>()); if (doubledCard != null) { await host.PlayCard(doubledCard, Zone.Hand); await host.PlayCard(doubledCard, Zone.InPlay); } }
protected override async Task ActAsync(IActionHost host) { host.AddCoins(2); var discarded = host.Examine(Zone.DeckTop(1)).SingleOrDefault(); if (discarded != null && discarded.Types.Contains(CardType.Action)) { host.Discard(discarded, Zone.Deck); if (await host.YesNo("Vassal", $"<card prefix='Play ' suffix='?'>{discarded.Name}</card>")) { await host.PlayCard(discarded.Name, Zone.Discard); } } }
protected override async Task ActAsync(IActionHost host) { var actions = 0; var revealed = host.RevealUntil(card => { if (card.Types.Contains(CardType.Action) && card.Name != "Golem") { actions++; } return(actions == 2); }); var revealedActions = revealed.OfType <IActionCard>().Where(card => card.Name != "Golem").ToArray(); var revealedInactions = revealed.Without(revealedActions).ToArray(); host.Discard(revealedInactions, Zone.Revealed); // XXX reorder if 2 foreach (var revealedAction in revealedActions) { await host.PlayCard(revealedAction, Zone.Revealed); } }
public static Task PlayCard(this IActionHost host, IActionCard card) { return(host.PlayCard(card.Name, Zone.Hand)); }
public static Task PlayCard(this IActionHost host, IActionCard card, Zone from) { return(host.PlayCard(card.Name, from)); }
public static Task PlayCard(this IActionHost host, string card) { return(host.PlayCard(card, Zone.Hand)); }