Esempio n. 1
0
 private new void DoSpecializedActionOnBuyWhileInPlay(PlayerState currentPlayer, GameState gameState, Card boughtCard)
 {
     currentPlayer.RequestPlayerGainCardFromSupply(gameState,
         card => !card.isVictory && card.CurrentCoinCost(currentPlayer) < boughtCard.CurrentCoinCost(currentPlayer) && card.potionCost <= boughtCard.potionCost,
         "Must gain a non victory card costing less than the bought card");
 }
Esempio n. 2
0
 private new void DoSpecializedActionOnBuyWhileInPlay(PlayerState currentPlayer, GameState gameState, Card boughtCard)
 {
     if (boughtCard.CurrentCoinCost(currentPlayer) <= 4 && boughtCard.potionCost == 0 && !boughtCard.isVictory)
     {
         currentPlayer.GainCardFromSupply(gameState, boughtCard);
     }
 }
Esempio n. 3
0
 public static int CostOfCard(Card card, GameState gameState)
 {
     return card.CurrentCoinCost(gameState.Self);
 }
Esempio n. 4
0
 private bool CardAvailableForPurchaseForCurrentPlayer(Card card)
 {
     PlayerState currentPlayer = this.players.CurrentPlayer;
     return currentPlayer.AvailableCoins >= card.CurrentCoinCost(currentPlayer) &&
            currentPlayer.AvailablePotions >= card.potionCost &&
            this.GetPile(card).Any() &&
            !card.IsRestrictedFromBuy(currentPlayer, this) &&
            !currentPlayer.turnCounters.cardsBannedFromPurchase.Contains(card);
 }