本文整理汇总了C#中DominionBase.Players.Player.AddCardToHand方法的典型用法代码示例。如果您正苦于以下问题:C# Player.AddCardToHand方法的具体用法?C# Player.AddCardToHand怎么用?C# Player.AddCardToHand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DominionBase.Players.Player
的用法示例。
在下文中一共展示了Player.AddCardToHand方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Play
public override void Play(Player player)
{
base.Play(player);
while (player.Hand.Count < 7 && player.CanDraw)
{
Card card = player.Draw(DeckLocation.Private);
if ((card.Category & Category.Action) == Category.Action)
{
Choice choice = Choice.CreateYesNoChoice(String.Format("Would you like to set aside {0}?", card.Name), this, card, player, null);
ChoiceResult result = player.MakeChoice(choice);
if (result.Options[0] == "Yes")
{
player.AddCardInto(DeckLocation.Revealed, player.RetrieveCardFrom(DeckLocation.Private, card));
}
else if (result.Options[0] == "No")
{
player.AddCardToHand(player.RetrieveCardFrom(DeckLocation.Private, card));
}
}
else
{
player.AddCardToHand(player.RetrieveCardFrom(DeckLocation.Private, card));
}
}
player.DiscardRevealed();
}
示例2: Play
public override void Play(Player player)
{
base.Play(player);
player.BeginDrawing();
while (player.CanDraw)
{
player.Draw(DeckLocation.Revealed);
if (player._Game.ComputeCost(player.Revealed.Last()) >= new Cost(3))
break;
}
player.EndDrawing();
if (player.Revealed.Count > 0)
{
Card lastCard = player.Revealed.Last();
if (player._Game.ComputeCost(player.Revealed.Last()) >= new Cost(3))
player.AddCardToHand(player.RetrieveCardFrom(DeckLocation.Revealed, lastCard));
}
player.DiscardRevealed();
}
示例3: Play
public override void Play(Player player)
{
base.Play(player);
player.ReturnHand(player.RevealHand());
Boolean foundUniqueCard = false;
player.BeginDrawing();
while (player.CanDraw)
{
player.Draw(DeckLocation.Revealed);
if (player.Hand[player.Revealed.Last().CardType].Count == 0)
{
foundUniqueCard = true;
break;
}
}
player.EndDrawing();
if (foundUniqueCard && player.Revealed.Count > 0)
player.AddCardToHand(player.RetrieveCardFrom(DeckLocation.Revealed, player.Revealed.Last()));
player.DiscardRevealed();
}
示例4: PlayDuration
public override void PlayDuration(Player player)
{
base.PlayDuration(player);
player.ReceiveBenefit(this, new CardBenefit() { Cards = 1 });
player.AddCardToHand(player.RetrieveCardFrom(DeckLocation.SetAside, this));
}
示例5: player_RevealSecretChamber
internal void player_RevealSecretChamber(Player player, ref AttackedEventArgs e)
{
player.AddCardInto(DeckLocation.Revealed, player.RetrieveCardFrom(DeckLocation.Hand, this.PhysicalCard));
player.AddCardToHand(player.RetrieveCardFrom(DeckLocation.Revealed, this.PhysicalCard));
player.Draw(2, DeckLocation.Hand);
Choice replaceChoice = new Choice("Choose order of cards to put back on your deck", this, new CardCollection() { e.AttackCard }, player.Hand, player, true, 2, 2);
ChoiceResult replaceResult = player.MakeChoice(replaceChoice);
player.RetrieveCardsFrom(DeckLocation.Hand, replaceResult.Cards);
player.AddCardsToDeck(replaceResult.Cards, DeckPosition.Top);
e.HandledBy.Add(TypeClass.SecretChamber);
// Attack isn't cancelled... it's just mitigated
}