Dominion.PlayerState.GainCardsFromSupply C# (CSharp) Method

GainCardsFromSupply() private method

private GainCardsFromSupply ( GameState gameState, Dominion.Card cardType, int count, DeckPlacement defaultLocation = DeckPlacement.Discard ) : void
gameState GameState
cardType Dominion.Card
count int
defaultLocation DeckPlacement
return void
        internal void GainCardsFromSupply(GameState gameState, Card cardType, int count, DeckPlacement defaultLocation = DeckPlacement.Discard)
        {
            for (int i = 0; i < count; ++i)
                gameState.PlayerGainCardFromSupply(cardType, this, defaultLocation);
        }

Usage Example

Beispiel #1
0
 public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
 {
     Card trashedCard = currentPlayer.RequestPlayerTrashCardFromHand(gameState, card => true, isOptional: false);
     if (trashedCard != null)
     {
         currentPlayer.GainCardsFromSupply(gameState, Silver.card, trashedCard.CurrentCoinCost(currentPlayer));
     }
 }
All Usage Examples Of Dominion.PlayerState::GainCardsFromSupply
PlayerState