RequestPlayerChooseCardToRemoveFromHandForPlay() private method

private RequestPlayerChooseCardToRemoveFromHandForPlay ( GameState gameState, CardPredicate acceptableCard, bool isTreasure, bool isAction, bool isOptional ) : Dominion.Card
gameState GameState
acceptableCard CardPredicate
isTreasure bool
isAction bool
isOptional bool
return Dominion.Card
Beispiel #1
0
 public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
 {
     // TODO  Make sure throne room, Kings Court and procession stay in play when they play a duration card.
     // throw new NotImplementedException
     Card cardToPlay = currentPlayer.RequestPlayerChooseCardToRemoveFromHandForPlay(gameState, Delegates.IsActionCardPredicate, isTreasure: false, isAction: true, isOptional: false);
     if (cardToPlay != null)
     {
         currentPlayer.DoPlayAction(cardToPlay, gameState, countTimes: 2);
     }
 }
Beispiel #2
0
 public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
 {
     Card cardToPlay = currentPlayer.RequestPlayerChooseCardToRemoveFromHandForPlay(gameState, Delegates.IsTreasureCardPredicate, isTreasure: true, isAction: false, isOptional: true);
     if (cardToPlay != null)
     {
         currentPlayer.DoPlayTreasure(cardToPlay, gameState);
         currentPlayer.DoPlayTreasure(cardToPlay, gameState);
         currentPlayer.MoveCardFromPlayToTrash(gameState);
     }
 }
Beispiel #3
0
 public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
 {
     Card cardToPlay = currentPlayer.RequestPlayerChooseCardToRemoveFromHandForPlay(gameState, Delegates.IsActionCardPredicate, isTreasure: false, isAction: true, isOptional: false);
     if (cardToPlay != null)
     {
         currentPlayer.DoPlayAction(cardToPlay, gameState, countTimes: 2);
     }
 }
Beispiel #4
0
        public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
        {
            Card cardToPlay = currentPlayer.RequestPlayerChooseCardToRemoveFromHandForPlay(gameState, acceptableCard => acceptableCard.isAction, isTreasure: false, isAction: true, isOptional: true);
            if (cardToPlay != null)
            {
                currentPlayer.DoPlayAction(cardToPlay, gameState, countTimes: 2);
                currentPlayer.MoveCardFromPlayedAreaToTrash(cardToPlay, gameState);

                currentPlayer.RequestPlayerGainCardFromSupply(gameState,
                    acceptableCard =>
                        acceptableCard.CurrentCoinCost(currentPlayer) == cardToPlay.CurrentCoinCost(currentPlayer) + 1 &&
                        acceptableCard.potionCost == cardToPlay.potionCost &&
                        acceptableCard.isAction,
                    "must gain an action card costing exactly one more than the trashed card");
            }
        }