示例#1
0
		public override void Play(Player player)
		{
			base.Play(player);
			Choice choice = Choice.CreateYesNoChoice("You may immediately put your deck into your discard pile.", this, this, player, null);
			ChoiceResult result = player.MakeChoice(choice);
			if (result.Options[0] == "Yes")
			{
				player._Game.SendMessage(player, this);
				CardCollection cc = player.RetrieveCardsFrom(DeckLocation.Deck);
				player.AddCardsInto(DeckLocation.Discard, cc);
			}
		}
示例#2
0
		public override void Play(Player player)
		{
			base.Play(player);
			Choice choice = Choice.CreateYesNoChoice("You may put your deck into your discard pile.", this, this, player, null);
			ChoiceResult result = player.MakeChoice(choice);
			if (result.Options[0] == "Yes")
			{
				player._Game.SendMessage(player, this);
				CardCollection cc = player.RetrieveCardsFrom(DeckLocation.Deck);
				player.AddCardsInto(DeckLocation.Discard, cc);
			}

			CardCollection cards = player.DiscardPile.LookThrough(c => true);
			Choice choiceTop = new Choice("Choose a card to put onto your deck", this, cards, player, false, 0, 1);
			ChoiceResult resultTop = player.MakeChoice(choiceTop);
			if (resultTop.Cards.Count > 0)
				player.AddCardsToDeck(player.DiscardPile.Retrieve(player, c => resultTop.Cards.Contains(c)), DeckPosition.Top);
		}
		internal void player_GainInn(Player player, ref Players.CardGainEventArgs e)
		{
			CardCollection actionCards = player.DiscardPile.LookThrough(c => (c.Category & Cards.Category.Action) == Cards.Category.Action);
			Choice choice = new Choice("Choose cards to reveal and shuffle into your deck", this, actionCards, player, false, 0, actionCards.Count);
			ChoiceResult result = player.MakeChoice(choice);

			// We lose track of Inn if we put it on top of the deck and shuffle
			if (result.Cards.Contains(this))
				e.IsLostTrackOf = true;

			player.AddCardsInto(DeckLocation.Revealed, player.DiscardPile.Retrieve(player, c => result.Cards.Contains(c)));
			player.AddCardsToDeck(player.Revealed.Retrieve(player, c => result.Cards.Contains(c)), DeckPosition.Top);
			player.ShuffleDrawPile();

			e.HandledBy.Add(TypeClass.Inn);

			// Clear out the Event Triggers -- this only happens when its Gained, so we don't care any more
			foreach (Player playerLoop in _CardGainedHandlers.Keys)
				playerLoop.CardGained -= _CardGainedHandlers[playerLoop];
			_CardGainedHandlers.Clear();
		}
		public override void Play(Player player)
		{
			base.Play(player);

			Choice choice = new Choice("Choose 2:", this, new CardCollection() { this }, new List<string>() { "+2<nbsp/>Cards", "+2<nbsp/>Actions", "+<coin>2</coin>", "Gain 4 Silvers & discard deck" }, player, null, false, 2, 2);
			ChoiceResult result = player.MakeChoice(choice);

			foreach (String option in result.Options)
			{
				CardBenefit benefit = new CardBenefit();
				if (option == "+2<nbsp/>Cards")
					benefit.Cards = 2;
				if (option == "+2<nbsp/>Actions")
					benefit.Actions += 2;
				if (option == "+<coin>2</coin>")
					benefit.Currency += new Coin(2);
				if (option == "Gain 4 Silvers & discard deck")
				{
					player.Gain(player._Game.Table.Silver, 4);

					player._Game.SendMessage(player, this);
					CardCollection cc = player.RetrieveCardsFrom(DeckLocation.Deck);
					player.AddCardsInto(DeckLocation.Discard, cc);
				}
				player.ReceiveBenefit(this, benefit);
			}
		}
		public override void Play(Player player)
		{
			base.Play(player);

			int copperCount = player.DiscardPile.LookThrough(c => c.CardType == Cards.Universal.TypeClass.Copper).Count;
			List<String> options = new List<string>();
			for (int i = 0; i <= copperCount; i++)
				options.Add(i.ToString());
			Choice choice = new Choice("How many Copper cards would you like to reveal and put into your hand?", this, new CardCollection() { this }, options, player);
			ChoiceResult result = player.MakeChoice(choice);
			int number = int.Parse(result.Options[0]);
			player.AddCardsInto(DeckLocation.Revealed, player.RetrieveCardsFrom(DeckLocation.Discard, Cards.Universal.TypeClass.Copper, number));
			player.AddCardsToHand(DeckLocation.Revealed);
		}
示例#6
0
		public override void Overpay(Player player, Currency amount)
		{
			Choice choice = new Choice("Choose cards to put on top of your deck", this, player.DiscardPile.LookThrough(c => true), player, false, amount.Coin.Value, amount.Coin.Value);
			ChoiceResult result = player.MakeChoice(choice);
			player.AddCardsInto(DeckLocation.Revealed, player.DiscardPile.Retrieve(player, c => result.Cards.Contains(c)));
			player.AddCardsToDeck(player.Revealed.Retrieve(player, c => result.Cards.Contains(c)), DeckPosition.Top);
		}