"); + buffer.append(card.getDisplayName()); + buffer.append(" | "); + if (!card.isSplitCard()) { + buffer.append(castingCost); + } + buffer.append(" |
"); + buffer.append(getTypes(card)); + buffer.append(" | "); + switch (card.getRarity()) { + case RARE: + buffer.append(""); + break; + case UNCOMMON: + buffer.append(""); + break; + case COMMON: + buffer.append(""); + break; + case MYTHIC: + buffer.append(""); + break; + } + String rarity = card.getRarity().getCode(); + if (card.getExpansionSetCode() != null) { + buffer.append(ManaSymbols.replaceSetCodeWithHTML(card.getExpansionSetCode().toUpperCase(), rarity)); + } + buffer.append(" |
"); + buffer.append(pt).append(" | "); + buffer.append(""); + if (!card.isControlledByOwner()) { + buffer.append("[only controlled] "); + } + buffer.append(card.getMageObjectType().toString()).append(" | "); + buffer.append("
"); + rule.append(card.getLeftSplitName()); + rule.append(" | "); + rule.append(card.getLeftSplitCosts().getText()); + rule.append(" |
").append(ruling).append("
"); + } + } + rule.append(""); + rule.append(card.getRightSplitName()); + rule.append(" | "); + rule.append(card.getRightSplitCosts().getText()); + rule.append(" |
").append(ruling).append("
"); + } + } + } + if (rulings.size() > 0) { + for (String ruling : rulings) { + if (ruling != null && !ruling.replace(".", "").trim().isEmpty()) { + rule.append("").append(ruling).append("
"); + } + } + } + + String legal = rule.toString(); + if (legal.length() > 0) { +// this 2 replaces were only done with the empty string, is it any longer needed? (LevelX2) +// legal = legal.replaceAll("#([^#]+)#", "$1"); +// legal = legal.replaceAll("\\s*//\\s*", ""); - buffer.append(card.getDisplayName()); - buffer.append(" | "); - if (!card.isSplitCard()) { - buffer.append(castingCost); - } - buffer.append(" |
"); - buffer.append(getTypes(card)); - buffer.append(" | "); - switch (card.getRarity()) { - case RARE: - buffer.append(""); - break; - case UNCOMMON: - buffer.append(""); - break; - case COMMON: - buffer.append(""); - break; - case MYTHIC: - buffer.append(""); - break; - } - String rarity = card.getRarity().getCode(); - if (card.getExpansionSetCode() != null) { - buffer.append(ManaSymbols.replaceSetCodeWithHTML(card.getExpansionSetCode().toUpperCase(), rarity)); - } - buffer.append(" |
"); - buffer.append(pt).append(" | "); - buffer.append(""); - if (!card.isControlledByOwner()) { - buffer.append("[only controlled] "); - } - buffer.append(card.getMageObjectType().toString()).append(" | "); - buffer.append("
"); - rule.append(card.getLeftSplitName()); - rule.append(" | "); - rule.append(card.getLeftSplitCosts().getText()); - rule.append(" |
").append(ruling).append("
"); - } - } - rule.append(""); - rule.append(card.getRightSplitName()); - rule.append(" | "); - rule.append(card.getRightSplitCosts().getText()); - rule.append(" |
").append(ruling).append("
"); - } - } - } - if (rulings.size() > 0) { - for (String ruling : rulings) { - if (ruling != null && !ruling.replace(".", "").trim().isEmpty()) { - rule.append("").append(ruling).append("
"); - } - } - } - - String legal = rule.toString(); - if (legal.length() > 0) { -// this 2 replaces were only done with the empty string, is it any longer needed? (LevelX2) -// legal = legal.replaceAll("#([^#]+)#", "$1"); -// legal = legal.replaceAll("\\s*//\\s*", "