- Fixed the description of exile from graveyard/hand costs.

This commit is contained in:
Sloth
2011-08-26 16:22:52 +00:00
parent 7ed5437a5d
commit cf913c6dc3

View File

@@ -40,25 +40,39 @@ public class CostExile extends CostPartWithList {
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
Integer i = convertAmount();
sb.append("Exile "); sb.append("Exile ");
if (getThis()) { if (getThis()) {
sb.append(type); sb.append(type);
if (!from.equals("Battlefield")){
sb.append(" from your ").append(from);
} }
else{ return sb.toString();
Integer i = convertAmount();
String desc = typeDescription == null ? type : typeDescription;
sb.append(Cost.convertAmountTypeToWords(i, amount, desc));
} }
if (from.equals("Battlefield")){ if (from.equals("Battlefield")){
String desc = typeDescription == null ? type : typeDescription;
sb.append(Cost.convertAmountTypeToWords(i, amount, desc));
if (!getThis()) if (!getThis())
sb.append(" you control"); sb.append(" you control");
return sb.toString();
}
if (i != null) {
sb.append(i);
} else {
sb.append(amount);
}
if(!type.equals("Card")) {
sb.append(" " + type);
}
sb.append(" card");
if(i == null || i > 1) {
sb.append("s");
} }
else{
sb.append(" from your ").append(from); sb.append(" from your ").append(from);
}
return sb.toString(); return sb.toString();
} }