mirror of
https://github.com/magefree/mage.git
synced 2026-01-24 12:19:59 -08:00
Improved fix for subtype/supertype display issue
This commit is contained in:
parent
9d4746c318
commit
e1fdae81e2
3 changed files with 7 additions and 18 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue