diff --git a/Mage.Client/config/config.properties b/Mage.Client/config/config.properties
index 9fb6435889..640fb4b50e 100644
--- a/Mage.Client/config/config.properties
+++ b/Mage.Client/config/config.properties
@@ -10,7 +10,7 @@ resource-path=C:\\Program Files (x86)\\Wizards of the Coast\\Magic Online III\\G
card-scaling-factor=0.4
# parameters for debugging and testing faster
-default-deck-path=C:\\UW Control.dck
+default-deck-path=C:\\Projects\\Mage\\Mage.Client\\release\\sample-decks\\WhiteTokens.dck
# 0: Human, 1: Computer - default, 2: Computer - minimax, 3: Computer - minimax hybrid
default-other-player-index=1
default-computer-name=computer
\ No newline at end of file
diff --git a/Mage.Client/pom.xml b/Mage.Client/pom.xml
index a22964dd81..0d8f1e7019 100644
--- a/Mage.Client/pom.xml
+++ b/Mage.Client/pom.xml
@@ -10,7 +10,7 @@
org.mage
- Mage-Client
+ mage-clientjar0.3Mage Client
@@ -19,17 +19,17 @@
org.mage
- Mage
+ mage${mage-version}org.mage
- Mage-Common
+ mage-common${mage-version}org.mage
- Mage-Sets
+ mage-sets${mage-version}
@@ -39,6 +39,7 @@
org.apache.maven.pluginsmaven-compiler-plugin
+ 2.0.21.6
@@ -50,26 +51,7 @@
UTF-8
-
- maven-jar-plugin
-
-
-
- true
- lib/
- mage.client.MageFrame
-
-
-
-
-
- maven-assembly-plugin
-
-
- src/main/assembly/distribution.xml
-
-
-
+
mage-client
diff --git a/Mage.Client/src/main/java/mage/client/cards/CardsList.form b/Mage.Client/src/main/java/mage/client/cards/CardsList.form
index 5c03d47756..258e4cf9cb 100644
--- a/Mage.Client/src/main/java/mage/client/cards/CardsList.form
+++ b/Mage.Client/src/main/java/mage/client/cards/CardsList.form
@@ -8,7 +8,7 @@
-
+
diff --git a/Mage.Client/src/main/java/mage/client/cards/CardsList.java b/Mage.Client/src/main/java/mage/client/cards/CardsList.java
index 085401ce0f..c4a6a996fe 100644
--- a/Mage.Client/src/main/java/mage/client/cards/CardsList.java
+++ b/Mage.Client/src/main/java/mage/client/cards/CardsList.java
@@ -38,6 +38,7 @@ import java.awt.Dimension;
import java.awt.Rectangle;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
+import java.beans.Beans;
import java.util.UUID;
import mage.client.util.Config;
import mage.client.util.Event;
@@ -108,7 +109,7 @@ public class CardsList extends javax.swing.JPanel implements MouseListener {
cardArea = new javax.swing.JLayeredPane();
setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
- setPreferredSize(new Dimension(Config.dimensions.frameWidth, Config.dimensions.frameHeight));
+ setPreferredSize((!Beans.isDesignTime())?(new Dimension(Config.dimensions.frameWidth, Config.dimensions.frameHeight)):(new Dimension(100, 100)));
setLayout(new java.awt.BorderLayout());
jScrollPane1.setViewportView(cardArea);
diff --git a/Mage.Client/src/main/java/mage/client/deckeditor/DecDeckImporter.java b/Mage.Client/src/main/java/mage/client/deckeditor/DecDeckImporter.java
new file mode 100644
index 0000000000..9ca2af6d42
--- /dev/null
+++ b/Mage.Client/src/main/java/mage/client/deckeditor/DecDeckImporter.java
@@ -0,0 +1,70 @@
+/*
+ * 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.deckeditor;
+
+import mage.cards.decks.DeckCardLists;
+import mage.sets.Sets;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class DecDeckImporter extends DeckImporterImpl {
+
+ @Override
+ protected void readLine(String line, DeckCardLists deckList) {
+ if (line.length() == 0 || line.startsWith("//")) return;
+ boolean sideboard = false;
+ if (line.startsWith("SB:")) {
+ line = line.substring(3).trim();
+ sideboard = true;
+ }
+ int delim = line.indexOf(' ');
+ String lineNum = line.substring(0, delim).trim();
+ String lineName = line.substring(delim).trim();
+ try {
+ int num = Integer.parseInt(lineNum);
+ String cardName = Sets.findCard(lineName);
+ if (cardName == null)
+ sbMessage.append("Could not find card: '").append(lineName).append("' at line ").append(lineCount).append("\n");
+ else {
+ for (int i = 0; i < num; i++) {
+ if (!sideboard)
+ deckList.getCards().add(cardName);
+ else
+ deckList.getSideboard().add(cardName);
+ }
+ }
+ }
+ catch (NumberFormatException nfe) {
+ sbMessage.append("Invalid number: ").append(lineNum).append(" at line ").append(lineCount).append("\n");
+ }
+ }
+
+}
diff --git a/Mage.Client/src/main/java/mage/client/deckeditor/DeckEditorPanel.form b/Mage.Client/src/main/java/mage/client/deckeditor/DeckEditorPanel.form
index c662e1f64b..0db7285f7a 100644
--- a/Mage.Client/src/main/java/mage/client/deckeditor/DeckEditorPanel.form
+++ b/Mage.Client/src/main/java/mage/client/deckeditor/DeckEditorPanel.form
@@ -79,6 +79,10 @@
+
+
+
+
@@ -99,7 +103,9 @@
-
+
+
+
@@ -157,6 +163,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/Mage.Client/src/main/java/mage/client/deckeditor/DeckEditorPanel.java b/Mage.Client/src/main/java/mage/client/deckeditor/DeckEditorPanel.java
index a4c7b122b7..a3b32131d1 100644
--- a/Mage.Client/src/main/java/mage/client/deckeditor/DeckEditorPanel.java
+++ b/Mage.Client/src/main/java/mage/client/deckeditor/DeckEditorPanel.java
@@ -58,6 +58,7 @@ import mage.view.CardsView;
public class DeckEditorPanel extends javax.swing.JPanel {
private JFileChooser fcSelectDeck;
+ private JFileChooser fcImportDeck;
private Deck deck = new Deck();;
/** Creates new form DeckEditorPanel */
@@ -66,6 +67,9 @@ public class DeckEditorPanel extends javax.swing.JPanel {
fcSelectDeck = new JFileChooser();
fcSelectDeck.setAcceptAllFileFilterUsed(false);
fcSelectDeck.addChoosableFileFilter(new DeckFilter());
+ fcImportDeck = new JFileChooser();
+ fcImportDeck.setAcceptAllFileFilterUsed(false);
+ fcImportDeck.addChoosableFileFilter(new ImportFilter());
}
public void showDeckEditor() {
@@ -152,6 +156,7 @@ public class DeckEditorPanel extends javax.swing.JPanel {
btnLoad = new javax.swing.JButton();
btnNew = new javax.swing.JButton();
btnExit = new javax.swing.JButton();
+ btnImport = new javax.swing.JButton();
jSplitPane1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
jSplitPane1.setResizeWeight(0.5);
@@ -191,6 +196,14 @@ public class DeckEditorPanel extends javax.swing.JPanel {
}
});
+ btnImport.setText("Import");
+ btnImport.setName("btnImport"); // NOI18N
+ btnImport.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnImportActionPerformed(evt);
+ }
+ });
+
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
@@ -211,7 +224,10 @@ public class DeckEditorPanel extends javax.swing.JPanel {
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnNew)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(btnExit)))
+ .addComponent(btnExit))
+ .addGroup(jPanel1Layout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(btnImport)))
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
@@ -227,7 +243,9 @@ public class DeckEditorPanel extends javax.swing.JPanel {
.addComponent(btnLoad)
.addComponent(btnNew)
.addComponent(btnExit))
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 188, Short.MAX_VALUE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(btnImport)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 159, Short.MAX_VALUE)
.addComponent(bigCard, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
);
@@ -306,10 +324,43 @@ public class DeckEditorPanel extends javax.swing.JPanel {
this.setVisible(false);
}//GEN-LAST:event_btnExitActionPerformed
+ private void btnImportActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnImportActionPerformed
+ String lastFolder = MageFrame.getPreferences().get("lastImportFolder", "");
+ if (!lastFolder.isEmpty())
+ fcImportDeck.setCurrentDirectory(new File(lastFolder));
+ int ret = fcImportDeck.showOpenDialog(this);
+ if (ret == JFileChooser.APPROVE_OPTION) {
+ File file = fcImportDeck.getSelectedFile();
+ try {
+ setCursor(new Cursor(Cursor.WAIT_CURSOR));
+ deck = Deck.load(importDeck(file.getPath()));
+ } catch (Exception ex) {
+ Logger.getLogger(DeckEditorPanel.class.getName()).log(Level.SEVERE, null, ex);
+ }
+ finally {
+ setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
+ }
+ refreshDeck();
+ try {
+ MageFrame.getPreferences().put("lastImportFolder", file.getCanonicalPath());
+ } catch (IOException ex) { }
+ }
+ fcImportDeck.setSelectedFile(null);
+ }//GEN-LAST:event_btnImportActionPerformed
+
+ public DeckCardLists importDeck(String file) {
+ DeckImporter importer;
+ if (file.endsWith("dec"))
+ importer = new DecDeckImporter();
+ else
+ importer = new MWSDeckImporter();
+ return importer.importDeck(file);
+ }
// Variables declaration - do not modify//GEN-BEGIN:variables
private mage.client.cards.BigCard bigCard;
private javax.swing.JButton btnExit;
+ private javax.swing.JButton btnImport;
private javax.swing.JButton btnLoad;
private javax.swing.JButton btnNew;
private javax.swing.JButton btnSave;
@@ -344,4 +395,31 @@ class DeckFilter extends FileFilter {
public String getDescription() {
return "Deck Files";
}
+}
+
+class ImportFilter extends FileFilter {
+
+ @Override
+ public boolean accept(File f) {
+ if (f.isDirectory())
+ return true;
+
+ String ext = null;
+ String s = f.getName();
+ int i = s.lastIndexOf('.');
+
+ if (i > 0 && i < s.length() - 1) {
+ ext = s.substring(i+1).toLowerCase();
+ }
+ if (ext != null) {
+ if (ext.equals("dec") || ext.equals("mwDeck"))
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public String getDescription() {
+ return "*.dec | *.mwDeck";
+ }
}
\ No newline at end of file
diff --git a/Mage.Client/src/main/java/mage/client/deckeditor/DeckImporter.java b/Mage.Client/src/main/java/mage/client/deckeditor/DeckImporter.java
new file mode 100644
index 0000000000..c2e512b987
--- /dev/null
+++ b/Mage.Client/src/main/java/mage/client/deckeditor/DeckImporter.java
@@ -0,0 +1,41 @@
+/*
+ * 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.deckeditor;
+
+import mage.cards.decks.DeckCardLists;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public interface DeckImporter {
+
+ public DeckCardLists importDeck(String file);
+
+}
diff --git a/Mage.Client/src/main/java/mage/client/deckeditor/DeckImporterImpl.java b/Mage.Client/src/main/java/mage/client/deckeditor/DeckImporterImpl.java
new file mode 100644
index 0000000000..0b806e7fb3
--- /dev/null
+++ b/Mage.Client/src/main/java/mage/client/deckeditor/DeckImporterImpl.java
@@ -0,0 +1,78 @@
+/*
+ * 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.deckeditor;
+
+import java.io.File;
+import java.util.Scanner;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.swing.JOptionPane;
+import mage.cards.decks.DeckCardLists;
+import mage.client.MageFrame;
+import mage.util.Logging;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public abstract class DeckImporterImpl implements DeckImporter {
+
+ private final static Logger logger = Logging.getLogger(DeckImporterImpl.class.getName());
+ protected StringBuilder sbMessage = new StringBuilder();
+ protected int lineCount;
+
+ @Override
+ public DeckCardLists importDeck(String file) {
+ File f = new File(file);
+ DeckCardLists deckList = new DeckCardLists();
+ lineCount = 0;
+ sbMessage.setLength(0);
+ try {
+ Scanner scanner = new Scanner(f);
+ try {
+ while (scanner.hasNextLine()) {
+ String line = scanner.nextLine().trim();
+ lineCount++;
+ readLine(line, deckList);
+ }
+ if (sbMessage.length() > 0) {
+ JOptionPane.showMessageDialog(MageFrame.getDesktop(), sbMessage.toString(), "Error importing deck", JOptionPane.ERROR_MESSAGE);
+ }
+ }
+ finally {
+ scanner.close();
+ }
+ } catch (Exception ex) {
+ logger.log(Level.SEVERE, null, ex);
+ }
+ return deckList;
+ }
+
+ protected abstract void readLine(String line, DeckCardLists deckList);
+}
diff --git a/Mage.Client/src/main/java/mage/client/deckeditor/MWSDeckImporter.java b/Mage.Client/src/main/java/mage/client/deckeditor/MWSDeckImporter.java
new file mode 100644
index 0000000000..dd4063297b
--- /dev/null
+++ b/Mage.Client/src/main/java/mage/client/deckeditor/MWSDeckImporter.java
@@ -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.deckeditor;
+
+import mage.cards.decks.DeckCardLists;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class MWSDeckImporter extends DeckImporterImpl {
+
+ @Override
+ protected void readLine(String line, DeckCardLists deckList) {
+ //TODO: implement this
+ }
+
+}
diff --git a/Mage.Common/pom.xml b/Mage.Common/pom.xml
index 5c8c547b90..425e77e8d6 100644
--- a/Mage.Common/pom.xml
+++ b/Mage.Common/pom.xml
@@ -10,7 +10,7 @@
org.mage
- Mage-Common
+ mage-commonjar0.3Mage Common Classes
@@ -19,7 +19,7 @@
org.mage
- Mage
+ mage${mage-version}
diff --git a/Mage.Deck.Constructed/pom.xml b/Mage.Deck.Constructed/pom.xml
index 7789e9cc1b..31c3198311 100644
--- a/Mage.Deck.Constructed/pom.xml
+++ b/Mage.Deck.Constructed/pom.xml
@@ -10,7 +10,7 @@
org.mage
- Mage-Deck-Contructed
+ mage-deck-contructedjar0.3Mage Deck Constructed
@@ -19,7 +19,7 @@
org.mage
- Mage
+ mage${mage-version}
diff --git a/Mage.Game.FreeForAll/pom.xml b/Mage.Game.FreeForAll/pom.xml
index a0718b63ca..7269838e93 100644
--- a/Mage.Game.FreeForAll/pom.xml
+++ b/Mage.Game.FreeForAll/pom.xml
@@ -10,7 +10,7 @@
org.mage
- Mage-Game-FreeForAll
+ mage-game-freeforalljar0.3Mage Game Free For All
@@ -19,7 +19,7 @@
org.mage
- Mage
+ mage${mage-version}
diff --git a/Mage.Game.TwoPlayerDuel/pom.xml b/Mage.Game.TwoPlayerDuel/pom.xml
index 3289299e7a..156b22ec32 100644
--- a/Mage.Game.TwoPlayerDuel/pom.xml
+++ b/Mage.Game.TwoPlayerDuel/pom.xml
@@ -10,7 +10,7 @@
org.mage
- Mage-Game-TwoPlayerDuel
+ mage-game-twoplayerdueljar0.3Mage Game Two Player
@@ -19,7 +19,7 @@
org.mage
- Mage
+ mage${mage-version}
diff --git a/Mage.Player.AI/pom.xml b/Mage.Player.AI/pom.xml
index 5ab0d5afd3..81dcb8008e 100644
--- a/Mage.Player.AI/pom.xml
+++ b/Mage.Player.AI/pom.xml
@@ -10,7 +10,7 @@
org.mage
- Mage-Player-AI
+ mage-player-aijar0.3Mage Player AI
@@ -19,7 +19,7 @@
org.mage
- Mage
+ mage${mage-version}
diff --git a/Mage.Player.AIMinimax/pom.xml b/Mage.Player.AIMinimax/pom.xml
index cde93ea5b5..6f5cb62cbc 100644
--- a/Mage.Player.AIMinimax/pom.xml
+++ b/Mage.Player.AIMinimax/pom.xml
@@ -19,12 +19,12 @@
org.mage
- Mage
+ mage${mage-version}org.mage
- Mage-Player-AI
+ mage-player-ai${mage-version}
diff --git a/Mage.Player.Human/pom.xml b/Mage.Player.Human/pom.xml
index 036f128d42..c07ddf8a19 100644
--- a/Mage.Player.Human/pom.xml
+++ b/Mage.Player.Human/pom.xml
@@ -10,7 +10,7 @@
org.mage
- Mage-Player-Human
+ mage-player-humanjar0.3Mage Player Human
@@ -19,7 +19,7 @@
org.mage
- Mage
+ mage${mage-version}
diff --git a/Mage.Player.Human/src/mage/player/human/HumanPlayer.java b/Mage.Player.Human/src/mage/player/human/HumanPlayer.java
index fef17f5a08..8d83ec452a 100644
--- a/Mage.Player.Human/src/mage/player/human/HumanPlayer.java
+++ b/Mage.Player.Human/src/mage/player/human/HumanPlayer.java
@@ -49,7 +49,6 @@ import mage.abilities.SpecialAction;
import mage.abilities.costs.mana.ManaCost;
import mage.abilities.costs.mana.VariableManaCost;
import mage.cards.decks.Deck;
-import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreatureForCombat;
import mage.game.Game;
import mage.game.permanent.Permanent;
@@ -57,7 +56,6 @@ import mage.target.Target;
import mage.target.TargetAmount;
import mage.target.TargetCard;
import mage.target.common.TargetAttackingCreature;
-import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetCreatureOrPlayer;
import mage.target.common.TargetCreaturePermanent;
import mage.target.common.TargetDefender;
diff --git a/Mage.Server/plugins/Mage.Deck.Constructed.jar b/Mage.Server/plugins/Mage.Deck.Constructed.jar
index 0bea6094ff..ad8eba7fad 100644
Binary files a/Mage.Server/plugins/Mage.Deck.Constructed.jar and b/Mage.Server/plugins/Mage.Deck.Constructed.jar differ
diff --git a/Mage.Server/plugins/Mage.Game.FreeForAll.jar b/Mage.Server/plugins/Mage.Game.FreeForAll.jar
index 7636603995..f84713aaef 100644
Binary files a/Mage.Server/plugins/Mage.Game.FreeForAll.jar and b/Mage.Server/plugins/Mage.Game.FreeForAll.jar differ
diff --git a/Mage.Server/plugins/Mage.Game.TwoPlayerDuel.jar b/Mage.Server/plugins/Mage.Game.TwoPlayerDuel.jar
index d5467172b8..86e862c83f 100644
Binary files a/Mage.Server/plugins/Mage.Game.TwoPlayerDuel.jar and b/Mage.Server/plugins/Mage.Game.TwoPlayerDuel.jar differ
diff --git a/Mage.Server/plugins/Mage.Player.AI.jar b/Mage.Server/plugins/Mage.Player.AI.jar
index 7d2a7fc0c5..2b661864da 100644
Binary files a/Mage.Server/plugins/Mage.Player.AI.jar and b/Mage.Server/plugins/Mage.Player.AI.jar differ
diff --git a/Mage.Server/plugins/Mage.Player.AIMinimax.jar b/Mage.Server/plugins/Mage.Player.AIMinimax.jar
index a53ae38f7c..a0e4067c57 100644
Binary files a/Mage.Server/plugins/Mage.Player.AIMinimax.jar and b/Mage.Server/plugins/Mage.Player.AIMinimax.jar differ
diff --git a/Mage.Server/plugins/Mage.Player.Human.jar b/Mage.Server/plugins/Mage.Player.Human.jar
index 114f816b19..e7c0f02332 100644
Binary files a/Mage.Server/plugins/Mage.Player.Human.jar and b/Mage.Server/plugins/Mage.Player.Human.jar differ
diff --git a/Mage.Server/pom.xml b/Mage.Server/pom.xml
index 9de844eff5..010c358530 100644
--- a/Mage.Server/pom.xml
+++ b/Mage.Server/pom.xml
@@ -10,7 +10,7 @@
org.mage
- Mage-Server
+ mage-serverjar0.3Mage Server
@@ -19,17 +19,17 @@
org.mage
- Mage
+ mage${mage-version}org.mage
- Mage-Common
+ mage-common${mage-version}org.mage
- Mage-Sets
+ mage-sets${mage-version}runtime
diff --git a/Mage.Server/src/mage/server/game/GameController.java b/Mage.Server/src/mage/server/game/GameController.java
index c6f9e394f1..fe6ddc48d4 100644
--- a/Mage.Server/src/mage/server/game/GameController.java
+++ b/Mage.Server/src/mage/server/game/GameController.java
@@ -38,6 +38,7 @@ import java.util.Map.Entry;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
+import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -57,6 +58,7 @@ import mage.game.events.TableEvent;
import mage.players.Player;
import mage.server.ChatManager;
import mage.server.util.ThreadExecutor;
+import mage.sets.Sets;
import mage.util.Logging;
import mage.view.AbilityPickerView;
import mage.view.CardsView;
@@ -71,6 +73,7 @@ public class GameController implements GameCallback {
private static ExecutorService gameExecutor = ThreadExecutor.getInstance().getGameExecutor();
private final static Logger logger = Logging.getLogger(GameController.class.getName());
+ public static final String INIT_FILE_PATH = "config" + File.separator + "init.txt";
private ConcurrentHashMap gameSessions = new ConcurrentHashMap();
private ConcurrentHashMap watchers = new ConcurrentHashMap();
@@ -392,64 +395,64 @@ public class GameController implements GameCallback {
*/
private void addCardsForTesting(Game game, Player player) {
try {
- File f = new File(Constants.INIT_FILE_PATH);
+ File f = new File(INIT_FILE_PATH);
Pattern pattern = Pattern.compile("([a-zA-Z]*):([\\w]*):([a-zA-Z ,.!\\d]*):([\\d]*)");
if (!f.exists()) {
- //TODO: log warning with Logger
- System.err.println("WARN! Couldn't find init file: " + Constants.INIT_FILE_PATH);
+ logger.warning("Couldn't find init file: " + INIT_FILE_PATH);
return;
}
- System.err.println("Parsing init.txt for player : " + player.getName());
+ logger.info("Parsing init.txt for player : " + player.getName());
Scanner scanner = new Scanner(f);
- while (scanner.hasNextLine()) {
- String line = scanner.nextLine().trim();
- if (line.startsWith("#")) continue;
- Matcher m = pattern.matcher(line);
- if (m.matches()) {
-
- String zone = m.group(1);
- String nickname = m.group(2);
-
- if (nickname.equals(player.getName())) {
- Zone gameZone;
- if ("hand".equalsIgnoreCase(zone)) {
- gameZone = Zone.HAND;
- } else if ("battlefield".equalsIgnoreCase(zone)) {
- gameZone = Zone.BATTLEFIELD;
- } else if ("graveyard".equalsIgnoreCase(zone)) {
- gameZone = Zone.GRAVEYARD;
- } else {
- continue; // go parse next line
- }
-
- String cardName = m.group(3);
- Integer amount = Integer.parseInt(m.group(4));
- for (int i = 0; i < amount; i++) {
- Card card = CardImpl.createCard(cardName);
- if (card != null) {
- Set cards = new HashSet();
- cards.add(card);
- game.loadCards(cards, player.getId());
- swapWithAnyCard(game, player, card, gameZone);
+ try {
+ while (scanner.hasNextLine()) {
+ String line = scanner.nextLine().trim();
+ if (line.startsWith("#")) continue;
+ Matcher m = pattern.matcher(line);
+ if (m.matches()) {
+
+ String zone = m.group(1);
+ String nickname = m.group(2);
+
+ if (nickname.equals(player.getName())) {
+ Zone gameZone;
+ if ("hand".equalsIgnoreCase(zone)) {
+ gameZone = Zone.HAND;
+ } else if ("battlefield".equalsIgnoreCase(zone)) {
+ gameZone = Zone.BATTLEFIELD;
+ } else if ("graveyard".equalsIgnoreCase(zone)) {
+ gameZone = Zone.GRAVEYARD;
} else {
- //TODO: log warning with Logger
- System.err.println("ERROR! Couldn't create a card: " + cardName);
+ continue; // go parse next line
}
+
+ String cardName = m.group(3);
+ Integer amount = Integer.parseInt(m.group(4));
+ for (int i = 0; i < amount; i++) {
+ Card card = CardImpl.createCard(Sets.findCard(cardName));
+ if (card != null) {
+ Set cards = new HashSet();
+ cards.add(card);
+ game.loadCards(cards, player.getId());
+ swapWithAnyCard(game, player, card, gameZone);
+ } else {
+ logger.severe("Couldn't create a card: " + cardName);
+ }
+ }
+ } else {
+ logger.warning("Was skipped: " + line);
}
} else {
- //TODO: log warning with Logger
- System.err.println("WARN! Was skipped: " + line);
+ logger.warning("Init string wasn't parsed: " + line);
}
- } else {
- //TODO: log warning with Logger
- System.err.println("WARN! Init string wasn't parsed: " + line);
}
}
+ finally {
+ scanner.close();
+ }
} catch (Exception e) {
- //TODO: add logger
- e.printStackTrace();
+ logger.log(Level.SEVERE, "", e);
}
}
@@ -465,6 +468,6 @@ public class GameController implements GameCallback {
} else {
card.moveToZone(zone, game, false);
}
- System.out.println("Added card to player's " + zone.toString() + ": " + card.getName() +", player = " + player.getName());
+ logger.info("Added card to player's " + zone.toString() + ": " + card.getName() +", player = " + player.getName());
}
}
diff --git a/Mage.Sets/pom.xml b/Mage.Sets/pom.xml
index 6cd958bfc6..7f94097a0a 100644
--- a/Mage.Sets/pom.xml
+++ b/Mage.Sets/pom.xml
@@ -10,7 +10,7 @@
org.mage
- Mage-Sets
+ mage-setsjar0.3Mage Sets
@@ -19,7 +19,7 @@
org.mage
- Mage
+ mage${mage-version}
diff --git a/Mage.Sets/src/mage/sets/Sets.java b/Mage.Sets/src/mage/sets/Sets.java
index 171f150f29..202e7d6cd8 100644
--- a/Mage.Sets/src/mage/sets/Sets.java
+++ b/Mage.Sets/src/mage/sets/Sets.java
@@ -72,4 +72,13 @@ public class Sets extends HashMap {
return names;
}
+ public static String findCard(String name) {
+ for (ExpansionSet set: fINSTANCE.values()) {
+ for (Card card: set.createCards()) {
+ if (name.equals(card.getName()))
+ return card.getClass().getCanonicalName();
+ }
+ }
+ return null;
+ }
}
diff --git a/Mage.Sets/src/mage/sets/magic2010/Duress.java b/Mage.Sets/src/mage/sets/magic2010/Duress.java
index a2e92f049a..3ca664d315 100644
--- a/Mage.Sets/src/mage/sets/magic2010/Duress.java
+++ b/Mage.Sets/src/mage/sets/magic2010/Duress.java
@@ -103,7 +103,7 @@ class DuressEffect extends OneShotEffect {
if (you.chooseTarget(player.getHand(), target, source, game)) {
Card card = player.getHand().get(target.getFirstTarget(), game);
if (card != null) {
- return player.discard(card, game);
+ return player.discard(card, source, game);
}
}
}
diff --git a/Mage.Sets/src/mage/sets/magic2010/Fireball.java b/Mage.Sets/src/mage/sets/magic2010/Fireball.java
index 44cbe0fbe8..71d461830f 100644
--- a/Mage.Sets/src/mage/sets/magic2010/Fireball.java
+++ b/Mage.Sets/src/mage/sets/magic2010/Fireball.java
@@ -57,7 +57,7 @@ public class Fireball extends CardImpl {
@Override
public void adjustCosts(Ability ability, Game game) {
- int numTargets = ability.getTargets().get(0).getNumberOfTargets();
+ int numTargets = ability.getTargets().get(0).getTargets().size();
if (numTargets > 1) {
ability.getManaCosts().add(new GenericManaCost(numTargets - 1));
}
@@ -90,23 +90,25 @@ class FireballEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
- int numTargets = source.getTargets().get(0).getNumberOfTargets();
+ int numTargets = source.getTargets().get(0).getTargets().size();
int damage = source.getManaCosts().getVariableCosts().get(0).getAmount();
- int damagePer = damage/numTargets;
- if (damagePer > 0) {
- for (UUID targetId: source.getTargets().get(0).getTargets()) {
- Permanent permanent = game.getPermanent(targetId);
- if (permanent != null) {
- permanent.damage(damagePer, source.getSourceId(), game, true);
- }
- else {
- Player player = game.getPlayer(targetId);
- if (player != null) {
- player.damage(damagePer, source.getSourceId(), game, false, true);
+ if (numTargets > 0) {
+ int damagePer = damage/numTargets;
+ if (damagePer > 0) {
+ for (UUID targetId: source.getTargets().get(0).getTargets()) {
+ Permanent permanent = game.getPermanent(targetId);
+ if (permanent != null) {
+ permanent.damage(damagePer, source.getSourceId(), game, true);
+ }
+ else {
+ Player player = game.getPlayer(targetId);
+ if (player != null) {
+ player.damage(damagePer, source.getSourceId(), game, false, true);
+ }
}
}
+ return true;
}
- return true;
}
return false;
}
diff --git a/Mage.Sets/src/mage/sets/magic2010/PalaceGuard.java b/Mage.Sets/src/mage/sets/magic2010/PalaceGuard.java
new file mode 100644
index 0000000000..2a70a97f85
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/magic2010/PalaceGuard.java
@@ -0,0 +1,124 @@
+/*
+ * 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.sets.magic2010;
+
+import java.util.UUID;
+import mage.Constants.CardType;
+import mage.Constants.Duration;
+import mage.Constants.Layer;
+import mage.Constants.Outcome;
+import mage.Constants.Rarity;
+import mage.Constants.SubLayer;
+import mage.Constants.Zone;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.effects.ContinuousEffectImpl;
+import mage.cards.CardImpl;
+import mage.game.Game;
+import mage.game.permanent.Permanent;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class PalaceGuard extends CardImpl {
+
+ public PalaceGuard(UUID ownerId) {
+ super(ownerId, "Palace Guard", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W}");
+ this.expansionSetCode = "M10";
+ this.subtype.add("Human");
+ this.subtype.add("Soldier");
+ this.color.setWhite(true);
+ this.power = new MageInt(1);
+ this.toughness = new MageInt(4);
+
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PalaceGuardEffect()));
+ }
+
+ public PalaceGuard(final PalaceGuard card) {
+ super(card);
+ }
+
+ @Override
+ public PalaceGuard copy() {
+ return new PalaceGuard(this);
+ }
+
+ @Override
+ public String getArt() {
+ return "121617_typ_reg_sty_010.jpg";
+ }
+
+ class PalaceGuardEffect extends ContinuousEffectImpl {
+
+ public PalaceGuardEffect() {
+ super(Duration.WhileOnBattlefield, Outcome.Benefit);
+ }
+
+ public PalaceGuardEffect(final PalaceGuardEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public PalaceGuardEffect copy() {
+ return new PalaceGuardEffect(this);
+ }
+
+ @Override
+ public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
+ Permanent perm = game.getPermanent(source.getSourceId());
+ if (perm != null) {
+ switch (layer) {
+ case RulesEffects:
+ perm.setMaxBlocks(0);
+ break;
+ }
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ return false;
+ }
+
+ @Override
+ public boolean hasLayer(Layer layer) {
+ return layer == Layer.RulesEffects;
+ }
+
+ @Override
+ public String getText(Ability source) {
+ return "Palace Guard can block any number of creatures";
+ }
+ }
+}
+
diff --git a/Mage.Sets/src/mage/sets/magic2010/Plains1.java b/Mage.Sets/src/mage/sets/magic2010/Plains1.java
new file mode 100644
index 0000000000..93896025c9
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/magic2010/Plains1.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sets.magic2010;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class Plains1 extends mage.cards.basiclands.Plains {
+
+ public Plains1(UUID ownerId) {
+ super(ownerId);
+ this.expansionSetCode = "M10";
+ }
+
+ @Override
+ public String getArt() {
+ return "33222_typ_reg_sty_010.jpg";
+ }
+
+ public Plains1(final Plains1 card) {
+ super(card);
+ }
+
+ @Override
+ public Plains1 copy() {
+ return new Plains1(this);
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/magic2010/Plains2.java b/Mage.Sets/src/mage/sets/magic2010/Plains2.java
new file mode 100644
index 0000000000..9360314f50
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/magic2010/Plains2.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sets.magic2010;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class Plains2 extends mage.cards.basiclands.Plains {
+
+ public Plains2(UUID ownerId) {
+ super(ownerId);
+ this.expansionSetCode = "M10";
+ }
+
+ @Override
+ public String getArt() {
+ return "121682_typ_reg_sty_010.jpg";
+ }
+
+ public Plains2(final Plains2 card) {
+ super(card);
+ }
+
+ @Override
+ public Plains2 copy() {
+ return new Plains2(this);
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/magic2010/Plains3.java b/Mage.Sets/src/mage/sets/magic2010/Plains3.java
new file mode 100644
index 0000000000..be8e744445
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/magic2010/Plains3.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sets.magic2010;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class Plains3 extends mage.cards.basiclands.Plains {
+
+ public Plains3(UUID ownerId) {
+ super(ownerId);
+ this.expansionSetCode = "M10";
+ }
+
+ @Override
+ public String getArt() {
+ return "121696_typ_reg_sty_010.jpg";
+ }
+
+ public Plains3(final Plains3 card) {
+ super(card);
+ }
+
+ @Override
+ public Plains3 copy() {
+ return new Plains3(this);
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/magic2010/Plains4.java b/Mage.Sets/src/mage/sets/magic2010/Plains4.java
new file mode 100644
index 0000000000..d815dcca60
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/magic2010/Plains4.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sets.magic2010;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class Plains4 extends mage.cards.basiclands.Plains {
+
+ public Plains4(UUID ownerId) {
+ super(ownerId);
+ this.expansionSetCode = "M10";
+ }
+
+ @Override
+ public String getArt() {
+ return "33224_typ_reg_sty_010.jpg";
+ }
+
+ public Plains4(final Plains4 card) {
+ super(card);
+ }
+
+ @Override
+ public Plains4 copy() {
+ return new Plains4(this);
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/magic2011/Fling.java b/Mage.Sets/src/mage/sets/magic2011/Fling.java
index 1dcfc1af25..a6fd31dcb2 100644
--- a/Mage.Sets/src/mage/sets/magic2011/Fling.java
+++ b/Mage.Sets/src/mage/sets/magic2011/Fling.java
@@ -40,6 +40,7 @@ import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
+import mage.players.Player;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetControlledPermanent;
import mage.target.common.TargetCreatureOrPlayer;
@@ -99,6 +100,11 @@ class FlingEffect extends OneShotEffect {
permanent.damage(amount, source.getSourceId(), game, true);
return true;
}
+ Player player = game.getPlayer(source.getFirstTarget());
+ if (player != null) {
+ player.damage(amount, source.getSourceId(), game, false, true);
+ return true;
+ }
}
return false;
}
diff --git a/Mage.Sets/src/mage/sets/magic2011/LilianasSpecter.java b/Mage.Sets/src/mage/sets/magic2011/LilianasSpecter.java
index 24e6ced5ef..98039413c7 100644
--- a/Mage.Sets/src/mage/sets/magic2011/LilianasSpecter.java
+++ b/Mage.Sets/src/mage/sets/magic2011/LilianasSpecter.java
@@ -89,7 +89,7 @@ class LilianasSpecterEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
for (UUID playerId: game.getOpponents(source.getControllerId())) {
Player player = game.getPlayer(playerId);
- player.discard(1, game);
+ player.discard(1, source, game);
}
return true;
}
diff --git a/Mage.Sets/src/mage/sets/magic2011/ObstinateBaloth.java b/Mage.Sets/src/mage/sets/magic2011/ObstinateBaloth.java
new file mode 100644
index 0000000000..17a076a1ff
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/magic2011/ObstinateBaloth.java
@@ -0,0 +1,137 @@
+/*
+ * 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.sets.magic2011;
+
+import java.util.UUID;
+import mage.Constants.CardType;
+import mage.Constants.Duration;
+import mage.Constants.Outcome;
+import mage.Constants.Rarity;
+import mage.Constants.Zone;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.common.EntersBattlefieldTriggeredAbility;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.effects.ReplacementEffectImpl;
+import mage.abilities.effects.common.GainLifeEffect;
+import mage.cards.Card;
+import mage.cards.CardImpl;
+import mage.game.Game;
+import mage.game.events.GameEvent;
+import mage.game.events.GameEvent.EventType;
+import mage.game.events.ZoneChangeEvent;
+import mage.game.stack.StackObject;
+import mage.players.Player;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class ObstinateBaloth extends CardImpl {
+
+ public ObstinateBaloth(UUID ownerId) {
+ super(ownerId, "Obstinate Baloth", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{G}{G}");
+ this.expansionSetCode = "M11";
+ this.subtype.add("Beast");
+ this.color.setGreen(true);
+ this.power = new MageInt(4);
+ this.toughness = new MageInt(4);
+
+ this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(4), false));
+ this.addAbility(new SimpleStaticAbility(Zone.HAND, new ObstinateBalothEffect()));
+ }
+
+ public ObstinateBaloth(final ObstinateBaloth card) {
+ super(card);
+ }
+
+ @Override
+ public ObstinateBaloth copy() {
+ return new ObstinateBaloth(this);
+ }
+
+ @Override
+ public String getArt() {
+ return "129158_typ_reg_sty_010.jpg";
+ }
+
+}
+
+class ObstinateBalothEffect extends ReplacementEffectImpl {
+
+ public ObstinateBalothEffect() {
+ super(Duration.EndOfGame, Outcome.PutCardInPlay);
+ }
+
+ public ObstinateBalothEffect(final ObstinateBalothEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public ObstinateBalothEffect copy() {
+ return new ObstinateBalothEffect(this);
+ }
+
+ @Override
+ public boolean applies(GameEvent event, Ability source, Game game) {
+ if (event.getType() == EventType.DISCARD_CARD && event.getTargetId().equals(source.getSourceId())) {
+ StackObject spell = game.getStack().getStackObject(event.getSourceId());
+ if (spell != null && game.getOpponents(source.getControllerId()).contains(spell.getControllerId())) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Card card = game.getCard(source.getSourceId());
+ if (card != null) {
+ Player player = game.getPlayer(card.getOwnerId());
+ if (player != null) {
+ player.removeFromHand(card, game);
+ if (card.putOntoBattlefield(game, Zone.HAND, player.getId())) {
+ game.fireEvent(GameEvent.getEvent(GameEvent.EventType.DISCARDED_CARD, card.getId(), source.getId(), player.getId()));
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public boolean replaceEvent(GameEvent event, Ability source, Game game) {
+ return apply(game, source);
+ }
+
+ @Override
+ public String getText(Ability source) {
+ return "If a spell or ability an opponent controls causes you to discard Obstinate Baloth, put it onto the battlefield instead of putting it into your graveyard";
+ }
+}
\ No newline at end of file
diff --git a/Mage.Sets/src/mage/sets/magic2011/PalaceGuard.java b/Mage.Sets/src/mage/sets/magic2011/PalaceGuard.java
new file mode 100644
index 0000000000..a975093be6
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/magic2011/PalaceGuard.java
@@ -0,0 +1,53 @@
+/*
+ * 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.sets.magic2011;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class PalaceGuard extends mage.sets.magic2010.PalaceGuard {
+
+ public PalaceGuard(UUID ownerId) {
+ super(ownerId);
+ this.expansionSetCode = "M11";
+ }
+
+ public PalaceGuard(final PalaceGuard card) {
+ super(card);
+ }
+
+ @Override
+ public PalaceGuard copy() {
+ return new PalaceGuard(this);
+ }
+
+}
\ No newline at end of file
diff --git a/Mage.Sets/src/mage/sets/magic2011/PhantomBeast.java b/Mage.Sets/src/mage/sets/magic2011/PhantomBeast.java
new file mode 100644
index 0000000000..ed409143cb
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/magic2011/PhantomBeast.java
@@ -0,0 +1,110 @@
+/*
+ * 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.sets.magic2011;
+
+import java.util.UUID;
+import mage.Constants.CardType;
+import mage.Constants.Rarity;
+import mage.Constants.Zone;
+import mage.MageInt;
+import mage.abilities.TriggeredAbilityImpl;
+import mage.abilities.effects.common.SacrificeSourceEffect;
+import mage.cards.CardImpl;
+import mage.game.Game;
+import mage.game.events.GameEvent;
+import mage.game.events.GameEvent.EventType;
+import mage.game.permanent.Permanent;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class PhantomBeast extends CardImpl {
+
+ public PhantomBeast(UUID ownerId) {
+ super(ownerId, "Phantom Beast", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{U}");
+ this.expansionSetCode = "M11";
+ this.subtype.add("Illusion");
+ this.subtype.add("Beast");
+ this.color.setBlue(true);
+ this.power = new MageInt(4);
+ this.toughness = new MageInt(5);
+
+ this.addAbility(new PhantomBeastAbility());
+ }
+
+ public PhantomBeast(final PhantomBeast card) {
+ super(card);
+ }
+
+ @Override
+ public PhantomBeast copy() {
+ return new PhantomBeast(this);
+ }
+
+ @Override
+ public String getArt() {
+ return "129107_typ_reg_sty_010.jpg";
+ }
+
+ class PhantomBeastAbility extends TriggeredAbilityImpl {
+
+ public PhantomBeastAbility() {
+ super(Zone.BATTLEFIELD, new SacrificeSourceEffect());
+ }
+
+ public PhantomBeastAbility(final PhantomBeastAbility ability) {
+ super(ability);
+ }
+
+ @Override
+ public PhantomBeastAbility copy() {
+ return new PhantomBeastAbility(this);
+ }
+
+ @Override
+ public boolean checkTrigger(GameEvent event, Game game) {
+ Permanent perm = game.getPermanent(sourceId);
+ if (perm != null) {
+ if (event.getTargetId().equals(perm.getId()) && event.getType() == EventType.TARGETED) {
+ trigger(game, event.getPlayerId());
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public String getRule() {
+ return "When Phantom Beast becomes the target of a spell or ability, sacrifice it";
+ }
+
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/magic2011/PhylacteryLich.java b/Mage.Sets/src/mage/sets/magic2011/PhylacteryLich.java
new file mode 100644
index 0000000000..b94b447f71
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/magic2011/PhylacteryLich.java
@@ -0,0 +1,123 @@
+/*
+ * 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.sets.magic2011;
+
+import java.util.UUID;
+import mage.Constants.CardType;
+import mage.Constants.Rarity;
+import mage.Constants.Zone;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.StateTriggeredAbility;
+import mage.abilities.common.EntersBattlefieldTriggeredAbility;
+import mage.abilities.effects.common.AddCountersTargetEffect;
+import mage.abilities.effects.common.SacrificeSourceEffect;
+import mage.abilities.keyword.IndestructibleAbility;
+import mage.cards.CardImpl;
+import mage.filter.Filter.ComparisonScope;
+import mage.filter.common.FilterControlledPermanent;
+import mage.game.Game;
+import mage.game.events.GameEvent;
+import mage.game.permanent.Permanent;
+import mage.target.common.TargetControlledPermanent;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class PhylacteryLich extends CardImpl {
+
+ private static FilterControlledPermanent filter = new FilterControlledPermanent("artifact");
+
+ static {
+ filter.getCardType().add(CardType.ARTIFACT);
+ filter.setScopeCardType(ComparisonScope.Any);
+ }
+
+ public PhylacteryLich(UUID ownerId) {
+ super(ownerId, "Phylactery Lich", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{B}{B}{B}");
+ this.expansionSetCode = "M11";
+ this.subtype.add("Zombie");
+ this.color.setBlack(true);
+ this.power = new MageInt(5);
+ this.toughness = new MageInt(5);
+
+ Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect("phylactery", 1), false);
+ ability.addTarget(new TargetControlledPermanent(filter));
+ this.addAbility(ability);
+ this.addAbility(IndestructibleAbility.getInstance());
+ this.addAbility(new PhylacteryLichAbility());
+ }
+
+ public PhylacteryLich(final PhylacteryLich card) {
+ super(card);
+ }
+
+ @Override
+ public PhylacteryLich copy() {
+ return new PhylacteryLich(this);
+ }
+
+ @Override
+ public String getArt() {
+ return "129123_typ_reg_sty_010.jpg";
+ }
+
+ class PhylacteryLichAbility extends StateTriggeredAbility {
+
+ public PhylacteryLichAbility() {
+ super(Zone.BATTLEFIELD, new SacrificeSourceEffect());
+ }
+
+ public PhylacteryLichAbility(final PhylacteryLichAbility ability) {
+ super(ability);
+ }
+
+ @Override
+ public PhylacteryLichAbility copy() {
+ return new PhylacteryLichAbility(this);
+ }
+
+ @Override
+ public boolean checkTrigger(GameEvent event, Game game) {
+ for (Permanent perm: game.getBattlefield().getAllActivePermanents(controllerId)) {
+ if (perm.getCounters().getCount("phylactery") > 0)
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public String getRule() {
+ return "When you control no permanents with phylactery counters on them, sacrifice Phylactery Lich.";
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/Mage.Sets/src/mage/sets/magic2011/Plains1.java b/Mage.Sets/src/mage/sets/magic2011/Plains1.java
new file mode 100644
index 0000000000..ed95eabdf6
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/magic2011/Plains1.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sets.magic2011;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class Plains1 extends mage.cards.basiclands.Plains {
+
+ public Plains1(UUID ownerId) {
+ super(ownerId);
+ this.expansionSetCode = "M11";
+ }
+
+ @Override
+ public String getArt() {
+ return "121696_typ_reg_sty_010.jpg";
+ }
+
+ public Plains1(final Plains1 card) {
+ super(card);
+ }
+
+ @Override
+ public Plains1 copy() {
+ return new Plains1(this);
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/magic2011/Plains2.java b/Mage.Sets/src/mage/sets/magic2011/Plains2.java
new file mode 100644
index 0000000000..34420da865
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/magic2011/Plains2.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sets.magic2011;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class Plains2 extends mage.cards.basiclands.Plains {
+
+ public Plains2(UUID ownerId) {
+ super(ownerId);
+ this.expansionSetCode = "M11";
+ }
+
+ @Override
+ public String getArt() {
+ return "121682_typ_reg_sty_010.jpg";
+ }
+
+ public Plains2(final Plains2 card) {
+ super(card);
+ }
+
+ @Override
+ public Plains2 copy() {
+ return new Plains2(this);
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/magic2011/Plains3.java b/Mage.Sets/src/mage/sets/magic2011/Plains3.java
new file mode 100644
index 0000000000..0f918d236e
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/magic2011/Plains3.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sets.magic2011;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class Plains3 extends mage.cards.basiclands.Plains {
+
+ public Plains3(UUID ownerId) {
+ super(ownerId);
+ this.expansionSetCode = "M11";
+ }
+
+ @Override
+ public String getArt() {
+ return "106213_typ_reg_sty_010.jpg";
+ }
+
+ public Plains3(final Plains3 card) {
+ super(card);
+ }
+
+ @Override
+ public Plains3 copy() {
+ return new Plains3(this);
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/magic2011/Plains4.java b/Mage.Sets/src/mage/sets/magic2011/Plains4.java
new file mode 100644
index 0000000000..5900cbea93
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/magic2011/Plains4.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sets.magic2011;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class Plains4 extends mage.cards.basiclands.Plains {
+
+ public Plains4(UUID ownerId) {
+ super(ownerId);
+ this.expansionSetCode = "M11";
+ }
+
+ @Override
+ public String getArt() {
+ return "25492_typ_reg_sty_010.jpg";
+ }
+
+ public Plains4(final Plains4 card) {
+ super(card);
+ }
+
+ @Override
+ public Plains4 copy() {
+ return new Plains4(this);
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/Plains1.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Plains1.java
new file mode 100644
index 0000000000..763ca136e6
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Plains1.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sets.riseoftheeldrazi;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class Plains1 extends mage.cards.basiclands.Plains {
+
+ public Plains1(UUID ownerId) {
+ super(ownerId);
+ this.expansionSetCode = "ROE";
+ }
+
+ @Override
+ public String getArt() {
+ return "127487_typ_reg_sty_010.jpg";
+ }
+
+ public Plains1(final Plains1 card) {
+ super(card);
+ }
+
+ @Override
+ public Plains1 copy() {
+ return new Plains1(this);
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/Plains2.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Plains2.java
new file mode 100644
index 0000000000..c5dc04537a
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Plains2.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sets.riseoftheeldrazi;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class Plains2 extends mage.cards.basiclands.Plains {
+
+ public Plains2(UUID ownerId) {
+ super(ownerId);
+ this.expansionSetCode = "ROE";
+ }
+
+ @Override
+ public String getArt() {
+ return "127490_typ_reg_sty_010.jpg";
+ }
+
+ public Plains2(final Plains2 card) {
+ super(card);
+ }
+
+ @Override
+ public Plains2 copy() {
+ return new Plains2(this);
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/Plains3.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Plains3.java
new file mode 100644
index 0000000000..7f70f40f13
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Plains3.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sets.riseoftheeldrazi;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class Plains3 extends mage.cards.basiclands.Plains {
+
+ public Plains3(UUID ownerId) {
+ super(ownerId);
+ this.expansionSetCode = "ROE";
+ }
+
+ @Override
+ public String getArt() {
+ return "127493_typ_reg_sty_010.jpg";
+ }
+
+ public Plains3(final Plains3 card) {
+ super(card);
+ }
+
+ @Override
+ public Plains3 copy() {
+ return new Plains3(this);
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/Plains4.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Plains4.java
new file mode 100644
index 0000000000..14af4d243e
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Plains4.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sets.riseoftheeldrazi;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class Plains4 extends mage.cards.basiclands.Plains {
+
+ public Plains4(UUID ownerId) {
+ super(ownerId);
+ this.expansionSetCode = "ROE";
+ }
+
+ @Override
+ public String getArt() {
+ return "127500_typ_reg_sty_010.jpg";
+ }
+
+ public Plains4(final Plains4 card) {
+ super(card);
+ }
+
+ @Override
+ public Plains4 copy() {
+ return new Plains4(this);
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/shardsofalara/Plains1.java b/Mage.Sets/src/mage/sets/shardsofalara/Plains1.java
new file mode 100644
index 0000000000..bcd9b32002
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/shardsofalara/Plains1.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sets.shardsofalara;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class Plains1 extends mage.cards.basiclands.Plains {
+
+ public Plains1(UUID ownerId) {
+ super(ownerId);
+ this.expansionSetCode = "ALA";
+ }
+
+ @Override
+ public String getArt() {
+ return "115087_typ_reg_sty_010.jpg";
+ }
+
+ public Plains1(final Plains1 card) {
+ super(card);
+ }
+
+ @Override
+ public Plains1 copy() {
+ return new Plains1(this);
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/shardsofalara/Plains2.java b/Mage.Sets/src/mage/sets/shardsofalara/Plains2.java
new file mode 100644
index 0000000000..e263e98e5a
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/shardsofalara/Plains2.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sets.shardsofalara;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class Plains2 extends mage.cards.basiclands.Plains {
+
+ public Plains2(UUID ownerId) {
+ super(ownerId);
+ this.expansionSetCode = "ALA";
+ }
+
+ @Override
+ public String getArt() {
+ return "115090_typ_reg_sty_010.jpg";
+ }
+
+ public Plains2(final Plains2 card) {
+ super(card);
+ }
+
+ @Override
+ public Plains2 copy() {
+ return new Plains2(this);
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/shardsofalara/Plains3.java b/Mage.Sets/src/mage/sets/shardsofalara/Plains3.java
new file mode 100644
index 0000000000..3891767e3d
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/shardsofalara/Plains3.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sets.shardsofalara;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class Plains3 extends mage.cards.basiclands.Plains {
+
+ public Plains3(UUID ownerId) {
+ super(ownerId);
+ this.expansionSetCode = "ALA";
+ }
+
+ @Override
+ public String getArt() {
+ return "115089_typ_reg_sty_010.jpg";
+ }
+
+ public Plains3(final Plains3 card) {
+ super(card);
+ }
+
+ @Override
+ public Plains3 copy() {
+ return new Plains3(this);
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/shardsofalara/Plains4.java b/Mage.Sets/src/mage/sets/shardsofalara/Plains4.java
new file mode 100644
index 0000000000..9789c92b16
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/shardsofalara/Plains4.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sets.shardsofalara;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class Plains4 extends mage.cards.basiclands.Plains {
+
+ public Plains4(UUID ownerId) {
+ super(ownerId);
+ this.expansionSetCode = "ALA";
+ }
+
+ @Override
+ public String getArt() {
+ return "115088_typ_reg_sty_010.jpg";
+ }
+
+ public Plains4(final Plains4 card) {
+ super(card);
+ }
+
+ @Override
+ public Plains4 copy() {
+ return new Plains4(this);
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/tenth/Plains1.java b/Mage.Sets/src/mage/sets/tenth/Plains1.java
index 61c49fdbef..c6f6ccbe2b 100644
--- a/Mage.Sets/src/mage/sets/tenth/Plains1.java
+++ b/Mage.Sets/src/mage/sets/tenth/Plains1.java
@@ -43,7 +43,7 @@ public class Plains1 extends mage.cards.basiclands.Plains {
@Override
public String getArt() {
- return "80949_typ_reg_sty_010.jpg";
+ return "08661_typ_reg_sty_010.jpg";
}
public Plains1(final Plains1 card) {
diff --git a/Mage.Sets/src/mage/sets/tenth/Plains2.java b/Mage.Sets/src/mage/sets/tenth/Plains2.java
new file mode 100644
index 0000000000..9da5f11619
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/tenth/Plains2.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sets.tenth;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class Plains2 extends mage.cards.basiclands.Plains {
+
+ public Plains2(UUID ownerId) {
+ super(ownerId);
+ this.expansionSetCode = "10E";
+ }
+
+ @Override
+ public String getArt() {
+ return "80949_typ_reg_sty_010.jpg";
+ }
+
+ public Plains2(final Plains2 card) {
+ super(card);
+ }
+
+ @Override
+ public Plains2 copy() {
+ return new Plains2(this);
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/tenth/Plains3.java b/Mage.Sets/src/mage/sets/tenth/Plains3.java
new file mode 100644
index 0000000000..c3dc761beb
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/tenth/Plains3.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sets.tenth;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class Plains3 extends mage.cards.basiclands.Plains {
+
+ public Plains3(UUID ownerId) {
+ super(ownerId);
+ this.expansionSetCode = "10E";
+ }
+
+ @Override
+ public String getArt() {
+ return "89178_typ_reg_sty_010.jpg";
+ }
+
+ public Plains3(final Plains3 card) {
+ super(card);
+ }
+
+ @Override
+ public Plains3 copy() {
+ return new Plains3(this);
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/tenth/Plains4.java b/Mage.Sets/src/mage/sets/tenth/Plains4.java
new file mode 100644
index 0000000000..a645105787
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/tenth/Plains4.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sets.tenth;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class Plains4 extends mage.cards.basiclands.Plains {
+
+ public Plains4(UUID ownerId) {
+ super(ownerId);
+ this.expansionSetCode = "10E";
+ }
+
+ @Override
+ public String getArt() {
+ return "25178_typ_reg_sty_010.jpg";
+ }
+
+ public Plains4(final Plains4 card) {
+ super(card);
+ }
+
+ @Override
+ public Plains4 copy() {
+ return new Plains4(this);
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/zendikar/Plains1.java b/Mage.Sets/src/mage/sets/zendikar/Plains1.java
new file mode 100644
index 0000000000..d0a9e9b643
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/zendikar/Plains1.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sets.zendikar;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class Plains1 extends mage.cards.basiclands.Plains {
+
+ public Plains1(UUID ownerId) {
+ super(ownerId);
+ this.expansionSetCode = "ZEN";
+ }
+
+ @Override
+ public String getArt() {
+ return "123755_typ_reg_sty_010.jpg";
+ }
+
+ public Plains1(final Plains1 card) {
+ super(card);
+ }
+
+ @Override
+ public Plains1 copy() {
+ return new Plains1(this);
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/zendikar/Plains2.java b/Mage.Sets/src/mage/sets/zendikar/Plains2.java
new file mode 100644
index 0000000000..796ac5a668
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/zendikar/Plains2.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sets.zendikar;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class Plains2 extends mage.cards.basiclands.Plains {
+
+ public Plains2(UUID ownerId) {
+ super(ownerId);
+ this.expansionSetCode = "ZEN";
+ }
+
+ @Override
+ public String getArt() {
+ return "123760_typ_reg_sty_010.jpg";
+ }
+
+ public Plains2(final Plains2 card) {
+ super(card);
+ }
+
+ @Override
+ public Plains2 copy() {
+ return new Plains2(this);
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/zendikar/Plains3.java b/Mage.Sets/src/mage/sets/zendikar/Plains3.java
new file mode 100644
index 0000000000..f49e3d7172
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/zendikar/Plains3.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sets.zendikar;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class Plains3 extends mage.cards.basiclands.Plains {
+
+ public Plains3(UUID ownerId) {
+ super(ownerId);
+ this.expansionSetCode = "ZEN";
+ }
+
+ @Override
+ public String getArt() {
+ return "123763_typ_reg_sty_010.jpg";
+ }
+
+ public Plains3(final Plains3 card) {
+ super(card);
+ }
+
+ @Override
+ public Plains3 copy() {
+ return new Plains3(this);
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/zendikar/Plains4.java b/Mage.Sets/src/mage/sets/zendikar/Plains4.java
new file mode 100644
index 0000000000..3dbb52f9ed
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/zendikar/Plains4.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sets.zendikar;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public class Plains4 extends mage.cards.basiclands.Plains {
+
+ public Plains4(UUID ownerId) {
+ super(ownerId);
+ this.expansionSetCode = "ZEN";
+ }
+
+ @Override
+ public String getArt() {
+ return "123770_typ_reg_sty_010.jpg";
+ }
+
+ public Plains4(final Plains4 card) {
+ super(card);
+ }
+
+ @Override
+ public Plains4 copy() {
+ return new Plains4(this);
+ }
+
+}
diff --git a/Mage/pom.xml b/Mage/pom.xml
index e0fa6842da..c86cd5fd25 100644
--- a/Mage/pom.xml
+++ b/Mage/pom.xml
@@ -10,10 +10,10 @@
org.mage
- Mage
+ magejar0.3
- Mage Framework
+ Mage Applicationhttp://maven.apache.org
diff --git a/Mage/src/mage/Constants.java b/Mage/src/mage/Constants.java
index 2751c05da8..ee6bf0e0d6 100644
--- a/Mage/src/mage/Constants.java
+++ b/Mage/src/mage/Constants.java
@@ -28,14 +28,11 @@
package mage;
-import java.io.File;
import java.util.ArrayList;
import java.util.List;
public final class Constants {
- public static final String INIT_FILE_PATH = "config" + File.separator + "init.txt";
-
public enum ColoredManaSymbol {
W("W"), U("U"), B("B"), R("R"), G("G");
diff --git a/Mage/src/mage/abilities/AbilityImpl.java b/Mage/src/mage/abilities/AbilityImpl.java
index 4aee829c45..4e467e712a 100644
--- a/Mage/src/mage/abilities/AbilityImpl.java
+++ b/Mage/src/mage/abilities/AbilityImpl.java
@@ -147,13 +147,13 @@ public abstract class AbilityImpl> implements Ability {
logger.fine("activate failed - target");
return false;
}
+ game.getObject(sourceId).adjustCosts(this, game);
if (!useAlternativeCost(game)) {
if (!manaCosts.pay(game, sourceId, controllerId, noMana)) {
logger.fine("activate failed - mana");
return false;
}
}
- game.getObject(sourceId).adjustCosts(this, game);
if (!costs.pay(game, sourceId, controllerId, noMana)) {
logger.fine("activate failed - non mana costs");
return false;
diff --git a/Mage/src/mage/abilities/StateTriggeredAbility.java b/Mage/src/mage/abilities/StateTriggeredAbility.java
new file mode 100644
index 0000000000..979cefeb78
--- /dev/null
+++ b/Mage/src/mage/abilities/StateTriggeredAbility.java
@@ -0,0 +1,72 @@
+/*
+ * 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.abilities;
+
+import java.util.UUID;
+import mage.Constants.Zone;
+import mage.abilities.effects.Effect;
+import mage.game.Game;
+
+/**
+ *
+ * @author BetaSteward_at_googlemail.com
+ */
+public abstract class StateTriggeredAbility> extends TriggeredAbilityImpl {
+
+ protected boolean triggered;
+
+ public StateTriggeredAbility(Zone zone, Effect effect) {
+ super(zone, effect);
+ }
+
+ public StateTriggeredAbility(final StateTriggeredAbility ability) {
+ super(ability);
+ this.triggered = ability.triggered;
+ }
+
+ @Override
+ public void trigger(Game game, UUID controllerId) {
+ //20100716 - 603.8
+ if (!triggered) {
+ triggered = true;
+ super.trigger(game, controllerId);
+ }
+ }
+
+ @Override
+ public boolean resolve(Game game) {
+ //20100716 - 603.8
+ triggered = false;
+ return super.resolve(game);
+ }
+
+ public void counter() {
+ triggered = false;
+ }
+}
diff --git a/Mage/src/mage/abilities/costs/common/DiscardSourceCost.java b/Mage/src/mage/abilities/costs/common/DiscardSourceCost.java
index cc99148d23..f75f9f2210 100644
--- a/Mage/src/mage/abilities/costs/common/DiscardSourceCost.java
+++ b/Mage/src/mage/abilities/costs/common/DiscardSourceCost.java
@@ -56,7 +56,7 @@ public class DiscardSourceCost extends CostImpl {
public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) {
Player player = game.getPlayer(controllerId);
Card card = player.getHand().get(sourceId, game);
- return player.discard(card, game);
+ return player.discard(card, null, game);
}
@Override
diff --git a/Mage/src/mage/abilities/costs/common/DiscardTargetCost.java b/Mage/src/mage/abilities/costs/common/DiscardTargetCost.java
index e0cbd151af..36e17b9b0e 100644
--- a/Mage/src/mage/abilities/costs/common/DiscardTargetCost.java
+++ b/Mage/src/mage/abilities/costs/common/DiscardTargetCost.java
@@ -60,7 +60,7 @@ public class DiscardTargetCost extends CostImpl {
Card card = player.getHand().get(targetId, game);
if (card == null)
return false;
- paid |= player.discard(card, game);
+ paid |= player.discard(card, null, game);
}
}
return paid;
diff --git a/Mage/src/mage/abilities/effects/common/GainProtectionFromColorTargetEOTEffect.java b/Mage/src/mage/abilities/effects/common/AddCountersTargetEffect.java
similarity index 62%
rename from Mage/src/mage/abilities/effects/common/GainProtectionFromColorTargetEOTEffect.java
rename to Mage/src/mage/abilities/effects/common/AddCountersTargetEffect.java
index 3842bf2837..683f01e09c 100644
--- a/Mage/src/mage/abilities/effects/common/GainProtectionFromColorTargetEOTEffect.java
+++ b/Mage/src/mage/abilities/effects/common/AddCountersTargetEffect.java
@@ -28,11 +28,10 @@
package mage.abilities.effects.common;
-import mage.Constants.Duration;
+import mage.Constants.Outcome;
import mage.abilities.Ability;
-import mage.abilities.keyword.ProtectionAbility;
-import mage.choices.ChoiceColor;
-import mage.filter.FilterCard;
+import mage.abilities.effects.OneShotEffect;
+import mage.counters.Counter;
import mage.game.Game;
import mage.game.permanent.Permanent;
@@ -40,42 +39,52 @@ import mage.game.permanent.Permanent;
*
* @author BetaSteward_at_googlemail.com
*/
-public class GainProtectionFromColorTargetEOTEffect extends GainAbilityTargetEffect {
+public class AddCountersTargetEffect extends OneShotEffect {
- FilterCard protectionFilter;
+ private int amount;
+ private String name;
- public GainProtectionFromColorTargetEOTEffect() {
- super(new ProtectionAbility(new FilterCard()), Duration.EndOfTurn);
- protectionFilter = (FilterCard)((ProtectionAbility)ability).getFilter();
- protectionFilter.setUseColor(true);
+ public AddCountersTargetEffect(String name, int amount) {
+ super(Outcome.Benefit);
+ this.name = name;
+ this.amount = amount;
}
- public GainProtectionFromColorTargetEOTEffect(final GainProtectionFromColorTargetEOTEffect effect) {
+ public AddCountersTargetEffect(final AddCountersTargetEffect effect) {
super(effect);
- this.protectionFilter = effect.protectionFilter.copy();
- }
-
- @Override
- public GainProtectionFromColorTargetEOTEffect copy() {
- return new GainProtectionFromColorTargetEOTEffect(this);
+ this.amount = effect.amount;
+ this.name = effect.name;
}
@Override
public boolean apply(Game game, Ability source) {
- ChoiceColor choice = (ChoiceColor) source.getChoices().get(0);
- protectionFilter.setColor(choice.getColor());
- protectionFilter.setMessage(choice.getChoice());
- Permanent creature = game.getPermanent(source.getFirstTarget());
- if (creature != null) {
- creature.addAbility(ability);
- return true;
+ Permanent permanent = game.getPermanent(source.getFirstTarget());
+ if (permanent != null) {
+ Counter counter = new Counter(name);
+ counter.add(amount);
+ permanent.getCounters().addCounter(counter);
}
- return false;
+ return true;
}
@Override
public String getText(Ability source) {
- return "target creature you control gains protection from the color of your choice until end of turn";
+ StringBuilder sb = new StringBuilder();
+ sb.append("put ");
+ if (amount > 1) {
+ sb.append(Integer.toString(amount)).append(" ").append(name).append(" counters on ");
+ }
+ else {
+ sb.append("a ").append(name).append(" counter on ");
+ }
+ sb.append(source.getTargets().get(0).getTargetName());
+ return sb.toString();
}
+ @Override
+ public AddCountersTargetEffect copy() {
+ return new AddCountersTargetEffect(this);
+ }
+
+
}
diff --git a/Mage/src/mage/abilities/effects/common/DiscardTargetEffect.java b/Mage/src/mage/abilities/effects/common/DiscardTargetEffect.java
index d08b3d5eb4..73fa00bd65 100644
--- a/Mage/src/mage/abilities/effects/common/DiscardTargetEffect.java
+++ b/Mage/src/mage/abilities/effects/common/DiscardTargetEffect.java
@@ -61,7 +61,7 @@ public class DiscardTargetEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getFirstTarget());
if (player != null) {
- player.discard(amount, game);
+ player.discard(amount, source, game);
return true;
}
return false;
diff --git a/Mage/src/mage/abilities/effects/common/GainControlTargetEOTEffect.java b/Mage/src/mage/abilities/effects/common/GainControlTargetEOTEffect.java
deleted file mode 100644
index 27eac7b905..0000000000
--- a/Mage/src/mage/abilities/effects/common/GainControlTargetEOTEffect.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-* 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.abilities.effects.common;
-
-import mage.Constants.Duration;
-import mage.Constants.Layer;
-import mage.Constants.Outcome;
-import mage.Constants.SubLayer;
-import mage.abilities.Ability;
-import mage.abilities.effects.ContinuousEffectImpl;
-import mage.game.Game;
-import mage.game.permanent.Permanent;
-
-/**
- *
- * @author BetaSteward_at_googlemail.com
- */
-public class GainControlTargetEOTEffect extends ContinuousEffectImpl {
-
- public GainControlTargetEOTEffect() {
- super(Duration.EndOfTurn, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl);
- }
-
- public GainControlTargetEOTEffect(final GainControlTargetEOTEffect effect) {
- super(effect);
- }
-
- @Override
- public GainControlTargetEOTEffect copy() {
- return new GainControlTargetEOTEffect(this);
- }
-
- @Override
- public boolean apply(Game game, Ability source) {
- Permanent permanent = game.getPermanent(source.getFirstTarget());
- if (permanent != null) {
- return permanent.changeControllerId(source.getControllerId(), game);
- }
- return false;
- }
-
- @Override
- public String getText(Ability source) {
- return "Gain control of target " + source.getTargets().get(0).getTargetName() + " until end of turn";
- }
-}
diff --git a/Mage/src/mage/abilities/mana/BasicLandManaAbility.java b/Mage/src/mage/abilities/mana/BasicLandManaAbility.java
deleted file mode 100644
index c971545da7..0000000000
--- a/Mage/src/mage/abilities/mana/BasicLandManaAbility.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-* 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.abilities.mana;
-
-import mage.Constants.Zone;
-import mage.abilities.costs.common.TapSourceCost;
-import mage.abilities.effects.common.ManaEffect;
-
-/**
- *
- * @author BetaSteward_at_googlemail.com
- */
-public abstract class BasicLandManaAbility extends ManaAbility {
-
- public BasicLandManaAbility(ManaEffect effect) {
- super(Zone.BATTLEFIELD, effect, new TapSourceCost());
- }
-
-}
diff --git a/Mage/src/mage/cards/CardImpl.java b/Mage/src/mage/cards/CardImpl.java
index d76fd14588..fdc5f6a55d 100644
--- a/Mage/src/mage/cards/CardImpl.java
+++ b/Mage/src/mage/cards/CardImpl.java
@@ -31,6 +31,8 @@ package mage.cards;
import java.lang.reflect.Constructor;
import java.util.List;
import java.util.UUID;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.Constants.Zone;
@@ -43,10 +45,13 @@ import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent;
import mage.game.permanent.PermanentCard;
+import mage.util.Logging;
import mage.watchers.Watchers;
public abstract class CardImpl> extends MageObjectImpl implements Card {
+ private final static Logger logger = Logging.getLogger(CardImpl.class.getName());
+
protected UUID ownerId;
protected Watchers watchers = new Watchers();
protected String expansionSetCode;
@@ -92,7 +97,7 @@ public abstract class CardImpl> extends MageObjectImpl
return card;
}
catch (Exception e) {
- e.printStackTrace();
+ logger.log(Level.SEVERE, "Error loading card: " + name, e);
return null;
}
}
@@ -189,7 +194,13 @@ public abstract class CardImpl> extends MageObjectImpl
game.getPlayer(ownerId).getLibrary().putOnTop(this, game);
else
game.getPlayer(ownerId).getLibrary().putOnBottom(this, game);
-
+ break;
+ case BATTLEFIELD:
+ PermanentCard permanent = new PermanentCard(this, ownerId);
+ game.getBattlefield().addPermanent(permanent);
+ permanent.entersBattlefield(game);
+ game.applyEffects();
+ break;
}
zone = event.getToZone();
game.fireEvent(new ZoneChangeEvent(this.getId(), ownerId, fromZone, event.getToZone()));
diff --git a/Mage/src/mage/cards/ExpansionSet.java b/Mage/src/mage/cards/ExpansionSet.java
index 708e80322b..d2c18d7167 100644
--- a/Mage/src/mage/cards/ExpansionSet.java
+++ b/Mage/src/mage/cards/ExpansionSet.java
@@ -43,6 +43,7 @@ import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.logging.Level;
import java.util.logging.Logger;
+import mage.util.Logging;
/**
*
@@ -50,6 +51,8 @@ import java.util.logging.Logger;
*/
public abstract class ExpansionSet implements Serializable {
+ private final static Logger logger = Logging.getLogger(ExpansionSet.class.getName());
+
protected String name;
protected String code;
protected String symbolCode;
@@ -83,7 +86,7 @@ public abstract class ExpansionSet implements Serializable {
Constructor> con = clazz.getConstructor(new Class[]{UUID.class});
return (Card) con.newInstance(new Object[] {null});
} catch (Exception ex) {
- Logger.getLogger(ExpansionSet.class.getName()).log(Level.SEVERE, "Error creating card:" + clazz.getName(), ex);
+ logger.log(Level.SEVERE, "Error creating card:" + clazz.getName(), ex);
return null;
}
}
diff --git a/Mage/src/mage/cards/decks/DeckCardLists.java b/Mage/src/mage/cards/decks/DeckCardLists.java
index 6bae974657..6bf0958868 100644
--- a/Mage/src/mage/cards/decks/DeckCardLists.java
+++ b/Mage/src/mage/cards/decks/DeckCardLists.java
@@ -28,15 +28,18 @@
package mage.cards.decks;
+import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
+import java.io.FileReader;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
+import java.util.logging.Level;
import java.util.logging.Logger;
/**
diff --git a/Mage/src/mage/filter/common/FilterCreatureForCombat.java b/Mage/src/mage/filter/common/FilterCreatureForCombat.java
index fccfc8cead..e196eb4059 100644
--- a/Mage/src/mage/filter/common/FilterCreatureForCombat.java
+++ b/Mage/src/mage/filter/common/FilterCreatureForCombat.java
@@ -28,6 +28,8 @@
package mage.filter.common;
+import mage.game.permanent.Permanent;
+
/**
*
* @author BetaSteward_at_googlemail.com
@@ -42,8 +44,6 @@ public class FilterCreatureForCombat extends FilterCreaturePermanent> exten
if (useAttacking && permanent.isAttacking() != attacking)
return notFilter;
- if (useBlocking && permanent.isBlocking() != blocking)
+ if (useBlocking && (permanent.getBlocking() > 0) != blocking)
return notFilter;
return !notFilter;
diff --git a/Mage/src/mage/game/combat/Combat.java b/Mage/src/mage/game/combat/Combat.java
index 9fb4827325..e3ec597332 100644
--- a/Mage/src/mage/game/combat/Combat.java
+++ b/Mage/src/mage/game/combat/Combat.java
@@ -175,7 +175,7 @@ public class Combat implements Serializable, Copyable {
Permanent creature = game.getPermanent(creatureId);
if (creature != null) {
creature.setAttacking(false);
- creature.setBlocking(false);
+ creature.setBlocking(0);
for (CombatGroup group: groups) {
group.remove(creatureId);
}
@@ -189,14 +189,14 @@ public class Combat implements Serializable, Copyable {
creature = game.getPermanent(attacker);
if (creature != null) {
creature.setAttacking(false);
- creature.setBlocking(false);
+ creature.setBlocking(0);
}
}
for (UUID blocker: group.blockers) {
creature = game.getPermanent(blocker);
if (creature != null) {
creature.setAttacking(false);
- creature.setBlocking(false);
+ creature.setBlocking(0);
}
}
}
diff --git a/Mage/src/mage/game/combat/CombatGroup.java b/Mage/src/mage/game/combat/CombatGroup.java
index f2e66bc658..43dafe1b0c 100644
--- a/Mage/src/mage/game/combat/CombatGroup.java
+++ b/Mage/src/mage/game/combat/CombatGroup.java
@@ -249,12 +249,15 @@ public class CombatGroup implements Serializable, Copyable {
return;
}
}
- game.getPermanent(blockerId).setBlocking(true);
- blockers.add(blockerId);
- blockerOrder.add(blockerId);
- this.blocked = true;
- for (UUID attackerId: attackers) {
- game.fireEvent(GameEvent.getEvent(GameEvent.EventType.BLOCKER_DECLARED, attackerId, blockerId, playerId));
+ Permanent blocker = game.getPermanent(blockerId);
+ if (blockerId != null) {
+ blocker.setBlocking(blocker.getBlocking() + 1);
+ blockers.add(blockerId);
+ blockerOrder.add(blockerId);
+ this.blocked = true;
+ for (UUID attackerId: attackers) {
+ game.fireEvent(GameEvent.getEvent(GameEvent.EventType.BLOCKER_DECLARED, attackerId, blockerId, playerId));
+ }
}
}
diff --git a/Mage/src/mage/game/permanent/Permanent.java b/Mage/src/mage/game/permanent/Permanent.java
index 5b4297ee5c..4a70734780 100644
--- a/Mage/src/mage/game/permanent/Permanent.java
+++ b/Mage/src/mage/game/permanent/Permanent.java
@@ -75,8 +75,8 @@ public interface Permanent extends Card {
public boolean destroy(UUID sourceId, Game game, boolean noRegen);
public boolean sacrifice(UUID sourceId, Game game);
public void entersBattlefield(Game game);
- public boolean moveToZone(Zone zone, Game game, boolean flag);
- public boolean moveToExile(UUID exileId, String name, Game game);
+// public boolean moveToZone(Zone zone, Game game, boolean flag);
+// public boolean moveToExile(UUID exileId, String name, Game game);
public String getValue();
public void setArt(String art);
@@ -94,9 +94,11 @@ public interface Permanent extends Card {
public void addToughness(int toughness);
public boolean isAttacking();
- public boolean isBlocking();
+ public int getBlocking();
public void setAttacking(boolean attacking);
- public void setBlocking(boolean blocking);
+ public void setBlocking(int blocking);
+ public int getMaxBlocks();
+ public void setMaxBlocks(int maxBlocks);
public boolean canAttack(Game game);
public boolean canBlock(UUID attackerId, Game game);
public boolean removeFromCombat(Game game);
diff --git a/Mage/src/mage/game/permanent/PermanentImpl.java b/Mage/src/mage/game/permanent/PermanentImpl.java
index 46151d35bb..55959201d3 100644
--- a/Mage/src/mage/game/permanent/PermanentImpl.java
+++ b/Mage/src/mage/game/permanent/PermanentImpl.java
@@ -71,7 +71,8 @@ public abstract class PermanentImpl> extends CardImpl
protected boolean phasedIn = true;
protected boolean faceUp = true;
protected boolean attacking;
- protected boolean blocking;
+ protected int blocking;
+ protected int maxBlocks = 1;
protected boolean loyaltyUsed;
protected boolean deathtouched;
protected Counters counters;
@@ -102,6 +103,7 @@ public abstract class PermanentImpl> extends CardImpl
this.faceUp = permanent.faceUp;
this.attacking = permanent.attacking;
this.blocking = permanent.blocking;
+ this.maxBlocks = permanent.maxBlocks;
this.loyaltyUsed = permanent.loyaltyUsed;
this.deathtouched = permanent.deathtouched;
this.counters = permanent.counters.copy();
@@ -114,6 +116,7 @@ public abstract class PermanentImpl> extends CardImpl
@Override
public void reset(Game game) {
this.controllerId = ownerId;
+ this.maxBlocks = 1;
}
@Override
@@ -133,7 +136,6 @@ public abstract class PermanentImpl> extends CardImpl
abilities.add(copy);
}
-
@Override
public Counters getCounters() {
return counters;
@@ -300,10 +302,15 @@ public abstract class PermanentImpl> extends CardImpl
}
@Override
- public boolean isBlocking() {
+ public int getBlocking() {
return blocking;
}
+ @Override
+ public int getMaxBlocks() {
+ return maxBlocks;
+ }
+
@Override
public UUID getControllerId() {
return this.controllerId;
@@ -558,10 +565,15 @@ public abstract class PermanentImpl> extends CardImpl
}
@Override
- public void setBlocking(boolean blocking) {
+ public void setBlocking(int blocking) {
this.blocking = blocking;
}
+ @Override
+ public void setMaxBlocks(int maxBlocks) {
+ this.maxBlocks = maxBlocks;
+ }
+
@Override
public boolean removeFromCombat(Game game) {
game.getCombat().removeFromCombat(objectId, game);
diff --git a/Mage/src/mage/game/stack/StackAbility.java b/Mage/src/mage/game/stack/StackAbility.java
index 3d7c7e7a84..7ff3fea458 100644
--- a/Mage/src/mage/game/stack/StackAbility.java
+++ b/Mage/src/mage/game/stack/StackAbility.java
@@ -48,6 +48,7 @@ import mage.ObjectColor;
import mage.abilities.Abilities;
import mage.abilities.AbilitiesImpl;
import mage.abilities.Ability;
+import mage.abilities.StateTriggeredAbility;
import mage.abilities.costs.CostsImpl;
import mage.abilities.costs.mana.ManaCosts;
import mage.abilities.costs.mana.ManaCostsImpl;
@@ -97,7 +98,10 @@ public class StackAbility implements StackObject, Ability {
@Override
public void counter(Game game) {
-
+ //20100716 - 603.8
+ if (ability instanceof StateTriggeredAbility) {
+ ((StateTriggeredAbility)ability).counter();
+ }
}
@Override
diff --git a/Mage/src/mage/players/Player.java b/Mage/src/mage/players/Player.java
index 37c0ce72f1..488ffbb352 100644
--- a/Mage/src/mage/players/Player.java
+++ b/Mage/src/mage/players/Player.java
@@ -28,12 +28,10 @@
package mage.players;
-import java.util.Collection;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import mage.Constants.Outcome;
-import mage.Constants.Zone;
import mage.MageItem;
import mage.MageObject;
import mage.abilities.Abilities;
@@ -54,7 +52,6 @@ import mage.filter.FilterAbility;
import mage.game.events.GameEvent;
import mage.game.Game;
import mage.game.permanent.Permanent;
-import mage.game.permanent.token.Token;
import mage.target.Target;
import mage.target.TargetAmount;
import mage.target.TargetCard;
@@ -106,9 +103,9 @@ public interface Player extends MageItem, Copyable {
public boolean triggerAbility(TriggeredAbility ability, Game game);
public boolean canBeTargetedBy(MageObject source);
public void checkTriggers(GameEvent event, Game game);
- public void discard(int amount, Game game);
+ public void discard(int amount, Ability source, Game game);
public void discardToMax(Game game);
- public boolean discard(Card card, Game game);
+ public boolean discard(Card card, Ability source, Game game);
public void lost(Game game);
public void won(Game game);
public void leaveGame(Game game);
diff --git a/Mage/src/mage/players/PlayerDecision.java b/Mage/src/mage/players/PlayerDecision.java
deleted file mode 100644
index 19fcc4579b..0000000000
--- a/Mage/src/mage/players/PlayerDecision.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
-* 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.players;
-
-import java.io.Serializable;
-
-/**
- *
- * @author BetaSteward_at_googlemail.com
- */
-public class PlayerDecision implements Serializable {
-
- private String message;
- private DecisionType type;
-
- public enum DecisionType {
- USE_EFFECT,
- PICK_COLOR,
- PICK_ONE
- }
-
-
-
-}
diff --git a/Mage/src/mage/players/PlayerImpl.java b/Mage/src/mage/players/PlayerImpl.java
index f0654e6121..455a8ec8d6 100644
--- a/Mage/src/mage/players/PlayerImpl.java
+++ b/Mage/src/mage/players/PlayerImpl.java
@@ -69,10 +69,6 @@ import mage.game.Game;
import mage.game.combat.CombatGroup;
import mage.game.permanent.Permanent;
import mage.game.events.GameEvent;
-import mage.game.events.ZoneChangeEvent;
-import mage.game.permanent.PermanentCard;
-import mage.game.permanent.PermanentToken;
-import mage.game.permanent.token.Token;
import mage.game.stack.Spell;
import mage.game.stack.StackAbility;
import mage.game.stack.StackObject;
@@ -285,7 +281,7 @@ public abstract class PlayerImpl> implements Player, Ser
while (hand.size() > this.maxHandSize) {
TargetDiscard target = new TargetDiscard(playerId);
chooseTarget(Outcome.Discard, target, null, game);
- discard(hand.get(target.getFirstTarget(), game), game);
+ discard(hand.get(target.getFirstTarget(), game), null, game);
}
}
@@ -306,11 +302,11 @@ public abstract class PlayerImpl> implements Player, Ser
}
@Override
- public void discard(int amount, Game game) {
+ public void discard(int amount, Ability source, Game game) {
if (amount >= hand.size()) {
int discardAmount = hand.size();
while (hand.size() > 0) {
- discard(hand.get(hand.iterator().next(), game), game);
+ discard(hand.get(hand.iterator().next(), game), source, game);
}
game.fireInformEvent(name + " discards " + Integer.toString(discardAmount) + " card" + (discardAmount > 1?"s":""));
return;
@@ -318,18 +314,18 @@ public abstract class PlayerImpl> implements Player, Ser
for (int i = 0; i < amount; i++) {
TargetDiscard target = new TargetDiscard(playerId);
choose(Outcome.Discard, target, game);
- discard(hand.get(target.getFirstTarget(), game), game);
+ discard(hand.get(target.getFirstTarget(), game), source, game);
}
game.fireInformEvent(name + " discards " + Integer.toString(amount) + " card" + (amount > 1?"s":""));
}
@Override
- public boolean discard(Card card, Game game) {
+ public boolean discard(Card card, Ability source, Game game) {
//20091005 - 701.1
- if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.DISCARD_CARD, playerId, playerId))) {
+ if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.DISCARD_CARD, card.getId(), source==null?null:source.getId(), playerId))) {
removeFromHand(card, game);
if (card.moveToZone(Zone.GRAVEYARD, game, false)) {
- game.fireEvent(GameEvent.getEvent(GameEvent.EventType.DISCARDED_CARD, playerId, playerId));
+ game.fireEvent(GameEvent.getEvent(GameEvent.EventType.DISCARDED_CARD, card.getId(), source==null?null:source.getId(), playerId));
return true;
}
}
@@ -603,17 +599,9 @@ public abstract class PlayerImpl> implements Player, Ser
public int loseLife(int amount, Game game) {
GameEvent event = new GameEvent(GameEvent.EventType.LOSE_LIFE, playerId, playerId, playerId, amount);
if (!game.replaceEvent(event)) {
- if (amount > life) {
- int curLife = life;
- setLife(0, game);
- game.fireEvent(GameEvent.getEvent(GameEvent.EventType.LOST_LIFE, playerId, playerId, playerId, curLife));
- return curLife;
- }
- else {
- setLife(this.life - amount, game);
- game.fireEvent(GameEvent.getEvent(GameEvent.EventType.LOST_LIFE, playerId, playerId, playerId, amount));
- return amount;
- }
+ setLife(this.life - amount, game);
+ game.fireEvent(GameEvent.getEvent(GameEvent.EventType.LOST_LIFE, playerId, playerId, playerId, amount));
+ return amount;
}
return 0;
}
diff --git a/Mage/src/mage/players/PlayerResponse.java b/Mage/src/mage/players/PlayerResponse.java
deleted file mode 100644
index 771d87df5d..0000000000
--- a/Mage/src/mage/players/PlayerResponse.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
-* 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.players;
-
-import java.io.Serializable;
-import java.util.UUID;
-
-/**
- *
- * @author BetaSteward_at_googlemail.com
- */
-public class PlayerResponse implements Serializable {
-
- private String responseString;
- private UUID responseUUID;
- private Boolean responseBoolean;
-
- public void clear() {
- responseString = null;
- responseUUID = null;
- responseBoolean = null;
- }
-
- public String getString() {
- return responseString;
- }
-
- public void setString(String responseString) {
- this.responseString = responseString;
- }
-
- public UUID getUUID() {
- return responseUUID;
- }
-
- public void setUUID(UUID responseUUID) {
- this.responseUUID = responseUUID;
- }
-
- public Boolean getBoolean() {
- return responseBoolean;
- }
-
- public void setBoolean(Boolean responseBoolean) {
- this.responseBoolean = responseBoolean;
- }
-
-
-
-}
diff --git a/Mage/src/mage/target/TargetImpl.java b/Mage/src/mage/target/TargetImpl.java
index c18fd6576f..6f44ff44d6 100644
--- a/Mage/src/mage/target/TargetImpl.java
+++ b/Mage/src/mage/target/TargetImpl.java
@@ -127,7 +127,7 @@ public abstract class TargetImpl> implements Target {
@Override
public boolean isChosen() {
- if (targets.size() == maxNumberOfTargets)
+ if (maxNumberOfTargets != 0 && targets.size() == maxNumberOfTargets)
return true;
return chosen;
}
@@ -157,7 +157,7 @@ public abstract class TargetImpl> implements Target {
@Override
public void addTarget(UUID id, Ability source, Game game) {
//20100423 - 113.3
- if (targets.size() < maxNumberOfTargets) {
+ if (maxNumberOfTargets == 0 || targets.size() < maxNumberOfTargets) {
if (!targets.containsKey(id)) {
if (source != null) {
if (!game.replaceEvent(GameEvent.getEvent(EventType.TARGET, id, source.getSourceId(), source.getControllerId()))) {
diff --git a/Mage/src/mage/target/common/TargetControlledPermanent.java b/Mage/src/mage/target/common/TargetControlledPermanent.java
index 3a6f29fd78..816435d4a8 100644
--- a/Mage/src/mage/target/common/TargetControlledPermanent.java
+++ b/Mage/src/mage/target/common/TargetControlledPermanent.java
@@ -28,8 +28,6 @@
package mage.target.common;
-import mage.Constants.TargetController;
-import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.target.TargetPermanent;