(String details)
| 25 | } |
| 26 | |
| 27 | @Override |
| 28 | protected void parse(String details) { |
| 29 | String[] k = details.split(":"); |
| 30 | super.parse(k[0]); |
| 31 | |
| 32 | if (k.length > 2) { |
| 33 | desc = k[1]; |
| 34 | final StringBuilder sb = new StringBuilder(); |
| 35 | sb.append("Exile ").append(k[2]).append(" from among permanents you control and/or cards in your graveyard"); |
| 36 | reminder = sb.toString(); |
| 37 | } else { |
| 38 | CostExile exile = cost.getCostPartByType(CostExile.class); |
| 39 | final StringBuilder sb = new StringBuilder(); |
| 40 | int xmin = cost.getCostMana().getXMin(); |
| 41 | if (xmin > 0) { |
| 42 | sb.append(Lang.getNumeral(xmin)).append(" or more"); |
| 43 | } else if (!"1".equals(exile.getAmount())) { |
| 44 | sb.append(Lang.getNumeral(Integer.parseInt(exile.getAmount()))); |
| 45 | } |
| 46 | if (exile.getTypeDescription() != null) { |
| 47 | // permanent are skipped in desc |
| 48 | if (!"permanent".equals(exile.getTypeDescription())) { |
| 49 | sb.append(" "); |
| 50 | sb.append(exile.getTypeDescription()); |
| 51 | } |
| 52 | } else { |
| 53 | sb.append(" "); |
| 54 | String partType = exile.getType(); |
| 55 | //consume .Other from most partTypes |
| 56 | if (partType.contains(".Other")) partType = partType.replace(".Other", ""); |
| 57 | // try to guess plural |
| 58 | if (xmin > 0 || !"1".equals(exile.getAmount())) { |
| 59 | sb.append(CardType.getPluralType(partType)); |
| 60 | } else { |
| 61 | sb.append(Lang.getInstance().formatValidDesc(partType)); |
| 62 | } |
| 63 | } |
| 64 | desc = sb.toString(); |
| 65 | reminder = exile.exileMultiZoneCostString(true, xmin); |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | @Override |
| 70 | protected String formatReminderText(String reminderText) { |
nothing calls this directly
no test coverage detected