public override void DoSpecializedAttack(PlayerState currentPlayer, PlayerState otherPlayer, GameState gameState) { CardPredicate acceptableCard = card => card.isVictory; Card cardTopDecked = otherPlayer.RequestPlayerTopDeckCardFromHand(gameState, acceptableCard, isOptional: false); if (cardTopDecked == null) { otherPlayer.RevealHand(); } else { otherPlayer.RevealCard(cardTopDecked, DeckPlacement.TopOfDeck); } }
internal bool RequestPlayerDiscardCardFromOtherPlayersHand(GameState gameState, PlayerState otherPlayer) { if (!otherPlayer.hand.Any) { return false; } otherPlayer.RevealHand(); Card cardTypeToDiscard = this.actions.GetCardFromOtherPlayersHandToDiscard(gameState, otherPlayer); if (cardTypeToDiscard == null) { { throw new Exception("Player must choose a card to discard"); } } otherPlayer.MoveCardFromHandToDiscard(cardTypeToDiscard, gameState); return true; }
public override void DoSpecializedAttack(PlayerState currentPlayer, PlayerState otherPlayer, GameState gameState) { if (!otherPlayer.RequestPlayerDiscardCardFromHand(gameState, card => card == Copper.card, isOptional: false)) { otherPlayer.RevealHand(); } }
public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState) { currentPlayer.RevealHand(); if (currentPlayer.hand.HasDuplicates()) { currentPlayer.DrawOneCardIntoHand(); } else { currentPlayer.DrawAdditionalCardsIntoHand(3); } }
public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState) { currentPlayer.RevealHand(); Card revealedCard = currentPlayer.DrawAndRevealOneCardFromDeck(); while (revealedCard != null) { if (!currentPlayer.Hand.HasCard(revealedCard)) { currentPlayer.MoveRevealedCardToHand(revealedCard); break; } revealedCard = currentPlayer.DrawAndRevealOneCardFromDeck(); } currentPlayer.MoveRevealedCardsToDiscard(gameState); }
public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState) { currentPlayer.RevealHand(); if (!currentPlayer.hand.Where(card => card.isAction).Any()) { currentPlayer.DrawAdditionalCardsIntoHand(2); } }
public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState) { currentPlayer.GainCardFromSupply(Cards.Rats, gameState); CardPredicate cardsToTrash = card => card != Rats.card; if (currentPlayer.Hand.HasCard(cardsToTrash)) { currentPlayer.RequestPlayerTrashCardFromHand(gameState, cardsToTrash, isOptional: false); } else { currentPlayer.RevealHand(); } }
public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState) { currentPlayer.RevealHand(); currentPlayer.AddCoins(0 - currentPlayer.Hand.CountWhere(card => card.isTreasure)); }