mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
fix exc building text for FatPackTemplate that has no lands
This commit is contained in:
@@ -67,19 +67,18 @@ public class FatPackTemplate extends SealedProductTemplate {
|
|||||||
if (0 >= cntBoosters) {
|
if (0 >= cntBoosters) {
|
||||||
return "no cards";
|
return "no cards";
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder s = new StringBuilder();
|
StringBuilder s = new StringBuilder();
|
||||||
|
if (0 < cntBoosters) {
|
||||||
|
s.append(cntBoosters).append(" booster packs, ");
|
||||||
|
}
|
||||||
|
|
||||||
for(Pair<String, Integer> p : slots) {
|
for(Pair<String, Integer> p : slots) {
|
||||||
s.append(p.getRight()).append(" ").append(p.getLeft()).append(", ");
|
s.append(p.getRight()).append(" ").append(p.getLeft()).append(", ");
|
||||||
}
|
}
|
||||||
// trim the last comma and space
|
// trim the last comma and space
|
||||||
s.replace(s.length() - 2, s.length(), "");
|
s.replace(s.length() - 2, s.length(), "");
|
||||||
|
|
||||||
s.append(" and ");
|
|
||||||
if (0 < cntBoosters) {
|
|
||||||
s.append(cntBoosters).append(" booster packs");
|
|
||||||
}
|
|
||||||
|
|
||||||
return s.toString();
|
return s.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user