本文整理汇总了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;
}
示例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);
}
}
示例3: DoSpecializedDurationActionAtBeginningOfTurn
public override void DoSpecializedDurationActionAtBeginningOfTurn(PlayerState currentPlayer, GameState gameState)
{
currentPlayer.DrawAdditionalCardsIntoHand(2);
currentPlayer.AddBuys(1);
}
示例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);
}
示例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);
}
}
示例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;
}
}
}
示例7: DoSpecializedTrash
public override void DoSpecializedTrash(PlayerState currentPlayer, GameState gameState)
{
currentPlayer.DrawAdditionalCardsIntoHand(1);
}
示例8: DoSpecializedAction
public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
{
if (currentPlayer.MoveCardFromPlayToPile(gameState))
{
currentPlayer.DrawAdditionalCardsIntoHand(currentPlayer.Hand.Count);
}
}
示例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();
}
}
示例10: DoSpecializedAction
public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
{
currentPlayer.RevealHand();
if (currentPlayer.hand.HasDuplicates())
{
currentPlayer.DrawOneCardIntoHand();
}
else
{
currentPlayer.DrawAdditionalCardsIntoHand(3);
}
}
示例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);
}
示例12: DoSpecializedAttack
public override void DoSpecializedAttack(PlayerState currentPlayer, PlayerState otherPlayer, GameState gameState)
{
if (otherPlayer.GainCardFromSupply(Curse.card, gameState))
{
otherPlayer.DrawAdditionalCardsIntoHand(1, gameState);
}
}
示例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);
}
}
示例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);
}
示例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;
}
}