示例#1
0
        public CostComputeEventArgs(ICard card, Cards.Cost cost)
        {
            if (card == null || cost == (Cards.Cost)null)
            {
                return;
            }

            this.Card = card;
            this.Cost = cost.Clone();
        }
示例#2
0
		public CostComputeEventArgs(ICard card, Cards.Cost cost)
		{
			if (card == null || cost == (Cards.Cost)null)
				return;

			this.Card = card;
			this.Cost = cost.Clone();
		}
示例#3
0
		internal int CompareTo(Cost other)
		{
			// Check for null
			if (ReferenceEquals(other, null))
				return -1;

			// Check for same reference
			if (ReferenceEquals(this, other))
				return 0;

			if (this.Coin == other.Coin)
				return this.Potion.CompareTo(other.Potion);
			return this.Coin.CompareTo(other.Coin);
		}
示例#4
0
		public static Cost operator -(Cost x, DominionBase.Currencies.Potion y)
		{
			Cost c = new Cost(x.Coin, x.Potion);
			c.Potion -= y;
			return c;
		}
示例#5
0
		public static Cost operator +(Cost x, DominionBase.Currency y)
		{
			Cost c = new Cost(x.Coin, x.Potion);
			c.Coin += y.Coin;
			c.Potion += y.Potion;
			return c;
		}
示例#6
0
		public static Cost operator -(Cost x, Cost y)
		{
			Cost c = new Cost(x.Coin, x.Potion);
			c.Coin -= y.Coin;
			c.Potion -= y.Potion;
			return c;
		}
示例#7
0
 public Currency(Cards.Cost cost)
     : this(cost.Coin, cost.Potion)
 {
 }