Ejemplo n.º 1
0
        void IActionCard.Play(Dominion.Engine.Game game, Player player, Turn turn, object sidedata)
        {
            Enum newCardType = (Enum)sidedata;

            ICard newCard = game.DrawCard(newCardType);
            if (newCard == null)
                throw new Exception("Selected target type is not available");

            if (newCard.Cost > 4)
                throw new Exception("Target card is too expensive for Workshop");

            player.AddDiscard(newCard);
        }
Ejemplo n.º 2
0
        void IActionCard.Play(Dominion.Engine.Game game, Player player, Turn turn, object sidedata)
        {
            RemodelData upgradeData = (RemodelData)sidedata;
            ICard origCard = (ICard)upgradeData.Card;

            ICard newCard = game.DrawCard(upgradeData.TargetType);
            if (newCard == null)
                throw new Exception("Selected target type is not available");

            if ((origCard.Cost + 2) < newCard.Cost)
                throw new Exception("Target card is too expensive to remodel");

            game.TrashCard(origCard);
            player.AddDiscard(newCard);
        }