示例#1
0
  /*
   * (non-Javadoc)
   *
   * @see forge.card.cost.CostPart#toString()
   */
  @Override
  public final String toString() {
    final StringBuilder sb = new StringBuilder();
    sb.append("Return ");

    final Integer i = this.convertAmount();
    String pronoun = "its";

    if (this.payCostFromSource()) {
      sb.append(this.getType());
    } else {
      final String desc =
          this.getTypeDescription() == null ? this.getType() : this.getTypeDescription();
      if (i != null) {
        sb.append(Cost.convertIntAndTypeToWords(i, desc));
        if (i > 1) {
          pronoun = "their";
        }
      } else {
        sb.append(Cost.convertAmountTypeToWords(this.getAmount(), desc));
      }

      sb.append(" you control");
    }
    sb.append(" to ").append(pronoun).append(" owner's hand");
    return sb.toString();
  }
 /*
  * (non-Javadoc)
  *
  * @see forge.card.cost.CostPart#toString()
  */
 @Override
 public final String toString() {
   final StringBuilder sb = new StringBuilder();
   final String desc =
       this.getTypeDescription() == null ? this.getType() : this.getTypeDescription();
   sb.append("Gain control of ").append(Cost.convertAmountTypeToWords(this.getAmount(), desc));
   return sb.toString();
 }