protected override async Task ActAsync(IActionHost host) { 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); var revealed = host.RevealUntil(card => !card.Types.Contains(CardType.Action)); host.PutIntoHand(revealed, Zone.Revealed); }
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); } }