public void Play(TurnContext context) { context.DrawCards(1); context.RemainingActions += 1; context.AddEffect(this, new ApothecaryEffect()); }
public void Play(TurnContext context) { var gainUtil = new GainUtility(context, context.ActivePlayer); gainUtil.Gain <Silver>(card => context.ActivePlayer.Deck.MoveToTop(card)); context.AddEffect(this, new BureaucratAttack()); }
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); }
private void ReturnCardsAndAttack(IEnumerable <ICard> selection, TurnContext context, string name) { var pile = context.Game.Bank.Piles.SingleOrDefault(p => p.Name == name); if (pile != null) { foreach (var card in selection) { card.MoveTo(pile); } context.AddEffect(_source, new AmbassadorAttack(pile)); } }
public static ISelectCardsActivity SelectActionToPlayMultipleTimes(TurnContext context, Player player, IGameLog log, ICard source, int count) { var activity = new SelectCardsActivity( log, player, string.Format("Select an action to play {0} times", count), 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 {2} times.", player.Name, actionCard.Name, count); actionCard.MoveTo(context.ActivePlayer.PlayArea); count.Times(() => context.AddEffect(source, new PlayCardEffect(actionCard))); }; return(activity); }
public void Play(TurnContext context) { context.DrawCards(3); context.AddEffect(this, new TorturerAttack()); }
public void Play(TurnContext context) { context.AddEffect(this, new GolemEffect()); }
public void Play(TurnContext context) { context.AddEffect(this, new RemodelEffect()); }
public void Play(TurnContext context) { context.AddEffect(this, new SeaHagAttack()); }
public static ISelectCardsActivity SelectActionToPlayMultipleTimes(TurnContext context, Player player, IGameLog log, ICard source, int count) { var activity = new SelectCardsActivity( log, player, string.Format("Select an action to play {0} times", count), 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 {2} times.", player.Name, actionCard.Name, count); actionCard.MoveTo(context.ActivePlayer.PlayArea); count.Times(() => context.AddEffect(source, new PlayCardEffect(actionCard))); }; return activity; }
public void Play(TurnContext context) { context.ActivePlayer.DrawCards(2); context.AddEffect(this, new GhostShipAttack()); }
public void Play(TurnContext context) { context.Buys += 1; context.AddEffect(this, new SalvagerEffect()); }
public void Play(TurnContext context) { context.DrawCards(2); context.AddEffect(this, new MasqueradeEffect()); }
public void Play(TurnContext context) { context.DrawCards(1); context.RemainingActions += 1; context.AddEffect(this, new FamiliarAttack()); }
public void Play(TurnContext context) { context.DrawCards(1); context.RemainingActions += 2; context.AddEffect(this, new MiningVillageEffect(this)); }
public void Play(TurnContext context) { context.AvailableSpend += 2; context.AddEffect(this, new CutpurseAttack()); }
public void Play(TurnContext context) { context.AddEffect(this, new ThroneRoomEffect()); }
public void Play(TurnContext context) { context.RemainingActions += 1; context.DrawCards(3); context.AddEffect(this, new WarehouseEffect()); }
public void Play(TurnContext context) { context.RemainingActions += 1; context.AddEffect(this, new ApprenticeEffect()); }
public void Play(TurnContext context) { context.AddEffect(this, new BaronEffect()); context.Buys += 1; }
public void Play(TurnContext context) { context.Trash(context.ActivePlayer, this); context.AddEffect(this, new FeastEffect()); }
public void Play(TurnContext context) { context.AvailableSpend += 2; context.AddEffect(this, new SwindlerAttack()); }
public void Play(TurnContext context) { var effect = new EnvoyEffect(); context.AddEffect(this, effect); }
public void Play(TurnContext context) { context.AddEffect(this, new NoblesEffect()); }
public void React(AttackEffect attackEffect, Player player, TurnContext currentTurn) { currentTurn.AddEffect(this, new SecretChamberReactionEffect(player)); currentTurn.Game.Log.LogMessage("{0} revealed a Secret Chamber.", player); }
public void Play(TurnContext context) { context.AvailableSpend += 2; context.AddEffect(this, new ChancellorEffect()); }
public void Play(TurnContext context) { context.AddEffect(this, new SecretChamberActionEffect()); }
public void Play(TurnContext context) { context.AddEffect(this, new ForgeEffect()); }
public void Play(TurnContext context) { context.AddEffect(this, new AmbassadorEffect(this)); }
public void Play(TurnContext context) { context.AddEffect(this, new ExpandEffect()); }
public void Play(TurnContext context) { context.AddEffect(this, new AdventurerEffect()); }