当前位置: 首页>>代码示例>>C#>>正文


C# PlayerState.DrawAdditionalCardsIntoHand方法代码示例

本文整理汇总了C#中Dominion.PlayerState.DrawAdditionalCardsIntoHand方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerState.DrawAdditionalCardsIntoHand方法的具体用法?C# PlayerState.DrawAdditionalCardsIntoHand怎么用?C# PlayerState.DrawAdditionalCardsIntoHand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Dominion.PlayerState的用法示例。


在下文中一共展示了PlayerState.DrawAdditionalCardsIntoHand方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DoSpecializedTrash

        public override bool DoSpecializedTrash(PlayerState selfPlayer, GameState gameState)
        {
            selfPlayer.DrawAdditionalCardsIntoHand(3, gameState);

            return true;
        }
开发者ID:NathanTeeuwen,项目名称:Dominulator,代码行数:6,代码来源:DarkAges.cs

示例2: GainBenefitFromCard

        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);
            }
        }
开发者ID:peterhal,项目名称:Dominulator,代码行数:17,代码来源:Intrigue.cs

示例3: DoSpecializedDurationActionAtBeginningOfTurn

 public override void DoSpecializedDurationActionAtBeginningOfTurn(PlayerState currentPlayer, GameState gameState)
 {
     currentPlayer.DrawAdditionalCardsIntoHand(2);
     currentPlayer.AddBuys(1);
 }
开发者ID:peterhal,项目名称:Dominulator,代码行数:5,代码来源:Seaside.cs

示例4: DoSpecializedAction

 public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
 {
     for (int i = 0; i < 3; ++i)
        {
        Card cardPlayed = gameState.DoPlayOneTreasure(currentPlayer);
        if (cardPlayed == null)
            break;
        }
        currentPlayer.DrawAdditionalCardsIntoHand(currentPlayer.AvailableCoins, gameState);
        currentPlayer.turnCounters.RemoveCoins(currentPlayer.turnCounters.AvailableCoins);
 }
开发者ID:NathanTeeuwen,项目名称:Dominulator,代码行数:11,代码来源:Adventures.cs

示例5: DoSpecializedAction

 public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
 {
     if (currentPlayer.RequestPlayerDiscardCardFromHand(gameState, card => card.isTreasure, isOptional: true))
     {
         currentPlayer.DrawAdditionalCardsIntoHand(3);
         currentPlayer.AddActions(1);
     }
 }
开发者ID:peterhal,项目名称:Dominulator,代码行数:8,代码来源:Hinterlands.cs

示例6: DoSpecializedAction

        public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
        {
            PlayerActionChoice playerChoice = currentPlayer.RequestPlayerChooseBetween(gameState, acceptableChoice =>
                acceptableChoice == PlayerActionChoice.GainCard ||
                acceptableChoice == PlayerActionChoice.PlusCard ||
                acceptableChoice == PlayerActionChoice.Trash);

            switch (playerChoice)
            {
                case PlayerActionChoice.PlusCard:
                    {
                        currentPlayer.DrawAdditionalCardsIntoHand(3, gameState);
                        foreach (PlayerState otherPlayer in gameState.players.OtherPlayers)
                        {
                            otherPlayer.DrawAdditionalCardsIntoHand(1, gameState);
                        }
                        break;
                    }
                case PlayerActionChoice.GainCard:
                    {
                        currentPlayer.GainCardFromSupply(gameState, Gold.card);
                        foreach (PlayerState otherPlayer in gameState.players.OtherPlayers)
                        {
                            otherPlayer.GainCardFromSupply(gameState, Silver.card);
                        }
                        break;
                    }
                case PlayerActionChoice.Trash:
                    {
                        currentPlayer.RequestPlayerTrashCardFromHandAndGainCard(
                            gameState,
                            acceptableCardsToTrash => true,
                            CostConstraint.Exactly,
                            2,
                            CardRelativeCost.RelativeCost,
                            isOptionalToTrash: true,
                            isOptionalToGain: false);

                        foreach (PlayerState otherPlayer in gameState.players.OtherPlayers)
                        {
                            otherPlayer.RequestPlayerTrashCardFromHandAndGainCard(
                                gameState,
                                acceptableCardsToTrash => true,
                                CostConstraint.Exactly,
                                1,
                                CardRelativeCost.RelativeCost,
                                isOptionalToTrash: true,
                                isOptionalToGain: false);
                        }
                        break;
                    }
            }
        }
开发者ID:NathanTeeuwen,项目名称:Dominulator,代码行数:53,代码来源:Promo.cs

示例7: DoSpecializedTrash

 public override void DoSpecializedTrash(PlayerState currentPlayer, GameState gameState)
 {
     currentPlayer.DrawAdditionalCardsIntoHand(1);
 }
开发者ID:peterhal,项目名称:Dominulator,代码行数:4,代码来源:DarkAges.cs

示例8: DoSpecializedAction

 public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
 {
     if (currentPlayer.MoveCardFromPlayToPile(gameState))
     {
         currentPlayer.DrawAdditionalCardsIntoHand(currentPlayer.Hand.Count);
     }
 }
开发者ID:peterhal,项目名称:Dominulator,代码行数:7,代码来源:DarkAges.cs

示例9: ApplyChoice

 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();
     }
 }
开发者ID:NathanTeeuwen,项目名称:Dominulator,代码行数:11,代码来源:Cornucopia.cs

示例10: DoSpecializedAction

        public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
        {
            currentPlayer.RevealHand();

            if (currentPlayer.hand.HasDuplicates())
            {
                currentPlayer.DrawOneCardIntoHand();
            }
            else
            {
                currentPlayer.DrawAdditionalCardsIntoHand(3);
            }
        }
开发者ID:peterhal,项目名称:Dominulator,代码行数:13,代码来源:Cornucopia.cs

示例11: DoSpecializedAction

        public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
        {
            // Choose one: ...
            PlayerActionChoice actionChoice = currentPlayer.RequestPlayerChooseBetween(
                gameState,
                acceptableChoice => acceptableChoice == PlayerActionChoice.Discard || acceptableChoice == PlayerActionChoice.PlusCoin);

            PlayerState.AttackAction attackAction = this.DoEmptyAttack;

            if (actionChoice == PlayerActionChoice.PlusCoin)
            {
                // +2 coin;
                currentPlayer.AddCoins(2);
            }
            else
            {
                // discard your hand,
                currentPlayer.DiscardHand(gameState);
                // +4 cards
                currentPlayer.DrawAdditionalCardsIntoHand(4);

                attackAction = this.DoSpecializedAttackInternal;
            }

            currentPlayer.AttackOtherPlayers(gameState, attackAction);
        }
开发者ID:peterhal,项目名称:Dominulator,代码行数:26,代码来源:Intrigue.cs

示例12: DoSpecializedAttack

 public override void DoSpecializedAttack(PlayerState currentPlayer, PlayerState otherPlayer, GameState gameState)
 {
     if (otherPlayer.GainCardFromSupply(Curse.card, gameState))
     {
         otherPlayer.DrawAdditionalCardsIntoHand(1, gameState);
     }
 }
开发者ID:NathanTeeuwen,项目名称:Dominulator,代码行数:7,代码来源:Guilds.cs

示例13: DoSpecializedAttackInternal

 private void DoSpecializedAttackInternal(PlayerState currentPlayer, PlayerState otherPlayer, GameState gameState)
 {
     // with at least 5 cards in hand
     if (otherPlayer.hand.Count >= 5)
     {
         // discards his hand
         otherPlayer.DiscardHand(gameState);
         // and draws 4 cards
         otherPlayer.DrawAdditionalCardsIntoHand(4);
     }
 }
开发者ID:peterhal,项目名称:Dominulator,代码行数:11,代码来源:Intrigue.cs

示例14: DoSpecializedAction

        public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
        {
            int countCardsDiscarded = 0;
            while (!currentPlayer.hand.IsEmpty)
            {
                if (!currentPlayer.RequestPlayerDiscardCardFromHand(gameState, acceptableCard => true, isOptional: true))
                {
                    break;
                }
                ++countCardsDiscarded;
            }

            currentPlayer.DrawAdditionalCardsIntoHand(countCardsDiscarded);
        }
开发者ID:peterhal,项目名称:Dominulator,代码行数:14,代码来源:BaseSet.cs

示例15: DoReactionToAttackWhileInHand

        public override bool DoReactionToAttackWhileInHand(PlayerState currentPlayer, GameState gameState, out bool cancelsAttack)
        {
            cancelsAttack = false;

            if (currentPlayer.actions.ShouldRevealCardFromHand(gameState, this))
            {
                currentPlayer.DrawAdditionalCardsIntoHand(2);
                for (int i = 0; i < 2; ++i)
                {
                    currentPlayer.RequestPlayerTopDeckCardFromHand(gameState, acceptableCard => true, false);
                }

                return true;
            }
            else
            {
                return false;
            }
        }
开发者ID:peterhal,项目名称:Dominulator,代码行数:19,代码来源:Intrigue.cs


注:本文中的Dominion.PlayerState.DrawAdditionalCardsIntoHand方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。