mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Merge remote-tracking branch 'magefree/master'
This commit is contained in:
commit
4c9a49df5b
11441 changed files with 13327 additions and 11498 deletions
|
@ -43,6 +43,7 @@ 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.sets.ConstructedFormats;
|
||||
import mage.components.ImagePanel;
|
||||
import mage.constants.Rarity;
|
||||
|
@ -267,13 +268,18 @@ public class MageBook extends JComponent {
|
|||
|
||||
private List<CardInfo> getCards(int page, String set) {
|
||||
CardCriteria criteria = new CardCriteria();
|
||||
criteria.setCodes(set).start((long) page * conf.CARDS_PER_PAGE).count((long) conf.CARDS_PER_PAGE + 1);
|
||||
criteria.setOrderBy("cardNumber");
|
||||
criteria.setCodes(set);
|
||||
List<CardInfo> cards = CardRepository.instance.findCards(criteria);
|
||||
if (cards.size() > conf.CARDS_PER_PAGE) {
|
||||
cards.sort(new NaturalOrderCardNumberComparator());
|
||||
int start = page * conf.CARDS_PER_PAGE;
|
||||
int end = page * conf.CARDS_PER_PAGE + conf.CARDS_PER_PAGE;
|
||||
if (end > cards.size()) {
|
||||
end = cards.size();
|
||||
}
|
||||
if (cards.size() > end) {
|
||||
pageRight.setVisible(true);
|
||||
}
|
||||
return cards;
|
||||
return cards.subList(start, end);
|
||||
}
|
||||
|
||||
private ImagePanel getImagePanel(String filename, int type) {
|
||||
|
|
|
@ -49,6 +49,7 @@ import javax.swing.JOptionPane;
|
|||
import javax.swing.JTextArea;
|
||||
import javax.swing.SpinnerNumberModel;
|
||||
import javax.swing.filechooser.FileFilter;
|
||||
import mage.cards.decks.Deck;
|
||||
import mage.cards.decks.importer.DeckImporterUtil;
|
||||
import mage.cards.repository.ExpansionInfo;
|
||||
import mage.cards.repository.ExpansionRepository;
|
||||
|
@ -58,6 +59,7 @@ import mage.constants.MatchTimeLimit;
|
|||
import mage.constants.MultiplayerAttackOption;
|
||||
import mage.constants.RangeOfInfluence;
|
||||
import mage.constants.SkillLevel;
|
||||
import mage.game.GameException;
|
||||
import mage.game.draft.DraftOptions;
|
||||
import mage.game.draft.DraftOptions.TimingOption;
|
||||
import mage.game.tournament.LimitedOptions;
|
||||
|
@ -559,7 +561,15 @@ public class NewTournamentDialog extends MageDialog {
|
|||
if (tournamentType.isCubeBooster()) {
|
||||
tOptions.getLimitedOptions().setDraftCubeName(this.cbDraftCube.getSelectedItem().toString());
|
||||
if (!(cubeFromDeckFilename.equals(""))) {
|
||||
tOptions.getLimitedOptions().setCubeFromDeckFilename(cubeFromDeckFilename);
|
||||
Deck cubeFromDeck = new Deck();
|
||||
try {
|
||||
cubeFromDeck = Deck.load(DeckImporterUtil.importDeck(cubeFromDeckFilename), true, true);
|
||||
} catch (GameException e1) {
|
||||
JOptionPane.showMessageDialog(MageFrame.getDesktop(), e1.getMessage(), "Error loading deck", JOptionPane.ERROR_MESSAGE);
|
||||
}
|
||||
if (cubeFromDeck != null) {
|
||||
tOptions.getLimitedOptions().setCubeFromDeck(cubeFromDeck);
|
||||
}
|
||||
}
|
||||
} else if (tournamentType.isRandom() || tournamentType.isRichMan()) {
|
||||
this.isRandom = tournamentType.isRandom();
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* 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.util;
|
||||
|
||||
import mage.cards.repository.CardInfo;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fwannmacher
|
||||
*/
|
||||
public class NaturalOrderCardNumberComparator extends NaturalOrderComparator {
|
||||
@Override
|
||||
public int compare(Object o1, Object o2) {
|
||||
CardInfo cardInfo1 = (CardInfo) o1;
|
||||
CardInfo cardInfo2 = (CardInfo) o2;
|
||||
|
||||
return super.compare(cardInfo1.getCardNumber(), cardInfo2.getCardNumber());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,188 @@
|
|||
/*
|
||||
NaturalOrderComparator.java -- Perform 'natural order' comparisons of strings in Java.
|
||||
Copyright (C) 2003 by Pierre-Luc Paour <natorder@paour.com>
|
||||
|
||||
Based on the C version by Martin Pool, of which this is more or less a straight conversion.
|
||||
Copyright (C) 2000 by Martin Pool <mbp@humbug.org.au>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
package mage.client.util;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class NaturalOrderComparator implements Comparator
|
||||
{
|
||||
int compareRight(String a, String b)
|
||||
{
|
||||
int bias = 0;
|
||||
int ia = 0;
|
||||
int ib = 0;
|
||||
|
||||
// The longest run of digits wins. That aside, the greatest
|
||||
// value wins, but we can't know that it will until we've scanned
|
||||
// both numbers to know that they have the same magnitude, so we
|
||||
// remember it in BIAS.
|
||||
for (;; ia++, ib++)
|
||||
{
|
||||
char ca = charAt(a, ia);
|
||||
char cb = charAt(b, ib);
|
||||
|
||||
if (!Character.isDigit(ca) && !Character.isDigit(cb))
|
||||
{
|
||||
return bias;
|
||||
}
|
||||
else if (!Character.isDigit(ca))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
else if (!Character.isDigit(cb))
|
||||
{
|
||||
return +1;
|
||||
}
|
||||
else if (ca < cb)
|
||||
{
|
||||
if (bias == 0)
|
||||
{
|
||||
bias = -1;
|
||||
}
|
||||
}
|
||||
else if (ca > cb)
|
||||
{
|
||||
if (bias == 0)
|
||||
bias = +1;
|
||||
}
|
||||
else if (ca == 0 && cb == 0)
|
||||
{
|
||||
return bias;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compare(Object o1, Object o2)
|
||||
{
|
||||
String a = o1.toString();
|
||||
String b = o2.toString();
|
||||
|
||||
int ia = 0, ib = 0;
|
||||
int nza = 0, nzb = 0;
|
||||
char ca, cb;
|
||||
int result;
|
||||
|
||||
while (true)
|
||||
{
|
||||
// only count the number of zeroes leading the last number compared
|
||||
nza = nzb = 0;
|
||||
|
||||
ca = charAt(a, ia);
|
||||
cb = charAt(b, ib);
|
||||
|
||||
// skip over leading spaces or zeros
|
||||
while (Character.isSpaceChar(ca) || ca == '0')
|
||||
{
|
||||
if (ca == '0')
|
||||
{
|
||||
nza++;
|
||||
}
|
||||
else
|
||||
{
|
||||
// only count consecutive zeroes
|
||||
nza = 0;
|
||||
}
|
||||
|
||||
ca = charAt(a, ++ia);
|
||||
}
|
||||
|
||||
while (Character.isSpaceChar(cb) || cb == '0')
|
||||
{
|
||||
if (cb == '0')
|
||||
{
|
||||
nzb++;
|
||||
}
|
||||
else
|
||||
{
|
||||
// only count consecutive zeroes
|
||||
nzb = 0;
|
||||
}
|
||||
|
||||
cb = charAt(b, ++ib);
|
||||
}
|
||||
|
||||
// process run of digits
|
||||
if (Character.isDigit(ca) && Character.isDigit(cb))
|
||||
{
|
||||
if ((result = compareRight(a.substring(ia), b.substring(ib))) != 0)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
if (ca == 0 && cb == 0)
|
||||
{
|
||||
// The strings compare the same. Perhaps the caller
|
||||
// will want to call strcmp to break the tie.
|
||||
return nza - nzb;
|
||||
}
|
||||
|
||||
if (ca < cb)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
else if (ca > cb)
|
||||
{
|
||||
return +1;
|
||||
}
|
||||
|
||||
++ia;
|
||||
++ib;
|
||||
}
|
||||
}
|
||||
|
||||
static char charAt(String s, int i)
|
||||
{
|
||||
if (i >= s.length())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return s.charAt(i);
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
String[] strings = new String[] { "1-2", "1-02", "1-20", "10-20", "fred", "jane", "pic01",
|
||||
"pic2", "pic02", "pic02a", "pic3", "pic4", "pic 4 else", "pic 5", "pic05", "pic 5",
|
||||
"pic 5 something", "pic 6", "pic 7", "pic100", "pic100a", "pic120", "pic121",
|
||||
"pic02000", "tom", "x2-g8", "x2-y7", "x2-y08", "x8-y8" };
|
||||
|
||||
List orig = Arrays.asList(strings);
|
||||
|
||||
System.out.println("Original: " + orig);
|
||||
|
||||
List scrambled = Arrays.asList(strings);
|
||||
Collections.shuffle(scrambled);
|
||||
|
||||
System.out.println("Scrambled: " + scrambled);
|
||||
|
||||
Collections.sort(scrambled, new NaturalOrderComparator());
|
||||
|
||||
System.out.println("Sorted: " + scrambled);
|
||||
}
|
||||
}
|
|
@ -148,7 +148,7 @@ public class MagicCardsImageSource implements CardImageSource {
|
|||
|
||||
@Override
|
||||
public String generateURL(CardDownloadData card) throws Exception {
|
||||
Integer collectorId = card.getCollectorId();
|
||||
String collectorId = card.getCollectorId();
|
||||
String cardSet = card.getSet();
|
||||
if (collectorId == null || cardSet == null) {
|
||||
throw new Exception("Wrong parameters for image: collector id: " + collectorId + ",card set: " + cardSet);
|
||||
|
|
|
@ -57,7 +57,7 @@ public class MtgImageSource implements CardImageSource {
|
|||
|
||||
@Override
|
||||
public String generateURL(CardDownloadData card) throws Exception {
|
||||
Integer collectorId = card.getCollectorId();
|
||||
String collectorId = card.getCollectorId();
|
||||
String cardSet = card.getSet();
|
||||
if (collectorId == null || cardSet == null) {
|
||||
throw new Exception("Wrong parameters for image: collector id: " + collectorId + ",card set: " + cardSet);
|
||||
|
|
|
@ -202,7 +202,7 @@ public class MythicspoilerComSource implements CardImageSource {
|
|||
|
||||
@Override
|
||||
public String generateURL(CardDownloadData card) throws Exception {
|
||||
Integer collectorId = card.getCollectorId();
|
||||
String collectorId = card.getCollectorId();
|
||||
String cardSet = card.getSet();
|
||||
if (collectorId == null || cardSet == null) {
|
||||
throw new Exception("Wrong parameters for image: collector id: " + collectorId + ",card set: " + cardSet);
|
||||
|
|
|
@ -413,7 +413,7 @@ public class WizardCardsImageSource implements CardImageSource {
|
|||
|
||||
@Override
|
||||
public String generateURL(CardDownloadData card) throws Exception {
|
||||
Integer collectorId = card.getCollectorId();
|
||||
String collectorId = card.getCollectorId();
|
||||
String cardSet = card.getSet();
|
||||
if (collectorId == null || cardSet == null) {
|
||||
throw new Exception("Wrong parameters for image: collector id: " + collectorId + ",card set: " + cardSet);
|
||||
|
@ -430,12 +430,20 @@ public class WizardCardsImageSource implements CardImageSource {
|
|||
}
|
||||
String link = setLinks.get(card.getDownloadName().toLowerCase());
|
||||
if (link == null) {
|
||||
if (setLinks.size() >= collectorId) {
|
||||
link = setLinks.get(Integer.toString(collectorId - 1));
|
||||
int length = collectorId.length();
|
||||
|
||||
if (Character.isLetter(collectorId.charAt(length -1))) {
|
||||
length -= 1;
|
||||
}
|
||||
|
||||
int number = Integer.parseInt(collectorId.substring(0, length));
|
||||
|
||||
if (setLinks.size() >= number) {
|
||||
link = setLinks.get(Integer.toString(number - 1));
|
||||
} else {
|
||||
link = setLinks.get(Integer.toString(collectorId - 21));
|
||||
link = setLinks.get(Integer.toString(number - 21));
|
||||
if (link != null) {
|
||||
link = link.replace(Integer.toString(collectorId - 20), (Integer.toString(collectorId - 20) + "a"));
|
||||
link = link.replace(Integer.toString(number - 20), (Integer.toString(number - 20) + "a"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ public class CardDownloadData {
|
|||
private String downloadName;
|
||||
private String set;
|
||||
private String tokenSetCode;
|
||||
private Integer collectorId;
|
||||
private String collectorId;
|
||||
private Integer type;
|
||||
private boolean token;
|
||||
private boolean twoFacedCard;
|
||||
|
@ -23,15 +23,15 @@ public class CardDownloadData {
|
|||
private boolean usesVariousArt;
|
||||
private boolean isType2;
|
||||
|
||||
public CardDownloadData(String name, String set, Integer collectorId, boolean usesVariousArt, Integer type, String tokenSetCode) {
|
||||
public CardDownloadData(String name, String set, String collectorId, boolean usesVariousArt, Integer type, String tokenSetCode) {
|
||||
this(name, set, collectorId, usesVariousArt, type, tokenSetCode, false);
|
||||
}
|
||||
|
||||
public CardDownloadData(String name, String set, Integer collectorId, boolean usesVariousArt, Integer type, String tokenSetCode, boolean token) {
|
||||
public CardDownloadData(String name, String set, String collectorId, boolean usesVariousArt, Integer type, String tokenSetCode, boolean token) {
|
||||
this(name, set, collectorId, usesVariousArt, type, tokenSetCode, token, false, false);
|
||||
}
|
||||
|
||||
public CardDownloadData(String name, String set, Integer collectorId, boolean usesVariousArt, Integer type, String tokenSetCode, boolean token, boolean twoFacedCard, boolean secondSide) {
|
||||
public CardDownloadData(String name, String set, String collectorId, boolean usesVariousArt, Integer type, String tokenSetCode, boolean token, boolean twoFacedCard, boolean secondSide) {
|
||||
this.name = name;
|
||||
this.set = set;
|
||||
this.collectorId = collectorId;
|
||||
|
@ -102,7 +102,7 @@ public class CardDownloadData {
|
|||
return hash;
|
||||
}
|
||||
|
||||
public Integer getCollectorId() {
|
||||
public String getCollectorId() {
|
||||
return collectorId;
|
||||
}
|
||||
|
||||
|
|
|
@ -238,7 +238,7 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab
|
|||
public static boolean checkForNewCards(List<CardInfo> allCards) {
|
||||
TFile file;
|
||||
for (CardInfo card : allCards) {
|
||||
if (card.getCardNumber() > 0 && !card.getSetCode().isEmpty()) {
|
||||
if (!card.getCardNumber().isEmpty() && !"0".equals(card.getCardNumber()) && !card.getSetCode().isEmpty()) {
|
||||
CardDownloadData url = new CardDownloadData(card.getName(), card.getSetCode(), card.getCardNumber(), card.usesVariousArt(), 0, "", false, card.isDoubleFaced(), card.isNightCard());
|
||||
file = new TFile(CardImageUtils.generateImagePath(url));
|
||||
if (!file.exists()) {
|
||||
|
@ -281,7 +281,7 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab
|
|||
offlineMode = true;
|
||||
|
||||
for (CardInfo card : allCards) {
|
||||
if (card.getCardNumber() > 0 && !card.getSetCode().isEmpty()
|
||||
if (!card.getCardNumber().isEmpty() && !"0".equals(card.getCardNumber()) && !card.getSetCode().isEmpty()
|
||||
&& !ignoreUrls.contains(card.getSetCode())) {
|
||||
String cardName = card.getName();
|
||||
boolean isType2 = type2SetsFilter.contains(card.getSetCode());
|
||||
|
@ -313,7 +313,7 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab
|
|||
url.setType2(isType2);
|
||||
allCardsUrls.add(url);
|
||||
}
|
||||
} else if (card.getCardNumber() < 1) {
|
||||
} else if (card.getCardNumber().isEmpty() || "0".equals(card.getCardNumber())) {
|
||||
System.err.println("There was a critical error!");
|
||||
logger.error("Card has no collector ID and won't be sent to client: " + card);
|
||||
} else if (card.getSetCode().isEmpty()) {
|
||||
|
@ -385,19 +385,19 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab
|
|||
}
|
||||
if (params[1].toLowerCase().equals("generate") && params[2].startsWith("TOK:")) {
|
||||
String set = params[2].substring(4);
|
||||
CardDownloadData card = new CardDownloadData(params[3], set, 0, false, type, "", true);
|
||||
CardDownloadData card = new CardDownloadData(params[3], set, "0", false, type, "", true);
|
||||
list.add(card);
|
||||
} else if (params[1].toLowerCase().equals("generate") && params[2].startsWith("EMBLEM:")) {
|
||||
String set = params[2].substring(7);
|
||||
CardDownloadData card = new CardDownloadData("Emblem " + params[3], set, 0, false, type, "", true);
|
||||
CardDownloadData card = new CardDownloadData("Emblem " + params[3], set, "0", false, type, "", true);
|
||||
list.add(card);
|
||||
} else if (params[1].toLowerCase().equals("generate") && params[2].startsWith("EMBLEM-:")) {
|
||||
String set = params[2].substring(8);
|
||||
CardDownloadData card = new CardDownloadData(params[3] + " Emblem", set, 0, false, type, "", true);
|
||||
CardDownloadData card = new CardDownloadData(params[3] + " Emblem", set, "0", false, type, "", true);
|
||||
list.add(card);
|
||||
} else if (params[1].toLowerCase().equals("generate") && params[2].startsWith("EMBLEM!:")) {
|
||||
String set = params[2].substring(8);
|
||||
CardDownloadData card = new CardDownloadData(params[3], set, 0, false, type, "", true);
|
||||
CardDownloadData card = new CardDownloadData(params[3], set, "0", false, type, "", true);
|
||||
list.add(card);
|
||||
}
|
||||
} else {
|
||||
|
@ -483,7 +483,7 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab
|
|||
|
||||
String url;
|
||||
if (ignoreUrls.contains(card.getSet()) || card.isToken()) {
|
||||
if (card.getCollectorId() != 0) {
|
||||
if (!"0".equals(card.getCollectorId())) {
|
||||
continue;
|
||||
}
|
||||
url = cardImageSource.generateTokenUrl(card);
|
||||
|
|
|
@ -73,13 +73,13 @@ public class ImageCache {
|
|||
String name = m.group(1);
|
||||
String set = m.group(2);
|
||||
Integer type = Integer.parseInt(m.group(3));
|
||||
Integer collectorId = Integer.parseInt(m.group(4));
|
||||
String collectorId = m.group(4);
|
||||
String tokenSetCode = m.group(5);
|
||||
|
||||
CardDownloadData info = new CardDownloadData(name, set, collectorId, usesVariousArt, type, tokenSetCode);
|
||||
|
||||
String path;
|
||||
if (collectorId == 0) {
|
||||
if (collectorId.isEmpty() || "0".equals(collectorId)) {
|
||||
info.setToken(true);
|
||||
path = CardImageUtils.generateTokenImagePath(info);
|
||||
if (path == null) {
|
||||
|
@ -153,7 +153,7 @@ public class ImageCache {
|
|||
}
|
||||
|
||||
public static BufferedImage getMorphImage() {
|
||||
CardDownloadData info = new CardDownloadData("Morph", "KTK", 0, false, 0, "KTK");
|
||||
CardDownloadData info = new CardDownloadData("Morph", "KTK", "0", false, 0, "KTK");
|
||||
info.setToken(true);
|
||||
String path = CardImageUtils.generateTokenImagePath(info);
|
||||
if (path == null) {
|
||||
|
@ -164,7 +164,7 @@ public class ImageCache {
|
|||
}
|
||||
|
||||
public static BufferedImage getManifestImage() {
|
||||
CardDownloadData info = new CardDownloadData("Manifest", "FRF", 0, false, 0, "FRF");
|
||||
CardDownloadData info = new CardDownloadData("Manifest", "FRF", "0", false, 0, "FRF");
|
||||
info.setToken(true);
|
||||
String path = CardImageUtils.generateTokenImagePath(info);
|
||||
if (path == null) {
|
||||
|
|
|
@ -18,15 +18,15 @@ public class TokensMtgImageSourceTest {
|
|||
public void generateTokenUrlTest() throws Exception {
|
||||
CardImageSource imageSource = TokensMtgImageSource.getInstance();
|
||||
|
||||
String url = imageSource.generateTokenUrl(new CardDownloadData("Thopter", "ORI", 0, false, 1, "ORI"));
|
||||
String url = imageSource.generateTokenUrl(new CardDownloadData("Thopter", "ORI", "0", false, 1, "ORI"));
|
||||
Assert.assertEquals("http://tokens.mtg.onl/tokens/ORI_010-Thopter.jpg", url);
|
||||
url = imageSource.generateTokenUrl(new CardDownloadData("Thopter", "ORI", 0, false, 2, "ORI"));
|
||||
url = imageSource.generateTokenUrl(new CardDownloadData("Thopter", "ORI", "0", false, 2, "ORI"));
|
||||
Assert.assertEquals("http://tokens.mtg.onl/tokens/ORI_011-Thopter.jpg", url);
|
||||
|
||||
url = imageSource.generateTokenUrl(new CardDownloadData("Ashaya, the Awoken World", "ORI", 0, false, 0, "ORI"));
|
||||
url = imageSource.generateTokenUrl(new CardDownloadData("Ashaya, the Awoken World", "ORI", "0", false, 0, "ORI"));
|
||||
Assert.assertEquals("http://tokens.mtg.onl/tokens/ORI_007-Ashaya,-the-Awoken-World.jpg", url);
|
||||
|
||||
url = imageSource.generateTokenUrl(new CardDownloadData("Emblem Gideon, Ally of Zendikar", "BFZ", 0, false, 0, null));
|
||||
url = imageSource.generateTokenUrl(new CardDownloadData("Emblem Gideon, Ally of Zendikar", "BFZ", "0", false, 0, null));
|
||||
Assert.assertEquals("http://tokens.mtg.onl/tokens/BFZ_012-Gideon-Emblem.jpg", url);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -152,7 +152,7 @@ public class CardView extends SimpleCardView {
|
|||
* @param controlled is the card view created for the card controller - used
|
||||
* for morph / face down cards to know which player may see information for
|
||||
* the card
|
||||
* @param showFaceDownCard if true and the card is not on the battelfield,
|
||||
* @param showFaceDownCard if true and the card is not on the battlefield,
|
||||
* also a face down card is shown in the view, face down cards will be shown
|
||||
*/
|
||||
public CardView(Card card, Game game, boolean controlled, boolean showFaceDownCard) {
|
||||
|
@ -275,7 +275,7 @@ public class CardView extends SimpleCardView {
|
|||
this.isToken = true;
|
||||
this.mageObjectType = MageObjectType.TOKEN;
|
||||
this.rarity = Rarity.COMMON;
|
||||
if (((PermanentToken) card).getToken().getOriginalCardNumber() > 0) {
|
||||
if (!((PermanentToken) card).getToken().getOriginalCardNumber().isEmpty() && !"0".equals(((PermanentToken) card).getToken().getOriginalCardNumber())) {
|
||||
// a token copied from permanent
|
||||
this.expansionSetCode = ((PermanentToken) card).getToken().getOriginalExpansionSetCode();
|
||||
this.cardNumber = ((PermanentToken) card).getToken().getOriginalCardNumber();
|
||||
|
@ -323,7 +323,7 @@ public class CardView extends SimpleCardView {
|
|||
}
|
||||
|
||||
public CardView(MageObject object) {
|
||||
super(object.getId(), "", 0, false, "", true);
|
||||
super(object.getId(), "", "0", false, "", true);
|
||||
this.name = object.getName();
|
||||
this.displayName = object.getName();
|
||||
if (object instanceof Permanent) {
|
||||
|
@ -367,7 +367,7 @@ public class CardView extends SimpleCardView {
|
|||
}
|
||||
|
||||
protected CardView() {
|
||||
super(null, "", 0, false, "", true);
|
||||
super(null, "", "0", false, "", true);
|
||||
}
|
||||
|
||||
public CardView(EmblemView emblem) {
|
||||
|
@ -384,7 +384,7 @@ public class CardView extends SimpleCardView {
|
|||
}
|
||||
|
||||
public CardView(boolean empty) {
|
||||
super(null, "", 0, false, "");
|
||||
super(null, "", "0", false, "");
|
||||
if (!empty) {
|
||||
throw new IllegalArgumentException("Not supported.");
|
||||
}
|
||||
|
@ -409,7 +409,7 @@ public class CardView extends SimpleCardView {
|
|||
if (!controlled) {
|
||||
this.rarity = Rarity.COMMON;
|
||||
this.expansionSetCode = "";
|
||||
this.cardNumber = 0;
|
||||
this.cardNumber = "0";
|
||||
} else {
|
||||
this.rarity = card.getRarity();
|
||||
}
|
||||
|
@ -433,7 +433,7 @@ public class CardView extends SimpleCardView {
|
|||
}
|
||||
|
||||
CardView(Token token) {
|
||||
super(token.getId(), "", 0, false, "");
|
||||
super(token.getId(), "", "0", false, "");
|
||||
this.isToken = true;
|
||||
this.id = token.getId();
|
||||
this.name = token.getName();
|
||||
|
@ -552,7 +552,7 @@ public class CardView extends SimpleCardView {
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getCardNumber() {
|
||||
public String getCardNumber() {
|
||||
return cardNumber;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,14 +39,14 @@ public class SimpleCardView implements Serializable {
|
|||
protected UUID id;
|
||||
protected String expansionSetCode;
|
||||
protected String tokenSetCode;
|
||||
protected int cardNumber;
|
||||
protected String cardNumber;
|
||||
protected boolean usesVariousArt;
|
||||
protected boolean gameObject;
|
||||
|
||||
public SimpleCardView(UUID id, String expansionSetCode, int cardNumber, boolean usesVariousArt, String tokenSetCode) {
|
||||
public SimpleCardView(UUID id, String expansionSetCode, String cardNumber, boolean usesVariousArt, String tokenSetCode) {
|
||||
this(id, expansionSetCode, cardNumber, usesVariousArt, tokenSetCode, false);
|
||||
}
|
||||
public SimpleCardView(UUID id, String expansionSetCode, int cardNumber, boolean usesVariousArt, String tokenSetCode, boolean isGameObject) {
|
||||
public SimpleCardView(UUID id, String expansionSetCode, String cardNumber, boolean usesVariousArt, String tokenSetCode, boolean isGameObject) {
|
||||
this.id = id;
|
||||
this.expansionSetCode = expansionSetCode;
|
||||
this.cardNumber = cardNumber;
|
||||
|
@ -63,7 +63,7 @@ public class SimpleCardView implements Serializable {
|
|||
return expansionSetCode;
|
||||
}
|
||||
|
||||
public int getCardNumber() {
|
||||
public String getCardNumber() {
|
||||
return cardNumber;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
*/
|
||||
package mage.tournament.cubes;
|
||||
|
||||
import mage.cards.decks.Deck;
|
||||
import mage.cards.decks.DeckCardInfo;
|
||||
import mage.cards.decks.DeckCardLists;
|
||||
import mage.cards.decks.importer.DeckImporterUtil;
|
||||
|
@ -39,14 +40,17 @@ import mage.game.draft.DraftCube;
|
|||
*/
|
||||
public class CubeFromDeck extends DraftCube {
|
||||
|
||||
public CubeFromDeck(String chosenDckFile) {
|
||||
public CubeFromDeck(Deck cubeFromDeck) {
|
||||
super("Cube From Deck");
|
||||
|
||||
DeckCardLists cards = DeckImporterUtil.importDeck(chosenDckFile);
|
||||
DeckCardLists cards = null;
|
||||
if (cubeFromDeck != null) {
|
||||
cards = cubeFromDeck.getDeckCardLists();
|
||||
}
|
||||
|
||||
if (cards != null) {
|
||||
for (DeckCardInfo card : cards.getCards()) {
|
||||
cubeCards.add(new CardIdentity(card.getCardName(), card.getSetCode()));
|
||||
cubeCards.add(new CardIdentity(card.getCardName(), ""));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ import java.lang.reflect.Constructor;
|
|||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import mage.cards.decks.Deck;
|
||||
import mage.game.draft.DraftCube;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
@ -67,13 +68,13 @@ public class CubeFactory {
|
|||
return draftCube;
|
||||
}
|
||||
|
||||
public DraftCube createDeckDraftCube(String draftCubeName, String chosenDckFile) {
|
||||
public DraftCube createDeckDraftCube(String draftCubeName, Deck cubeFromDeck) {
|
||||
|
||||
DraftCube draftCube;
|
||||
Constructor<?> con;
|
||||
try {
|
||||
con = draftCubes.get(draftCubeName).getConstructor(new Class[]{String.class});
|
||||
draftCube = (DraftCube)con.newInstance(new Object[] {chosenDckFile});
|
||||
con = draftCubes.get(draftCubeName).getConstructor(new Class[]{Deck.class});
|
||||
draftCube = (DraftCube)con.newInstance(new Object[] {cubeFromDeck});
|
||||
} catch (Exception ex) {
|
||||
logger.fatal("CubeFactory error", ex);
|
||||
return null;
|
||||
|
|
|
@ -81,8 +81,8 @@ public class TournamentFactory {
|
|||
if (tournament.getTournamentType().isCubeBooster()) {
|
||||
DraftCube draftCube = null;
|
||||
|
||||
if (tournament.getOptions().getLimitedOptions().getCubeFromDeckFilename().length() != 0) {
|
||||
draftCube = CubeFactory.getInstance().createDeckDraftCube(tournament.getOptions().getLimitedOptions().getDraftCubeName(), tournament.getOptions().getLimitedOptions().getCubeFromDeckFilename());
|
||||
if (tournament.getOptions().getLimitedOptions().getCubeFromDeck() != null) {
|
||||
draftCube = CubeFactory.getInstance().createDeckDraftCube(tournament.getOptions().getLimitedOptions().getDraftCubeName(), tournament.getOptions().getLimitedOptions().getCubeFromDeck());
|
||||
} else {
|
||||
draftCube = CubeFactory.getInstance().createDraftCube(tournament.getOptions().getLimitedOptions().getDraftCubeName());
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ public class AjaniVengeant extends mage.sets.shardsofalara.AjaniVengeant {
|
|||
|
||||
public AjaniVengeant(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 1;
|
||||
this.cardNumber = "1";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class AjanisMantra extends mage.sets.magic2011.AjanisMantra {
|
|||
|
||||
public AjanisMantra(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 22;
|
||||
this.cardNumber = "22";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class AjanisPridemate extends mage.sets.magic2011.AjanisPridemate {
|
|||
|
||||
public AjanisPridemate(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 9;
|
||||
this.cardNumber = "9";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class BehemothSledge extends mage.sets.alarareborn.BehemothSledge {
|
|||
|
||||
public BehemothSledge(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 28;
|
||||
this.cardNumber = "28";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class BlazingSpecter extends mage.sets.invasion.BlazingSpecter {
|
|||
|
||||
public BlazingSpecter(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 52;
|
||||
this.cardNumber = "52";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class BrackwaterElemental extends mage.sets.conflux.BrackwaterElemental {
|
|||
|
||||
public BrackwaterElemental(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 46;
|
||||
this.cardNumber = "46";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class Briarhorn extends mage.sets.planechase.Briarhorn {
|
|||
|
||||
public Briarhorn(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 14;
|
||||
this.cardNumber = "14";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class CanyonWildcat extends mage.sets.tempest.CanyonWildcat {
|
|||
|
||||
public CanyonWildcat(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 6;
|
||||
this.cardNumber = "6";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class Countersquall extends mage.sets.conflux.Countersquall {
|
|||
|
||||
public Countersquall(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 59;
|
||||
this.cardNumber = "59";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class CruelUltimatum extends mage.sets.shardsofalara.CruelUltimatum {
|
|||
|
||||
public CruelUltimatum(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 69;
|
||||
this.cardNumber = "69";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class CrumblingNecropolis extends mage.sets.shardsofalara.CrumblingNecrop
|
|||
|
||||
public CrumblingNecropolis(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 74;
|
||||
this.cardNumber = "74";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ public class DeepAnalysis extends mage.sets.torment.DeepAnalysis {
|
|||
|
||||
public DeepAnalysis(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 65;
|
||||
this.cardNumber = "65";
|
||||
this.expansionSetCode = "DDH";
|
||||
this.rarity = Rarity.UNCOMMON;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ public class DimirCutpurse extends mage.sets.ravnica.DimirCutpurse {
|
|||
|
||||
public DimirCutpurse(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 49;
|
||||
this.cardNumber = "49";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class ElderMastery extends mage.sets.conflux.ElderMastery {
|
|||
|
||||
public ElderMastery(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 68;
|
||||
this.cardNumber = "68";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class EssenceWarden extends mage.sets.planarchaos.EssenceWarden {
|
|||
|
||||
public EssenceWarden(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 3;
|
||||
this.cardNumber = "3";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class EvolvingWilds extends mage.sets.riseoftheeldrazi.EvolvingWilds {
|
|||
|
||||
public EvolvingWilds(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 32;
|
||||
this.cardNumber = "32";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class FireFieldOgre extends mage.sets.shardsofalara.FireFieldOgre {
|
|||
|
||||
public FireFieldOgre(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 53;
|
||||
this.cardNumber = "53";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class FiremaneAngel extends mage.sets.ravnica.FiremaneAngel {
|
|||
|
||||
public FiremaneAngel(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 21;
|
||||
this.cardNumber = "21";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class FleetfootPanther extends mage.sets.planeshift.FleetfootPanther {
|
|||
|
||||
public FleetfootPanther(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 12;
|
||||
this.cardNumber = "12";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class GraypeltRefuge extends mage.sets.zendikar.GraypeltRefuge {
|
|||
|
||||
public GraypeltRefuge(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 33;
|
||||
this.cardNumber = "33";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class GrazingGladehart extends mage.sets.zendikar.GrazingGladehart {
|
|||
|
||||
public GrazingGladehart(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 11;
|
||||
this.cardNumber = "11";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class GriffinGuide extends mage.sets.timespiral.GriffinGuide {
|
|||
|
||||
public GriffinGuide(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 25;
|
||||
this.cardNumber = "25";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class GrixisCharm extends mage.sets.shardsofalara.GrixisCharm {
|
|||
|
||||
public GrixisCharm(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 63;
|
||||
this.cardNumber = "63";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class HellfireMongrel extends mage.sets.zendikar.HellfireMongrel {
|
|||
|
||||
public HellfireMongrel(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 48;
|
||||
this.cardNumber = "48";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class IcyManipulator extends mage.sets.tenthedition.IcyManipulator {
|
|||
|
||||
public IcyManipulator(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 64;
|
||||
this.cardNumber = "64";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class IgneousPouncer extends mage.sets.alarareborn.IgneousPouncer {
|
|||
|
||||
public IgneousPouncer(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 57;
|
||||
this.cardNumber = "57";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class JadeMage extends mage.sets.magic2012.JadeMage {
|
|||
|
||||
public JadeMage(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 7;
|
||||
this.cardNumber = "7";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class JhessianZombies extends mage.sets.alarareborn.JhessianZombies {
|
|||
|
||||
public JhessianZombies(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 56;
|
||||
this.cardNumber = "56";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class JungleShrine extends mage.sets.shardsofalara.JungleShrine {
|
|||
|
||||
public JungleShrine(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 34;
|
||||
this.cardNumber = "34";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class KazanduRefuge extends mage.sets.zendikar.KazanduRefuge {
|
|||
|
||||
public KazanduRefuge(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 35;
|
||||
this.cardNumber = "35";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class KirdApe extends mage.sets.ninthedition.KirdApe {
|
|||
|
||||
public KirdApe(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 2;
|
||||
this.cardNumber = "2";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class LeadTheStampede extends mage.sets.mirrodinbesieged.LeadTheStampede
|
|||
|
||||
public LeadTheStampede(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 24;
|
||||
this.cardNumber = "24";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class LightningHelix extends mage.sets.ravnica.LightningHelix {
|
|||
|
||||
public LightningHelix(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 23;
|
||||
this.cardNumber = "23";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class LoamLion extends mage.sets.worldwake.LoamLion {
|
|||
|
||||
public LoamLion(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 5;
|
||||
this.cardNumber = "5";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class LoxodonHierarch extends mage.sets.ravnica.LoxodonHierarch {
|
|||
|
||||
public LoxodonHierarch(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 15;
|
||||
this.cardNumber = "15";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class MarisisTwinclaws extends mage.sets.alarareborn.MarisisTwinclaws {
|
|||
|
||||
public MarisisTwinclaws(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 17;
|
||||
this.cardNumber = "17";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class MorgueToad extends mage.sets.planeshift.MorgueToad {
|
|||
|
||||
public MorgueToad(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 47;
|
||||
this.cardNumber = "47";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class Moroii extends mage.sets.ravnica.Moroii {
|
|||
|
||||
public Moroii(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 51;
|
||||
this.cardNumber = "51";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class NacatlHuntPride extends mage.sets.conflux.NacatlHuntPride {
|
|||
|
||||
public NacatlHuntPride(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 20;
|
||||
this.cardNumber = "20";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class NayaCharm extends mage.sets.shardsofalara.NayaCharm {
|
|||
|
||||
public NayaCharm(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 29;
|
||||
this.cardNumber = "29";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class NicolBolasPlaneswalker extends mage.sets.conflux.NicolBolasPlaneswa
|
|||
|
||||
public NicolBolasPlaneswalker(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 42;
|
||||
this.cardNumber = "42";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class NightscapeFamiliar extends mage.sets.planeshift.NightscapeFamiliar
|
|||
|
||||
public NightscapeFamiliar(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 44;
|
||||
this.cardNumber = "44";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class ObeliskOfGrixis extends mage.sets.shardsofalara.ObeliskOfGrixis {
|
|||
|
||||
public ObeliskOfGrixis(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 60;
|
||||
this.cardNumber = "60";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class PainSuffering extends mage.sets.invasion.PainSuffering {
|
|||
|
||||
public PainSuffering(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 72;
|
||||
this.cardNumber = "72";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class PrideOfLions extends mage.sets.starter1999.PrideOfLions {
|
|||
|
||||
public PrideOfLions(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 19;
|
||||
this.cardNumber = "19";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class ProfaneCommand extends mage.sets.commander2014.ProfaneCommand {
|
|||
|
||||
public ProfaneCommand(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 70;
|
||||
this.cardNumber = "70";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class QasaliPridemage extends mage.sets.alarareborn.QasaliPridemage {
|
|||
|
||||
public QasaliPridemage(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 10;
|
||||
this.cardNumber = "10";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class Recoil extends mage.sets.invasion.Recoil {
|
|||
|
||||
public Recoil(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 61;
|
||||
this.cardNumber = "61";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class RecumbentBliss extends mage.sets.eventide.RecumbentBliss {
|
|||
|
||||
public RecumbentBliss(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 26;
|
||||
this.cardNumber = "26";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class RiseFall extends mage.sets.dissension.RiseFall {
|
|||
|
||||
public RiseFall(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 73;
|
||||
this.cardNumber = "73";
|
||||
this.expansionSetCode = "DDH";
|
||||
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ public class RuptureSpire extends mage.sets.conflux.RuptureSpire {
|
|||
|
||||
public RuptureSpire(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 75;
|
||||
this.cardNumber = "75";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class SapseepForest extends mage.sets.shadowmoor.SapseepForest {
|
|||
|
||||
public SapseepForest(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 36;
|
||||
this.cardNumber = "36";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class SearingMeditation extends mage.sets.ravnica.SearingMeditation {
|
|||
|
||||
public SearingMeditation(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 27;
|
||||
this.cardNumber = "27";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class Shriekmaw extends mage.sets.commander.Shriekmaw {
|
|||
|
||||
public Shriekmaw(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 54;
|
||||
this.cardNumber = "54";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class SlaveOfBolas extends mage.sets.alarareborn.SlaveOfBolas {
|
|||
|
||||
public SlaveOfBolas(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 67;
|
||||
this.cardNumber = "67";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class SlaveringNulls extends mage.sets.worldwake.SlaveringNulls {
|
|||
|
||||
public SlaveringNulls(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 45;
|
||||
this.cardNumber = "45";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class SpiteMalice extends mage.sets.invasion.SpiteMalice {
|
|||
|
||||
public SpiteMalice(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 71;
|
||||
this.cardNumber = "71";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class Spitemare extends mage.sets.eventide.Spitemare {
|
|||
|
||||
public Spitemare(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 16;
|
||||
this.cardNumber = "16";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class SteamcoreWeird extends mage.sets.izzetvsgolgari.SteamcoreWeird {
|
|||
|
||||
public SteamcoreWeird(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 50;
|
||||
this.cardNumber = "50";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class SurveillingSprite extends mage.sets.ravnica.SurveillingSprite {
|
|||
|
||||
public SurveillingSprite(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 43;
|
||||
this.cardNumber = "43";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class SylvanBounty extends mage.sets.conflux.SylvanBounty {
|
|||
|
||||
public SylvanBounty(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 30;
|
||||
this.cardNumber = "30";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class SylvanRanger extends mage.sets.magic2011.SylvanRanger {
|
|||
|
||||
public SylvanRanger(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 8;
|
||||
this.cardNumber = "8";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class TerramorphicExpanse extends mage.sets.tenthedition.TerramorphicExpa
|
|||
|
||||
public TerramorphicExpanse(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 76;
|
||||
this.cardNumber = "76";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class TitanicUltimatum extends mage.sets.shardsofalara.TitanicUltimatum {
|
|||
|
||||
public TitanicUltimatum(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 31;
|
||||
this.cardNumber = "31";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class Undermine extends mage.sets.invasion.Undermine {
|
|||
|
||||
public Undermine(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 62;
|
||||
this.cardNumber = "62";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class VaporSnag extends mage.sets.newphyrexia.VaporSnag {
|
|||
|
||||
public VaporSnag(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 58;
|
||||
this.cardNumber = "58";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class VituGhaziTheCityTree extends mage.sets.ravnica.VituGhaziTheCityTree
|
|||
|
||||
public VituGhaziTheCityTree(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 37;
|
||||
this.cardNumber = "37";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class WildNacatl extends mage.sets.shardsofalara.WildNacatl {
|
|||
|
||||
public WildNacatl(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 4;
|
||||
this.cardNumber = "4";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class WoollyThoctar extends mage.sets.shardsofalara.WoollyThoctar {
|
|||
|
||||
public WoollyThoctar(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 13;
|
||||
this.cardNumber = "13";
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class AesthirGlider2 extends mage.sets.alliances.AesthirGlider1 {
|
|||
|
||||
public AesthirGlider2(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 157;
|
||||
this.cardNumber = "157";
|
||||
this.expansionSetCode = "ALL";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class AgentOfStromgald2 extends AgentOfStromgald1 {
|
|||
|
||||
public AgentOfStromgald2(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 95;
|
||||
this.cardNumber = "95";
|
||||
}
|
||||
|
||||
public AgentOfStromgald2(final AgentOfStromgald2 card) {
|
||||
|
|
|
@ -37,7 +37,7 @@ public class ArcaneDenial1 extends mage.sets.commander2013.ArcaneDenial {
|
|||
|
||||
public ArcaneDenial1(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 32;
|
||||
this.cardNumber = "32";
|
||||
this.expansionSetCode = "ALL";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class ArcaneDenial2 extends mage.sets.commander2013.ArcaneDenial {
|
|||
|
||||
public ArcaneDenial2(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 33;
|
||||
this.cardNumber = "33";
|
||||
this.expansionSetCode = "ALL";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class Astrolabe1 extends mage.sets.masterseditioniii.Astrolabe {
|
|||
|
||||
public Astrolabe1(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 159;
|
||||
this.cardNumber = "159";
|
||||
this.expansionSetCode = "ALL";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class Astrolabe2 extends mage.sets.masterseditioniii.Astrolabe {
|
|||
|
||||
public Astrolabe2(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 160;
|
||||
this.cardNumber = "160";
|
||||
this.expansionSetCode = "ALL";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class BalduvianDead extends mage.sets.masterseditionii.BalduvianDead {
|
|||
|
||||
public BalduvianDead(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 1;
|
||||
this.cardNumber = "1";
|
||||
this.expansionSetCode = "ALL";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class BalduvianWarMakers2 extends BalduvianWarMakers1 {
|
|||
|
||||
public BalduvianWarMakers2(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 98;
|
||||
this.cardNumber = "98";
|
||||
}
|
||||
|
||||
public BalduvianWarMakers2(final BalduvianWarMakers2 card) {
|
||||
|
|
|
@ -38,7 +38,7 @@ public class BountyOfTheHunt extends mage.sets.masterseditionii.BountyOfTheHunt
|
|||
|
||||
public BountyOfTheHunt(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 63;
|
||||
this.cardNumber = "63";
|
||||
this.expansionSetCode = "ALL";
|
||||
this.rarity = Rarity.UNCOMMON;
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ public class CarrierPigeons2 extends mage.sets.alliances.CarrierPigeons1 {
|
|||
|
||||
public CarrierPigeons2(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 126;
|
||||
this.cardNumber = "126";
|
||||
this.expansionSetCode = "ALL";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class DeadlyInsect1 extends mage.sets.mercadianmasques.DeadlyInsect {
|
|||
|
||||
public DeadlyInsect1(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 64;
|
||||
this.cardNumber = "64";
|
||||
this.expansionSetCode = "ALL";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class DeadlyInsect2 extends mage.sets.mercadianmasques.DeadlyInsect {
|
|||
|
||||
public DeadlyInsect2(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 65;
|
||||
this.cardNumber = "65";
|
||||
this.expansionSetCode = "ALL";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class ElvishBard extends mage.sets.ninthedition.ElvishBard {
|
|||
|
||||
public ElvishBard(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 66;
|
||||
this.cardNumber = "66";
|
||||
this.expansionSetCode = "ALL";
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class ElvishRanger1 extends mage.sets.portal.ElvishRanger {
|
|||
|
||||
public ElvishRanger1(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 67;
|
||||
this.cardNumber = "67";
|
||||
this.expansionSetCode = "ALL";
|
||||
}
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue