Merge pull request #2234 from stravant/master

Characteristic-Based rendering initial release completed unless further bugs come up before then.
This commit is contained in:
Mark Langen 2016-09-07 23:16:10 -06:00 committed by GitHub
commit 8d90f4558d
70 changed files with 518 additions and 115 deletions

View file

@ -66,6 +66,9 @@ public class CardPanelRenderImpl extends CardPanel {
if (!a.getExpansionSetCode().equals(b.getExpansionSetCode())) { if (!a.getExpansionSetCode().equals(b.getExpansionSetCode())) {
return false; return false;
} }
if (a.getFrameStyle() != b.getFrameStyle()) {
return false;
}
if (a.getCounters() == null) { if (a.getCounters() == null) {
if (b.getCounters() != null) { if (b.getCounters() != null) {
return false; return false;
@ -121,6 +124,7 @@ public class CardPanelRenderImpl extends CardPanel {
sb.append((char) (this.view.isPlayable() ? 1 : 0)); sb.append((char) (this.view.isPlayable() ? 1 : 0));
sb.append((char) (this.view.isCanAttack() ? 1 : 0)); sb.append((char) (this.view.isCanAttack() ? 1 : 0));
sb.append((char) (this.view.isFaceDown() ? 1 : 0)); sb.append((char) (this.view.isFaceDown() ? 1 : 0));
sb.append((char) this.view.getFrameStyle().ordinal());
if (this.view instanceof PermanentView) { if (this.view instanceof PermanentView) {
sb.append((char) (((PermanentView) this.view).hasSummoningSickness() ? 1 : 0)); sb.append((char) (((PermanentView) this.view).hasSummoningSickness() ? 1 : 0));
sb.append((char) (((PermanentView) this.view).getDamage())); sb.append((char) (((PermanentView) this.view).getDamage()));
@ -378,6 +382,24 @@ public class CardPanelRenderImpl extends CardPanel {
} }
} }
@Override
public void setSelected(boolean selected) {
if (selected != isSelected()) {
super.setSelected(selected);
// Invalidate our render
cardImage = null;
}
}
@Override
public void setChoosable(boolean choosable) {
if (choosable != isChoosable()) {
super.setChoosable(choosable);
// Invalidate our render
cardImage = null;
}
}
@Override @Override
public Image getImage() { public Image getImage() {
if (artImage != null) { if (artImage != null) {

View file

@ -20,8 +20,9 @@ import java.awt.font.LineBreakMeasurer;
import java.awt.font.TextAttribute; import java.awt.font.TextAttribute;
import java.awt.font.TextLayout; import java.awt.font.TextLayout;
import java.awt.font.TextMeasurer; import java.awt.font.TextMeasurer;
import java.awt.geom.RoundRectangle2D; import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.awt.image.RasterFormatException;
import java.io.IOException; import java.io.IOException;
import java.net.URL; import java.net.URL;
import java.text.AttributedCharacterIterator; import java.text.AttributedCharacterIterator;
@ -159,12 +160,17 @@ public class ModernCardRenderer extends CardRenderer {
// How far down the card is the type line placed? // How far down the card is the type line placed?
protected static float TYPE_LINE_Y_FRAC = 0.57f; // x cardHeight protected static float TYPE_LINE_Y_FRAC = 0.57f; // x cardHeight
protected static float TYPE_LINE_Y_FRAC_TOKEN = 0.70f; protected static float TYPE_LINE_Y_FRAC_TOKEN = 0.70f;
protected static float TYPE_LINE_Y_FRAC_FULL_ART = 0.74f;
protected int typeLineY; protected int typeLineY;
// Possible sizes of rules text font
protected static int[] RULES_TEXT_FONT_SIZES = {24, 18, 15, 12, 9};
// How large is the box text, and how far is it down the boxes // How large is the box text, and how far is it down the boxes
protected int boxTextHeight; protected int boxTextHeight;
protected int boxTextOffset; protected int boxTextOffset;
protected Font boxTextFont; protected Font boxTextFont;
protected Font boxTextFontNarrow;
// How large is the P/T text, and how far is it down the boxes // How large is the P/T text, and how far is it down the boxes
protected int ptTextHeight; protected int ptTextHeight;
@ -202,29 +208,26 @@ public class ModernCardRenderer extends CardRenderer {
BOX_HEIGHT_FRAC * cardHeight); BOX_HEIGHT_FRAC * cardHeight);
// Type line at // Type line at
if (cardView.isToken()) { typeLineY = (int)(getTypeLineYFrac() * cardHeight);
typeLineY = (int) (TYPE_LINE_Y_FRAC_TOKEN * cardHeight);
} else {
typeLineY = (int) (TYPE_LINE_Y_FRAC * cardHeight);
}
// Box text height // Box text height
boxTextHeight = getTextHeightForBoxHeight(boxHeight); boxTextHeight = getTextHeightForBoxHeight(boxHeight);
boxTextOffset = (boxHeight - boxTextHeight) / 2; boxTextOffset = (boxHeight - boxTextHeight) / 2;
boxTextFont = BASE_BELEREN_FONT.deriveFont(Font.PLAIN, boxTextHeight); // Not using Beleren for now because it looks bad at small font sizes. Maybe we want to in the future?
//boxTextFont = BASE_BELEREN_FONT.deriveFont(Font.PLAIN, boxTextHeight);
boxTextFont = new Font("Arial", Font.PLAIN, boxTextHeight);
boxTextFontNarrow = new Font("Arial Narrow", Font.PLAIN, boxTextHeight);
// Box text height // Box text height
ptTextHeight = getPTTextHeightForLineHeight(boxHeight); ptTextHeight = getPTTextHeightForLineHeight(boxHeight);
ptTextOffset = (boxHeight - ptTextHeight) / 2; ptTextOffset = (boxHeight - ptTextHeight) / 2;
// Beleren font does work well for numbers though
ptTextFont = BASE_BELEREN_FONT.deriveFont(Font.PLAIN, ptTextHeight); ptTextFont = BASE_BELEREN_FONT.deriveFont(Font.PLAIN, ptTextHeight);
} }
@Override @Override
protected void drawBorder(Graphics2D g) { protected void drawBorder(Graphics2D g) {
// Draw border as one rounded rectangle
g.setColor(Color.black);
g.fillRoundRect(0, 0, cardWidth, cardHeight, cornerRadius, cornerRadius);
// Selection Borders // Selection Borders
Color borderColor; Color borderColor;
if (isSelected) { if (isSelected) {
@ -233,11 +236,17 @@ public class ModernCardRenderer extends CardRenderer {
borderColor = new Color(250, 250, 0, 230); borderColor = new Color(250, 250, 0, 230);
} else if (cardView.isPlayable()) { } else if (cardView.isPlayable()) {
borderColor = new Color(153, 102, 204, 200); borderColor = new Color(153, 102, 204, 200);
} else if (cardView instanceof PermanentView && ((PermanentView) cardView).isCanAttack()) { } else if (cardView.isCanAttack()) {
borderColor = new Color(0, 0, 255, 230); borderColor = new Color(0, 0, 255, 230);
} else { } else {
borderColor = null; borderColor = Color.BLACK;
} }
// Draw border as one rounded rectangle
g.setColor(borderColor);
g.fillRoundRect(0, 0, cardWidth, cardHeight, cornerRadius, cornerRadius);
/* // Separate selection highlight border from card itself. Not used right now
if (borderColor != null) { if (borderColor != null) {
float hwidth = borderWidth / 2.0f; float hwidth = borderWidth / 2.0f;
Graphics2D g2 = (Graphics2D) g.create(); Graphics2D g2 = (Graphics2D) g.create();
@ -251,6 +260,7 @@ public class ModernCardRenderer extends CardRenderer {
g2.draw(rect); g2.draw(rect);
g2.dispose(); g2.dispose();
} }
*/
} }
@Override @Override
@ -283,19 +293,63 @@ public class ModernCardRenderer extends CardRenderer {
} }
} }
/**
* Get the region to slice out of a source art image for the card
* @return
*/
private Rectangle2D getArtRect() {
Rectangle2D rect;
if (cardView.getFrameStyle().isFullArt() || cardView.isToken()) {
rect = new Rectangle2D.Float(.079f, .11f, .84f, .63f);
} else {
rect = new Rectangle2D.Float(.079f, .11f, .84f, .42f);
}
return rect;
}
private float getTypeLineYFrac() {
if (cardView.isToken()) {
return TYPE_LINE_Y_FRAC_TOKEN;
} else if (cardView.getFrameStyle().isFullArt()) {
return TYPE_LINE_Y_FRAC_FULL_ART;
} else {
return TYPE_LINE_Y_FRAC;
}
}
@Override @Override
protected void drawArt(Graphics2D g) { protected void drawArt(Graphics2D g) {
if (artImage != null && !cardView.isFaceDown()) { if (artImage != null && !cardView.isFaceDown()) {
int imgWidth = artImage.getWidth(); Rectangle2D artRect = getArtRect();
int imgHeight = artImage.getHeight();
// Perform a process to make sure that the art is scaled uniformly to fill the frame, cutting
// off the minimum amount necessary to make it completely fill the frame without "squashing" it.
double fullCardImgWidth = artImage.getWidth();
double fullCardImgHeight = artImage.getHeight();
double artWidth = artRect.getWidth() * fullCardImgWidth;
double artHeight = artRect.getHeight() * fullCardImgHeight;
double targetWidth = contentWidth - 2;
double targetHeight = typeLineY - totalContentInset - boxHeight;
double targetAspect = targetWidth / targetHeight;
if (targetAspect * artHeight < artWidth) {
// Trim off some width
artWidth = targetAspect * artHeight;
} else {
// Trim off some height
artHeight = artWidth / targetAspect;
}
try {
BufferedImage subImg BufferedImage subImg
= artImage.getSubimage( = artImage.getSubimage(
(int) (.079 * imgWidth), (int) (.11 * imgHeight), (int) (artRect.getX() * fullCardImgWidth), (int) (artRect.getY() * fullCardImgHeight),
(int) (.84 * imgWidth), (int) (.42 * imgHeight)); (int) artWidth, (int) artHeight);
g.drawImage(subImg, g.drawImage(subImg,
totalContentInset + 1, totalContentInset + boxHeight, totalContentInset + 1, totalContentInset + boxHeight,
contentWidth - 2, typeLineY - totalContentInset - boxHeight, (int) targetWidth, (int) targetHeight,
null); null);
} catch (RasterFormatException e) {
// At very small card sizes we may encounter a problem with rounding error making the rect not fit
}
} }
} }
@ -414,12 +468,23 @@ public class ModernCardRenderer extends CardRenderer {
} else { } else {
nameStr = cardView.getName(); nameStr = cardView.getName();
} }
if (!nameStr.isEmpty()) {
AttributedString str = new AttributedString(nameStr); AttributedString str = new AttributedString(nameStr);
str.addAttribute(TextAttribute.FONT, boxTextFont); str.addAttribute(TextAttribute.FONT, boxTextFont);
TextMeasurer measure = new TextMeasurer(str.getIterator(), g.getFontRenderContext()); TextMeasurer measure = new TextMeasurer(str.getIterator(), g.getFontRenderContext());
TextLayout layout = measure.getLayout(0, measure.getLineBreakIndex(0, availableWidth)); int breakIndex = measure.getLineBreakIndex(0, availableWidth);
if (breakIndex < nameStr.length()) {
str = new AttributedString(nameStr);
str.addAttribute(TextAttribute.FONT, boxTextFontNarrow);
measure = new TextMeasurer(str.getIterator(), g.getFontRenderContext());
breakIndex = measure.getLineBreakIndex(0, availableWidth);
}
if (breakIndex > 0) {
TextLayout layout = measure.getLayout(0, breakIndex);
g.setColor(getBoxTextColor()); g.setColor(getBoxTextColor());
layout.draw(g, x, y + boxTextOffset + boxTextHeight - 1); layout.draw(g, x, y + boxTextOffset + boxTextHeight - 1);
}
}
// Draw the mana symbols // Draw the mana symbols
if (!cardView.isAbility() && !cardView.isFaceDown()) { if (!cardView.isAbility() && !cardView.isFaceDown()) {
@ -455,11 +520,20 @@ public class ModernCardRenderer extends CardRenderer {
AttributedString str = new AttributedString(types); AttributedString str = new AttributedString(types);
str.addAttribute(TextAttribute.FONT, boxTextFont); str.addAttribute(TextAttribute.FONT, boxTextFont);
TextMeasurer measure = new TextMeasurer(str.getIterator(), g.getFontRenderContext()); TextMeasurer measure = new TextMeasurer(str.getIterator(), g.getFontRenderContext());
TextLayout layout = measure.getLayout(0, measure.getLineBreakIndex(0, availableWidth)); int breakIndex = measure.getLineBreakIndex(0, availableWidth);
if (breakIndex < types.length()) {
str = new AttributedString(types);
str.addAttribute(TextAttribute.FONT, boxTextFontNarrow);
measure = new TextMeasurer(str.getIterator(), g.getFontRenderContext());
breakIndex = measure.getLineBreakIndex(0, availableWidth);
}
if (breakIndex > 0) {
TextLayout layout = measure.getLayout(0, breakIndex);
g.setColor(getBoxTextColor()); g.setColor(getBoxTextColor());
layout.draw(g, x, y + boxTextOffset + boxTextHeight - 1); layout.draw(g, x, y + boxTextOffset + boxTextHeight - 1);
} }
} }
}
// Draw the P/T and/or Loyalty boxes // Draw the P/T and/or Loyalty boxes
protected void drawBottomRight(Graphics2D g, Paint borderPaint, Color fill) { protected void drawBottomRight(Graphics2D g, Paint borderPaint, Color fill) {
@ -475,7 +549,7 @@ public class ModernCardRenderer extends CardRenderer {
int partWidth = (int) Math.max(30, 0.20f * cardWidth); int partWidth = (int) Math.max(30, 0.20f * cardWidth);
// Is it a creature? // Is it a creature?
if (cardView.getCardTypes().contains(CardType.CREATURE)) { if (cardView.getCardTypes().contains(CardType.CREATURE) || cardView.getSubTypes().contains("Vehicle")) {
int x = cardWidth - borderWidth - partWidth; int x = cardWidth - borderWidth - partWidth;
// Draw PT box // Draw PT box
@ -500,12 +574,7 @@ public class ModernCardRenderer extends CardRenderer {
g.drawString(ptText, g.drawString(ptText,
x + (partWidth - ptTextWidth) / 2, curY - ptTextOffset - 1); x + (partWidth - ptTextWidth) / 2, curY - ptTextOffset - 1);
// Does it have damage on it? // Advance
if ((cardView instanceof PermanentView) && ((PermanentView) cardView).getDamage() > 0) {
// Show marked damage
}
curY -= boxHeight; curY -= boxHeight;
} }
@ -583,95 +652,92 @@ public class ModernCardRenderer extends CardRenderer {
// Draw the card's textbox in a given rect // Draw the card's textbox in a given rect
protected boolean loyaltyAbilityColorToggle = false; protected boolean loyaltyAbilityColorToggle = false;
protected void drawRulesText(Graphics2D g, int x, int y, int w, int h) { private class RuleLayout {
// Initial font size to try to render at public List<AttributedString> attributedRules;
Font font = new Font("Arial", Font.PLAIN, 12); public int remainingHeight;
Font fontItalic = new Font("Arial", Font.ITALIC, 12); public boolean fits;
public Font font;
// Handle the keyword rules public Font fontItalic;
boolean hasKeywords = !textboxKeywords.isEmpty();
String keywordRulesString = getKeywordRulesString();
AttributedString keywordRulesAttributed = new AttributedString(keywordRulesString);
if (hasKeywords) {
keywordRulesAttributed.addAttribute(TextAttribute.FONT, font);
} }
// Get the total height /**
* Figure out if a given text size will work for laying out the rules in a card textbox
*/
protected RuleLayout layoutRules(Graphics2D g, List<TextboxRule> rules, int w, int h, int fontSize) {
// The fonts to try
Font font = new Font("Arial", Font.PLAIN, fontSize);
Font fontItalic = new Font("Arial", Font.ITALIC, fontSize);
// Get the total height of the rules
List<AttributedString> attributedRules = new ArrayList<>(); List<AttributedString> attributedRules = new ArrayList<>();
boolean useSmallFont = false; boolean fits = true;
int remaining = h; int remaining = h;
{ for (TextboxRule rule : rules) {
if (hasKeywords) {
remaining -= drawSingleRule(g, keywordRulesAttributed, null, 0, 0, w, remaining, false);
}
for (TextboxRule rule : textboxRules) {
AttributedString attributed = rule.generateAttributedString(font, fontItalic); AttributedString attributed = rule.generateAttributedString(font, fontItalic);
attributedRules.add(attributed); attributedRules.add(attributed);
remaining -= drawSingleRule(g, attributed, rule, 0, 0, w, remaining, false); remaining -= drawSingleRule(g, attributed, rule, 0, 0, w, remaining, /*doDraw=*/false);
if (remaining < 0) { if (remaining < 0) {
useSmallFont = true; fits = false;
break; break;
} }
} }
// Return the information
RuleLayout layout = new RuleLayout();
layout.attributedRules = attributedRules;
layout.remainingHeight = remaining;
layout.fits = fits;
layout.font = font;
layout.fontItalic = fontItalic;
return layout;
} }
// If there wasn't enough room, try using a smaller font protected void drawRulesText(Graphics2D g, int x, int y, int w, int h) {
if (useSmallFont) { // Gather all rules to render
font = new Font("Arial", Font.PLAIN, 9); List<TextboxRule> allRules = new ArrayList<>(textboxRules);
fontItalic = new Font("Arial", Font.ITALIC, 9);
if (hasKeywords) { // Add the keyword rule if there are any keywords
keywordRulesAttributed = new AttributedString(keywordRulesString); if (!textboxKeywords.isEmpty()) {
keywordRulesAttributed.addAttribute(TextAttribute.FONT, font); String keywordRulesString = getKeywordRulesString();
TextboxRule keywordsRule = new TextboxRule(keywordRulesString, new ArrayList<TextboxRule.AttributeRegion>());
allRules.add(keywordsRule);
} }
// Clear out the attributed rules and reatribute them with the new font size // Go through possible font sizes in descending order to find the best fit
attributedRules.clear(); RuleLayout bestLayout = null;
for (TextboxRule rule : textboxRules) { for (int fontSize: RULES_TEXT_FONT_SIZES) {
AttributedString attributed = rule.generateAttributedString(font, fontItalic); bestLayout = layoutRules(g, allRules, w, h, fontSize);
attributedRules.add(attributed);
}
// Get the new spacing for the small text // Stop, we found a good fit
remaining = h; if (bestLayout.fits) {
if (hasKeywords) {
remaining -= drawSingleRule(g, keywordRulesAttributed, null, 0, 0, w, remaining, false);
}
for (TextboxRule rule : textboxRules) {
AttributedString attributed = rule.generateAttributedString(font, fontItalic);
attributedRules.add(attributed);
remaining -= drawSingleRule(g, attributed, rule, 0, 0, w, remaining, false);
if (remaining < 0) {
useSmallFont = true;
break; break;
} }
} }
// Nothing to draw
if (bestLayout == null) {
return;
} }
// Do we have room for additional spacing between the parts of text? // Do we have room for additional padding between the parts of text?
// If so, calculate the spacing based on how much space was left over // If so, calculate the padding based on how much space was left over
int spacing; int padding;
if (remaining <= 0) { if (bestLayout.fits) {
spacing = 0; padding = (int) (((float)bestLayout.remainingHeight) / (1 + allRules.size()));
} else { } else {
spacing = (int) (remaining / (hasKeywords // When the text doesn't fit to begin with there's no room for padding
? (textboxRules.size() + 2) padding = 0;
: (textboxRules.size() + 1)));
} }
// Do the actual draw // Do the actual draw
loyaltyAbilityColorToggle = false; loyaltyAbilityColorToggle = false;
g.setColor(Color.black); g.setColor(Color.black);
int curY = y + spacing; int curY = y + padding;
if (hasKeywords) { for (int i = 0; i < bestLayout.attributedRules.size(); ++i) {
int adv = drawSingleRule(g, keywordRulesAttributed, null, x, curY, w, h, true); AttributedString attributedRule = bestLayout.attributedRules.get(i);
curY += adv + spacing; TextboxRule rule = allRules.get(i);
h -= adv;
}
for (int i = 0; i < textboxRules.size(); ++i) {
TextboxRule rule = textboxRules.get(i);
AttributedString attributedRule = attributedRules.get(i);
int adv = drawSingleRule(g, attributedRule, rule, x, curY, w, h, true); int adv = drawSingleRule(g, attributedRule, rule, x, curY, w, h, true);
curY += adv + spacing; curY += adv + padding;
h -= adv; h -= adv;
if (h < 0) { if (h < 0) {
break; break;
@ -710,7 +776,8 @@ public class ModernCardRenderer extends CardRenderer {
AttributedCharacterIterator newLineCheck = text.getIterator(); AttributedCharacterIterator newLineCheck = text.getIterator();
while (measure.getPosition() < textIter.getEndIndex()) { while (measure.getPosition() < textIter.getEndIndex()) {
// Advance iterator to next line break // Advance iterator to next line break
char ch = newLineCheck.setIndex(measure.getPosition()); newLineCheck.setIndex(measure.getPosition());
char ch;
while ((ch = newLineCheck.next()) != CharacterIterator.DONE) { while ((ch = newLineCheck.next()) != CharacterIterator.DONE) {
if (ch == '\n') { if (ch == '\n') {
break; break;

View file

@ -30,12 +30,14 @@ package mage.view;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
import mage.MageObject; import mage.MageObject;
import mage.ObjectColor; import mage.ObjectColor;
import mage.abilities.Mode; import mage.abilities.Mode;
import mage.abilities.SpellAbility; import mage.abilities.SpellAbility;
import mage.abilities.costs.mana.ManaCosts; import mage.abilities.costs.mana.ManaCosts;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.FrameStyle;
import mage.cards.SplitCard; import mage.cards.SplitCard;
import mage.constants.AbilityType; import mage.constants.AbilityType;
import mage.constants.CardType; import mage.constants.CardType;
@ -53,6 +55,7 @@ import mage.game.stack.Spell;
import mage.game.stack.StackAbility; import mage.game.stack.StackAbility;
import mage.target.Target; import mage.target.Target;
import mage.target.Targets; import mage.target.Targets;
import org.apache.log4j.Logger;
/** /**
* @author BetaSteward_at_googlemail.com * @author BetaSteward_at_googlemail.com
@ -74,6 +77,7 @@ public class CardView extends SimpleCardView {
protected List<String> superTypes; protected List<String> superTypes;
protected ObjectColor color; protected ObjectColor color;
protected ObjectColor frameColor; protected ObjectColor frameColor;
protected FrameStyle frameStyle;
protected List<String> manaCost; protected List<String> manaCost;
protected int convertedManaCost; protected int convertedManaCost;
protected Rarity rarity; protected Rarity rarity;
@ -336,6 +340,9 @@ public class CardView extends SimpleCardView {
// Frame color // Frame color
this.frameColor = card.getFrameColor(game); this.frameColor = card.getFrameColor(game);
// Frame style
this.frameStyle = card.getFrameStyle();
// Get starting loyalty // Get starting loyalty
this.startingLoyalty = "" + card.getStartingLoyalty(); this.startingLoyalty = "" + card.getStartingLoyalty();
} }
@ -384,6 +391,8 @@ public class CardView extends SimpleCardView {
} }
// Frame color // Frame color
this.frameColor = object.getFrameColor(null); this.frameColor = object.getFrameColor(null);
// Frame style
this.frameStyle = object.getFrameStyle();
// Starting loyalty. Must be extracted from an ability // Starting loyalty. Must be extracted from an ability
this.startingLoyalty = "" + object.getStartingLoyalty(); this.startingLoyalty = "" + object.getStartingLoyalty();
} }
@ -401,6 +410,7 @@ public class CardView extends SimpleCardView {
this.displayName = name; this.displayName = name;
this.rules = emblem.getRules(); this.rules = emblem.getRules();
// emblem images are always with common (black) symbol // emblem images are always with common (black) symbol
this.frameStyle = FrameStyle.M15_NORMAL;
this.expansionSetCode = emblem.getExpansionSetCode(); this.expansionSetCode = emblem.getExpansionSetCode();
this.rarity = Rarity.COMMON; this.rarity = Rarity.COMMON;
} }
@ -426,6 +436,7 @@ public class CardView extends SimpleCardView {
this.superTypes = new ArrayList<>(); this.superTypes = new ArrayList<>();
this.color = new ObjectColor(); this.color = new ObjectColor();
this.frameColor = new ObjectColor(); this.frameColor = new ObjectColor();
this.frameStyle = FrameStyle.M15_NORMAL;
this.manaCost = new ArrayList<>(); this.manaCost = new ArrayList<>();
this.convertedManaCost = 0; this.convertedManaCost = 0;
@ -472,6 +483,7 @@ public class CardView extends SimpleCardView {
this.superTypes = token.getSupertype(); this.superTypes = token.getSupertype();
this.color = token.getColor(null); this.color = token.getColor(null);
this.frameColor = token.getFrameColor(null); this.frameColor = token.getFrameColor(null);
this.frameStyle = token.getFrameStyle();
this.manaCost = token.getManaCost().getSymbols(); this.manaCost = token.getManaCost().getSymbols();
this.rarity = Rarity.NA; this.rarity = Rarity.NA;
this.type = token.getTokenType(); this.type = token.getTokenType();
@ -560,6 +572,10 @@ public class CardView extends SimpleCardView {
return frameColor; return frameColor;
} }
public FrameStyle getFrameStyle() {
return frameStyle;
}
public List<String> getManaCost() { public List<String> getManaCost() {
return manaCost; return manaCost;
} }

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.battleforzendikar; package mage.sets.battleforzendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Forest10 extends mage.cards.basiclands.Forest {
public Forest10(UUID ownerId) { public Forest10(UUID ownerId) {
super(ownerId, "274b"); super(ownerId, "274b");
this.expansionSetCode = "BFZ"; this.expansionSetCode = "BFZ";
this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC;
} }
public Forest10(final Forest10 card) { public Forest10(final Forest10 card) {

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.battleforzendikar; package mage.sets.battleforzendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Forest6 extends mage.cards.basiclands.Forest {
public Forest6(UUID ownerId) { public Forest6(UUID ownerId) {
super(ownerId, "270b"); super(ownerId, "270b");
this.expansionSetCode = "BFZ"; this.expansionSetCode = "BFZ";
this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC;
} }
public Forest6(final Forest6 card) { public Forest6(final Forest6 card) {

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.battleforzendikar; package mage.sets.battleforzendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Forest7 extends mage.cards.basiclands.Forest {
public Forest7(UUID ownerId) { public Forest7(UUID ownerId) {
super(ownerId, "271b"); super(ownerId, "271b");
this.expansionSetCode = "BFZ"; this.expansionSetCode = "BFZ";
this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC;
} }
public Forest7(final Forest7 card) { public Forest7(final Forest7 card) {

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.battleforzendikar; package mage.sets.battleforzendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Forest8 extends mage.cards.basiclands.Forest {
public Forest8(UUID ownerId) { public Forest8(UUID ownerId) {
super(ownerId, "272b"); super(ownerId, "272b");
this.expansionSetCode = "BFZ"; this.expansionSetCode = "BFZ";
this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC;
} }
public Forest8(final Forest8 card) { public Forest8(final Forest8 card) {

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.battleforzendikar; package mage.sets.battleforzendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Forest9 extends mage.cards.basiclands.Forest {
public Forest9(UUID ownerId) { public Forest9(UUID ownerId) {
super(ownerId, "273b"); super(ownerId, "273b");
this.expansionSetCode = "BFZ"; this.expansionSetCode = "BFZ";
this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC;
} }
public Forest9(final Forest9 card) { public Forest9(final Forest9 card) {

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.battleforzendikar; package mage.sets.battleforzendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Island10 extends mage.cards.basiclands.Island {
public Island10(UUID ownerId) { public Island10(UUID ownerId) {
super(ownerId, "259b"); super(ownerId, "259b");
this.expansionSetCode = "BFZ"; this.expansionSetCode = "BFZ";
this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC;
} }
public Island10(final Island10 card) { public Island10(final Island10 card) {

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.battleforzendikar; package mage.sets.battleforzendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Island6 extends mage.cards.basiclands.Island {
public Island6(UUID ownerId) { public Island6(UUID ownerId) {
super(ownerId, "255b"); super(ownerId, "255b");
this.expansionSetCode = "BFZ"; this.expansionSetCode = "BFZ";
this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC;
} }
public Island6(final Island6 card) { public Island6(final Island6 card) {

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.battleforzendikar; package mage.sets.battleforzendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Island7 extends mage.cards.basiclands.Island {
public Island7(UUID ownerId) { public Island7(UUID ownerId) {
super(ownerId, "256b"); super(ownerId, "256b");
this.expansionSetCode = "BFZ"; this.expansionSetCode = "BFZ";
this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC;
} }
public Island7(final Island7 card) { public Island7(final Island7 card) {

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.battleforzendikar; package mage.sets.battleforzendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Island8 extends mage.cards.basiclands.Island {
public Island8(UUID ownerId) { public Island8(UUID ownerId) {
super(ownerId, "257b"); super(ownerId, "257b");
this.expansionSetCode = "BFZ"; this.expansionSetCode = "BFZ";
this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC;
} }
public Island8(final Island8 card) { public Island8(final Island8 card) {

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.battleforzendikar; package mage.sets.battleforzendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Island9 extends mage.cards.basiclands.Island {
public Island9(UUID ownerId) { public Island9(UUID ownerId) {
super(ownerId, "258b"); super(ownerId, "258b");
this.expansionSetCode = "BFZ"; this.expansionSetCode = "BFZ";
this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC;
} }
public Island9(final Island9 card) { public Island9(final Island9 card) {

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.battleforzendikar; package mage.sets.battleforzendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Mountain10 extends mage.cards.basiclands.Mountain {
public Mountain10(UUID ownerId) { public Mountain10(UUID ownerId) {
super(ownerId, "269b"); super(ownerId, "269b");
this.expansionSetCode = "BFZ"; this.expansionSetCode = "BFZ";
this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC;
} }
public Mountain10(final Mountain10 card) { public Mountain10(final Mountain10 card) {

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.battleforzendikar; package mage.sets.battleforzendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Mountain6 extends mage.cards.basiclands.Mountain {
public Mountain6(UUID ownerId) { public Mountain6(UUID ownerId) {
super(ownerId, "265b"); super(ownerId, "265b");
this.expansionSetCode = "BFZ"; this.expansionSetCode = "BFZ";
this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC;
} }
public Mountain6(final Mountain6 card) { public Mountain6(final Mountain6 card) {

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.battleforzendikar; package mage.sets.battleforzendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Mountain7 extends mage.cards.basiclands.Mountain {
public Mountain7(UUID ownerId) { public Mountain7(UUID ownerId) {
super(ownerId, "266b"); super(ownerId, "266b");
this.expansionSetCode = "BFZ"; this.expansionSetCode = "BFZ";
this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC;
} }
public Mountain7(final Mountain7 card) { public Mountain7(final Mountain7 card) {

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.battleforzendikar; package mage.sets.battleforzendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Mountain8 extends mage.cards.basiclands.Mountain {
public Mountain8(UUID ownerId) { public Mountain8(UUID ownerId) {
super(ownerId, "267b"); super(ownerId, "267b");
this.expansionSetCode = "BFZ"; this.expansionSetCode = "BFZ";
this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC;
} }
public Mountain8(final Mountain8 card) { public Mountain8(final Mountain8 card) {

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.battleforzendikar; package mage.sets.battleforzendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Mountain9 extends mage.cards.basiclands.Mountain {
public Mountain9(UUID ownerId) { public Mountain9(UUID ownerId) {
super(ownerId, "268b"); super(ownerId, "268b");
this.expansionSetCode = "BFZ"; this.expansionSetCode = "BFZ";
this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC;
} }
public Mountain9(final Mountain9 card) { public Mountain9(final Mountain9 card) {

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.battleforzendikar; package mage.sets.battleforzendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Plains10 extends mage.cards.basiclands.Plains {
public Plains10(UUID ownerId) { public Plains10(UUID ownerId) {
super(ownerId, "254b"); super(ownerId, "254b");
this.expansionSetCode = "BFZ"; this.expansionSetCode = "BFZ";
this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC;
} }
public Plains10(final Plains10 card) { public Plains10(final Plains10 card) {

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.battleforzendikar; package mage.sets.battleforzendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Plains6 extends mage.cards.basiclands.Plains {
public Plains6(UUID ownerId) { public Plains6(UUID ownerId) {
super(ownerId, "250b"); super(ownerId, "250b");
this.expansionSetCode = "BFZ"; this.expansionSetCode = "BFZ";
this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC;
} }
public Plains6(final Plains6 card) { public Plains6(final Plains6 card) {

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.battleforzendikar; package mage.sets.battleforzendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Plains7 extends mage.cards.basiclands.Plains {
public Plains7(UUID ownerId) { public Plains7(UUID ownerId) {
super(ownerId, "251b"); super(ownerId, "251b");
this.expansionSetCode = "BFZ"; this.expansionSetCode = "BFZ";
this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC;
} }
public Plains7(final Plains7 card) { public Plains7(final Plains7 card) {

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.battleforzendikar; package mage.sets.battleforzendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Plains8 extends mage.cards.basiclands.Plains {
public Plains8(UUID ownerId) { public Plains8(UUID ownerId) {
super(ownerId, "252b"); super(ownerId, "252b");
this.expansionSetCode = "BFZ"; this.expansionSetCode = "BFZ";
this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC;
} }
public Plains8(final Plains8 card) { public Plains8(final Plains8 card) {

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.battleforzendikar; package mage.sets.battleforzendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Plains9 extends mage.cards.basiclands.Plains {
public Plains9(UUID ownerId) { public Plains9(UUID ownerId) {
super(ownerId, "253b"); super(ownerId, "253b");
this.expansionSetCode = "BFZ"; this.expansionSetCode = "BFZ";
this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC;
} }
public Plains9(final Plains9 card) { public Plains9(final Plains9 card) {

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.battleforzendikar; package mage.sets.battleforzendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Swamp10 extends mage.cards.basiclands.Swamp {
public Swamp10(UUID ownerId) { public Swamp10(UUID ownerId) {
super(ownerId, "264b"); super(ownerId, "264b");
this.expansionSetCode = "BFZ"; this.expansionSetCode = "BFZ";
this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC;
} }
public Swamp10(final Swamp10 card) { public Swamp10(final Swamp10 card) {

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.battleforzendikar; package mage.sets.battleforzendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Swamp6 extends mage.cards.basiclands.Swamp {
public Swamp6(UUID ownerId) { public Swamp6(UUID ownerId) {
super(ownerId, "260b"); super(ownerId, "260b");
this.expansionSetCode = "BFZ"; this.expansionSetCode = "BFZ";
this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC;
} }
public Swamp6(final Swamp6 card) { public Swamp6(final Swamp6 card) {

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.battleforzendikar; package mage.sets.battleforzendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Swamp7 extends mage.cards.basiclands.Swamp {
public Swamp7(UUID ownerId) { public Swamp7(UUID ownerId) {
super(ownerId, "261b"); super(ownerId, "261b");
this.expansionSetCode = "BFZ"; this.expansionSetCode = "BFZ";
this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC;
} }
public Swamp7(final Swamp7 card) { public Swamp7(final Swamp7 card) {

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.battleforzendikar; package mage.sets.battleforzendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Swamp8 extends mage.cards.basiclands.Swamp {
public Swamp8(UUID ownerId) { public Swamp8(UUID ownerId) {
super(ownerId, "262b"); super(ownerId, "262b");
this.expansionSetCode = "BFZ"; this.expansionSetCode = "BFZ";
this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC;
} }
public Swamp8(final Swamp8 card) { public Swamp8(final Swamp8 card) {

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.battleforzendikar; package mage.sets.battleforzendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Swamp9 extends mage.cards.basiclands.Swamp {
public Swamp9(UUID ownerId) { public Swamp9(UUID ownerId) {
super(ownerId, "263b"); super(ownerId, "263b");
this.expansionSetCode = "BFZ"; this.expansionSetCode = "BFZ";
this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC;
} }
public Swamp9(final Swamp9 card) { public Swamp9(final Swamp9 card) {

View file

@ -28,6 +28,8 @@
package mage.sets.unglued; package mage.sets.unglued;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Forest extends mage.cards.basiclands.Forest {
public Forest(UUID ownerId) { public Forest(UUID ownerId) {
super(ownerId, 88); super(ownerId, 88);
this.expansionSetCode = "UGL"; this.expansionSetCode = "UGL";
this.frameStyle = FrameStyle.UGL_FULL_ART_BASIC;
} }
public Forest(final Forest card) { public Forest(final Forest card) {

View file

@ -28,6 +28,8 @@
package mage.sets.unglued; package mage.sets.unglued;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Island extends mage.cards.basiclands.Island {
public Island(UUID ownerId) { public Island(UUID ownerId) {
super(ownerId, 85); super(ownerId, 85);
this.expansionSetCode = "UGL"; this.expansionSetCode = "UGL";
this.frameStyle = FrameStyle.UGL_FULL_ART_BASIC;
} }
public Island(final Island card) { public Island(final Island card) {

View file

@ -28,6 +28,8 @@
package mage.sets.unglued; package mage.sets.unglued;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Mountain extends mage.cards.basiclands.Mountain {
public Mountain(UUID ownerId) { public Mountain(UUID ownerId) {
super(ownerId, 87); super(ownerId, 87);
this.expansionSetCode = "UGL"; this.expansionSetCode = "UGL";
this.frameStyle = FrameStyle.UGL_FULL_ART_BASIC;
} }
public Mountain(final Mountain card) { public Mountain(final Mountain card) {

View file

@ -28,6 +28,8 @@
package mage.sets.unglued; package mage.sets.unglued;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Plains extends mage.cards.basiclands.Plains {
public Plains(UUID ownerId) { public Plains(UUID ownerId) {
super(ownerId, 84); super(ownerId, 84);
this.expansionSetCode = "UGL"; this.expansionSetCode = "UGL";
this.frameStyle = FrameStyle.UGL_FULL_ART_BASIC;
} }
public Plains(final Plains card) { public Plains(final Plains card) {

View file

@ -28,6 +28,8 @@
package mage.sets.unglued; package mage.sets.unglued;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Swamp extends mage.cards.basiclands.Swamp {
public Swamp(UUID ownerId) { public Swamp(UUID ownerId) {
super(ownerId, 86); super(ownerId, 86);
this.expansionSetCode = "UGL"; this.expansionSetCode = "UGL";
this.frameStyle = FrameStyle.UGL_FULL_ART_BASIC;
} }
public Swamp(final Swamp card) { public Swamp(final Swamp card) {

View file

@ -28,6 +28,8 @@
package mage.sets.unhinged; package mage.sets.unhinged;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -38,6 +40,7 @@ public class Forest extends mage.cards.basiclands.Forest {
public Forest(UUID ownerId) { public Forest(UUID ownerId) {
super(ownerId, 140); super(ownerId, 140);
this.expansionSetCode = "UNH"; this.expansionSetCode = "UNH";
this.frameStyle = FrameStyle.UNH_FULL_ART_BASIC;
} }
public Forest(final Forest card) { public Forest(final Forest card) {

View file

@ -28,6 +28,8 @@
package mage.sets.unhinged; package mage.sets.unhinged;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -39,6 +41,7 @@ public class Island extends mage.cards.basiclands.Island {
public Island(UUID ownerId) { public Island(UUID ownerId) {
super(ownerId, 137); super(ownerId, 137);
this.expansionSetCode = "UNH"; this.expansionSetCode = "UNH";
this.frameStyle = FrameStyle.UNH_FULL_ART_BASIC;
} }
public Island(final Island card) { public Island(final Island card) {

View file

@ -28,6 +28,8 @@
package mage.sets.unhinged; package mage.sets.unhinged;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -39,6 +41,7 @@ public class Mountain extends mage.cards.basiclands.Mountain {
public Mountain(UUID ownerId) { public Mountain(UUID ownerId) {
super(ownerId, 139); super(ownerId, 139);
this.expansionSetCode = "UNH"; this.expansionSetCode = "UNH";
this.frameStyle = FrameStyle.UNH_FULL_ART_BASIC;
} }
public Mountain(final Mountain card) { public Mountain(final Mountain card) {

View file

@ -28,6 +28,8 @@
package mage.sets.unhinged; package mage.sets.unhinged;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -39,6 +41,7 @@ public class Plains extends mage.cards.basiclands.Plains {
public Plains(UUID ownerId) { public Plains(UUID ownerId) {
super(ownerId, 136); super(ownerId, 136);
this.expansionSetCode = "UNH"; this.expansionSetCode = "UNH";
this.frameStyle = FrameStyle.UNH_FULL_ART_BASIC;
} }
public Plains(final Plains card) { public Plains(final Plains card) {

View file

@ -28,6 +28,8 @@
package mage.sets.unhinged; package mage.sets.unhinged;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -39,6 +41,7 @@ public class Swamp extends mage.cards.basiclands.Swamp {
public Swamp(UUID ownerId) { public Swamp(UUID ownerId) {
super(ownerId, 138); super(ownerId, 138);
this.expansionSetCode = "UNH"; this.expansionSetCode = "UNH";
this.frameStyle = FrameStyle.UNH_FULL_ART_BASIC;
} }
public Swamp(final Swamp card) { public Swamp(final Swamp card) {

View file

@ -28,6 +28,8 @@
package mage.sets.zendikar; package mage.sets.zendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -39,6 +41,7 @@ public class Forest1 extends mage.cards.basiclands.Forest {
public Forest1(UUID ownerId) { public Forest1(UUID ownerId) {
super(ownerId, 246); super(ownerId, 246);
this.expansionSetCode = "ZEN"; this.expansionSetCode = "ZEN";
this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC;
} }
public Forest1(final Forest1 card) { public Forest1(final Forest1 card) {

View file

@ -28,6 +28,8 @@
package mage.sets.zendikar; package mage.sets.zendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -39,6 +41,7 @@ public class Forest2 extends mage.cards.basiclands.Forest {
public Forest2(UUID ownerId) { public Forest2(UUID ownerId) {
super(ownerId, 247); super(ownerId, 247);
this.expansionSetCode = "ZEN"; this.expansionSetCode = "ZEN";
this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC;
} }
public Forest2(final Forest2 card) { public Forest2(final Forest2 card) {

View file

@ -28,6 +28,8 @@
package mage.sets.zendikar; package mage.sets.zendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -39,6 +41,7 @@ public class Forest3 extends mage.cards.basiclands.Forest {
public Forest3(UUID ownerId) { public Forest3(UUID ownerId) {
super(ownerId, 248); super(ownerId, 248);
this.expansionSetCode = "ZEN"; this.expansionSetCode = "ZEN";
this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC;
} }
public Forest3(final Forest3 card) { public Forest3(final Forest3 card) {

View file

@ -28,6 +28,8 @@
package mage.sets.zendikar; package mage.sets.zendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -39,6 +41,7 @@ public class Forest4 extends mage.cards.basiclands.Forest {
public Forest4(UUID ownerId) { public Forest4(UUID ownerId) {
super(ownerId, 249); super(ownerId, 249);
this.expansionSetCode = "ZEN"; this.expansionSetCode = "ZEN";
this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC;
} }
public Forest4(final Forest4 card) { public Forest4(final Forest4 card) {

View file

@ -28,6 +28,8 @@
package mage.sets.zendikar; package mage.sets.zendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -39,6 +41,7 @@ public class Island1 extends mage.cards.basiclands.Island {
public Island1(UUID ownerId) { public Island1(UUID ownerId) {
super(ownerId, 234); super(ownerId, 234);
this.expansionSetCode = "ZEN"; this.expansionSetCode = "ZEN";
this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC;
} }
public Island1(final Island1 card) { public Island1(final Island1 card) {

View file

@ -28,6 +28,8 @@
package mage.sets.zendikar; package mage.sets.zendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -39,6 +41,7 @@ public class Island2 extends mage.cards.basiclands.Island {
public Island2(UUID ownerId) { public Island2(UUID ownerId) {
super(ownerId, 235); super(ownerId, 235);
this.expansionSetCode = "ZEN"; this.expansionSetCode = "ZEN";
this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC;
} }
public Island2(final Island2 card) { public Island2(final Island2 card) {

View file

@ -28,6 +28,8 @@
package mage.sets.zendikar; package mage.sets.zendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -39,6 +41,7 @@ public class Island3 extends mage.cards.basiclands.Island {
public Island3(UUID ownerId) { public Island3(UUID ownerId) {
super(ownerId, 236); super(ownerId, 236);
this.expansionSetCode = "ZEN"; this.expansionSetCode = "ZEN";
this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC;
} }
public Island3(final Island3 card) { public Island3(final Island3 card) {

View file

@ -28,6 +28,8 @@
package mage.sets.zendikar; package mage.sets.zendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -39,6 +41,7 @@ public class Island4 extends mage.cards.basiclands.Island {
public Island4(UUID ownerId) { public Island4(UUID ownerId) {
super(ownerId, 237); super(ownerId, 237);
this.expansionSetCode = "ZEN"; this.expansionSetCode = "ZEN";
this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC;
} }
public Island4(final Island4 card) { public Island4(final Island4 card) {

View file

@ -28,6 +28,8 @@
package mage.sets.zendikar; package mage.sets.zendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -39,6 +41,7 @@ public class Mountain1 extends mage.cards.basiclands.Mountain {
public Mountain1(UUID ownerId) { public Mountain1(UUID ownerId) {
super(ownerId, 242); super(ownerId, 242);
this.expansionSetCode = "ZEN"; this.expansionSetCode = "ZEN";
this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC;
} }
public Mountain1(final Mountain1 card) { public Mountain1(final Mountain1 card) {

View file

@ -28,6 +28,8 @@
package mage.sets.zendikar; package mage.sets.zendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -39,6 +41,7 @@ public class Mountain2 extends mage.cards.basiclands.Mountain {
public Mountain2(UUID ownerId) { public Mountain2(UUID ownerId) {
super(ownerId, 243); super(ownerId, 243);
this.expansionSetCode = "ZEN"; this.expansionSetCode = "ZEN";
this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC;
} }
public Mountain2(final Mountain2 card) { public Mountain2(final Mountain2 card) {

View file

@ -28,6 +28,8 @@
package mage.sets.zendikar; package mage.sets.zendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -39,6 +41,7 @@ public class Mountain3 extends mage.cards.basiclands.Mountain {
public Mountain3(UUID ownerId) { public Mountain3(UUID ownerId) {
super(ownerId, 244); super(ownerId, 244);
this.expansionSetCode = "ZEN"; this.expansionSetCode = "ZEN";
this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC;
} }
public Mountain3(final Mountain3 card) { public Mountain3(final Mountain3 card) {

View file

@ -28,6 +28,8 @@
package mage.sets.zendikar; package mage.sets.zendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -39,6 +41,7 @@ public class Mountain4 extends mage.cards.basiclands.Mountain {
public Mountain4(UUID ownerId) { public Mountain4(UUID ownerId) {
super(ownerId, 245); super(ownerId, 245);
this.expansionSetCode = "ZEN"; this.expansionSetCode = "ZEN";
this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC;
} }
public Mountain4(final Mountain4 card) { public Mountain4(final Mountain4 card) {

View file

@ -28,6 +28,8 @@
package mage.sets.zendikar; package mage.sets.zendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -39,6 +41,7 @@ public class Plains1 extends mage.cards.basiclands.Plains {
public Plains1(UUID ownerId) { public Plains1(UUID ownerId) {
super(ownerId, 230); super(ownerId, 230);
this.expansionSetCode = "ZEN"; this.expansionSetCode = "ZEN";
this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC;
} }
public Plains1(final Plains1 card) { public Plains1(final Plains1 card) {

View file

@ -28,6 +28,8 @@
package mage.sets.zendikar; package mage.sets.zendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -39,6 +41,7 @@ public class Plains2 extends mage.cards.basiclands.Plains {
public Plains2(UUID ownerId) { public Plains2(UUID ownerId) {
super(ownerId, 231); super(ownerId, 231);
this.expansionSetCode = "ZEN"; this.expansionSetCode = "ZEN";
this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC;
} }
public Plains2(final Plains2 card) { public Plains2(final Plains2 card) {

View file

@ -28,6 +28,8 @@
package mage.sets.zendikar; package mage.sets.zendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -39,6 +41,7 @@ public class Plains3 extends mage.cards.basiclands.Plains {
public Plains3(UUID ownerId) { public Plains3(UUID ownerId) {
super(ownerId, 232); super(ownerId, 232);
this.expansionSetCode = "ZEN"; this.expansionSetCode = "ZEN";
this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC;
} }
public Plains3(final Plains3 card) { public Plains3(final Plains3 card) {

View file

@ -28,6 +28,8 @@
package mage.sets.zendikar; package mage.sets.zendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -39,6 +41,7 @@ public class Plains4 extends mage.cards.basiclands.Plains {
public Plains4(UUID ownerId) { public Plains4(UUID ownerId) {
super(ownerId, 233); super(ownerId, 233);
this.expansionSetCode = "ZEN"; this.expansionSetCode = "ZEN";
this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC;
} }
public Plains4(final Plains4 card) { public Plains4(final Plains4 card) {

View file

@ -28,6 +28,8 @@
package mage.sets.zendikar; package mage.sets.zendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -39,6 +41,7 @@ public class Swamp1 extends mage.cards.basiclands.Swamp {
public Swamp1(UUID ownerId) { public Swamp1(UUID ownerId) {
super(ownerId, 238); super(ownerId, 238);
this.expansionSetCode = "ZEN"; this.expansionSetCode = "ZEN";
this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC;
} }
public Swamp1(final Swamp1 card) { public Swamp1(final Swamp1 card) {

View file

@ -28,6 +28,8 @@
package mage.sets.zendikar; package mage.sets.zendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -39,6 +41,7 @@ public class Swamp2 extends mage.cards.basiclands.Swamp {
public Swamp2(UUID ownerId) { public Swamp2(UUID ownerId) {
super(ownerId, 239); super(ownerId, 239);
this.expansionSetCode = "ZEN"; this.expansionSetCode = "ZEN";
this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC;
} }
public Swamp2(final Swamp2 card) { public Swamp2(final Swamp2 card) {

View file

@ -28,6 +28,8 @@
package mage.sets.zendikar; package mage.sets.zendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -39,6 +41,7 @@ public class Swamp3 extends mage.cards.basiclands.Swamp {
public Swamp3(UUID ownerId) { public Swamp3(UUID ownerId) {
super(ownerId, 240); super(ownerId, 240);
this.expansionSetCode = "ZEN"; this.expansionSetCode = "ZEN";
this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC;
} }
public Swamp3(final Swamp3 card) { public Swamp3(final Swamp3 card) {

View file

@ -28,6 +28,8 @@
package mage.sets.zendikar; package mage.sets.zendikar;
import mage.cards.FrameStyle;
import java.util.UUID; import java.util.UUID;
/** /**
@ -39,6 +41,7 @@ public class Swamp4 extends mage.cards.basiclands.Swamp {
public Swamp4(UUID ownerId) { public Swamp4(UUID ownerId) {
super(ownerId, 241); super(ownerId, 241);
this.expansionSetCode = "ZEN"; this.expansionSetCode = "ZEN";
this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC;
} }
public Swamp4(final Swamp4 card) { public Swamp4(final Swamp4 card) {

View file

@ -7,6 +7,7 @@ import mage.abilities.Abilities;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCost;
import mage.abilities.costs.mana.ManaCosts; import mage.abilities.costs.mana.ManaCosts;
import mage.cards.FrameStyle;
import mage.constants.CardType; import mage.constants.CardType;
import mage.game.Game; import mage.game.Game;
@ -38,6 +39,8 @@ public interface MageObject extends MageItem, Serializable {
ObjectColor getFrameColor(Game game); ObjectColor getFrameColor(Game game);
FrameStyle getFrameStyle();
ManaCosts<ManaCost> getManaCost(); ManaCosts<ManaCost> getManaCost();
int getConvertedManaCost(); int getConvertedManaCost();

View file

@ -39,6 +39,7 @@ import mage.abilities.costs.mana.ManaCosts;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.keyword.ChangelingAbility; import mage.abilities.keyword.ChangelingAbility;
import mage.abilities.mana.ManaAbility; import mage.abilities.mana.ManaAbility;
import mage.cards.FrameStyle;
import mage.constants.CardType; import mage.constants.CardType;
import mage.game.Game; import mage.game.Game;
import mage.util.CardUtil; import mage.util.CardUtil;
@ -52,6 +53,7 @@ public abstract class MageObjectImpl implements MageObject {
protected ManaCosts<ManaCost> manaCost; protected ManaCosts<ManaCost> manaCost;
protected ObjectColor color; protected ObjectColor color;
protected ObjectColor frameColor; protected ObjectColor frameColor;
protected FrameStyle frameStyle;
protected List<CardType> cardType = new ArrayList<>(); protected List<CardType> cardType = new ArrayList<>();
protected List<String> subtype = new ArrayList<>(); protected List<String> subtype = new ArrayList<>();
protected List<String> supertype = new ArrayList<>(); protected List<String> supertype = new ArrayList<>();
@ -71,6 +73,7 @@ public abstract class MageObjectImpl implements MageObject {
toughness = new MageInt(0); toughness = new MageInt(0);
color = new ObjectColor(); color = new ObjectColor();
frameColor = new ObjectColor(); frameColor = new ObjectColor();
frameStyle = FrameStyle.M15_NORMAL;
manaCost = new ManaCostsImpl<>(""); manaCost = new ManaCostsImpl<>("");
abilities = new AbilitiesImpl<>(); abilities = new AbilitiesImpl<>();
} }
@ -82,6 +85,7 @@ public abstract class MageObjectImpl implements MageObject {
text = object.text; text = object.text;
color = object.color.copy(); color = object.color.copy();
frameColor = object.frameColor.copy(); frameColor = object.frameColor.copy();
frameStyle = object.frameStyle;
power = object.power.copy(); power = object.power.copy();
toughness = object.toughness.copy(); toughness = object.toughness.copy();
abilities = object.abilities.copy(); abilities = object.abilities.copy();
@ -221,6 +225,11 @@ public abstract class MageObjectImpl implements MageObject {
} }
} }
@Override
public FrameStyle getFrameStyle() {
return frameStyle;
}
@Override @Override
public ManaCosts<ManaCost> getManaCost() { public ManaCosts<ManaCost> getManaCost() {
return manaCost; return manaCost;

View file

@ -0,0 +1,79 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package mage.cards;
/**
*
* @author StravantUser
*/
public enum FrameStyle {
/**
* The default card frame, normal M15 card frames
*/
M15_NORMAL(BorderType.M15, false),
/**
* Battle for Zendkiar full art basic lands
*/
BFZ_FULL_ART_BASIC(BorderType.M15, true),
/**
* Zenkikar full art lands
*/
ZEN_FULL_ART_BASIC(BorderType.MOD, true),
/**
* Unhinged full art lands
*/
UNH_FULL_ART_BASIC(BorderType.SPC, true),
/**
* Unglued full art lands
*/
UGL_FULL_ART_BASIC(BorderType.SPC, true);
/**
* General type of card
*/
public enum BorderType {
/**
* Various specialty borders
* EG: Unhinged, Unglued
*/
SPC,
/**
* Old border cards
*/
OLD,
/**
* Modern border cards (8th -> Theros)
*/
MOD,
/**
* M15 border cards (M14 -> current)
*/
M15
}
private BorderType borderType;
private boolean isFullArt;
public BorderType getBorderType() {
return borderType;
}
public boolean isFullArt() {
return isFullArt;
}
FrameStyle(BorderType borderType, boolean isFullArt) {
this.borderType = borderType;
this.isFullArt = isFullArt;
}
}

View file

@ -30,6 +30,7 @@ public class MockCard extends CardImpl {
this.subtype = card.getSubTypes(); this.subtype = card.getSubTypes();
this.supertype = card.getSupertypes(); this.supertype = card.getSupertypes();
this.usesVariousArt = card.usesVariousArt(); this.usesVariousArt = card.usesVariousArt();
this.manaCost = new ManaCostsImpl(join(card.getManaCosts())); this.manaCost = new ManaCostsImpl(join(card.getManaCosts()));
@ -37,6 +38,7 @@ public class MockCard extends CardImpl {
this.color = card.getColor(); this.color = card.getColor();
this.frameColor = card.getFrameColor(); this.frameColor = card.getFrameColor();
this.frameStyle = card.getFrameStyle();
this.splitCard = card.isSplitCard(); this.splitCard = card.isSplitCard();
this.flipCard = card.isFlipCard(); this.flipCard = card.isFlipCard();

View file

@ -36,6 +36,7 @@ import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import mage.cards.FrameStyle;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Rarity; import mage.constants.Rarity;
import mage.ObjectColor; import mage.ObjectColor;
@ -100,6 +101,8 @@ public class CardInfo {
@DatabaseField @DatabaseField
protected String frameColor; protected String frameColor;
@DatabaseField @DatabaseField
protected String frameStyle;
@DatabaseField
protected boolean splitCard; protected boolean splitCard;
@DatabaseField @DatabaseField
protected boolean splitCardHalf; protected boolean splitCardHalf;
@ -138,6 +141,7 @@ public class CardInfo {
this.secondSideName = secondSide.getName(); this.secondSideName = secondSide.getName();
} }
this.frameStyle = card.getFrameStyle().toString();
this.frameColor = card.getFrameColor(null).toString(); this.frameColor = card.getFrameColor(null).toString();
this.blue = card.getColor(null).isBlue(); this.blue = card.getColor(null).isBlue();
this.black = card.getColor(null).isBlack(); this.black = card.getColor(null).isBlack();
@ -227,6 +231,10 @@ public class CardInfo {
return new ObjectColor(frameColor); return new ObjectColor(frameColor);
} }
public FrameStyle getFrameStyle() {
return FrameStyle.valueOf(this.frameStyle);
}
private String joinList(List<String> items) { private String joinList(List<String> items) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
for (Object item : items) { for (Object item : items) {

View file

@ -62,16 +62,16 @@ public enum CardRepository {
private static final String JDBC_URL = "jdbc:h2:file:./db/cards.h2;AUTO_SERVER=TRUE"; private static final String JDBC_URL = "jdbc:h2:file:./db/cards.h2;AUTO_SERVER=TRUE";
private static final String VERSION_ENTITY_NAME = "card"; private static final String VERSION_ENTITY_NAME = "card";
// raise this if db structure was changed // raise this if db structure was changed
private static final long CARD_DB_VERSION = 46; private static final long CARD_DB_VERSION = 47;
// raise this if new cards were added to the server // raise this if new cards were added to the server
private static final long CARD_CONTENT_VERSION = 57; private static final long CARD_CONTENT_VERSION = 59;
private Dao<CardInfo, Object> cardDao; private Dao<CardInfo, Object> cardDao;
private Set<String> classNames; private Set<String> classNames;
private final TreeSet<String> landTypes = new TreeSet(); private final TreeSet<String> landTypes = new TreeSet();
private CardRepository() { CardRepository() {
File file = new File("db"); File file = new File("db");
if (!file.exists()) { if (!file.exists()) {
file.mkdirs(); file.mkdirs();

View file

@ -39,6 +39,7 @@ import mage.abilities.common.CastCommanderAbility;
import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCost;
import mage.abilities.costs.mana.ManaCosts; import mage.abilities.costs.mana.ManaCosts;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.FrameStyle;
import mage.constants.CardType; import mage.constants.CardType;
import mage.game.Game; import mage.game.Game;
import mage.util.GameLog; import mage.util.GameLog;
@ -150,6 +151,11 @@ public class Commander implements CommandObject {
return card.getFrameColor(game); return card.getFrameColor(game);
} }
@Override
public FrameStyle getFrameStyle() {
return card.getFrameStyle();
}
@Override @Override
public ManaCosts<ManaCost> getManaCost() { public ManaCosts<ManaCost> getManaCost() {
return card.getManaCost(); return card.getManaCost();

View file

@ -38,6 +38,7 @@ import mage.abilities.Ability;
import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCost;
import mage.abilities.costs.mana.ManaCosts; import mage.abilities.costs.mana.ManaCosts;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.cards.FrameStyle;
import mage.constants.CardType; import mage.constants.CardType;
import mage.game.Game; import mage.game.Game;
import mage.util.GameLog; import mage.util.GameLog;
@ -55,6 +56,7 @@ public class Emblem implements CommandObject {
private UUID id; private UUID id;
private UUID controllerId; private UUID controllerId;
private UUID sourceId; private UUID sourceId;
private FrameStyle frameStyle;
private Abilities<Ability> abilites = new AbilitiesImpl<>(); private Abilities<Ability> abilites = new AbilitiesImpl<>();
private String expansionSetCodeForImage = null; private String expansionSetCodeForImage = null;
@ -65,11 +67,17 @@ public class Emblem implements CommandObject {
public Emblem(final Emblem emblem) { public Emblem(final Emblem emblem) {
this.id = emblem.id; this.id = emblem.id;
this.name = emblem.name; this.name = emblem.name;
this.frameStyle = emblem.frameStyle;
this.controllerId = emblem.controllerId; this.controllerId = emblem.controllerId;
this.sourceId = emblem.sourceId; this.sourceId = emblem.sourceId;
this.abilites = emblem.abilites.copy(); this.abilites = emblem.abilites.copy();
} }
@Override
public FrameStyle getFrameStyle() {
return frameStyle;
}
@Override @Override
public void assignNewId() { public void assignNewId() {
this.id = UUID.randomUUID(); this.id = UUID.randomUUID();

View file

@ -119,6 +119,7 @@ public class PermanentCard extends PermanentImpl {
this.cardType.addAll(card.getCardType()); this.cardType.addAll(card.getCardType());
this.color = card.getColor(null).copy(); this.color = card.getColor(null).copy();
this.frameColor = card.getFrameColor(null).copy(); this.frameColor = card.getFrameColor(null).copy();
this.frameStyle = card.getFrameStyle();
this.manaCost = card.getManaCost().copy(); this.manaCost = card.getManaCost().copy();
if (card instanceof PermanentCard) { if (card instanceof PermanentCard) {
this.maxLevelCounters = ((PermanentCard) card).maxLevelCounters; this.maxLevelCounters = ((PermanentCard) card).maxLevelCounters;

View file

@ -83,6 +83,7 @@ public class PermanentToken extends PermanentImpl {
this.cardType = token.getCardType(); this.cardType = token.getCardType();
this.color = token.getColor(game).copy(); this.color = token.getColor(game).copy();
this.frameColor = token.getFrameColor(game); this.frameColor = token.getFrameColor(game);
this.frameStyle = token.getFrameStyle();
this.power.modifyBaseValue(token.getPower().getBaseValueModified()); this.power.modifyBaseValue(token.getPower().getBaseValueModified());
this.toughness.modifyBaseValue(token.getToughness().getBaseValueModified()); this.toughness.modifyBaseValue(token.getToughness().getBaseValueModified());
this.supertype = token.getSupertype(); this.supertype = token.getSupertype();

View file

@ -46,6 +46,7 @@ import mage.abilities.keyword.BestowAbility;
import mage.abilities.keyword.MorphAbility; import mage.abilities.keyword.MorphAbility;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardsImpl; import mage.cards.CardsImpl;
import mage.cards.FrameStyle;
import mage.cards.SplitCard; import mage.cards.SplitCard;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
@ -77,6 +78,7 @@ public class Spell extends StackObjImpl implements Card {
private final Card card; private final Card card;
private final ObjectColor color; private final ObjectColor color;
private final ObjectColor frameColor; private final ObjectColor frameColor;
private final FrameStyle frameStyle;
private final SpellAbility ability; private final SpellAbility ability;
private final Zone fromZone; private final Zone fromZone;
private final UUID id; private final UUID id;
@ -90,6 +92,7 @@ public class Spell extends StackObjImpl implements Card {
this.card = card; this.card = card;
this.color = card.getColor(null).copy(); this.color = card.getColor(null).copy();
this.frameColor = card.getFrameColor(null).copy(); this.frameColor = card.getFrameColor(null).copy();
this.frameStyle = card.getFrameStyle();
id = ability.getId(); id = ability.getId();
this.ability = ability; this.ability = ability;
this.ability.setControllerId(controllerId); this.ability.setControllerId(controllerId);
@ -131,6 +134,7 @@ public class Spell extends StackObjImpl implements Card {
this.faceDown = spell.faceDown; this.faceDown = spell.faceDown;
this.color = spell.color.copy(); this.color = spell.color.copy();
this.frameColor = spell.color.copy(); this.frameColor = spell.color.copy();
this.frameStyle = spell.frameStyle;
} }
public boolean activate(Game game, boolean noMana) { public boolean activate(Game game, boolean noMana) {
@ -492,6 +496,11 @@ public class Spell extends StackObjImpl implements Card {
return frameColor; return frameColor;
} }
@Override
public FrameStyle getFrameStyle() {
return frameStyle;
}
@Override @Override
public ManaCosts<ManaCost> getManaCost() { public ManaCosts<ManaCost> getManaCost() {
return card.getManaCost(); return card.getManaCost();

View file

@ -49,6 +49,7 @@ import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.Effects; import mage.abilities.effects.Effects;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.FrameStyle;
import mage.constants.AbilityType; import mage.constants.AbilityType;
import mage.constants.AbilityWord; import mage.constants.AbilityWord;
import mage.constants.CardType; import mage.constants.CardType;
@ -198,6 +199,12 @@ public class StackAbility extends StackObjImpl implements Ability {
return ability.getSourceObject(game).getFrameColor(game); return ability.getSourceObject(game).getFrameColor(game);
} }
@Override
public FrameStyle getFrameStyle() {
// Abilities all use the same frame
return FrameStyle.M15_NORMAL;
}
@Override @Override
public ManaCosts<ManaCost> getManaCost() { public ManaCosts<ManaCost> getManaCost() {
return emptyCost; return emptyCost;