forked from External/mage
Added frameStyle Characteristic for cards
* Added FrameStyle Enum containing a list of styles that cards can be rendered in. * Added getFrameStyle() getter to Card interface. * Implemented getFrameStyle() for various concrete implementations of Card.
This commit is contained in:
parent
0ea9d33211
commit
b549dfe0dc
12 changed files with 115 additions and 3 deletions
|
|
@ -36,6 +36,7 @@ import java.util.ArrayList;
|
|||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import mage.cards.FrameStyle;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.ObjectColor;
|
||||
|
|
@ -100,6 +101,8 @@ public class CardInfo {
|
|||
@DatabaseField
|
||||
protected String frameColor;
|
||||
@DatabaseField
|
||||
protected String frameStyle;
|
||||
@DatabaseField
|
||||
protected boolean splitCard;
|
||||
@DatabaseField
|
||||
protected boolean splitCardHalf;
|
||||
|
|
@ -138,6 +141,7 @@ public class CardInfo {
|
|||
this.secondSideName = secondSide.getName();
|
||||
}
|
||||
|
||||
this.frameStyle = card.getFrameStyle().toString();
|
||||
this.frameColor = card.getFrameColor(null).toString();
|
||||
this.blue = card.getColor(null).isBlue();
|
||||
this.black = card.getColor(null).isBlack();
|
||||
|
|
@ -227,6 +231,10 @@ public class CardInfo {
|
|||
return new ObjectColor(frameColor);
|
||||
}
|
||||
|
||||
public FrameStyle getFrameStyle() {
|
||||
return FrameStyle.valueOf(this.frameStyle);
|
||||
}
|
||||
|
||||
private String joinList(List<String> items) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (Object item : items) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue