Merge pull request #10 from magefree/master

update
This commit is contained in:
Li REN 2013-06-16 10:02:31 -07:00
commit 7d6e9eaadd
7385 changed files with 29091 additions and 27682 deletions

View file

@ -34,7 +34,7 @@
package mage.client.cards; package mage.client.cards;
import mage.Constants.CardType; import mage.constants.CardType;
import mage.cards.CardDimensions; import mage.cards.CardDimensions;
import mage.cards.MagePermanent; import mage.cards.MagePermanent;
import mage.cards.TextPopup; import mage.cards.TextPopup;
@ -264,7 +264,7 @@ public class Card extends MagePermanent implements MouseMotionListener, MouseLis
sbType.append(superType).append(" "); sbType.append(superType).append(" ");
} }
for (mage.Constants.CardType cardType: card.getCardTypes()) { for (CardType cardType: card.getCardTypes()) {
sbType.append(cardType.toString()).append(" "); sbType.append(cardType.toString()).append(" ");
} }

View file

@ -47,7 +47,7 @@ import java.util.List;
import java.util.UUID; import java.util.UUID;
import javax.swing.*; import javax.swing.*;
import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.DefaultTableCellRenderer;
import mage.Constants.CardType; import mage.constants.CardType;
import mage.cards.MageCard; import mage.cards.MageCard;
import mage.client.constants.Constants.SortBy; import mage.client.constants.Constants.SortBy;
import mage.client.deckeditor.table.TableModel; import mage.client.deckeditor.table.TableModel;

View file

@ -51,7 +51,7 @@ import java.util.UUID;
import javax.swing.PopupFactory; import javax.swing.PopupFactory;
import mage.Constants.CardType; import mage.constants.CardType;
import mage.cards.CardDimensions; import mage.cards.CardDimensions;
import mage.cards.MagePermanent; import mage.cards.MagePermanent;
import mage.client.util.Config; import mage.client.util.Config;

View file

@ -1,7 +1,7 @@
package mage.client.deck.generator; package mage.client.deck.generator;
import mage.Constants.CardType; import mage.constants.CardType;
import mage.Constants.ColoredManaSymbol; import mage.constants.ColoredManaSymbol;
import mage.Mana; import mage.Mana;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.decks.Deck; import mage.cards.decks.Deck;
@ -11,6 +11,7 @@ import mage.cards.repository.CardRepository;
import mage.client.MageFrame; import mage.client.MageFrame;
import mage.client.util.gui.ColorsChooser; import mage.client.util.gui.ColorsChooser;
import mage.client.util.sets.ConstructedFormats; import mage.client.util.sets.ConstructedFormats;
import mage.constants.Rarity;
import mage.interfaces.rate.RateCallback; import mage.interfaces.rate.RateCallback;
import mage.cards.Sets; import mage.cards.Sets;
import mage.utils.DeckBuilder; import mage.utils.DeckBuilder;
@ -26,7 +27,7 @@ import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
import java.util.UUID; import java.util.UUID;
import mage.Constants;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
/** /**
@ -369,7 +370,7 @@ public class DeckGenerator {
if (!landSets.isEmpty()) { if (!landSets.isEmpty()) {
criteria.setCodes(landSets.toArray(new String[landSets.size()])); criteria.setCodes(landSets.toArray(new String[landSets.size()]));
} }
criteria.rarities(Constants.Rarity.LAND).name(cardName); criteria.rarities(Rarity.LAND).name(cardName);
List<CardInfo> cards = CardRepository.instance.findCards(criteria); List<CardInfo> cards = CardRepository.instance.findCards(criteria);
if (cards.isEmpty() && !setsToUse.isEmpty()) { if (cards.isEmpty() && !setsToUse.isEmpty()) {

View file

@ -34,7 +34,7 @@
package mage.client.deckeditor; package mage.client.deckeditor;
import mage.Constants.CardType; import mage.constants.CardType;
import mage.MageObject; import mage.MageObject;
import mage.ObjectColor; import mage.ObjectColor;
import mage.cards.Card; import mage.cards.Card;

View file

@ -45,6 +45,7 @@ import mage.client.util.Config;
import mage.client.util.ImageHelper; import mage.client.util.ImageHelper;
import mage.client.util.sets.ConstructedFormats; import mage.client.util.sets.ConstructedFormats;
import mage.components.ImagePanel; import mage.components.ImagePanel;
import mage.constants.Rarity;
import mage.view.CardView; import mage.view.CardView;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.mage.card.arcane.GlowText; import org.mage.card.arcane.GlowText;
@ -254,7 +255,7 @@ public class MageBook extends JComponent {
cardImg.update(card); cardImg.update(card);
cardImg.setCardBounds(rectangle.x, rectangle.y, cardDimensions.frameWidth, cardDimensions.frameHeight); cardImg.setCardBounds(rectangle.x, rectangle.y, cardDimensions.frameWidth, cardDimensions.frameHeight);
boolean implemented = !card.getRarity().equals(mage.Constants.Rarity.NA); boolean implemented = !card.getRarity().equals(Rarity.NA);
GlowText label = new GlowText(); GlowText label = new GlowText();
label.setGlow(implemented ? Color.green : NOT_IMPLEMENTED, 12, 0.0f); label.setGlow(implemented ? Color.green : NOT_IMPLEMENTED, 12, 0.0f);

View file

@ -28,7 +28,7 @@
package mage.client.deckeditor.table; package mage.client.deckeditor.table;
import mage.Constants.CardType; import mage.constants.CardType;
import mage.cards.MageCard; import mage.cards.MageCard;
import mage.view.CardView; import mage.view.CardView;

View file

@ -28,7 +28,6 @@
package mage.client.deckeditor.table; package mage.client.deckeditor.table;
import mage.Constants;
import mage.client.MageFrame; import mage.client.MageFrame;
import mage.client.cards.BigCard; import mage.client.cards.BigCard;
import mage.client.cards.CardEventSource; import mage.client.cards.CardEventSource;
@ -40,6 +39,7 @@ import mage.client.util.Event;
import mage.client.util.ImageHelper; import mage.client.util.ImageHelper;
import mage.client.util.Listener; import mage.client.util.Listener;
import mage.client.util.gui.GuiDisplayUtil; import mage.client.util.gui.GuiDisplayUtil;
import mage.constants.CardType;
import mage.view.CardView; import mage.view.CardView;
import mage.view.CardsView; import mage.view.CardsView;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
@ -93,9 +93,9 @@ public class TableModel extends AbstractTableModel implements ICardGrid {
addCard(card, bigCard, gameId); addCard(card, bigCard, gameId);
} }
if (updateCountsCallback != null) { if (updateCountsCallback != null) {
if (card.getCardTypes().contains(Constants.CardType.LAND)) if (card.getCardTypes().contains(CardType.LAND))
landCount++; landCount++;
if (card.getCardTypes().contains(Constants.CardType.CREATURE)) if (card.getCardTypes().contains(CardType.CREATURE))
creatureCount++; creatureCount++;
} }
} }

View file

@ -25,21 +25,12 @@
* authors and should not be interpreted as representing official policies, either expressed * authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com. * or implied, of BetaSteward_at_googlemail.com.
*/ */
/*
* AddLandDialog.java
*
* Created on Jan 11, 2011, 1:20:45 PM
*/
package mage.client.dialog; package mage.client.dialog;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
import java.util.Set; import java.util.Set;
import javax.swing.JLayeredPane; import javax.swing.JLayeredPane;
import mage.Constants;
import mage.Mana; import mage.Mana;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.Sets; import mage.cards.Sets;
@ -48,6 +39,7 @@ import mage.cards.repository.CardCriteria;
import mage.cards.repository.CardInfo; import mage.cards.repository.CardInfo;
import mage.cards.repository.CardRepository; import mage.cards.repository.CardRepository;
import mage.client.MageFrame; import mage.client.MageFrame;
import mage.constants.Rarity;
/** /**
* *
@ -80,7 +72,7 @@ public class AddLandDialog extends MageDialog {
if (!setCodesland.isEmpty()) { if (!setCodesland.isEmpty()) {
criteria.setCodes(setCodesland.toArray(new String[setCodesland.size()])); criteria.setCodes(setCodesland.toArray(new String[setCodesland.size()]));
} }
criteria.rarities(Constants.Rarity.LAND).name(landName); criteria.rarities(Rarity.LAND).name(landName);
List<CardInfo> cards = CardRepository.instance.findCards(criteria); List<CardInfo> cards = CardRepository.instance.findCards(criteria);
if (cards.isEmpty()) { if (cards.isEmpty()) {
return; return;

View file

@ -34,8 +34,8 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
import javax.swing.*; import javax.swing.*;
import mage.Constants.MultiplayerAttackOption; import mage.constants.MultiplayerAttackOption;
import mage.Constants.RangeOfInfluence; import mage.constants.RangeOfInfluence;
import mage.cards.decks.importer.DeckImporterUtil; import mage.cards.decks.importer.DeckImporterUtil;
import mage.client.MageFrame; import mage.client.MageFrame;
import mage.client.components.MageComponents; import mage.client.components.MageComponents;

View file

@ -41,8 +41,8 @@ import javax.swing.DefaultComboBoxModel;
import javax.swing.JComboBox; import javax.swing.JComboBox;
import javax.swing.JOptionPane; import javax.swing.JOptionPane;
import javax.swing.SpinnerNumberModel; import javax.swing.SpinnerNumberModel;
import mage.Constants.MultiplayerAttackOption; import mage.constants.MultiplayerAttackOption;
import mage.Constants.RangeOfInfluence; import mage.constants.RangeOfInfluence;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.cards.Sets; import mage.cards.Sets;
import mage.client.MageFrame; import mage.client.MageFrame;

View file

@ -34,13 +34,13 @@
package mage.client.game; package mage.client.game;
import mage.Constants;
import mage.cards.MagePermanent; import mage.cards.MagePermanent;
import mage.client.cards.BigCard; import mage.client.cards.BigCard;
import mage.client.cards.Permanent; import mage.client.cards.Permanent;
import mage.client.plugins.impl.Plugins; import mage.client.plugins.impl.Plugins;
import mage.client.util.AudioManager; import mage.client.util.AudioManager;
import mage.client.util.Config; import mage.client.util.Config;
import mage.constants.CardType;
import mage.view.PermanentView; import mage.view.PermanentView;
import javax.swing.*; import javax.swing.*;
@ -209,9 +209,9 @@ public class BattlefieldPanel extends javax.swing.JLayeredPane {
}*/ }*/
} }
if (permanent.getCardTypes().contains(Constants.CardType.ARTIFACT)) { if (permanent.getCardTypes().contains(CardType.ARTIFACT)) {
addedArtifact = true; addedArtifact = true;
} else if (permanent.getCardTypes().contains(Constants.CardType.CREATURE)) { } else if (permanent.getCardTypes().contains(CardType.CREATURE)) {
addedCreature = true; addedCreature = true;
} else { } else {
addedPermanent = true; addedPermanent = true;
@ -274,7 +274,7 @@ public class BattlefieldPanel extends javax.swing.JLayeredPane {
}); });
t.start(); t.start();
} }
if (((MagePermanent)comp).getOriginal().getCardTypes().contains(Constants.CardType.CREATURE)) { if (((MagePermanent)comp).getOriginal().getCardTypes().contains(CardType.CREATURE)) {
removedCreature = true; removedCreature = true;
} }
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.client.game; package mage.client.game;
import mage.Constants;
import mage.cards.action.ActionCallback; import mage.cards.action.ActionCallback;
import mage.client.MageFrame; import mage.client.MageFrame;
import mage.client.cards.BigCard; import mage.client.cards.BigCard;
@ -45,6 +44,7 @@ import mage.client.util.Config;
import mage.client.util.GameManager; import mage.client.util.GameManager;
import mage.client.util.PhaseManager; import mage.client.util.PhaseManager;
import mage.client.util.gui.ArrowBuilder; import mage.client.util.gui.ArrowBuilder;
import mage.constants.PhaseStep;
import mage.remote.Session; import mage.remote.Session;
import mage.view.*; import mage.view.*;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
@ -504,7 +504,7 @@ public final class GamePanel extends javax.swing.JPanel {
/** /**
* Update phase buttons\labels. * Update phase buttons\labels.
*/ */
private void updatePhases(Constants.PhaseStep step) { private void updatePhases(PhaseStep step) {
if (step == null) { if (step == null) {
logger.warn("step is null"); logger.warn("step is null");
return; return;

View file

@ -1,10 +1,10 @@
package mage.client.game; package mage.client.game;
import mage.Constants;
import mage.client.MageFrame; import mage.client.MageFrame;
import mage.client.cards.BigCard; import mage.client.cards.BigCard;
import mage.client.dialog.PreferencesDialog; import mage.client.dialog.PreferencesDialog;
import mage.client.util.Config; import mage.client.util.Config;
import mage.constants.Zone;
import mage.view.SimpleCardsView; import mage.view.SimpleCardsView;
import javax.swing.*; import javax.swing.*;
@ -55,7 +55,7 @@ public class HandPanel extends JPanel {
hand.setBackgroundColor(new Color(0, 0, 0, 100)); hand.setBackgroundColor(new Color(0, 0, 0, 100));
hand.setVisibleIfEmpty(false); hand.setVisibleIfEmpty(false);
hand.setBorder(emptyBorder); hand.setBorder(emptyBorder);
hand.setZone(Constants.Zone.HAND.toString()); hand.setZone(Zone.HAND.toString());
} }
public void loadCards(SimpleCardsView cards, BigCard bigCard, UUID gameId) { public void loadCards(SimpleCardsView cards, BigCard bigCard, UUID gameId) {

View file

@ -1,6 +1,5 @@
package mage.client.plugins.adapters; package mage.client.plugins.adapters;
import mage.Constants;
import mage.cards.MageCard; import mage.cards.MageCard;
import mage.cards.MagePermanent; import mage.cards.MagePermanent;
import mage.cards.action.ActionCallback; import mage.cards.action.ActionCallback;
@ -17,6 +16,7 @@ import mage.client.util.ImageHelper;
import mage.client.util.gui.ArrowBuilder; import mage.client.util.gui.ArrowBuilder;
import mage.client.util.gui.GuiDisplayUtil; import mage.client.util.gui.GuiDisplayUtil;
import mage.components.CardInfoPane; import mage.components.CardInfoPane;
import mage.constants.Rarity;
import mage.remote.Session; import mage.remote.Session;
import mage.utils.ThreadUtils; import mage.utils.ThreadUtils;
import mage.view.CardView; import mage.view.CardView;
@ -195,7 +195,7 @@ public class MageActionCallback implements ActionCallback {
private void showPopup(final TransferData data, final Component parentComponent, final Point parentPoint) { private void showPopup(final TransferData data, final Component parentComponent, final Point parentPoint) {
// skip popup for not implemented cards (they have Rarity.NA) // skip popup for not implemented cards (they have Rarity.NA)
if (data.card.getRarity().equals(Constants.Rarity.NA)) { if (data.card.getRarity().equals(Rarity.NA)) {
return; return;
} }

View file

@ -46,8 +46,8 @@ import java.util.concurrent.CancellationException;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import javax.swing.*; import javax.swing.*;
import javax.swing.table.AbstractTableModel; import javax.swing.table.AbstractTableModel;
import mage.Constants.MultiplayerAttackOption; import mage.constants.MultiplayerAttackOption;
import mage.Constants.RangeOfInfluence; import mage.constants.RangeOfInfluence;
import mage.cards.decks.importer.DeckImporterUtil; import mage.cards.decks.importer.DeckImporterUtil;
import mage.client.MageFrame; import mage.client.MageFrame;
import mage.client.chat.ChatPanel; import mage.client.chat.ChatPanel;

View file

@ -6,7 +6,7 @@ import javax.swing.JButton;
import javax.swing.JLabel; import javax.swing.JLabel;
import javax.swing.SwingConstants; import javax.swing.SwingConstants;
import mage.Constants.CardType; import mage.constants.CardType;
import mage.utils.CardUtil; import mage.utils.CardUtil;
import mage.view.CardView; import mage.view.CardView;

View file

@ -1,6 +1,6 @@
package org.mage.card.arcane; package org.mage.card.arcane;
import mage.Constants.CardType; import mage.constants.CardType;
import mage.cards.MagePermanent; import mage.cards.MagePermanent;
import mage.cards.TextPopup; import mage.cards.TextPopup;
import mage.cards.action.ActionCallback; import mage.cards.action.ActionCallback;
@ -751,7 +751,7 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
sbType.append(superType).append(" "); sbType.append(superType).append(" ");
} }
for (mage.Constants.CardType cardType : card.getCardTypes()) { for (CardType cardType : card.getCardTypes()) {
sbType.append(cardType.toString()).append(" "); sbType.append(cardType.toString()).append(" ");
} }

View file

@ -2,6 +2,7 @@ package org.mage.plugins.card;
import mage.cards.MagePermanent; import mage.cards.MagePermanent;
import mage.cards.action.ActionCallback; import mage.cards.action.ActionCallback;
import mage.constants.Rarity;
import mage.interfaces.plugin.CardPlugin; import mage.interfaces.plugin.CardPlugin;
import mage.utils.CardUtil; import mage.utils.CardUtil;
import mage.view.CardView; import mage.view.CardView;
@ -80,7 +81,7 @@ public class CardPluginImpl implements CardPlugin {
boolean foil = canBeFoil && (new Random()).nextInt(5) == 0; boolean foil = canBeFoil && (new Random()).nextInt(5) == 0;
CardPanel cardPanel = new CardPanel(permanent, gameId, loadImage, callback, foil); CardPanel cardPanel = new CardPanel(permanent, gameId, loadImage, callback, foil);
cardPanel.setCardBounds(0, 0, dimension.width, dimension.height); cardPanel.setCardBounds(0, 0, dimension.width, dimension.height);
boolean implemented = !permanent.getRarity().equals(mage.Constants.Rarity.NA); boolean implemented = !permanent.getRarity().equals(Rarity.NA);
cardPanel.setShowCastingCost(implemented); cardPanel.setShowCastingCost(implemented);
return cardPanel; return cardPanel;
} }
@ -90,7 +91,7 @@ public class CardPluginImpl implements CardPlugin {
boolean foil = canBeFoil && (new Random()).nextInt(5) == 0; boolean foil = canBeFoil && (new Random()).nextInt(5) == 0;
CardPanel cardPanel = new CardPanel(permanent, gameId, loadImage, callback, foil); CardPanel cardPanel = new CardPanel(permanent, gameId, loadImage, callback, foil);
cardPanel.setCardBounds(0, 0, dimension.width, dimension.height); cardPanel.setCardBounds(0, 0, dimension.width, dimension.height);
boolean implemented = !permanent.getRarity().equals(mage.Constants.Rarity.NA); boolean implemented = !permanent.getRarity().equals(Rarity.NA);
cardPanel.setShowCastingCost(implemented); cardPanel.setShowCastingCost(implemented);
return cardPanel; return cardPanel;
} }

View file

@ -1,7 +1,7 @@
package org.mage.plugins.card.info; package org.mage.plugins.card.info;
import mage.Constants;
import mage.components.CardInfoPane; import mage.components.CardInfoPane;
import mage.constants.CardType;
import mage.utils.CardUtil; import mage.utils.CardUtil;
import mage.utils.ThreadUtils; import mage.utils.ThreadUtils;
import mage.view.CardView; import mage.view.CardView;
@ -14,7 +14,6 @@ import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import mage.abilities.SpellAbility;
/** /**
* Card info pane for displaying card rules. * Card info pane for displaying card rules.
@ -263,7 +262,7 @@ public class CardInfoPaneImpl extends JEditorPane implements CardInfoPane {
for (String superType : card.getSuperTypes()) { for (String superType : card.getSuperTypes()) {
types += superType + " "; types += superType + " ";
} }
for (Constants.CardType cardType : card.getCardTypes()) { for (CardType cardType : card.getCardTypes()) {
types += cardType.toString() + " "; types += cardType.toString() + " ";
} }
if (card.getSubTypes().size() > 0) { if (card.getSubTypes().size() > 0) {

View file

@ -1,8 +1,9 @@
package mage.interfaces.rate; package mage.interfaces.rate;
import java.util.List; import java.util.List;
import mage.Constants;
import mage.cards.Card; import mage.cards.Card;
import mage.constants.ColoredManaSymbol;
/** /**
* Interface for the class responsible for rating cards. * Interface for the class responsible for rating cards.
@ -11,5 +12,5 @@ import mage.cards.Card;
*/ */
public interface RateCallback { public interface RateCallback {
int rateCard(Card card); int rateCard(Card card);
Card getBestBasicLand(Constants.ColoredManaSymbol color, List<String> setsToUse); Card getBestBasicLand(ColoredManaSymbol color, List<String> setsToUse);
} }

View file

@ -1,6 +1,6 @@
package mage.utils; package mage.utils;
import mage.Constants.CardType; import mage.constants.CardType;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.MagePermanent; import mage.cards.MagePermanent;
import mage.view.CardView; import mage.view.CardView;

View file

@ -1,7 +1,7 @@
package mage.utils; package mage.utils;
import mage.Constants; import mage.constants.CardType;
import mage.Constants.ColoredManaSymbol; import mage.constants.ColoredManaSymbol;
import mage.Mana; import mage.Mana;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.decks.Deck; import mage.cards.decks.Deck;
@ -210,13 +210,13 @@ public class DeckBuilder {
this.card = card; this.card = card;
int type = 0; int type = 0;
if (card.getCardType().contains(Constants.CardType.CREATURE)) { if (card.getCardType().contains(CardType.CREATURE)) {
type = 10; type = 10;
} else if (card.getSubtype().contains("Equipment")) { } else if (card.getSubtype().contains("Equipment")) {
type = 8; type = 8;
} else if (card.getSubtype().contains("Aura")) { } else if (card.getSubtype().contains("Aura")) {
type = 5; type = 5;
} else if (card.getCardType().contains(Constants.CardType.INSTANT)) { } else if (card.getCardType().contains(CardType.INSTANT)) {
type = 7; type = 7;
} else { } else {
type = 6; type = 6;

View file

@ -29,7 +29,7 @@
package mage.view; package mage.view;
import java.util.ArrayList; import java.util.ArrayList;
import mage.Constants.CardType; import mage.constants.CardType;
import mage.ObjectColor; import mage.ObjectColor;
import mage.abilities.Ability; import mage.abilities.Ability;

View file

@ -28,12 +28,13 @@
package mage.view; package mage.view;
import mage.Constants; import mage.constants.CardType;
import mage.Constants.CardType; import mage.constants.Rarity;
import mage.Constants.Rarity;
import mage.MageObject; import mage.MageObject;
import mage.ObjectColor; import mage.ObjectColor;
import mage.cards.Card; import mage.cards.Card;
import mage.constants.SpellAbilityType;
import mage.constants.Zone;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.game.permanent.PermanentToken; import mage.game.permanent.PermanentToken;
@ -112,7 +113,7 @@ public class CardView extends SimpleCardView {
if (card.isSplitCard()) { if (card.isSplitCard()) {
splitCard = (SplitCard) card; splitCard = (SplitCard) card;
} else { } else {
if (card instanceof Spell && ((Spell) card).getSpellAbility().getSpellAbilityType().equals(Constants.SpellAbilityType.SPLIT_FUSED)) { if (card instanceof Spell && ((Spell) card).getSpellAbility().getSpellAbilityType().equals(SpellAbilityType.SPLIT_FUSED)) {
splitCard = (SplitCard) ((Spell) card).getCard(); splitCard = (SplitCard) ((Spell) card).getCard();
} }
} }
@ -217,7 +218,7 @@ public class CardView extends SimpleCardView {
this.rarity = Rarity.NA; this.rarity = Rarity.NA;
this.rules = new ArrayList<String>(); this.rules = new ArrayList<String>();
this.rules.add(stackAbility.getRule()); this.rules.add(stackAbility.getRule());
if (stackAbility.getZone().equals(Constants.Zone.COMMAND)) { if (stackAbility.getZone().equals(Zone.COMMAND)) {
this.expansionSetCode = stackAbility.getExpansionSetCode(); this.expansionSetCode = stackAbility.getExpansionSetCode();
} }
} }

View file

@ -28,7 +28,7 @@
package mage.view; package mage.view;
import mage.Constants.Zone; import mage.constants.Zone;
import mage.MageObject; import mage.MageObject;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
@ -39,7 +39,6 @@ import mage.game.permanent.Permanent;
import mage.target.targetpointer.TargetPointer; import mage.target.targetpointer.TargetPointer;
import java.util.*; import java.util.*;
import static mage.Constants.Zone.STACK;
/** /**
* *

View file

@ -28,12 +28,12 @@
package mage.view; package mage.view;
import mage.Constants; import mage.constants.PhaseStep;
import mage.Constants.PhaseStep; import mage.constants.TurnPhase;
import mage.Constants.TurnPhase;
import mage.MageObject; import mage.MageObject;
import mage.abilities.costs.Cost; import mage.abilities.costs.Cost;
import mage.cards.Card; import mage.cards.Card;
import mage.constants.Zone;
import mage.game.ExileZone; import mage.game.ExileZone;
import mage.game.Game; import mage.game.Game;
import mage.game.GameState; import mage.game.GameState;
@ -176,7 +176,7 @@ public class GameView implements Serializable {
} }
Permanent permanent = game.getPermanent(card.getId()); Permanent permanent = game.getPermanent(card.getId());
if (permanent == null) { if (permanent == null) {
permanent = (Permanent)game.getLastKnownInformation(card.getId(), Constants.Zone.BATTLEFIELD); permanent = (Permanent)game.getLastKnownInformation(card.getId(), Zone.BATTLEFIELD);
} }
if (permanent != null) { if (permanent != null) {
if (permanent.isTransformed()) { if (permanent.isTransformed()) {

View file

@ -33,7 +33,7 @@ import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
import mage.Constants.TableState; import mage.constants.TableState;
import mage.game.Game; import mage.game.Game;
import mage.game.Seat; import mage.game.Seat;
import mage.game.Table; import mage.game.Table;

View file

@ -33,10 +33,11 @@ import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import mage.Constants;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.decks.Deck; import mage.cards.decks.Deck;
import mage.cards.decks.DeckValidatorImpl; import mage.cards.decks.DeckValidatorImpl;
import mage.constants.CardType;
import mage.filter.FilterMana; import mage.filter.FilterMana;
/** /**
@ -133,7 +134,7 @@ public class Commander extends DeckValidatorImpl {
if(deck.getSideboard().size() == 1){ if(deck.getSideboard().size() == 1){
Card commander = (Card)deck.getSideboard().toArray()[0]; Card commander = (Card)deck.getSideboard().toArray()[0];
if(commander != null && commander.getCardType().contains(Constants.CardType.CREATURE) && commander.getSupertype().contains("Legendary")){ if(commander != null && commander.getCardType().contains(CardType.CREATURE) && commander.getSupertype().contains("Legendary")){
FilterMana color = getColorIdentity(commander); FilterMana color = getColorIdentity(commander);
for(Card card : deck.getCards()){ for(Card card : deck.getCards()){
if(!cardHasValideColor(color, card)){ if(!cardHasValideColor(color, card)){

View file

@ -30,7 +30,7 @@ package mage.deck;
import java.util.Calendar; import java.util.Calendar;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants.SetType; import mage.constants.SetType;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.cards.decks.Constructed; import mage.cards.decks.Constructed;
import mage.cards.Sets; import mage.cards.Sets;

View file

@ -28,7 +28,7 @@
package mage.deck; package mage.deck;
import java.util.Date; import java.util.Date;
import mage.Constants.SetType; import mage.constants.SetType;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.cards.Sets; import mage.cards.Sets;
import mage.cards.decks.Constructed; import mage.cards.decks.Constructed;

View file

@ -30,7 +30,7 @@ package mage.deck;
import java.util.Calendar; import java.util.Calendar;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants.SetType; import mage.constants.SetType;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.cards.decks.Constructed; import mage.cards.decks.Constructed;
import mage.cards.Sets; import mage.cards.Sets;

View file

@ -31,9 +31,9 @@ package mage.game;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import java.util.UUID; import java.util.UUID;
import mage.Constants.MultiplayerAttackOption; import mage.constants.MultiplayerAttackOption;
import mage.Constants.PhaseStep; import mage.constants.PhaseStep;
import mage.Constants.RangeOfInfluence; import mage.constants.RangeOfInfluence;
import mage.game.match.MatchType; import mage.game.match.MatchType;
import mage.game.turn.TurnMod; import mage.game.turn.TurnMod;

View file

@ -31,8 +31,8 @@ package mage.game;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import java.util.UUID; import java.util.UUID;
import mage.Constants.MultiplayerAttackOption; import mage.constants.MultiplayerAttackOption;
import mage.Constants.RangeOfInfluence; import mage.constants.RangeOfInfluence;
import mage.game.match.MatchType; import mage.game.match.MatchType;
/** /**

View file

@ -31,9 +31,9 @@ package mage.game;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import java.util.UUID; import java.util.UUID;
import mage.Constants.MultiplayerAttackOption; import mage.constants.MultiplayerAttackOption;
import mage.Constants.PhaseStep; import mage.constants.PhaseStep;
import mage.Constants.RangeOfInfluence; import mage.constants.RangeOfInfluence;
import mage.game.match.MatchType; import mage.game.match.MatchType;
import mage.game.turn.TurnMod; import mage.game.turn.TurnMod;

View file

@ -28,7 +28,7 @@
package mage.player.ai; package mage.player.ai;
import mage.Constants.RangeOfInfluence; import mage.constants.RangeOfInfluence;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;

View file

@ -27,9 +27,9 @@
*/ */
package mage.player.ai; package mage.player.ai;
import mage.Constants.Outcome; import mage.constants.Outcome;
import mage.Constants.PhaseStep; import mage.constants.PhaseStep;
import mage.Constants.RangeOfInfluence; import mage.constants.RangeOfInfluence;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.ActivatedAbility; import mage.abilities.ActivatedAbility;
import mage.abilities.SpellAbility; import mage.abilities.SpellAbility;

View file

@ -28,8 +28,8 @@
package mage.player.ai; package mage.player.ai;
import mage.Constants; import mage.constants.PhaseStep;
import mage.Constants.RangeOfInfluence; import mage.constants.RangeOfInfluence;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.game.Game; import mage.game.Game;
import mage.game.combat.Combat; import mage.game.combat.Combat;
@ -306,7 +306,7 @@ public class ComputerPlayer7 extends ComputerPlayer6 implements Player {
logger.debug("interrupted"); logger.debug("interrupted");
return GameStateEvaluator2.evaluate(playerId, game); return GameStateEvaluator2.evaluate(playerId, game);
} }
if (game.getTurn().getStepType() != Constants.PhaseStep.DECLARE_BLOCKERS) { if (game.getTurn().getStepType() != PhaseStep.DECLARE_BLOCKERS) {
game.getTurn().setPhase(new CombatPhase()); game.getTurn().setPhase(new CombatPhase());
if (game.getPhase().beginPhase(game, game.getActivePlayerId())) { if (game.getPhase().beginPhase(game, game.getActivePlayerId())) {
simulateStep(game, new BeginCombatStep()); simulateStep(game, new BeginCombatStep());

View file

@ -1,15 +1,15 @@
package mage.player.ai.ma; package mage.player.ai.ma;
import mage.Constants;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.HasteAbility;
import mage.cards.Card; import mage.cards.Card;
import mage.constants.CardType;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import java.util.UUID; import java.util.UUID;
import mage.Constants.Outcome; import mage.constants.Outcome;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
/** /**
@ -28,7 +28,7 @@ public class ArtificialScoringSystem {
public static int getCardDefinitionScore(final Game game, final Card card) { public static int getCardDefinitionScore(final Game game, final Card card) {
int value = 3; //TODO: add new rating system card value int value = 3; //TODO: add new rating system card value
if (card.getCardType().contains(Constants.CardType.LAND)) { if (card.getCardType().contains(CardType.LAND)) {
int score = (int) ((value / 2.0f) * 50); int score = (int) ((value / 2.0f) * 50);
//TODO: check this for "any color" lands //TODO: check this for "any color" lands
//TODO: check this for dual and filter lands //TODO: check this for dual and filter lands
@ -40,7 +40,7 @@ public class ArtificialScoringSystem {
} }
final int score = value * 100 - card.getManaCost().convertedManaCost() * 20; final int score = value * 100 - card.getManaCost().convertedManaCost() * 20;
if (card.getCardType().contains(Constants.CardType.CREATURE)) { if (card.getCardType().contains(CardType.CREATURE)) {
return score + (card.getPower().getValue() + card.getToughness().getValue()) * 10; return score + (card.getPower().getValue() + card.getToughness().getValue()) * 10;
} else { } else {
return score + (/*card.getRemoval()*50*/ +card.getRarity().getRating() * 30); return score + (/*card.getRemoval()*50*/ +card.getRarity().getRating() * 30);
@ -50,7 +50,7 @@ public class ArtificialScoringSystem {
public static int getFixedPermanentScore(final Game game, final Permanent permanent) { public static int getFixedPermanentScore(final Game game, final Permanent permanent) {
//TODO: cache it inside Card //TODO: cache it inside Card
int score = getCardDefinitionScore(game, permanent); int score = getCardDefinitionScore(game, permanent);
if (permanent.getCardType().contains(Constants.CardType.CREATURE)) { if (permanent.getCardType().contains(CardType.CREATURE)) {
// TODO: implement in the mage core // TODO: implement in the mage core
//score + =cardDefinition.getActivations().size()*50; //score + =cardDefinition.getActivations().size()*50;
//score += cardDefinition.getManaActivations().size()*80; //score += cardDefinition.getManaActivations().size()*80;
@ -71,7 +71,7 @@ public class ArtificialScoringSystem {
if (!canTap(permanent)) { if (!canTap(permanent)) {
score += getTappedScore(permanent); score += getTappedScore(permanent);
} }
if (permanent.getCardType().contains(Constants.CardType.CREATURE)) { if (permanent.getCardType().contains(CardType.CREATURE)) {
final int power = permanent.getPower().getValue(); final int power = permanent.getPower().getValue();
final int toughness = permanent.getToughness().getValue(); final int toughness = permanent.getToughness().getValue();
int abilityScore = 0; int abilityScore = 0;
@ -86,7 +86,7 @@ public class ArtificialScoringSystem {
for (UUID uuid : permanent.getAttachments()) { for (UUID uuid : permanent.getAttachments()) {
Card card = game.getCard(uuid); Card card = game.getCard(uuid);
if (card != null) { if (card != null) {
if (card.getCardType().contains(Constants.CardType.ENCHANTMENT)) { if (card.getCardType().contains(CardType.ENCHANTMENT)) {
Effect effect = card.getSpellAbility().getEffects().get(0); Effect effect = card.getSpellAbility().getEffects().get(0);
if (effect != null) { if (effect != null) {
Outcome outcome = effect.getOutcome(); Outcome outcome = effect.getOutcome();
@ -117,7 +117,7 @@ public class ArtificialScoringSystem {
private static boolean canTap(Permanent permanent) { private static boolean canTap(Permanent permanent) {
return !permanent.isTapped() return !permanent.isTapped()
&&(!permanent.hasSummoningSickness() &&(!permanent.hasSummoningSickness()
||!permanent.getCardType().contains(Constants.CardType.CREATURE) ||!permanent.getCardType().contains(CardType.CREATURE)
||permanent.getAbilities().contains(HasteAbility.getInstance())); ||permanent.getAbilities().contains(HasteAbility.getInstance()));
} }
@ -126,9 +126,9 @@ public class ArtificialScoringSystem {
} }
public static int getTappedScore(final Permanent permanent) { public static int getTappedScore(final Permanent permanent) {
if (permanent.getCardType().contains(Constants.CardType.CREATURE)) { if (permanent.getCardType().contains(CardType.CREATURE)) {
return -100; return -100;
} else if (permanent.getCardType().contains(Constants.CardType.LAND)) { } else if (permanent.getCardType().contains(CardType.LAND)) {
return -1; return -1;
} else { } else {
return -2; return -2;

View file

@ -28,7 +28,6 @@
package mage.player.ai; package mage.player.ai;
import mage.Constants.*;
import mage.MageObject; import mage.MageObject;
import mage.Mana; import mage.Mana;
import mage.abilities.*; import mage.abilities.*;
@ -50,6 +49,7 @@ import mage.cards.repository.CardCriteria;
import mage.cards.repository.CardInfo; import mage.cards.repository.CardInfo;
import mage.cards.repository.CardRepository; import mage.cards.repository.CardRepository;
import mage.choices.Choice; import mage.choices.Choice;
import mage.constants.*;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.common.*; import mage.filter.common.*;
import mage.game.Game; import mage.game.Game;
@ -80,10 +80,6 @@ import java.io.IOException;
import java.io.Serializable; import java.io.Serializable;
import java.util.*; import java.util.*;
import java.util.Map.Entry; import java.util.Map.Entry;
import static mage.Constants.SpellAbilityType.SPLIT;
import static mage.Constants.SpellAbilityType.SPLIT_FUSED;
/** /**

View file

@ -31,8 +31,8 @@ package mage.player.ai;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.UUID; import java.util.UUID;
import mage.Constants.CardType; import mage.constants.CardType;
import mage.Constants.Zone; import mage.constants.Zone;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;

View file

@ -1,10 +1,12 @@
package mage.player.ai.utils; package mage.player.ai.utils;
import mage.Constants;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.Card; import mage.cards.Card;
import mage.constants.CardType;
import mage.constants.ColoredManaSymbol;
import mage.constants.Outcome;
import mage.target.Target; import mage.target.Target;
import mage.target.common.TargetCreatureOrPlayer; import mage.target.common.TargetCreatureOrPlayer;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
@ -47,20 +49,20 @@ public class RateCard {
* @param card * @param card
* @return * @return
*/ */
public static int rateCard(Card card, List<Constants.ColoredManaSymbol> allowedColors) { public static int rateCard(Card card, List<ColoredManaSymbol> allowedColors) {
if (allowedColors == null && rated.containsKey(card.getName())) { if (allowedColors == null && rated.containsKey(card.getName())) {
return rated.get(card.getName()); return rated.get(card.getName());
} }
int type = 0; int type = 0;
if (card.getCardType().contains(Constants.CardType.PLANESWALKER)) { if (card.getCardType().contains(CardType.PLANESWALKER)) {
type = 15; type = 15;
} if (card.getCardType().contains(Constants.CardType.CREATURE)) { } if (card.getCardType().contains(CardType.CREATURE)) {
type = 10; type = 10;
} else if (card.getSubtype().contains("Equipment")) { } else if (card.getSubtype().contains("Equipment")) {
type = 8; type = 8;
} else if (card.getSubtype().contains("Aura")) { } else if (card.getSubtype().contains("Aura")) {
type = 5; type = 5;
} else if (card.getCardType().contains(Constants.CardType.INSTANT)) { } else if (card.getCardType().contains(CardType.INSTANT)) {
type = 7; type = 7;
} else { } else {
type = 6; type = 6;
@ -73,16 +75,16 @@ public class RateCard {
} }
private static int isRemoval(Card card) { private static int isRemoval(Card card) {
if (card.getSubtype().contains("Aura") || card.getCardType().contains(Constants.CardType.INSTANT) if (card.getSubtype().contains("Aura") || card.getCardType().contains(CardType.INSTANT)
|| card.getCardType().contains(Constants.CardType.SORCERY)) { || card.getCardType().contains(CardType.SORCERY)) {
for (Ability ability : card.getAbilities()) { for (Ability ability : card.getAbilities()) {
for (Effect effect : ability.getEffects()) { for (Effect effect : ability.getEffects()) {
if (effect.getOutcome().equals(Constants.Outcome.Removal)) { if (effect.getOutcome().equals(Outcome.Removal)) {
log.debug("Found removal: " + card.getName()); log.debug("Found removal: " + card.getName());
return 1; return 1;
} }
if (effect.getOutcome().equals(Constants.Outcome.Damage)) { if (effect.getOutcome().equals(Outcome.Damage)) {
if (effect instanceof DamageTargetEffect) { if (effect instanceof DamageTargetEffect) {
DamageTargetEffect damageEffect = (DamageTargetEffect) effect; DamageTargetEffect damageEffect = (DamageTargetEffect) effect;
if (damageEffect.getAmount() > 1) { if (damageEffect.getAmount() > 1) {
@ -95,7 +97,7 @@ public class RateCard {
} }
} }
} }
if (effect.getOutcome().equals(Constants.Outcome.DestroyPermanent)) { if (effect.getOutcome().equals(Outcome.DestroyPermanent)) {
for (Target target : ability.getTargets()) { for (Target target : ability.getTargets()) {
if (target instanceof TargetCreaturePermanent) { if (target instanceof TargetCreaturePermanent) {
log.info("Found destroyer: " + card.getName()); log.info("Found destroyer: " + card.getName());
@ -175,7 +177,7 @@ public class RateCard {
* @param allowedColors Can be null. * @param allowedColors Can be null.
* @return * @return
*/ */
private static int getManaCostScore(Card card, List<Constants.ColoredManaSymbol> allowedColors) { private static int getManaCostScore(Card card, List<ColoredManaSymbol> allowedColors) {
int converted = card.getManaCost().convertedManaCost(); int converted = card.getManaCost().convertedManaCost();
if (allowedColors == null) { if (allowedColors == null) {
int colorPenalty = 0; int colorPenalty = 0;
@ -192,7 +194,7 @@ public class RateCard {
int count = 0; int count = 0;
symbol = symbol.replace("{", "").replace("}", ""); symbol = symbol.replace("{", "").replace("}", "");
if (isColoredMana(symbol)) { if (isColoredMana(symbol)) {
for (Constants.ColoredManaSymbol allowed : allowedColors) { for (ColoredManaSymbol allowed : allowedColors) {
if (allowed.toString().equals(symbol)) { if (allowed.toString().equals(symbol)) {
count++; count++;
} }

View file

@ -27,9 +27,9 @@
*/ */
package mage.player.ai; package mage.player.ai;
import mage.Constants.PhaseStep; import mage.constants.PhaseStep;
import mage.Constants.RangeOfInfluence; import mage.constants.RangeOfInfluence;
import mage.Constants.Zone; import mage.constants.Zone;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.ActivatedAbility; import mage.abilities.ActivatedAbility;
import mage.abilities.common.PassAbility; import mage.abilities.common.PassAbility;

View file

@ -31,8 +31,8 @@ import java.util.ArrayDeque;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
import mage.Constants.PhaseStep; import mage.constants.PhaseStep;
import mage.Constants.Zone; import mage.constants.Zone;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.ActivatedAbility; import mage.abilities.ActivatedAbility;
import mage.abilities.PlayLandAbility; import mage.abilities.PlayLandAbility;

View file

@ -27,7 +27,7 @@
*/ */
package mage.player.ai; package mage.player.ai;
import mage.Constants.Outcome; import mage.constants.Outcome;
import mage.abilities.*; import mage.abilities.*;
import mage.abilities.common.PassAbility; import mage.abilities.common.PassAbility;
import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.GenericManaCost;

View file

@ -28,9 +28,9 @@
package mage.player.ai; package mage.player.ai;
import mage.Constants.Outcome; import mage.constants.Outcome;
import mage.Constants.PhaseStep; import mage.constants.PhaseStep;
import mage.Constants.RangeOfInfluence; import mage.constants.RangeOfInfluence;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.ActivatedAbility; import mage.abilities.ActivatedAbility;
import mage.abilities.common.PassAbility; import mage.abilities.common.PassAbility;

View file

@ -28,8 +28,8 @@
package mage.player.ai; package mage.player.ai;
import mage.Constants.PhaseStep; import mage.constants.PhaseStep;
import mage.Constants.RangeOfInfluence; import mage.constants.RangeOfInfluence;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.game.Game; import mage.game.Game;
import mage.game.combat.Combat; import mage.game.combat.Combat;

View file

@ -29,8 +29,8 @@
package mage.player.ai; package mage.player.ai;
import java.util.UUID; import java.util.UUID;
import mage.Constants.CardType; import mage.constants.CardType;
import mage.Constants.Zone; import mage.constants.Zone;
import mage.abilities.ActivatedAbility; import mage.abilities.ActivatedAbility;
import mage.abilities.keyword.DoubleStrikeAbility; import mage.abilities.keyword.DoubleStrikeAbility;
import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.FirstStrikeAbility;

View file

@ -30,11 +30,9 @@ package mage.player.human;
import java.io.Serializable; import java.io.Serializable;
import java.util.*; import java.util.*;
import mage.Constants.Outcome; import mage.constants.Outcome;
import mage.Constants.RangeOfInfluence; import mage.constants.RangeOfInfluence;
import static mage.Constants.SpellAbilityType.SPLIT; import mage.constants.Zone;
import static mage.Constants.SpellAbilityType.SPLIT_FUSED;
import mage.Constants.Zone;
import mage.MageObject; import mage.MageObject;
import mage.abilities.*; import mage.abilities.*;
import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.SacrificeSourceCost;

View file

@ -34,8 +34,8 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture; import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import mage.Constants.RangeOfInfluence; import mage.constants.RangeOfInfluence;
import mage.Constants.TableState; import mage.constants.TableState;
import mage.MageException; import mage.MageException;
import mage.cards.decks.Deck; import mage.cards.decks.Deck;
import mage.cards.decks.DeckCardLists; import mage.cards.decks.DeckCardLists;

View file

@ -33,10 +33,11 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import mage.Constants;
import mage.MageException; import mage.MageException;
import mage.cards.decks.Deck; import mage.cards.decks.Deck;
import mage.cards.decks.DeckCardLists; import mage.cards.decks.DeckCardLists;
import mage.constants.TableState;
import mage.game.GameException; import mage.game.GameException;
import mage.game.Table; import mage.game.Table;
import mage.game.draft.Draft; import mage.game.draft.Draft;
@ -303,7 +304,7 @@ public class TableManager {
Date now = new Date(); Date now = new Date();
List<UUID> toRemove = new ArrayList<UUID>(); List<UUID> toRemove = new ArrayList<UUID>();
for (Table table : tables.values()) { for (Table table : tables.values()) {
if (!table.getState().equals(Constants.TableState.FINISHED)) { if (!table.getState().equals(TableState.FINISHED)) {
// remove all tables created more than expire_time ago // remove all tables created more than expire_time ago
long diff = (now.getTime() - table.getCreateTime().getTime()) / EXPIRE_TIME_UNIT_VALUE; long diff = (now.getTime() - table.getCreateTime().getTime()) / EXPIRE_TIME_UNIT_VALUE;
if (diff >= EXPIRE_TIME) { if (diff >= EXPIRE_TIME) {

View file

@ -3,7 +3,8 @@ package mage.server.challenge;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.UUID; import java.util.UUID;
import mage.Constants;
import mage.constants.Zone;
import mage.game.match.Match; import mage.game.match.Match;
/** /**
@ -19,8 +20,8 @@ public class ChallengeManager {
} }
public void prepareChallenge(UUID playerId, Match match) { public void prepareChallenge(UUID playerId, Match match) {
Map<Constants.Zone, String> commands = new HashMap<Constants.Zone, String>(); Map<Zone, String> commands = new HashMap<Zone, String>();
commands.put(Constants.Zone.OUTSIDE, "life:3"); commands.put(Zone.OUTSIDE, "life:3");
match.getGame().cheat(playerId, commands); match.getGame().cheat(playerId, commands);
} }
} }

View file

@ -28,7 +28,7 @@
package mage.server.game; package mage.server.game;
import mage.Constants.Zone; import mage.constants.Zone;
import mage.MageException; import mage.MageException;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.cards.Card; import mage.cards.Card;

View file

@ -38,7 +38,7 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import mage.Constants.TableState; import mage.constants.TableState;
import mage.MageException; import mage.MageException;
import mage.cards.decks.DeckCardLists; import mage.cards.decks.DeckCardLists;
import mage.game.GameException; import mage.game.GameException;

View file

@ -32,7 +32,7 @@ import java.lang.reflect.Constructor;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import mage.Constants.RangeOfInfluence; import mage.constants.RangeOfInfluence;
import mage.players.Player; import mage.players.Player;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;

View file

@ -1,9 +1,9 @@
package mage.server.util; package mage.server.util;
import mage.Constants;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.repository.CardInfo; import mage.cards.repository.CardInfo;
import mage.cards.repository.CardRepository; import mage.cards.repository.CardRepository;
import mage.constants.Zone;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
@ -70,15 +70,15 @@ public class SystemUtil {
continue; continue;
} }
Constants.Zone gameZone; Zone gameZone;
if ("hand".equalsIgnoreCase(zone)) { if ("hand".equalsIgnoreCase(zone)) {
gameZone = Constants.Zone.HAND; gameZone = Zone.HAND;
} else if ("battlefield".equalsIgnoreCase(zone)) { } else if ("battlefield".equalsIgnoreCase(zone)) {
gameZone = Constants.Zone.BATTLEFIELD; gameZone = Zone.BATTLEFIELD;
} else if ("graveyard".equalsIgnoreCase(zone)) { } else if ("graveyard".equalsIgnoreCase(zone)) {
gameZone = Constants.Zone.GRAVEYARD; gameZone = Zone.GRAVEYARD;
} else if ("library".equalsIgnoreCase(zone)) { } else if ("library".equalsIgnoreCase(zone)) {
gameZone = Constants.Zone.LIBRARY; gameZone = Zone.LIBRARY;
} else { } else {
continue; // go parse next line continue; // go parse next line
} }
@ -121,11 +121,11 @@ public class SystemUtil {
* @param game * @param game
* @param card Card to put to player's hand * @param card Card to put to player's hand
*/ */
private static void swapWithAnyCard(Game game, Player player, Card card, Constants.Zone zone) { private static void swapWithAnyCard(Game game, Player player, Card card, Zone zone) {
if (zone.equals(Constants.Zone.BATTLEFIELD)) { if (zone.equals(Zone.BATTLEFIELD)) {
card.putOntoBattlefield(game, Constants.Zone.OUTSIDE, null, player.getId()); card.putOntoBattlefield(game, Zone.OUTSIDE, null, player.getId());
} else if (zone.equals(Constants.Zone.LIBRARY)) { } else if (zone.equals(Zone.LIBRARY)) {
game.setZone(card.getId(), Constants.Zone.LIBRARY); game.setZone(card.getId(), Zone.LIBRARY);
player.getLibrary().putOnTop(card, game); player.getLibrary().putOnTop(card, game);
} else { } else {
card.moveToZone(zone, null, game, false); card.moveToZone(zone, null, game, false);

View file

@ -29,7 +29,7 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants.SetType; import mage.constants.SetType;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
/** /**
@ -45,7 +45,7 @@ public class AlaraReborn extends ExpansionSet {
} }
private AlaraReborn() { private AlaraReborn() {
super("Alara Reborn", "ARB", "seticon_mtgarb", "mage.sets.alarareborn", new GregorianCalendar(2009, 3, 25).getTime(), SetType.EXPANSION); super("Alara Reborn", "ARB", "mage.sets.alarareborn", new GregorianCalendar(2009, 3, 25).getTime(), SetType.EXPANSION);
this.blockName = "Shards of Alara"; this.blockName = "Shards of Alara";
this.parentSet = ShardsOfAlara.getInstance(); this.parentSet = ShardsOfAlara.getInstance();
this.hasBasicLands = false; this.hasBasicLands = false;

View file

@ -1,7 +1,7 @@
package mage.sets; package mage.sets;
import mage.Constants;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.constants.SetType;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
@ -13,7 +13,7 @@ public class Alliances extends ExpansionSet {
} }
private Alliances() { private Alliances() {
super("Alliances", "ALL", "", "mage.sets.alliances", new GregorianCalendar(1996, 6, 10).getTime(), Constants.SetType.EXPANSION); super("Alliances", "ALL", "mage.sets.alliances", new GregorianCalendar(1996, 6, 10).getTime(), SetType.EXPANSION);
this.blockName = "Ice Age"; this.blockName = "Ice Age";
this.parentSet = IceAge.getInstance(); this.parentSet = IceAge.getInstance();
this.hasBasicLands = false; this.hasBasicLands = false;

View file

@ -28,8 +28,9 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.constants.SetType;
/** /**
* *
@ -44,7 +45,7 @@ public class Antiquities extends ExpansionSet {
} }
private Antiquities() { private Antiquities() {
super("Antiquities", "ATQ", "", "mage.sets.antiquities", new GregorianCalendar(1994, 2, 1).getTime(), Constants.SetType.EXPANSION); super("Antiquities", "ATQ", "mage.sets.antiquities", new GregorianCalendar(1994, 2, 1).getTime(), SetType.EXPANSION);
this.hasBasicLands = false; this.hasBasicLands = false;
this.hasBoosters = true; this.hasBoosters = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;

View file

@ -1,8 +1,9 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.constants.SetType;
public class Apocalypse extends ExpansionSet { public class Apocalypse extends ExpansionSet {
@ -13,7 +14,7 @@ public class Apocalypse extends ExpansionSet {
} }
private Apocalypse() { private Apocalypse() {
super("Apocalypse", "APC", "", "mage.sets.apocalypse", new GregorianCalendar(2001, 5, 1).getTime(), Constants.SetType.EXPANSION); super("Apocalypse", "APC", "mage.sets.apocalypse", new GregorianCalendar(2001, 5, 1).getTime(), SetType.EXPANSION);
this.blockName = "Invasion"; this.blockName = "Invasion";
this.parentSet = Invasion.getInstance(); this.parentSet = Invasion.getInstance();
this.hasBasicLands = false; this.hasBasicLands = false;

View file

@ -28,8 +28,9 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.constants.SetType;
/** /**
* *
@ -44,7 +45,7 @@ public class ArabianNights extends ExpansionSet {
} }
private ArabianNights() { private ArabianNights() {
super("Arabian Nights", "ARN", "", "mage.sets.arabiannights", new GregorianCalendar(1993, 11, 1).getTime(), Constants.SetType.EXPANSION); super("Arabian Nights", "ARN", "mage.sets.arabiannights", new GregorianCalendar(1993, 11, 1).getTime(), SetType.EXPANSION);
this.hasBasicLands = false; this.hasBasicLands = false;
this.hasBoosters = true; this.hasBoosters = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;

View file

@ -28,7 +28,7 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants.SetType; import mage.constants.SetType;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
/** /**
@ -44,7 +44,7 @@ public class AvacynRestored extends ExpansionSet {
} }
private AvacynRestored() { private AvacynRestored() {
super("Avacyn Restored", "AVR", "seticon_mtgavr", "mage.sets.avacynrestored", new GregorianCalendar(2012, 4, 4).getTime(), SetType.EXPANSION); super("Avacyn Restored", "AVR", "mage.sets.avacynrestored", new GregorianCalendar(2012, 4, 4).getTime(), SetType.EXPANSION);
this.blockName = "Innistrad"; this.blockName = "Innistrad";
this.parentSet = Innistrad.getInstance(); this.parentSet = Innistrad.getInstance();
this.hasBoosters = true; this.hasBoosters = true;

View file

@ -28,7 +28,7 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants.SetType; import mage.constants.SetType;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
/** /**
@ -44,7 +44,7 @@ public class BetrayersOfKamigawa extends ExpansionSet {
} }
private BetrayersOfKamigawa() { private BetrayersOfKamigawa() {
super("Betrayers of Kamigawa", "BOK", "", "mage.sets.betrayersofkamigawa", new GregorianCalendar(2005, 1, 4).getTime(), SetType.EXPANSION); super("Betrayers of Kamigawa", "BOK", "mage.sets.betrayersofkamigawa", new GregorianCalendar(2005, 1, 4).getTime(), SetType.EXPANSION);
this.blockName = "Kamigawa"; this.blockName = "Kamigawa";
this.parentSet = ChampionsOfKamigawa.getInstance(); this.parentSet = ChampionsOfKamigawa.getInstance();
this.hasBasicLands = false; this.hasBasicLands = false;

View file

@ -1,7 +1,7 @@
package mage.sets; package mage.sets;
import mage.Constants;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.constants.SetType;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
@ -13,7 +13,7 @@ public class ChampionsOfKamigawa extends ExpansionSet {
} }
private ChampionsOfKamigawa() { private ChampionsOfKamigawa() {
super("Champions of Kamigawa", "CHK", "", "mage.sets.championsofkamigawa", new GregorianCalendar(2004, 9, 1).getTime(), Constants.SetType.EXPANSION); super("Champions of Kamigawa", "CHK", "mage.sets.championsofkamigawa", new GregorianCalendar(2004, 9, 1).getTime(), SetType.EXPANSION);
this.blockName = "Kamigawa"; this.blockName = "Kamigawa";
this.hasBoosters = true; this.hasBoosters = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;

View file

@ -28,8 +28,9 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.constants.SetType;
/** /**
* *
@ -44,7 +45,7 @@ public class Coldsnap extends ExpansionSet {
} }
private Coldsnap() { private Coldsnap() {
super("Coldsnap", "CSP", "", "mage.sets.coldsnap", new GregorianCalendar(2006, 6, 21).getTime(), Constants.SetType.EXPANSION); super("Coldsnap", "CSP", "mage.sets.coldsnap", new GregorianCalendar(2006, 6, 21).getTime(), SetType.EXPANSION);
this.blockName = "Ice Age"; this.blockName = "Ice Age";
this.hasBoosters = true; this.hasBoosters = true;
this.numBoosterLands = 0; this.numBoosterLands = 0;

View file

@ -29,7 +29,7 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants.SetType; import mage.constants.SetType;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
/** /**
@ -47,7 +47,7 @@ public class Commander extends ExpansionSet {
} }
private Commander() { private Commander() {
super("Magic: The Gathering-Commander", "CMD", "", "mage.sets.commander", new GregorianCalendar(2011, 6, 17).getTime(), SetType.REPRINT); super("Magic: The Gathering-Commander", "CMD", "mage.sets.commander", new GregorianCalendar(2011, 6, 17).getTime(), SetType.REPRINT);
} }
} }

View file

@ -29,7 +29,7 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants.SetType; import mage.constants.SetType;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
/** /**
@ -45,7 +45,7 @@ public class Conflux extends ExpansionSet {
} }
private Conflux() { private Conflux() {
super("Conflux", "CON", "seticon_conflux", "mage.sets.conflux", new GregorianCalendar(2009, 0, 31).getTime(), SetType.EXPANSION); super("Conflux", "CON", "mage.sets.conflux", new GregorianCalendar(2009, 0, 31).getTime(), SetType.EXPANSION);
this.blockName = "Shards of Alara"; this.blockName = "Shards of Alara";
this.parentSet = ShardsOfAlara.getInstance(); this.parentSet = ShardsOfAlara.getInstance();
this.hasBasicLands = false; this.hasBasicLands = false;

View file

@ -28,7 +28,7 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants.SetType; import mage.constants.SetType;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
/** /**
@ -44,7 +44,7 @@ public class DarkAscension extends ExpansionSet {
} }
private DarkAscension() { private DarkAscension() {
super("Dark Ascension", "DKA", "seticon_mtgdka", "mage.sets.darkascension", new GregorianCalendar(2012, 1, 3).getTime(), SetType.EXPANSION); super("Dark Ascension", "DKA", "mage.sets.darkascension", new GregorianCalendar(2012, 1, 3).getTime(), SetType.EXPANSION);
this.blockName = "Innistrad"; this.blockName = "Innistrad";
this.hasBoosters = true; this.hasBoosters = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;

View file

@ -1,7 +1,7 @@
package mage.sets; package mage.sets;
import mage.Constants;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.constants.SetType;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
@ -14,7 +14,7 @@ public class Darksteel extends ExpansionSet {
} }
public Darksteel() { public Darksteel() {
super("Darksteel", "DST", "", "mage.sets.darksteel", new GregorianCalendar(2004, 1, 6).getTime(), Constants.SetType.EXPANSION); super("Darksteel", "DST", "mage.sets.darksteel", new GregorianCalendar(2004, 1, 6).getTime(), SetType.EXPANSION);
this.blockName = "Mirrodin"; this.blockName = "Mirrodin";
this.parentSet = Mirrodin.getInstance(); this.parentSet = Mirrodin.getInstance();
this.hasBasicLands = false; this.hasBasicLands = false;

View file

@ -27,8 +27,8 @@
*/ */
package mage.sets; package mage.sets;
import mage.Constants;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.constants.SetType;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
@ -47,7 +47,7 @@ public class Dissension extends ExpansionSet {
} }
private Dissension() { private Dissension() {
super("Dissension", "DIS", "", "mage.sets.dissension", new GregorianCalendar(2006, 4, 5).getTime(), Constants.SetType.EXPANSION); super("Dissension", "DIS", "mage.sets.dissension", new GregorianCalendar(2006, 4, 5).getTime(), SetType.EXPANSION);
this.blockName = "Ravnika"; this.blockName = "Ravnika";
this.parentSet = RavnicaCityOfGuilds.getInstance(); this.parentSet = RavnicaCityOfGuilds.getInstance();
this.hasBasicLands = false; this.hasBasicLands = false;

View file

@ -31,13 +31,14 @@ package mage.sets;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import java.util.List; import java.util.List;
import mage.Constants;
import mage.Constants.CardType; import mage.constants.CardType;
import mage.Constants.Rarity; import mage.constants.Rarity;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.cards.repository.CardCriteria; import mage.cards.repository.CardCriteria;
import mage.cards.repository.CardInfo; import mage.cards.repository.CardInfo;
import mage.cards.repository.CardRepository; import mage.cards.repository.CardRepository;
import mage.constants.SetType;
/** /**
* *
@ -54,7 +55,7 @@ public class DragonsMaze extends ExpansionSet {
} }
private DragonsMaze() { private DragonsMaze() {
super("Dragon's Maze", "DGM", "seticon_mtggtc", "mage.sets.dragonsmaze", new GregorianCalendar(2013, 5, 03).getTime(), Constants.SetType.EXPANSION); super("Dragon's Maze", "DGM", "mage.sets.dragonsmaze", new GregorianCalendar(2013, 5, 03).getTime(), SetType.EXPANSION);
this.blockName = "Return to Ravnica"; this.blockName = "Return to Ravnica";
this.hasBoosters = true; this.hasBoosters = true;
this.numBoosterSpecial = 1; this.numBoosterSpecial = 1;
@ -121,7 +122,7 @@ public class DragonsMaze extends ExpansionSet {
@Override @Override
public List<CardInfo> getSpecialMythic() { public List<CardInfo> getSpecialMythic() {
CardCriteria criteria = new CardCriteria(); CardCriteria criteria = new CardCriteria();
criteria.rarities(Rarity.MYTHIC).setCodes(this.code).types(Constants.CardType.LAND); criteria.rarities(Rarity.MYTHIC).setCodes(this.code).types(CardType.LAND);
return CardRepository.instance.findCards(criteria); return CardRepository.instance.findCards(criteria);
} }

View file

@ -1,7 +1,7 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants.SetType; import mage.constants.SetType;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
public class EighthEdition extends ExpansionSet { public class EighthEdition extends ExpansionSet {
@ -13,7 +13,7 @@ public class EighthEdition extends ExpansionSet {
} }
private EighthEdition() { private EighthEdition() {
super("Eighth Edition", "8ED", "", "mage.sets.eighthedition", new GregorianCalendar(2003, 7, 28).getTime(), SetType.CORE); super("Eighth Edition", "8ED", "mage.sets.eighthedition", new GregorianCalendar(2003, 7, 28).getTime(), SetType.CORE);
this.hasBoosters = true; this.hasBoosters = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 10; this.numBoosterCommon = 10;

View file

@ -1,7 +1,7 @@
package mage.sets; package mage.sets;
import mage.Constants;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.constants.SetType;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
@ -13,6 +13,6 @@ public class ElspethvsTezzeret extends ExpansionSet {
} }
private ElspethvsTezzeret() { private ElspethvsTezzeret() {
super("Duel Decks: Elspeth vs. Tezzeret", "DDF", "", "mage.sets.elspethvstezzeret", new GregorianCalendar(2010, 8, 3).getTime(), Constants.SetType.REPRINT); super("Duel Decks: Elspeth vs. Tezzeret", "DDF", "mage.sets.elspethvstezzeret", new GregorianCalendar(2010, 8, 3).getTime(), SetType.REPRINT);
} }
} }

View file

@ -1,7 +1,7 @@
package mage.sets; package mage.sets;
import mage.Constants;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.constants.SetType;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
@ -13,7 +13,7 @@ public class Eventide extends ExpansionSet {
} }
private Eventide() { private Eventide() {
super("Eventide", "EVE", "", "mage.sets.eventide", new GregorianCalendar(2008, 6, 25).getTime(), Constants.SetType.EXPANSION); super("Eventide", "EVE", "mage.sets.eventide", new GregorianCalendar(2008, 6, 25).getTime(), SetType.EXPANSION);
this.blockName = "Shadowmoor"; this.blockName = "Shadowmoor";
this.parentSet = Shadowmoor.getInstance(); this.parentSet = Shadowmoor.getInstance();
this.hasBasicLands = false; this.hasBasicLands = false;

View file

@ -28,8 +28,9 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.constants.SetType;
/** /**
* *
@ -44,7 +45,7 @@ public class Exodus extends ExpansionSet {
} }
private Exodus() { private Exodus() {
super("Exodus", "EXO", "", "mage.sets.exodus", new GregorianCalendar(1998, 5, 6).getTime(), Constants.SetType.EXPANSION); super("Exodus", "EXO", "mage.sets.exodus", new GregorianCalendar(1998, 5, 6).getTime(), SetType.EXPANSION);
this.blockName = "Tempest"; this.blockName = "Tempest";
this.parentSet = Tempest.getInstance(); this.parentSet = Tempest.getInstance();
this.hasBasicLands = false; this.hasBasicLands = false;

View file

@ -28,8 +28,9 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.constants.SetType;
/** /**
* *
@ -44,7 +45,7 @@ public class FallenEmpires extends ExpansionSet {
} }
private FallenEmpires() { private FallenEmpires() {
super("Fallen Empires", "FEM", "", "mage.sets.fallenempires", new GregorianCalendar(1994, 10, 1).getTime(), Constants.SetType.EXPANSION); super("Fallen Empires", "FEM", "mage.sets.fallenempires", new GregorianCalendar(1994, 10, 1).getTime(), SetType.EXPANSION);
this.hasBasicLands = false; this.hasBasicLands = false;
this.hasBoosters = true; this.hasBoosters = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;

View file

@ -28,7 +28,7 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants.SetType; import mage.constants.SetType;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
/** /**
@ -44,7 +44,7 @@ public class FifthDawn extends ExpansionSet {
} }
private FifthDawn() { private FifthDawn() {
super("Fifth Dawn", "5DN", "", "mage.sets.fifthdawn", new GregorianCalendar(2004, 5, 4).getTime(), SetType.EXPANSION); super("Fifth Dawn", "5DN", "mage.sets.fifthdawn", new GregorianCalendar(2004, 5, 4).getTime(), SetType.EXPANSION);
this.blockName = "Mirrodin"; this.blockName = "Mirrodin";
this.parentSet = Mirrodin.getInstance(); this.parentSet = Mirrodin.getInstance();
this.hasBasicLands = false; this.hasBasicLands = false;

View file

@ -1,7 +1,7 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants.SetType; import mage.constants.SetType;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
public class FifthEdition extends ExpansionSet { public class FifthEdition extends ExpansionSet {
@ -13,7 +13,7 @@ public class FifthEdition extends ExpansionSet {
} }
private FifthEdition() { private FifthEdition() {
super("Fifth Edition", "5ED", "", "mage.sets.fifthedition", new GregorianCalendar(1997, 3, 1).getTime(), SetType.CORE); super("Fifth Edition", "5ED", "mage.sets.fifthedition", new GregorianCalendar(1997, 3, 1).getTime(), SetType.CORE);
this.hasBoosters = true; this.hasBoosters = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 10; this.numBoosterCommon = 10;

View file

@ -28,8 +28,9 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.constants.SetType;
/** /**
* *
@ -44,7 +45,7 @@ public class FourthEdition extends ExpansionSet {
} }
private FourthEdition() { private FourthEdition() {
super("Fourth Edition", "4ED", "", "mage.sets.fourthedition", new GregorianCalendar(1995, 3, 1).getTime(), Constants.SetType.CORE); super("Fourth Edition", "4ED", "mage.sets.fourthedition", new GregorianCalendar(1995, 3, 1).getTime(), SetType.CORE);
this.hasBoosters = true; this.hasBoosters = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 10; this.numBoosterCommon = 10;

View file

@ -28,7 +28,7 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants.SetType; import mage.constants.SetType;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
/** /**
@ -44,7 +44,7 @@ public class FutureSight extends ExpansionSet {
} }
private FutureSight() { private FutureSight() {
super("Future Sight", "FUT", "", "mage.sets.futuresight", new GregorianCalendar(2007, 4, 4).getTime(), SetType.EXPANSION); super("Future Sight", "FUT", "mage.sets.futuresight", new GregorianCalendar(2007, 4, 4).getTime(), SetType.EXPANSION);
this.blockName = "Time Spiral"; this.blockName = "Time Spiral";
this.parentSet = TimeSpiral.getInstance(); this.parentSet = TimeSpiral.getInstance();
this.hasBasicLands = false; this.hasBasicLands = false;

View file

@ -28,7 +28,7 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants.SetType; import mage.constants.SetType;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
/** /**
@ -44,7 +44,7 @@ public class Gatecrash extends ExpansionSet {
} }
private Gatecrash() { private Gatecrash() {
super("Gatecrash", "GTC", "seticon_mtggtc", "mage.sets.gatecrash", new GregorianCalendar(2013, 2, 01).getTime(), SetType.EXPANSION); super("Gatecrash", "GTC", "mage.sets.gatecrash", new GregorianCalendar(2013, 2, 01).getTime(), SetType.EXPANSION);
this.blockName = "Return to Ravnica"; this.blockName = "Return to Ravnica";
this.hasBoosters = true; this.hasBoosters = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;

View file

@ -28,8 +28,8 @@
package mage.sets; package mage.sets;
import mage.Constants;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.constants.SetType;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
@ -47,7 +47,7 @@ public class Guildpact extends ExpansionSet {
} }
private Guildpact() { private Guildpact() {
super("Guildpact", "GPT", "", "mage.sets.guildpact", new GregorianCalendar(2006, 1, 3).getTime(), Constants.SetType.EXPANSION); super("Guildpact", "GPT", "mage.sets.guildpact", new GregorianCalendar(2006, 1, 3).getTime(), SetType.EXPANSION);
this.blockName = "Ravnika"; this.blockName = "Ravnika";
this.parentSet = RavnicaCityOfGuilds.getInstance(); this.parentSet = RavnicaCityOfGuilds.getInstance();
this.hasBasicLands = false; this.hasBasicLands = false;

View file

@ -1,7 +1,7 @@
package mage.sets; package mage.sets;
import mage.Constants;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.constants.SetType;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
@ -14,6 +14,6 @@ public class Guru extends ExpansionSet {
private Guru() { private Guru() {
//TODO find correct release date, wiki don't known anything about this expansion //TODO find correct release date, wiki don't known anything about this expansion
super("Guru", "GUR", "", "mage.sets.guru", new GregorianCalendar(1990, 1, 2).getTime(), Constants.SetType.REPRINT); super("Guru", "GUR", "mage.sets.guru", new GregorianCalendar(1990, 1, 2).getTime(), SetType.REPRINT);
} }
} }

View file

@ -28,8 +28,9 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.constants.SetType;
/** /**
* *
@ -44,7 +45,7 @@ public class Homelands extends ExpansionSet {
} }
private Homelands() { private Homelands() {
super("Homelands", "HML", "", "mage.sets.homelands", new GregorianCalendar(1995, 9, 1).getTime(), Constants.SetType.EXPANSION); super("Homelands", "HML", "mage.sets.homelands", new GregorianCalendar(1995, 9, 1).getTime(), SetType.EXPANSION);
this.hasBasicLands = false; this.hasBasicLands = false;
this.hasBoosters = true; this.hasBoosters = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;

View file

@ -28,8 +28,9 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.constants.SetType;
/** /**
* *
@ -44,7 +45,7 @@ public class IceAge extends ExpansionSet {
} }
private IceAge() { private IceAge() {
super("Ice Age", "ICE", "", "mage.sets.iceage", new GregorianCalendar(1995, 5, 1).getTime(), Constants.SetType.EXPANSION); super("Ice Age", "ICE", "mage.sets.iceage", new GregorianCalendar(1995, 5, 1).getTime(), SetType.EXPANSION);
this.blockName = "Ice Age"; this.blockName = "Ice Age";
this.hasBoosters = true; this.hasBoosters = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;

View file

@ -28,7 +28,7 @@
package mage.sets; package mage.sets;
import mage.Constants.SetType; import mage.constants.SetType;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
@ -45,7 +45,7 @@ public class Innistrad extends ExpansionSet {
} }
private Innistrad() { private Innistrad() {
super("Innistrad", "ISD", "seticon_mtgisd", "mage.sets.innistrad", new GregorianCalendar(2011, 9, 30).getTime(), SetType.EXPANSION); super("Innistrad", "ISD", "mage.sets.innistrad", new GregorianCalendar(2011, 9, 30).getTime(), SetType.EXPANSION);
this.blockName = "Innistrad"; this.blockName = "Innistrad";
this.hasBoosters = true; this.hasBoosters = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;

View file

@ -28,7 +28,7 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants.SetType; import mage.constants.SetType;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
/** /**
@ -43,7 +43,7 @@ public class Invasion extends ExpansionSet {
} }
private Invasion() { private Invasion() {
super("Invasion", "INV", "", "mage.sets.invasion", new GregorianCalendar(2000, 9, 2).getTime(), SetType.EXPANSION); super("Invasion", "INV", "mage.sets.invasion", new GregorianCalendar(2000, 9, 2).getTime(), SetType.EXPANSION);
this.blockName = "Invasion"; this.blockName = "Invasion";
this.hasBoosters = true; this.hasBoosters = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;

View file

@ -28,7 +28,7 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants.SetType; import mage.constants.SetType;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
/** /**
@ -44,7 +44,7 @@ public class Judgment extends ExpansionSet {
} }
private Judgment() { private Judgment() {
super("Judgment", "JUD", "exp_symbol_mtgjud", "mage.sets.judgment", new GregorianCalendar(2002, 5, 27).getTime(), SetType.EXPANSION); super("Judgment", "JUD", "mage.sets.judgment", new GregorianCalendar(2002, 5, 27).getTime(), SetType.EXPANSION);
this.blockName = "Odyssey"; this.blockName = "Odyssey";
this.parentSet = Odyssey.getInstance(); this.parentSet = Odyssey.getInstance();
this.hasBasicLands = false; this.hasBasicLands = false;

View file

@ -28,8 +28,9 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.constants.SetType;
/** /**
* *
@ -44,7 +45,7 @@ public class Legends extends ExpansionSet {
} }
private Legends() { private Legends() {
super("Legends", "LEG", "", "mage.sets.legends", new GregorianCalendar(1994, 5, 1).getTime(), Constants.SetType.EXPANSION); super("Legends", "LEG", "mage.sets.legends", new GregorianCalendar(1994, 5, 1).getTime(), SetType.EXPANSION);
this.hasBasicLands = false; this.hasBasicLands = false;
this.hasBoosters = true; this.hasBoosters = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;

View file

@ -28,8 +28,9 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.constants.SetType;
/** /**
* *
@ -44,7 +45,7 @@ public class Legions extends ExpansionSet {
} }
private Legions() { private Legions() {
super("Legions", "LGN", "", "mage.sets.legions", new GregorianCalendar(2003, 0, 25).getTime(), Constants.SetType.EXPANSION); super("Legions", "LGN", "mage.sets.legions", new GregorianCalendar(2003, 0, 25).getTime(), SetType.EXPANSION);
this.blockName = "Onslaught"; this.blockName = "Onslaught";
this.parentSet = Onslaught.getInstance(); this.parentSet = Onslaught.getInstance();
this.hasBasicLands = false; this.hasBasicLands = false;

View file

@ -1,8 +1,9 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.constants.SetType;
/** /**
* *
@ -17,7 +18,7 @@ public class LimitedEditionAlpha extends ExpansionSet {
} }
private LimitedEditionAlpha() { private LimitedEditionAlpha() {
super("Limited Edition Alpha", "LEA", "", "mage.sets.limitedalpha", new GregorianCalendar(1993, 7, 1).getTime(), Constants.SetType.CORE); super("Limited Edition Alpha", "LEA", "mage.sets.limitedalpha", new GregorianCalendar(1993, 7, 1).getTime(), SetType.CORE);
this.hasBoosters = true; this.hasBoosters = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 10; this.numBoosterCommon = 10;

View file

@ -1,8 +1,9 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.constants.SetType;
/** /**
* *
@ -17,7 +18,7 @@ public class LimitedEditionBeta extends ExpansionSet {
} }
private LimitedEditionBeta() { private LimitedEditionBeta() {
super("Limited Edition Beta", "LEB", "", "mage.sets.limitedbeta", new GregorianCalendar(1993, 9, 1).getTime(), Constants.SetType.CORE); super("Limited Edition Beta", "LEB", "mage.sets.limitedbeta", new GregorianCalendar(1993, 9, 1).getTime(), SetType.CORE);
this.hasBoosters = true; this.hasBoosters = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 10; this.numBoosterCommon = 10;

View file

@ -28,7 +28,7 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants.SetType; import mage.constants.SetType;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
/** /**
@ -44,7 +44,7 @@ public class Lorwyn extends ExpansionSet {
} }
private Lorwyn() { private Lorwyn() {
super("Lorwyn", "LRW", "", "mage.sets.lorwyn", new GregorianCalendar(2007, 9, 12).getTime(), SetType.EXPANSION); super("Lorwyn", "LRW", "mage.sets.lorwyn", new GregorianCalendar(2007, 9, 12).getTime(), SetType.EXPANSION);
this.blockName = "Lorwyn"; this.blockName = "Lorwyn";
this.hasBoosters = true; this.hasBoosters = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;

View file

@ -29,7 +29,7 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants.SetType; import mage.constants.SetType;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
/** /**
@ -45,7 +45,7 @@ public class Magic2010 extends ExpansionSet {
} }
private Magic2010() { private Magic2010() {
super("Magic 2010", "M10", "seticon_M10", "mage.sets.magic2010", new GregorianCalendar(2009, 6, 17).getTime(), SetType.CORE); super("Magic 2010", "M10", "mage.sets.magic2010", new GregorianCalendar(2009, 6, 17).getTime(), SetType.CORE);
this.hasBoosters = true; this.hasBoosters = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 10; this.numBoosterCommon = 10;

View file

@ -29,7 +29,7 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants.SetType; import mage.constants.SetType;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
/** /**
@ -45,7 +45,7 @@ public class Magic2011 extends ExpansionSet {
} }
private Magic2011() { private Magic2011() {
super("Magic 2011", "M11", "seticon_M11", "mage.sets.magic2011", new GregorianCalendar(2010, 6, 16).getTime(), SetType.CORE); super("Magic 2011", "M11", "mage.sets.magic2011", new GregorianCalendar(2010, 6, 16).getTime(), SetType.CORE);
this.hasBoosters = true; this.hasBoosters = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 10; this.numBoosterCommon = 10;

View file

@ -28,7 +28,7 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants.SetType; import mage.constants.SetType;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
/** /**
@ -44,7 +44,7 @@ public class Magic2012 extends ExpansionSet {
} }
private Magic2012() { private Magic2012() {
super("Magic 2012", "M12", "seticon_M12", "mage.sets.magic2012", new GregorianCalendar(2011, 6, 9).getTime(), SetType.CORE); super("Magic 2012", "M12", "mage.sets.magic2012", new GregorianCalendar(2011, 6, 9).getTime(), SetType.CORE);
this.hasBoosters = true; this.hasBoosters = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 10; this.numBoosterCommon = 10;

View file

@ -28,7 +28,7 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants.SetType; import mage.constants.SetType;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
/** /**
@ -44,7 +44,7 @@ public class Magic2013 extends ExpansionSet {
} }
private Magic2013() { private Magic2013() {
super("Magic 2013", "M13", "seticon_M13", "mage.sets.magic2013", new GregorianCalendar(2012, 6, 7).getTime(), SetType.CORE); super("Magic 2013", "M13", "mage.sets.magic2013", new GregorianCalendar(2012, 6, 7).getTime(), SetType.CORE);
this.hasBoosters = true; this.hasBoosters = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 10; this.numBoosterCommon = 10;

View file

@ -1,7 +1,7 @@
package mage.sets; package mage.sets;
import mage.Constants;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.constants.SetType;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
@ -13,7 +13,7 @@ public class MagicPlayerRewards extends ExpansionSet {
} }
private MagicPlayerRewards() { private MagicPlayerRewards() {
super("Magic Player Rewards", "MPR", "", "mage.sets.playerrewards", new GregorianCalendar(1990, 1, 1).getTime(), Constants.SetType.EXPANSION); super("Magic Player Rewards", "MPR", "mage.sets.playerrewards", new GregorianCalendar(1990, 1, 1).getTime(), SetType.EXPANSION);
this.hasBoosters = false; this.hasBoosters = false;
} }
} }

View file

@ -28,8 +28,9 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.constants.SetType;
/** /**
* *
@ -44,7 +45,7 @@ public class MercadianMasques extends ExpansionSet {
} }
private MercadianMasques() { private MercadianMasques() {
super("Mercadian Masques", "MMQ", "", "mage.sets.mercadianmasques", new GregorianCalendar(1999, 8, 25).getTime(), Constants.SetType.EXPANSION); super("Mercadian Masques", "MMQ", "mage.sets.mercadianmasques", new GregorianCalendar(1999, 8, 25).getTime(), SetType.EXPANSION);
this.blockName = "Masques"; this.blockName = "Masques";
this.hasBoosters = true; this.hasBoosters = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;

View file

@ -28,8 +28,9 @@
package mage.sets; package mage.sets;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import mage.Constants;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.constants.SetType;
/** /**
* *
@ -43,7 +44,7 @@ public class Mirage extends ExpansionSet {
} }
private Mirage() { private Mirage() {
super("Mirage", "MIR", "", "mage.sets.mirage", new GregorianCalendar(1996, 8, 21).getTime(), Constants.SetType.EXPANSION); super("Mirage", "MIR", "mage.sets.mirage", new GregorianCalendar(1996, 8, 21).getTime(), SetType.EXPANSION);
this.blockName = "Mirage"; this.blockName = "Mirage";
this.hasBoosters = true; this.hasBoosters = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;

Some files were not shown because too many files have changed in this diff Show more