public override string ToString(Card card) { StringBuilder toStringBuilder = new StringBuilder(); if ((EnergyCost > 0) || (_additionalCosts == null) || (_additionalCosts.Count == 0)) { toStringBuilder.Append("{"); toStringBuilder.Append(EnergyCost.ToString()); toStringBuilder.Append("}"); if ((_additionalCosts != null) && (_additionalCosts.Count > 0)) { toStringBuilder.Append(", "); } } if (_additionalCosts != null) { List <string> additionalCostStrings = new List <string>(); foreach (AlternateCost cost in _additionalCosts) { additionalCostStrings.Add(cost.ToString(card, true)); } toStringBuilder.Append(string.Join(", ", additionalCostStrings)); } toStringBuilder.Append(": "); toStringBuilder.Append(Effect.ToString(card, true)); toStringBuilder.Append("."); return(toStringBuilder.ToString()); }
public override int GetHashCode() { int hash = 1; if (CellId != 0) { hash ^= CellId.GetHashCode(); } if (TrainerId != 0L) { hash ^= TrainerId.GetHashCode(); } if (EnergyCost != 0) { hash ^= EnergyCost.GetHashCode(); } if (OrbCost != 0) { hash ^= OrbCost.GetHashCode(); } if (X != 0) { hash ^= X.GetHashCode(); } if (Y != 0) { hash ^= Y.GetHashCode(); } if (Z != 0) { hash ^= Z.GetHashCode(); } if (AbilityId != 0L) { hash ^= AbilityId.GetHashCode(); } hash ^= conditionIds_.GetHashCode(); if (ScheduleId.Length != 0) { hash ^= ScheduleId.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public bool Equals(DestinyEnergyCostEntry input) { if (input == null) { return(false); } return (( EnergyCost == input.EnergyCost || (EnergyCost.Equals(input.EnergyCost)) ) && ( EnergyTypeHash == input.EnergyTypeHash || (EnergyTypeHash.Equals(input.EnergyTypeHash)) ) && ( EnergyType == input.EnergyType || (EnergyType != null && EnergyType.Equals(input.EnergyType)) )); }