mirror of
https://github.com/correl/mage.git
synced 2025-03-27 01:11:43 -09:00
Xmage 1.4.14v0
This commit is contained in:
parent
4bfac31370
commit
539b03bd1d
33 changed files with 60 additions and 57 deletions
Mage.Client
Mage.Common
Mage.Plugins
Mage.Server.Console
Mage.Server.Plugins
Mage.Deck.Constructed
Mage.Deck.Limited
Mage.Game.CommanderDuel
Mage.Game.CommanderFreeForAll
Mage.Game.FreeForAll
Mage.Game.MomirDuel
Mage.Game.TinyLeadersDuel
Mage.Game.TwoPlayerDuel
Mage.Player.AI.DraftBot
Mage.Player.AI.MA
Mage.Player.AI
Mage.Player.AIMCTS
Mage.Player.AIMinimax
Mage.Player.Human
Mage.Tournament.BoosterDraft
Mage.Tournament.Constructed
Mage.Tournament.Sealed
pom.xmlMage.Server
Mage.Sets
Mage.Stats
Mage.Tests
Mage.Updater
Mage
pom.xml
|
@ -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>
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
4
pom.xml
4
pom.xml
|
@ -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>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue