Example #1
0
		void player_CardsDiscarding(object sender, CardsDiscardEventArgs e)
		{
			if (!e.Cards.Contains(this.PhysicalCard) || e.GetAction(TypeClass.Alchemist) != null ||
				(e.FromLocation != DeckLocation.InPlay && e.FromLocation != DeckLocation.SetAside && e.FromLocation != DeckLocation.InPlayAndSetAside))
				return;

			if (e.Cards.Any(c => c.CardType == TypeClass.Potion))
				e.AddAction(TypeClass.Alchemist, new CardsDiscardAction(sender as Player, this, String.Format("Put {0} on your deck", this.PhysicalCard), player_Action, false));
		}
Example #2
0
		void player_CardsDiscarding(object sender, CardsDiscardEventArgs e)
		{
			if (!e.Cards.Contains(this.PhysicalCard) || e.GetAction(TypeClass.Herbalist) != null || e.HandledBy.Contains(this) ||
				(e.FromLocation != DeckLocation.InPlay && e.FromLocation != DeckLocation.SetAside && e.FromLocation != DeckLocation.InPlayAndSetAside))
				return;

			if (e.Cards.Any(c => (c.Category & Cards.Category.Treasure) == Cards.Category.Treasure))
				e.AddAction(TypeClass.Herbalist, new CardsDiscardAction(sender as Player, this, "Put a Treasure on your deck", player_Action, false));
		}
Example #3
0
		void player_CardsDiscarding(object sender, CardsDiscardEventArgs e)
		{
			Player player = (Player)sender;
			// Only allow this if no cards were bought this turn
			// We set this up right now because this action happens regardless of whether or not the card is "lost track of"
			if (e.Cards.Contains(this.PhysicalCard) && player.CurrentTurn.CardsBought.Count == 0 && 
				(e.FromLocation == DeckLocation.InPlay || e.FromLocation == DeckLocation.SetAside || e.FromLocation == DeckLocation.InPlayAndSetAside))
				_ShouldBeTrashed = true;

			if (e.GetAction(TypeClass.Hermit) != null || !_ShouldBeTrashed)
				return;

			e.AddAction(TypeClass.Hermit, new CardsDiscardAction(sender as Player, this, String.Format("Trash {0}", this.PhysicalCard), player_Action, true));
		}
		void player_CardsDiscarded(object sender, CardsDiscardEventArgs e)
		{
			Player player = sender as Player;

			// Already being processed or been handled -- don't need to process this one
			if (e.GetAction(TypeClass.Tunnel) != null || e.HandledBy.Contains(this))
				return;

			if (e.Cards.Contains(this.PhysicalCard) && player.Phase != PhaseEnum.Cleanup)
				e.AddAction(TypeClass.Tunnel, new CardsDiscardAction(this.Owner, this, String.Format("Reveal {0}", this.PhysicalCard), player_DiscardTunnel, false));
		}
		void player_CardsDiscarding(object sender, CardsDiscardEventArgs e)
		{
			Player player = (Player)sender;
			foreach (Card card in _CardsToTopDeck)
			{
				if (e.GetAction(TypeClass.Scheme, card.CardType) != null || player.ResolveDeck(e.FromLocation)[c => c == card].Count == 0)
					continue;

				e.AddAction(TypeClass.Scheme, card.CardType, new CardsDiscardAction(player, this, String.Format("Put {0} on your deck", card), player_DiscardAction, true) { Data = card });
			}
		}
Example #6
0
		void player_CardsDiscarding(object sender, CardsDiscardEventArgs e)
		{
			if (!e.Cards.Contains(this.PhysicalCard) || e.GetAction(TypeClass.Treasury) != null || e.HandledBy.Contains(this) ||
				(e.FromLocation != DeckLocation.InPlay && e.FromLocation != DeckLocation.SetAside && e.FromLocation != DeckLocation.InPlayAndSetAside))
				return;

			// Only allow this if no Victory cards were bought this turn
			if (!((sender as Player).CurrentTurn.CardsBought.Any(c => (c.Category & Cards.Category.Victory) == Cards.Category.Victory)))
				e.AddAction(TypeClass.Treasury, new CardsDiscardAction(sender as Player, this, String.Format("Put {0} on your deck", this.PhysicalCard), player_Action, false));
		}