diff --git a/Mage.Client/src/main/java/org/mage/card/arcane/CardPanelRenderImpl.java b/Mage.Client/src/main/java/org/mage/card/arcane/CardPanelRenderImpl.java index e84d2aec7c..97ab5c06d9 100644 --- a/Mage.Client/src/main/java/org/mage/card/arcane/CardPanelRenderImpl.java +++ b/Mage.Client/src/main/java/org/mage/card/arcane/CardPanelRenderImpl.java @@ -66,6 +66,9 @@ public class CardPanelRenderImpl extends CardPanel { if (!a.getExpansionSetCode().equals(b.getExpansionSetCode())) { return false; } + if (a.getFrameStyle() != b.getFrameStyle()) { + return false; + } if (a.getCounters() == null) { if (b.getCounters() != null) { return false; @@ -121,6 +124,7 @@ public class CardPanelRenderImpl extends CardPanel { sb.append((char) (this.view.isPlayable() ? 1 : 0)); sb.append((char) (this.view.isCanAttack() ? 1 : 0)); sb.append((char) (this.view.isFaceDown() ? 1 : 0)); + sb.append((char) this.view.getFrameStyle().ordinal()); if (this.view instanceof PermanentView) { sb.append((char) (((PermanentView) this.view).hasSummoningSickness() ? 1 : 0)); sb.append((char) (((PermanentView) this.view).getDamage())); @@ -377,6 +381,24 @@ public class CardPanelRenderImpl extends CardPanel { return ImageCache.loadImage(new TFile(DirectLinksForDownload.outDir + File.separator + DirectLinksForDownload.cardbackFilename)); } } + + @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 public Image getImage() { diff --git a/Mage.Client/src/main/java/org/mage/card/arcane/ModernCardRenderer.java b/Mage.Client/src/main/java/org/mage/card/arcane/ModernCardRenderer.java index 7e0a1d9d27..e995f4d817 100644 --- a/Mage.Client/src/main/java/org/mage/card/arcane/ModernCardRenderer.java +++ b/Mage.Client/src/main/java/org/mage/card/arcane/ModernCardRenderer.java @@ -20,8 +20,9 @@ import java.awt.font.LineBreakMeasurer; import java.awt.font.TextAttribute; import java.awt.font.TextLayout; import java.awt.font.TextMeasurer; -import java.awt.geom.RoundRectangle2D; +import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; +import java.awt.image.RasterFormatException; import java.io.IOException; import java.net.URL; import java.text.AttributedCharacterIterator; @@ -159,12 +160,17 @@ public class ModernCardRenderer extends CardRenderer { // 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_TOKEN = 0.70f; + protected static float TYPE_LINE_Y_FRAC_FULL_ART = 0.74f; 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 protected int boxTextHeight; protected int boxTextOffset; protected Font boxTextFont; + protected Font boxTextFontNarrow; // How large is the P/T text, and how far is it down the boxes protected int ptTextHeight; @@ -202,29 +208,26 @@ public class ModernCardRenderer extends CardRenderer { BOX_HEIGHT_FRAC * cardHeight); // Type line at - if (cardView.isToken()) { - typeLineY = (int) (TYPE_LINE_Y_FRAC_TOKEN * cardHeight); - } else { - typeLineY = (int) (TYPE_LINE_Y_FRAC * cardHeight); - } + typeLineY = (int)(getTypeLineYFrac() * cardHeight); // Box text height boxTextHeight = getTextHeightForBoxHeight(boxHeight); 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 ptTextHeight = getPTTextHeightForLineHeight(boxHeight); ptTextOffset = (boxHeight - ptTextHeight) / 2; + // Beleren font does work well for numbers though ptTextFont = BASE_BELEREN_FONT.deriveFont(Font.PLAIN, ptTextHeight); } @Override 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 Color borderColor; if (isSelected) { @@ -233,11 +236,17 @@ public class ModernCardRenderer extends CardRenderer { borderColor = new Color(250, 250, 0, 230); } else if (cardView.isPlayable()) { 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); } 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) { float hwidth = borderWidth / 2.0f; Graphics2D g2 = (Graphics2D) g.create(); @@ -251,6 +260,7 @@ public class ModernCardRenderer extends CardRenderer { g2.draw(rect); g2.dispose(); } + */ } @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 protected void drawArt(Graphics2D g) { if (artImage != null && !cardView.isFaceDown()) { - int imgWidth = artImage.getWidth(); - int imgHeight = artImage.getHeight(); - BufferedImage subImg - = artImage.getSubimage( - (int) (.079 * imgWidth), (int) (.11 * imgHeight), - (int) (.84 * imgWidth), (int) (.42 * imgHeight)); - g.drawImage(subImg, - totalContentInset + 1, totalContentInset + boxHeight, - contentWidth - 2, typeLineY - totalContentInset - boxHeight, - null); + Rectangle2D artRect = getArtRect(); + + // 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 + = artImage.getSubimage( + (int) (artRect.getX() * fullCardImgWidth), (int) (artRect.getY() * fullCardImgHeight), + (int) artWidth, (int) artHeight); + g.drawImage(subImg, + totalContentInset + 1, totalContentInset + boxHeight, + (int) targetWidth, (int) targetHeight, + 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 { nameStr = cardView.getName(); } - AttributedString str = new AttributedString(nameStr); - str.addAttribute(TextAttribute.FONT, boxTextFont); - TextMeasurer measure = new TextMeasurer(str.getIterator(), g.getFontRenderContext()); - TextLayout layout = measure.getLayout(0, measure.getLineBreakIndex(0, availableWidth)); - g.setColor(getBoxTextColor()); - layout.draw(g, x, y + boxTextOffset + boxTextHeight - 1); + if (!nameStr.isEmpty()) { + AttributedString str = new AttributedString(nameStr); + str.addAttribute(TextAttribute.FONT, boxTextFont); + TextMeasurer measure = new TextMeasurer(str.getIterator(), g.getFontRenderContext()); + 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()); + layout.draw(g, x, y + boxTextOffset + boxTextHeight - 1); + } + } // Draw the mana symbols if (!cardView.isAbility() && !cardView.isFaceDown()) { @@ -455,9 +520,18 @@ public class ModernCardRenderer extends CardRenderer { AttributedString str = new AttributedString(types); str.addAttribute(TextAttribute.FONT, boxTextFont); TextMeasurer measure = new TextMeasurer(str.getIterator(), g.getFontRenderContext()); - TextLayout layout = measure.getLayout(0, measure.getLineBreakIndex(0, availableWidth)); - g.setColor(getBoxTextColor()); - layout.draw(g, x, y + boxTextOffset + boxTextHeight - 1); + 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()); + layout.draw(g, x, y + boxTextOffset + boxTextHeight - 1); + } } } @@ -475,7 +549,7 @@ public class ModernCardRenderer extends CardRenderer { int partWidth = (int) Math.max(30, 0.20f * cardWidth); // 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; // Draw PT box @@ -500,12 +574,7 @@ public class ModernCardRenderer extends CardRenderer { g.drawString(ptText, x + (partWidth - ptTextWidth) / 2, curY - ptTextOffset - 1); - // Does it have damage on it? - if ((cardView instanceof PermanentView) && ((PermanentView) cardView).getDamage() > 0) { - // Show marked damage - - } - + // Advance curY -= boxHeight; } @@ -583,95 +652,92 @@ public class ModernCardRenderer extends CardRenderer { // Draw the card's textbox in a given rect protected boolean loyaltyAbilityColorToggle = false; - protected void drawRulesText(Graphics2D g, int x, int y, int w, int h) { - // Initial font size to try to render at - Font font = new Font("Arial", Font.PLAIN, 12); - Font fontItalic = new Font("Arial", Font.ITALIC, 12); + private class RuleLayout { + public List attributedRules; + public int remainingHeight; + public boolean fits; + public Font font; + public Font fontItalic; + } - // Handle the keyword rules - boolean hasKeywords = !textboxKeywords.isEmpty(); - String keywordRulesString = getKeywordRulesString(); - AttributedString keywordRulesAttributed = new AttributedString(keywordRulesString); - if (hasKeywords) { - keywordRulesAttributed.addAttribute(TextAttribute.FONT, font); - } + /** + * Figure out if a given text size will work for laying out the rules in a card textbox + */ + protected RuleLayout layoutRules(Graphics2D g, List 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 + // Get the total height of the rules List attributedRules = new ArrayList<>(); - boolean useSmallFont = false; + boolean fits = true; int remaining = h; - { - 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; - } + for (TextboxRule rule : rules) { + AttributedString attributed = rule.generateAttributedString(font, fontItalic); + attributedRules.add(attributed); + remaining -= drawSingleRule(g, attributed, rule, 0, 0, w, remaining, /*doDraw=*/false); + if (remaining < 0) { + fits = false; + break; } } - // If there wasn't enough room, try using a smaller font - if (useSmallFont) { - font = new Font("Arial", Font.PLAIN, 9); - fontItalic = new Font("Arial", Font.ITALIC, 9); - if (hasKeywords) { - keywordRulesAttributed = new AttributedString(keywordRulesString); - keywordRulesAttributed.addAttribute(TextAttribute.FONT, font); - } + // Return the information + RuleLayout layout = new RuleLayout(); + layout.attributedRules = attributedRules; + layout.remainingHeight = remaining; + layout.fits = fits; + layout.font = font; + layout.fontItalic = fontItalic; + return layout; + } - // Clear out the attributed rules and reatribute them with the new font size - attributedRules.clear(); - for (TextboxRule rule : textboxRules) { - AttributedString attributed = rule.generateAttributedString(font, fontItalic); - attributedRules.add(attributed); - } + protected void drawRulesText(Graphics2D g, int x, int y, int w, int h) { + // Gather all rules to render + List allRules = new ArrayList<>(textboxRules); - // Get the new spacing for the small text - remaining = h; - 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; - } + // Add the keyword rule if there are any keywords + if (!textboxKeywords.isEmpty()) { + String keywordRulesString = getKeywordRulesString(); + TextboxRule keywordsRule = new TextboxRule(keywordRulesString, new ArrayList()); + allRules.add(keywordsRule); + } + + // Go through possible font sizes in descending order to find the best fit + RuleLayout bestLayout = null; + for (int fontSize: RULES_TEXT_FONT_SIZES) { + bestLayout = layoutRules(g, allRules, w, h, fontSize); + + // Stop, we found a good fit + if (bestLayout.fits) { + break; } } - // Do we have room for additional spacing between the parts of text? - // If so, calculate the spacing based on how much space was left over - int spacing; - if (remaining <= 0) { - spacing = 0; + // Nothing to draw + if (bestLayout == null) { + return; + } + + // Do we have room for additional padding between the parts of text? + // If so, calculate the padding based on how much space was left over + int padding; + if (bestLayout.fits) { + padding = (int) (((float)bestLayout.remainingHeight) / (1 + allRules.size())); } else { - spacing = (int) (remaining / (hasKeywords - ? (textboxRules.size() + 2) - : (textboxRules.size() + 1))); + // When the text doesn't fit to begin with there's no room for padding + padding = 0; } // Do the actual draw loyaltyAbilityColorToggle = false; g.setColor(Color.black); - int curY = y + spacing; - if (hasKeywords) { - int adv = drawSingleRule(g, keywordRulesAttributed, null, x, curY, w, h, true); - curY += adv + spacing; - h -= adv; - } - for (int i = 0; i < textboxRules.size(); ++i) { - TextboxRule rule = textboxRules.get(i); - AttributedString attributedRule = attributedRules.get(i); + int curY = y + padding; + for (int i = 0; i < bestLayout.attributedRules.size(); ++i) { + AttributedString attributedRule = bestLayout.attributedRules.get(i); + TextboxRule rule = allRules.get(i); int adv = drawSingleRule(g, attributedRule, rule, x, curY, w, h, true); - curY += adv + spacing; + curY += adv + padding; h -= adv; if (h < 0) { break; @@ -710,7 +776,8 @@ public class ModernCardRenderer extends CardRenderer { AttributedCharacterIterator newLineCheck = text.getIterator(); while (measure.getPosition() < textIter.getEndIndex()) { // Advance iterator to next line break - char ch = newLineCheck.setIndex(measure.getPosition()); + newLineCheck.setIndex(measure.getPosition()); + char ch; while ((ch = newLineCheck.next()) != CharacterIterator.DONE) { if (ch == '\n') { break; diff --git a/Mage.Common/src/mage/view/CardView.java b/Mage.Common/src/mage/view/CardView.java index 8451015e89..2e0414ecb8 100644 --- a/Mage.Common/src/mage/view/CardView.java +++ b/Mage.Common/src/mage/view/CardView.java @@ -30,12 +30,14 @@ package mage.view; import java.util.ArrayList; import java.util.List; import java.util.UUID; + import mage.MageObject; import mage.ObjectColor; import mage.abilities.Mode; import mage.abilities.SpellAbility; import mage.abilities.costs.mana.ManaCosts; import mage.cards.Card; +import mage.cards.FrameStyle; import mage.cards.SplitCard; import mage.constants.AbilityType; import mage.constants.CardType; @@ -53,6 +55,7 @@ import mage.game.stack.Spell; import mage.game.stack.StackAbility; import mage.target.Target; import mage.target.Targets; +import org.apache.log4j.Logger; /** * @author BetaSteward_at_googlemail.com @@ -74,6 +77,7 @@ public class CardView extends SimpleCardView { protected List superTypes; protected ObjectColor color; protected ObjectColor frameColor; + protected FrameStyle frameStyle; protected List manaCost; protected int convertedManaCost; protected Rarity rarity; @@ -334,7 +338,10 @@ public class CardView extends SimpleCardView { } // Frame color - this.frameColor = card.getFrameColor(game); + this.frameColor = card.getFrameColor(game); + + // Frame style + this.frameStyle = card.getFrameStyle(); // Get starting loyalty this.startingLoyalty = "" + card.getStartingLoyalty(); @@ -384,6 +391,8 @@ public class CardView extends SimpleCardView { } // Frame color this.frameColor = object.getFrameColor(null); + // Frame style + this.frameStyle = object.getFrameStyle(); // Starting loyalty. Must be extracted from an ability this.startingLoyalty = "" + object.getStartingLoyalty(); } @@ -401,6 +410,7 @@ public class CardView extends SimpleCardView { this.displayName = name; this.rules = emblem.getRules(); // emblem images are always with common (black) symbol + this.frameStyle = FrameStyle.M15_NORMAL; this.expansionSetCode = emblem.getExpansionSetCode(); this.rarity = Rarity.COMMON; } @@ -426,6 +436,7 @@ public class CardView extends SimpleCardView { this.superTypes = new ArrayList<>(); this.color = new ObjectColor(); this.frameColor = new ObjectColor(); + this.frameStyle = FrameStyle.M15_NORMAL; this.manaCost = new ArrayList<>(); this.convertedManaCost = 0; @@ -472,6 +483,7 @@ public class CardView extends SimpleCardView { this.superTypes = token.getSupertype(); this.color = token.getColor(null); this.frameColor = token.getFrameColor(null); + this.frameStyle = token.getFrameStyle(); this.manaCost = token.getManaCost().getSymbols(); this.rarity = Rarity.NA; this.type = token.getTokenType(); @@ -560,6 +572,10 @@ public class CardView extends SimpleCardView { return frameColor; } + public FrameStyle getFrameStyle() { + return frameStyle; + } + public List getManaCost() { return manaCost; } diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Forest10.java b/Mage.Sets/src/mage/sets/battleforzendikar/Forest10.java index 23bcb9ceaf..26591a9a75 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/Forest10.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Forest10.java @@ -27,6 +27,8 @@ */ package mage.sets.battleforzendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Forest10 extends mage.cards.basiclands.Forest { public Forest10(UUID ownerId) { super(ownerId, "274b"); this.expansionSetCode = "BFZ"; + this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC; } public Forest10(final Forest10 card) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Forest6.java b/Mage.Sets/src/mage/sets/battleforzendikar/Forest6.java index 071eb8bd52..0c43ccd9b9 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/Forest6.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Forest6.java @@ -27,6 +27,8 @@ */ package mage.sets.battleforzendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Forest6 extends mage.cards.basiclands.Forest { public Forest6(UUID ownerId) { super(ownerId, "270b"); this.expansionSetCode = "BFZ"; + this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC; } public Forest6(final Forest6 card) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Forest7.java b/Mage.Sets/src/mage/sets/battleforzendikar/Forest7.java index e29564f4de..bce2002c3e 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/Forest7.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Forest7.java @@ -27,6 +27,8 @@ */ package mage.sets.battleforzendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Forest7 extends mage.cards.basiclands.Forest { public Forest7(UUID ownerId) { super(ownerId, "271b"); this.expansionSetCode = "BFZ"; + this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC; } public Forest7(final Forest7 card) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Forest8.java b/Mage.Sets/src/mage/sets/battleforzendikar/Forest8.java index 2d94070106..e868b1aa79 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/Forest8.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Forest8.java @@ -27,6 +27,8 @@ */ package mage.sets.battleforzendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Forest8 extends mage.cards.basiclands.Forest { public Forest8(UUID ownerId) { super(ownerId, "272b"); this.expansionSetCode = "BFZ"; + this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC; } public Forest8(final Forest8 card) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Forest9.java b/Mage.Sets/src/mage/sets/battleforzendikar/Forest9.java index a705c9921e..f573b6c4fd 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/Forest9.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Forest9.java @@ -27,6 +27,8 @@ */ package mage.sets.battleforzendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Forest9 extends mage.cards.basiclands.Forest { public Forest9(UUID ownerId) { super(ownerId, "273b"); this.expansionSetCode = "BFZ"; + this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC; } public Forest9(final Forest9 card) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Island10.java b/Mage.Sets/src/mage/sets/battleforzendikar/Island10.java index 05f385c2b9..5f0256baac 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/Island10.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Island10.java @@ -27,6 +27,8 @@ */ package mage.sets.battleforzendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Island10 extends mage.cards.basiclands.Island { public Island10(UUID ownerId) { super(ownerId, "259b"); this.expansionSetCode = "BFZ"; + this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC; } public Island10(final Island10 card) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Island6.java b/Mage.Sets/src/mage/sets/battleforzendikar/Island6.java index 1119555f32..f290b4f236 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/Island6.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Island6.java @@ -27,6 +27,8 @@ */ package mage.sets.battleforzendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Island6 extends mage.cards.basiclands.Island { public Island6(UUID ownerId) { super(ownerId, "255b"); this.expansionSetCode = "BFZ"; + this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC; } public Island6(final Island6 card) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Island7.java b/Mage.Sets/src/mage/sets/battleforzendikar/Island7.java index 7547fa7be8..bb4a6550b5 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/Island7.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Island7.java @@ -27,6 +27,8 @@ */ package mage.sets.battleforzendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Island7 extends mage.cards.basiclands.Island { public Island7(UUID ownerId) { super(ownerId, "256b"); this.expansionSetCode = "BFZ"; + this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC; } public Island7(final Island7 card) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Island8.java b/Mage.Sets/src/mage/sets/battleforzendikar/Island8.java index b8aad3f54e..67011f5b88 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/Island8.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Island8.java @@ -27,6 +27,8 @@ */ package mage.sets.battleforzendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Island8 extends mage.cards.basiclands.Island { public Island8(UUID ownerId) { super(ownerId, "257b"); this.expansionSetCode = "BFZ"; + this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC; } public Island8(final Island8 card) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Island9.java b/Mage.Sets/src/mage/sets/battleforzendikar/Island9.java index 522a3b4e37..cb30559c28 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/Island9.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Island9.java @@ -27,6 +27,8 @@ */ package mage.sets.battleforzendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Island9 extends mage.cards.basiclands.Island { public Island9(UUID ownerId) { super(ownerId, "258b"); this.expansionSetCode = "BFZ"; + this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC; } public Island9(final Island9 card) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Mountain10.java b/Mage.Sets/src/mage/sets/battleforzendikar/Mountain10.java index 1a62598d04..a24673020c 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/Mountain10.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Mountain10.java @@ -27,6 +27,8 @@ */ package mage.sets.battleforzendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Mountain10 extends mage.cards.basiclands.Mountain { public Mountain10(UUID ownerId) { super(ownerId, "269b"); this.expansionSetCode = "BFZ"; + this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC; } public Mountain10(final Mountain10 card) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Mountain6.java b/Mage.Sets/src/mage/sets/battleforzendikar/Mountain6.java index 921cbeaf36..a87ab4f876 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/Mountain6.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Mountain6.java @@ -27,6 +27,8 @@ */ package mage.sets.battleforzendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Mountain6 extends mage.cards.basiclands.Mountain { public Mountain6(UUID ownerId) { super(ownerId, "265b"); this.expansionSetCode = "BFZ"; + this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC; } public Mountain6(final Mountain6 card) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Mountain7.java b/Mage.Sets/src/mage/sets/battleforzendikar/Mountain7.java index 1c23f5e64e..736c1c8972 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/Mountain7.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Mountain7.java @@ -27,6 +27,8 @@ */ package mage.sets.battleforzendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Mountain7 extends mage.cards.basiclands.Mountain { public Mountain7(UUID ownerId) { super(ownerId, "266b"); this.expansionSetCode = "BFZ"; + this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC; } public Mountain7(final Mountain7 card) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Mountain8.java b/Mage.Sets/src/mage/sets/battleforzendikar/Mountain8.java index 755f49ea6c..993a7eda3a 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/Mountain8.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Mountain8.java @@ -27,6 +27,8 @@ */ package mage.sets.battleforzendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Mountain8 extends mage.cards.basiclands.Mountain { public Mountain8(UUID ownerId) { super(ownerId, "267b"); this.expansionSetCode = "BFZ"; + this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC; } public Mountain8(final Mountain8 card) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Mountain9.java b/Mage.Sets/src/mage/sets/battleforzendikar/Mountain9.java index 8713dfa46f..8a84c35274 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/Mountain9.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Mountain9.java @@ -27,6 +27,8 @@ */ package mage.sets.battleforzendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Mountain9 extends mage.cards.basiclands.Mountain { public Mountain9(UUID ownerId) { super(ownerId, "268b"); this.expansionSetCode = "BFZ"; + this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC; } public Mountain9(final Mountain9 card) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Plains10.java b/Mage.Sets/src/mage/sets/battleforzendikar/Plains10.java index ac9c617c3c..fd7da2141f 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/Plains10.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Plains10.java @@ -27,6 +27,8 @@ */ package mage.sets.battleforzendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Plains10 extends mage.cards.basiclands.Plains { public Plains10(UUID ownerId) { super(ownerId, "254b"); this.expansionSetCode = "BFZ"; + this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC; } public Plains10(final Plains10 card) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Plains6.java b/Mage.Sets/src/mage/sets/battleforzendikar/Plains6.java index ed3ec52d2b..ea8c621347 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/Plains6.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Plains6.java @@ -27,6 +27,8 @@ */ package mage.sets.battleforzendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Plains6 extends mage.cards.basiclands.Plains { public Plains6(UUID ownerId) { super(ownerId, "250b"); this.expansionSetCode = "BFZ"; + this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC; } public Plains6(final Plains6 card) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Plains7.java b/Mage.Sets/src/mage/sets/battleforzendikar/Plains7.java index a054d77cd4..18dc050daf 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/Plains7.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Plains7.java @@ -27,6 +27,8 @@ */ package mage.sets.battleforzendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Plains7 extends mage.cards.basiclands.Plains { public Plains7(UUID ownerId) { super(ownerId, "251b"); this.expansionSetCode = "BFZ"; + this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC; } public Plains7(final Plains7 card) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Plains8.java b/Mage.Sets/src/mage/sets/battleforzendikar/Plains8.java index 6487b28714..593eed2086 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/Plains8.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Plains8.java @@ -27,6 +27,8 @@ */ package mage.sets.battleforzendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Plains8 extends mage.cards.basiclands.Plains { public Plains8(UUID ownerId) { super(ownerId, "252b"); this.expansionSetCode = "BFZ"; + this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC; } public Plains8(final Plains8 card) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Plains9.java b/Mage.Sets/src/mage/sets/battleforzendikar/Plains9.java index 4ee6207182..74e3a5f1ff 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/Plains9.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Plains9.java @@ -27,6 +27,8 @@ */ package mage.sets.battleforzendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Plains9 extends mage.cards.basiclands.Plains { public Plains9(UUID ownerId) { super(ownerId, "253b"); this.expansionSetCode = "BFZ"; + this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC; } public Plains9(final Plains9 card) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Swamp10.java b/Mage.Sets/src/mage/sets/battleforzendikar/Swamp10.java index 60b17fd318..8985a774f6 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/Swamp10.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Swamp10.java @@ -27,6 +27,8 @@ */ package mage.sets.battleforzendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Swamp10 extends mage.cards.basiclands.Swamp { public Swamp10(UUID ownerId) { super(ownerId, "264b"); this.expansionSetCode = "BFZ"; + this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC; } public Swamp10(final Swamp10 card) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Swamp6.java b/Mage.Sets/src/mage/sets/battleforzendikar/Swamp6.java index 165f8ae606..f9807246c4 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/Swamp6.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Swamp6.java @@ -27,6 +27,8 @@ */ package mage.sets.battleforzendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Swamp6 extends mage.cards.basiclands.Swamp { public Swamp6(UUID ownerId) { super(ownerId, "260b"); this.expansionSetCode = "BFZ"; + this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC; } public Swamp6(final Swamp6 card) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Swamp7.java b/Mage.Sets/src/mage/sets/battleforzendikar/Swamp7.java index e54203cdc3..38a79c536b 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/Swamp7.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Swamp7.java @@ -27,6 +27,8 @@ */ package mage.sets.battleforzendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Swamp7 extends mage.cards.basiclands.Swamp { public Swamp7(UUID ownerId) { super(ownerId, "261b"); this.expansionSetCode = "BFZ"; + this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC; } public Swamp7(final Swamp7 card) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Swamp8.java b/Mage.Sets/src/mage/sets/battleforzendikar/Swamp8.java index 0bfd1222dd..8cf2d4c909 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/Swamp8.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Swamp8.java @@ -27,6 +27,8 @@ */ package mage.sets.battleforzendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Swamp8 extends mage.cards.basiclands.Swamp { public Swamp8(UUID ownerId) { super(ownerId, "262b"); this.expansionSetCode = "BFZ"; + this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC; } public Swamp8(final Swamp8 card) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Swamp9.java b/Mage.Sets/src/mage/sets/battleforzendikar/Swamp9.java index 93d9cb9b3c..40e7131523 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/Swamp9.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Swamp9.java @@ -27,6 +27,8 @@ */ package mage.sets.battleforzendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Swamp9 extends mage.cards.basiclands.Swamp { public Swamp9(UUID ownerId) { super(ownerId, "263b"); this.expansionSetCode = "BFZ"; + this.frameStyle = FrameStyle.BFZ_FULL_ART_BASIC; } public Swamp9(final Swamp9 card) { diff --git a/Mage.Sets/src/mage/sets/unglued/Forest.java b/Mage.Sets/src/mage/sets/unglued/Forest.java index 0a2e9c6efc..af36707085 100644 --- a/Mage.Sets/src/mage/sets/unglued/Forest.java +++ b/Mage.Sets/src/mage/sets/unglued/Forest.java @@ -28,6 +28,8 @@ package mage.sets.unglued; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Forest extends mage.cards.basiclands.Forest { public Forest(UUID ownerId) { super(ownerId, 88); this.expansionSetCode = "UGL"; + this.frameStyle = FrameStyle.UGL_FULL_ART_BASIC; } public Forest(final Forest card) { diff --git a/Mage.Sets/src/mage/sets/unglued/Island.java b/Mage.Sets/src/mage/sets/unglued/Island.java index 920b04f02f..41fc841572 100644 --- a/Mage.Sets/src/mage/sets/unglued/Island.java +++ b/Mage.Sets/src/mage/sets/unglued/Island.java @@ -28,6 +28,8 @@ package mage.sets.unglued; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Island extends mage.cards.basiclands.Island { public Island(UUID ownerId) { super(ownerId, 85); this.expansionSetCode = "UGL"; + this.frameStyle = FrameStyle.UGL_FULL_ART_BASIC; } public Island(final Island card) { diff --git a/Mage.Sets/src/mage/sets/unglued/Mountain.java b/Mage.Sets/src/mage/sets/unglued/Mountain.java index d5d44f093d..bbae44704a 100644 --- a/Mage.Sets/src/mage/sets/unglued/Mountain.java +++ b/Mage.Sets/src/mage/sets/unglued/Mountain.java @@ -28,6 +28,8 @@ package mage.sets.unglued; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Mountain extends mage.cards.basiclands.Mountain { public Mountain(UUID ownerId) { super(ownerId, 87); this.expansionSetCode = "UGL"; + this.frameStyle = FrameStyle.UGL_FULL_ART_BASIC; } public Mountain(final Mountain card) { diff --git a/Mage.Sets/src/mage/sets/unglued/Plains.java b/Mage.Sets/src/mage/sets/unglued/Plains.java index 227e338250..8d2d55c6e1 100644 --- a/Mage.Sets/src/mage/sets/unglued/Plains.java +++ b/Mage.Sets/src/mage/sets/unglued/Plains.java @@ -28,6 +28,8 @@ package mage.sets.unglued; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Plains extends mage.cards.basiclands.Plains { public Plains(UUID ownerId) { super(ownerId, 84); this.expansionSetCode = "UGL"; + this.frameStyle = FrameStyle.UGL_FULL_ART_BASIC; } public Plains(final Plains card) { diff --git a/Mage.Sets/src/mage/sets/unglued/Swamp.java b/Mage.Sets/src/mage/sets/unglued/Swamp.java index 9b697185af..93ddbcddb8 100644 --- a/Mage.Sets/src/mage/sets/unglued/Swamp.java +++ b/Mage.Sets/src/mage/sets/unglued/Swamp.java @@ -28,6 +28,8 @@ package mage.sets.unglued; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Swamp extends mage.cards.basiclands.Swamp { public Swamp(UUID ownerId) { super(ownerId, 86); this.expansionSetCode = "UGL"; + this.frameStyle = FrameStyle.UGL_FULL_ART_BASIC; } public Swamp(final Swamp card) { diff --git a/Mage.Sets/src/mage/sets/unhinged/Forest.java b/Mage.Sets/src/mage/sets/unhinged/Forest.java index f13f00a068..790991118b 100644 --- a/Mage.Sets/src/mage/sets/unhinged/Forest.java +++ b/Mage.Sets/src/mage/sets/unhinged/Forest.java @@ -28,6 +28,8 @@ package mage.sets.unhinged; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -38,6 +40,7 @@ public class Forest extends mage.cards.basiclands.Forest { public Forest(UUID ownerId) { super(ownerId, 140); this.expansionSetCode = "UNH"; + this.frameStyle = FrameStyle.UNH_FULL_ART_BASIC; } public Forest(final Forest card) { diff --git a/Mage.Sets/src/mage/sets/unhinged/Island.java b/Mage.Sets/src/mage/sets/unhinged/Island.java index 9890a84206..24c3163b25 100644 --- a/Mage.Sets/src/mage/sets/unhinged/Island.java +++ b/Mage.Sets/src/mage/sets/unhinged/Island.java @@ -28,6 +28,8 @@ package mage.sets.unhinged; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -39,6 +41,7 @@ public class Island extends mage.cards.basiclands.Island { public Island(UUID ownerId) { super(ownerId, 137); this.expansionSetCode = "UNH"; + this.frameStyle = FrameStyle.UNH_FULL_ART_BASIC; } public Island(final Island card) { diff --git a/Mage.Sets/src/mage/sets/unhinged/Mountain.java b/Mage.Sets/src/mage/sets/unhinged/Mountain.java index 38b666a6ac..a75fd46a4e 100644 --- a/Mage.Sets/src/mage/sets/unhinged/Mountain.java +++ b/Mage.Sets/src/mage/sets/unhinged/Mountain.java @@ -28,6 +28,8 @@ package mage.sets.unhinged; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -39,6 +41,7 @@ public class Mountain extends mage.cards.basiclands.Mountain { public Mountain(UUID ownerId) { super(ownerId, 139); this.expansionSetCode = "UNH"; + this.frameStyle = FrameStyle.UNH_FULL_ART_BASIC; } public Mountain(final Mountain card) { diff --git a/Mage.Sets/src/mage/sets/unhinged/Plains.java b/Mage.Sets/src/mage/sets/unhinged/Plains.java index 95299023e4..a6d7a8c295 100644 --- a/Mage.Sets/src/mage/sets/unhinged/Plains.java +++ b/Mage.Sets/src/mage/sets/unhinged/Plains.java @@ -28,6 +28,8 @@ package mage.sets.unhinged; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -39,6 +41,7 @@ public class Plains extends mage.cards.basiclands.Plains { public Plains(UUID ownerId) { super(ownerId, 136); this.expansionSetCode = "UNH"; + this.frameStyle = FrameStyle.UNH_FULL_ART_BASIC; } public Plains(final Plains card) { diff --git a/Mage.Sets/src/mage/sets/unhinged/Swamp.java b/Mage.Sets/src/mage/sets/unhinged/Swamp.java index 046793432c..3d834dddb2 100644 --- a/Mage.Sets/src/mage/sets/unhinged/Swamp.java +++ b/Mage.Sets/src/mage/sets/unhinged/Swamp.java @@ -28,6 +28,8 @@ package mage.sets.unhinged; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -39,6 +41,7 @@ public class Swamp extends mage.cards.basiclands.Swamp { public Swamp(UUID ownerId) { super(ownerId, 138); this.expansionSetCode = "UNH"; + this.frameStyle = FrameStyle.UNH_FULL_ART_BASIC; } public Swamp(final Swamp card) { diff --git a/Mage.Sets/src/mage/sets/zendikar/Forest1.java b/Mage.Sets/src/mage/sets/zendikar/Forest1.java index e652ff9ecc..6c27a7c205 100644 --- a/Mage.Sets/src/mage/sets/zendikar/Forest1.java +++ b/Mage.Sets/src/mage/sets/zendikar/Forest1.java @@ -28,6 +28,8 @@ package mage.sets.zendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -39,6 +41,7 @@ public class Forest1 extends mage.cards.basiclands.Forest { public Forest1(UUID ownerId) { super(ownerId, 246); this.expansionSetCode = "ZEN"; + this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC; } public Forest1(final Forest1 card) { diff --git a/Mage.Sets/src/mage/sets/zendikar/Forest2.java b/Mage.Sets/src/mage/sets/zendikar/Forest2.java index 85e7a205ce..71aa0d39b6 100644 --- a/Mage.Sets/src/mage/sets/zendikar/Forest2.java +++ b/Mage.Sets/src/mage/sets/zendikar/Forest2.java @@ -28,6 +28,8 @@ package mage.sets.zendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -39,6 +41,7 @@ public class Forest2 extends mage.cards.basiclands.Forest { public Forest2(UUID ownerId) { super(ownerId, 247); this.expansionSetCode = "ZEN"; + this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC; } public Forest2(final Forest2 card) { diff --git a/Mage.Sets/src/mage/sets/zendikar/Forest3.java b/Mage.Sets/src/mage/sets/zendikar/Forest3.java index 945157ad0c..bff8bb8b79 100644 --- a/Mage.Sets/src/mage/sets/zendikar/Forest3.java +++ b/Mage.Sets/src/mage/sets/zendikar/Forest3.java @@ -28,6 +28,8 @@ package mage.sets.zendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -39,6 +41,7 @@ public class Forest3 extends mage.cards.basiclands.Forest { public Forest3(UUID ownerId) { super(ownerId, 248); this.expansionSetCode = "ZEN"; + this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC; } public Forest3(final Forest3 card) { diff --git a/Mage.Sets/src/mage/sets/zendikar/Forest4.java b/Mage.Sets/src/mage/sets/zendikar/Forest4.java index d27e5503d8..2b649c0a81 100644 --- a/Mage.Sets/src/mage/sets/zendikar/Forest4.java +++ b/Mage.Sets/src/mage/sets/zendikar/Forest4.java @@ -28,6 +28,8 @@ package mage.sets.zendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -39,6 +41,7 @@ public class Forest4 extends mage.cards.basiclands.Forest { public Forest4(UUID ownerId) { super(ownerId, 249); this.expansionSetCode = "ZEN"; + this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC; } public Forest4(final Forest4 card) { diff --git a/Mage.Sets/src/mage/sets/zendikar/Island1.java b/Mage.Sets/src/mage/sets/zendikar/Island1.java index 07cae71f78..2c6fc05c0b 100644 --- a/Mage.Sets/src/mage/sets/zendikar/Island1.java +++ b/Mage.Sets/src/mage/sets/zendikar/Island1.java @@ -28,6 +28,8 @@ package mage.sets.zendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -39,6 +41,7 @@ public class Island1 extends mage.cards.basiclands.Island { public Island1(UUID ownerId) { super(ownerId, 234); this.expansionSetCode = "ZEN"; + this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC; } public Island1(final Island1 card) { diff --git a/Mage.Sets/src/mage/sets/zendikar/Island2.java b/Mage.Sets/src/mage/sets/zendikar/Island2.java index e048d0a5c0..b2a8ebd555 100644 --- a/Mage.Sets/src/mage/sets/zendikar/Island2.java +++ b/Mage.Sets/src/mage/sets/zendikar/Island2.java @@ -28,6 +28,8 @@ package mage.sets.zendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -39,6 +41,7 @@ public class Island2 extends mage.cards.basiclands.Island { public Island2(UUID ownerId) { super(ownerId, 235); this.expansionSetCode = "ZEN"; + this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC; } public Island2(final Island2 card) { diff --git a/Mage.Sets/src/mage/sets/zendikar/Island3.java b/Mage.Sets/src/mage/sets/zendikar/Island3.java index 927af5ca21..dfe83bc105 100644 --- a/Mage.Sets/src/mage/sets/zendikar/Island3.java +++ b/Mage.Sets/src/mage/sets/zendikar/Island3.java @@ -28,6 +28,8 @@ package mage.sets.zendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -39,6 +41,7 @@ public class Island3 extends mage.cards.basiclands.Island { public Island3(UUID ownerId) { super(ownerId, 236); this.expansionSetCode = "ZEN"; + this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC; } public Island3(final Island3 card) { diff --git a/Mage.Sets/src/mage/sets/zendikar/Island4.java b/Mage.Sets/src/mage/sets/zendikar/Island4.java index 7d8fca5d2e..85958159a4 100644 --- a/Mage.Sets/src/mage/sets/zendikar/Island4.java +++ b/Mage.Sets/src/mage/sets/zendikar/Island4.java @@ -28,6 +28,8 @@ package mage.sets.zendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -39,6 +41,7 @@ public class Island4 extends mage.cards.basiclands.Island { public Island4(UUID ownerId) { super(ownerId, 237); this.expansionSetCode = "ZEN"; + this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC; } public Island4(final Island4 card) { diff --git a/Mage.Sets/src/mage/sets/zendikar/Mountain1.java b/Mage.Sets/src/mage/sets/zendikar/Mountain1.java index db56ae4753..11c3fd8752 100644 --- a/Mage.Sets/src/mage/sets/zendikar/Mountain1.java +++ b/Mage.Sets/src/mage/sets/zendikar/Mountain1.java @@ -28,6 +28,8 @@ package mage.sets.zendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -39,6 +41,7 @@ public class Mountain1 extends mage.cards.basiclands.Mountain { public Mountain1(UUID ownerId) { super(ownerId, 242); this.expansionSetCode = "ZEN"; + this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC; } public Mountain1(final Mountain1 card) { diff --git a/Mage.Sets/src/mage/sets/zendikar/Mountain2.java b/Mage.Sets/src/mage/sets/zendikar/Mountain2.java index 481fd4a3d5..14d8ca24b2 100644 --- a/Mage.Sets/src/mage/sets/zendikar/Mountain2.java +++ b/Mage.Sets/src/mage/sets/zendikar/Mountain2.java @@ -28,6 +28,8 @@ package mage.sets.zendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -39,6 +41,7 @@ public class Mountain2 extends mage.cards.basiclands.Mountain { public Mountain2(UUID ownerId) { super(ownerId, 243); this.expansionSetCode = "ZEN"; + this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC; } public Mountain2(final Mountain2 card) { diff --git a/Mage.Sets/src/mage/sets/zendikar/Mountain3.java b/Mage.Sets/src/mage/sets/zendikar/Mountain3.java index 84127eee56..56afde0702 100644 --- a/Mage.Sets/src/mage/sets/zendikar/Mountain3.java +++ b/Mage.Sets/src/mage/sets/zendikar/Mountain3.java @@ -28,6 +28,8 @@ package mage.sets.zendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -39,6 +41,7 @@ public class Mountain3 extends mage.cards.basiclands.Mountain { public Mountain3(UUID ownerId) { super(ownerId, 244); this.expansionSetCode = "ZEN"; + this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC; } public Mountain3(final Mountain3 card) { diff --git a/Mage.Sets/src/mage/sets/zendikar/Mountain4.java b/Mage.Sets/src/mage/sets/zendikar/Mountain4.java index 7cc370f32a..099dd3f474 100644 --- a/Mage.Sets/src/mage/sets/zendikar/Mountain4.java +++ b/Mage.Sets/src/mage/sets/zendikar/Mountain4.java @@ -28,6 +28,8 @@ package mage.sets.zendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -39,6 +41,7 @@ public class Mountain4 extends mage.cards.basiclands.Mountain { public Mountain4(UUID ownerId) { super(ownerId, 245); this.expansionSetCode = "ZEN"; + this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC; } public Mountain4(final Mountain4 card) { diff --git a/Mage.Sets/src/mage/sets/zendikar/Plains1.java b/Mage.Sets/src/mage/sets/zendikar/Plains1.java index 54057b9cd0..80bbbe61a8 100644 --- a/Mage.Sets/src/mage/sets/zendikar/Plains1.java +++ b/Mage.Sets/src/mage/sets/zendikar/Plains1.java @@ -28,6 +28,8 @@ package mage.sets.zendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -39,6 +41,7 @@ public class Plains1 extends mage.cards.basiclands.Plains { public Plains1(UUID ownerId) { super(ownerId, 230); this.expansionSetCode = "ZEN"; + this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC; } public Plains1(final Plains1 card) { diff --git a/Mage.Sets/src/mage/sets/zendikar/Plains2.java b/Mage.Sets/src/mage/sets/zendikar/Plains2.java index 4411aa944f..f0c7c15c02 100644 --- a/Mage.Sets/src/mage/sets/zendikar/Plains2.java +++ b/Mage.Sets/src/mage/sets/zendikar/Plains2.java @@ -28,6 +28,8 @@ package mage.sets.zendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -39,6 +41,7 @@ public class Plains2 extends mage.cards.basiclands.Plains { public Plains2(UUID ownerId) { super(ownerId, 231); this.expansionSetCode = "ZEN"; + this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC; } public Plains2(final Plains2 card) { diff --git a/Mage.Sets/src/mage/sets/zendikar/Plains3.java b/Mage.Sets/src/mage/sets/zendikar/Plains3.java index 61dcf9a75c..837d14d639 100644 --- a/Mage.Sets/src/mage/sets/zendikar/Plains3.java +++ b/Mage.Sets/src/mage/sets/zendikar/Plains3.java @@ -28,6 +28,8 @@ package mage.sets.zendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -39,6 +41,7 @@ public class Plains3 extends mage.cards.basiclands.Plains { public Plains3(UUID ownerId) { super(ownerId, 232); this.expansionSetCode = "ZEN"; + this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC; } public Plains3(final Plains3 card) { diff --git a/Mage.Sets/src/mage/sets/zendikar/Plains4.java b/Mage.Sets/src/mage/sets/zendikar/Plains4.java index 550a872419..67e4a4cb6c 100644 --- a/Mage.Sets/src/mage/sets/zendikar/Plains4.java +++ b/Mage.Sets/src/mage/sets/zendikar/Plains4.java @@ -28,6 +28,8 @@ package mage.sets.zendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -39,6 +41,7 @@ public class Plains4 extends mage.cards.basiclands.Plains { public Plains4(UUID ownerId) { super(ownerId, 233); this.expansionSetCode = "ZEN"; + this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC; } public Plains4(final Plains4 card) { diff --git a/Mage.Sets/src/mage/sets/zendikar/Swamp1.java b/Mage.Sets/src/mage/sets/zendikar/Swamp1.java index 4c874ddcdf..391e488672 100644 --- a/Mage.Sets/src/mage/sets/zendikar/Swamp1.java +++ b/Mage.Sets/src/mage/sets/zendikar/Swamp1.java @@ -28,6 +28,8 @@ package mage.sets.zendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -39,6 +41,7 @@ public class Swamp1 extends mage.cards.basiclands.Swamp { public Swamp1(UUID ownerId) { super(ownerId, 238); this.expansionSetCode = "ZEN"; + this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC; } public Swamp1(final Swamp1 card) { diff --git a/Mage.Sets/src/mage/sets/zendikar/Swamp2.java b/Mage.Sets/src/mage/sets/zendikar/Swamp2.java index db4208b575..c4653c9831 100644 --- a/Mage.Sets/src/mage/sets/zendikar/Swamp2.java +++ b/Mage.Sets/src/mage/sets/zendikar/Swamp2.java @@ -28,6 +28,8 @@ package mage.sets.zendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -39,6 +41,7 @@ public class Swamp2 extends mage.cards.basiclands.Swamp { public Swamp2(UUID ownerId) { super(ownerId, 239); this.expansionSetCode = "ZEN"; + this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC; } public Swamp2(final Swamp2 card) { diff --git a/Mage.Sets/src/mage/sets/zendikar/Swamp3.java b/Mage.Sets/src/mage/sets/zendikar/Swamp3.java index 4f347cdcbb..123bd36470 100644 --- a/Mage.Sets/src/mage/sets/zendikar/Swamp3.java +++ b/Mage.Sets/src/mage/sets/zendikar/Swamp3.java @@ -28,6 +28,8 @@ package mage.sets.zendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -39,6 +41,7 @@ public class Swamp3 extends mage.cards.basiclands.Swamp { public Swamp3(UUID ownerId) { super(ownerId, 240); this.expansionSetCode = "ZEN"; + this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC; } public Swamp3(final Swamp3 card) { diff --git a/Mage.Sets/src/mage/sets/zendikar/Swamp4.java b/Mage.Sets/src/mage/sets/zendikar/Swamp4.java index ffa875496b..5cd24edba4 100644 --- a/Mage.Sets/src/mage/sets/zendikar/Swamp4.java +++ b/Mage.Sets/src/mage/sets/zendikar/Swamp4.java @@ -28,6 +28,8 @@ package mage.sets.zendikar; +import mage.cards.FrameStyle; + import java.util.UUID; /** @@ -39,6 +41,7 @@ public class Swamp4 extends mage.cards.basiclands.Swamp { public Swamp4(UUID ownerId) { super(ownerId, 241); this.expansionSetCode = "ZEN"; + this.frameStyle = FrameStyle.ZEN_FULL_ART_BASIC; } public Swamp4(final Swamp4 card) { diff --git a/Mage/src/main/java/mage/MageObject.java b/Mage/src/main/java/mage/MageObject.java index db9ed97dee..a0d9c5bc0c 100644 --- a/Mage/src/main/java/mage/MageObject.java +++ b/Mage/src/main/java/mage/MageObject.java @@ -7,6 +7,7 @@ import mage.abilities.Abilities; import mage.abilities.Ability; import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCosts; +import mage.cards.FrameStyle; import mage.constants.CardType; import mage.game.Game; @@ -37,6 +38,8 @@ public interface MageObject extends MageItem, Serializable { ObjectColor getColor(Game game); ObjectColor getFrameColor(Game game); + + FrameStyle getFrameStyle(); ManaCosts getManaCost(); diff --git a/Mage/src/main/java/mage/MageObjectImpl.java b/Mage/src/main/java/mage/MageObjectImpl.java index 80b3d7fd8d..daea728b07 100644 --- a/Mage/src/main/java/mage/MageObjectImpl.java +++ b/Mage/src/main/java/mage/MageObjectImpl.java @@ -39,6 +39,7 @@ import mage.abilities.costs.mana.ManaCosts; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.keyword.ChangelingAbility; import mage.abilities.mana.ManaAbility; +import mage.cards.FrameStyle; import mage.constants.CardType; import mage.game.Game; import mage.util.CardUtil; @@ -52,6 +53,7 @@ public abstract class MageObjectImpl implements MageObject { protected ManaCosts manaCost; protected ObjectColor color; protected ObjectColor frameColor; + protected FrameStyle frameStyle; protected List cardType = new ArrayList<>(); protected List subtype = new ArrayList<>(); protected List supertype = new ArrayList<>(); @@ -71,6 +73,7 @@ public abstract class MageObjectImpl implements MageObject { toughness = new MageInt(0); color = new ObjectColor(); frameColor = new ObjectColor(); + frameStyle = FrameStyle.M15_NORMAL; manaCost = new ManaCostsImpl<>(""); abilities = new AbilitiesImpl<>(); } @@ -82,6 +85,7 @@ public abstract class MageObjectImpl implements MageObject { text = object.text; color = object.color.copy(); frameColor = object.frameColor.copy(); + frameStyle = object.frameStyle; power = object.power.copy(); toughness = object.toughness.copy(); abilities = object.abilities.copy(); @@ -221,6 +225,11 @@ public abstract class MageObjectImpl implements MageObject { } } + @Override + public FrameStyle getFrameStyle() { + return frameStyle; + } + @Override public ManaCosts getManaCost() { return manaCost; diff --git a/Mage/src/main/java/mage/cards/FrameStyle.java b/Mage/src/main/java/mage/cards/FrameStyle.java new file mode 100644 index 0000000000..52573fe449 --- /dev/null +++ b/Mage/src/main/java/mage/cards/FrameStyle.java @@ -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; + } +} diff --git a/Mage/src/main/java/mage/cards/mock/MockCard.java b/Mage/src/main/java/mage/cards/mock/MockCard.java index 7a0d375d97..593a6fb538 100644 --- a/Mage/src/main/java/mage/cards/mock/MockCard.java +++ b/Mage/src/main/java/mage/cards/mock/MockCard.java @@ -30,6 +30,7 @@ public class MockCard extends CardImpl { this.subtype = card.getSubTypes(); this.supertype = card.getSupertypes(); + this.usesVariousArt = card.usesVariousArt(); this.manaCost = new ManaCostsImpl(join(card.getManaCosts())); @@ -37,6 +38,7 @@ public class MockCard extends CardImpl { this.color = card.getColor(); this.frameColor = card.getFrameColor(); + this.frameStyle = card.getFrameStyle(); this.splitCard = card.isSplitCard(); this.flipCard = card.isFlipCard(); diff --git a/Mage/src/main/java/mage/cards/repository/CardInfo.java b/Mage/src/main/java/mage/cards/repository/CardInfo.java index a9ead5ffcc..cf6f542328 100644 --- a/Mage/src/main/java/mage/cards/repository/CardInfo.java +++ b/Mage/src/main/java/mage/cards/repository/CardInfo.java @@ -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 items) { StringBuilder sb = new StringBuilder(); for (Object item : items) { diff --git a/Mage/src/main/java/mage/cards/repository/CardRepository.java b/Mage/src/main/java/mage/cards/repository/CardRepository.java index 278d9ea027..3513f0d6ba 100644 --- a/Mage/src/main/java/mage/cards/repository/CardRepository.java +++ b/Mage/src/main/java/mage/cards/repository/CardRepository.java @@ -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 VERSION_ENTITY_NAME = "card"; // 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 - private static final long CARD_CONTENT_VERSION = 57; + private static final long CARD_CONTENT_VERSION = 59; private Dao cardDao; private Set classNames; private final TreeSet landTypes = new TreeSet(); - private CardRepository() { + CardRepository() { File file = new File("db"); if (!file.exists()) { file.mkdirs(); diff --git a/Mage/src/main/java/mage/game/command/Commander.java b/Mage/src/main/java/mage/game/command/Commander.java index 2805caeb80..3831292c62 100644 --- a/Mage/src/main/java/mage/game/command/Commander.java +++ b/Mage/src/main/java/mage/game/command/Commander.java @@ -39,6 +39,7 @@ import mage.abilities.common.CastCommanderAbility; import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCosts; import mage.cards.Card; +import mage.cards.FrameStyle; import mage.constants.CardType; import mage.game.Game; import mage.util.GameLog; @@ -150,6 +151,11 @@ public class Commander implements CommandObject { return card.getFrameColor(game); } + @Override + public FrameStyle getFrameStyle() { + return card.getFrameStyle(); + } + @Override public ManaCosts getManaCost() { return card.getManaCost(); diff --git a/Mage/src/main/java/mage/game/command/Emblem.java b/Mage/src/main/java/mage/game/command/Emblem.java index 6f9f10a864..eb9acc3b3a 100644 --- a/Mage/src/main/java/mage/game/command/Emblem.java +++ b/Mage/src/main/java/mage/game/command/Emblem.java @@ -38,6 +38,7 @@ import mage.abilities.Ability; import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCosts; import mage.abilities.costs.mana.ManaCostsImpl; +import mage.cards.FrameStyle; import mage.constants.CardType; import mage.game.Game; import mage.util.GameLog; @@ -55,6 +56,7 @@ public class Emblem implements CommandObject { private UUID id; private UUID controllerId; private UUID sourceId; + private FrameStyle frameStyle; private Abilities abilites = new AbilitiesImpl<>(); private String expansionSetCodeForImage = null; @@ -65,11 +67,17 @@ public class Emblem implements CommandObject { public Emblem(final Emblem emblem) { this.id = emblem.id; this.name = emblem.name; + this.frameStyle = emblem.frameStyle; this.controllerId = emblem.controllerId; this.sourceId = emblem.sourceId; this.abilites = emblem.abilites.copy(); } + @Override + public FrameStyle getFrameStyle() { + return frameStyle; + } + @Override public void assignNewId() { this.id = UUID.randomUUID(); diff --git a/Mage/src/main/java/mage/game/permanent/PermanentCard.java b/Mage/src/main/java/mage/game/permanent/PermanentCard.java index bb583cd292..23eb2800a7 100644 --- a/Mage/src/main/java/mage/game/permanent/PermanentCard.java +++ b/Mage/src/main/java/mage/game/permanent/PermanentCard.java @@ -119,6 +119,7 @@ public class PermanentCard extends PermanentImpl { this.cardType.addAll(card.getCardType()); this.color = card.getColor(null).copy(); this.frameColor = card.getFrameColor(null).copy(); + this.frameStyle = card.getFrameStyle(); this.manaCost = card.getManaCost().copy(); if (card instanceof PermanentCard) { this.maxLevelCounters = ((PermanentCard) card).maxLevelCounters; diff --git a/Mage/src/main/java/mage/game/permanent/PermanentToken.java b/Mage/src/main/java/mage/game/permanent/PermanentToken.java index e95fc3c0ca..7c730b61fa 100644 --- a/Mage/src/main/java/mage/game/permanent/PermanentToken.java +++ b/Mage/src/main/java/mage/game/permanent/PermanentToken.java @@ -83,6 +83,7 @@ public class PermanentToken extends PermanentImpl { this.cardType = token.getCardType(); this.color = token.getColor(game).copy(); this.frameColor = token.getFrameColor(game); + this.frameStyle = token.getFrameStyle(); this.power.modifyBaseValue(token.getPower().getBaseValueModified()); this.toughness.modifyBaseValue(token.getToughness().getBaseValueModified()); this.supertype = token.getSupertype(); diff --git a/Mage/src/main/java/mage/game/stack/Spell.java b/Mage/src/main/java/mage/game/stack/Spell.java index 85e4b2bb86..7d3d7db703 100644 --- a/Mage/src/main/java/mage/game/stack/Spell.java +++ b/Mage/src/main/java/mage/game/stack/Spell.java @@ -46,6 +46,7 @@ import mage.abilities.keyword.BestowAbility; import mage.abilities.keyword.MorphAbility; import mage.cards.Card; import mage.cards.CardsImpl; +import mage.cards.FrameStyle; import mage.cards.SplitCard; import mage.constants.CardType; import mage.constants.Outcome; @@ -77,6 +78,7 @@ public class Spell extends StackObjImpl implements Card { private final Card card; private final ObjectColor color; private final ObjectColor frameColor; + private final FrameStyle frameStyle; private final SpellAbility ability; private final Zone fromZone; private final UUID id; @@ -90,6 +92,7 @@ public class Spell extends StackObjImpl implements Card { this.card = card; this.color = card.getColor(null).copy(); this.frameColor = card.getFrameColor(null).copy(); + this.frameStyle = card.getFrameStyle(); id = ability.getId(); this.ability = ability; this.ability.setControllerId(controllerId); @@ -131,6 +134,7 @@ public class Spell extends StackObjImpl implements Card { this.faceDown = spell.faceDown; this.color = spell.color.copy(); this.frameColor = spell.color.copy(); + this.frameStyle = spell.frameStyle; } public boolean activate(Game game, boolean noMana) { @@ -492,6 +496,11 @@ public class Spell extends StackObjImpl implements Card { return frameColor; } + @Override + public FrameStyle getFrameStyle() { + return frameStyle; + } + @Override public ManaCosts getManaCost() { return card.getManaCost(); diff --git a/Mage/src/main/java/mage/game/stack/StackAbility.java b/Mage/src/main/java/mage/game/stack/StackAbility.java index 824787d22a..17e4bb2910 100644 --- a/Mage/src/main/java/mage/game/stack/StackAbility.java +++ b/Mage/src/main/java/mage/game/stack/StackAbility.java @@ -49,6 +49,7 @@ import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.Effect; import mage.abilities.effects.Effects; import mage.cards.Card; +import mage.cards.FrameStyle; import mage.constants.AbilityType; import mage.constants.AbilityWord; import mage.constants.CardType; @@ -198,6 +199,12 @@ public class StackAbility extends StackObjImpl implements Ability { return ability.getSourceObject(game).getFrameColor(game); } + @Override + public FrameStyle getFrameStyle() { + // Abilities all use the same frame + return FrameStyle.M15_NORMAL; + } + @Override public ManaCosts getManaCost() { return emptyCost;