Dominion.PlayerState.AddCoinTokens C# (CSharp) Method

AddCoinTokens() private method

private AddCoinTokens ( int coinAmount ) : void
coinAmount int
return void
        internal void AddCoinTokens(int coinAmount)
        {
            this.turnCounters.AddCoinTokens(this, coinAmount);
        }

Usage Example

Beispiel #1
0
        public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
        {
            currentPlayer.AddCoinTokens(2);

            int coinCount = currentPlayer.actions.GetCoinAmountToUseInButcher(gameState);
            if (coinCount > currentPlayer.AvailableCoinTokens)
                throw new Exception("Tried to use too many coins");

            Card trashedCard = currentPlayer.RequestPlayerTrashCardFromHand(gameState, card => true, isOptional: true);
            if (trashedCard == null)
                return;

            currentPlayer.AddCoinTokens(-coinCount);

            currentPlayer.RequestPlayerGainCardFromSupply(
                gameState,
                card => card.CurrentCoinCost(currentPlayer) == trashedCard.CurrentCoinCost(currentPlayer) + coinCount &&
                        card.potionCost == trashedCard.potionCost,
                "Must gain a card costing exactly equal to the cost of the card trashed plus any coin spent");
        }
All Usage Examples Of Dominion.PlayerState::AddCoinTokens
PlayerState