Exemplo n.º 1
0
        public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
        {
            if (currentPlayer.RequestPlayerTrashCardFromHand(gameState, card => card.isTreasure, isOptional: true) != null)
            {
                PlayerActionChoice choice = currentPlayer.RequestPlayerChooseBetween(
                    gameState,
                    acceptableChoice => acceptableChoice == PlayerActionChoice.PlusCard || acceptableChoice == PlayerActionChoice.PlusCoin);

                switch (choice)
                {
                case PlayerActionChoice.PlusCard:
                {
                    currentPlayer.DrawAdditionalCardsIntoHand(2);
                    currentPlayer.AddActions(1);
                    break;
                }

                case PlayerActionChoice.PlusCoin:
                {
                    currentPlayer.AddCoins(2);
                    currentPlayer.AddBuys(1);
                    break;
                }

                default:
                    throw new Exception();
                }
            }
        }
Exemplo n.º 2
0
 public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
 {
     // TODO:  How does the player know whether he is discarding for action or buy?
     if (currentPlayer.RequestPlayerDiscardCardFromHand(gameState, card => true, isOptional: true))
     {
         currentPlayer.AddActions(1);
     }
     if (currentPlayer.RequestPlayerDiscardCardFromHand(gameState, card => true, isOptional: true))
     {
         currentPlayer.AddBuys(1);
     }
 }
Exemplo n.º 3
0
        private void DoActionChoice(PlayerState currentPlayer, PlayerActionChoice actionChoice, GameState gameState)
        {
            switch (actionChoice)
            {
            case PlayerActionChoice.PlusCard: currentPlayer.DrawOneCardIntoHand(gameState); break;

            case PlayerActionChoice.PlusAction: currentPlayer.AddActions(1); break;

            case PlayerActionChoice.PlusBuy: currentPlayer.AddBuys(1); break;

            case PlayerActionChoice.PlusCoin: currentPlayer.AddCoins(1); break;

            default: throw new Exception("Invalid pawn action choice");
            }
        }
Exemplo n.º 4
0
        public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
        {
            int countEmpty = gameState.supplyPiles.Where(pile => pile.IsEmpty).Count();

            if (countEmpty >= 1)
            {
                currentPlayer.DrawOneCardIntoHand(gameState);

                if (countEmpty >= 2)
                {
                    currentPlayer.AddCoins(1);
                    currentPlayer.AddBuys(1);
                }
            }
        }
Exemplo n.º 5
0
        public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
        {
            PlayerActionChoice choice = currentPlayer.RequestPlayerChooseBetween(gameState,
                acceptableChoice =>
                    acceptableChoice == PlayerActionChoice.PlusAction ||
                    acceptableChoice == PlayerActionChoice.PlusBuy ||
                    acceptableChoice == PlayerActionChoice.GainCard);

            switch (choice)
            {
                case PlayerActionChoice.PlusAction: currentPlayer.AddActions(2); break;
                case PlayerActionChoice.PlusBuy: currentPlayer.AddBuys(2); break;
                case PlayerActionChoice.GainCard: currentPlayer.GainCardFromSupply(Cards.Silver, gameState); break;
                default: throw new Exception();
            }
        }
Exemplo n.º 6
0
 public override void DoSpecializedWhenBuy(PlayerState currentPlayer, GameState gameState)
 {
     currentPlayer.AddBuys(1);
 }
Exemplo n.º 7
0
 public override void DoSpecializedDurationActionAtBeginningOfTurn(PlayerState currentPlayer, GameState gameState)
 {
     currentPlayer.DrawAdditionalCardsIntoHand(2, gameState);
     currentPlayer.AddBuys(1);
 }
Exemplo n.º 8
0
 private static void DelayedAction(PlayerState currentPlayer, GameState gameState)
 {
     currentPlayer.DrawAdditionalCardsIntoHand(5, gameState);
     currentPlayer.AddBuys(1);
     currentPlayer.AddActions(1);
 }