本文整理汇总了C#中Dominion.Rules.TurnContext.AddEffect方法的典型用法代码示例。如果您正苦于以下问题:C# TurnContext.AddEffect方法的具体用法?C# TurnContext.AddEffect怎么用?C# TurnContext.AddEffect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dominion.Rules.TurnContext
的用法示例。
在下文中一共展示了TurnContext.AddEffect方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Resolve
public override void Resolve(TurnContext context, ICard source)
{
var player = context.ActivePlayer;
var log = context.Game.Log;
if (player.Hand.OfType<IActionCard>().Any())
{
var activity = new SelectCardsActivity(
log, player,
"Select an action to play twice",
SelectionSpecifications.SelectExactlyXCards(1), source);
activity.Hint = ActivityHint.PlayCards;
activity.Specification.CardTypeRestriction = typeof (IActionCard);
activity.AfterCardsSelected = cards =>
{
var actionCard = cards.OfType<IActionCard>().Single();
log.LogMessage("{0} selected {1} to be played twice.", player.Name, actionCard.Name);
actionCard.MoveTo(context.ActivePlayer.PlayArea);
context.AddEffect(source, new PlayCardEffect(actionCard));
context.AddEffect(source, new PlayCardEffect(actionCard));
};
_activities.Add(activity);
}
}
示例2: Play
public void Play(TurnContext context)
{
context.DrawCards(1);
context.RemainingActions += 1;
context.AddEffect(this, new UpgradeEffect());
}
示例3: CreateChooseActionActivity
private IActivity CreateChooseActionActivity(TurnContext context, RevealZone revealZone, ICard source)
{
var selectTreasure = new SelectFromRevealedCardsActivity(context.Game.Log, context.ActivePlayer, revealZone,
"Select the action to play first.", SelectionSpecifications.SelectExactlyXCards(1), source);
selectTreasure.AfterCardsSelected = cards =>
{
var first = cards.OfType<IActionCard>().Single();
var second = revealZone.OfType<IActionCard>().Single(c => c != first);
// Reverse order because we're on a stack.
context.AddEffect(source, new PlayCardEffect(second));
context.AddEffect(source, new PlayCardEffect(first));
};
return selectTreasure;
}
示例4: BeginResolve
public override void BeginResolve(TurnContext context)
{
if(_hasHadReactionStep)
{
base.BeginResolve(context);
}
else
{
_hasHadReactionStep = true;
if (context.Opponents.Any(o => o.Hand.OfType<IReactionCard>().Any()))
context.AddEffect(Source, new ReactionEffect(this));
else
base.BeginResolve(context);
}
}
示例5: Play
public void Play(TurnContext context)
{
context.AddEffect(this, new MoneylenderEffect());
}
示例6: Play
public void Play(TurnContext context)
{
context.ActivePlayer.DrawCards(2);
context.AddEffect(this, new GhostShipAttack());
}
示例7: Play
public void Play(TurnContext context)
{
context.AddEffect(this, new KingsCourtEffect());
}
示例8: Play
public void Play(TurnContext context)
{
context.DrawCards(1);
context.RemainingActions += 1;
context.AddEffect(new FamiliarAttack());
}
示例9: Play
public void Play(TurnContext context)
{
var effect = new EnvoyEffect();
context.AddEffect(this, effect);
}
示例10: Play
public void Play(TurnContext context)
{
context.RemainingActions += 1;
context.AddEffect(this, new CellarEffect());
}
示例11: Play
public void Play(TurnContext context)
{
context.DrawCards(1);
context.RemainingActions += 2;
context.AddEffect(this, new MiningVillageEffect(this));
}
示例12: Play
public void Play(TurnContext context)
{
context.AvailableSpend += 2;
context.AddEffect(new MountebankAttack());
}
示例13: Play
public void Play(TurnContext context)
{
context.AddEffect(this, new SecretChamberActionEffect());
}
示例14: Play
public void Play(TurnContext context)
{
context.Trash(context.ActivePlayer, this);
context.AddEffect(this, new FeastEffect());
}
示例15: Play
public void Play(TurnContext context)
{
context.AddEffect(new WorkshopEffect());
}