Xmage 1.4.14v0

This commit is contained in:
LevelX2 2016-08-13 10:14:38 +02:00
parent 4bfac31370
commit 539b03bd1d
33 changed files with 60 additions and 57 deletions

View file

@ -6,7 +6,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-root</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<groupId>org.mage</groupId>

View file

@ -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<CardInfo> 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<String> setsToDisplay = new ArrayList<String>();
private java.util.List<HoverButton> tabs = new ArrayList<HoverButton>();
private java.util.List<String> setsToDisplay = new ArrayList<>();
private java.util.List<HoverButton> tabs = new ArrayList<>();
private int selectedTab;
private static final String CENTER_PANEL_IMAGE_PATH = "/book_bg.jpg";

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-root</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<artifactId>mage-common</artifactId>

View file

@ -40,8 +40,8 @@ public class MageVersion implements Serializable, Comparable<MageVersion> {
*/
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;

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-plugins</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<artifactId>mage-counter-plugin</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-root</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<artifactId>mage-plugins</artifactId>

View file

@ -6,7 +6,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-root</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<groupId>org.mage</groupId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<artifactId>mage-deck-constructed</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<artifactId>mage-deck-limited</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<artifactId>mage-game-commanderduel</artifactId>

View file

@ -6,7 +6,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<artifactId>mage-game-commanderfreeforall</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<artifactId>mage-game-freeforall</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<artifactId>mage-game-momirduel</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<artifactId>mage-game-tinyleadersduel</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<artifactId>mage-game-twoplayerduel</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<artifactId>mage-player-ai-draftbot</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<artifactId>mage-player-ai-ma</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<artifactId>mage-player-ai</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<artifactId>mage-player-ai-mcts</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<artifactId>mage-player-aiminimax</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<artifactId>mage-player-human</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<artifactId>mage-tournament-boosterdraft</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<artifactId>mage-tournament-constructed</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<artifactId>mage-tournament-sealed</artifactId>

View file

@ -6,7 +6,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-root</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<artifactId>mage-server-plugins</artifactId>

View file

@ -6,7 +6,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-root</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<artifactId>mage-server</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-root</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<groupId>org.mage</groupId>

View file

@ -6,7 +6,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-root</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<groupId>org.mage</groupId>

View file

@ -6,7 +6,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-root</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<artifactId>mage-tests</artifactId>

View file

@ -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;

View file

@ -5,7 +5,7 @@
<parent>
<artifactId>mage-root</artifactId>
<groupId>org.mage</groupId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View file

@ -6,7 +6,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-root</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
</parent>
<artifactId>mage</artifactId>

View file

@ -6,7 +6,7 @@
<groupId>org.mage</groupId>
<artifactId>mage-root</artifactId>
<version>1.4.13</version>
<version>1.4.14</version>
<packaging>pom</packaging>
<name>Mage Root</name>
<description>Mage Root POM</description>
@ -83,7 +83,7 @@
</repositories>
<properties>
<mage-version>1.4.13</mage-version>
<mage-version>1.4.14</mage-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>