本文整理汇总了C#中Dominion.Rules.TurnContext.DrawCards方法的典型用法代码示例。如果您正苦于以下问题:C# TurnContext.DrawCards方法的具体用法?C# TurnContext.DrawCards怎么用?C# TurnContext.DrawCards使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dominion.Rules.TurnContext
的用法示例。
在下文中一共展示了TurnContext.DrawCards方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Play
public void Play(TurnContext context)
{
context.DrawCards(1);
context.RemainingActions += 1;
context.AddEffect(this, new UpgradeEffect());
}
示例2: Play
public void Play(TurnContext context)
{
context.DrawCards(1);
context.RemainingActions += 1;
context.Buys += 1;
context.AvailableSpend += 1;
}
示例3: OnTurnStarting
public override void OnTurnStarting(TurnContext context)
{
base.OnTurnStarting(context);
context.DrawCards(1);
context.Game.Log.LogMessage("Caravan draws an extra card");
}
示例4: Play
public void Play(TurnContext context)
{
context.RemainingActions += 1;
context.DrawCards(1);
context.AddLongLivedEffect(new CaravanEffect(this));
}
示例5: Play
public void Play(TurnContext context)
{
context.RemainingActions += 2;
context.DrawCards(1);
var emptyPileCount = context.Game.Bank.EmptyPileCount;
if(emptyPileCount >= 1)
context.DrawCards(1);
if(emptyPileCount >= 2)
{
context.AvailableSpend += 1;
context.Buys += 1;
}
}
示例6: Play
public void Play(TurnContext context)
{
context.DrawCards(4);
context.Buys += 1;
foreach (var opponent in context.Opponents)
opponent.DrawCards(1);
}
示例7: Play
public void Play(TurnContext context)
{
context.RemainingActions += 2;
context.Game.Log.LogRevealHand(context.ActivePlayer);
if (context.ActivePlayer.Hand.OfType<IActionCard>().Count() == 0)
context.DrawCards(2);
}
示例8: Play
public void Play(TurnContext context)
{
var activity = Activities.GainACardCostingUpToX(context.Game.Log, context.ActivePlayer, 4, this);
activity.AfterCardGained = card =>
{
if (card is IActionCard) context.RemainingActions += 1;
if (card is ITreasureCard) context.AvailableSpend += 1;
if (card is IVictoryCard) context.DrawCards(1);
};
context.AddSingleActivity(activity, this);
}
示例9: Resolve
public override void Resolve(TurnContext context, ICard source)
{
Action discardAction = () =>
{
context.DiscardCards(context.ActivePlayer, context.ActivePlayer.Hand);
context.DrawCards(4);
DistributeAttacks(context, source);
};
Action moneyAction = () => context.AvailableSpend += 2;
var activity = Activities.ChooseYesOrNo(context.Game.Log, context.ActivePlayer, "Discard your hand?",
source, discardAction, moneyAction);
_activities.Add(activity);
}
示例10: Resolve
public override void Resolve(TurnContext context, ICard source)
{
var activity = new SelectCardsActivity(
context,
"Select any number of cards to discard, you will draw 1 new card for each discard",
SelectionSpecifications.SelectUpToXCards(context.ActivePlayer.Hand.CardCount), source);
activity.AfterCardsSelected = cards =>
{
context.DiscardCards(activity.Player, cards);
context.DrawCards(cards.Count());
};
_activities.Add(activity);
}
示例11: Play
public void Play(TurnContext context)
{
var leftPlayer = context.Opponents.FirstOrDefault();
if (leftPlayer != null)
{
var revealZone = new RevealZone(leftPlayer);
leftPlayer.Deck.MoveTop(2, revealZone);
revealZone.LogReveal(context.Game.Log);
foreach (var card in revealZone.WithDistinctTypes())
{
if (card is IActionCard) context.RemainingActions += 2;
if (card is ITreasureCard) context.AvailableSpend += 2;
if (card is IVictoryCard) context.DrawCards(2);
}
revealZone.MoveAll(leftPlayer.Discards);
}
}
示例12: Resolve
public override void Resolve(TurnContext context, ICard source)
{
if (context.ActivePlayer.Hand.CardCount > 0)
{
var activity = new SelectCardsActivity(context, "Select a card to trash",
SelectionSpecifications.SelectExactlyXCards(1), source);
activity.AfterCardsSelected = cardList =>
{
var cardToTrash = cardList.Single();
var cardsToDraw = cardToTrash.Cost.Money;
// Notice the card doesn't say its 2 per potion (if we add cards that cost multiple potions)
if (cardToTrash.Cost.Potions > 0)
cardsToDraw += 2;
context.DrawCards(cardsToDraw);
context.Trash(context.ActivePlayer, cardToTrash);
};
_activities.Add(activity);
}
}
示例13: Play
public void Play(TurnContext context)
{
context.DrawCards(2);
context.Buys += 1;
context.AddLongLivedEffect(new WharfEffect(this));
}
示例14: Play
public void Play(TurnContext context)
{
context.RemainingActions += 1;
context.DrawCards(3);
context.AddEffect(this, new WarehouseEffect());
}
示例15: Play
public void Play(TurnContext context)
{
context.DrawCards(1);
context.RemainingActions += 2;
context.AddEffect(this, new MiningVillageEffect(this));
}