本文整理汇总了C#中Card.AssertInHand方法的典型用法代码示例。如果您正苦于以下问题:C# Card.AssertInHand方法的具体用法?C# Card.AssertInHand怎么用?C# Card.AssertInHand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Card
的用法示例。
在下文中一共展示了Card.AssertInHand方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnRespondCard
protected override void OnRespondCard(Card card)
{
if(selected.Count == 2)
throw new BadUsageException();
if(card.Owner != RequestedPlayer)
throw new BadCardException();
card.AssertInHand();
if(selected.Contains(card))
throw new BadCardException();
selected.Add(card);
if(selected.Count == 2)
{
Game.GameCycle.PushTempHandler(new TargetPlayerResponseHandler(this));
End();
}
}
示例2: OnRespondCard
protected override void OnRespondCard(Card card)
{
if(card.Owner != RequestedPlayer)
throw new BadCardException();
card.AssertInHand();
if(selected.Contains(card))
throw new BadCardException();
selected.Add(card);
if(selected.Count == 2)
{
parent.OnUsedAbility();
foreach(Card c in selected)
Game.GameTable.PlayerDiscardCard(c);
RequestedPlayer.ModifyLifePoints(1);
End();
}
}
示例3: OnRespondCard
protected override void OnRespondCard(Card extraCard)
{
if(extraCard.Owner != RequestedPlayer)
throw new BadCardException();
if(extraCard == parent)
throw new BadCardException();
extraCard.AssertInHand();
if(card != parent)
parent.OnPlayVirtually(card, extraCard);
else
parent.OnPlay(extraCard);
End();
}
示例4: OnRespondCard
protected override void OnRespondCard(Card card)
{
if(card.Owner != RequestedPlayer)
throw new BadCardException();
card.AssertInHand();
if(card.Color != CardColor.Blue)
throw new BadCardException();
parent.abilityUses++;
parent.OnUsedAbility();
Game.GameTable.PlayerDiscardCard(card);
Game.GameTable.PlayerDrawFromDeck(RequestedPlayer, 2);
End();
}