Ejemplo n.º 1
0
        public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
        {
            CollectionCards trashedCards = currentPlayer.RequestPlayerTrashCardsFromHand(gameState, currentPlayer.Hand.Count, isOptional: true);

            int totalCoinCost   = trashedCards.Select(card => card.CurrentCoinCost(currentPlayer)).Sum();
            int totalPotionCost = trashedCards.Select(card => card.potionCost).Sum();

            currentPlayer.RequestPlayerGainCardFromSupply(
                gameState,
                card => card.CurrentCoinCost(currentPlayer) == totalCoinCost && card.potionCost == totalPotionCost,
                "Must gain a card costing exactly equal to the total cost of the trashed cards>",
                isOptional: false);
        }
Ejemplo n.º 2
0
 public int ValueOf(CollectionCards cards)
 {
     return(cards.Select(c => c.plusCoin).Sum());
 }
Ejemplo n.º 3
0
 public int ValueOf(CollectionCards cards)
 {
     return cards.Select( c => c.plusCoin ).Sum();
 }