RequestPlayerChooseCardToRemoveFromHandForPlay() private méthode

private RequestPlayerChooseCardToRemoveFromHandForPlay ( GameState gameState, CardPredicate acceptableCard, bool isTreasure, bool isAction, bool isOptional ) : Dominion.Card
gameState GameState
acceptableCard CardPredicate
isTreasure bool
isAction bool
isOptional bool
Résultat Dominion.Card
Exemple #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);
     }
 }
Exemple #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);
     }
 }
Exemple #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);
     }
 }
        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");
            }
        }