From 4ec7d626fa3f0d1c60a518349be0c83d91e05ad7 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 8 Oct 2016 19:03:32 +0200 Subject: [PATCH] * Fix to get land images shown again. --- .../java/org/mage/card/arcane/CardPanel.java | 2 ++ Mage.Common/src/mage/utils/MageVersion.java | 2 +- .../java/mage/cards/repository/CardInfo.java | 27 +++++++++---------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/Mage.Client/src/main/java/org/mage/card/arcane/CardPanel.java b/Mage.Client/src/main/java/org/mage/card/arcane/CardPanel.java index 23520e6a83..738f585acb 100644 --- a/Mage.Client/src/main/java/org/mage/card/arcane/CardPanel.java +++ b/Mage.Client/src/main/java/org/mage/card/arcane/CardPanel.java @@ -510,6 +510,8 @@ public abstract class CardPanel extends MagePermanent implements MouseListener, * However, they should ALSO call repaint() after the superclass call to * this function, that can't be done here as the overriders may need to do * things both before and after this call before repainting. + * + * @param card */ @Override public void update(CardView card) { diff --git a/Mage.Common/src/mage/utils/MageVersion.java b/Mage.Common/src/mage/utils/MageVersion.java index 729d370d7e..378d61319f 100644 --- a/Mage.Common/src/mage/utils/MageVersion.java +++ b/Mage.Common/src/mage/utils/MageVersion.java @@ -41,7 +41,7 @@ public class MageVersion implements Serializable, Comparable { public final static int MAGE_VERSION_MAJOR = 1; public final static int MAGE_VERSION_MINOR = 4; public final static int MAGE_VERSION_PATCH = 16; - public final static String MAGE_VERSION_MINOR_PATCH = "v0"; + public final static String MAGE_VERSION_MINOR_PATCH = "v1"; public final static String MAGE_VERSION_INFO = ""; private final int major; diff --git a/Mage/src/main/java/mage/cards/repository/CardInfo.java b/Mage/src/main/java/mage/cards/repository/CardInfo.java index b1a4409fd9..197d798bb6 100644 --- a/Mage/src/main/java/mage/cards/repository/CardInfo.java +++ b/Mage/src/main/java/mage/cards/repository/CardInfo.java @@ -30,24 +30,21 @@ package mage.cards.repository; import com.j256.ormlite.field.DataType; import com.j256.ormlite.field.DatabaseField; import com.j256.ormlite.table.DatabaseTable; - - import java.util.ArrayList; import java.util.Arrays; import java.util.List; - -import mage.cards.FrameStyle; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Rarity; import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.SpellAbility; import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility; import mage.cards.Card; import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.FrameStyle; import mage.cards.mock.MockCard; import mage.cards.mock.MockSplitCard; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.constants.SpellAbilityType; import org.apache.log4j.Logger; @@ -156,13 +153,13 @@ public class CardInfo { this.setManaCosts(card.getManaCost().getSymbols()); int length = 0; - for (String rule: card.getRules()) { + for (String rule : card.getRules()) { length += rule.length(); } if (length > MAX_RULE_LENGTH) { length = 0; ArrayList shortRules = new ArrayList<>(); - for (String rule: card.getRules()) { + for (String rule : card.getRules()) { if (length + rule.length() + 3 <= MAX_RULE_LENGTH) { shortRules.add(rule); length += rule.length() + 3; @@ -185,10 +182,10 @@ public class CardInfo { this.splitCardHalf = true; } } - + // Starting loyalty if (card.getCardType().contains(CardType.PLANESWALKER)) { - for (Ability ab: card.getAbilities()) { + for (Ability ab : card.getAbilities()) { if (ab instanceof PlanswalkerEntersWithLoyalityCountersAbility) { this.startingLoyalty = "" + ((PlanswalkerEntersWithLoyalityCountersAbility) ab).getStartingLoyalty(); } @@ -215,7 +212,9 @@ public class CardInfo { } public boolean usesVariousArt() { - return Character.isDigit(className.charAt(className.length() - 1)); + return getRarity().equals(Rarity.LAND) + || Character.isDigit(className.charAt(className.length() - 1)) + || !Character.isDigit(cardNumber.charAt(cardNumber.length() - 1)); } public ObjectColor getColor() { @@ -227,7 +226,7 @@ public class CardInfo { color.setWhite(white); return color; } - + public ObjectColor getFrameColor() { return new ObjectColor(frameColor); } @@ -321,7 +320,7 @@ public class CardInfo { public String getToughness() { return toughness; } - + public String getStartingLoyalty() { return startingLoyalty; }