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); }
public int ValueOf(CollectionCards cards) { return(cards.Select(c => c.plusCoin).Sum()); }
public int ValueOf(CollectionCards cards) { return cards.Select( c => c.plusCoin ).Sum(); }