Improved fix for subtype/supertype display issue

This commit is contained in:
North 2013-07-07 15:19:14 +03:00
parent 9d4746c318
commit e1fdae81e2
3 changed files with 7 additions and 18 deletions

View file

@ -20,15 +20,8 @@ public class MockCard extends CardImpl<MockCard> {
this.toughness = mageIntFromString(card.getToughness());
this.rarity = card.getRarity();
this.cardType = card.getTypes();
// dont copy list with empty element (would be better to eliminate earlier but I don't know how (LevelX2))
if (card.getSubTypes().get(0).length() >0) {
// empty element leads to added "-" after cardtype.
this.subtype = card.getSubTypes();
}
if (card.getSupertypes().get(0).length() >0) {
// empty element leads to blank before Card Type.
this.supertype = card.getSupertypes();
}
this.subtype = card.getSubTypes();
this.supertype = card.getSupertypes();
this.usesVariousArt = card.usesVariousArt();

View file

@ -28,15 +28,8 @@ public class MockSplitCard extends SplitCard<MockSplitCard> {
this.power = mageIntFromString(card.getPower());
this.toughness = mageIntFromString(card.getToughness());
this.cardType = card.getTypes();
// dont copy list with empty element (would be better to eliminate earlier but I don't know how (LevelX2))
if (card.getSubTypes().get(0).length() >0) {
// empty element leads to added "-" after cardtype.
this.subtype = card.getSubTypes();
}
if (card.getSupertypes().get(0).length() >0) {
// empty element leads to blank before Card Type.
this.supertype = card.getSupertypes();
}
this.subtype = card.getSubTypes();
this.supertype = card.getSupertypes();
this.usesVariousArt = card.usesVariousArt();

View file

@ -185,6 +185,9 @@ public class CardInfo {
}
private List<String> parseList(String list) {
if (list.isEmpty()) {
return new ArrayList<String>();
}
return Arrays.asList(list.split(SEPARATOR));
}