AddActions() приватный Метод

private AddActions ( int actionAmount ) : void
actionAmount int
Результат void
Пример #1
0
 public override void DoSpecializedDurationActionAtBeginningOfTurn(PlayerState currentPlayer, GameState gameState)
 {
     currentPlayer.AddCoins(1);
     currentPlayer.AddActions(1);
 }
Пример #2
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();
                }
            }
        }
Пример #3
0
 public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
 {
     if (currentPlayer.RequestPlayerDiscardCardFromHand(gameState, card => card.isTreasure, isOptional: true))
     {
         currentPlayer.DrawAdditionalCardsIntoHand(3);
         currentPlayer.AddActions(1);
     }
 }
Пример #4
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);
     }
 }
Пример #5
0
        public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
        {
            if (!currentPlayer.CardsInPlay.Where(card => card == CrossRoads.card).Any())
            {
                currentPlayer.AddActions(3);
            }

            int countVictoryCards = currentPlayer.hand.Count(card => card.isVictory);

            currentPlayer.DrawAdditionalCardsIntoHand(countVictoryCards);
        }
Пример #6
0
        private void GainBenefitFromCard(Card card, PlayerState currentPlayer)
        {
            if (card.isAction)
            {
                currentPlayer.AddActions(2);
            }

            if (card.isTreasure)
            {
                currentPlayer.AddCoins(2);
            }

            if (card.isVictory)
            {
                currentPlayer.DrawAdditionalCardsIntoHand(2);
            }
        }
Пример #7
0
 public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
 {
     if (currentPlayer.CountCardsPlayedThisTurn >= 3)
     {
         currentPlayer.DrawOneCardIntoHand();
         currentPlayer.AddActions(1);
     }
 }
Пример #8
0
        public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
        {
            PlayerActionChoice actionChoice = currentPlayer.RequestPlayerChooseBetween(
                gameState,
                acceptableChoice => acceptableChoice == PlayerActionChoice.PlusCard || acceptableChoice == PlayerActionChoice.PlusAction);

            if (actionChoice == PlayerActionChoice.PlusCard)
            {
                currentPlayer.DrawAdditionalCardsIntoHand(3);
            }
            else
            {
                currentPlayer.AddActions(2);
            }
        }
Пример #9
0
 private void DoActionChoice(PlayerState currentPlayer, PlayerActionChoice actionChoice)
 {
     switch (actionChoice)
     {
         case PlayerActionChoice.PlusCard: currentPlayer.DrawOneCardIntoHand(); 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");
     }
 }
Пример #10
0
        public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
        {
            Card gainedCard = currentPlayer.RequestPlayerGainCardFromSupply(gameState,
                acceptableCard => acceptableCard.CurrentCoinCost(currentPlayer) <= 4 && acceptableCard.potionCost == 0,
                "Any card costing up to 4");

            if (gainedCard.isAction)
            {
                currentPlayer.AddActions(1);
            }

            if (gainedCard.isTreasure)
            {
                currentPlayer.AddCoins(1);
            }

            if (gainedCard.isVictory)
            {
                currentPlayer.DrawOneCardIntoHand();
            }
        }
Пример #11
0
        public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
        {
            currentPlayer.RevealCardsFromDeck(1);
            Card revealedCard  = currentPlayer.CardsBeingRevealed.First();

            currentPlayer.RequestPlayerDiscardRevealedCard(gameState);
            currentPlayer.MoveRevealedCardToTopOfDeck();

            if (revealedCard.isAction)
            {
                currentPlayer.AddActions(1);
            }

            if (revealedCard.isTreasure)
            {
                currentPlayer.AddCoins(1);
            }

            if (revealedCard.isVictory)
            {
                currentPlayer.DrawOneCardIntoHand();
            }
        }
Пример #12
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();
            }
        }
Пример #13
0
 private static void ApplyChoice(PlayerActionChoice choice, PlayerState currentPlayer, GameState gameState)
 {
     switch (choice)
     {
         case PlayerActionChoice.PlusCard: currentPlayer.DrawAdditionalCardsIntoHand(2, gameState); break;
         case PlayerActionChoice.PlusAction: currentPlayer.AddActions(2); break;
         case PlayerActionChoice.PlusCoin: currentPlayer.AddCoins(2); break;
         case PlayerActionChoice.GainCard: currentPlayer.GainCardsFromSupply(gameState, Cards.Silver, 4); break;
         default: throw new Exception();
     }
 }
Пример #14
0
 private static void DelayedAction(PlayerState currentPlayer, GameState gameState)
 {
     currentPlayer.DrawAdditionalCardsIntoHand(5, gameState);
     currentPlayer.AddBuys(1);
     currentPlayer.AddActions(1);
 }