From 539b03bd1d50b7bd2953848672ac38fad668a054 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 13 Aug 2016 10:14:38 +0200 Subject: [PATCH] Xmage 1.4.14v0 --- Mage.Client/pom.xml | 2 +- .../collection/viewer/MageBook.java | 49 ++++++++++--------- Mage.Common/pom.xml | 2 +- Mage.Common/src/mage/utils/MageVersion.java | 4 +- Mage.Plugins/Mage.Counter.Plugin/pom.xml | 2 +- Mage.Plugins/pom.xml | 2 +- Mage.Server.Console/pom.xml | 2 +- .../Mage.Deck.Constructed/pom.xml | 2 +- Mage.Server.Plugins/Mage.Deck.Limited/pom.xml | 2 +- .../Mage.Game.CommanderDuel/pom.xml | 2 +- .../Mage.Game.CommanderFreeForAll/pom.xml | 2 +- .../Mage.Game.FreeForAll/pom.xml | 2 +- .../Mage.Game.MomirDuel/pom.xml | 2 +- .../Mage.Game.TinyLeadersDuel/pom.xml | 2 +- .../Mage.Game.TwoPlayerDuel/pom.xml | 2 +- .../Mage.Player.AI.DraftBot/pom.xml | 2 +- Mage.Server.Plugins/Mage.Player.AI.MA/pom.xml | 2 +- Mage.Server.Plugins/Mage.Player.AI/pom.xml | 2 +- .../Mage.Player.AIMCTS/pom.xml | 2 +- .../Mage.Player.AIMinimax/pom.xml | 2 +- Mage.Server.Plugins/Mage.Player.Human/pom.xml | 2 +- .../Mage.Tournament.BoosterDraft/pom.xml | 2 +- .../Mage.Tournament.Constructed/pom.xml | 2 +- .../Mage.Tournament.Sealed/pom.xml | 2 +- Mage.Server.Plugins/pom.xml | 2 +- Mage.Server/pom.xml | 2 +- Mage.Sets/pom.xml | 2 +- Mage.Stats/pom.xml | 2 +- Mage.Tests/pom.xml | 2 +- .../java/org/mage/test/player/TestPlayer.java | 2 +- Mage.Updater/pom.xml | 2 +- Mage/pom.xml | 2 +- pom.xml | 4 +- 33 files changed, 60 insertions(+), 57 deletions(-) diff --git a/Mage.Client/pom.xml b/Mage.Client/pom.xml index 1a7cf7c9da..9f0a82df23 100644 --- a/Mage.Client/pom.xml +++ b/Mage.Client/pom.xml @@ -6,7 +6,7 @@ org.mage mage-root - 1.4.13 + 1.4.14 org.mage diff --git a/Mage.Client/src/main/java/mage/client/deckeditor/collection/viewer/MageBook.java b/Mage.Client/src/main/java/mage/client/deckeditor/collection/viewer/MageBook.java index f7c6a68f5c..63aaac456a 100644 --- a/Mage.Client/src/main/java/mage/client/deckeditor/collection/viewer/MageBook.java +++ b/Mage.Client/src/main/java/mage/client/deckeditor/collection/viewer/MageBook.java @@ -24,10 +24,23 @@ * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. -*/ - + */ package mage.client.deckeditor.collection.viewer; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Image; +import java.awt.Rectangle; +import java.awt.image.BufferedImage; +import java.io.FileNotFoundException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.UUID; +import javax.imageio.ImageIO; +import javax.swing.*; import mage.cards.Card; import mage.cards.CardDimensions; import mage.cards.MageCard; @@ -39,11 +52,11 @@ import mage.client.MageFrame; import mage.client.cards.BigCard; import mage.client.components.HoverButton; import mage.client.plugins.impl.Plugins; -import mage.client.util.audio.AudioManager; import mage.client.util.Command; import mage.client.util.Config; import mage.client.util.ImageHelper; import mage.client.util.NaturalOrderCardNumberComparator; +import mage.client.util.audio.AudioManager; import mage.client.util.sets.ConstructedFormats; import mage.components.ImagePanel; import mage.constants.Rarity; @@ -52,20 +65,6 @@ import org.apache.log4j.Logger; import org.mage.card.arcane.GlowText; import org.mage.card.arcane.ManaSymbols; -import javax.imageio.ImageIO; -import javax.swing.*; -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.Image; -import java.awt.Rectangle; -import java.awt.image.BufferedImage; -import java.io.FileNotFoundException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - /** * Mage book with cards and page flipping. * @@ -204,7 +203,7 @@ public class MageBook extends JComponent { currentPanel = jPanelRight; image = imageRight; currentTab = tab; - selectedTab = count-1; + selectedTab = count - 1; } } jPanelLeft.revalidate(); @@ -233,8 +232,8 @@ public class MageBook extends JComponent { } // calculate the x offset of the second (right) page - int second_page_x = (conf.WIDTH - 2 * LEFT_RIGHT_PAGES_WIDTH) - - (cardDimensions.frameWidth + CardPosition.GAP_X) * conf.CARD_COLUMNS + CardPosition.GAP_X - OFFSET_X; + int second_page_x = (conf.WIDTH - 2 * LEFT_RIGHT_PAGES_WIDTH) + - (cardDimensions.frameWidth + CardPosition.GAP_X) * conf.CARD_COLUMNS + CardPosition.GAP_X - OFFSET_X; rectangle.setLocation(second_page_x, OFFSET_Y); for (int i = conf.CARDS_PER_PAGE / 2; i < Math.min(conf.CARDS_PER_PAGE, size); i++) { @@ -270,7 +269,7 @@ public class MageBook extends JComponent { CardCriteria criteria = new CardCriteria(); criteria.setCodes(set); List cards = CardRepository.instance.findCards(criteria); - cards.sort(new NaturalOrderCardNumberComparator()); + Collections.sort(cards, new NaturalOrderCardNumberComparator()); int start = page * conf.CARDS_PER_PAGE; int end = page * conf.CARDS_PER_PAGE + conf.CARDS_PER_PAGE; if (end > cards.size()) { @@ -356,6 +355,7 @@ public class MageBook extends JComponent { * Defines the position of the next card on the mage book */ private static class CardPosition { + private CardPosition() { } @@ -371,6 +371,7 @@ public class MageBook extends JComponent { } abstract class Configuration { + public int CARDS_PER_PAGE; public int CARD_ROWS; public int CARD_COLUMNS; @@ -382,6 +383,7 @@ public class MageBook extends JComponent { } class _3x3Configuration extends Configuration { + _3x3Configuration() { this.WIDTH = 950; this.HEIGHT = 650; @@ -394,6 +396,7 @@ public class MageBook extends JComponent { } class _4x4Configuration extends Configuration { + _4x4Configuration() { this.WIDTH = 1250; this.HEIGHT = 850; @@ -419,8 +422,8 @@ public class MageBook extends JComponent { private static CardDimensions cardDimensions = new CardDimensions(1.2d); private static final Logger log = Logger.getLogger(MageBook.class); private Dimension cardDimension; - private java.util.List setsToDisplay = new ArrayList(); - private java.util.List tabs = new ArrayList(); + private java.util.List setsToDisplay = new ArrayList<>(); + private java.util.List tabs = new ArrayList<>(); private int selectedTab; private static final String CENTER_PANEL_IMAGE_PATH = "/book_bg.jpg"; diff --git a/Mage.Common/pom.xml b/Mage.Common/pom.xml index 5df70791e0..221ead2750 100644 --- a/Mage.Common/pom.xml +++ b/Mage.Common/pom.xml @@ -7,7 +7,7 @@ org.mage mage-root - 1.4.13 + 1.4.14 mage-common diff --git a/Mage.Common/src/mage/utils/MageVersion.java b/Mage.Common/src/mage/utils/MageVersion.java index 9c6758207b..6d6775009f 100644 --- a/Mage.Common/src/mage/utils/MageVersion.java +++ b/Mage.Common/src/mage/utils/MageVersion.java @@ -40,8 +40,8 @@ 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 = 13; - public final static String MAGE_VERSION_MINOR_PATCH = "v3"; + public final static int MAGE_VERSION_PATCH = 14; + public final static String MAGE_VERSION_MINOR_PATCH = "v0"; public final static String MAGE_VERSION_INFO = ""; private final int major; diff --git a/Mage.Plugins/Mage.Counter.Plugin/pom.xml b/Mage.Plugins/Mage.Counter.Plugin/pom.xml index 4f7084773f..482ae98d75 100644 --- a/Mage.Plugins/Mage.Counter.Plugin/pom.xml +++ b/Mage.Plugins/Mage.Counter.Plugin/pom.xml @@ -7,7 +7,7 @@ org.mage mage-plugins - 1.4.13 + 1.4.14 mage-counter-plugin diff --git a/Mage.Plugins/pom.xml b/Mage.Plugins/pom.xml index eae8d78f29..53055cd13e 100644 --- a/Mage.Plugins/pom.xml +++ b/Mage.Plugins/pom.xml @@ -7,7 +7,7 @@ org.mage mage-root - 1.4.13 + 1.4.14 mage-plugins diff --git a/Mage.Server.Console/pom.xml b/Mage.Server.Console/pom.xml index 22dfcc5301..040bc47923 100644 --- a/Mage.Server.Console/pom.xml +++ b/Mage.Server.Console/pom.xml @@ -6,7 +6,7 @@ org.mage mage-root - 1.4.13 + 1.4.14 org.mage diff --git a/Mage.Server.Plugins/Mage.Deck.Constructed/pom.xml b/Mage.Server.Plugins/Mage.Deck.Constructed/pom.xml index 80cb8a30b4..b385acd0ed 100644 --- a/Mage.Server.Plugins/Mage.Deck.Constructed/pom.xml +++ b/Mage.Server.Plugins/Mage.Deck.Constructed/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.13 + 1.4.14 mage-deck-constructed diff --git a/Mage.Server.Plugins/Mage.Deck.Limited/pom.xml b/Mage.Server.Plugins/Mage.Deck.Limited/pom.xml index d4d4df3f3d..d465d9c1c6 100644 --- a/Mage.Server.Plugins/Mage.Deck.Limited/pom.xml +++ b/Mage.Server.Plugins/Mage.Deck.Limited/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.13 + 1.4.14 mage-deck-limited diff --git a/Mage.Server.Plugins/Mage.Game.CommanderDuel/pom.xml b/Mage.Server.Plugins/Mage.Game.CommanderDuel/pom.xml index c819ebc56b..6eb4b4febb 100644 --- a/Mage.Server.Plugins/Mage.Game.CommanderDuel/pom.xml +++ b/Mage.Server.Plugins/Mage.Game.CommanderDuel/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.13 + 1.4.14 mage-game-commanderduel diff --git a/Mage.Server.Plugins/Mage.Game.CommanderFreeForAll/pom.xml b/Mage.Server.Plugins/Mage.Game.CommanderFreeForAll/pom.xml index 9ce68e787b..55e372df46 100644 --- a/Mage.Server.Plugins/Mage.Game.CommanderFreeForAll/pom.xml +++ b/Mage.Server.Plugins/Mage.Game.CommanderFreeForAll/pom.xml @@ -6,7 +6,7 @@ org.mage mage-server-plugins - 1.4.13 + 1.4.14 mage-game-commanderfreeforall diff --git a/Mage.Server.Plugins/Mage.Game.FreeForAll/pom.xml b/Mage.Server.Plugins/Mage.Game.FreeForAll/pom.xml index a3ce01e93d..c36fe47e52 100644 --- a/Mage.Server.Plugins/Mage.Game.FreeForAll/pom.xml +++ b/Mage.Server.Plugins/Mage.Game.FreeForAll/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.13 + 1.4.14 mage-game-freeforall diff --git a/Mage.Server.Plugins/Mage.Game.MomirDuel/pom.xml b/Mage.Server.Plugins/Mage.Game.MomirDuel/pom.xml index 1025baa692..a58e87b5c4 100644 --- a/Mage.Server.Plugins/Mage.Game.MomirDuel/pom.xml +++ b/Mage.Server.Plugins/Mage.Game.MomirDuel/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.13 + 1.4.14 mage-game-momirduel diff --git a/Mage.Server.Plugins/Mage.Game.TinyLeadersDuel/pom.xml b/Mage.Server.Plugins/Mage.Game.TinyLeadersDuel/pom.xml index 417e8954a4..338681beff 100644 --- a/Mage.Server.Plugins/Mage.Game.TinyLeadersDuel/pom.xml +++ b/Mage.Server.Plugins/Mage.Game.TinyLeadersDuel/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.13 + 1.4.14 mage-game-tinyleadersduel diff --git a/Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/pom.xml b/Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/pom.xml index 3dab669bcd..c1bf3a8b8a 100644 --- a/Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/pom.xml +++ b/Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.13 + 1.4.14 mage-game-twoplayerduel diff --git a/Mage.Server.Plugins/Mage.Player.AI.DraftBot/pom.xml b/Mage.Server.Plugins/Mage.Player.AI.DraftBot/pom.xml index ce9a6af3f7..1f4989e650 100644 --- a/Mage.Server.Plugins/Mage.Player.AI.DraftBot/pom.xml +++ b/Mage.Server.Plugins/Mage.Player.AI.DraftBot/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.13 + 1.4.14 mage-player-ai-draftbot diff --git a/Mage.Server.Plugins/Mage.Player.AI.MA/pom.xml b/Mage.Server.Plugins/Mage.Player.AI.MA/pom.xml index 5079353729..fb91bf3741 100644 --- a/Mage.Server.Plugins/Mage.Player.AI.MA/pom.xml +++ b/Mage.Server.Plugins/Mage.Player.AI.MA/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.13 + 1.4.14 mage-player-ai-ma diff --git a/Mage.Server.Plugins/Mage.Player.AI/pom.xml b/Mage.Server.Plugins/Mage.Player.AI/pom.xml index f3dea81843..02e09590e4 100644 --- a/Mage.Server.Plugins/Mage.Player.AI/pom.xml +++ b/Mage.Server.Plugins/Mage.Player.AI/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.13 + 1.4.14 mage-player-ai diff --git a/Mage.Server.Plugins/Mage.Player.AIMCTS/pom.xml b/Mage.Server.Plugins/Mage.Player.AIMCTS/pom.xml index 175b22d750..291ed71aec 100644 --- a/Mage.Server.Plugins/Mage.Player.AIMCTS/pom.xml +++ b/Mage.Server.Plugins/Mage.Player.AIMCTS/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.13 + 1.4.14 mage-player-ai-mcts diff --git a/Mage.Server.Plugins/Mage.Player.AIMinimax/pom.xml b/Mage.Server.Plugins/Mage.Player.AIMinimax/pom.xml index 8183bca35a..2a6c21812f 100644 --- a/Mage.Server.Plugins/Mage.Player.AIMinimax/pom.xml +++ b/Mage.Server.Plugins/Mage.Player.AIMinimax/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.13 + 1.4.14 mage-player-aiminimax diff --git a/Mage.Server.Plugins/Mage.Player.Human/pom.xml b/Mage.Server.Plugins/Mage.Player.Human/pom.xml index 9ec0a96f74..97a257ca88 100644 --- a/Mage.Server.Plugins/Mage.Player.Human/pom.xml +++ b/Mage.Server.Plugins/Mage.Player.Human/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.13 + 1.4.14 mage-player-human diff --git a/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/pom.xml b/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/pom.xml index 2e74849471..727bdee1d0 100644 --- a/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/pom.xml +++ b/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.13 + 1.4.14 mage-tournament-boosterdraft diff --git a/Mage.Server.Plugins/Mage.Tournament.Constructed/pom.xml b/Mage.Server.Plugins/Mage.Tournament.Constructed/pom.xml index 02e26afb1b..e44c49acd9 100644 --- a/Mage.Server.Plugins/Mage.Tournament.Constructed/pom.xml +++ b/Mage.Server.Plugins/Mage.Tournament.Constructed/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.13 + 1.4.14 mage-tournament-constructed diff --git a/Mage.Server.Plugins/Mage.Tournament.Sealed/pom.xml b/Mage.Server.Plugins/Mage.Tournament.Sealed/pom.xml index 9f84aefeb2..6fb337f57f 100644 --- a/Mage.Server.Plugins/Mage.Tournament.Sealed/pom.xml +++ b/Mage.Server.Plugins/Mage.Tournament.Sealed/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.13 + 1.4.14 mage-tournament-sealed diff --git a/Mage.Server.Plugins/pom.xml b/Mage.Server.Plugins/pom.xml index 423ae70276..9a509b2337 100644 --- a/Mage.Server.Plugins/pom.xml +++ b/Mage.Server.Plugins/pom.xml @@ -6,7 +6,7 @@ org.mage mage-root - 1.4.13 + 1.4.14 mage-server-plugins diff --git a/Mage.Server/pom.xml b/Mage.Server/pom.xml index c7355a31fa..ffbb07bb69 100644 --- a/Mage.Server/pom.xml +++ b/Mage.Server/pom.xml @@ -6,7 +6,7 @@ org.mage mage-root - 1.4.13 + 1.4.14 mage-server diff --git a/Mage.Sets/pom.xml b/Mage.Sets/pom.xml index 82a5a3e530..11c587e555 100644 --- a/Mage.Sets/pom.xml +++ b/Mage.Sets/pom.xml @@ -7,7 +7,7 @@ org.mage mage-root - 1.4.13 + 1.4.14 org.mage diff --git a/Mage.Stats/pom.xml b/Mage.Stats/pom.xml index 103e512182..60d3d1589f 100644 --- a/Mage.Stats/pom.xml +++ b/Mage.Stats/pom.xml @@ -6,7 +6,7 @@ org.mage mage-root - 1.4.13 + 1.4.14 org.mage diff --git a/Mage.Tests/pom.xml b/Mage.Tests/pom.xml index daefefdadf..1b9c52abeb 100644 --- a/Mage.Tests/pom.xml +++ b/Mage.Tests/pom.xml @@ -6,7 +6,7 @@ org.mage mage-root - 1.4.13 + 1.4.14 mage-tests diff --git a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java index c8f1fc1781..68f3b51f58 100644 --- a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java +++ b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java @@ -477,7 +477,7 @@ public class TestPlayer implements Player { if (groups.length > 0) { if (groups[0].equals("Rollback")) { if (groups.length > 1 && groups[1].startsWith("turns=")) { - int turns = Integer.parseUnsignedInt(groups[1].substring(6)); + int turns = Integer.parseInt(groups[1].substring(6)); game.rollbackTurns(turns); actions.remove(action); return true; diff --git a/Mage.Updater/pom.xml b/Mage.Updater/pom.xml index d44af2334a..3306a29c2e 100644 --- a/Mage.Updater/pom.xml +++ b/Mage.Updater/pom.xml @@ -5,7 +5,7 @@ mage-root org.mage - 1.4.13 + 1.4.14 4.0.0 diff --git a/Mage/pom.xml b/Mage/pom.xml index f2141a7223..17fb6d1ae2 100644 --- a/Mage/pom.xml +++ b/Mage/pom.xml @@ -6,7 +6,7 @@ org.mage mage-root - 1.4.13 + 1.4.14 mage diff --git a/pom.xml b/pom.xml index 6133b5eee5..2f43ec66dc 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.mage mage-root - 1.4.13 + 1.4.14 pom Mage Root Mage Root POM @@ -83,7 +83,7 @@ - 1.4.13 + 1.4.14 UTF-8