Dominion.PlayerState.RequestPlayerGainCardFromSupply C# (CSharp) Method

RequestPlayerGainCardFromSupply() private method

private RequestPlayerGainCardFromSupply ( GameState gameState, CardPredicate acceptableCard, string description, bool isOptional = false, DeckPlacement defaultLocation = DeckPlacement.Discard ) : Dominion.Card
gameState GameState
acceptableCard CardPredicate
description string
isOptional bool
defaultLocation DeckPlacement
return Dominion.Card
        internal Card RequestPlayerGainCardFromSupply(GameState gameState, CardPredicate acceptableCard, string description, bool isOptional = false, DeckPlacement defaultLocation = DeckPlacement.Discard)
        {
            return RequestPlayerGainCardFromSupply(gameState, this, acceptableCard, description, isOptional, defaultLocation);
        }

Same methods

PlayerState::RequestPlayerGainCardFromSupply ( GameState gameState, PlayerState playerGainingCard, CardPredicate acceptableCard, string description, bool isOptional = false, DeckPlacement defaultLocation = DeckPlacement.Discard ) : Dominion.Card

Usage Example

Example #1
0
        public override DeckPlacement DoSpecializedWhenGain(PlayerState currentPlayer, GameState gameState)
        {
            currentPlayer.RequestPlayerGainCardFromSupply(
                gameState,
                card => card.CurrentCoinCost(currentPlayer) < this.CurrentCoinCost(currentPlayer) && card.potionCost == 0,
                "Must gain a card costing less than this");

            return DeckPlacement.Default;
        }
All Usage Examples Of Dominion.PlayerState::RequestPlayerGainCardFromSupply
PlayerState