diff --git a/.gitignore b/.gitignore index a5f07bfdc1c..5a481274487 100644 --- a/.gitignore +++ b/.gitignore @@ -1,95 +1,97 @@ -syntax: glob -Mage.Client/*.dck -Mage.Client/db -Mage.Client/gamelogs -Mage.Client/mageclient.log -Mage.Client/plugins/images -Mage.Client/plugins/plugin.data -Mage.Client/target -Mage.Common/target -Mage.Plugins/Mage.Card.Plugin/target -Mage.Plugins/Mage.Counter.Plugin/target -Mage.Plugins/Mage.Theme.Plugin/target -Mage.Plugins/Mage.Rating.Plugin/target -Mage.Server.Console/target/ -Mage.Server.Console/mageadmin.log -Mage.Server.Plugins/Mage.Deck.Constructed/target -Mage.Server.Plugins/Mage.Deck.Limited/target -Mage.Server.Plugins/Mage.Game.CommanderDuel/target -Mage.Server.Plugins/Mage.Game.CommanderFreeForAll/target/ -Mage.Server.Plugins/Mage.Game.FreeForAll/target -Mage.Server.Plugins/Mage.Game.TinyLeadersDuel/target -Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/target -Mage.Server.Plugins/Mage.Player.AI.DraftBot/target -Mage.Server.Plugins/Mage.Player.AI.MA/target -Mage.Server.Plugins/Mage.Player.AI/target -Mage.Server.Plugins/Mage.Player.AIMCTS/target -Mage.Server.Plugins/Mage.Player.AIMinimax/target -Mage.Server.Plugins/Mage.Player.Human/target -Mage.Server.Plugins/Mage.Tournament.BoosterDraft/target -Mage.Server.Plugins/Mage.Tournament.Constructed/target -Mage.Server.Plugins/Mage.Tournament.Sealed/target -Mage.Server/config/init.txt -Mage.Server/saved -Mage.Server/target -Mage.Server/db -Mage.Server/cache -Mage.Server/mageserver.log -Mage.Server/magediag.log -Mage.Sets/target -Mage.Stats/server.log -Mage.Stats/mageserver.log -Mage.Stats/magediag.log -Mage.Tests/target -Mage.Tests/cache -Mage.Tests/db -Mage.Tests/Mage.log -Mage.Tests/watchdog.log -Mage/target -Mage.Updater/target -mage.updater.client/target - -releases -Utils/author.txt -.DS_Store -.metadata -.project -.settings -.idea -syntax: regexp -\.class -\.jar -\.iml -\.ipr -\.iws -\.log -nbactions.xml -nbactions-*.xml -nb-configuration.xml -glob:Mage.Client/cheat.dck -glob:Mage.Client/test.dck -mage-bundle.zip -mage-stats-ws.war - -Mage.Server.Plugins/Mage.Draft.8PlayerBooster/target -\.orig\..*$ -\.orig$ -\.chg\..*$ -\.rej$ -\.conflict\~$ -/Mage.Server.Plugins/Mage.Player.AIMCTS/target/ - -*.classpath -*.iml -/submitted - -/Mage.Server/config/ai.please.cast.this.txt -/Mage.Stats/target/ -/Utils/*_unimplemented.txt -*.netbeans_automatic_build -*.txt -Mage.Client/serverlist.txt -/Mage.Network/target/ -/Mage.Server.Tests/target/ -/Mage.Server.Tests/db -/Mage.Server.Tests/*.log \ No newline at end of file +syntax: glob +Mage.Client/*.dck +Mage.Client/db +Mage.Client/gamelogs +Mage.Client/mageclient.log +Mage.Client/plugins/images +Mage.Client/plugins/plugin.data +Mage.Client/target +Mage.Common/target +Mage.Plugins/Mage.Card.Plugin/target +Mage.Plugins/Mage.Counter.Plugin/target +Mage.Plugins/Mage.Theme.Plugin/target +Mage.Plugins/Mage.Rating.Plugin/target +Mage.Server.Console/target/ +Mage.Server.Console/mageadmin.log +Mage.Server.Plugins/Mage.Deck.Constructed/target +Mage.Server.Plugins/Mage.Deck.Limited/target +Mage.Server.Plugins/Mage.Game.CommanderDuel/target +Mage.Server.Plugins/Mage.Game.CommanderFreeForAll/target/ +Mage.Server.Plugins/Mage.Game.FreeForAll/target +Mage.Server.Plugins/Mage.Game.TinyLeadersDuel/target +Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/target +Mage.Server.Plugins/Mage.Player.AI.DraftBot/target +Mage.Server.Plugins/Mage.Player.AI.MA/target +Mage.Server.Plugins/Mage.Player.AI/target +Mage.Server.Plugins/Mage.Player.AIMCTS/target +Mage.Server.Plugins/Mage.Player.AIMinimax/target +Mage.Server.Plugins/Mage.Player.Human/target +Mage.Server.Plugins/Mage.Tournament.BoosterDraft/target +Mage.Server.Plugins/Mage.Tournament.Constructed/target +Mage.Server.Plugins/Mage.Tournament.Sealed/target +Mage.Server/config/init.txt +Mage.Server/saved +Mage.Server/target +Mage.Server/db +Mage.Server/cache +Mage.Server/mageserver.log +Mage.Server/magediag.log +Mage.Sets/target +Mage.Stats/server.log +Mage.Stats/mageserver.log +Mage.Stats/magediag.log +Mage.Tests/target +Mage.Tests/cache +Mage.Tests/db +Mage.Tests/Mage.log +Mage.Tests/watchdog.log +Mage/target +Mage.Updater/target +mage.updater.client/target + +releases +Utils/author.txt +.DS_Store +.metadata +.project +.settings +.idea +syntax: regexp +\.class +\.jar +\.iml +\.ipr +\.iws +\.log +nbactions.xml +nbactions-*.xml +nb-configuration.xml +glob:Mage.Client/cheat.dck +glob:Mage.Client/test.dck +mage-bundle.zip +mage-stats-ws.war + +Mage.Server.Plugins/Mage.Draft.8PlayerBooster/target +\.orig\..*$ +\.orig$ +\.chg\..*$ +\.rej$ +\.conflict\~$ +/Mage.Server.Plugins/Mage.Player.AIMCTS/target/ + +*.classpath +*.iml +/submitted + +/Mage.Server/config/ai.please.cast.this.txt +/Mage.Stats/target/ +/Utils/*_unimplemented.txt +*.netbeans_automatic_build +*.txt +Mage.Client/serverlist.txt +/Mage.Network/target/ +/Mage.Server.Tests/target/ +/Mage.Server.Tests/db +/Mage.Server.Tests/*.log +Mage.Client/serverlist.txt +/bin/ diff --git a/Mage.Client/serverlist.txt b/Mage.Client/serverlist.txt index cff928b3be7..db223b403ff 100644 --- a/Mage.Client/serverlist.txt +++ b/Mage.Client/serverlist.txt @@ -1,6 +1,6 @@ XMage.de 1 (Europe/Germany) fast :xmage.de:17171 woogerworks (North America/USA) :xmage.woogerworks.info:17171 XMage.info 1 (Europe/France) new network code -> see forum :176.31.186.181:17171 -IceMage (Europe/Netherlands) :ring0.cc:17171 +XMage BR (South America/Brazil) :ec2-54-233-67-0.sa-east-1.compute.amazonaws.com:17171 Seedds Server (Asia) :115.29.203.80:17171 localhost -> connect to your local server (must be started):localhost:17171 diff --git a/Mage.Client/src/main/java/mage/client/cards/CardGrid.java b/Mage.Client/src/main/java/mage/client/cards/CardGrid.java index a2369fe3149..9940628f998 100644 --- a/Mage.Client/src/main/java/mage/client/cards/CardGrid.java +++ b/Mage.Client/src/main/java/mage/client/cards/CardGrid.java @@ -1,16 +1,16 @@ /* * 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 @@ -20,7 +20,7 @@ * 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. @@ -31,7 +31,6 @@ * * Created on 30-Mar-2010, 9:25:40 PM */ - package mage.client.cards; import java.awt.Component; @@ -54,6 +53,7 @@ import mage.client.plugins.impl.Plugins; import mage.client.util.Config; import mage.client.util.Event; import mage.client.util.Listener; +import mage.utils.CardUtil; import mage.view.CardView; import mage.view.CardsView; import org.mage.card.arcane.CardPanel; @@ -82,7 +82,7 @@ public class CardGrid extends javax.swing.JLayeredPane implements MouseListener, } public void clear() { - for(MouseListener ml: this.getMouseListeners()) { + for (MouseListener ml : this.getMouseListeners()) { this.removeMouseListener(ml); } this.clearCardEventListeners(); @@ -101,7 +101,7 @@ public class CardGrid extends javax.swing.JLayeredPane implements MouseListener, this.bigCard = bigCard; this.gameId = gameId; if (merge) { - for (CardView card: showCards.values()) { + for (CardView card : showCards.values()) { if (!cards.containsKey(card.getId())) { addCard(card, bigCard, gameId, drawImage); } @@ -115,7 +115,7 @@ public class CardGrid extends javax.swing.JLayeredPane implements MouseListener, } } else { this.clearCards(); - for (CardView card: showCards.values()) { + for (CardView card : showCards.values()) { addCard(card, bigCard, gameId, drawImage); } } @@ -144,7 +144,7 @@ public class CardGrid extends javax.swing.JLayeredPane implements MouseListener, int curRow = 0; if (cards.size() > 0) { Rectangle rectangle = new Rectangle(Config.dimensions.frameWidth, Config.dimensions.frameHeight); - List sortedCards = new ArrayList(cards.values()); + List sortedCards = new ArrayList<>(cards.values()); switch (sortSetting.getSortBy()) { case NAME: Collections.sort(sortedCards, new CardNameComparator()); @@ -155,15 +155,16 @@ public class CardGrid extends javax.swing.JLayeredPane implements MouseListener, case COLOR: Collections.sort(sortedCards, new CardColorComparator()); break; - case COLOR_DETAILED: - Collections.sort(sortedCards, new CardColorDetailedComparator()); + case COLOR_IDENTITY: + Collections.sort(sortedCards, new CardColorDetailedIdentity()); break; case CASTING_COST: Collections.sort(sortedCards, new CardCostComparator()); break; + } MageCard lastCard = null; - for (MageCard cardImg: sortedCards) { + for (MageCard cardImg : sortedCards) { if (sortSetting.isPilesToggle()) { if (lastCard == null) { lastCard = cardImg; @@ -187,8 +188,9 @@ public class CardGrid extends javax.swing.JLayeredPane implements MouseListener, curRow = 0; } break; - case COLOR_DETAILED: - if (cardImg.getOriginal().getColor().hashCode() != lastCard.getOriginal().getColor().hashCode()) { + case COLOR_IDENTITY: + if (CardUtil.getColorIdentitySortValue(cardImg.getOriginal().getManaCost(), cardImg.getOriginal().getColor(), cardImg.getOriginal().getRules()) + != CardUtil.getColorIdentitySortValue(lastCard.getOriginal().getManaCost(), lastCard.getOriginal().getColor(), lastCard.getOriginal().getRules())) { curColumn++; curRow = 0; } @@ -206,8 +208,7 @@ public class CardGrid extends javax.swing.JLayeredPane implements MouseListener, moveToFront(cardImg); curRow++; lastCard = cardImg; - } - else { + } else { rectangle.setLocation(curColumn * Config.dimensions.frameWidth, curRow * 20); cardImg.setBounds(rectangle); cardImg.setCardBounds(rectangle.x, rectangle.y, Config.dimensions.frameWidth, Config.dimensions.frameHeight); @@ -221,15 +222,15 @@ public class CardGrid extends javax.swing.JLayeredPane implements MouseListener, } } resizeArea(); - revalidate(); - repaint(); + revalidate(); + repaint(); } private void clearCards() { // remove possible mouse listeners, preventing gc - for (MageCard mageCard: cards.values()) { + for (MageCard mageCard : cards.values()) { if (mageCard instanceof CardPanel) { - ((CardPanel)mageCard).cleanUp(); + ((CardPanel) mageCard).cleanUp(); } } this.cards.clear(); @@ -237,7 +238,7 @@ public class CardGrid extends javax.swing.JLayeredPane implements MouseListener, } private void removeAllCardImg() { - for (Component comp: getComponents()) { + for (Component comp : getComponents()) { if (comp instanceof Card || comp instanceof MageCard) { remove(comp); } @@ -245,14 +246,14 @@ public class CardGrid extends javax.swing.JLayeredPane implements MouseListener, } private void removeCardImg(UUID cardId) { - for (Component comp: getComponents()) { + for (Component comp : getComponents()) { if (comp instanceof Card) { - if (((Card)comp).getCardId().equals(cardId)) { + if (((Card) comp).getCardId().equals(cardId)) { remove(comp); comp = null; } } else if (comp instanceof MageCard) { - if (((MageCard)comp).getOriginal().getId().equals(cardId)) { + if (((MageCard) comp).getOriginal().getId().equals(cardId)) { remove(comp); comp = null; } @@ -275,10 +276,10 @@ public class CardGrid extends javax.swing.JLayeredPane implements MouseListener, cardEventSource.clearListeners(); } - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents @@ -296,10 +297,8 @@ public class CardGrid extends javax.swing.JLayeredPane implements MouseListener, ); }// //GEN-END:initComponents - // Variables declaration - do not modify//GEN-BEGIN:variables // End of variables declaration//GEN-END:variables - @Override public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2 && !e.isConsumed()) { @@ -322,22 +321,26 @@ public class CardGrid extends javax.swing.JLayeredPane implements MouseListener, } @Override - public void mousePressed(MouseEvent e) {} + public void mousePressed(MouseEvent e) { + } @Override - public void mouseReleased(MouseEvent e) {} + public void mouseReleased(MouseEvent e) { + } @Override - public void mouseEntered(MouseEvent e) {} + public void mouseEntered(MouseEvent e) { + } @Override - public void mouseExited(MouseEvent e) {} + public void mouseExited(MouseEvent e) { + } private void resizeArea() { Dimension area = new Dimension(0, 0); Dimension size = getPreferredSize(); - for (Component comp: getComponents()) { + for (Component comp : getComponents()) { Rectangle r = comp.getBounds(); if (r.x + r.width > area.width) { area.width = r.x + r.width; @@ -348,13 +351,13 @@ public class CardGrid extends javax.swing.JLayeredPane implements MouseListener, } if (size.height != area.height || size.width != area.width) { setPreferredSize(area); - } + } } @Override public void refresh() { revalidate(); - repaint(); + repaint(); } @Override @@ -379,8 +382,7 @@ class CardRarityComparator implements Comparator { int val = o1.getOriginal().getRarity().compareTo(o2.getOriginal().getRarity()); if (val == 0) { return o1.getOriginal().getName().compareTo(o2.getOriginal().getName()); - } - else { + } else { return val; } } @@ -394,8 +396,7 @@ class CardCostComparator implements Comparator { int val = Integer.valueOf(o1.getOriginal().getConvertedManaCost()).compareTo(Integer.valueOf(o2.getOriginal().getConvertedManaCost())); if (val == 0) { return o1.getOriginal().getName().compareTo(o2.getOriginal().getName()); - } - else { + } else { return val; } } @@ -409,23 +410,22 @@ class CardColorComparator implements Comparator { int val = o1.getOriginal().getColor().compareTo(o2.getOriginal().getColor()); if (val == 0) { return o1.getOriginal().getName().compareTo(o2.getOriginal().getName()); - } - else { + } else { return val; } } } -class CardColorDetailedComparator implements Comparator { +class CardColorDetailedIdentity implements Comparator { @Override public int compare(MageCard o1, MageCard o2) { - int val = o1.getOriginal().getColor().hashCode() - o2.getOriginal().getColor().hashCode(); + int val = CardUtil.getColorIdentitySortValue(o1.getOriginal().getManaCost(), o1.getOriginal().getColor(), o1.getOriginal().getRules()) + - CardUtil.getColorIdentitySortValue(o2.getOriginal().getManaCost(), o2.getOriginal().getColor(), o2.getOriginal().getRules()); if (val == 0) { return o1.getOriginal().getName().compareTo(o2.getOriginal().getName()); - } - else { + } else { return val; } } 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 489f18d08ef..e4bf5d2b67f 100644 --- a/Mage.Client/src/main/java/mage/client/cards/CardsList.java +++ b/Mage.Client/src/main/java/mage/client/cards/CardsList.java @@ -1,37 +1,36 @@ /* -* 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. -*/ + * 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. + */ /* * CardsList.java * * Created on Dec 18, 2009, 10:40:12 AM */ - package mage.client.cards; import java.awt.Color; @@ -59,7 +58,7 @@ import mage.client.constants.Constants.DeckEditorMode; import mage.client.constants.Constants.SortBy; import static mage.client.constants.Constants.SortBy.CASTING_COST; import static mage.client.constants.Constants.SortBy.COLOR; -import static mage.client.constants.Constants.SortBy.COLOR_DETAILED; +import static mage.client.constants.Constants.SortBy.COLOR_IDENTITY; import static mage.client.constants.Constants.SortBy.RARITY; import mage.client.deckeditor.SortSetting; import mage.client.deckeditor.table.TableModel; @@ -67,7 +66,7 @@ import mage.client.deckeditor.table.UpdateCountsCallback; import mage.client.dialog.PreferencesDialog; import mage.client.plugins.impl.Plugins; import mage.client.util.CardViewColorComparator; -import mage.client.util.CardViewColorDetailedComparator; +import mage.client.util.CardViewColorIdentityComparator; import mage.client.util.CardViewCostComparator; import mage.client.util.CardViewNameComparator; import mage.client.util.CardViewRarityComparator; @@ -86,7 +85,7 @@ import org.mage.card.arcane.CardPanel; * @author BetaSteward_at_googlemail.com */ public class CardsList extends javax.swing.JPanel implements MouseListener, ICardGrid { - + protected CardEventSource cardEventSource = new CardEventSource(); private Dimension cardDimension; private CardsView cards; @@ -98,8 +97,10 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar private TableModel mainModel; private JTable mainTable; private ICardGrid currentView; - - /** Creates new form Cards */ + + /** + * Creates new form Cards + */ public CardsList() { initComponents(); makeTransparent(); @@ -115,22 +116,22 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar mainModel.removeTableModelListener(mainTable); mainModel.clear(); } - if(cardArea != null) { - for(MouseListener ml: cardArea.getMouseListeners()) { + if (cardArea != null) { + for (MouseListener ml : cardArea.getMouseListeners()) { cardArea.removeMouseListener(ml); } } - if(mainTable != null) { - for(MouseListener ml: mainTable.getMouseListeners()) { + if (mainTable != null) { + for (MouseListener ml : mainTable.getMouseListeners()) { mainTable.removeMouseListener(ml); } } if (currentView != null) { currentView.clearCardEventListeners(); } - for (Component comp :cardArea.getComponents()) { - if (comp instanceof CardPanel) { - ((CardPanel)comp).cleanUp(); + for (Component comp : cardArea.getComponents()) { + if (comp instanceof CardPanel) { + ((CardPanel) comp).cleanUp(); } } mageCards.clear(); @@ -208,20 +209,20 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar // activate spinner for card number change mainModel.setNumberEditable(true); TableColumnModel tcm = mainTable.getColumnModel(); - TableColumn tc = tcm.getColumn(0); + TableColumn tc = tcm.getColumn(0); tc.setMaxWidth(55); tc.setMinWidth(55); tc.setPreferredWidth(55); - tc.setCellEditor(new TableSpinnerEditor(this)); + tc.setCellEditor(new TableSpinnerEditor(this)); } } - + public void handleSetNumber(int number) { if (mainTable.getSelectedRowCount() == 1) { mainModel.setNumber(mainTable.getSelectedRow(), number); - } + } } - + public void handleDoubleClick() { if (mainTable.getSelectedRowCount() > 0) { int[] n = mainTable.getSelectedRows(); @@ -232,7 +233,7 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar } } } - + public void handleAltDoubleClick() { if (mainTable.getSelectedRowCount() > 0) { int[] n = mainTable.getSelectedRows(); @@ -243,7 +244,7 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar } } } - + public ICardGrid getMainModel() { return mainModel; } @@ -256,7 +257,6 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar return list; } - public void loadCards(CardsView showCards, BigCard bigCard, UUID gameId) { int selectedRow = -1; if (currentView.equals(mainModel)) { @@ -270,7 +270,7 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar chkPiles.setSelected(sortSetting.isPilesToggle()); currentView.loadCards(showCards, sortSetting, bigCard, gameId); if (selectedRow >= 0) { - selectedRow = Math.min(selectedRow, mainTable.getRowCount()-1); + selectedRow = Math.min(selectedRow, mainTable.getRowCount() - 1); if (selectedRow >= 0) { mainTable.setRowSelectionInterval(selectedRow, selectedRow); } @@ -281,7 +281,7 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar if (cards == null) { cards = new CardsView(); } - currentView.loadCards(cards, sortSetting, bigCard, gameId); + currentView.loadCards(cards, sortSetting, bigCard, gameId); } @Override @@ -295,22 +295,21 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar Comparator comparator = null; Map oldMageCards = mageCards; mageCards = new LinkedHashMap<>(); - + //Find card view - for(UUID uuid : cards.keySet()){ - if(oldMageCards.containsKey(uuid)){ + for (UUID uuid : cards.keySet()) { + if (oldMageCards.containsKey(uuid)) { mageCards.put(uuid, oldMageCards.get(uuid)); oldMageCards.remove(uuid); - } - else{ + } else { mageCards.put(uuid, addCard(cards.get(uuid), bigCard, gameId)); } } //Remove unused cards - for(MageCard card : oldMageCards.values()){ + for (MageCard card : oldMageCards.values()) { cardArea.remove(card); } - + if (cards != null && cards.size() > 0) { Rectangle rectangle = new Rectangle(Config.dimensions.frameWidth, Config.dimensions.frameHeight); List sortedCards = new ArrayList<>(cards.values()); @@ -324,25 +323,25 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar case COLOR: comparator = new CardViewColorComparator(); break; - case COLOR_DETAILED: - comparator = new CardViewColorDetailedComparator(); + case COLOR_IDENTITY: + comparator = new CardViewColorIdentityComparator(); break; case CASTING_COST: comparator = new CardViewCostComparator(); break; } - if(comparator != null){ + if (comparator != null) { Collections.sort(sortedCards, new CardViewNameComparator()); Collections.sort(sortedCards, comparator); } CardView lastCard = null; - for (CardView card: sortedCards) { + for (CardView card : sortedCards) { if (sortSetting.isPilesToggle()) { if (lastCard == null) { lastCard = card; } - if(comparator != null){ - if(comparator.compare(card, lastCard) > 0){ + if (comparator != null) { + if (comparator.compare(card, lastCard) > 0) { curColumn++; maxRow = Math.max(maxRow, curRow); curRow = 0; @@ -350,7 +349,7 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar } rectangle.setLocation(curColumn * Config.dimensions.frameWidth, curRow * 20); setCardBounds(mageCards.get(card.getId()), rectangle); - + curRow++; lastCard = card; } else { @@ -368,21 +367,21 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar maxRow = Math.max(maxRow, curRow); maxColumn = Math.max(maxColumn, curColumn); updateCounts(); - cardArea.setPreferredSize(new Dimension((maxColumn+1) * Config.dimensions.frameWidth, Config.dimensions.frameHeight + maxRow*20)); + cardArea.setPreferredSize(new Dimension((maxColumn + 1) * Config.dimensions.frameWidth, Config.dimensions.frameHeight + maxRow * 20)); cardArea.revalidate(); this.revalidate(); this.repaint(); this.setVisible(true); } - - private void updateCounts(){ + + private void updateCounts() { int landCount = 0; int creatureCount = 0; int sorceryCount = 0; int instantCount = 0; int enchantmentCount = 0; - for (CardView card: cards.values()) { - if (card.getCardTypes().contains(CardType.LAND)) { + for (CardView card : cards.values()) { + if (card.getCardTypes().contains(CardType.LAND)) { landCount++; } if (card.getCardTypes().contains(CardType.CREATURE)) { @@ -398,7 +397,7 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar enchantmentCount++; } } - + int count = cards != null ? cards.size() : 0; this.lblCount.setText(Integer.toString(count)); this.lblCreatureCount.setText(Integer.toString(creatureCount)); @@ -418,7 +417,6 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar cardImg.addMouseListener(this); return cardImg; } - private void setCardBounds(MageCard card, Rectangle rectangle) { card.setBounds(rectangle); @@ -456,10 +454,10 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar mainModel.clearCardEventListeners(); } - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents @@ -678,9 +676,9 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar currentView = mainModel; panelCardArea.setViewportView(mainTable); cbSortBy.setEnabled(false); - chkPiles.setEnabled(false); + chkPiles.setEnabled(false); PreferencesDialog.saveValue(PreferencesDialog.KEY_DRAFT_VIEW, "listView"); - redrawCards(); + redrawCards(); }//GEN-LAST:event_jToggleListViewActionPerformed private void cbSortByActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbSortByActionPerformed @@ -698,8 +696,8 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar panelCardArea.setViewportView(cardArea); cbSortBy.setEnabled(true); chkPiles.setEnabled(true); - PreferencesDialog.saveValue(PreferencesDialog.KEY_DRAFT_VIEW, "cardView"); - redrawCards(); + PreferencesDialog.saveValue(PreferencesDialog.KEY_DRAFT_VIEW, "cardView"); + redrawCards(); }//GEN-LAST:event_jToggleCardViewActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables @@ -725,28 +723,26 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar @Override public void mousePressed(MouseEvent e) { - if (e.getClickCount() >= 1 && !e.isConsumed()) { + if (e.getClickCount() >= 1 && !e.isConsumed()) { Object obj = e.getSource(); if (e.getClickCount() == 2) { e.consume(); if (obj instanceof Card) { if (e.isAltDown()) { - cardEventSource.altDoubleClick(((Card)obj).getOriginal(), "alt-double-click"); - } - else { - cardEventSource.doubleClick(((Card)obj).getOriginal(), "double-click"); + cardEventSource.altDoubleClick(((Card) obj).getOriginal(), "alt-double-click"); + } else { + cardEventSource.doubleClick(((Card) obj).getOriginal(), "double-click"); } } else if (obj instanceof MageCard) { if (e.isAltDown()) { - cardEventSource.altDoubleClick(((MageCard)obj).getOriginal(), "alt-double-click"); - } - else { - cardEventSource.doubleClick(((MageCard)obj).getOriginal(), "double-click"); + cardEventSource.altDoubleClick(((MageCard) obj).getOriginal(), "alt-double-click"); + } else { + cardEventSource.doubleClick(((MageCard) obj).getOriginal(), "double-click"); } } } if (obj instanceof MageCard) { - checkMenu(e, ((MageCard)obj).getOriginal()); + checkMenu(e, ((MageCard) obj).getOriginal()); } else { checkMenu(e, null); } @@ -758,14 +754,14 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar if (!e.isConsumed()) { Object obj = e.getSource(); if (obj instanceof MageCard) { - checkMenu(e, ((MageCard)obj).getOriginal()); + checkMenu(e, ((MageCard) obj).getOriginal()); } else { checkMenu(e, null); } } } - private void checkMenu(MouseEvent Me, SimpleCardView card){ + private void checkMenu(MouseEvent Me, SimpleCardView card) { if (Me.isPopupTrigger()) { Me.consume(); cardEventSource.showPopupMenuEvent(card, Me.getComponent(), Me.getX(), Me.getY(), "show-popup-menu"); diff --git a/Mage.Client/src/main/java/mage/client/constants/Constants.java b/Mage.Client/src/main/java/mage/client/constants/Constants.java index 969a9654c67..1ea8c4a1e9d 100644 --- a/Mage.Client/src/main/java/mage/client/constants/Constants.java +++ b/Mage.Client/src/main/java/mage/client/constants/Constants.java @@ -1,31 +1,30 @@ /* -* 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. -*/ - + * 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.constants; import java.io.File; @@ -37,6 +36,7 @@ import javax.swing.border.Border; * @author BetaSteward_at_googlemail.com */ public final class Constants { + private Constants() { throw new AssertionError(); } @@ -69,7 +69,7 @@ public final class Constants { public static final int POWBOX_TEXT_MAX_LEFT = 212; public static final int DAMAGE_MAX_LEFT = 180; - public static final Border EMPTY_BORDER = BorderFactory.createEmptyBorder(2,2,2,2); + public static final Border EMPTY_BORDER = BorderFactory.createEmptyBorder(2, 2, 2, 2); public static final double SCALE_FACTOR = 0.5; @@ -80,26 +80,29 @@ public final class Constants { public static final String RESOURCE_PATH_SET = IO.imageBaseDir + "sets" + File.separator; public static final String RESOURCE_PATH_SET_SMALL = RESOURCE_PATH_SET + File.separator + "small" + File.separator; public static final String BASE_SOUND_PATH = "sounds" + File.separator; - public static final String BASE_MUSICS_PATH = "music" + File.separator ; - + public static final String BASE_MUSICS_PATH = "music" + File.separator; + public interface IO { + String imageBaseDir = "plugins" + File.separator + "images" + File.separator; String IMAGE_PROPERTIES_FILE = "image.url.properties"; } public enum DeckEditorMode { + FREE_BUILDING, LIMITED_BUILDING, SIDEBOARDING } public enum SortBy { - CASTING_COST ("Casting Cost"), - RARITY ("Rarity"), - COLOR ("Color"), - COLOR_DETAILED ("Color Detailed"), - NAME ("Name"), - UNSORTED ("Unsorted"); + + CASTING_COST("Casting Cost"), + RARITY("Rarity"), + COLOR("Color"), + COLOR_IDENTITY("Color Identity"), + NAME("Name"), + UNSORTED("Unsorted"); private final String text; @@ -120,8 +123,8 @@ public final class Constants { return RARITY; case "Color": return COLOR; - case "Color Detailed": - return COLOR_DETAILED; + case "Color Identity": + return COLOR_IDENTITY; case "Name": return NAME; default: diff --git a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.form b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.form index b15bbcdd6aa..8008ce940d9 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.form +++ b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.form @@ -25,13 +25,13 @@ - + - + @@ -69,8 +69,11 @@ - + + + + @@ -200,18 +203,18 @@ - - + - - - + + + + - + @@ -335,9 +338,9 @@ - - - + + + @@ -528,7 +531,7 @@ - + @@ -730,11 +733,11 @@ - + - - + + @@ -769,29 +772,34 @@ - - - - - - - - - - + + + + - - + + + + + + + + + - - - + + + + + + + - + @@ -899,36 +907,37 @@ - - + + + + + + + + + + + + + + + + + + + + - - + + + + + + - - - - - - - - - - - - - - - - - - - - - @@ -1206,120 +1215,54 @@ - + + + + - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - @@ -1329,41 +1272,26 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + - + - + @@ -1377,17 +1305,26 @@ + + + + + + + + + - + - + @@ -1401,17 +1338,59 @@ + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1425,17 +1404,26 @@ + + + + + + + + + - + - + @@ -1449,29 +1437,30 @@ + + + + + + + + + - + - + - - - - - - - - @@ -1481,17 +1470,26 @@ + + + + + + + + + - + - + @@ -1505,17 +1503,26 @@ + + + + + + + + + - + - + @@ -1529,17 +1536,26 @@ + + + + + + + + + - + - + @@ -1553,17 +1569,26 @@ + + + + + + + + + - + - + @@ -1577,17 +1602,26 @@ + + + + + + + + + - + - + @@ -1601,17 +1635,419 @@ + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1634,19 +2070,18 @@ - + - - + + + - - - + - + @@ -1662,7 +2097,7 @@ - + @@ -1859,7 +2294,7 @@ - + diff --git a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java index 48cad49da1e..5dbdc5539c1 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java +++ b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java @@ -42,9 +42,7 @@ import java.awt.event.MouseEvent; import java.awt.image.BufferedImage; import java.io.File; import java.util.HashMap; -import java.util.HashSet; import java.util.Map; -import java.util.Set; import java.util.prefs.BackingStoreException; import java.util.prefs.Preferences; import javax.swing.BorderFactory; @@ -63,6 +61,10 @@ import mage.client.MageFrame; import mage.client.util.Config; import mage.client.util.ImageHelper; import mage.client.util.gui.BufferedImageBuilder; +import static mage.constants.Constants.DEFAULT_AVATAR_ID; +import static mage.constants.Constants.MAX_AVATAR_ID; +import static mage.constants.Constants.MIN_AVATAR_ID; +import mage.players.net.UserData; import mage.players.net.UserGroup; import mage.players.net.UserSkipPrioritySteps; import mage.remote.Connection; @@ -264,29 +266,12 @@ public class PreferencesDialog extends javax.swing.JDialog { public static String PHASE_ON = "on"; public static String PHASE_OFF = "off"; - public static final int DEFAULT_AVATAR_ID = 51; - private static int selectedAvatarId = DEFAULT_AVATAR_ID; - private static final Set available_avatars = new HashSet<>(); private static final Map panels = new HashMap<>(); private static final Border GREEN_BORDER = BorderFactory.createLineBorder(Color.GREEN, 3); private static final Border BLACK_BORDER = BorderFactory.createLineBorder(Color.BLACK, 3); - static { - available_avatars.add(51); - available_avatars.add(13); - available_avatars.add(9); - available_avatars.add(53); - available_avatars.add(10); - available_avatars.add(39); - available_avatars.add(19); - available_avatars.add(30); - available_avatars.add(25); - - available_avatars.add(22); - available_avatars.add(77); - available_avatars.add(62); - } + private static int selectedAvatarId = DEFAULT_AVATAR_ID; private final JFileChooser fc = new JFileChooser(); @@ -433,20 +418,30 @@ public class PreferencesDialog extends javax.swing.JDialog { tabAvatars = new javax.swing.JPanel(); avatarPane = new javax.swing.JScrollPane(); avatarPanel = new javax.swing.JPanel(); - jLabel12 = new javax.swing.JLabel(); jPanel10 = new javax.swing.JPanel(); - jPanel13 = new javax.swing.JPanel(); jPanel11 = new javax.swing.JPanel(); jPanel12 = new javax.swing.JPanel(); + jPanel13 = new javax.swing.JPanel(); jPanel14 = new javax.swing.JPanel(); jPanel15 = new javax.swing.JPanel(); - jLabel13 = new javax.swing.JLabel(); jPanel16 = new javax.swing.JPanel(); jPanel17 = new javax.swing.JPanel(); jPanel18 = new javax.swing.JPanel(); jPanel19 = new javax.swing.JPanel(); jPanel20 = new javax.swing.JPanel(); jPanel21 = new javax.swing.JPanel(); + jPanel22 = new javax.swing.JPanel(); + jPanel23 = new javax.swing.JPanel(); + jPanel24 = new javax.swing.JPanel(); + jPanel25 = new javax.swing.JPanel(); + jPanel26 = new javax.swing.JPanel(); + jPanel27 = new javax.swing.JPanel(); + jPanel28 = new javax.swing.JPanel(); + jPanel29 = new javax.swing.JPanel(); + jPanel30 = new javax.swing.JPanel(); + jPanel31 = new javax.swing.JPanel(); + jPanel32 = new javax.swing.JPanel(); + jPanel33 = new javax.swing.JPanel(); tabConnection = new javax.swing.JPanel(); lblProxyType = new javax.swing.JLabel(); cbProxyType = new javax.swing.JComboBox(); @@ -608,16 +603,16 @@ public class PreferencesDialog extends javax.swing.JDialog { main_gameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(main_gameLayout.createSequentialGroup() .addContainerGap() - .addGroup(main_gameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(cbAllowRequestToShowHandCards, javax.swing.GroupLayout.PREFERRED_SIZE, 546, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(main_gameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(main_gameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(showPlayerNamesPermanently, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(nonLandPermanentsInOnePile, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(showAbilityPickerForced, javax.swing.GroupLayout.Alignment.LEADING)) - .addComponent(cbShowStormCounter, javax.swing.GroupLayout.PREFERRED_SIZE, 546, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(cbConfirmEmptyManaPool, javax.swing.GroupLayout.PREFERRED_SIZE, 546, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(cbAskMoveToGraveOrder, javax.swing.GroupLayout.PREFERRED_SIZE, 546, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(cbConfirmEmptyManaPool, javax.swing.GroupLayout.DEFAULT_SIZE, 485, Short.MAX_VALUE) + .addComponent(cbAllowRequestToShowHandCards, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(cbShowStormCounter, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(cbAskMoveToGraveOrder, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap(7, Short.MAX_VALUE)) ); main_gameLayout.setVerticalGroup( main_gameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -666,9 +661,9 @@ public class PreferencesDialog extends javax.swing.JDialog { main_gamelogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(main_gamelogLayout.createSequentialGroup() .addContainerGap() - .addGroup(main_gamelogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(cbGameLogAutoSave, javax.swing.GroupLayout.PREFERRED_SIZE, 528, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(cbDraftLogAutoSave, javax.swing.GroupLayout.PREFERRED_SIZE, 528, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(main_gamelogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(cbDraftLogAutoSave, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(cbGameLogAutoSave, javax.swing.GroupLayout.DEFAULT_SIZE, 473, Short.MAX_VALUE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); main_gamelogLayout.setVerticalGroup( @@ -687,8 +682,10 @@ public class PreferencesDialog extends javax.swing.JDialog { .addContainerGap() .addGroup(tabMainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(main_card, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(main_game, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(main_gamelog, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(main_gamelog, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(tabMainLayout.createSequentialGroup() + .addComponent(main_game, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE))) .addContainerGap()) ); tabMainLayout.setVerticalGroup( @@ -915,7 +912,7 @@ public class PreferencesDialog extends javax.swing.JDialog { .addComponent(jLabelEndOfTurn) .addComponent(checkBoxEndTurnOthers)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(phases_stopSettings, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(phases_stopSettings, javax.swing.GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE) .addContainerGap()) ); @@ -962,24 +959,27 @@ public class PreferencesDialog extends javax.swing.JDialog { panelCardImages.setLayout(panelCardImagesLayout); panelCardImagesLayout.setHorizontalGroup( panelCardImagesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(panelCardImagesLayout.createSequentialGroup() - .addGap(24, 24, 24) - .addComponent(txtImageFolderPath) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(btnBrowseImageLocation)) .addGroup(panelCardImagesLayout.createSequentialGroup() .addGroup(panelCardImagesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(cbUseDefaultImageFolder) - .addComponent(cbCheckForNewImages) .addGroup(panelCardImagesLayout.createSequentialGroup() - .addGroup(panelCardImagesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) - .addGroup(javax.swing.GroupLayout.Alignment.LEADING, panelCardImagesLayout.createSequentialGroup() - .addContainerGap() - .addComponent(labelPreferedImageLanguage)) - .addComponent(cbSaveToZipFiles, javax.swing.GroupLayout.Alignment.LEADING)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(cbPreferedImageLanguage, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addGap(0, 0, Short.MAX_VALUE)) + .addGroup(panelCardImagesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(cbUseDefaultImageFolder) + .addComponent(cbCheckForNewImages) + .addGroup(panelCardImagesLayout.createSequentialGroup() + .addGroup(panelCardImagesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, panelCardImagesLayout.createSequentialGroup() + .addContainerGap() + .addComponent(labelPreferedImageLanguage)) + .addComponent(cbSaveToZipFiles, javax.swing.GroupLayout.Alignment.LEADING)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(cbPreferedImageLanguage, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGap(0, 190, Short.MAX_VALUE)) + .addGroup(panelCardImagesLayout.createSequentialGroup() + .addGap(24, 24, 24) + .addComponent(txtImageFolderPath) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(btnBrowseImageLocation))) + .addContainerGap()) ); panelCardImagesLayout.setVerticalGroup( panelCardImagesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -1061,32 +1061,29 @@ public class PreferencesDialog extends javax.swing.JDialog { .addGroup(panelBackgroundImagesLayout.createSequentialGroup() .addGroup(panelBackgroundImagesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panelBackgroundImagesLayout.createSequentialGroup() - .addGap(19, 19, 19) - .addComponent(jLabel14)) - .addGroup(panelBackgroundImagesLayout.createSequentialGroup() - .addGap(25, 25, 25) - .addComponent(jLabel15))) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(panelBackgroundImagesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(panelBackgroundImagesLayout.createSequentialGroup() - .addComponent(txtBattlefieldImagePath, javax.swing.GroupLayout.PREFERRED_SIZE, 336, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(panelBackgroundImagesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(panelBackgroundImagesLayout.createSequentialGroup() + .addGap(19, 19, 19) + .addComponent(jLabel14)) + .addGroup(panelBackgroundImagesLayout.createSequentialGroup() + .addGap(25, 25, 25) + .addComponent(jLabel15))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(btnBrowseBattlefieldImage)) - .addGroup(panelBackgroundImagesLayout.createSequentialGroup() - .addComponent(txtBackgroundImagePath, javax.swing.GroupLayout.PREFERRED_SIZE, 332, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(panelBackgroundImagesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(txtBackgroundImagePath) + .addComponent(txtBattlefieldImagePath)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(btnBrowseBackgroundImage))) - .addGap(0, 0, Short.MAX_VALUE)) - .addGroup(panelBackgroundImagesLayout.createSequentialGroup() - .addGroup(panelBackgroundImagesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(cbUseRandomBattleImage) - .addComponent(cbUseDefaultBattleImage) - .addComponent(cbUseDefaultBackground)) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(panelBackgroundImagesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(btnBrowseBackgroundImage, javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(btnBrowseBattlefieldImage, javax.swing.GroupLayout.Alignment.TRAILING))) + .addGroup(panelBackgroundImagesLayout.createSequentialGroup() + .addGroup(panelBackgroundImagesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(cbUseRandomBattleImage) + .addComponent(cbUseDefaultBattleImage) + .addComponent(cbUseDefaultBackground)) + .addGap(0, 0, Short.MAX_VALUE))) + .addContainerGap()) ); - - panelBackgroundImagesLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {txtBackgroundImagePath, txtBattlefieldImagePath}); - panelBackgroundImagesLayout.setVerticalGroup( panelBackgroundImagesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panelBackgroundImagesLayout.createSequentialGroup() @@ -1115,8 +1112,8 @@ public class PreferencesDialog extends javax.swing.JDialog { .addGroup(tabImagesLayout.createSequentialGroup() .addContainerGap() .addGroup(tabImagesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(panelCardImages, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(panelBackgroundImages, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(panelCardImages, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(panelBackgroundImages, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); tabImagesLayout.setVerticalGroup( @@ -1248,249 +1245,459 @@ public class PreferencesDialog extends javax.swing.JDialog { tabsPanel.addTab("Sounds", tabSounds); - jLabel12.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N - jLabel12.setText("Choose your avatar:"); + avatarPane.setMaximumSize(new java.awt.Dimension(508, 772)); + avatarPane.setMinimumSize(new java.awt.Dimension(508, 772)); + avatarPane.setPreferredSize(new java.awt.Dimension(508, 772)); + + avatarPanel.setMaximumSize(new java.awt.Dimension(508, 772)); + avatarPanel.setMinimumSize(new java.awt.Dimension(508, 772)); + avatarPanel.setPreferredSize(new java.awt.Dimension(508, 772)); + avatarPanel.setLayout(new java.awt.GridLayout(6, 4, 20, 20)); jPanel10.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true)); + jPanel10.setMaximumSize(new java.awt.Dimension(102, 102)); + jPanel10.setMinimumSize(new java.awt.Dimension(102, 102)); + jPanel10.setPreferredSize(new java.awt.Dimension(102, 102)); javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10); jPanel10.setLayout(jPanel10Layout); jPanel10Layout.setHorizontalGroup( jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 100, Short.MAX_VALUE) + .addGap(0, 110, Short.MAX_VALUE) ); jPanel10Layout.setVerticalGroup( jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 100, Short.MAX_VALUE) + .addGap(0, 110, Short.MAX_VALUE) ); - jPanel13.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true)); - - javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13); - jPanel13.setLayout(jPanel13Layout); - jPanel13Layout.setHorizontalGroup( - jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 100, Short.MAX_VALUE) - ); - jPanel13Layout.setVerticalGroup( - jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 100, Short.MAX_VALUE) - ); + avatarPanel.add(jPanel10); jPanel11.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true)); + jPanel11.setMaximumSize(new java.awt.Dimension(102, 102)); + jPanel11.setMinimumSize(new java.awt.Dimension(102, 102)); + jPanel11.setPreferredSize(new java.awt.Dimension(102, 102)); javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11); jPanel11.setLayout(jPanel11Layout); jPanel11Layout.setHorizontalGroup( jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 100, Short.MAX_VALUE) + .addGap(0, 110, Short.MAX_VALUE) ); jPanel11Layout.setVerticalGroup( jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 100, Short.MAX_VALUE) + .addGap(0, 110, Short.MAX_VALUE) ); + avatarPanel.add(jPanel11); + jPanel12.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true)); + jPanel12.setMaximumSize(new java.awt.Dimension(102, 102)); + jPanel12.setMinimumSize(new java.awt.Dimension(102, 102)); + jPanel12.setPreferredSize(new java.awt.Dimension(102, 102)); javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12); jPanel12.setLayout(jPanel12Layout); jPanel12Layout.setHorizontalGroup( jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 100, Short.MAX_VALUE) + .addGap(0, 110, Short.MAX_VALUE) ); jPanel12Layout.setVerticalGroup( jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 100, Short.MAX_VALUE) + .addGap(0, 110, Short.MAX_VALUE) ); + avatarPanel.add(jPanel12); + + jPanel13.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true)); + jPanel13.setMaximumSize(new java.awt.Dimension(102, 102)); + jPanel13.setMinimumSize(new java.awt.Dimension(102, 102)); + jPanel13.setPreferredSize(new java.awt.Dimension(102, 102)); + + javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13); + jPanel13.setLayout(jPanel13Layout); + jPanel13Layout.setHorizontalGroup( + jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 110, Short.MAX_VALUE) + ); + jPanel13Layout.setVerticalGroup( + jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 0, Short.MAX_VALUE) + ); + + avatarPanel.add(jPanel13); + jPanel14.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true)); + jPanel14.setMaximumSize(new java.awt.Dimension(102, 102)); + jPanel14.setMinimumSize(new java.awt.Dimension(102, 102)); + jPanel14.setPreferredSize(new java.awt.Dimension(102, 102)); javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14); jPanel14.setLayout(jPanel14Layout); jPanel14Layout.setHorizontalGroup( jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 100, Short.MAX_VALUE) + .addGap(0, 110, Short.MAX_VALUE) ); jPanel14Layout.setVerticalGroup( jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 100, Short.MAX_VALUE) + .addGap(0, 110, Short.MAX_VALUE) ); + avatarPanel.add(jPanel14); + jPanel15.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true)); + jPanel15.setMaximumSize(new java.awt.Dimension(102, 102)); + jPanel15.setMinimumSize(new java.awt.Dimension(102, 102)); + jPanel15.setPreferredSize(new java.awt.Dimension(102, 102)); javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15); jPanel15.setLayout(jPanel15Layout); jPanel15Layout.setHorizontalGroup( jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 100, Short.MAX_VALUE) + .addGap(0, 110, Short.MAX_VALUE) ); jPanel15Layout.setVerticalGroup( jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 100, Short.MAX_VALUE) + .addGap(0, 110, Short.MAX_VALUE) ); - jLabel13.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N - jLabel13.setText("New avatars:"); + avatarPanel.add(jPanel15); jPanel16.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true)); + jPanel16.setMaximumSize(new java.awt.Dimension(102, 102)); + jPanel16.setMinimumSize(new java.awt.Dimension(102, 102)); + jPanel16.setPreferredSize(new java.awt.Dimension(102, 102)); javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16); jPanel16.setLayout(jPanel16Layout); jPanel16Layout.setHorizontalGroup( jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 100, Short.MAX_VALUE) + .addGap(0, 110, Short.MAX_VALUE) ); jPanel16Layout.setVerticalGroup( jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 100, Short.MAX_VALUE) + .addGap(0, 110, Short.MAX_VALUE) ); + avatarPanel.add(jPanel16); + jPanel17.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true)); + jPanel17.setMaximumSize(new java.awt.Dimension(102, 102)); + jPanel17.setMinimumSize(new java.awt.Dimension(102, 102)); + jPanel17.setPreferredSize(new java.awt.Dimension(102, 102)); javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17); jPanel17.setLayout(jPanel17Layout); jPanel17Layout.setHorizontalGroup( jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 100, Short.MAX_VALUE) + .addGap(0, 110, Short.MAX_VALUE) ); jPanel17Layout.setVerticalGroup( jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 100, Short.MAX_VALUE) + .addGap(0, 110, Short.MAX_VALUE) ); + avatarPanel.add(jPanel17); + jPanel18.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true)); + jPanel18.setMaximumSize(new java.awt.Dimension(102, 102)); + jPanel18.setMinimumSize(new java.awt.Dimension(102, 102)); + jPanel18.setPreferredSize(new java.awt.Dimension(102, 102)); javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18); jPanel18.setLayout(jPanel18Layout); jPanel18Layout.setHorizontalGroup( jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 100, Short.MAX_VALUE) + .addGap(0, 110, Short.MAX_VALUE) ); jPanel18Layout.setVerticalGroup( jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 100, Short.MAX_VALUE) + .addGap(0, 110, Short.MAX_VALUE) ); + avatarPanel.add(jPanel18); + jPanel19.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true)); + jPanel19.setMaximumSize(new java.awt.Dimension(102, 102)); + jPanel19.setMinimumSize(new java.awt.Dimension(102, 102)); + jPanel19.setPreferredSize(new java.awt.Dimension(102, 102)); javax.swing.GroupLayout jPanel19Layout = new javax.swing.GroupLayout(jPanel19); jPanel19.setLayout(jPanel19Layout); jPanel19Layout.setHorizontalGroup( jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 100, Short.MAX_VALUE) + .addGap(0, 110, Short.MAX_VALUE) ); jPanel19Layout.setVerticalGroup( jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 100, Short.MAX_VALUE) + .addGap(0, 110, Short.MAX_VALUE) ); + avatarPanel.add(jPanel19); + jPanel20.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true)); + jPanel20.setMaximumSize(new java.awt.Dimension(102, 102)); + jPanel20.setMinimumSize(new java.awt.Dimension(102, 102)); + jPanel20.setPreferredSize(new java.awt.Dimension(102, 102)); javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20); jPanel20.setLayout(jPanel20Layout); jPanel20Layout.setHorizontalGroup( jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 100, Short.MAX_VALUE) + .addGap(0, 110, Short.MAX_VALUE) ); jPanel20Layout.setVerticalGroup( jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 100, Short.MAX_VALUE) + .addGap(0, 110, Short.MAX_VALUE) ); + avatarPanel.add(jPanel20); + jPanel21.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true)); + jPanel21.setMaximumSize(new java.awt.Dimension(102, 102)); + jPanel21.setMinimumSize(new java.awt.Dimension(102, 102)); + jPanel21.setPreferredSize(new java.awt.Dimension(102, 102)); javax.swing.GroupLayout jPanel21Layout = new javax.swing.GroupLayout(jPanel21); jPanel21.setLayout(jPanel21Layout); jPanel21Layout.setHorizontalGroup( jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 100, Short.MAX_VALUE) + .addGap(0, 110, Short.MAX_VALUE) ); jPanel21Layout.setVerticalGroup( jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 100, Short.MAX_VALUE) + .addGap(0, 110, Short.MAX_VALUE) ); - javax.swing.GroupLayout avatarPanelLayout = new javax.swing.GroupLayout(avatarPanel); - avatarPanel.setLayout(avatarPanelLayout); - avatarPanelLayout.setHorizontalGroup( - avatarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(avatarPanelLayout.createSequentialGroup() - .addGroup(avatarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(avatarPanelLayout.createSequentialGroup() - .addContainerGap() - .addComponent(jLabel12)) - .addGroup(avatarPanelLayout.createSequentialGroup() - .addGroup(avatarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(avatarPanelLayout.createSequentialGroup() - .addGap(30, 30, 30) - .addGroup(avatarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jPanel19, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(33, 33, 33) - .addGroup(avatarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jPanel20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addGroup(avatarPanelLayout.createSequentialGroup() - .addContainerGap() - .addGroup(avatarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(avatarPanelLayout.createSequentialGroup() - .addGap(20, 20, 20) - .addComponent(jPanel16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(33, 33, 33) - .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addComponent(jLabel13)))) - .addGap(32, 32, 32) - .addGroup(avatarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jPanel18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jPanel21, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + avatarPanel.add(jPanel21); + + jPanel22.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true)); + jPanel22.setMaximumSize(new java.awt.Dimension(102, 102)); + jPanel22.setMinimumSize(new java.awt.Dimension(102, 102)); + jPanel22.setPreferredSize(new java.awt.Dimension(102, 102)); + + javax.swing.GroupLayout jPanel22Layout = new javax.swing.GroupLayout(jPanel22); + jPanel22.setLayout(jPanel22Layout); + jPanel22Layout.setHorizontalGroup( + jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 110, Short.MAX_VALUE) ); - avatarPanelLayout.setVerticalGroup( - avatarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(avatarPanelLayout.createSequentialGroup() - .addContainerGap() - .addComponent(jLabel12) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(avatarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(26, 26, 26) - .addGroup(avatarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(23, 23, 23) - .addGroup(avatarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(jPanel19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jPanel20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jPanel21, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(18, 18, 18) - .addGroup(avatarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addGroup(avatarPanelLayout.createSequentialGroup() - .addComponent(jLabel13) - .addGap(18, 18, 18) - .addComponent(jPanel16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jPanel18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(25, 25, 25)) + jPanel22Layout.setVerticalGroup( + jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 110, Short.MAX_VALUE) ); + avatarPanel.add(jPanel22); + + jPanel23.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true)); + jPanel23.setMaximumSize(new java.awt.Dimension(102, 102)); + jPanel23.setMinimumSize(new java.awt.Dimension(102, 102)); + jPanel23.setPreferredSize(new java.awt.Dimension(102, 102)); + + javax.swing.GroupLayout jPanel23Layout = new javax.swing.GroupLayout(jPanel23); + jPanel23.setLayout(jPanel23Layout); + jPanel23Layout.setHorizontalGroup( + jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 110, Short.MAX_VALUE) + ); + jPanel23Layout.setVerticalGroup( + jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 110, Short.MAX_VALUE) + ); + + avatarPanel.add(jPanel23); + + jPanel24.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true)); + jPanel24.setMaximumSize(new java.awt.Dimension(102, 102)); + jPanel24.setMinimumSize(new java.awt.Dimension(102, 102)); + jPanel24.setPreferredSize(new java.awt.Dimension(102, 102)); + + javax.swing.GroupLayout jPanel24Layout = new javax.swing.GroupLayout(jPanel24); + jPanel24.setLayout(jPanel24Layout); + jPanel24Layout.setHorizontalGroup( + jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 110, Short.MAX_VALUE) + ); + jPanel24Layout.setVerticalGroup( + jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 110, Short.MAX_VALUE) + ); + + avatarPanel.add(jPanel24); + + jPanel25.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true)); + jPanel25.setMaximumSize(new java.awt.Dimension(102, 102)); + jPanel25.setMinimumSize(new java.awt.Dimension(102, 102)); + jPanel25.setPreferredSize(new java.awt.Dimension(102, 102)); + + javax.swing.GroupLayout jPanel25Layout = new javax.swing.GroupLayout(jPanel25); + jPanel25.setLayout(jPanel25Layout); + jPanel25Layout.setHorizontalGroup( + jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 110, Short.MAX_VALUE) + ); + jPanel25Layout.setVerticalGroup( + jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 110, Short.MAX_VALUE) + ); + + avatarPanel.add(jPanel25); + + jPanel26.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true)); + jPanel26.setMaximumSize(new java.awt.Dimension(102, 102)); + jPanel26.setMinimumSize(new java.awt.Dimension(102, 102)); + jPanel26.setPreferredSize(new java.awt.Dimension(102, 102)); + + javax.swing.GroupLayout jPanel26Layout = new javax.swing.GroupLayout(jPanel26); + jPanel26.setLayout(jPanel26Layout); + jPanel26Layout.setHorizontalGroup( + jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 110, Short.MAX_VALUE) + ); + jPanel26Layout.setVerticalGroup( + jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 110, Short.MAX_VALUE) + ); + + avatarPanel.add(jPanel26); + + jPanel27.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true)); + jPanel27.setMaximumSize(new java.awt.Dimension(102, 102)); + jPanel27.setMinimumSize(new java.awt.Dimension(102, 102)); + jPanel27.setPreferredSize(new java.awt.Dimension(102, 102)); + + javax.swing.GroupLayout jPanel27Layout = new javax.swing.GroupLayout(jPanel27); + jPanel27.setLayout(jPanel27Layout); + jPanel27Layout.setHorizontalGroup( + jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 110, Short.MAX_VALUE) + ); + jPanel27Layout.setVerticalGroup( + jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 110, Short.MAX_VALUE) + ); + + avatarPanel.add(jPanel27); + + jPanel28.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true)); + jPanel28.setMaximumSize(new java.awt.Dimension(102, 102)); + jPanel28.setMinimumSize(new java.awt.Dimension(102, 102)); + jPanel28.setPreferredSize(new java.awt.Dimension(102, 102)); + + javax.swing.GroupLayout jPanel28Layout = new javax.swing.GroupLayout(jPanel28); + jPanel28.setLayout(jPanel28Layout); + jPanel28Layout.setHorizontalGroup( + jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 110, Short.MAX_VALUE) + ); + jPanel28Layout.setVerticalGroup( + jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 110, Short.MAX_VALUE) + ); + + avatarPanel.add(jPanel28); + + jPanel29.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true)); + jPanel29.setMaximumSize(new java.awt.Dimension(102, 102)); + jPanel29.setMinimumSize(new java.awt.Dimension(102, 102)); + jPanel29.setPreferredSize(new java.awt.Dimension(102, 102)); + + javax.swing.GroupLayout jPanel29Layout = new javax.swing.GroupLayout(jPanel29); + jPanel29.setLayout(jPanel29Layout); + jPanel29Layout.setHorizontalGroup( + jPanel29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 110, Short.MAX_VALUE) + ); + jPanel29Layout.setVerticalGroup( + jPanel29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 110, Short.MAX_VALUE) + ); + + avatarPanel.add(jPanel29); + + jPanel30.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true)); + jPanel30.setMaximumSize(new java.awt.Dimension(102, 102)); + jPanel30.setMinimumSize(new java.awt.Dimension(102, 102)); + jPanel30.setPreferredSize(new java.awt.Dimension(102, 102)); + + javax.swing.GroupLayout jPanel30Layout = new javax.swing.GroupLayout(jPanel30); + jPanel30.setLayout(jPanel30Layout); + jPanel30Layout.setHorizontalGroup( + jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 110, Short.MAX_VALUE) + ); + jPanel30Layout.setVerticalGroup( + jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 110, Short.MAX_VALUE) + ); + + avatarPanel.add(jPanel30); + + jPanel31.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true)); + jPanel31.setMaximumSize(new java.awt.Dimension(102, 102)); + jPanel31.setMinimumSize(new java.awt.Dimension(102, 102)); + jPanel31.setPreferredSize(new java.awt.Dimension(102, 102)); + + javax.swing.GroupLayout jPanel31Layout = new javax.swing.GroupLayout(jPanel31); + jPanel31.setLayout(jPanel31Layout); + jPanel31Layout.setHorizontalGroup( + jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 110, Short.MAX_VALUE) + ); + jPanel31Layout.setVerticalGroup( + jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 110, Short.MAX_VALUE) + ); + + avatarPanel.add(jPanel31); + + jPanel32.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true)); + jPanel32.setMaximumSize(new java.awt.Dimension(102, 102)); + jPanel32.setMinimumSize(new java.awt.Dimension(102, 102)); + jPanel32.setPreferredSize(new java.awt.Dimension(102, 102)); + + javax.swing.GroupLayout jPanel32Layout = new javax.swing.GroupLayout(jPanel32); + jPanel32.setLayout(jPanel32Layout); + jPanel32Layout.setHorizontalGroup( + jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 110, Short.MAX_VALUE) + ); + jPanel32Layout.setVerticalGroup( + jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 110, Short.MAX_VALUE) + ); + + avatarPanel.add(jPanel32); + + jPanel33.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true)); + jPanel33.setMaximumSize(new java.awt.Dimension(102, 102)); + jPanel33.setMinimumSize(new java.awt.Dimension(102, 102)); + + javax.swing.GroupLayout jPanel33Layout = new javax.swing.GroupLayout(jPanel33); + jPanel33.setLayout(jPanel33Layout); + jPanel33Layout.setHorizontalGroup( + jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 110, Short.MAX_VALUE) + ); + jPanel33Layout.setVerticalGroup( + jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 110, Short.MAX_VALUE) + ); + + avatarPanel.add(jPanel33); + avatarPane.setViewportView(avatarPanel); javax.swing.GroupLayout tabAvatarsLayout = new javax.swing.GroupLayout(tabAvatars); tabAvatars.setLayout(tabAvatarsLayout); tabAvatarsLayout.setHorizontalGroup( tabAvatarsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(avatarPane, javax.swing.GroupLayout.DEFAULT_SIZE, 590, Short.MAX_VALUE) + .addGroup(tabAvatarsLayout.createSequentialGroup() + .addComponent(avatarPane, javax.swing.GroupLayout.PREFERRED_SIZE, 527, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE)) ); tabAvatarsLayout.setVerticalGroup( tabAvatarsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(avatarPane, javax.swing.GroupLayout.DEFAULT_SIZE, 432, Short.MAX_VALUE) + .addComponent(avatarPane, javax.swing.GroupLayout.PREFERRED_SIZE, 418, Short.MAX_VALUE) ); tabsPanel.addTab("Avatars", tabAvatars); @@ -1629,7 +1836,7 @@ public class PreferencesDialog extends javax.swing.JDialog { .addContainerGap() .addComponent(lblURLServerList, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(txtURLServerList, javax.swing.GroupLayout.PREFERRED_SIZE, 421, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(txtURLServerList, javax.swing.GroupLayout.PREFERRED_SIZE, 370, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(connection_serversLayout.createSequentialGroup() .addGap(141, 141, 141) .addComponent(jLabel17))) @@ -1651,15 +1858,14 @@ public class PreferencesDialog extends javax.swing.JDialog { tabConnectionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(tabConnectionLayout.createSequentialGroup() .addContainerGap() - .addGroup(tabConnectionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(tabConnectionLayout.createSequentialGroup() + .addGroup(tabConnectionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addComponent(pnlProxySettings, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, tabConnectionLayout.createSequentialGroup() .addComponent(lblProxyType) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(cbProxyType, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, Short.MAX_VALUE)) - .addComponent(pnlProxySettings, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(cbProxyType, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(connection_servers, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addContainerGap()) + .addContainerGap(16, Short.MAX_VALUE)) ); tabConnectionLayout.setVerticalGroup( tabConnectionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -1672,7 +1878,7 @@ public class PreferencesDialog extends javax.swing.JDialog { .addComponent(cbProxyType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addComponent(pnlProxySettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(90, Short.MAX_VALUE)) + .addContainerGap(107, Short.MAX_VALUE)) ); pnlProxySettings.getAccessibleContext().setAccessibleDescription(""); @@ -1700,12 +1906,12 @@ public class PreferencesDialog extends javax.swing.JDialog { layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap(405, Short.MAX_VALUE) .addComponent(saveButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(exitButton, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) - .addComponent(tabsPanel) + .addComponent(tabsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -1795,10 +2001,11 @@ public class PreferencesDialog extends javax.swing.JDialog { save(prefs, dialog.txtURLServerList, KEY_CONNECTION_URL_SERVER_LIST); // Avatar - if (available_avatars.contains(selectedAvatarId)) { - prefs.put(KEY_AVATAR, String.valueOf(selectedAvatarId)); - updateCache(KEY_AVATAR, String.valueOf(selectedAvatarId)); + if (selectedAvatarId < MIN_AVATAR_ID || selectedAvatarId > MAX_AVATAR_ID) { + selectedAvatarId = DEFAULT_AVATAR_ID; } + prefs.put(KEY_AVATAR, String.valueOf(selectedAvatarId)); + updateCache(KEY_AVATAR, String.valueOf(selectedAvatarId)); try { MageFrame.getClient().setPreferences(getUserData()); @@ -2275,7 +2482,7 @@ public class PreferencesDialog extends javax.swing.JDialog { } catch (NumberFormatException n) { selectedAvatarId = DEFAULT_AVATAR_ID; } finally { - if (!available_avatars.contains(selectedAvatarId)) { + if (selectedAvatarId < MIN_AVATAR_ID || selectedAvatarId > MAX_AVATAR_ID) { selectedAvatarId = DEFAULT_AVATAR_ID; } } @@ -2441,26 +2648,37 @@ public class PreferencesDialog extends javax.swing.JDialog { private void addAvatars() { try { - addAvatar(jPanel10, 51, true, false); + addAvatar(jPanel10, 10, true, false); + addAvatar(jPanel11, 11, false, false); + addAvatar(jPanel12, 12, false, false); addAvatar(jPanel13, 13, false, false); - addAvatar(jPanel11, 9, false, false); - addAvatar(jPanel12, 53, false, false); - addAvatar(jPanel14, 10, false, false); - addAvatar(jPanel15, 39, false, false); + addAvatar(jPanel14, 14, false, false); + addAvatar(jPanel15, 15, false, false); + addAvatar(jPanel16, 16, false, false); + addAvatar(jPanel17, 17, false, false); + addAvatar(jPanel18, 18, false, false); addAvatar(jPanel19, 19, false, false); - addAvatar(jPanel20, 30, false, false); - addAvatar(jPanel21, 25, false, false); + addAvatar(jPanel20, 20, false, false); + addAvatar(jPanel21, 21, false, false); + addAvatar(jPanel22, 22, false, false); + addAvatar(jPanel23, 23, false, false); + addAvatar(jPanel24, 24, false, false); + addAvatar(jPanel25, 25, false, false); + addAvatar(jPanel26, 26, false, false); + addAvatar(jPanel27, 27, false, false); + addAvatar(jPanel28, 28, false, false); + addAvatar(jPanel29, 29, false, false); + addAvatar(jPanel30, 30, false, false); + addAvatar(jPanel31, 31, false, false); + addAvatar(jPanel32, 32, false, false); - addAvatar(jPanel16, 22, false, false); - addAvatar(jPanel17, 77, false, false); - addAvatar(jPanel18, 62, false, false); } catch (Exception e) { log.error(e, e); } } public void setSelectedId(int id) { - if (available_avatars.contains(id)) { + if (id >= MIN_AVATAR_ID && id <= MAX_AVATAR_ID) { for (JPanel panel : panels.values()) { panel.setBorder(BLACK_BORDER); } @@ -2473,7 +2691,8 @@ public class PreferencesDialog extends javax.swing.JDialog { String path = "/avatars/" + String.valueOf(id) + ".jpg"; panels.put(id, jPanel); Image image = ImageHelper.getImageFromResources(path); - Rectangle r = new Rectangle(90, 90); + + Rectangle r = new Rectangle(jPanel.getWidth() - 5, jPanel.getHeight() - 5); BufferedImage bufferedImage; if (!locked) { bufferedImage = BufferedImageBuilder.bufferImage(image, BufferedImage.TYPE_INT_ARGB); @@ -2571,8 +2790,6 @@ public class PreferencesDialog extends javax.swing.JDialog { private javax.swing.JCheckBox displayBigCardsInHand; private javax.swing.JButton exitButton; private javax.swing.JLabel jLabel11; - private javax.swing.JLabel jLabel12; - private javax.swing.JLabel jLabel13; private javax.swing.JLabel jLabel14; private javax.swing.JLabel jLabel15; private javax.swing.JLabel jLabel16; @@ -2599,6 +2816,18 @@ public class PreferencesDialog extends javax.swing.JDialog { private javax.swing.JPanel jPanel19; private javax.swing.JPanel jPanel20; private javax.swing.JPanel jPanel21; + private javax.swing.JPanel jPanel22; + private javax.swing.JPanel jPanel23; + private javax.swing.JPanel jPanel24; + private javax.swing.JPanel jPanel25; + private javax.swing.JPanel jPanel26; + private javax.swing.JPanel jPanel27; + private javax.swing.JPanel jPanel28; + private javax.swing.JPanel jPanel29; + private javax.swing.JPanel jPanel30; + private javax.swing.JPanel jPanel31; + private javax.swing.JPanel jPanel32; + private javax.swing.JPanel jPanel33; private javax.swing.JLabel labelPreferedImageLanguage; private javax.swing.JLabel lblProxyPassword; private javax.swing.JLabel lblProxyPort; diff --git a/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java b/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java index b1da2a1d5c4..d23bf6869b5 100644 --- a/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java +++ b/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java @@ -59,6 +59,9 @@ import mage.client.util.ImageHelper; import mage.client.util.gui.BufferedImageBuilder; import mage.client.util.gui.countryBox.CountryUtil; import mage.components.ImagePanel; +import static mage.constants.Constants.DEFAULT_AVATAR_ID; +import static mage.constants.Constants.MAX_AVATAR_ID; +import static mage.constants.Constants.MIN_AVATAR_ID; import mage.constants.ManaType; import mage.utils.timer.PriorityTimer; import mage.view.ManaPoolView; @@ -91,7 +94,7 @@ public class PlayerPanelExt extends javax.swing.JPanel { private static final int AVATAR_COUNT = 77; - private static final String DEFAULT_AVATAR_PATH = "/avatars/51.jpg"; + private static final String DEFAULT_AVATAR_PATH = "/avatars/" + DEFAULT_AVATAR_ID + ".jpg"; private static final int PANEL_WIDTH = 94; private static final int PANEL_HEIGHT = 242; @@ -236,8 +239,8 @@ public class PlayerPanelExt extends javax.swing.JPanel { if (!MageFrame.isLite()) { int id = player.getUserData().getAvatarId(); - if (id <= 0) { - id = PreferencesDialog.DEFAULT_AVATAR_ID; + if (!(id >= 1000) && (id <= 0 || (id <= MIN_AVATAR_ID && id > MAX_AVATAR_ID))) { + id = DEFAULT_AVATAR_ID; } if (id != avatarId) { avatarId = id; diff --git a/Mage.Client/src/main/java/mage/client/util/CardViewColorDetailedComparator.java b/Mage.Client/src/main/java/mage/client/util/CardViewColorIdentityComparator.java similarity index 86% rename from Mage.Client/src/main/java/mage/client/util/CardViewColorDetailedComparator.java rename to Mage.Client/src/main/java/mage/client/util/CardViewColorIdentityComparator.java index 179254b961c..36be3025d11 100644 --- a/Mage.Client/src/main/java/mage/client/util/CardViewColorDetailedComparator.java +++ b/Mage.Client/src/main/java/mage/client/util/CardViewColorIdentityComparator.java @@ -25,21 +25,21 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.client.util; import java.util.Comparator; +import mage.utils.CardUtil; import mage.view.CardView; /** * * @author BetaSteward_at_googlemail.com */ -public class CardViewColorDetailedComparator implements Comparator { +public class CardViewColorIdentityComparator implements Comparator { @Override public int compare(CardView o1, CardView o2) { - return o1.getColor().hashCode() - o2.getColor().hashCode(); + return CardUtil.getColorIdentitySortValue(o1.getManaCost(), o1.getColor(), o1.getRules()) + - CardUtil.getColorIdentitySortValue(o2.getManaCost(), o2.getColor(), o2.getRules()); } - -} \ No newline at end of file +} diff --git a/Mage.Client/src/main/java/mage/client/util/CardViewCostComparator.java b/Mage.Client/src/main/java/mage/client/util/CardViewCostComparator.java index 22eae462b06..a77d685a489 100644 --- a/Mage.Client/src/main/java/mage/client/util/CardViewCostComparator.java +++ b/Mage.Client/src/main/java/mage/client/util/CardViewCostComparator.java @@ -1,16 +1,16 @@ /* * Copyright 2011 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 @@ -20,12 +20,11 @@ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.client.util; import java.util.Comparator; @@ -39,7 +38,7 @@ public class CardViewCostComparator implements Comparator { @Override public int compare(CardView o1, CardView o2) { - return Integer.valueOf(o1.getConvertedManaCost()).compareTo(Integer.valueOf(o2.getConvertedManaCost())); + return Integer.valueOf(o1.getConvertedManaCost()).compareTo(o2.getConvertedManaCost()); } } diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GathererSets.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GathererSets.java index 9b6554de8f2..b18182f5e80 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GathererSets.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GathererSets.java @@ -49,7 +49,7 @@ public class GathererSets implements Iterable { "THS", "BNG", "JOU", "CNS", "VMA", "TPR", "KTK", "FRF", "DTK", - "BFZ"}; + "BFZ", "EXP", "OGW"}; private static final HashMap symbolsReplacements = new HashMap<>(); static { diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MagicCardsImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MagicCardsImageSource.java index 88653281241..23c02863284 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MagicCardsImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MagicCardsImageSource.java @@ -16,6 +16,8 @@ public class MagicCardsImageSource implements CardImageSource { private static final Map setNameTokenReplacement = new HashMap() { { + put("ORG", "oath-of-the-gatewatch"); + put("EXP", "zendikar-expeditions"); put("BFZ", "battle-for-zendikar"); put("FVL", "from-the-vault-legends"); put("FVD", "from-the-vault-dragons"); diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MythicspoilerComSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MythicspoilerComSource.java index 0728084c111..ef80a0785ae 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MythicspoilerComSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MythicspoilerComSource.java @@ -36,7 +36,10 @@ import java.net.Proxy; import java.net.URL; import java.net.URLEncoder; import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedHashMap; import java.util.Map; +import java.util.Set; import java.util.prefs.Preferences; import mage.client.MageFrame; import mage.remote.Connection; @@ -56,6 +59,7 @@ public class MythicspoilerComSource implements CardImageSource { private static CardImageSource instance; private static Map setsAliases; private static Map cardNameAliases; + private static Map> cardNameAliasesStart; private final Map> sets; public static CardImageSource getInstance() { @@ -71,8 +75,9 @@ public class MythicspoilerComSource implements CardImageSource { } public MythicspoilerComSource() { - sets = new HashMap<>(); + sets = new LinkedHashMap<>(); setsAliases = new HashMap<>(); + setsAliases.put("exp", "bfz"); cardNameAliases = new HashMap<>(); // set+wrong name from web side => correct card name cardNameAliases.put("MM2-otherwordlyjourney", "otherworldlyjourney"); @@ -81,12 +86,21 @@ public class MythicspoilerComSource implements CardImageSource { cardNameAliases.put("THS-soldierofpantheon", "soldierofthepantheon"); cardNameAliases.put("THS-vulpinegolaith", "vulpinegoliath"); cardNameAliases.put("ORI-kothopedhoarderofsouls", "kothophedsoulhoarder"); + cardNameAliases.put("BFZ-unisonstrike", "tandemtactics"); + cardNameAliases.put("BFZ-eldrazidevastator", "eldrazidevastator"); + cardNameAliases.put("BFZ-kozliekschanneler", "kozilekschanneler"); + + cardNameAliasesStart = new HashMap<>(); + HashSet names = new HashSet<>(); + names.add("eldrazidevastator.jpg"); + cardNameAliasesStart.put("BFZ", names); } private Map getSetLinks(String cardSet) { Map setLinks = new HashMap<>(); try { String setNames = setsAliases.get(cardSet.toLowerCase()); + Set aliasesStart = cardNameAliasesStart.get(cardSet); if (setNames == null) { setNames = cardSet.toLowerCase(); } @@ -119,33 +133,42 @@ public class MythicspoilerComSource implements CardImageSource { } Elements cardsImages = doc.select("img[src^=cards/]"); // starts with cards/ + if (!aliasesStart.isEmpty()) { + for (String text : aliasesStart) { + cardsImages.addAll(doc.select("img[src^=" + text + "]")); + } + } if (cardsImages.isEmpty()) { break; } for (Element cardsImage : cardsImages) { String cardLink = cardsImage.attr("src"); + String cardName = null; if (cardLink.startsWith("cards/") && cardLink.endsWith(".jpg")) { - String cardName = cardLink.substring(6, cardLink.length() - 4); - if (cardName != null && !cardName.isEmpty()) { - if (cardNameAliases.containsKey(cardSet + "-" + cardName)) { - cardName = cardNameAliases.get(cardSet + "-" + cardName); - } - if (cardName.endsWith("1") || cardName.endsWith("2") || cardName.endsWith("3") || cardName.endsWith("4") || cardName.endsWith("5")) { - if (!cardName.startsWith("forest") - && !cardName.startsWith("swamp") - && !cardName.startsWith("mountain") - && !cardName.startsWith("island") - && !cardName.startsWith("plains")) { - cardName = cardName.substring(0, cardName.length() - 1); - } - } - setLinks.put(cardName, baseUrl + cardLink); - } + cardName = cardLink.substring(6, cardLink.length() - 4); + } else if (aliasesStart.contains(cardLink)) { + cardName = cardLink.substring(0, cardLink.length() - 4);; + } + if (cardName != null && !cardName.isEmpty()) { + if (cardNameAliases.containsKey(cardSet + "-" + cardName)) { + cardName = cardNameAliases.get(cardSet + "-" + cardName); + } + if (cardName.endsWith("1") || cardName.endsWith("2") || cardName.endsWith("3") || cardName.endsWith("4") || cardName.endsWith("5")) { + if (!cardName.startsWith("forest") + && !cardName.startsWith("swamp") + && !cardName.startsWith("mountain") + && !cardName.startsWith("island") + && !cardName.startsWith("plains")) { + cardName = cardName.substring(0, cardName.length() - 1); + } + } + setLinks.put(cardName, baseUrl + cardLink); } - } + } + } catch (IOException ex) { System.out.println("Exception when parsing the mythicspoiler page: " + ex.getMessage()); } diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/images/ImageCache.java b/Mage.Client/src/main/java/org/mage/plugins/card/images/ImageCache.java index 33cbb1a7dbe..6389c70ecff 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/images/ImageCache.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/images/ImageCache.java @@ -25,8 +25,8 @@ import org.mage.plugins.card.utils.CardImageUtils; /** * This class stores ALL card images in a cache with soft values. this means - * that the images may be garbage collected when they are not needed any more, but will - * be kept as long as possible. + * that the images may be garbage collected when they are not needed any more, + * but will be kept as long as possible. * * Key format: "####" * @@ -46,8 +46,7 @@ public class ImageCache { private static final Map imageCache; /** - * Common pattern for keys. - * Format: "##" + * Common pattern for keys. Format: "##" */ private static final Pattern KEY_PATTERN = Pattern.compile("(.*)#(.*)#(.*)#(.*)#(.*)"); @@ -104,16 +103,16 @@ public class ImageCache { thumbnailFile = new TFile(thumbnailPath); } catch (Exception ex) { } - boolean exists =false; + boolean exists = false; if (thumbnailFile != null) { try { exists = thumbnailFile.exists(); - } catch(Exception ex) { + } catch (Exception ex) { exists = false; } } if (exists) { - log.debug("loading thumbnail for " + key + ", path="+thumbnailPath); + log.debug("loading thumbnail for " + key + ", path=" + thumbnailPath); return loadImage(thumbnailFile); } else { BufferedImage image = loadImage(file); @@ -187,30 +186,15 @@ public class ImageCache { } public static BufferedImage getThumbnail(CardView card) { - String key = getKey(card) + "#thumb"; - if (card.getUsesVariousArt()) { - key += "#usesVariousArt"; - } - // log.debug("#key: " + key); - return getImage(key); + return getImage(getKey(card, card.getName(), "#thumb")); } public static BufferedImage getImageOriginal(CardView card) { - String key = getKey(card); - if (card.getUsesVariousArt()) { - key += "#usesVariousArt"; - } - // log.warn("#key: " + key); - return getImage(key); + return getImage(getKey(card, card.getName(), "")); } public static BufferedImage getImageOriginalAlternateName(CardView card) { - String key = getKeyAlternateName(card, card.getAlternateName()); - if (card.getUsesVariousArt()) { - key += "#usesVariousArt"; - } - // log.warn("#key: " + key); - return getImage(key); + return getImage(getKey(card, card.getAlternateName(), "")); } /** @@ -230,7 +214,7 @@ public class ImageCache { if (ex.getCause() instanceof NullPointerException) { return null; } - log.error(ex,ex); + log.error(ex, ex); return null; } } @@ -238,32 +222,25 @@ public class ImageCache { /** * Returns the map key for a card, without any suffixes for the image size. */ - private static String getKey(CardView card) { - StringBuilder sb = new StringBuilder(card.getName()).append("#"); - sb.append(card.getExpansionSetCode()).append("#"); - sb.append(card.getType()).append("#"); - sb.append(card.getCardNumber()).append("#"); - sb.append(card.getTokenSetCode() == null ? "":card.getTokenSetCode()); - return sb.toString(); - } - - /** - * Returns the map key for the flip image of a card, without any suffixes for the image size. - */ - private static String getKeyAlternateName(CardView card, String alternateName) { - StringBuilder sb = new StringBuilder(alternateName).append("#"); - sb.append(card.getExpansionSetCode()).append("#"); - sb.append(card.getType()).append("#"); - sb.append(card.getCardNumber()).append("#"); - sb.append(card.getTokenSetCode() == null ? "":card.getTokenSetCode()); - return sb.toString(); + private static String getKey(CardView card, String name, String suffix) { + return name + "#" + card.getExpansionSetCode() + "#" + card.getType() + "#" + card.getCardNumber() + "#" + + (card.getTokenSetCode() == null ? "" : card.getTokenSetCode()) + + suffix + + (card.getUsesVariousArt() ? "#usesVariousArt" : ""); + } +// /** +// * Returns the map key for the flip image of a card, without any suffixes for the image size. +// */ +// private static String getKeyAlternateName(CardView card, String alternateName) { +// return alternateName + "#" + card.getExpansionSetCode() + "#" +card.getType()+ "#" + card.getCardNumber() + "#" +// + (card.getTokenSetCode() == null ? "":card.getTokenSetCode()); +// } /** * Load image from file * - * @param file - * file to load image from + * @param file file to load image from * @return {@link BufferedImage} */ public static BufferedImage loadImage(TFile file) { @@ -297,7 +274,7 @@ public class ImageCache { ImageIO.write(image, "jpg", outputStream); } } catch (IOException e) { - log.error(e,e); + log.error(e, e); imageFile.delete(); } return image; @@ -305,6 +282,7 @@ public class ImageCache { /** * Returns an image scaled to the size given + * * @param original * @return */ @@ -344,6 +322,7 @@ public class ImageCache { /** * Returns an image scaled to the size appropriate for the card picture * panel + * * @param original * @param sizeNeed * @return @@ -356,6 +335,7 @@ public class ImageCache { /** * Returns the image appropriate to display the card in the picture panel + * * @param card * @param width * @param height @@ -365,11 +345,7 @@ public class ImageCache { if (Constants.THUMBNAIL_SIZE_FULL.width + 10 > width) { return getThumbnail(card); } - String key = getKey(card); - if (card.getUsesVariousArt()) { - key += "#usesVariousArt"; - } - // log.warn("getImage: " + key); + String key = getKey(card, card.getName(), ""); BufferedImage original = getImage(key); if (original == null) { log.debug(key + " not found"); diff --git a/Mage.Client/src/main/resources/avatars/10.jpg b/Mage.Client/src/main/resources/avatars/10.jpg index fb5b2744649..7ce97fc81e3 100644 Binary files a/Mage.Client/src/main/resources/avatars/10.jpg and b/Mage.Client/src/main/resources/avatars/10.jpg differ diff --git a/Mage.Client/src/main/resources/avatars/11.jpg b/Mage.Client/src/main/resources/avatars/11.jpg new file mode 100644 index 00000000000..2b665f235a2 Binary files /dev/null and b/Mage.Client/src/main/resources/avatars/11.jpg differ diff --git a/Mage.Client/src/main/resources/avatars/12.jpg b/Mage.Client/src/main/resources/avatars/12.jpg new file mode 100644 index 00000000000..d57f3963ee1 Binary files /dev/null and b/Mage.Client/src/main/resources/avatars/12.jpg differ diff --git a/Mage.Client/src/main/resources/avatars/13.jpg b/Mage.Client/src/main/resources/avatars/13.jpg index 2b665f235a2..b08ae1c24ab 100644 Binary files a/Mage.Client/src/main/resources/avatars/13.jpg and b/Mage.Client/src/main/resources/avatars/13.jpg differ diff --git a/Mage.Client/src/main/resources/avatars/14.jpg b/Mage.Client/src/main/resources/avatars/14.jpg index d57f3963ee1..e45b888a9ea 100644 Binary files a/Mage.Client/src/main/resources/avatars/14.jpg and b/Mage.Client/src/main/resources/avatars/14.jpg differ diff --git a/Mage.Client/src/main/resources/avatars/15.jpg b/Mage.Client/src/main/resources/avatars/15.jpg new file mode 100644 index 00000000000..d7fcc94512b Binary files /dev/null and b/Mage.Client/src/main/resources/avatars/15.jpg differ diff --git a/Mage.Client/src/main/resources/avatars/16.jpg b/Mage.Client/src/main/resources/avatars/16.jpg new file mode 100644 index 00000000000..75b41b0ce63 Binary files /dev/null and b/Mage.Client/src/main/resources/avatars/16.jpg differ diff --git a/Mage.Client/src/main/resources/avatars/17.jpg b/Mage.Client/src/main/resources/avatars/17.jpg new file mode 100644 index 00000000000..12905b63ec3 Binary files /dev/null and b/Mage.Client/src/main/resources/avatars/17.jpg differ diff --git a/Mage.Client/src/main/resources/avatars/18.jpg b/Mage.Client/src/main/resources/avatars/18.jpg new file mode 100644 index 00000000000..d02ccd4c29d Binary files /dev/null and b/Mage.Client/src/main/resources/avatars/18.jpg differ diff --git a/Mage.Client/src/main/resources/avatars/19.jpg b/Mage.Client/src/main/resources/avatars/19.jpg index b08ae1c24ab..bbffc049eea 100644 Binary files a/Mage.Client/src/main/resources/avatars/19.jpg and b/Mage.Client/src/main/resources/avatars/19.jpg differ diff --git a/Mage.Client/src/main/resources/avatars/48.jpg b/Mage.Client/src/main/resources/avatars/20.jpg similarity index 100% rename from Mage.Client/src/main/resources/avatars/48.jpg rename to Mage.Client/src/main/resources/avatars/20.jpg diff --git a/Mage.Client/src/main/resources/avatars/21.jpg b/Mage.Client/src/main/resources/avatars/21.jpg new file mode 100644 index 00000000000..fb5b2744649 Binary files /dev/null and b/Mage.Client/src/main/resources/avatars/21.jpg differ diff --git a/Mage.Client/src/main/resources/avatars/22.jpg b/Mage.Client/src/main/resources/avatars/22.jpg index e45b888a9ea..12c2a87b7bf 100644 Binary files a/Mage.Client/src/main/resources/avatars/22.jpg and b/Mage.Client/src/main/resources/avatars/22.jpg differ diff --git a/Mage.Client/src/main/resources/avatars/23.jpg b/Mage.Client/src/main/resources/avatars/23.jpg index d7fcc94512b..64459f61716 100644 Binary files a/Mage.Client/src/main/resources/avatars/23.jpg and b/Mage.Client/src/main/resources/avatars/23.jpg differ diff --git a/Mage.Client/src/main/resources/avatars/57.jpg b/Mage.Client/src/main/resources/avatars/24.jpg similarity index 100% rename from Mage.Client/src/main/resources/avatars/57.jpg rename to Mage.Client/src/main/resources/avatars/24.jpg diff --git a/Mage.Client/src/main/resources/avatars/25.jpg b/Mage.Client/src/main/resources/avatars/25.jpg index 75b41b0ce63..68b2b338648 100644 Binary files a/Mage.Client/src/main/resources/avatars/25.jpg and b/Mage.Client/src/main/resources/avatars/25.jpg differ diff --git a/Mage.Client/src/main/resources/avatars/62.jpg b/Mage.Client/src/main/resources/avatars/26.jpg similarity index 100% rename from Mage.Client/src/main/resources/avatars/62.jpg rename to Mage.Client/src/main/resources/avatars/26.jpg diff --git a/Mage.Client/src/main/resources/avatars/66.jpg b/Mage.Client/src/main/resources/avatars/27.jpg similarity index 100% rename from Mage.Client/src/main/resources/avatars/66.jpg rename to Mage.Client/src/main/resources/avatars/27.jpg diff --git a/Mage.Client/src/main/resources/avatars/71.jpg b/Mage.Client/src/main/resources/avatars/28.jpg similarity index 100% rename from Mage.Client/src/main/resources/avatars/71.jpg rename to Mage.Client/src/main/resources/avatars/28.jpg diff --git a/Mage.Client/src/main/resources/avatars/29.jpg b/Mage.Client/src/main/resources/avatars/29.jpg index 12905b63ec3..ee79324b94d 100644 Binary files a/Mage.Client/src/main/resources/avatars/29.jpg and b/Mage.Client/src/main/resources/avatars/29.jpg differ diff --git a/Mage.Client/src/main/resources/avatars/30.jpg b/Mage.Client/src/main/resources/avatars/30.jpg index d02ccd4c29d..cf70d9b85e8 100644 Binary files a/Mage.Client/src/main/resources/avatars/30.jpg and b/Mage.Client/src/main/resources/avatars/30.jpg differ diff --git a/Mage.Client/src/main/resources/avatars/77.jpg b/Mage.Client/src/main/resources/avatars/31.jpg similarity index 100% rename from Mage.Client/src/main/resources/avatars/77.jpg rename to Mage.Client/src/main/resources/avatars/31.jpg diff --git a/Mage.Client/src/main/resources/avatars/9.jpg b/Mage.Client/src/main/resources/avatars/32.jpg similarity index 100% rename from Mage.Client/src/main/resources/avatars/9.jpg rename to Mage.Client/src/main/resources/avatars/32.jpg diff --git a/Mage.Client/src/main/resources/avatars/39.jpg b/Mage.Client/src/main/resources/avatars/39.jpg deleted file mode 100644 index bbffc049eea..00000000000 Binary files a/Mage.Client/src/main/resources/avatars/39.jpg and /dev/null differ diff --git a/Mage.Client/src/main/resources/avatars/51.jpg b/Mage.Client/src/main/resources/avatars/51.jpg deleted file mode 100644 index 7ce97fc81e3..00000000000 Binary files a/Mage.Client/src/main/resources/avatars/51.jpg and /dev/null differ diff --git a/Mage.Client/src/main/resources/avatars/52.jpg b/Mage.Client/src/main/resources/avatars/52.jpg deleted file mode 100644 index 12c2a87b7bf..00000000000 Binary files a/Mage.Client/src/main/resources/avatars/52.jpg and /dev/null differ diff --git a/Mage.Client/src/main/resources/avatars/53.jpg b/Mage.Client/src/main/resources/avatars/53.jpg deleted file mode 100644 index 64459f61716..00000000000 Binary files a/Mage.Client/src/main/resources/avatars/53.jpg and /dev/null differ diff --git a/Mage.Client/src/main/resources/avatars/6.jpg b/Mage.Client/src/main/resources/avatars/6.jpg deleted file mode 100644 index 68b2b338648..00000000000 Binary files a/Mage.Client/src/main/resources/avatars/6.jpg and /dev/null differ diff --git a/Mage.Client/src/main/resources/avatars/72.jpg b/Mage.Client/src/main/resources/avatars/72.jpg deleted file mode 100644 index ee79324b94d..00000000000 Binary files a/Mage.Client/src/main/resources/avatars/72.jpg and /dev/null differ diff --git a/Mage.Client/src/main/resources/avatars/75.jpg b/Mage.Client/src/main/resources/avatars/75.jpg deleted file mode 100644 index cf70d9b85e8..00000000000 Binary files a/Mage.Client/src/main/resources/avatars/75.jpg and /dev/null differ diff --git a/Mage.Client/src/main/resources/avatars/special/21.gif b/Mage.Client/src/main/resources/avatars/special/21.gif new file mode 100644 index 00000000000..5de3fb6134a Binary files /dev/null and b/Mage.Client/src/main/resources/avatars/special/21.gif differ diff --git a/Mage.Client/src/main/resources/card-pictures-tok.txt b/Mage.Client/src/main/resources/card-pictures-tok.txt index eee4bed26eb..4421bbb0c39 100644 --- a/Mage.Client/src/main/resources/card-pictures-tok.txt +++ b/Mage.Client/src/main/resources/card-pictures-tok.txt @@ -1,5 +1,17 @@ -#Generate|TOK:BFZ|Eldrazi Scion| -#Generate|TOK:BFZ|Elemental| +#Generate|TOK:BFZ|Dragon| +#Generate|TOK:BFZ|Eldrazi| +#Generate|TOK:BFZ|Eldrazi Scion 1| +#Generate|TOK:BFZ|Eldrazi Scion 2| +#Generate|TOK:BFZ|Eldrazi Scion 3| +#Generate|TOK:BFZ|Elemental 1| +#Generate|TOK:BFZ|Elemental 2| +#Generate|TOK:BFZ|Knight Ally| +#Generate|TOK:BFZ|Kor Ally| +#Generate|TOK:BFZ|Octopus| +#Generate|TOK:BFZ|Plant| +#|Generate|EMBLEM!:BFZ|Emblem Gideon, Ally of Zendikar| +#|Generate|EMBLEM!:BFZ|Emblem Kiora, Master of the Depths| +#|Generate|EMBLEM!:BFZ|Emblem Ob Nixilis Reignited| #Generate|TOK:DDP|Eldrazi Spawn 1| #Generate|TOK:DDP|Eldrazi Spawn 2| diff --git a/Mage.Client/src/main/resources/image.url.properties b/Mage.Client/src/main/resources/image.url.properties index 21627b43ec6..fc6e7f06ec3 100644 --- a/Mage.Client/src/main/resources/image.url.properties +++ b/Mage.Client/src/main/resources/image.url.properties @@ -64,6 +64,6 @@ ddd=gvl unh=uh dde=pvc # Remove setname as soon as the images can be downloaded -ignore.urls=TOK,V15,DDP +ignore.urls=TOK, OGW # sets ordered by release time (newest goes first) -token.lookup.order=DDP,BFZ,FVD,FVE,FVL,FVR,V12,V13,V14,V15,TPR,MPRP,DD3,DDO,ORI,MM2,PTC,DTK,FRF,KTK,M15,VMA,CNS,JOU,BNG,THS,DDL,M14,MMA,DGM,GTC,RTR,M13,AVR,DDI,DKA,ISD,M12,NPH,MBS,SOM,M11,ROE,DDE,WWK,ZEN,M10,GVL,ARB,DVD,CFX,JVC,ALA,EVE,SHM,EVG,MOR,LRW,10E,CLS,CHK,GRC \ No newline at end of file +token.lookup.order=OGW,EXP,DDP,BFZ,FVD,FVE,FVL,FVR,V12,V13,V14,V15,TPR,MPRP,DD3,DDO,ORI,MM2,PTC,DTK,FRF,KTK,M15,VMA,CNS,JOU,BNG,THS,DDL,M14,MMA,DGM,GTC,RTR,M13,AVR,DDI,DKA,ISD,M12,NPH,MBS,SOM,M11,ROE,DDE,WWK,ZEN,M10,GVL,ARB,DVD,CFX,JVC,ALA,EVE,SHM,EVG,MOR,LRW,10E,CLS,CHK,GRC \ No newline at end of file diff --git a/Mage.Common/src/mage/constants/Constants.java b/Mage.Common/src/mage/constants/Constants.java index 965346f2819..fd8bf95052c 100644 --- a/Mage.Common/src/mage/constants/Constants.java +++ b/Mage.Common/src/mage/constants/Constants.java @@ -67,6 +67,10 @@ public final class Constants { public static final double SCALE_FACTOR = 0.5; + public static final int MIN_AVATAR_ID = 10; + public static final int MAX_AVATAR_ID = 32; + public static final int DEFAULT_AVATAR_ID = 10; + /** * Time each player has during the game to play using his\her priority. */ diff --git a/Mage.Common/src/mage/utils/CardUtil.java b/Mage.Common/src/mage/utils/CardUtil.java index fb3331ed4be..f5c7c9c6a85 100644 --- a/Mage.Common/src/mage/utils/CardUtil.java +++ b/Mage.Common/src/mage/utils/CardUtil.java @@ -1,5 +1,7 @@ package mage.utils; +import java.util.List; +import mage.ObjectColor; import mage.cards.Card; import mage.cards.MagePermanent; import mage.constants.CardType; @@ -13,6 +15,12 @@ import mage.view.CardView; */ public class CardUtil { + private static final String regexBlack = ".*\\x7b.{0,2}B.{0,2}\\x7d.*"; + private static final String regexBlue = ".*\\x7b.{0,2}U.{0,2}\\x7d.*"; + private static final String regexRed = ".*\\x7b.{0,2}R.{0,2}\\x7d.*"; + private static final String regexGreen = ".*\\x7b.{0,2}G.{0,2}\\x7d.*"; + private static final String regexWhite = ".*\\x7b.{0,2}W.{0,2}\\x7d.*"; + public static boolean isCreature(CardView card) { return is(card, CardType.CREATURE); } @@ -48,4 +56,34 @@ public class CardUtil { public static boolean isLand(Card card) { return card.getCardType().contains(CardType.LAND); } + + public static int getColorIdentitySortValue(List manaCost, ObjectColor originalColor, List rules) { + ObjectColor color = new ObjectColor(originalColor); + for (String rule : rules) { + rule = rule.replaceAll("(?i)", ""); // Ignoring reminder text in italic + if (rule.matches(regexBlack)) { + color.setBlack(true); + } + if (rule.matches(regexBlue)) { + color.setBlue(true); + } + if (rule.matches(regexGreen)) { + color.setGreen(true); + } + if (rule.matches(regexRed)) { + color.setRed(true); + } + if (rule.matches(regexWhite)) { + color.setWhite(true); + } + } + + int hash = 3; + hash = 23 * hash + (color.isWhite() || manaCost.contains("{W}") ? 1 : 0); + hash = 23 * hash + (color.isBlue() || manaCost.contains("{U}") ? 1 : 0); + hash = 23 * hash + (color.isBlack() || manaCost.contains("{B}") ? 1 : 0); + hash = 23 * hash + (color.isRed() || manaCost.contains("{R}") ? 1 : 0); + hash = 23 * hash + (color.isGreen() || manaCost.contains("{G}") ? 1 : 0); + return hash; + } } diff --git a/Mage.Common/src/mage/utils/MageVersion.java b/Mage.Common/src/mage/utils/MageVersion.java index 2bf930a85a7..3186a84a251 100644 --- a/Mage.Common/src/mage/utils/MageVersion.java +++ b/Mage.Common/src/mage/utils/MageVersion.java @@ -41,7 +41,7 @@ public class MageVersion implements Serializable, Comparable { public final static int MAGE_VERSION_MAJOR = 1; public final static int MAGE_VERSION_MINOR = 4; public final static int MAGE_VERSION_PATCH = 4; - public final static String MAGE_VERSION_MINOR_PATCH = "v3"; + public final static String MAGE_VERSION_MINOR_PATCH = "v7"; public final static String MAGE_VERSION_INFO = ""; private final int major; diff --git a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java index 882a68cfc34..7fb10c8bec2 100644 --- a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java @@ -485,7 +485,12 @@ public class HumanPlayer extends PlayerImpl { public boolean chooseTarget(Outcome outcome, Cards cards, TargetCard target, Ability source, Game game) { updateGameStatePriority("chooseTarget(5)", game); while (!abort) { - boolean required = target.isRequired(source); + boolean required; + if (target.isRequiredExplicitlySet()) { + required = target.isRequired(); + } else { + required = target.isRequired(source); + } // if there is no cards to select from, then add possibility to cancel choosing action if (cards == null) { required = false; diff --git a/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/src/mage/tournament/cubes/MTGOLegacyCube.java b/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/src/mage/tournament/cubes/MTGOLegacyCube.java index 468be41dc97..5221f4668ca 100644 --- a/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/src/mage/tournament/cubes/MTGOLegacyCube.java +++ b/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/src/mage/tournament/cubes/MTGOLegacyCube.java @@ -1,643 +1,642 @@ -/* - * 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.tournament.cubes; - -import mage.game.draft.DraftCube; - -/** - * - * @author LevelX2 - */ - -public class MTGOLegacyCube extends DraftCube { - - public MTGOLegacyCube() { - super("MTGO Legacy Cube (600 cards)"); - cubeCards.add(new CardIdentity("Accorder Paladin","")); - cubeCards.add(new CardIdentity("Abrupt Decay","")); - cubeCards.add(new CardIdentity("Acidic Slime","")); - cubeCards.add(new CardIdentity("Act of Aggression","")); - cubeCards.add(new CardIdentity("Adarkar Wastes","")); - cubeCards.add(new CardIdentity("AEther Vial","")); - cubeCards.add(new CardIdentity("Ajani Goldmane","")); - cubeCards.add(new CardIdentity("Ajani Steadfast","")); - cubeCards.add(new CardIdentity("Ajani Vengeant","")); - cubeCards.add(new CardIdentity("Ajani, Caller of the Pride","")); - cubeCards.add(new CardIdentity("Ajani, Mentor of Heroes","")); - cubeCards.add(new CardIdentity("Ancestral Vision","")); - cubeCards.add(new CardIdentity("Ancient Grudge","")); - cubeCards.add(new CardIdentity("Ancient Tomb","")); - cubeCards.add(new CardIdentity("Angel of Serenity","")); - cubeCards.add(new CardIdentity("Angelic Destiny","")); - cubeCards.add(new CardIdentity("Anger of the Gods","")); - cubeCards.add(new CardIdentity("Animate Dead","")); - cubeCards.add(new CardIdentity("Arbor Elf","")); - cubeCards.add(new CardIdentity("Arc Trail","")); - cubeCards.add(new CardIdentity("Archangel of Thune","")); - cubeCards.add(new CardIdentity("Arid Mesa","")); - cubeCards.add(new CardIdentity("Armageddon","")); - cubeCards.add(new CardIdentity("Ashcloud Phoenix","")); - cubeCards.add(new CardIdentity("Ashiok, Nightmare Weaver","")); - cubeCards.add(new CardIdentity("Augur of Bolas","")); - cubeCards.add(new CardIdentity("Avacyn's Pilgrim","")); - cubeCards.add(new CardIdentity("Avalanche Riders","")); - cubeCards.add(new CardIdentity("Avenger of Zendikar","")); - cubeCards.add(new CardIdentity("Awakening Zone","")); - cubeCards.add(new CardIdentity("Bad Moon","")); - cubeCards.add(new CardIdentity("Badlands","")); - cubeCards.add(new CardIdentity("Baleful Strix","")); - cubeCards.add(new CardIdentity("Baneslayer Angel","")); - cubeCards.add(new CardIdentity("Banisher Priest","")); - cubeCards.add(new CardIdentity("Banishing Light","")); - cubeCards.add(new CardIdentity("Basalt Monolith","")); - cubeCards.add(new CardIdentity("Basilisk Collar","")); - cubeCards.add(new CardIdentity("Batterskull","")); - cubeCards.add(new CardIdentity("Battlefield Forge","")); - cubeCards.add(new CardIdentity("Bayou","")); - cubeCards.add(new CardIdentity("Beast Within","")); - cubeCards.add(new CardIdentity("Beetleback Chief","")); - cubeCards.add(new CardIdentity("Bident of Thassa","")); - cubeCards.add(new CardIdentity("Birds of Paradise","")); - cubeCards.add(new CardIdentity("Birthing Pod","")); - cubeCards.add(new CardIdentity("Bitterblossom","")); - cubeCards.add(new CardIdentity("Black Sun's Zenith","")); - cubeCards.add(new CardIdentity("Blade Splicer","")); - cubeCards.add(new CardIdentity("Blood Crypt","")); - cubeCards.add(new CardIdentity("Bloodbraid Elf","")); - cubeCards.add(new CardIdentity("Bloodghast","")); - cubeCards.add(new CardIdentity("Bloodline Keeper","")); - cubeCards.add(new CardIdentity("Bloodsoaked Champion","")); - cubeCards.add(new CardIdentity("Bloodstained Mire","")); - cubeCards.add(new CardIdentity("Bone Shredder","")); - cubeCards.add(new CardIdentity("Bonesplitter","")); - cubeCards.add(new CardIdentity("Bonfire of the Damned","")); - cubeCards.add(new CardIdentity("Boon Satyr","")); - cubeCards.add(new CardIdentity("Borderland Marauder","")); - cubeCards.add(new CardIdentity("Boros Charm","")); - cubeCards.add(new CardIdentity("Boros Elite","")); - cubeCards.add(new CardIdentity("Boros Reckoner","")); - cubeCards.add(new CardIdentity("Brago, King Eternal","")); - cubeCards.add(new CardIdentity("Brain Maggot","")); - cubeCards.add(new CardIdentity("Brainstorm","")); - cubeCards.add(new CardIdentity("Breeding Pool","")); - cubeCards.add(new CardIdentity("Brimaz, King of Oreskos","")); - cubeCards.add(new CardIdentity("Brimstone Volley","")); - cubeCards.add(new CardIdentity("Brushland","")); - cubeCards.add(new CardIdentity("Burning-Tree Emissary","")); - cubeCards.add(new CardIdentity("Burst Lightning","")); - cubeCards.add(new CardIdentity("Call of the Herd","")); - cubeCards.add(new CardIdentity("Carnophage","")); - cubeCards.add(new CardIdentity("Caves of Koilos","")); - cubeCards.add(new CardIdentity("Chain Lightning","")); - cubeCards.add(new CardIdentity("Chainer's Edict","")); - cubeCards.add(new CardIdentity("Chameleon Colossus","")); - cubeCards.add(new CardIdentity("Champion of the Parish","")); - cubeCards.add(new CardIdentity("Chandra, Pyromaster","")); - cubeCards.add(new CardIdentity("Chandra's Phoenix","")); - cubeCards.add(new CardIdentity("Char","")); - cubeCards.add(new CardIdentity("Chasm Skulker","")); - cubeCards.add(new CardIdentity("Chord of Calling","")); - cubeCards.add(new CardIdentity("Chrome Mox","")); - cubeCards.add(new CardIdentity("City of Brass","")); - cubeCards.add(new CardIdentity("Clifftop Retreat","")); - cubeCards.add(new CardIdentity("Cloudfin Raptor","")); - cubeCards.add(new CardIdentity("Cloudgoat Ranger","")); - cubeCards.add(new CardIdentity("Coalition Relic","")); - cubeCards.add(new CardIdentity("Commune with the Gods","")); - cubeCards.add(new CardIdentity("Compulsive Research","")); - cubeCards.add(new CardIdentity("Condemn","")); - cubeCards.add(new CardIdentity("Condescend","")); - cubeCards.add(new CardIdentity("Consecrated Sphinx","")); - cubeCards.add(new CardIdentity("Consuming Vapors","")); - cubeCards.add(new CardIdentity("Control Magic","")); - cubeCards.add(new CardIdentity("Coralhelm Commander","")); - cubeCards.add(new CardIdentity("Corrupt","")); - cubeCards.add(new CardIdentity("Council's Judgment","")); - cubeCards.add(new CardIdentity("Counterspell","")); - cubeCards.add(new CardIdentity("Courser of Kruphix","")); - cubeCards.add(new CardIdentity("Crater's Claws","")); - cubeCards.add(new CardIdentity("Craterhoof Behemoth","")); - cubeCards.add(new CardIdentity("Crusade","")); - cubeCards.add(new CardIdentity("Cryptic Command","")); - cubeCards.add(new CardIdentity("Cultivate","")); - cubeCards.add(new CardIdentity("Cunning Sparkmage","")); - cubeCards.add(new CardIdentity("Curse of Predation","")); - cubeCards.add(new CardIdentity("Cursed Scroll","")); - cubeCards.add(new CardIdentity("Cyclonic Rift","")); - cubeCards.add(new CardIdentity("Damnation","")); - cubeCards.add(new CardIdentity("Dark Confidant","")); - cubeCards.add(new CardIdentity("Dark Ritual","")); - cubeCards.add(new CardIdentity("Darkblast","")); - cubeCards.add(new CardIdentity("Day of Judgment","")); - cubeCards.add(new CardIdentity("Daze","")); - cubeCards.add(new CardIdentity("Deceiver Exarch","")); - cubeCards.add(new CardIdentity("Deep Analysis","")); - cubeCards.add(new CardIdentity("Delver of Secrets","")); - cubeCards.add(new CardIdentity("Deranged Hermit","")); - cubeCards.add(new CardIdentity("Desecration Demon","")); - cubeCards.add(new CardIdentity("Detention Sphere","")); - cubeCards.add(new CardIdentity("Devil's Play","")); - cubeCards.add(new CardIdentity("Diabolic Servitude","")); - cubeCards.add(new CardIdentity("Dictate of Heliod","")); - cubeCards.add(new CardIdentity("Dig Through Time","")); - cubeCards.add(new CardIdentity("Diregraf Ghoul","")); - cubeCards.add(new CardIdentity("Disciple of Bolas","")); - cubeCards.add(new CardIdentity("Disenchant","")); - cubeCards.add(new CardIdentity("Disfigure","")); - cubeCards.add(new CardIdentity("Dismember","")); - cubeCards.add(new CardIdentity("Dismiss","")); - cubeCards.add(new CardIdentity("Dissolve","")); - cubeCards.add(new CardIdentity("Domri Rade","")); - cubeCards.add(new CardIdentity("Doom Blade","")); - cubeCards.add(new CardIdentity("Doomed Traveler","")); - cubeCards.add(new CardIdentity("Dragon Fodder","")); - cubeCards.add(new CardIdentity("Dragonskull Summit","")); - cubeCards.add(new CardIdentity("Dread Return","")); - cubeCards.add(new CardIdentity("Dreadbore","")); - cubeCards.add(new CardIdentity("Drowned Catacomb","")); - cubeCards.add(new CardIdentity("Dualcaster Mage","")); - cubeCards.add(new CardIdentity("Dungeon Geists","")); - cubeCards.add(new CardIdentity("Duplicant","")); - cubeCards.add(new CardIdentity("Duress","")); - cubeCards.add(new CardIdentity("Edric, Spymaster of Trest","")); - cubeCards.add(new CardIdentity("Eight-and-a-Half-Tails","")); - cubeCards.add(new CardIdentity("Electrolyze","")); - cubeCards.add(new CardIdentity("Elesh Norn, Grand Cenobite","")); - cubeCards.add(new CardIdentity("Elite Vanguard","")); - cubeCards.add(new CardIdentity("Elspeth Tirel","")); - cubeCards.add(new CardIdentity("Elspeth, Knight-Errant","")); - cubeCards.add(new CardIdentity("Elspeth, Sun's Champion","")); - cubeCards.add(new CardIdentity("Elves of Deep Shadow","")); - cubeCards.add(new CardIdentity("Elvish Mystic","")); - cubeCards.add(new CardIdentity("Emeria Angel","")); - cubeCards.add(new CardIdentity("Emrakul, the Aeons Torn","")); - cubeCards.add(new CardIdentity("Entomb","")); - cubeCards.add(new CardIdentity("Entreat the Angels","")); - cubeCards.add(new CardIdentity("Essence Scatter","")); - cubeCards.add(new CardIdentity("Eternal Dragon","")); - cubeCards.add(new CardIdentity("Eternal Witness","")); - cubeCards.add(new CardIdentity("Eureka","")); - cubeCards.add(new CardIdentity("Everflowing Chalice","")); - cubeCards.add(new CardIdentity("Exalted Angel","")); - cubeCards.add(new CardIdentity("Exhume","")); - cubeCards.add(new CardIdentity("Explore","")); - cubeCards.add(new CardIdentity("Fact or Fiction","")); - cubeCards.add(new CardIdentity("Faith's Fetters","")); - cubeCards.add(new CardIdentity("Falkenrath Aristocrat","")); - cubeCards.add(new CardIdentity("Far // Away","")); - cubeCards.add(new CardIdentity("Farseek","")); - cubeCards.add(new CardIdentity("Fauna Shaman","")); - cubeCards.add(new CardIdentity("Figure of Destiny","")); - cubeCards.add(new CardIdentity("Fire // Ice","")); - cubeCards.add(new CardIdentity("Fireblast","")); - cubeCards.add(new CardIdentity("Firebolt","")); - cubeCards.add(new CardIdentity("Firedrinker Satyr","")); - cubeCards.add(new CardIdentity("Firefist Striker","")); - cubeCards.add(new CardIdentity("Flame Slash","")); - cubeCards.add(new CardIdentity("Flametongue Kavu","")); - cubeCards.add(new CardIdentity("Fleecemane Lion","")); - cubeCards.add(new CardIdentity("Flickerwisp","")); - cubeCards.add(new CardIdentity("Flooded Strand","")); - cubeCards.add(new CardIdentity("Forbid","")); - cubeCards.add(new CardIdentity("Forbidden Alchemy","")); - cubeCards.add(new CardIdentity("Force of Will","")); - cubeCards.add(new CardIdentity("Force Spike","")); - cubeCards.add(new CardIdentity("Frenzied Goblin","")); - cubeCards.add(new CardIdentity("Freyalise, Llanowar's Fury","")); - cubeCards.add(new CardIdentity("Frontline Medic","")); - cubeCards.add(new CardIdentity("Frost Titan","")); - cubeCards.add(new CardIdentity("Future Sight","")); - cubeCards.add(new CardIdentity("Fyndhorn Elves","")); - cubeCards.add(new CardIdentity("Gaea's Cradle","")); - cubeCards.add(new CardIdentity("Garruk Relentless","")); - cubeCards.add(new CardIdentity("Garruk Wildspeaker","")); - cubeCards.add(new CardIdentity("Garruk, Apex Predator","")); - cubeCards.add(new CardIdentity("Garruk, Caller of Beasts","")); - cubeCards.add(new CardIdentity("Garruk, Primal Hunter","")); - cubeCards.add(new CardIdentity("Gatekeeper of Malakir","")); - cubeCards.add(new CardIdentity("Gather the Townsfolk","")); - cubeCards.add(new CardIdentity("Geist of Saint Traft","")); - cubeCards.add(new CardIdentity("Genesis Wave","")); - cubeCards.add(new CardIdentity("Geralf's Messenger","")); - cubeCards.add(new CardIdentity("Gerrard's Verdict","")); - cubeCards.add(new CardIdentity("Ghor-Clan Rampager","")); - cubeCards.add(new CardIdentity("Gideon Jura","")); - cubeCards.add(new CardIdentity("Gifts Ungiven","")); - cubeCards.add(new CardIdentity("Gilded Lotus","")); - cubeCards.add(new CardIdentity("Glacial Fortress","")); - cubeCards.add(new CardIdentity("Glen Elendra Archmage","")); - cubeCards.add(new CardIdentity("Glorious Anthem","")); - cubeCards.add(new CardIdentity("Gnarled Scarhide","")); - cubeCards.add(new CardIdentity("Go for the Throat","")); - cubeCards.add(new CardIdentity("Goblin Bombardment","")); - cubeCards.add(new CardIdentity("Goblin Bushwhacker","")); - cubeCards.add(new CardIdentity("Goblin Electromancer","")); - cubeCards.add(new CardIdentity("Goblin Guide","")); - cubeCards.add(new CardIdentity("Goblin Rabblemaster","")); - cubeCards.add(new CardIdentity("Goblin Wardriver","")); - cubeCards.add(new CardIdentity("Godless Shrine","")); - cubeCards.add(new CardIdentity("Gore-House Chainwalker","")); - cubeCards.add(new CardIdentity("Grafted Wargear","")); - cubeCards.add(new CardIdentity("Grave Titan","")); - cubeCards.add(new CardIdentity("Graveborn Muse","")); - cubeCards.add(new CardIdentity("Gravecrawler","")); - cubeCards.add(new CardIdentity("Gray Merchant of Asphodel","")); - cubeCards.add(new CardIdentity("Greater Gargadon","")); - cubeCards.add(new CardIdentity("Green Sun's Zenith","")); - cubeCards.add(new CardIdentity("Grim Lavamancer","")); - cubeCards.add(new CardIdentity("Grim Monolith","")); - cubeCards.add(new CardIdentity("Griselbrand","")); - cubeCards.add(new CardIdentity("Grisly Salvage","")); - cubeCards.add(new CardIdentity("Guttersnipe","")); - cubeCards.add(new CardIdentity("Hall of Triumph","")); - cubeCards.add(new CardIdentity("Hallowed Fountain","")); - cubeCards.add(new CardIdentity("Hallowed Spiritkeeper","")); - cubeCards.add(new CardIdentity("Hammer of Purphoros","")); - cubeCards.add(new CardIdentity("Harmonize","")); - cubeCards.add(new CardIdentity("Hellrider","")); - cubeCards.add(new CardIdentity("Herald of Torment","")); - cubeCards.add(new CardIdentity("Hero of Bladehold","")); - cubeCards.add(new CardIdentity("Hero of Oxid Ridge","")); - cubeCards.add(new CardIdentity("Hero's Downfall","")); - cubeCards.add(new CardIdentity("Hinterland Harbor","")); - cubeCards.add(new CardIdentity("Honor of the Pure","")); - cubeCards.add(new CardIdentity("Hordeling Outburst","")); - cubeCards.add(new CardIdentity("Hornet Queen","")); - cubeCards.add(new CardIdentity("Huntmaster of the Fells","")); - cubeCards.add(new CardIdentity("Hymn to Tourach","")); - cubeCards.add(new CardIdentity("Hypnotic Specter","")); - cubeCards.add(new CardIdentity("Imperial Recruiter","")); - cubeCards.add(new CardIdentity("Imposing Sovereign","")); - cubeCards.add(new CardIdentity("Impulse","")); - cubeCards.add(new CardIdentity("Incinerate","")); - cubeCards.add(new CardIdentity("Indrik Stomphowler","")); - cubeCards.add(new CardIdentity("Inferno Titan","")); - cubeCards.add(new CardIdentity("Inquisition of Kozilek","")); - cubeCards.add(new CardIdentity("Into the Roil","")); - cubeCards.add(new CardIdentity("Intuition","")); - cubeCards.add(new CardIdentity("Isamaru, Hound of Konda","")); - cubeCards.add(new CardIdentity("Isochron Scepter","")); - cubeCards.add(new CardIdentity("Isolated Chapel","")); - cubeCards.add(new CardIdentity("Jace Beleren","")); - cubeCards.add(new CardIdentity("Jace, Architect of Thought","")); - cubeCards.add(new CardIdentity("Jace, the Mind Sculptor","")); - cubeCards.add(new CardIdentity("Jackal Pup","")); - cubeCards.add(new CardIdentity("Joraga Treespeaker","")); - cubeCards.add(new CardIdentity("Journey to Nowhere","")); - cubeCards.add(new CardIdentity("Kami of Ancient Law","")); - cubeCards.add(new CardIdentity("Karmic Guide","")); - cubeCards.add(new CardIdentity("Karn Liberated","")); - cubeCards.add(new CardIdentity("Karplusan Forest","")); - cubeCards.add(new CardIdentity("Keiga, the Tide Star","")); - cubeCards.add(new CardIdentity("Keranos, God of Storms","")); - cubeCards.add(new CardIdentity("Kiki-Jiki, Mirror Breaker","")); - cubeCards.add(new CardIdentity("Kiln Fiend","")); - cubeCards.add(new CardIdentity("Kiora, the Crashing Wave","")); - cubeCards.add(new CardIdentity("Kira, Great Glass-Spinner","")); - cubeCards.add(new CardIdentity("Kitchen Finks","")); - cubeCards.add(new CardIdentity("Knight of Infamy","")); - cubeCards.add(new CardIdentity("Kodama's Reach","")); - cubeCards.add(new CardIdentity("Kokusho, the Evening Star","")); - cubeCards.add(new CardIdentity("Kor Skyfisher","")); - cubeCards.add(new CardIdentity("Koth of the Hammer","")); - cubeCards.add(new CardIdentity("Kozilek, Butcher of Truth","")); - cubeCards.add(new CardIdentity("Krenko's Command","")); - cubeCards.add(new CardIdentity("Krosan Grip","")); - cubeCards.add(new CardIdentity("Land Tax","")); - cubeCards.add(new CardIdentity("Legacy's Allure","")); - cubeCards.add(new CardIdentity("Lifebane Zombie","")); - cubeCards.add(new CardIdentity("Lightning Bolt","")); - cubeCards.add(new CardIdentity("Lightning Greaves","")); - cubeCards.add(new CardIdentity("Lightning Helix","")); - cubeCards.add(new CardIdentity("Lightning Mauler","")); - cubeCards.add(new CardIdentity("Lightning Strike","")); - cubeCards.add(new CardIdentity("Liliana of the Veil","")); - cubeCards.add(new CardIdentity("Liliana Vess","")); - cubeCards.add(new CardIdentity("Lingering Souls","")); - cubeCards.add(new CardIdentity("Linvala, Keeper of Silence","")); - cubeCards.add(new CardIdentity("Living Death","")); - cubeCards.add(new CardIdentity("Llanowar Elves","")); - cubeCards.add(new CardIdentity("Llanowar Wastes","")); - cubeCards.add(new CardIdentity("Looter il-Kor","")); - cubeCards.add(new CardIdentity("Lotleth Troll","")); - cubeCards.add(new CardIdentity("Lotus Cobra","")); - cubeCards.add(new CardIdentity("Loxodon Warhammer","")); - cubeCards.add(new CardIdentity("Madcap Skills","")); - cubeCards.add(new CardIdentity("Maelstrom Pulse","")); - cubeCards.add(new CardIdentity("Magma Jet","")); - cubeCards.add(new CardIdentity("Man-o'-War","")); - cubeCards.add(new CardIdentity("Mana Confluence","")); - cubeCards.add(new CardIdentity("Mana Leak","")); - cubeCards.add(new CardIdentity("Mana Tithe","")); - cubeCards.add(new CardIdentity("Marsh Flats","")); - cubeCards.add(new CardIdentity("Martial Coup","")); - cubeCards.add(new CardIdentity("Massacre Wurm","")); - cubeCards.add(new CardIdentity("Master of the Feast","")); - cubeCards.add(new CardIdentity("Master of the Wild Hunt","")); - cubeCards.add(new CardIdentity("Master of Waves","")); - cubeCards.add(new CardIdentity("Meloku the Clouded Mirror","")); - cubeCards.add(new CardIdentity("Mentor of the Meek","")); - cubeCards.add(new CardIdentity("Merfolk Looter","")); - cubeCards.add(new CardIdentity("Mesmeric Fiend","")); - cubeCards.add(new CardIdentity("Mind Stone","")); - cubeCards.add(new CardIdentity("Mirari's Wake","")); - cubeCards.add(new CardIdentity("Mirran Crusader","")); - cubeCards.add(new CardIdentity("Miscalculation","")); - cubeCards.add(new CardIdentity("Mishra's Factory","")); - cubeCards.add(new CardIdentity("Misty Rainforest","")); - cubeCards.add(new CardIdentity("Mizzium Mortars","")); - cubeCards.add(new CardIdentity("Mogg Fanatic","")); - cubeCards.add(new CardIdentity("Mogg War Marshal","")); - cubeCards.add(new CardIdentity("Molten Rain","")); - cubeCards.add(new CardIdentity("Molten-Tail Masticore","")); - cubeCards.add(new CardIdentity("Momentary Blink","")); - cubeCards.add(new CardIdentity("Mother of Runes","")); - cubeCards.add(new CardIdentity("Mox Diamond","")); - cubeCards.add(new CardIdentity("Mulch","")); - cubeCards.add(new CardIdentity("Mulldrifter","")); - cubeCards.add(new CardIdentity("Murderous Cut","")); - cubeCards.add(new CardIdentity("Murderous Redcap","")); - cubeCards.add(new CardIdentity("Mutagenic Growth","")); - cubeCards.add(new CardIdentity("Mutavault","")); - cubeCards.add(new CardIdentity("Myr Battlesphere","")); - cubeCards.add(new CardIdentity("Mystic Snake","")); - cubeCards.add(new CardIdentity("Mystical Teachings","")); - cubeCards.add(new CardIdentity("Nantuko Shade","")); - cubeCards.add(new CardIdentity("Natural Order","")); - cubeCards.add(new CardIdentity("Naturalize","")); - cubeCards.add(new CardIdentity("Negate","")); - cubeCards.add(new CardIdentity("Nekrataal","")); - cubeCards.add(new CardIdentity("Nicol Bolas, Planeswalker","")); - cubeCards.add(new CardIdentity("Night's Whisper","")); - cubeCards.add(new CardIdentity("Nighthowler","")); - cubeCards.add(new CardIdentity("Nightveil Specter","")); - cubeCards.add(new CardIdentity("Nissa, Worldwaker","")); - cubeCards.add(new CardIdentity("Noble Hierarch","")); - cubeCards.add(new CardIdentity("Nykthos, Shrine to Nyx","")); - cubeCards.add(new CardIdentity("Oblivion Ring","")); - cubeCards.add(new CardIdentity("Obstinate Baloth","")); - cubeCards.add(new CardIdentity("Old Man of the Sea","")); - cubeCards.add(new CardIdentity("Olivia Voldaren","")); - cubeCards.add(new CardIdentity("Ophiomancer","")); - cubeCards.add(new CardIdentity("Opposition","")); - cubeCards.add(new CardIdentity("Oracle of Mul Daya","")); - cubeCards.add(new CardIdentity("Oust","")); - cubeCards.add(new CardIdentity("Overgrown Battlement","")); - cubeCards.add(new CardIdentity("Overgrown Tomb","")); - cubeCards.add(new CardIdentity("Pact of Negation","")); - cubeCards.add(new CardIdentity("Pain Seer","")); - cubeCards.add(new CardIdentity("Parallax Wave","")); - cubeCards.add(new CardIdentity("Path to Exile","")); - cubeCards.add(new CardIdentity("Pestermite","")); - cubeCards.add(new CardIdentity("Phantasmal Image","")); - cubeCards.add(new CardIdentity("Phantom Centaur","")); - cubeCards.add(new CardIdentity("Phyrexian Arena","")); - cubeCards.add(new CardIdentity("Phyrexian Metamorph","")); - cubeCards.add(new CardIdentity("Phyrexian Obliterator","")); - cubeCards.add(new CardIdentity("Phyrexian Revoker","")); - cubeCards.add(new CardIdentity("Pillar of Flame","")); - cubeCards.add(new CardIdentity("Plateau","")); - cubeCards.add(new CardIdentity("Plow Under","")); - cubeCards.add(new CardIdentity("Polluted Delta","")); - cubeCards.add(new CardIdentity("Polukranos, World Eater","")); - cubeCards.add(new CardIdentity("Ponder","")); - cubeCards.add(new CardIdentity("Porcelain Legionnaire","")); - cubeCards.add(new CardIdentity("Precinct Captain","")); - cubeCards.add(new CardIdentity("Precursor Golem","")); - cubeCards.add(new CardIdentity("Preordain","")); - cubeCards.add(new CardIdentity("Primal Command","")); - cubeCards.add(new CardIdentity("Prime Speaker Zegana","")); - cubeCards.add(new CardIdentity("Primeval Titan","")); - cubeCards.add(new CardIdentity("Profane Command","")); - cubeCards.add(new CardIdentity("Progenitus","")); - cubeCards.add(new CardIdentity("Prophetic Bolt","")); - cubeCards.add(new CardIdentity("Prophetic Flamespeaker","")); - cubeCards.add(new CardIdentity("Psychatog","")); - cubeCards.add(new CardIdentity("Purphoros, God of the Forge","")); - cubeCards.add(new CardIdentity("Qasali Pridemage","")); - cubeCards.add(new CardIdentity("Raise the Alarm","")); - cubeCards.add(new CardIdentity("Rakdos Cackler","")); - cubeCards.add(new CardIdentity("Ral Zarek","")); - cubeCards.add(new CardIdentity("Rampant Growth","")); - cubeCards.add(new CardIdentity("Rancor","")); - cubeCards.add(new CardIdentity("Ranger of Eos","")); - cubeCards.add(new CardIdentity("Ravages of War","")); - cubeCards.add(new CardIdentity("Reanimate","")); - cubeCards.add(new CardIdentity("Reclamation Sage","")); - cubeCards.add(new CardIdentity("Recurring Nightmare","")); - cubeCards.add(new CardIdentity("Reflecting Pool","")); - cubeCards.add(new CardIdentity("Regrowth","")); - cubeCards.add(new CardIdentity("Remand","")); - cubeCards.add(new CardIdentity("Remove Soul","")); - cubeCards.add(new CardIdentity("Repeal","")); - cubeCards.add(new CardIdentity("Restoration Angel","")); - cubeCards.add(new CardIdentity("Reveillark","")); - cubeCards.add(new CardIdentity("Rift Bolt","")); - cubeCards.add(new CardIdentity("Riftwing Cloudskate","")); - cubeCards.add(new CardIdentity("Riptide Laboratory","")); - cubeCards.add(new CardIdentity("Rishadan Port","")); - cubeCards.add(new CardIdentity("Rofellos, Llanowar Emissary","")); - cubeCards.add(new CardIdentity("Rootbound Crag","")); - cubeCards.add(new CardIdentity("Sacred Foundry","")); - cubeCards.add(new CardIdentity("Sakashima's Student","")); - cubeCards.add(new CardIdentity("Sakura-Tribe Elder","")); - cubeCards.add(new CardIdentity("Sarcomancy","")); - cubeCards.add(new CardIdentity("Sarkhan, the Dragonspeaker","")); - cubeCards.add(new CardIdentity("Satyr Wayfinder","")); - cubeCards.add(new CardIdentity("Savannah","")); - cubeCards.add(new CardIdentity("Savannah Lions","")); - cubeCards.add(new CardIdentity("Scalding Tarn","")); - cubeCards.add(new CardIdentity("Scavenging Ooze","")); - cubeCards.add(new CardIdentity("Scorched Rusalka","")); - cubeCards.add(new CardIdentity("Scrubland","")); - cubeCards.add(new CardIdentity("Sea Gate Oracle","")); - cubeCards.add(new CardIdentity("Seal of Cleansing","")); - cubeCards.add(new CardIdentity("Seal of Fire","")); - cubeCards.add(new CardIdentity("Search for Tomorrow","")); - cubeCards.add(new CardIdentity("Searing Blaze","")); - cubeCards.add(new CardIdentity("Searing Blood","")); - cubeCards.add(new CardIdentity("Searing Spear","")); - cubeCards.add(new CardIdentity("Seeker of the Way","")); - cubeCards.add(new CardIdentity("Sensei's Divining Top","")); - cubeCards.add(new CardIdentity("Serendib Efreet","")); - cubeCards.add(new CardIdentity("Serum Visions","")); - cubeCards.add(new CardIdentity("Setessan Tactics","")); - cubeCards.add(new CardIdentity("Shadowmage Infiltrator","")); - cubeCards.add(new CardIdentity("Shardless Agent","")); - cubeCards.add(new CardIdentity("Sheoldred, Whispering One","")); - cubeCards.add(new CardIdentity("Shivan Reef","")); - cubeCards.add(new CardIdentity("Show and Tell","")); - cubeCards.add(new CardIdentity("Shriekmaw","")); - cubeCards.add(new CardIdentity("Shrine of Burning Rage","")); - cubeCards.add(new CardIdentity("Siege-Gang Commander","")); - cubeCards.add(new CardIdentity("Silverblade Paladin","")); - cubeCards.add(new CardIdentity("Sin Collector","")); - cubeCards.add(new CardIdentity("Sinkhole","")); - cubeCards.add(new CardIdentity("Skinrender","")); - cubeCards.add(new CardIdentity("Skullcrack","")); - cubeCards.add(new CardIdentity("Slagstorm","")); - cubeCards.add(new CardIdentity("Slaughter Pact","")); - cubeCards.add(new CardIdentity("Smash to Smithereens","")); - cubeCards.add(new CardIdentity("Snapcaster Mage","")); - cubeCards.add(new CardIdentity("Sneak Attack","")); - cubeCards.add(new CardIdentity("Soldier of the Pantheon","")); - cubeCards.add(new CardIdentity("Solemn Simulacrum","")); - cubeCards.add(new CardIdentity("Song of the Dryads","")); - cubeCards.add(new CardIdentity("Sorin Markov","")); - cubeCards.add(new CardIdentity("Sorin, Lord of Innistrad","")); - cubeCards.add(new CardIdentity("Sorin, Solemn Visitor","")); - cubeCards.add(new CardIdentity("Soul of Innistrad","")); - cubeCards.add(new CardIdentity("Sower of Temptation","")); - cubeCards.add(new CardIdentity("Spear of Heliod","")); - cubeCards.add(new CardIdentity("Spectral Procession","")); - cubeCards.add(new CardIdentity("Spellskite","")); - cubeCards.add(new CardIdentity("Sphere of the Suns","")); - cubeCards.add(new CardIdentity("Sphinx's Revelation","")); - cubeCards.add(new CardIdentity("Spikeshot Elder","")); - cubeCards.add(new CardIdentity("Spiteful Returned","")); - cubeCards.add(new CardIdentity("Splinter Twin","")); - cubeCards.add(new CardIdentity("Staggershock","")); - cubeCards.add(new CardIdentity("Steam Vents","")); - cubeCards.add(new CardIdentity("Stinkweed Imp","")); - cubeCards.add(new CardIdentity("Stoke the Flames","")); - cubeCards.add(new CardIdentity("Stomping Ground","")); - cubeCards.add(new CardIdentity("Stormbreath Dragon","")); - cubeCards.add(new CardIdentity("Stroke of Genius","")); - cubeCards.add(new CardIdentity("Stromkirk Noble","")); - cubeCards.add(new CardIdentity("Student of Warfare","")); - cubeCards.add(new CardIdentity("Sublime Archangel","")); - cubeCards.add(new CardIdentity("Sulfur Falls","")); - cubeCards.add(new CardIdentity("Sulfuric Vortex","")); - cubeCards.add(new CardIdentity("Sulfurous Springs","")); - cubeCards.add(new CardIdentity("Summoning Trap","")); - cubeCards.add(new CardIdentity("Sun Titan","")); - cubeCards.add(new CardIdentity("Sundering Titan","")); - cubeCards.add(new CardIdentity("Sunpetal Grove","")); - cubeCards.add(new CardIdentity("Supreme Verdict","")); - cubeCards.add(new CardIdentity("Swords to Plowshares","")); - cubeCards.add(new CardIdentity("Sylvan Caryatid","")); - cubeCards.add(new CardIdentity("Sylvan Library","")); - cubeCards.add(new CardIdentity("Taiga","")); - cubeCards.add(new CardIdentity("Talrand, Sky Summoner","")); - cubeCards.add(new CardIdentity("Tamiyo, the Moon Sage","")); - cubeCards.add(new CardIdentity("Tangle Wire","")); - cubeCards.add(new CardIdentity("Tarmogoyf","")); - cubeCards.add(new CardIdentity("Tectonic Edge","")); - cubeCards.add(new CardIdentity("Teetering Peaks","")); - cubeCards.add(new CardIdentity("Teferi, Mage of Zhalfir","")); - cubeCards.add(new CardIdentity("Temple Garden","")); - cubeCards.add(new CardIdentity("Temple of Abandon","")); - cubeCards.add(new CardIdentity("Temple of Deceit","")); - cubeCards.add(new CardIdentity("Temple of Enlightenment","")); - cubeCards.add(new CardIdentity("Temple of Epiphany","")); - cubeCards.add(new CardIdentity("Temple of Malady","")); - cubeCards.add(new CardIdentity("Temple of Malice","")); - cubeCards.add(new CardIdentity("Temple of Mystery","")); - cubeCards.add(new CardIdentity("Temple of Plenty","")); - cubeCards.add(new CardIdentity("Temple of Silence","")); - cubeCards.add(new CardIdentity("Temple of Triumph","")); - cubeCards.add(new CardIdentity("Tempt with Vengeance","")); - cubeCards.add(new CardIdentity("Tendrils of Corruption","")); - cubeCards.add(new CardIdentity("Terastodon","")); - cubeCards.add(new CardIdentity("Terminate","")); - cubeCards.add(new CardIdentity("Terminus","")); - cubeCards.add(new CardIdentity("Thalia, Guardian of Thraben","")); - cubeCards.add(new CardIdentity("Thassa, God of the Sea","")); - cubeCards.add(new CardIdentity("Think Twice","")); - cubeCards.add(new CardIdentity("Thoughtseize","")); - cubeCards.add(new CardIdentity("Thragtusk","")); - cubeCards.add(new CardIdentity("Thran Dynamo","")); - cubeCards.add(new CardIdentity("Through the Breach","")); - cubeCards.add(new CardIdentity("Thrun, the Last Troll","")); - cubeCards.add(new CardIdentity("Thundermaw Hellkite","")); - cubeCards.add(new CardIdentity("Tidehollow Sculler","")); - cubeCards.add(new CardIdentity("Time Warp","")); - cubeCards.add(new CardIdentity("Tooth and Nail","")); - cubeCards.add(new CardIdentity("Toxic Deluge","")); - cubeCards.add(new CardIdentity("Tracker's Instincts","")); - cubeCards.add(new CardIdentity("Tradewind Rider","")); - cubeCards.add(new CardIdentity("Treachery","")); - cubeCards.add(new CardIdentity("Troll Ascetic","")); - cubeCards.add(new CardIdentity("Tropical Island","")); - cubeCards.add(new CardIdentity("Trygon Predator","")); - cubeCards.add(new CardIdentity("Tundra","")); - cubeCards.add(new CardIdentity("Ulamog, the Infinite Gyre","")); - cubeCards.add(new CardIdentity("Ultimate Price","")); - cubeCards.add(new CardIdentity("Umezawa's Jitte","")); - cubeCards.add(new CardIdentity("Unburial Rites","")); - cubeCards.add(new CardIdentity("Underground River","")); - cubeCards.add(new CardIdentity("Underground Sea","")); - cubeCards.add(new CardIdentity("Underworld Connections","")); - cubeCards.add(new CardIdentity("Unexpectedly Absent","")); - cubeCards.add(new CardIdentity("Upheaval","")); - cubeCards.add(new CardIdentity("Vampire Hexmage","")); - cubeCards.add(new CardIdentity("Vampire Lacerator","")); - cubeCards.add(new CardIdentity("Vampire Nighthawk","")); - cubeCards.add(new CardIdentity("Vedalken Shackles","")); - cubeCards.add(new CardIdentity("Vendilion Clique","")); - cubeCards.add(new CardIdentity("Vengevine","")); - cubeCards.add(new CardIdentity("Venser, Shaper Savant","")); - cubeCards.add(new CardIdentity("Venser, the Sojourner","")); - cubeCards.add(new CardIdentity("Verdant Catacombs","")); - cubeCards.add(new CardIdentity("Vindicate","")); - cubeCards.add(new CardIdentity("Visara the Dreadful","")); - cubeCards.add(new CardIdentity("Voice of Resurgence","")); - cubeCards.add(new CardIdentity("Volcanic Island","")); - cubeCards.add(new CardIdentity("Volrath's Stronghold","")); - cubeCards.add(new CardIdentity("Vraska the Unseen","")); - cubeCards.add(new CardIdentity("Wake Thrasher","")); - cubeCards.add(new CardIdentity("Wall of Blossoms","")); - cubeCards.add(new CardIdentity("Wall of Omens","")); - cubeCards.add(new CardIdentity("Wall of Roots","")); - cubeCards.add(new CardIdentity("Warleader's Helix","")); - cubeCards.add(new CardIdentity("Wasteland","")); - cubeCards.add(new CardIdentity("Waterfront Bouncer","")); - cubeCards.add(new CardIdentity("Watery Grave","")); - cubeCards.add(new CardIdentity("Whip of Erebos","")); - cubeCards.add(new CardIdentity("Wild Mongrel","")); - cubeCards.add(new CardIdentity("Windbrisk Heights","")); - cubeCards.add(new CardIdentity("Windswept Heath","")); - cubeCards.add(new CardIdentity("Winter Orb","")); - cubeCards.add(new CardIdentity("Wolfir Silverheart","")); - cubeCards.add(new CardIdentity("Wood Elves","")); - cubeCards.add(new CardIdentity("Wooded Foothills","")); - cubeCards.add(new CardIdentity("Woodfall Primus","")); - cubeCards.add(new CardIdentity("Woodland Cemetery","")); - cubeCards.add(new CardIdentity("Worn Powerstone","")); - cubeCards.add(new CardIdentity("Wrath of God","")); - cubeCards.add(new CardIdentity("Wurmcoil Engine","")); - cubeCards.add(new CardIdentity("Xathrid Necromancer","")); - cubeCards.add(new CardIdentity("Xenagos, the Reveler","")); - cubeCards.add(new CardIdentity("Yavimaya Coast","")); - cubeCards.add(new CardIdentity("Yavimaya Elder","")); - cubeCards.add(new CardIdentity("Yosei, the Morning Star","")); - cubeCards.add(new CardIdentity("Young Pyromancer","")); - cubeCards.add(new CardIdentity("Zealous Conscripts","")); - - } -} +/* + * 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.tournament.cubes; + +import mage.game.draft.DraftCube; + +/** + * + * @author LevelX2 + */ + +public class MTGOLegacyCube extends DraftCube { + + public MTGOLegacyCube() { + super("MTGO Legacy Cube (600 cards)"); + cubeCards.add(new CardIdentity("Accorder Paladin","")); + cubeCards.add(new CardIdentity("Abrupt Decay","")); + cubeCards.add(new CardIdentity("Acidic Slime","")); + cubeCards.add(new CardIdentity("Act of Aggression","")); + cubeCards.add(new CardIdentity("Adarkar Wastes","")); + cubeCards.add(new CardIdentity("AEther Vial","")); + cubeCards.add(new CardIdentity("Ajani Goldmane","")); + cubeCards.add(new CardIdentity("Ajani Steadfast","")); + cubeCards.add(new CardIdentity("Ajani Vengeant","")); + cubeCards.add(new CardIdentity("Ajani, Caller of the Pride","")); + cubeCards.add(new CardIdentity("Ajani, Mentor of Heroes","")); + cubeCards.add(new CardIdentity("Ancestral Vision","")); + cubeCards.add(new CardIdentity("Ancient Grudge","")); + cubeCards.add(new CardIdentity("Ancient Tomb","")); + cubeCards.add(new CardIdentity("Angel of Serenity","")); + cubeCards.add(new CardIdentity("Angelic Destiny","")); + cubeCards.add(new CardIdentity("Anger of the Gods","")); + cubeCards.add(new CardIdentity("Animate Dead","")); + cubeCards.add(new CardIdentity("Arbor Elf","")); + cubeCards.add(new CardIdentity("Arc Trail","")); + cubeCards.add(new CardIdentity("Archangel of Thune","")); + cubeCards.add(new CardIdentity("Arid Mesa","")); + cubeCards.add(new CardIdentity("Armageddon","")); + cubeCards.add(new CardIdentity("Ashcloud Phoenix","")); + cubeCards.add(new CardIdentity("Ashiok, Nightmare Weaver","")); + cubeCards.add(new CardIdentity("Augur of Bolas","")); + cubeCards.add(new CardIdentity("Avacyn's Pilgrim","")); + cubeCards.add(new CardIdentity("Avalanche Riders","")); + cubeCards.add(new CardIdentity("Avenger of Zendikar","")); + cubeCards.add(new CardIdentity("Awakening Zone","")); + cubeCards.add(new CardIdentity("Bad Moon","")); + cubeCards.add(new CardIdentity("Badlands","")); + cubeCards.add(new CardIdentity("Baleful Strix","")); + cubeCards.add(new CardIdentity("Baneslayer Angel","")); + cubeCards.add(new CardIdentity("Banisher Priest","")); + cubeCards.add(new CardIdentity("Banishing Light","")); + cubeCards.add(new CardIdentity("Basalt Monolith","")); + cubeCards.add(new CardIdentity("Basilisk Collar","")); + cubeCards.add(new CardIdentity("Batterskull","")); + cubeCards.add(new CardIdentity("Battlefield Forge","")); + cubeCards.add(new CardIdentity("Bayou","")); + cubeCards.add(new CardIdentity("Beast Within","")); + cubeCards.add(new CardIdentity("Beetleback Chief","")); + cubeCards.add(new CardIdentity("Bident of Thassa","")); + cubeCards.add(new CardIdentity("Birds of Paradise","")); + cubeCards.add(new CardIdentity("Birthing Pod","")); + cubeCards.add(new CardIdentity("Bitterblossom","")); + cubeCards.add(new CardIdentity("Black Sun's Zenith","")); + cubeCards.add(new CardIdentity("Blade Splicer","")); + cubeCards.add(new CardIdentity("Blood Crypt","")); + cubeCards.add(new CardIdentity("Bloodbraid Elf","")); + cubeCards.add(new CardIdentity("Bloodghast","")); + cubeCards.add(new CardIdentity("Bloodline Keeper","")); + cubeCards.add(new CardIdentity("Bloodsoaked Champion","")); + cubeCards.add(new CardIdentity("Bloodstained Mire","")); + cubeCards.add(new CardIdentity("Bone Shredder","")); + cubeCards.add(new CardIdentity("Bonesplitter","")); + cubeCards.add(new CardIdentity("Bonfire of the Damned","")); + cubeCards.add(new CardIdentity("Boon Satyr","")); + cubeCards.add(new CardIdentity("Borderland Marauder","")); + cubeCards.add(new CardIdentity("Boros Charm","")); + cubeCards.add(new CardIdentity("Boros Elite","")); + cubeCards.add(new CardIdentity("Boros Reckoner","")); + cubeCards.add(new CardIdentity("Brago, King Eternal","")); + cubeCards.add(new CardIdentity("Brain Maggot","")); + cubeCards.add(new CardIdentity("Brainstorm","")); + cubeCards.add(new CardIdentity("Breeding Pool","")); + cubeCards.add(new CardIdentity("Brimaz, King of Oreskos","")); + cubeCards.add(new CardIdentity("Brimstone Volley","")); + cubeCards.add(new CardIdentity("Brushland","")); + cubeCards.add(new CardIdentity("Burning-Tree Emissary","")); + cubeCards.add(new CardIdentity("Burst Lightning","")); + cubeCards.add(new CardIdentity("Call of the Herd","")); + cubeCards.add(new CardIdentity("Carnophage","")); + cubeCards.add(new CardIdentity("Caves of Koilos","")); + cubeCards.add(new CardIdentity("Chain Lightning","")); + cubeCards.add(new CardIdentity("Chainer's Edict","")); + cubeCards.add(new CardIdentity("Chameleon Colossus","")); + cubeCards.add(new CardIdentity("Champion of the Parish","")); + cubeCards.add(new CardIdentity("Chandra, Pyromaster","")); + cubeCards.add(new CardIdentity("Chandra's Phoenix","")); + cubeCards.add(new CardIdentity("Char","")); + cubeCards.add(new CardIdentity("Chasm Skulker","")); + cubeCards.add(new CardIdentity("Chord of Calling","")); + cubeCards.add(new CardIdentity("Chrome Mox","")); + cubeCards.add(new CardIdentity("City of Brass","")); + cubeCards.add(new CardIdentity("Clifftop Retreat","")); + cubeCards.add(new CardIdentity("Cloudfin Raptor","")); + cubeCards.add(new CardIdentity("Cloudgoat Ranger","")); + cubeCards.add(new CardIdentity("Coalition Relic","")); + cubeCards.add(new CardIdentity("Commune with the Gods","")); + cubeCards.add(new CardIdentity("Compulsive Research","")); + cubeCards.add(new CardIdentity("Condemn","")); + cubeCards.add(new CardIdentity("Condescend","")); + cubeCards.add(new CardIdentity("Consecrated Sphinx","")); + cubeCards.add(new CardIdentity("Consuming Vapors","")); + cubeCards.add(new CardIdentity("Control Magic","")); + cubeCards.add(new CardIdentity("Coralhelm Commander","")); + cubeCards.add(new CardIdentity("Corrupt","")); + cubeCards.add(new CardIdentity("Council's Judgment","")); + cubeCards.add(new CardIdentity("Counterspell","")); + cubeCards.add(new CardIdentity("Courser of Kruphix","")); + cubeCards.add(new CardIdentity("Crater's Claws","")); + cubeCards.add(new CardIdentity("Craterhoof Behemoth","")); + cubeCards.add(new CardIdentity("Crusade","")); + cubeCards.add(new CardIdentity("Cryptic Command","")); + cubeCards.add(new CardIdentity("Cultivate","")); + cubeCards.add(new CardIdentity("Cunning Sparkmage","")); + cubeCards.add(new CardIdentity("Curse of Predation","")); + cubeCards.add(new CardIdentity("Cursed Scroll","")); + cubeCards.add(new CardIdentity("Cyclonic Rift","")); + cubeCards.add(new CardIdentity("Damnation","")); + cubeCards.add(new CardIdentity("Dark Confidant","")); + cubeCards.add(new CardIdentity("Dark Ritual","")); + cubeCards.add(new CardIdentity("Darkblast","")); + cubeCards.add(new CardIdentity("Day of Judgment","")); + cubeCards.add(new CardIdentity("Daze","")); + cubeCards.add(new CardIdentity("Deceiver Exarch","")); + cubeCards.add(new CardIdentity("Deep Analysis","")); + cubeCards.add(new CardIdentity("Delver of Secrets","")); + cubeCards.add(new CardIdentity("Deranged Hermit","")); + cubeCards.add(new CardIdentity("Desecration Demon","")); + cubeCards.add(new CardIdentity("Detention Sphere","")); + cubeCards.add(new CardIdentity("Devil's Play","")); + cubeCards.add(new CardIdentity("Diabolic Servitude","")); + cubeCards.add(new CardIdentity("Dictate of Heliod","")); + cubeCards.add(new CardIdentity("Dig Through Time","")); + cubeCards.add(new CardIdentity("Diregraf Ghoul","")); + cubeCards.add(new CardIdentity("Disciple of Bolas","")); + cubeCards.add(new CardIdentity("Disenchant","")); + cubeCards.add(new CardIdentity("Disfigure","")); + cubeCards.add(new CardIdentity("Dismember","")); + cubeCards.add(new CardIdentity("Dismiss","")); + cubeCards.add(new CardIdentity("Dissolve","")); + cubeCards.add(new CardIdentity("Domri Rade","")); + cubeCards.add(new CardIdentity("Doom Blade","")); + cubeCards.add(new CardIdentity("Doomed Traveler","")); + cubeCards.add(new CardIdentity("Dragon Fodder","")); + cubeCards.add(new CardIdentity("Dragonskull Summit","")); + cubeCards.add(new CardIdentity("Dread Return","")); + cubeCards.add(new CardIdentity("Dreadbore","")); + cubeCards.add(new CardIdentity("Drowned Catacomb","")); + cubeCards.add(new CardIdentity("Dualcaster Mage","")); + cubeCards.add(new CardIdentity("Dungeon Geists","")); + cubeCards.add(new CardIdentity("Duplicant","")); + cubeCards.add(new CardIdentity("Duress","")); + cubeCards.add(new CardIdentity("Edric, Spymaster of Trest","")); + cubeCards.add(new CardIdentity("Eight-and-a-Half-Tails","")); + cubeCards.add(new CardIdentity("Electrolyze","")); + cubeCards.add(new CardIdentity("Elesh Norn, Grand Cenobite","")); + cubeCards.add(new CardIdentity("Elite Vanguard","")); + cubeCards.add(new CardIdentity("Elspeth Tirel","")); + cubeCards.add(new CardIdentity("Elspeth, Knight-Errant","")); + cubeCards.add(new CardIdentity("Elspeth, Sun's Champion","")); + cubeCards.add(new CardIdentity("Elves of Deep Shadow","")); + cubeCards.add(new CardIdentity("Elvish Mystic","")); + cubeCards.add(new CardIdentity("Emeria Angel","")); + cubeCards.add(new CardIdentity("Emrakul, the Aeons Torn","")); + cubeCards.add(new CardIdentity("Entomb","")); + cubeCards.add(new CardIdentity("Entreat the Angels","")); + cubeCards.add(new CardIdentity("Essence Scatter","")); + cubeCards.add(new CardIdentity("Eternal Dragon","")); + cubeCards.add(new CardIdentity("Eternal Witness","")); + cubeCards.add(new CardIdentity("Eureka","")); + cubeCards.add(new CardIdentity("Everflowing Chalice","")); + cubeCards.add(new CardIdentity("Exalted Angel","")); + cubeCards.add(new CardIdentity("Exhume","")); + cubeCards.add(new CardIdentity("Explore","")); + cubeCards.add(new CardIdentity("Fact or Fiction","")); + cubeCards.add(new CardIdentity("Faith's Fetters","")); + cubeCards.add(new CardIdentity("Falkenrath Aristocrat","")); + cubeCards.add(new CardIdentity("Far // Away","")); + cubeCards.add(new CardIdentity("Farseek","")); + cubeCards.add(new CardIdentity("Fauna Shaman","")); + cubeCards.add(new CardIdentity("Figure of Destiny","")); + cubeCards.add(new CardIdentity("Fire // Ice","")); + cubeCards.add(new CardIdentity("Fireblast","")); + cubeCards.add(new CardIdentity("Firebolt","")); + cubeCards.add(new CardIdentity("Firedrinker Satyr","")); + cubeCards.add(new CardIdentity("Firefist Striker","")); + cubeCards.add(new CardIdentity("Flame Slash","")); + cubeCards.add(new CardIdentity("Flametongue Kavu","")); + cubeCards.add(new CardIdentity("Fleecemane Lion","")); + cubeCards.add(new CardIdentity("Flickerwisp","")); + cubeCards.add(new CardIdentity("Flooded Strand","")); + cubeCards.add(new CardIdentity("Forbid","")); + cubeCards.add(new CardIdentity("Forbidden Alchemy","")); + cubeCards.add(new CardIdentity("Force of Will","")); + cubeCards.add(new CardIdentity("Force Spike","")); + cubeCards.add(new CardIdentity("Frenzied Goblin","")); + cubeCards.add(new CardIdentity("Freyalise, Llanowar's Fury","")); + cubeCards.add(new CardIdentity("Frontline Medic","")); + cubeCards.add(new CardIdentity("Frost Titan","")); + cubeCards.add(new CardIdentity("Future Sight","")); + cubeCards.add(new CardIdentity("Fyndhorn Elves","")); + cubeCards.add(new CardIdentity("Gaea's Cradle","")); + cubeCards.add(new CardIdentity("Garruk Relentless","")); + cubeCards.add(new CardIdentity("Garruk Wildspeaker","")); + cubeCards.add(new CardIdentity("Garruk, Apex Predator","")); + cubeCards.add(new CardIdentity("Garruk, Caller of Beasts","")); + cubeCards.add(new CardIdentity("Garruk, Primal Hunter","")); + cubeCards.add(new CardIdentity("Gatekeeper of Malakir","")); + cubeCards.add(new CardIdentity("Gather the Townsfolk","")); + cubeCards.add(new CardIdentity("Geist of Saint Traft","")); + cubeCards.add(new CardIdentity("Genesis Wave","")); + cubeCards.add(new CardIdentity("Geralf's Messenger","")); + cubeCards.add(new CardIdentity("Gerrard's Verdict","")); + cubeCards.add(new CardIdentity("Ghor-Clan Rampager","")); + cubeCards.add(new CardIdentity("Gideon Jura","")); + cubeCards.add(new CardIdentity("Gifts Ungiven","")); + cubeCards.add(new CardIdentity("Gilded Lotus","")); + cubeCards.add(new CardIdentity("Glacial Fortress","")); + cubeCards.add(new CardIdentity("Glen Elendra Archmage","")); + cubeCards.add(new CardIdentity("Glorious Anthem","")); + cubeCards.add(new CardIdentity("Gnarled Scarhide","")); + cubeCards.add(new CardIdentity("Go for the Throat","")); + cubeCards.add(new CardIdentity("Goblin Bombardment","")); + cubeCards.add(new CardIdentity("Goblin Bushwhacker","")); + cubeCards.add(new CardIdentity("Goblin Electromancer","")); + cubeCards.add(new CardIdentity("Goblin Guide","")); + cubeCards.add(new CardIdentity("Goblin Rabblemaster","")); + cubeCards.add(new CardIdentity("Goblin Wardriver","")); + cubeCards.add(new CardIdentity("Godless Shrine","")); + cubeCards.add(new CardIdentity("Gore-House Chainwalker","")); + cubeCards.add(new CardIdentity("Grafted Wargear","")); + cubeCards.add(new CardIdentity("Grave Titan","")); + cubeCards.add(new CardIdentity("Graveborn Muse","")); + cubeCards.add(new CardIdentity("Gravecrawler","")); + cubeCards.add(new CardIdentity("Gray Merchant of Asphodel","")); + cubeCards.add(new CardIdentity("Greater Gargadon","")); + cubeCards.add(new CardIdentity("Green Sun's Zenith","")); + cubeCards.add(new CardIdentity("Grim Lavamancer","")); + cubeCards.add(new CardIdentity("Grim Monolith","")); + cubeCards.add(new CardIdentity("Griselbrand","")); + cubeCards.add(new CardIdentity("Grisly Salvage","")); + cubeCards.add(new CardIdentity("Guttersnipe","")); + cubeCards.add(new CardIdentity("Hall of Triumph","")); + cubeCards.add(new CardIdentity("Hallowed Fountain","")); + cubeCards.add(new CardIdentity("Hallowed Spiritkeeper","")); + cubeCards.add(new CardIdentity("Hammer of Purphoros","")); + cubeCards.add(new CardIdentity("Harmonize","")); + cubeCards.add(new CardIdentity("Hellrider","")); + cubeCards.add(new CardIdentity("Herald of Torment","")); + cubeCards.add(new CardIdentity("Hero of Bladehold","")); + cubeCards.add(new CardIdentity("Hero of Oxid Ridge","")); + cubeCards.add(new CardIdentity("Hero's Downfall","")); + cubeCards.add(new CardIdentity("Hinterland Harbor","")); + cubeCards.add(new CardIdentity("Honor of the Pure","")); + cubeCards.add(new CardIdentity("Hordeling Outburst","")); + cubeCards.add(new CardIdentity("Hornet Queen","")); + cubeCards.add(new CardIdentity("Huntmaster of the Fells","")); + cubeCards.add(new CardIdentity("Hymn to Tourach","")); + cubeCards.add(new CardIdentity("Hypnotic Specter","")); + cubeCards.add(new CardIdentity("Imperial Recruiter","")); + cubeCards.add(new CardIdentity("Imposing Sovereign","")); + cubeCards.add(new CardIdentity("Impulse","")); + cubeCards.add(new CardIdentity("Incinerate","")); + cubeCards.add(new CardIdentity("Indrik Stomphowler","")); + cubeCards.add(new CardIdentity("Inferno Titan","")); + cubeCards.add(new CardIdentity("Inquisition of Kozilek","")); + cubeCards.add(new CardIdentity("Into the Roil","")); + cubeCards.add(new CardIdentity("Intuition","")); + cubeCards.add(new CardIdentity("Isamaru, Hound of Konda","")); + cubeCards.add(new CardIdentity("Isochron Scepter","")); + cubeCards.add(new CardIdentity("Isolated Chapel","")); + cubeCards.add(new CardIdentity("Jace Beleren","")); + cubeCards.add(new CardIdentity("Jace, Architect of Thought","")); + cubeCards.add(new CardIdentity("Jace, the Mind Sculptor","")); + cubeCards.add(new CardIdentity("Jackal Pup","")); + cubeCards.add(new CardIdentity("Joraga Treespeaker","")); + cubeCards.add(new CardIdentity("Journey to Nowhere","")); + cubeCards.add(new CardIdentity("Kami of Ancient Law","")); + cubeCards.add(new CardIdentity("Karmic Guide","")); + cubeCards.add(new CardIdentity("Karn Liberated","")); + cubeCards.add(new CardIdentity("Karplusan Forest","")); + cubeCards.add(new CardIdentity("Keiga, the Tide Star","")); + cubeCards.add(new CardIdentity("Keranos, God of Storms","")); + cubeCards.add(new CardIdentity("Kiki-Jiki, Mirror Breaker","")); + cubeCards.add(new CardIdentity("Kiln Fiend","")); + cubeCards.add(new CardIdentity("Kiora, the Crashing Wave","")); + cubeCards.add(new CardIdentity("Kira, Great Glass-Spinner","")); + cubeCards.add(new CardIdentity("Kitchen Finks","")); + cubeCards.add(new CardIdentity("Knight of Infamy","")); + cubeCards.add(new CardIdentity("Kodama's Reach","")); + cubeCards.add(new CardIdentity("Kokusho, the Evening Star","")); + cubeCards.add(new CardIdentity("Kor Skyfisher","")); + cubeCards.add(new CardIdentity("Koth of the Hammer","")); + cubeCards.add(new CardIdentity("Kozilek, Butcher of Truth","")); + cubeCards.add(new CardIdentity("Krenko's Command","")); + cubeCards.add(new CardIdentity("Krosan Grip","")); + cubeCards.add(new CardIdentity("Land Tax","")); + cubeCards.add(new CardIdentity("Legacy's Allure","")); + cubeCards.add(new CardIdentity("Lifebane Zombie","")); + cubeCards.add(new CardIdentity("Lightning Bolt","")); + cubeCards.add(new CardIdentity("Lightning Greaves","")); + cubeCards.add(new CardIdentity("Lightning Helix","")); + cubeCards.add(new CardIdentity("Lightning Mauler","")); + cubeCards.add(new CardIdentity("Lightning Strike","")); + cubeCards.add(new CardIdentity("Liliana of the Veil","")); + cubeCards.add(new CardIdentity("Liliana Vess","")); + cubeCards.add(new CardIdentity("Lingering Souls","")); + cubeCards.add(new CardIdentity("Linvala, Keeper of Silence","")); + cubeCards.add(new CardIdentity("Living Death","")); + cubeCards.add(new CardIdentity("Llanowar Elves","")); + cubeCards.add(new CardIdentity("Llanowar Wastes","")); + cubeCards.add(new CardIdentity("Looter il-Kor","")); + cubeCards.add(new CardIdentity("Lotleth Troll","")); + cubeCards.add(new CardIdentity("Lotus Cobra","")); + cubeCards.add(new CardIdentity("Loxodon Warhammer","")); + cubeCards.add(new CardIdentity("Madcap Skills","")); + cubeCards.add(new CardIdentity("Maelstrom Pulse","")); + cubeCards.add(new CardIdentity("Magma Jet","")); + cubeCards.add(new CardIdentity("Man-o'-War","")); + cubeCards.add(new CardIdentity("Mana Confluence","")); + cubeCards.add(new CardIdentity("Mana Leak","")); + cubeCards.add(new CardIdentity("Mana Tithe","")); + cubeCards.add(new CardIdentity("Marsh Flats","")); + cubeCards.add(new CardIdentity("Martial Coup","")); + cubeCards.add(new CardIdentity("Massacre Wurm","")); + cubeCards.add(new CardIdentity("Master of the Feast","")); + cubeCards.add(new CardIdentity("Master of the Wild Hunt","")); + cubeCards.add(new CardIdentity("Master of Waves","")); + cubeCards.add(new CardIdentity("Meloku the Clouded Mirror","")); + cubeCards.add(new CardIdentity("Mentor of the Meek","")); + cubeCards.add(new CardIdentity("Merfolk Looter","")); + cubeCards.add(new CardIdentity("Mesmeric Fiend","")); + cubeCards.add(new CardIdentity("Mind Stone","")); + cubeCards.add(new CardIdentity("Mirari's Wake","")); + cubeCards.add(new CardIdentity("Mirran Crusader","")); + cubeCards.add(new CardIdentity("Miscalculation","")); + cubeCards.add(new CardIdentity("Mishra's Factory","")); + cubeCards.add(new CardIdentity("Misty Rainforest","")); + cubeCards.add(new CardIdentity("Mizzium Mortars","")); + cubeCards.add(new CardIdentity("Mogg Fanatic","")); + cubeCards.add(new CardIdentity("Mogg War Marshal","")); + cubeCards.add(new CardIdentity("Molten Rain","")); + cubeCards.add(new CardIdentity("Molten-Tail Masticore","")); + cubeCards.add(new CardIdentity("Momentary Blink","")); + cubeCards.add(new CardIdentity("Mother of Runes","")); + cubeCards.add(new CardIdentity("Mox Diamond","")); + cubeCards.add(new CardIdentity("Mulch","")); + cubeCards.add(new CardIdentity("Mulldrifter","")); + cubeCards.add(new CardIdentity("Murderous Cut","")); + cubeCards.add(new CardIdentity("Murderous Redcap","")); + cubeCards.add(new CardIdentity("Mutagenic Growth","")); + cubeCards.add(new CardIdentity("Mutavault","")); + cubeCards.add(new CardIdentity("Myr Battlesphere","")); + cubeCards.add(new CardIdentity("Mystic Snake","")); + cubeCards.add(new CardIdentity("Mystical Teachings","")); + cubeCards.add(new CardIdentity("Nantuko Shade","")); + cubeCards.add(new CardIdentity("Natural Order","")); + cubeCards.add(new CardIdentity("Naturalize","")); + cubeCards.add(new CardIdentity("Negate","")); + cubeCards.add(new CardIdentity("Nekrataal","")); + cubeCards.add(new CardIdentity("Nicol Bolas, Planeswalker","")); + cubeCards.add(new CardIdentity("Night's Whisper","")); + cubeCards.add(new CardIdentity("Nighthowler","")); + cubeCards.add(new CardIdentity("Nightveil Specter","")); + cubeCards.add(new CardIdentity("Nissa, Worldwaker","")); + cubeCards.add(new CardIdentity("Noble Hierarch","")); + cubeCards.add(new CardIdentity("Nykthos, Shrine to Nyx","")); + cubeCards.add(new CardIdentity("Oblivion Ring","")); + cubeCards.add(new CardIdentity("Obstinate Baloth","")); + cubeCards.add(new CardIdentity("Old Man of the Sea","")); + cubeCards.add(new CardIdentity("Olivia Voldaren","")); + cubeCards.add(new CardIdentity("Ophiomancer","")); + cubeCards.add(new CardIdentity("Opposition","")); + cubeCards.add(new CardIdentity("Oracle of Mul Daya","")); + cubeCards.add(new CardIdentity("Oust","")); + cubeCards.add(new CardIdentity("Overgrown Battlement","")); + cubeCards.add(new CardIdentity("Overgrown Tomb","")); + cubeCards.add(new CardIdentity("Pact of Negation","")); + cubeCards.add(new CardIdentity("Pain Seer","")); + cubeCards.add(new CardIdentity("Parallax Wave","")); + cubeCards.add(new CardIdentity("Path to Exile","")); + cubeCards.add(new CardIdentity("Pestermite","")); + cubeCards.add(new CardIdentity("Phantasmal Image","")); + cubeCards.add(new CardIdentity("Phantom Centaur","")); + cubeCards.add(new CardIdentity("Phyrexian Arena","")); + cubeCards.add(new CardIdentity("Phyrexian Metamorph","")); + cubeCards.add(new CardIdentity("Phyrexian Obliterator","")); + cubeCards.add(new CardIdentity("Phyrexian Revoker","")); + cubeCards.add(new CardIdentity("Pillar of Flame","")); + cubeCards.add(new CardIdentity("Plateau","")); + cubeCards.add(new CardIdentity("Plow Under","")); + cubeCards.add(new CardIdentity("Polluted Delta","")); + cubeCards.add(new CardIdentity("Polukranos, World Eater","")); + cubeCards.add(new CardIdentity("Ponder","")); + cubeCards.add(new CardIdentity("Porcelain Legionnaire","")); + cubeCards.add(new CardIdentity("Precinct Captain","")); + cubeCards.add(new CardIdentity("Precursor Golem","")); + cubeCards.add(new CardIdentity("Preordain","")); + cubeCards.add(new CardIdentity("Primal Command","")); + cubeCards.add(new CardIdentity("Prime Speaker Zegana","")); + cubeCards.add(new CardIdentity("Primeval Titan","")); + cubeCards.add(new CardIdentity("Profane Command","")); + cubeCards.add(new CardIdentity("Progenitus","")); + cubeCards.add(new CardIdentity("Prophetic Bolt","")); + cubeCards.add(new CardIdentity("Prophetic Flamespeaker","")); + cubeCards.add(new CardIdentity("Psychatog","")); + cubeCards.add(new CardIdentity("Purphoros, God of the Forge","")); + cubeCards.add(new CardIdentity("Qasali Pridemage","")); + cubeCards.add(new CardIdentity("Raise the Alarm","")); + cubeCards.add(new CardIdentity("Rakdos Cackler","")); + cubeCards.add(new CardIdentity("Ral Zarek","")); + cubeCards.add(new CardIdentity("Rampant Growth","")); + cubeCards.add(new CardIdentity("Rancor","")); + cubeCards.add(new CardIdentity("Ranger of Eos","")); + cubeCards.add(new CardIdentity("Ravages of War","")); + cubeCards.add(new CardIdentity("Reanimate","")); + cubeCards.add(new CardIdentity("Reclamation Sage","")); + cubeCards.add(new CardIdentity("Recurring Nightmare","")); + cubeCards.add(new CardIdentity("Reflecting Pool","")); + cubeCards.add(new CardIdentity("Regrowth","")); + cubeCards.add(new CardIdentity("Remand","")); + cubeCards.add(new CardIdentity("Remove Soul","")); + cubeCards.add(new CardIdentity("Repeal","")); + cubeCards.add(new CardIdentity("Restoration Angel","")); + cubeCards.add(new CardIdentity("Reveillark","")); + cubeCards.add(new CardIdentity("Rift Bolt","")); + cubeCards.add(new CardIdentity("Riftwing Cloudskate","")); + cubeCards.add(new CardIdentity("Riptide Laboratory","")); + cubeCards.add(new CardIdentity("Rishadan Port","")); + cubeCards.add(new CardIdentity("Rofellos, Llanowar Emissary","")); + cubeCards.add(new CardIdentity("Rootbound Crag","")); + cubeCards.add(new CardIdentity("Sacred Foundry","")); + cubeCards.add(new CardIdentity("Sakashima's Student","")); + cubeCards.add(new CardIdentity("Sakura-Tribe Elder","")); + cubeCards.add(new CardIdentity("Sarcomancy","")); + cubeCards.add(new CardIdentity("Sarkhan, the Dragonspeaker","")); + cubeCards.add(new CardIdentity("Satyr Wayfinder","")); + cubeCards.add(new CardIdentity("Savannah","")); + cubeCards.add(new CardIdentity("Savannah Lions","")); + cubeCards.add(new CardIdentity("Scalding Tarn","")); + cubeCards.add(new CardIdentity("Scavenging Ooze","")); + cubeCards.add(new CardIdentity("Scorched Rusalka","")); + cubeCards.add(new CardIdentity("Scrubland","")); + cubeCards.add(new CardIdentity("Sea Gate Oracle","")); + cubeCards.add(new CardIdentity("Seal of Cleansing","")); + cubeCards.add(new CardIdentity("Seal of Fire","")); + cubeCards.add(new CardIdentity("Search for Tomorrow","")); + cubeCards.add(new CardIdentity("Searing Blaze","")); + cubeCards.add(new CardIdentity("Searing Blood","")); + cubeCards.add(new CardIdentity("Searing Spear","")); + cubeCards.add(new CardIdentity("Seeker of the Way","")); + cubeCards.add(new CardIdentity("Sensei's Divining Top","")); + cubeCards.add(new CardIdentity("Serendib Efreet","")); + cubeCards.add(new CardIdentity("Serum Visions","")); + cubeCards.add(new CardIdentity("Setessan Tactics","")); + cubeCards.add(new CardIdentity("Shadowmage Infiltrator","")); + cubeCards.add(new CardIdentity("Shardless Agent","")); + cubeCards.add(new CardIdentity("Sheoldred, Whispering One","")); + cubeCards.add(new CardIdentity("Shivan Reef","")); + cubeCards.add(new CardIdentity("Show and Tell","")); + cubeCards.add(new CardIdentity("Shriekmaw","")); + cubeCards.add(new CardIdentity("Shrine of Burning Rage","")); + cubeCards.add(new CardIdentity("Siege-Gang Commander","")); + cubeCards.add(new CardIdentity("Silverblade Paladin","")); + cubeCards.add(new CardIdentity("Sin Collector","")); + cubeCards.add(new CardIdentity("Sinkhole","")); + cubeCards.add(new CardIdentity("Skinrender","")); + cubeCards.add(new CardIdentity("Skullcrack","")); + cubeCards.add(new CardIdentity("Slagstorm","")); + cubeCards.add(new CardIdentity("Slaughter Pact","")); + cubeCards.add(new CardIdentity("Smash to Smithereens","")); + cubeCards.add(new CardIdentity("Snapcaster Mage","")); + cubeCards.add(new CardIdentity("Sneak Attack","")); + cubeCards.add(new CardIdentity("Soldier of the Pantheon","")); + cubeCards.add(new CardIdentity("Solemn Simulacrum","")); + cubeCards.add(new CardIdentity("Song of the Dryads","")); + cubeCards.add(new CardIdentity("Sorin Markov","")); + cubeCards.add(new CardIdentity("Sorin, Lord of Innistrad","")); + cubeCards.add(new CardIdentity("Sorin, Solemn Visitor","")); + cubeCards.add(new CardIdentity("Soul of Innistrad","")); + cubeCards.add(new CardIdentity("Sower of Temptation","")); + cubeCards.add(new CardIdentity("Spear of Heliod","")); + cubeCards.add(new CardIdentity("Spectral Procession","")); + cubeCards.add(new CardIdentity("Spellskite","")); + cubeCards.add(new CardIdentity("Sphere of the Suns","")); + cubeCards.add(new CardIdentity("Sphinx's Revelation","")); + cubeCards.add(new CardIdentity("Spikeshot Elder","")); + cubeCards.add(new CardIdentity("Spiteful Returned","")); + cubeCards.add(new CardIdentity("Splinter Twin","")); + cubeCards.add(new CardIdentity("Staggershock","")); + cubeCards.add(new CardIdentity("Steam Vents","")); + cubeCards.add(new CardIdentity("Stinkweed Imp","")); + cubeCards.add(new CardIdentity("Stoke the Flames","")); + cubeCards.add(new CardIdentity("Stomping Ground","")); + cubeCards.add(new CardIdentity("Stormbreath Dragon","")); + cubeCards.add(new CardIdentity("Stroke of Genius","")); + cubeCards.add(new CardIdentity("Stromkirk Noble","")); + cubeCards.add(new CardIdentity("Student of Warfare","")); + cubeCards.add(new CardIdentity("Sublime Archangel","")); + cubeCards.add(new CardIdentity("Sulfur Falls","")); + cubeCards.add(new CardIdentity("Sulfuric Vortex","")); + cubeCards.add(new CardIdentity("Sulfurous Springs","")); + cubeCards.add(new CardIdentity("Summoning Trap","")); + cubeCards.add(new CardIdentity("Sun Titan","")); + cubeCards.add(new CardIdentity("Sundering Titan","")); + cubeCards.add(new CardIdentity("Sunpetal Grove","")); + cubeCards.add(new CardIdentity("Supreme Verdict","")); + cubeCards.add(new CardIdentity("Swords to Plowshares","")); + cubeCards.add(new CardIdentity("Sylvan Caryatid","")); + cubeCards.add(new CardIdentity("Sylvan Library","")); + cubeCards.add(new CardIdentity("Taiga","")); + cubeCards.add(new CardIdentity("Talrand, Sky Summoner","")); + cubeCards.add(new CardIdentity("Tamiyo, the Moon Sage","")); + cubeCards.add(new CardIdentity("Tangle Wire","")); + cubeCards.add(new CardIdentity("Tarmogoyf","")); + cubeCards.add(new CardIdentity("Tectonic Edge","")); + cubeCards.add(new CardIdentity("Teetering Peaks","")); + cubeCards.add(new CardIdentity("Teferi, Mage of Zhalfir","")); + cubeCards.add(new CardIdentity("Temple Garden","")); + cubeCards.add(new CardIdentity("Temple of Abandon","")); + cubeCards.add(new CardIdentity("Temple of Deceit","")); + cubeCards.add(new CardIdentity("Temple of Enlightenment","")); + cubeCards.add(new CardIdentity("Temple of Epiphany","")); + cubeCards.add(new CardIdentity("Temple of Malady","")); + cubeCards.add(new CardIdentity("Temple of Malice","")); + cubeCards.add(new CardIdentity("Temple of Mystery","")); + cubeCards.add(new CardIdentity("Temple of Plenty","")); + cubeCards.add(new CardIdentity("Temple of Silence","")); + cubeCards.add(new CardIdentity("Temple of Triumph","")); + cubeCards.add(new CardIdentity("Tempt with Vengeance","")); + cubeCards.add(new CardIdentity("Tendrils of Corruption","")); + cubeCards.add(new CardIdentity("Terastodon","")); + cubeCards.add(new CardIdentity("Terminate","")); + cubeCards.add(new CardIdentity("Terminus","")); + cubeCards.add(new CardIdentity("Thalia, Guardian of Thraben","")); + cubeCards.add(new CardIdentity("Thassa, God of the Sea","")); + cubeCards.add(new CardIdentity("Think Twice","")); + cubeCards.add(new CardIdentity("Thoughtseize","")); + cubeCards.add(new CardIdentity("Thragtusk","")); + cubeCards.add(new CardIdentity("Thran Dynamo","")); + cubeCards.add(new CardIdentity("Through the Breach","")); + cubeCards.add(new CardIdentity("Thrun, the Last Troll","")); + cubeCards.add(new CardIdentity("Thundermaw Hellkite","")); + cubeCards.add(new CardIdentity("Tidehollow Sculler","")); + cubeCards.add(new CardIdentity("Time Warp","")); + cubeCards.add(new CardIdentity("Tooth and Nail","")); + cubeCards.add(new CardIdentity("Toxic Deluge","")); + cubeCards.add(new CardIdentity("Tracker's Instincts","")); + cubeCards.add(new CardIdentity("Tradewind Rider","")); + cubeCards.add(new CardIdentity("Treachery","")); + cubeCards.add(new CardIdentity("Troll Ascetic","")); + cubeCards.add(new CardIdentity("Tropical Island","")); + cubeCards.add(new CardIdentity("Trygon Predator","")); + cubeCards.add(new CardIdentity("Tundra","")); + cubeCards.add(new CardIdentity("Ulamog, the Infinite Gyre","")); + cubeCards.add(new CardIdentity("Ultimate Price","")); + cubeCards.add(new CardIdentity("Umezawa's Jitte","")); + cubeCards.add(new CardIdentity("Unburial Rites","")); + cubeCards.add(new CardIdentity("Underground River","")); + cubeCards.add(new CardIdentity("Underground Sea","")); + cubeCards.add(new CardIdentity("Underworld Connections","")); + cubeCards.add(new CardIdentity("Unexpectedly Absent","")); + cubeCards.add(new CardIdentity("Upheaval","")); + cubeCards.add(new CardIdentity("Vampire Hexmage","")); + cubeCards.add(new CardIdentity("Vampire Lacerator","")); + cubeCards.add(new CardIdentity("Vampire Nighthawk","")); + cubeCards.add(new CardIdentity("Vedalken Shackles","")); + cubeCards.add(new CardIdentity("Vendilion Clique","")); + cubeCards.add(new CardIdentity("Vengevine","")); + cubeCards.add(new CardIdentity("Venser, Shaper Savant","")); + cubeCards.add(new CardIdentity("Venser, the Sojourner","")); + cubeCards.add(new CardIdentity("Verdant Catacombs","")); + cubeCards.add(new CardIdentity("Vindicate","")); + cubeCards.add(new CardIdentity("Visara the Dreadful","")); + cubeCards.add(new CardIdentity("Voice of Resurgence","")); + cubeCards.add(new CardIdentity("Volcanic Island","")); + cubeCards.add(new CardIdentity("Volrath's Stronghold","")); + cubeCards.add(new CardIdentity("Vraska the Unseen","")); + cubeCards.add(new CardIdentity("Wake Thrasher","")); + cubeCards.add(new CardIdentity("Wall of Blossoms","")); + cubeCards.add(new CardIdentity("Wall of Omens","")); + cubeCards.add(new CardIdentity("Wall of Roots","")); + cubeCards.add(new CardIdentity("Warleader's Helix","")); + cubeCards.add(new CardIdentity("Wasteland","")); + cubeCards.add(new CardIdentity("Waterfront Bouncer","")); + cubeCards.add(new CardIdentity("Watery Grave","")); + cubeCards.add(new CardIdentity("Whip of Erebos","")); + cubeCards.add(new CardIdentity("Wild Mongrel","")); + cubeCards.add(new CardIdentity("Windbrisk Heights","")); + cubeCards.add(new CardIdentity("Windswept Heath","")); + cubeCards.add(new CardIdentity("Winter Orb","")); + cubeCards.add(new CardIdentity("Wolfir Silverheart","")); + cubeCards.add(new CardIdentity("Wood Elves","")); + cubeCards.add(new CardIdentity("Wooded Foothills","")); + cubeCards.add(new CardIdentity("Woodfall Primus","")); + cubeCards.add(new CardIdentity("Woodland Cemetery","")); + cubeCards.add(new CardIdentity("Worn Powerstone","")); + cubeCards.add(new CardIdentity("Wrath of God","")); + cubeCards.add(new CardIdentity("Wurmcoil Engine","")); + cubeCards.add(new CardIdentity("Xathrid Necromancer","")); + cubeCards.add(new CardIdentity("Xenagos, the Reveler","")); + cubeCards.add(new CardIdentity("Yavimaya Coast","")); + cubeCards.add(new CardIdentity("Yavimaya Elder","")); + cubeCards.add(new CardIdentity("Yosei, the Morning Star","")); + cubeCards.add(new CardIdentity("Young Pyromancer","")); + cubeCards.add(new CardIdentity("Zealous Conscripts","")); + } +} diff --git a/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/src/mage/tournament/cubes/MTGOLegacyCube2015.java b/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/src/mage/tournament/cubes/MTGOLegacyCubeMarch2015.java similarity index 99% rename from Mage.Server.Plugins/Mage.Tournament.BoosterDraft/src/mage/tournament/cubes/MTGOLegacyCube2015.java rename to Mage.Server.Plugins/Mage.Tournament.BoosterDraft/src/mage/tournament/cubes/MTGOLegacyCubeMarch2015.java index ff78a85711d..6bfd5c837cc 100644 --- a/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/src/mage/tournament/cubes/MTGOLegacyCube2015.java +++ b/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/src/mage/tournament/cubes/MTGOLegacyCubeMarch2015.java @@ -34,10 +34,10 @@ import mage.game.draft.DraftCube; * @author fireshoes */ -public class MTGOLegacyCube2015 extends DraftCube { +public class MTGOLegacyCubeMarch2015 extends DraftCube { - public MTGOLegacyCube2015() { - super("MTGO Legacy Cube 2015 (600 cards)"); + public MTGOLegacyCubeMarch2015() { + super("MTGO Legacy Cube March 2015 (600 cards)"); cubeCards.add(new DraftCube.CardIdentity("Accorder Paladin","")); cubeCards.add(new DraftCube.CardIdentity("Abrupt Decay","")); cubeCards.add(new DraftCube.CardIdentity("Acidic Slime","")); @@ -88,6 +88,7 @@ public class MTGOLegacyCube2015 extends DraftCube { cubeCards.add(new DraftCube.CardIdentity("Bitterblossom","")); cubeCards.add(new DraftCube.CardIdentity("Blade of the Bloodchief","")); cubeCards.add(new DraftCube.CardIdentity("Blade Splicer","")); + cubeCards.add(new DraftCube.CardIdentity("Blood Artist","")); cubeCards.add(new DraftCube.CardIdentity("Blood Crypt","")); cubeCards.add(new DraftCube.CardIdentity("Bloodbraid Elf","")); cubeCards.add(new DraftCube.CardIdentity("Bloodcrazed Neonate","")); @@ -95,13 +96,13 @@ public class MTGOLegacyCube2015 extends DraftCube { cubeCards.add(new DraftCube.CardIdentity("Bloodline Keeper","")); cubeCards.add(new DraftCube.CardIdentity("Bloodlord of Vaasgoth","")); cubeCards.add(new DraftCube.CardIdentity("Bloodstained Mire","")); + cubeCards.add(new DraftCube.CardIdentity("Bloodthrone Vampire","")); cubeCards.add(new DraftCube.CardIdentity("Bogardan Hellkite","")); cubeCards.add(new DraftCube.CardIdentity("Bone Shredder","")); cubeCards.add(new DraftCube.CardIdentity("Bonesplitter","")); cubeCards.add(new DraftCube.CardIdentity("Bonfire of the Damned","")); cubeCards.add(new DraftCube.CardIdentity("Boon Satyr","")); cubeCards.add(new DraftCube.CardIdentity("Boros Charm","")); - cubeCards.add(new DraftCube.CardIdentity("Boros Elite","")); cubeCards.add(new DraftCube.CardIdentity("Boros Reckoner","")); cubeCards.add(new DraftCube.CardIdentity("Brago, King Eternal","")); cubeCards.add(new DraftCube.CardIdentity("Brainstorm","")); @@ -113,7 +114,6 @@ public class MTGOLegacyCube2015 extends DraftCube { cubeCards.add(new DraftCube.CardIdentity("Burst Lightning","")); cubeCards.add(new DraftCube.CardIdentity("Call of the Herd","")); cubeCards.add(new DraftCube.CardIdentity("Captivating Vampire","")); - cubeCards.add(new DraftCube.CardIdentity("Carnophage","")); cubeCards.add(new DraftCube.CardIdentity("Caves of Koilos","")); cubeCards.add(new DraftCube.CardIdentity("Chain Lightning","")); cubeCards.add(new DraftCube.CardIdentity("Chainer's Edict","")); @@ -257,7 +257,6 @@ public class MTGOLegacyCube2015 extends DraftCube { cubeCards.add(new DraftCube.CardIdentity("Glacial Fortress","")); cubeCards.add(new DraftCube.CardIdentity("Glen Elendra Archmage","")); cubeCards.add(new DraftCube.CardIdentity("Glorious Anthem","")); - cubeCards.add(new DraftCube.CardIdentity("Gnarled Scarhide","")); cubeCards.add(new DraftCube.CardIdentity("Go for the Throat","")); cubeCards.add(new DraftCube.CardIdentity("Goblin Bombardment","")); cubeCards.add(new DraftCube.CardIdentity("Goblin Bushwhacker","")); @@ -281,6 +280,7 @@ public class MTGOLegacyCube2015 extends DraftCube { cubeCards.add(new DraftCube.CardIdentity("Hallowed Spiritkeeper","")); cubeCards.add(new DraftCube.CardIdentity("Hammer of Purphoros","")); cubeCards.add(new DraftCube.CardIdentity("Harmonize","")); + cubeCards.add(new DraftCube.CardIdentity("Harrow","")); cubeCards.add(new DraftCube.CardIdentity("Hellrider","")); cubeCards.add(new DraftCube.CardIdentity("Herald of Torment","")); cubeCards.add(new DraftCube.CardIdentity("Hero of Bladehold","")); @@ -359,6 +359,7 @@ public class MTGOLegacyCube2015 extends DraftCube { cubeCards.add(new DraftCube.CardIdentity("Mana Leak","")); cubeCards.add(new DraftCube.CardIdentity("Mana Tithe","")); cubeCards.add(new DraftCube.CardIdentity("Manic Vandal","")); + cubeCards.add(new DraftCube.CardIdentity("Mardu Woe Reaper","")); cubeCards.add(new DraftCube.CardIdentity("Marsh Flats","")); cubeCards.add(new DraftCube.CardIdentity("Martial Coup","")); cubeCards.add(new DraftCube.CardIdentity("Massacre Wurm","")); @@ -382,7 +383,6 @@ public class MTGOLegacyCube2015 extends DraftCube { cubeCards.add(new DraftCube.CardIdentity("Monastery Swiftspear","")); cubeCards.add(new DraftCube.CardIdentity("Mother of Runes","")); cubeCards.add(new DraftCube.CardIdentity("Mox Diamond","")); - cubeCards.add(new DraftCube.CardIdentity("Mulch","")); cubeCards.add(new DraftCube.CardIdentity("Mulldrifter","")); cubeCards.add(new DraftCube.CardIdentity("Murderous Cut","")); cubeCards.add(new DraftCube.CardIdentity("Mutavault","")); @@ -638,6 +638,5 @@ public class MTGOLegacyCube2015 extends DraftCube { cubeCards.add(new DraftCube.CardIdentity("Yosei, the Morning Star","")); cubeCards.add(new DraftCube.CardIdentity("Young Pyromancer","")); cubeCards.add(new DraftCube.CardIdentity("Zealous Conscripts","")); - } } diff --git a/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/src/mage/tournament/cubes/MTGOLegacyCubeSeptember2015.java b/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/src/mage/tournament/cubes/MTGOLegacyCubeSeptember2015.java new file mode 100644 index 00000000000..14f4a608c0a --- /dev/null +++ b/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/src/mage/tournament/cubes/MTGOLegacyCubeSeptember2015.java @@ -0,0 +1,642 @@ +/* + * 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.tournament.cubes; + +import mage.game.draft.DraftCube; + +/** + * + * @author fireshoes + */ + +public class MTGOLegacyCubeSeptember2015 extends DraftCube { + + public MTGOLegacyCubeSeptember2015() { + super("MTGO Legacy Cube September 2015 (600 cards)"); + cubeCards.add(new DraftCube.CardIdentity("Abbot of Keral Keep","")); + cubeCards.add(new DraftCube.CardIdentity("Abhorrent Overlord","")); + cubeCards.add(new DraftCube.CardIdentity("Abrupt Decay","")); + cubeCards.add(new DraftCube.CardIdentity("Abyssal Persecutor","")); + cubeCards.add(new DraftCube.CardIdentity("Accorder Paladin","")); + cubeCards.add(new DraftCube.CardIdentity("Acidic Slime","")); + cubeCards.add(new DraftCube.CardIdentity("Act of Aggression","")); + cubeCards.add(new DraftCube.CardIdentity("Adarkar Wastes","")); + cubeCards.add(new DraftCube.CardIdentity("AEther Vial","")); + cubeCards.add(new DraftCube.CardIdentity("Ainok Survivalist","")); + cubeCards.add(new DraftCube.CardIdentity("Ajani Goldmane","")); + cubeCards.add(new DraftCube.CardIdentity("Ajani Vengeant","")); + cubeCards.add(new DraftCube.CardIdentity("Ajani, Caller of the Pride","")); + cubeCards.add(new DraftCube.CardIdentity("Akroma's Vengeance","")); + cubeCards.add(new DraftCube.CardIdentity("Ancestral Vision","")); + cubeCards.add(new DraftCube.CardIdentity("Ancient Tomb","")); + cubeCards.add(new DraftCube.CardIdentity("Angel of Serenity","")); + cubeCards.add(new DraftCube.CardIdentity("Angelic Destiny","")); + cubeCards.add(new DraftCube.CardIdentity("Anger of the Gods","")); + cubeCards.add(new DraftCube.CardIdentity("Animate Dead","")); + cubeCards.add(new DraftCube.CardIdentity("Arbor Elf","")); + cubeCards.add(new DraftCube.CardIdentity("Arc Trail","")); + cubeCards.add(new DraftCube.CardIdentity("Archangel of Thune","")); + cubeCards.add(new DraftCube.CardIdentity("Arid Mesa","")); + cubeCards.add(new DraftCube.CardIdentity("Armageddon","")); + cubeCards.add(new DraftCube.CardIdentity("Ashcloud Phoenix","")); + cubeCards.add(new DraftCube.CardIdentity("Ashen Rider","")); + cubeCards.add(new DraftCube.CardIdentity("Ashenmoor Gouger","")); + cubeCards.add(new DraftCube.CardIdentity("Ashiok, Nightmare Weaver","")); + cubeCards.add(new DraftCube.CardIdentity("Assemble the Legion","")); + cubeCards.add(new DraftCube.CardIdentity("Attrition","")); + cubeCards.add(new DraftCube.CardIdentity("Augur of Bolas","")); + cubeCards.add(new DraftCube.CardIdentity("Avacyn's Pilgrim","")); + cubeCards.add(new DraftCube.CardIdentity("Avalanche Riders","")); + cubeCards.add(new DraftCube.CardIdentity("Avenger of Zendikar","")); + cubeCards.add(new DraftCube.CardIdentity("Badlands","")); + cubeCards.add(new DraftCube.CardIdentity("Baleful Strix","")); + cubeCards.add(new DraftCube.CardIdentity("Banefire","")); + cubeCards.add(new DraftCube.CardIdentity("Baneslayer Angel","")); + cubeCards.add(new DraftCube.CardIdentity("Banisher Priest","")); + cubeCards.add(new DraftCube.CardIdentity("Banishing Light","")); + cubeCards.add(new DraftCube.CardIdentity("Basalt Monolith","")); + cubeCards.add(new DraftCube.CardIdentity("Basilisk Collar","")); + cubeCards.add(new DraftCube.CardIdentity("Batterskull","")); + cubeCards.add(new DraftCube.CardIdentity("Battlefield Forge","")); + cubeCards.add(new DraftCube.CardIdentity("Bayou","")); + cubeCards.add(new DraftCube.CardIdentity("Beast Within","")); + cubeCards.add(new DraftCube.CardIdentity("Beetleback Chief","")); + cubeCards.add(new DraftCube.CardIdentity("Birds of Paradise","")); + cubeCards.add(new DraftCube.CardIdentity("Birthing Pod","")); + cubeCards.add(new DraftCube.CardIdentity("Bitterblossom","")); + cubeCards.add(new DraftCube.CardIdentity("Blade Splicer","")); + cubeCards.add(new DraftCube.CardIdentity("Blood Crypt","")); + cubeCards.add(new DraftCube.CardIdentity("Bloodbraid Elf","")); + cubeCards.add(new DraftCube.CardIdentity("Bloodghast","")); + cubeCards.add(new DraftCube.CardIdentity("Bloodsoaked Champion","")); + cubeCards.add(new DraftCube.CardIdentity("Bloodstained Mire","")); + cubeCards.add(new DraftCube.CardIdentity("Bogardan Hellkite","")); + cubeCards.add(new DraftCube.CardIdentity("Bone Shredder","")); + cubeCards.add(new DraftCube.CardIdentity("Bonesplitter","")); + cubeCards.add(new DraftCube.CardIdentity("Bonfire of the Damned","")); + cubeCards.add(new DraftCube.CardIdentity("Boros Charm","")); + cubeCards.add(new DraftCube.CardIdentity("Boros Reckoner","")); + cubeCards.add(new DraftCube.CardIdentity("Brago, King Eternal","")); + cubeCards.add(new DraftCube.CardIdentity("Brainstorm","")); + cubeCards.add(new DraftCube.CardIdentity("Breeding Pool","")); + cubeCards.add(new DraftCube.CardIdentity("Brimaz, King of Oreskos","")); + cubeCards.add(new DraftCube.CardIdentity("Brimstone Volley","")); + cubeCards.add(new DraftCube.CardIdentity("Brushland","")); + cubeCards.add(new DraftCube.CardIdentity("Buried Alive","")); + cubeCards.add(new DraftCube.CardIdentity("Burst Lightning","")); + cubeCards.add(new DraftCube.CardIdentity("Careful Study","")); + cubeCards.add(new DraftCube.CardIdentity("Carrion Feeder","")); + cubeCards.add(new DraftCube.CardIdentity("Caves of Koilos","")); + cubeCards.add(new DraftCube.CardIdentity("Chain Lightning","")); + cubeCards.add(new DraftCube.CardIdentity("Chainer's Edict","")); + cubeCards.add(new DraftCube.CardIdentity("Chameleon Colossus","")); + cubeCards.add(new DraftCube.CardIdentity("Champion of the Parish","")); + cubeCards.add(new DraftCube.CardIdentity("Chandra Nalaar","")); + cubeCards.add(new DraftCube.CardIdentity("Chandra, Fire of Kaladesh","")); + cubeCards.add(new DraftCube.CardIdentity("Chandra, Pyromaster","")); + cubeCards.add(new DraftCube.CardIdentity("Chandra's Phoenix","")); + cubeCards.add(new DraftCube.CardIdentity("Char","")); + cubeCards.add(new DraftCube.CardIdentity("Chasm Skulker","")); + cubeCards.add(new DraftCube.CardIdentity("Chord of Calling","")); + cubeCards.add(new DraftCube.CardIdentity("Chromatic Lantern","")); + cubeCards.add(new DraftCube.CardIdentity("Chrome Mox","")); + cubeCards.add(new DraftCube.CardIdentity("City of Brass","")); + cubeCards.add(new DraftCube.CardIdentity("Clifftop Retreat","")); + cubeCards.add(new DraftCube.CardIdentity("Cloudgoat Ranger","")); + cubeCards.add(new DraftCube.CardIdentity("Coalition Relic","")); + cubeCards.add(new DraftCube.CardIdentity("Collected Company","")); + cubeCards.add(new DraftCube.CardIdentity("Compulsive Research","")); + cubeCards.add(new DraftCube.CardIdentity("Condemn","")); + cubeCards.add(new DraftCube.CardIdentity("Condescend","")); + cubeCards.add(new DraftCube.CardIdentity("Consecrated Sphinx","")); + cubeCards.add(new DraftCube.CardIdentity("Control Magic","")); + cubeCards.add(new DraftCube.CardIdentity("Corpse Dance","")); + cubeCards.add(new DraftCube.CardIdentity("Council's Judgment","")); + cubeCards.add(new DraftCube.CardIdentity("Counterspell","")); + cubeCards.add(new DraftCube.CardIdentity("Courser of Kruphix","")); + cubeCards.add(new DraftCube.CardIdentity("Crater's Claws","")); + cubeCards.add(new DraftCube.CardIdentity("Craterhoof Behemoth","")); + cubeCards.add(new DraftCube.CardIdentity("Crusade","")); + cubeCards.add(new DraftCube.CardIdentity("Crux of Fate","")); + cubeCards.add(new DraftCube.CardIdentity("Cryptic Command","")); + cubeCards.add(new DraftCube.CardIdentity("Cultivate","")); + cubeCards.add(new DraftCube.CardIdentity("Cunning Sparkmage","")); + cubeCards.add(new DraftCube.CardIdentity("Cursed Scroll","")); + cubeCards.add(new DraftCube.CardIdentity("Cyclonic Rift","")); + cubeCards.add(new DraftCube.CardIdentity("Damnation","")); + cubeCards.add(new DraftCube.CardIdentity("Dance of the Dead","")); + cubeCards.add(new DraftCube.CardIdentity("Dark Confidant","")); + cubeCards.add(new DraftCube.CardIdentity("Dark Depths","")); + cubeCards.add(new DraftCube.CardIdentity("Dark Petition","")); + cubeCards.add(new DraftCube.CardIdentity("Dark Ritual","")); + cubeCards.add(new DraftCube.CardIdentity("Day of Judgment","")); + cubeCards.add(new DraftCube.CardIdentity("Daze","")); + cubeCards.add(new DraftCube.CardIdentity("Deathrite Shaman","")); + cubeCards.add(new DraftCube.CardIdentity("Deceiver Exarch","")); + cubeCards.add(new DraftCube.CardIdentity("Deep Analysis","")); + cubeCards.add(new DraftCube.CardIdentity("Delver of Secrets","")); + cubeCards.add(new DraftCube.CardIdentity("Demonic Pact","")); + cubeCards.add(new DraftCube.CardIdentity("Den Protector","")); + cubeCards.add(new DraftCube.CardIdentity("Deranged Hermit","")); + cubeCards.add(new DraftCube.CardIdentity("Desecration Demon","")); + cubeCards.add(new DraftCube.CardIdentity("Devil's Play","")); + cubeCards.add(new DraftCube.CardIdentity("Diabolic Servitude","")); + cubeCards.add(new DraftCube.CardIdentity("Dictate of Heliod","")); + cubeCards.add(new DraftCube.CardIdentity("Dig Through Time","")); + cubeCards.add(new DraftCube.CardIdentity("Disciple of Bolas","")); + cubeCards.add(new DraftCube.CardIdentity("Disfigure","")); + cubeCards.add(new DraftCube.CardIdentity("Dismember","")); + cubeCards.add(new DraftCube.CardIdentity("Dismiss","")); + cubeCards.add(new DraftCube.CardIdentity("Dissipate","")); + cubeCards.add(new DraftCube.CardIdentity("Dissolve","")); + cubeCards.add(new DraftCube.CardIdentity("Divinity of Pride","")); + cubeCards.add(new DraftCube.CardIdentity("Domri Rade","")); + cubeCards.add(new DraftCube.CardIdentity("Doom Blade","")); + cubeCards.add(new DraftCube.CardIdentity("Doomed Necromancer","")); + cubeCards.add(new DraftCube.CardIdentity("Dragon Fodder","")); + cubeCards.add(new DraftCube.CardIdentity("Dragonlord Atarka","")); + cubeCards.add(new DraftCube.CardIdentity("Dragonlord Dromoka","")); + cubeCards.add(new DraftCube.CardIdentity("Dragonlord Ojutai","")); + cubeCards.add(new DraftCube.CardIdentity("Dragonlord Silumgar","")); + cubeCards.add(new DraftCube.CardIdentity("Dragonskull Summit","")); + cubeCards.add(new DraftCube.CardIdentity("Dread Return","")); + cubeCards.add(new DraftCube.CardIdentity("Dreadbore","")); + cubeCards.add(new DraftCube.CardIdentity("Dromoka's Command","")); + cubeCards.add(new DraftCube.CardIdentity("Drowned Catacomb","")); + cubeCards.add(new DraftCube.CardIdentity("Dualcaster Mage","")); + cubeCards.add(new DraftCube.CardIdentity("Dungeon Geists","")); + cubeCards.add(new DraftCube.CardIdentity("Duplicant","")); + cubeCards.add(new DraftCube.CardIdentity("Duress","")); + cubeCards.add(new DraftCube.CardIdentity("Edric, Spymaster of Trest","")); + cubeCards.add(new DraftCube.CardIdentity("Eight-and-a-Half-Tails","")); + cubeCards.add(new DraftCube.CardIdentity("Electrolyze","")); + cubeCards.add(new DraftCube.CardIdentity("Elesh Norn, Grand Cenobite","")); + cubeCards.add(new DraftCube.CardIdentity("Elite Vanguard","")); + cubeCards.add(new DraftCube.CardIdentity("Elixir of Immortality","")); + cubeCards.add(new DraftCube.CardIdentity("Elspeth Tirel","")); + cubeCards.add(new DraftCube.CardIdentity("Elspeth, Knight-Errant","")); + cubeCards.add(new DraftCube.CardIdentity("Elspeth, Sun's Champion","")); + cubeCards.add(new DraftCube.CardIdentity("Elves of Deep Shadow","")); + cubeCards.add(new DraftCube.CardIdentity("Elvish Mystic","")); + cubeCards.add(new DraftCube.CardIdentity("Emeria Angel","")); + cubeCards.add(new DraftCube.CardIdentity("Emrakul, the Aeons Torn","")); + cubeCards.add(new DraftCube.CardIdentity("Entomb","")); + cubeCards.add(new DraftCube.CardIdentity("Entreat the Angels","")); + cubeCards.add(new DraftCube.CardIdentity("Erebos, God of the Dead","")); + cubeCards.add(new DraftCube.CardIdentity("Erebos's Titan","")); + cubeCards.add(new DraftCube.CardIdentity("Essence Scatter","")); + cubeCards.add(new DraftCube.CardIdentity("Eternal Dragon","")); + cubeCards.add(new DraftCube.CardIdentity("Eternal Witness","")); + cubeCards.add(new DraftCube.CardIdentity("Eureka","")); + cubeCards.add(new DraftCube.CardIdentity("Everflowing Chalice","")); + cubeCards.add(new DraftCube.CardIdentity("Exalted Angel","")); + cubeCards.add(new DraftCube.CardIdentity("Exhume","")); + cubeCards.add(new DraftCube.CardIdentity("Explore","")); + cubeCards.add(new DraftCube.CardIdentity("Exquisite Firecraft","")); + cubeCards.add(new DraftCube.CardIdentity("Fact or Fiction","")); + cubeCards.add(new DraftCube.CardIdentity("Faith's Fetters","")); + cubeCards.add(new DraftCube.CardIdentity("Falkenrath Aristocrat","")); + cubeCards.add(new DraftCube.CardIdentity("Farseek","")); + cubeCards.add(new DraftCube.CardIdentity("Fauna Shaman","")); + cubeCards.add(new DraftCube.CardIdentity("Fertile Ground","")); + cubeCards.add(new DraftCube.CardIdentity("Fiend Hunter","")); + cubeCards.add(new DraftCube.CardIdentity("Fire // Ice","")); + cubeCards.add(new DraftCube.CardIdentity("Firebolt","")); + cubeCards.add(new DraftCube.CardIdentity("Firefist Striker","")); + cubeCards.add(new DraftCube.CardIdentity("Flame Slash","")); + cubeCards.add(new DraftCube.CardIdentity("Flametongue Kavu","")); + cubeCards.add(new DraftCube.CardIdentity("Flamewake Phoenix","")); + cubeCards.add(new DraftCube.CardIdentity("Fleecemane Lion","")); + cubeCards.add(new DraftCube.CardIdentity("Flickerwisp","")); + cubeCards.add(new DraftCube.CardIdentity("Flooded Strand","")); + cubeCards.add(new DraftCube.CardIdentity("Forbid","")); + cubeCards.add(new DraftCube.CardIdentity("Forbidden Alchemy","")); + cubeCards.add(new DraftCube.CardIdentity("Force of Will","")); + cubeCards.add(new DraftCube.CardIdentity("Force Spike","")); + cubeCards.add(new DraftCube.CardIdentity("Forked Bolt","")); + cubeCards.add(new DraftCube.CardIdentity("Frenzied Goblin","")); + cubeCards.add(new DraftCube.CardIdentity("Freyalise, Llanowar's Fury","")); + cubeCards.add(new DraftCube.CardIdentity("Frontline Medic","")); + cubeCards.add(new DraftCube.CardIdentity("Frost Titan","")); + cubeCards.add(new DraftCube.CardIdentity("Future Sight","")); + cubeCards.add(new DraftCube.CardIdentity("Fyndhorn Elves","")); + cubeCards.add(new DraftCube.CardIdentity("Gaea's Cradle","")); + cubeCards.add(new DraftCube.CardIdentity("Garruk Relentless","")); + cubeCards.add(new DraftCube.CardIdentity("Garruk Wildspeaker","")); + cubeCards.add(new DraftCube.CardIdentity("Garruk, Apex Predator","")); + cubeCards.add(new DraftCube.CardIdentity("Garruk, Caller of Beasts","")); + cubeCards.add(new DraftCube.CardIdentity("Garruk, Primal Hunter","")); + cubeCards.add(new DraftCube.CardIdentity("Gatekeeper of Malakir","")); + cubeCards.add(new DraftCube.CardIdentity("Gather the Townsfolk","")); + cubeCards.add(new DraftCube.CardIdentity("Geist of Saint Traft","")); + cubeCards.add(new DraftCube.CardIdentity("Genesis Wave","")); + cubeCards.add(new DraftCube.CardIdentity("Geralf's Messenger","")); + cubeCards.add(new DraftCube.CardIdentity("Ghor-Clan Rampager","")); + cubeCards.add(new DraftCube.CardIdentity("Gideon Jura","")); + cubeCards.add(new DraftCube.CardIdentity("Gifts Ungiven","")); + cubeCards.add(new DraftCube.CardIdentity("Gilded Lotus","")); + cubeCards.add(new DraftCube.CardIdentity("Gilt-Leaf Winnower","")); + cubeCards.add(new DraftCube.CardIdentity("Gitaxian Probe","")); + cubeCards.add(new DraftCube.CardIdentity("Glacial Fortress","")); + cubeCards.add(new DraftCube.CardIdentity("Glen Elendra Archmage","")); + cubeCards.add(new DraftCube.CardIdentity("Glorious Anthem","")); + cubeCards.add(new DraftCube.CardIdentity("Go for the Throat","")); + cubeCards.add(new DraftCube.CardIdentity("Goblin Bushwhacker","")); + cubeCards.add(new DraftCube.CardIdentity("Goblin Glory Chaser","")); + cubeCards.add(new DraftCube.CardIdentity("Goblin Guide","")); + cubeCards.add(new DraftCube.CardIdentity("Goblin Rabblemaster","")); + cubeCards.add(new DraftCube.CardIdentity("Godless Shrine","")); + cubeCards.add(new DraftCube.CardIdentity("Gore-House Chainwalker","")); + cubeCards.add(new DraftCube.CardIdentity("Grafted Wargear","")); + cubeCards.add(new DraftCube.CardIdentity("Grave Titan","")); + cubeCards.add(new DraftCube.CardIdentity("Gravecrawler","")); + cubeCards.add(new DraftCube.CardIdentity("Gray Merchant of Asphodel","")); + cubeCards.add(new DraftCube.CardIdentity("Greater Gargadon","")); + cubeCards.add(new DraftCube.CardIdentity("Green Sun's Zenith","")); + cubeCards.add(new DraftCube.CardIdentity("Grim Lavamancer","")); + cubeCards.add(new DraftCube.CardIdentity("Griselbrand","")); + cubeCards.add(new DraftCube.CardIdentity("Hall of Triumph","")); + cubeCards.add(new DraftCube.CardIdentity("Hallowed Fountain","")); + cubeCards.add(new DraftCube.CardIdentity("Hallowed Spiritkeeper","")); + cubeCards.add(new DraftCube.CardIdentity("Hammer of Purphoros","")); + cubeCards.add(new DraftCube.CardIdentity("Hangarback Walker","")); + cubeCards.add(new DraftCube.CardIdentity("Harbinger of the Tides","")); + cubeCards.add(new DraftCube.CardIdentity("Harmonize","")); + cubeCards.add(new DraftCube.CardIdentity("Hellrider","")); + cubeCards.add(new DraftCube.CardIdentity("Herald of Torment","")); + cubeCards.add(new DraftCube.CardIdentity("Hero of Bladehold","")); + cubeCards.add(new DraftCube.CardIdentity("Hero's Downfall","")); + cubeCards.add(new DraftCube.CardIdentity("Hidden Dragonslayer","")); + cubeCards.add(new DraftCube.CardIdentity("Hinterland Harbor","")); + cubeCards.add(new DraftCube.CardIdentity("Honor of the Pure","")); + cubeCards.add(new DraftCube.CardIdentity("Hordeling Outburst","")); + cubeCards.add(new DraftCube.CardIdentity("Hornet Queen","")); + cubeCards.add(new DraftCube.CardIdentity("Huntmaster of the Fells","")); + cubeCards.add(new DraftCube.CardIdentity("Hymn to Tourach","")); + cubeCards.add(new DraftCube.CardIdentity("Hypnotic Specter","")); + cubeCards.add(new DraftCube.CardIdentity("Imperial Recruiter","")); + cubeCards.add(new DraftCube.CardIdentity("Impulse","")); + cubeCards.add(new DraftCube.CardIdentity("Incinerate","")); + cubeCards.add(new DraftCube.CardIdentity("Indrik Stomphowler","")); + cubeCards.add(new DraftCube.CardIdentity("Inferno Titan","")); + cubeCards.add(new DraftCube.CardIdentity("Inquisition of Kozilek","")); + cubeCards.add(new DraftCube.CardIdentity("Into the Roil","")); + cubeCards.add(new DraftCube.CardIdentity("Ire Shaman","")); + cubeCards.add(new DraftCube.CardIdentity("Isamaru, Hound of Konda","")); + cubeCards.add(new DraftCube.CardIdentity("Isochron Scepter","")); + cubeCards.add(new DraftCube.CardIdentity("Isolated Chapel","")); + cubeCards.add(new DraftCube.CardIdentity("Izzet Charm","")); + cubeCards.add(new DraftCube.CardIdentity("Jace Beleren","")); + cubeCards.add(new DraftCube.CardIdentity("Jace, Architect of Thought","")); + cubeCards.add(new DraftCube.CardIdentity("Jace, the Mind Sculptor","")); + cubeCards.add(new DraftCube.CardIdentity("Jace, Vryn's Prodigy","")); + cubeCards.add(new DraftCube.CardIdentity("Jackal Pup","")); + cubeCards.add(new DraftCube.CardIdentity("Joraga Treespeaker","")); + cubeCards.add(new DraftCube.CardIdentity("Journey to Nowhere","")); + cubeCards.add(new DraftCube.CardIdentity("Kami of Ancient Law","")); + cubeCards.add(new DraftCube.CardIdentity("Karmic Guide","")); + cubeCards.add(new DraftCube.CardIdentity("Karn Liberated","")); + cubeCards.add(new DraftCube.CardIdentity("Karplusan Forest","")); + cubeCards.add(new DraftCube.CardIdentity("Keiga, the Tide Star","")); + cubeCards.add(new DraftCube.CardIdentity("Keranos, God of Storms","")); + cubeCards.add(new DraftCube.CardIdentity("Kiki-Jiki, Mirror Breaker","")); + cubeCards.add(new DraftCube.CardIdentity("Kiln Fiend","")); + cubeCards.add(new DraftCube.CardIdentity("Kiora, the Crashing Wave","")); + cubeCards.add(new DraftCube.CardIdentity("Kiora's Follower","")); + cubeCards.add(new DraftCube.CardIdentity("Kira, Great Glass-Spinner","")); + cubeCards.add(new DraftCube.CardIdentity("Kitchen Finks","")); + cubeCards.add(new DraftCube.CardIdentity("Kodama's Reach","")); + cubeCards.add(new DraftCube.CardIdentity("Kokusho, the Evening Star","")); + cubeCards.add(new DraftCube.CardIdentity("Kor Skyfisher","")); + cubeCards.add(new DraftCube.CardIdentity("Koth of the Hammer","")); + cubeCards.add(new DraftCube.CardIdentity("Kozilek, Butcher of Truth","")); + cubeCards.add(new DraftCube.CardIdentity("Krenko's Command","")); + cubeCards.add(new DraftCube.CardIdentity("Kytheon, Hero of Akros","")); + cubeCards.add(new DraftCube.CardIdentity("Land Tax","")); + cubeCards.add(new DraftCube.CardIdentity("Legacy's Allure","")); + cubeCards.add(new DraftCube.CardIdentity("Leonin Relic-Warder","")); + cubeCards.add(new DraftCube.CardIdentity("Lightning Bolt","")); + cubeCards.add(new DraftCube.CardIdentity("Lightning Greaves","")); + cubeCards.add(new DraftCube.CardIdentity("Lightning Helix","")); + cubeCards.add(new DraftCube.CardIdentity("Lightning Mauler","")); + cubeCards.add(new DraftCube.CardIdentity("Lightning Strike","")); + cubeCards.add(new DraftCube.CardIdentity("Liliana of the Veil","")); + cubeCards.add(new DraftCube.CardIdentity("Liliana Vess","")); + cubeCards.add(new DraftCube.CardIdentity("Liliana, Heretical Healer","")); + cubeCards.add(new DraftCube.CardIdentity("Lingering Souls","")); + cubeCards.add(new DraftCube.CardIdentity("Linvala, Keeper of Silence","")); + cubeCards.add(new DraftCube.CardIdentity("Living Death","")); + cubeCards.add(new DraftCube.CardIdentity("Llanowar Elves","")); + cubeCards.add(new DraftCube.CardIdentity("Llanowar Mentor","")); + cubeCards.add(new DraftCube.CardIdentity("Llanowar Wastes","")); + cubeCards.add(new DraftCube.CardIdentity("Looter il-Kor","")); + cubeCards.add(new DraftCube.CardIdentity("Lotleth Troll","")); + cubeCards.add(new DraftCube.CardIdentity("Lotus Cobra","")); + cubeCards.add(new DraftCube.CardIdentity("Loxodon Warhammer","")); + cubeCards.add(new DraftCube.CardIdentity("Maelstrom Pulse","")); + cubeCards.add(new DraftCube.CardIdentity("Magma Jet","")); + cubeCards.add(new DraftCube.CardIdentity("Makeshift Mannequin","")); + cubeCards.add(new DraftCube.CardIdentity("Malicious Affliction","")); + cubeCards.add(new DraftCube.CardIdentity("Man-o'-War","")); + cubeCards.add(new DraftCube.CardIdentity("Mana Confluence","")); + cubeCards.add(new DraftCube.CardIdentity("Mana Leak","")); + cubeCards.add(new DraftCube.CardIdentity("Mana Tithe","")); + cubeCards.add(new DraftCube.CardIdentity("Managorger Hydra","")); + cubeCards.add(new DraftCube.CardIdentity("Manic Vandal","")); + cubeCards.add(new DraftCube.CardIdentity("Marsh Flats","")); + cubeCards.add(new DraftCube.CardIdentity("Martial Coup","")); + cubeCards.add(new DraftCube.CardIdentity("Massacre Wurm","")); + cubeCards.add(new DraftCube.CardIdentity("Master of the Wild Hunt","")); + cubeCards.add(new DraftCube.CardIdentity("Master of Waves","")); + cubeCards.add(new DraftCube.CardIdentity("Meloku the Clouded Mirror","")); + cubeCards.add(new DraftCube.CardIdentity("Mentor of the Meek","")); + cubeCards.add(new DraftCube.CardIdentity("Merfolk Looter","")); + cubeCards.add(new DraftCube.CardIdentity("Midnight Banshee","")); + cubeCards.add(new DraftCube.CardIdentity("Mind Stone","")); + cubeCards.add(new DraftCube.CardIdentity("Mirari's Wake","")); + cubeCards.add(new DraftCube.CardIdentity("Mirran Crusader","")); + cubeCards.add(new DraftCube.CardIdentity("Miscalculation","")); + cubeCards.add(new DraftCube.CardIdentity("Mishra's Factory","")); + cubeCards.add(new DraftCube.CardIdentity("Misty Rainforest","")); + cubeCards.add(new DraftCube.CardIdentity("Mizzium Mortars","")); + cubeCards.add(new DraftCube.CardIdentity("Mogg Fanatic","")); + cubeCards.add(new DraftCube.CardIdentity("Mogg War Marshal","")); + cubeCards.add(new DraftCube.CardIdentity("Mogis's Marauder","")); + cubeCards.add(new DraftCube.CardIdentity("Monastery Mentor","")); + cubeCards.add(new DraftCube.CardIdentity("Monastery Swiftspear","")); + cubeCards.add(new DraftCube.CardIdentity("Mother of Runes","")); + cubeCards.add(new DraftCube.CardIdentity("Mox Diamond","")); + cubeCards.add(new DraftCube.CardIdentity("Mulldrifter","")); + cubeCards.add(new DraftCube.CardIdentity("Murderous Cut","")); + cubeCards.add(new DraftCube.CardIdentity("Mutavault","")); + cubeCards.add(new DraftCube.CardIdentity("Myr Battlesphere","")); + cubeCards.add(new DraftCube.CardIdentity("Mystic Snake","")); + cubeCards.add(new DraftCube.CardIdentity("Natural Order","")); + cubeCards.add(new DraftCube.CardIdentity("Nature's Lore","")); + cubeCards.add(new DraftCube.CardIdentity("Necromancy","")); + cubeCards.add(new DraftCube.CardIdentity("Negate","")); + cubeCards.add(new DraftCube.CardIdentity("Nekrataal","")); + cubeCards.add(new DraftCube.CardIdentity("Nicol Bolas, Planeswalker","")); + cubeCards.add(new DraftCube.CardIdentity("Nightveil Specter","")); + cubeCards.add(new DraftCube.CardIdentity("Nissa, Vastwood Seer","")); + cubeCards.add(new DraftCube.CardIdentity("Nissa, Worldwaker","")); + cubeCards.add(new DraftCube.CardIdentity("Noble Hierarch","")); + cubeCards.add(new DraftCube.CardIdentity("Nykthos, Shrine to Nyx","")); + cubeCards.add(new DraftCube.CardIdentity("Oblivion Ring","")); + cubeCards.add(new DraftCube.CardIdentity("Obstinate Baloth","")); + cubeCards.add(new DraftCube.CardIdentity("Ohran Viper","")); + cubeCards.add(new DraftCube.CardIdentity("Old Man of the Sea","")); + cubeCards.add(new DraftCube.CardIdentity("Olivia Voldaren","")); + cubeCards.add(new DraftCube.CardIdentity("Oona's Prowler","")); + cubeCards.add(new DraftCube.CardIdentity("Ophiomancer","")); + cubeCards.add(new DraftCube.CardIdentity("Opposition","")); + cubeCards.add(new DraftCube.CardIdentity("Oracle of Mul Daya","")); + cubeCards.add(new DraftCube.CardIdentity("Oust","")); + cubeCards.add(new DraftCube.CardIdentity("Outpost Siege","")); + cubeCards.add(new DraftCube.CardIdentity("Overgrown Battlement","")); + cubeCards.add(new DraftCube.CardIdentity("Overgrown Tomb","")); + cubeCards.add(new DraftCube.CardIdentity("Overrun","")); + cubeCards.add(new DraftCube.CardIdentity("Pack Rat","")); + cubeCards.add(new DraftCube.CardIdentity("Pact of Negation","")); + cubeCards.add(new DraftCube.CardIdentity("Parallax Wave","")); + cubeCards.add(new DraftCube.CardIdentity("Path to Exile","")); + cubeCards.add(new DraftCube.CardIdentity("Pestermite","")); + cubeCards.add(new DraftCube.CardIdentity("Phantasmal Image","")); + cubeCards.add(new DraftCube.CardIdentity("Phyrexian Arena","")); + cubeCards.add(new DraftCube.CardIdentity("Phyrexian Metamorph","")); + cubeCards.add(new DraftCube.CardIdentity("Phyrexian Obliterator","")); + cubeCards.add(new DraftCube.CardIdentity("Phyrexian Revoker","")); + cubeCards.add(new DraftCube.CardIdentity("Pillar of Flame","")); + cubeCards.add(new DraftCube.CardIdentity("Plateau","")); + cubeCards.add(new DraftCube.CardIdentity("Polluted Delta","")); + cubeCards.add(new DraftCube.CardIdentity("Polukranos, World Eater","")); + cubeCards.add(new DraftCube.CardIdentity("Ponder","")); + cubeCards.add(new DraftCube.CardIdentity("Porcelain Legionnaire","")); + cubeCards.add(new DraftCube.CardIdentity("Precinct Captain","")); + cubeCards.add(new DraftCube.CardIdentity("Precursor Golem","")); + cubeCards.add(new DraftCube.CardIdentity("Preordain","")); + cubeCards.add(new DraftCube.CardIdentity("Primal Command","")); + cubeCards.add(new DraftCube.CardIdentity("Primeval Titan","")); + cubeCards.add(new DraftCube.CardIdentity("Profane Command","")); + cubeCards.add(new DraftCube.CardIdentity("Progenitus","")); + cubeCards.add(new DraftCube.CardIdentity("Prophetic Bolt","")); + cubeCards.add(new DraftCube.CardIdentity("Prophetic Flamespeaker","")); + cubeCards.add(new DraftCube.CardIdentity("Psychatog","")); + cubeCards.add(new DraftCube.CardIdentity("Purphoros, God of the Forge","")); + cubeCards.add(new DraftCube.CardIdentity("Qasali Pridemage","")); + cubeCards.add(new DraftCube.CardIdentity("Raise the Alarm","")); + cubeCards.add(new DraftCube.CardIdentity("Rakdos's Return","")); + cubeCards.add(new DraftCube.CardIdentity("Ral Zarek","")); + cubeCards.add(new DraftCube.CardIdentity("Rampaging Baloths","")); + cubeCards.add(new DraftCube.CardIdentity("Rampant Growth","")); + cubeCards.add(new DraftCube.CardIdentity("Ranger of Eos","")); + cubeCards.add(new DraftCube.CardIdentity("Ratchet Bomb","")); + cubeCards.add(new DraftCube.CardIdentity("Ravages of War","")); + cubeCards.add(new DraftCube.CardIdentity("Read the Bones","")); + cubeCards.add(new DraftCube.CardIdentity("Reanimate","")); + cubeCards.add(new DraftCube.CardIdentity("Reclamation Sage","")); + cubeCards.add(new DraftCube.CardIdentity("Recurring Nightmare","")); + cubeCards.add(new DraftCube.CardIdentity("Reflecting Pool","")); + cubeCards.add(new DraftCube.CardIdentity("Regrowth","")); + cubeCards.add(new DraftCube.CardIdentity("Remand","")); + cubeCards.add(new DraftCube.CardIdentity("Remove Soul","")); + cubeCards.add(new DraftCube.CardIdentity("Repeal","")); + cubeCards.add(new DraftCube.CardIdentity("Restoration Angel","")); + cubeCards.add(new DraftCube.CardIdentity("Reveillark","")); + cubeCards.add(new DraftCube.CardIdentity("Rift Bolt","")); + cubeCards.add(new DraftCube.CardIdentity("Riftwing Cloudskate","")); + cubeCards.add(new DraftCube.CardIdentity("Rishadan Port","")); + cubeCards.add(new DraftCube.CardIdentity("Roast","")); + cubeCards.add(new DraftCube.CardIdentity("Rofellos, Llanowar Emissary","")); + cubeCards.add(new DraftCube.CardIdentity("Rootbound Crag","")); + cubeCards.add(new DraftCube.CardIdentity("Rotting Rats","")); + cubeCards.add(new DraftCube.CardIdentity("Rune-Scarred Demon","")); + cubeCards.add(new DraftCube.CardIdentity("Sacred Foundry","")); + cubeCards.add(new DraftCube.CardIdentity("Sakura-Tribe Elder","")); + cubeCards.add(new DraftCube.CardIdentity("Sarkhan, the Dragonspeaker","")); + cubeCards.add(new DraftCube.CardIdentity("Savannah","")); + cubeCards.add(new DraftCube.CardIdentity("Scalding Tarn","")); + cubeCards.add(new DraftCube.CardIdentity("Scavenging Ooze","")); + cubeCards.add(new DraftCube.CardIdentity("Scrubland","")); + cubeCards.add(new DraftCube.CardIdentity("Sea Gate Oracle","")); + cubeCards.add(new DraftCube.CardIdentity("Seal of Fire","")); + cubeCards.add(new DraftCube.CardIdentity("Search for Tomorrow","")); + cubeCards.add(new DraftCube.CardIdentity("Searing Spear","")); + cubeCards.add(new DraftCube.CardIdentity("Secure the Wastes","")); + cubeCards.add(new DraftCube.CardIdentity("Seeker of the Way","")); + cubeCards.add(new DraftCube.CardIdentity("Sensei's Divining Top","")); + cubeCards.add(new DraftCube.CardIdentity("Serendib Efreet","")); + cubeCards.add(new DraftCube.CardIdentity("Serum Visions","")); + cubeCards.add(new DraftCube.CardIdentity("Shadowmage Infiltrator","")); + cubeCards.add(new DraftCube.CardIdentity("Shallow Grave","")); + cubeCards.add(new DraftCube.CardIdentity("Shardless Agent","")); + cubeCards.add(new DraftCube.CardIdentity("Sheoldred, Whispering One","")); + cubeCards.add(new DraftCube.CardIdentity("Shivan Reef","")); + cubeCards.add(new DraftCube.CardIdentity("Show and Tell","")); + cubeCards.add(new DraftCube.CardIdentity("Shriekmaw","")); + cubeCards.add(new DraftCube.CardIdentity("Sidisi, Undead Vizier","")); + cubeCards.add(new DraftCube.CardIdentity("Siege-Gang Commander","")); + cubeCards.add(new DraftCube.CardIdentity("Silverblade Paladin","")); + cubeCards.add(new DraftCube.CardIdentity("Sin Collector","")); + cubeCards.add(new DraftCube.CardIdentity("Skinrender","")); + cubeCards.add(new DraftCube.CardIdentity("Skullcrack","")); + cubeCards.add(new DraftCube.CardIdentity("Slagstorm","")); + cubeCards.add(new DraftCube.CardIdentity("Slaughter Pact","")); + cubeCards.add(new DraftCube.CardIdentity("Snapcaster Mage","")); + cubeCards.add(new DraftCube.CardIdentity("Sneak Attack","")); + cubeCards.add(new DraftCube.CardIdentity("Soldier of the Pantheon","")); + cubeCards.add(new DraftCube.CardIdentity("Solemn Simulacrum","")); + cubeCards.add(new DraftCube.CardIdentity("Song of the Dryads","")); + cubeCards.add(new DraftCube.CardIdentity("Sorin Markov","")); + cubeCards.add(new DraftCube.CardIdentity("Sorin, Solemn Visitor","")); + cubeCards.add(new DraftCube.CardIdentity("Soulfire Grand Master","")); + cubeCards.add(new DraftCube.CardIdentity("Sower of Temptation","")); + cubeCards.add(new DraftCube.CardIdentity("Spear of Heliod","")); + cubeCards.add(new DraftCube.CardIdentity("Spectral Procession","")); + cubeCards.add(new DraftCube.CardIdentity("Spellskite","")); + cubeCards.add(new DraftCube.CardIdentity("Spell Pierce","")); + cubeCards.add(new DraftCube.CardIdentity("Sphere of the Suns","")); + cubeCards.add(new DraftCube.CardIdentity("Sphinx's Revelation","")); + cubeCards.add(new DraftCube.CardIdentity("Spikeshot Elder","")); + cubeCards.add(new DraftCube.CardIdentity("Splinter Twin","")); + cubeCards.add(new DraftCube.CardIdentity("Staggershock","")); + cubeCards.add(new DraftCube.CardIdentity("Steam Vents","")); + cubeCards.add(new DraftCube.CardIdentity("Stoke the Flames","")); + cubeCards.add(new DraftCube.CardIdentity("Stomping Ground","")); + cubeCards.add(new DraftCube.CardIdentity("Stormbreath Dragon","")); + cubeCards.add(new DraftCube.CardIdentity("Stormtide Leviathan","")); + cubeCards.add(new DraftCube.CardIdentity("Stratus Dancer","")); + cubeCards.add(new DraftCube.CardIdentity("Stroke of Genius","")); + cubeCards.add(new DraftCube.CardIdentity("Stromkirk Noble","")); + cubeCards.add(new DraftCube.CardIdentity("Student of Warfare","")); + cubeCards.add(new DraftCube.CardIdentity("Sublime Archangel","")); + cubeCards.add(new DraftCube.CardIdentity("Sulfur Falls","")); + cubeCards.add(new DraftCube.CardIdentity("Sulfurous Springs","")); + cubeCards.add(new DraftCube.CardIdentity("Summoning Trap","")); + cubeCards.add(new DraftCube.CardIdentity("Sun Titan","")); + cubeCards.add(new DraftCube.CardIdentity("Sundering Titan","")); + cubeCards.add(new DraftCube.CardIdentity("Sunpetal Grove","")); + cubeCards.add(new DraftCube.CardIdentity("Supreme Verdict","")); + cubeCards.add(new DraftCube.CardIdentity("Surrak, the Hunt Caller","")); + cubeCards.add(new DraftCube.CardIdentity("Swords to Plowshares","")); + cubeCards.add(new DraftCube.CardIdentity("Sylvan Caryatid","")); + cubeCards.add(new DraftCube.CardIdentity("Sylvan Library","")); + cubeCards.add(new DraftCube.CardIdentity("Taiga","")); + cubeCards.add(new DraftCube.CardIdentity("Talrand, Sky Summoner","")); + cubeCards.add(new DraftCube.CardIdentity("Tamiyo, the Moon Sage","")); + cubeCards.add(new DraftCube.CardIdentity("Tangle Wire","")); + cubeCards.add(new DraftCube.CardIdentity("Tarmogoyf","")); + cubeCards.add(new DraftCube.CardIdentity("Tasigur, the Golden Fang","")); + cubeCards.add(new DraftCube.CardIdentity("Tectonic Edge","")); + cubeCards.add(new DraftCube.CardIdentity("Teferi, Mage of Zhalfir","")); + cubeCards.add(new DraftCube.CardIdentity("Temple Garden","")); + cubeCards.add(new DraftCube.CardIdentity("Temple of Abandon","")); + cubeCards.add(new DraftCube.CardIdentity("Temple of Deceit","")); + cubeCards.add(new DraftCube.CardIdentity("Temple of Enlightenment","")); + cubeCards.add(new DraftCube.CardIdentity("Temple of Epiphany","")); + cubeCards.add(new DraftCube.CardIdentity("Temple of Malady","")); + cubeCards.add(new DraftCube.CardIdentity("Temple of Malice","")); + cubeCards.add(new DraftCube.CardIdentity("Temple of Mystery","")); + cubeCards.add(new DraftCube.CardIdentity("Temple of Plenty","")); + cubeCards.add(new DraftCube.CardIdentity("Temple of Silence","")); + cubeCards.add(new DraftCube.CardIdentity("Temple of Triumph","")); + cubeCards.add(new DraftCube.CardIdentity("Tempt with Vengeance","")); + cubeCards.add(new DraftCube.CardIdentity("Terastodon","")); + cubeCards.add(new DraftCube.CardIdentity("Terminate","")); + cubeCards.add(new DraftCube.CardIdentity("Terminus","")); + cubeCards.add(new DraftCube.CardIdentity("Thalia, Guardian of Thraben","")); + cubeCards.add(new DraftCube.CardIdentity("Thassa, God of the Sea","")); + cubeCards.add(new DraftCube.CardIdentity("Thespian's Stage","")); + cubeCards.add(new DraftCube.CardIdentity("Thoughtseize","")); + cubeCards.add(new DraftCube.CardIdentity("Thragtusk","")); + cubeCards.add(new DraftCube.CardIdentity("Thran Dynamo","")); + cubeCards.add(new DraftCube.CardIdentity("Through the Breach","")); + cubeCards.add(new DraftCube.CardIdentity("Thrun, the Last Troll","")); + cubeCards.add(new DraftCube.CardIdentity("Thunderbreak Regent","")); + cubeCards.add(new DraftCube.CardIdentity("Thundermaw Hellkite","")); + cubeCards.add(new DraftCube.CardIdentity("Tidehollow Sculler","")); + cubeCards.add(new DraftCube.CardIdentity("Time Warp","")); + cubeCards.add(new DraftCube.CardIdentity("Tooth and Nail","")); + cubeCards.add(new DraftCube.CardIdentity("Toxic Deluge","")); + cubeCards.add(new DraftCube.CardIdentity("Treachery","")); + cubeCards.add(new DraftCube.CardIdentity("Tropical Island","")); + cubeCards.add(new DraftCube.CardIdentity("Trygon Predator","")); + cubeCards.add(new DraftCube.CardIdentity("Tundra","")); + cubeCards.add(new DraftCube.CardIdentity("Ugin, the Spirit Dragon","")); + cubeCards.add(new DraftCube.CardIdentity("Ulamog, the Infinite Gyre","")); + cubeCards.add(new DraftCube.CardIdentity("Ultimate Price","")); + cubeCards.add(new DraftCube.CardIdentity("Unburial Rites","")); + cubeCards.add(new DraftCube.CardIdentity("Underground River","")); + cubeCards.add(new DraftCube.CardIdentity("Underground Sea","")); + cubeCards.add(new DraftCube.CardIdentity("Underworld Connections","")); + cubeCards.add(new DraftCube.CardIdentity("Unexpectedly Absent","")); + cubeCards.add(new DraftCube.CardIdentity("Upheaval","")); + cubeCards.add(new DraftCube.CardIdentity("Utopia Sprawl","")); + cubeCards.add(new DraftCube.CardIdentity("Vampire Hexmage","")); + cubeCards.add(new DraftCube.CardIdentity("Vampire Nighthawk","")); + cubeCards.add(new DraftCube.CardIdentity("Vedalken Shackles","")); + cubeCards.add(new DraftCube.CardIdentity("Vendilion Clique","")); + cubeCards.add(new DraftCube.CardIdentity("Vengevine","")); + cubeCards.add(new DraftCube.CardIdentity("Venser, Shaper Savant","")); + cubeCards.add(new DraftCube.CardIdentity("Venser, the Sojourner","")); + cubeCards.add(new DraftCube.CardIdentity("Verdant Catacombs","")); + cubeCards.add(new DraftCube.CardIdentity("Vindicate","")); + cubeCards.add(new DraftCube.CardIdentity("Volcanic Island","")); + cubeCards.add(new DraftCube.CardIdentity("Volrath's Stronghold","")); + cubeCards.add(new DraftCube.CardIdentity("Voyaging Satyr","")); + cubeCards.add(new DraftCube.CardIdentity("Vraska the Unseen","")); + cubeCards.add(new DraftCube.CardIdentity("Wake Thrasher","")); + cubeCards.add(new DraftCube.CardIdentity("Wall of Blossoms","")); + cubeCards.add(new DraftCube.CardIdentity("Wall of Omens","")); + cubeCards.add(new DraftCube.CardIdentity("Wall of Roots","")); + cubeCards.add(new DraftCube.CardIdentity("Warleader's Helix","")); + cubeCards.add(new DraftCube.CardIdentity("Waterfront Bouncer","")); + cubeCards.add(new DraftCube.CardIdentity("Watery Grave","")); + cubeCards.add(new DraftCube.CardIdentity("Whip of Erebos","")); + cubeCards.add(new DraftCube.CardIdentity("Whisperwood Elemental","")); + cubeCards.add(new DraftCube.CardIdentity("Wild Mongrel","")); + cubeCards.add(new DraftCube.CardIdentity("Windbrisk Heights","")); + cubeCards.add(new DraftCube.CardIdentity("Windswept Heath","")); + cubeCards.add(new DraftCube.CardIdentity("Winter Orb","")); + cubeCards.add(new DraftCube.CardIdentity("Wolfir Silverheart","")); + cubeCards.add(new DraftCube.CardIdentity("Wood Elves","")); + cubeCards.add(new DraftCube.CardIdentity("Wooded Foothills","")); + cubeCards.add(new DraftCube.CardIdentity("Woodfall Primus","")); + cubeCards.add(new DraftCube.CardIdentity("Woodland Bellower","")); + cubeCards.add(new DraftCube.CardIdentity("Woodland Cemetery","")); + cubeCards.add(new DraftCube.CardIdentity("Worn Powerstone","")); + cubeCards.add(new DraftCube.CardIdentity("Wrath of God","")); + cubeCards.add(new DraftCube.CardIdentity("Wurmcoil Engine","")); + cubeCards.add(new DraftCube.CardIdentity("Xenagos, the Reveler","")); + cubeCards.add(new DraftCube.CardIdentity("Yavimaya Coast","")); + cubeCards.add(new DraftCube.CardIdentity("Yavimaya Elder","")); + cubeCards.add(new DraftCube.CardIdentity("Yosei, the Morning Star","")); + cubeCards.add(new DraftCube.CardIdentity("Young Pyromancer","")); + cubeCards.add(new DraftCube.CardIdentity("Zealous Conscripts","")); + } +} diff --git a/Mage.Server/config/config.xml b/Mage.Server/config/config.xml index 1f6ee48d304..62722edea44 100644 --- a/Mage.Server/config/config.xml +++ b/Mage.Server/config/config.xml @@ -63,7 +63,8 @@ - + + diff --git a/Mage.Server/release/config/config.xml b/Mage.Server/release/config/config.xml index 6d2727eae67..39b7f8c6456 100644 --- a/Mage.Server/release/config/config.xml +++ b/Mage.Server/release/config/config.xml @@ -49,7 +49,8 @@ - + + diff --git a/Mage.Server/src/main/java/mage/server/Session.java b/Mage.Server/src/main/java/mage/server/Session.java index 5c2e8f76cf1..6df374f5ff3 100644 --- a/Mage.Server/src/main/java/mage/server/Session.java +++ b/Mage.Server/src/main/java/mage/server/Session.java @@ -36,6 +36,9 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.ReentrantLock; import java.util.regex.Matcher; import java.util.regex.Pattern; +import mage.MageException; +import mage.constants.Constants; +import mage.interfaces.callback.ClientCallback; import mage.players.net.UserData; import mage.players.net.UserGroup; import mage.remote.Connection; @@ -168,15 +171,14 @@ public class Session { userDataView.isAutoOrderTrigger()); user.setUserData(userData); } else { - if (userData.getAvatarId() == 51) { // Update special avatar if first avatar is selected - updateAvatar(user.getName(), userData); - } - userData.setAvatarId(userDataView.getAvatarId()); - userData.setShowAbilityPickerForced(userDataView.isShowAbilityPickerForced()); - userData.setAllowRequestShowHandCards(userDataView.isAllowRequestShowHandCards()); - userData.setUserSkipPrioritySteps(userDataView.getUserSkipPrioritySteps()); - userData.setConfirmEmptyManaPool(userDataView.confirmEmptyManaPool()); - userData.setAskMoveToGraveOrder(userDataView.askMoveToGraveOrder()); + user.getUserData().update(userData); + } + if (user.getUserData().getAvatarId() < Constants.MIN_AVATAR_ID + || user.getUserData().getAvatarId() > Constants.MAX_AVATAR_ID) { + user.getUserData().setAvatarId(Constants.DEFAULT_AVATAR_ID); + } + if (user.getUserData().getAvatarId() == 11) { + user.getUserData().setAvatarId(updateAvatar(user.getName())); } return true; } @@ -187,31 +189,17 @@ public class Session { //TODO: move to separate class //TODO: add for checking for private key switch (userName) { - case "nantuko": - userData.setAvatarId(1000); - break; case "North": userData.setAvatarId(1006); break; case "BetaSteward": - userData.setAvatarId(1008); - break; - case "loki": - userData.setAvatarId(1012); - break; - case "Ayrat": - userData.setAvatarId(1018); - break; + return 1008; case "Bandit": - userData.setAvatarId(1020); - break; - default: - userData.setAvatarId(51); - break; - case "Wehk": - userData.setAvatarId(66); - break; + return 1020; + case "fireshoes": + return 1021; } + return 11; } public String getId() { diff --git a/Mage.Sets/src/mage/sets/BattleForZendikar.java b/Mage.Sets/src/mage/sets/BattleForZendikar.java index b6dc6ad2d77..f21179f9746 100644 --- a/Mage.Sets/src/mage/sets/BattleForZendikar.java +++ b/Mage.Sets/src/mage/sets/BattleForZendikar.java @@ -25,18 +25,21 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets; +import java.util.ArrayList; import java.util.GregorianCalendar; +import java.util.List; import mage.cards.ExpansionSet; +import mage.cards.repository.CardCriteria; +import mage.cards.repository.CardInfo; +import mage.cards.repository.CardRepository; import mage.constants.SetType; /** * * @author fireshoes */ - public class BattleForZendikar extends ExpansionSet { private static final BattleForZendikar fINSTANCE = new BattleForZendikar(); @@ -45,16 +48,33 @@ public class BattleForZendikar extends ExpansionSet { return fINSTANCE; } + List savedSpecialLand = new ArrayList<>(); + private BattleForZendikar() { super("Battle for Zendikar", "BFZ", "mage.sets.battleforzendikar", new GregorianCalendar(2015, 10, 2).getTime(), SetType.EXPANSION); this.blockName = "Battle for Zendikar"; this.hasBoosters = true; this.hasBasicLands = true; this.numBoosterLands = 1; + this.ratioBoosterSpecialLand = 20; // Approximately as rare as opening a foil mythic = 8 * 6 = ~every 48th booster includes one + // I set it to 20 to get it more often this.numBoosterCommon = 10; this.numBoosterUncommon = 3; this.numBoosterRare = 1; this.ratioBoosterMythic = 8; + this.numBoosterSpecial = 0; } + @Override + public List getSpecialLand() { + List specialLand = new ArrayList<>(); + if (savedSpecialLand.isEmpty()) { + CardCriteria criteria = new CardCriteria(); + criteria.setCodes("EXP"); + specialLand.addAll(CardRepository.instance.findCards(criteria)); + } + + specialLand.addAll(savedSpecialLand); + return specialLand; + } } diff --git a/Mage.Sets/src/mage/sets/OathOfTheGatewatch.java b/Mage.Sets/src/mage/sets/OathOfTheGatewatch.java new file mode 100644 index 00000000000..8d1d9030923 --- /dev/null +++ b/Mage.Sets/src/mage/sets/OathOfTheGatewatch.java @@ -0,0 +1,35 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package mage.sets; + +import java.util.GregorianCalendar; +import mage.cards.ExpansionSet; +import mage.constants.SetType; + +/** + * + * @author fireshoes + */ +public class OathOfTheGatewatch extends ExpansionSet { + + private static final OathOfTheGatewatch fINSTANCE = new OathOfTheGatewatch(); + + public static OathOfTheGatewatch getInstance() { + return fINSTANCE; + } + + private OathOfTheGatewatch() { + super("Oath of the Gatewatch", "OGW", "mage.sets.oathofthegatewatch", new GregorianCalendar(2016, 1, 22).getTime(), SetType.EXPANSION); + this.blockName = "Battle for Zendikar"; + this.hasBoosters = true; + this.hasBasicLands = false; + this.numBoosterLands = 1; + this.numBoosterCommon = 10; + this.numBoosterUncommon = 3; + this.numBoosterRare = 1; + this.ratioBoosterMythic = 8; + } +} diff --git a/Mage.Sets/src/mage/sets/ZendikarExpeditions.java b/Mage.Sets/src/mage/sets/ZendikarExpeditions.java new file mode 100644 index 00000000000..ed7759f4c8e --- /dev/null +++ b/Mage.Sets/src/mage/sets/ZendikarExpeditions.java @@ -0,0 +1,51 @@ +/* + * 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; + +import java.util.GregorianCalendar; +import mage.cards.ExpansionSet; +import mage.constants.SetType; + +/** + * + * @author fireshoes + */ +public class ZendikarExpeditions extends ExpansionSet { + + private static final ZendikarExpeditions fINSTANCE = new ZendikarExpeditions(); + + public static ZendikarExpeditions getInstance() { + return fINSTANCE; + } + + private ZendikarExpeditions() { + super("Zendikar Expeditions", "EXP", "mage.sets.zendikarexpeditions", new GregorianCalendar(2015, 10, 2).getTime(), SetType.PROMOTIONAL); + this.hasBoosters = false; + this.hasBasicLands = false; + } +} diff --git a/Mage.Sets/src/mage/sets/alarareborn/FieldmistBorderpost.java b/Mage.Sets/src/mage/sets/alarareborn/FieldmistBorderpost.java index fd91cace663..2db77ebb0ef 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/FieldmistBorderpost.java +++ b/Mage.Sets/src/mage/sets/alarareborn/FieldmistBorderpost.java @@ -34,7 +34,7 @@ import mage.constants.CardType; import mage.constants.Rarity; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.costs.AlternativeCostSourceAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.mana.BlueManaAbility; import mage.abilities.mana.WhiteManaAbility; @@ -64,7 +64,7 @@ public class FieldmistBorderpost extends CardImpl { // You may pay {1} and return a basic land you control to its owner's hand rather than pay Fieldmist Borderpost's mana cost. Ability ability = new AlternativeCostSourceAbility(new GenericManaCost(1)); - ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))); + ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))); this.addAbility(ability); // Fieldmist Borderpost enters the battlefield tapped. diff --git a/Mage.Sets/src/mage/sets/alarareborn/FirewildBorderpost.java b/Mage.Sets/src/mage/sets/alarareborn/FirewildBorderpost.java index 586307655c0..e0464f950e2 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/FirewildBorderpost.java +++ b/Mage.Sets/src/mage/sets/alarareborn/FirewildBorderpost.java @@ -32,7 +32,7 @@ import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.costs.AlternativeCostSourceAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.RedManaAbility; @@ -64,7 +64,7 @@ public class FirewildBorderpost extends CardImpl { // You may pay {1} and return a basic land you control to its owner's hand rather than pay Firewild Borderpost's mana cost. Ability ability = new AlternativeCostSourceAbility(new GenericManaCost(1)); - ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))); + ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))); this.addAbility(ability); // Veinfire Firewild enters the battlefield tapped. diff --git a/Mage.Sets/src/mage/sets/alarareborn/MistveinBorderpost.java b/Mage.Sets/src/mage/sets/alarareborn/MistveinBorderpost.java index dc01e983b54..050cda79a5d 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/MistveinBorderpost.java +++ b/Mage.Sets/src/mage/sets/alarareborn/MistveinBorderpost.java @@ -34,7 +34,7 @@ import mage.constants.CardType; import mage.constants.Rarity; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.costs.AlternativeCostSourceAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.BlueManaAbility; @@ -64,7 +64,7 @@ public class MistveinBorderpost extends CardImpl { // You may pay {1} and return a basic land you control to its owner's hand rather than pay Mistvein Borderpost's mana cost. Ability ability = new AlternativeCostSourceAbility(new GenericManaCost(1)); - ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))); + ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))); this.addAbility(ability); // Mistvein Borderpost enters the battlefield tapped. diff --git a/Mage.Sets/src/mage/sets/alarareborn/Terminate.java b/Mage.Sets/src/mage/sets/alarareborn/Terminate.java index d69a6c1ee7a..bb1c6bf8971 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/Terminate.java +++ b/Mage.Sets/src/mage/sets/alarareborn/Terminate.java @@ -1,38 +1,37 @@ /* -* 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. -*/ - + * 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.alarareborn; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Rarity; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.target.common.TargetCreaturePermanent; /** @@ -44,8 +43,6 @@ public class Terminate extends CardImpl { public Terminate(UUID ownerId) { super(ownerId, 46, "Terminate", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{B}{R}"); this.expansionSetCode = "ARB"; - - // Destroy target creature. It can't be regenerated. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); diff --git a/Mage.Sets/src/mage/sets/alarareborn/VeinfireBorderpost.java b/Mage.Sets/src/mage/sets/alarareborn/VeinfireBorderpost.java index 29ca354d0c0..82c2243a1cb 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/VeinfireBorderpost.java +++ b/Mage.Sets/src/mage/sets/alarareborn/VeinfireBorderpost.java @@ -34,7 +34,7 @@ import mage.constants.CardType; import mage.constants.Rarity; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.costs.AlternativeCostSourceAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.RedManaAbility; @@ -64,7 +64,7 @@ public class VeinfireBorderpost extends CardImpl { // You may pay {1} and return a basic land you control to its owner's hand rather than pay Veinfire Borderpost's mana cost. Ability ability = new AlternativeCostSourceAbility(new GenericManaCost(1)); - ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))); + ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))); this.addAbility(ability); // Veinfire Borderpost enters the battlefield tapped. diff --git a/Mage.Sets/src/mage/sets/alarareborn/WildfieldBorderpost.java b/Mage.Sets/src/mage/sets/alarareborn/WildfieldBorderpost.java index 2015f45f10a..f167e516df3 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/WildfieldBorderpost.java +++ b/Mage.Sets/src/mage/sets/alarareborn/WildfieldBorderpost.java @@ -34,7 +34,7 @@ import mage.constants.CardType; import mage.constants.Rarity; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.costs.AlternativeCostSourceAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.WhiteManaAbility; @@ -64,7 +64,7 @@ public class WildfieldBorderpost extends CardImpl { // You may pay {1} and return a basic land you control to its owner's hand rather than pay Wildfield Borderpost's mana cost. Ability ability = new AlternativeCostSourceAbility(new GenericManaCost(1)); - ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))); + ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))); this.addAbility(ability); // Wildfield Borderpost enters the battlefield tapped. diff --git a/Mage.Sets/src/mage/sets/avacynrestored/AbundantGrowth.java b/Mage.Sets/src/mage/sets/avacynrestored/AbundantGrowth.java index af12b061514..f248e81664d 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/AbundantGrowth.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/AbundantGrowth.java @@ -27,22 +27,26 @@ */ package mage.sets.avacynrestored; -import mage.constants.*; +import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; import mage.abilities.keyword.EnchantAbility; import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.target.TargetPermanent; import mage.target.common.TargetLandPermanent; -import java.util.UUID; - /** * @author noxx */ @@ -53,7 +57,6 @@ public class AbundantGrowth extends CardImpl { this.expansionSetCode = "AVR"; this.subtype.add("Aura"); - // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); this.getSpellAbility().addTarget(auraTarget); @@ -66,7 +69,9 @@ public class AbundantGrowth extends CardImpl { // Enchanted land has "{tap}: Add one mana of any color to your mana pool." Ability gainedAbility = new AnyColorManaAbility(new TapSourceCost()); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA))); + Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA); + effect.setText("Enchanted land has \"{tap}: Add one mana of any color to your mana pool.\""); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); } public AbundantGrowth(final AbundantGrowth card) { diff --git a/Mage.Sets/src/mage/sets/avacynrestored/CommandersAuthority.java b/Mage.Sets/src/mage/sets/avacynrestored/CommandersAuthority.java index 7ec41d11dad..a408d0b7fe4 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/CommandersAuthority.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/CommandersAuthority.java @@ -28,8 +28,6 @@ package mage.sets.avacynrestored; import java.util.UUID; - -import mage.constants.*; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; @@ -38,6 +36,13 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.game.permanent.token.HumanToken; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; diff --git a/Mage.Sets/src/mage/sets/avacynrestored/DemonicRising.java b/Mage.Sets/src/mage/sets/avacynrestored/DemonicRising.java index b3f1f6ee608..c320fa32841 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/DemonicRising.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/DemonicRising.java @@ -29,7 +29,6 @@ package mage.sets.avacynrestored; import mage.constants.CardType; import mage.constants.Rarity; -import mage.MageInt; import mage.ObjectColor; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility; @@ -38,7 +37,7 @@ import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.DemonToken; import java.util.UUID; @@ -53,7 +52,6 @@ public class DemonicRising extends CardImpl { super(ownerId, 94, "Demonic Rising", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}{B}"); this.expansionSetCode = "AVR"; - // At the beginning of your end step, if you control exactly one creature, put a 5/5 black Demon creature token with flying onto the battlefield. TriggeredAbility ability = new BeginningOfYourEndStepTriggeredAbility(new CreateTokenEffect(new DemonToken()), false); this.addAbility(new ConditionalTriggeredAbility(ability, OneControlledCreatureCondition.getInstance(), ruleText)); @@ -68,15 +66,3 @@ public class DemonicRising extends CardImpl { return new DemonicRising(this); } } - -class DemonToken extends Token { - public DemonToken() { - super("Demon", "a 5/5 black Demon creature token with flying"); - cardType.add(CardType.CREATURE); - color.setBlack(true); - subtype.add("Demon"); - power = new MageInt(5); - toughness = new MageInt(5); - addAbility(FlyingAbility.getInstance()); - } -} diff --git a/Mage.Sets/src/mage/sets/avacynrestored/VoiceOfTheProvinces.java b/Mage.Sets/src/mage/sets/avacynrestored/VoiceOfTheProvinces.java index 552e5d59c41..4cb50e37fe1 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/VoiceOfTheProvinces.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/VoiceOfTheProvinces.java @@ -36,7 +36,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.HumanToken; /** * @@ -66,15 +66,3 @@ public class VoiceOfTheProvinces extends CardImpl { return new VoiceOfTheProvinces(this); } } - -class HumanToken extends Token { - public HumanToken() { - super("Human", "1/1 white Human creature token"); - cardType.add(CardType.CREATURE); - color.setWhite(true); - - subtype.add("Human"); - power = new MageInt(1); - toughness = new MageInt(1); - } -} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/AdverseConditions.java b/Mage.Sets/src/mage/sets/battleforzendikar/AdverseConditions.java new file mode 100644 index 00000000000..fef0c55058b --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/AdverseConditions.java @@ -0,0 +1,77 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.game.permanent.token.EldraziScionToken; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class AdverseConditions extends CardImpl { + + public AdverseConditions(UUID ownerId) { + super(ownerId, 54, "Adverse Conditions", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{3}{U}"); + this.expansionSetCode = "BFZ"; + + // Devoid + Ability ability = new DevoidAbility(this.color); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + + // Tap up to two target creatures. Those creatures don't untap during their controller's next untap step. + this.getSpellAbility().addEffect(new TapTargetEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2)); + this.getSpellAbility().addEffect(new DontUntapInControllersNextUntapStepTargetEffect()); + // Put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." + Effect effect = new CreateTokenEffect(new EldraziScionToken()); + effect.setText("put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has \"Sacrifice this creature: Add {1} to your mana pool.\""); + this.getSpellAbility().addEffect(effect); + + } + + public AdverseConditions(final AdverseConditions card) { + super(card); + } + + @Override + public AdverseConditions copy() { + return new AdverseConditions(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/AkoumHellkite.java b/Mage.Sets/src/mage/sets/battleforzendikar/AkoumHellkite.java index 8bafa7e7456..b1987a95f8f 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/AkoumHellkite.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/AkoumHellkite.java @@ -78,6 +78,7 @@ public class AkoumHellkite extends CardImpl { return new AkoumHellkite(this); } } + class AkoumHellkiteTriggeredAbility extends TriggeredAbilityImpl { private static final String text = "Landfall - Whenever a land enters the battlefield under your control, {this} deals 1 damage to target creature or player. " diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/AkoumStonewaker.java b/Mage.Sets/src/mage/sets/battleforzendikar/AkoumStonewaker.java new file mode 100644 index 00000000000..aa2253b1e40 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/AkoumStonewaker.java @@ -0,0 +1,126 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.common.LandfallAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.permanent.token.Token; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author LevelX2 + */ +public class AkoumStonewaker extends CardImpl { + + public AkoumStonewaker(UUID ownerId) { + super(ownerId, 140, "Akoum Stonewaker", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Human"); + this.subtype.add("Shaman"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Landfall — Whenever a land enters the battlefield under your control, you may pay {2}{R}. If you do, put a 3/1 red Elemental creature token with trample and haste onto the battlefield. + // Exile that token at the beginning of the next end step. + this.addAbility(new LandfallAbility(new DoIfCostPaid(new AkoumStonewakerEffect(), new ManaCostsImpl("{2}{R}")), false)); + + } + + public AkoumStonewaker(final AkoumStonewaker card) { + super(card); + } + + @Override + public AkoumStonewaker copy() { + return new AkoumStonewaker(this); + } +} + +class AkoumStonewakerEffect extends OneShotEffect { + + public AkoumStonewakerEffect() { + super(Outcome.PutCreatureInPlay); + this.staticText = "put a 3/1 red Elemental creature token with trample and haste onto the battlefield. Exile that token at the beginning of the next end step"; + } + + public AkoumStonewakerEffect(final AkoumStonewakerEffect effect) { + super(effect); + } + + @Override + public AkoumStonewakerEffect copy() { + return new AkoumStonewakerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Token token = new AkoumStonewakerElementalToken(); + if (token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId())) { + ExileTargetEffect exileEffect = new ExileTargetEffect(); + exileEffect.setTargetPointer(new FixedTarget(token.getLastAddedToken())); + DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + delayedAbility.setSourceObject(source.getSourceObject(game), game); + game.addDelayedTriggeredAbility(delayedAbility); + return true; + } + return false; + } +} + +class AkoumStonewakerElementalToken extends Token { + + public AkoumStonewakerElementalToken() { + super("Elemental", "3/1 red Elemental creature token with trample and haste"); + cardType.add(CardType.CREATURE); + color.setRed(true); + subtype.add("Elemental"); + power = new MageInt(3); + toughness = new MageInt(1); + this.addAbility(TrampleAbility.getInstance()); + this.addAbility(HasteAbility.getInstance()); + this.setOriginalExpansionSetCode("BFZ"); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/AlignedHedronNetwork.java b/Mage.Sets/src/mage/sets/battleforzendikar/AlignedHedronNetwork.java new file mode 100644 index 00000000000..297ea626a5d --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/AlignedHedronNetwork.java @@ -0,0 +1,116 @@ +/* + * 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.battleforzendikar; + +import java.util.LinkedHashSet; +import java.util.Set; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.delayed.OnLeaveReturnExiledToBattlefieldAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.Filter; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.util.CardUtil; + +/** + * + * @author LevelX2 + */ +public class AlignedHedronNetwork extends CardImpl { + + public AlignedHedronNetwork(UUID ownerId) { + super(ownerId, 222, "Aligned Hedron Network", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}"); + this.expansionSetCode = "BFZ"; + + // When Aligned Hedron Network enters the battlefield, exile all creatures with power 5 or greater until Aligned Hedron Network leaves the battlefield. + this.addAbility(new EntersBattlefieldTriggeredAbility(new AlignedHedronNetworkExileEffect(), false)); + } + + public AlignedHedronNetwork(final AlignedHedronNetwork card) { + super(card); + } + + @Override + public AlignedHedronNetwork copy() { + return new AlignedHedronNetwork(this); + } +} + +class AlignedHedronNetworkExileEffect extends OneShotEffect { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 5 or greater"); + + static { + filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4)); + } + + public AlignedHedronNetworkExileEffect() { + super(Outcome.Benefit); + this.staticText = "exile all creatures with power 5 or greater until {this} leaves the battlefield"; + } + + public AlignedHedronNetworkExileEffect(final AlignedHedronNetworkExileEffect effect) { + super(effect); + } + + @Override + public AlignedHedronNetworkExileEffect copy() { + return new AlignedHedronNetworkExileEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent permanent = game.getPermanent(source.getSourceId()); + // If Whale leaves the battlefield before its triggered ability resolves, + // the target creature won't be exiled. + if (controller != null && permanent != null) { + Set toExile = new LinkedHashSet<>(); + for (Permanent creature : game.getBattlefield().getActivePermanents(filter, controller.getId(), source.getSourceId(), game)) { + toExile.add(creature); + } + if (!toExile.isEmpty()) { + controller.moveCardsToExile(toExile, source, game, true, CardUtil.getCardExileZoneId(game, source), permanent.getIdName()); + new CreateDelayedTriggeredAbilityEffect(new OnLeaveReturnExiledToBattlefieldAbility()).apply(game, source); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/AllyEncampment.java b/Mage.Sets/src/mage/sets/battleforzendikar/AllyEncampment.java new file mode 100644 index 00000000000..8f2e4c81fb0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/AllyEncampment.java @@ -0,0 +1,87 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.abilities.mana.ConditionalAnyColorManaAbility; +import mage.abilities.mana.conditional.ConditionalSpellManaBuilder; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterSpell; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class AllyEncampment extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("an Ally spell"); + + static { + filter.add(new SubtypePredicate("Ally")); + } + + public AllyEncampment(UUID ownerId) { + super(ownerId, 228, "Ally Encampment", Rarity.RARE, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "BFZ"; + + // {T}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {T} Add one mana of any color to your mana pool. Spend this mana only to cast an Ally spell. + this.addAbility(new ConditionalAnyColorManaAbility(new TapSourceCost(), 1, new ConditionalSpellManaBuilder(filter), true)); + + // {1}, {T}, Sacrifice Ally Encampment: Return target Ally you control to its owner's hand. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new GenericManaCost(1)); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent("Ally", "Ally you control"))); + this.addAbility(ability); + } + + public AllyEncampment(final AllyEncampment card) { + super(card); + } + + @Override + public AllyEncampment copy() { + return new AllyEncampment(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/AltarsReap.java b/Mage.Sets/src/mage/sets/battleforzendikar/AltarsReap.java new file mode 100644 index 00000000000..6af209c70a5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/AltarsReap.java @@ -0,0 +1,52 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class AltarsReap extends mage.sets.innistrad.AltarsReap { + + public AltarsReap(UUID ownerId) { + super(ownerId); + this.cardNumber = 103; + this.expansionSetCode = "BFZ"; + } + + public AltarsReap(final AltarsReap card) { + super(card); + } + + @Override + public AltarsReap copy() { + return new AltarsReap(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/AngelOfRenewal.java b/Mage.Sets/src/mage/sets/battleforzendikar/AngelOfRenewal.java new file mode 100644 index 00000000000..67671cfd94a --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/AngelOfRenewal.java @@ -0,0 +1,71 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class AngelOfRenewal extends CardImpl { + + public AngelOfRenewal(UUID ownerId) { + super(ownerId, 18, "Angel of Renewal", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{5}{W}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Angel"); + this.subtype.add("Ally"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // When Angel of Renewal enters the battlefield, you gain 1 life for each creature you control. + this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect( + new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent())))); + + } + + public AngelOfRenewal(final AngelOfRenewal card) { + super(card); + } + + @Override + public AngelOfRenewal copy() { + return new AngelOfRenewal(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/AngelicCaptain.java b/Mage.Sets/src/mage/sets/battleforzendikar/AngelicCaptain.java new file mode 100644 index 00000000000..f984cb8a502 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/AngelicCaptain.java @@ -0,0 +1,81 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterAttackingCreature; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author fireshoes + */ +public class AngelicCaptain extends CardImpl { + + private static final FilterAttackingCreature filter = new FilterAttackingCreature("other attacking Ally"); + + static { + filter.add(new SubtypePredicate("Ally")); + filter.add(new AnotherPredicate()); + } + + public AngelicCaptain(UUID ownerId) { + super(ownerId, 208, "Angelic Captain", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{R}{W}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Angel"); + this.subtype.add("Ally"); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever Angelic Captain attacks, it gets +1/+1 until end of turn for each other attacking Ally. + PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(filter); + this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(value, value, Duration.EndOfTurn, true), false)); + } + + public AngelicCaptain(final AngelicCaptain card) { + super(card); + } + + @Override + public AngelicCaptain copy() { + return new AngelicCaptain(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/AngelicGift.java b/Mage.Sets/src/mage/sets/battleforzendikar/AngelicGift.java new file mode 100644 index 00000000000..66d622f82e5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/AngelicGift.java @@ -0,0 +1,81 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class AngelicGift extends CardImpl { + + public AngelicGift(UUID ownerId) { + super(ownerId, 19, "Angelic Gift", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // When Angelic Gift enters the battlefield, draw a card. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1), false)); + + // Enchanted creature has flying. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA))); + } + + public AngelicGift(final AngelicGift card) { + super(card); + } + + @Override + public AngelicGift copy() { + return new AngelicGift(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Anticipate.java b/Mage.Sets/src/mage/sets/battleforzendikar/Anticipate.java new file mode 100644 index 00000000000..820a17c2723 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Anticipate.java @@ -0,0 +1,52 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class Anticipate extends mage.sets.dragonsoftarkir.Anticipate { + + public Anticipate(UUID ownerId) { + super(ownerId); + this.cardNumber = 69; + this.expansionSetCode = "BFZ"; + } + + public Anticipate(final Anticipate card) { + super(card); + } + + @Override + public Anticipate copy() { + return new Anticipate(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BaneOfBalaGed.java b/Mage.Sets/src/mage/sets/battleforzendikar/BaneOfBalaGed.java new file mode 100644 index 00000000000..38e38e9c644 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BaneOfBalaGed.java @@ -0,0 +1,101 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.SetTargetPointer; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author LevelX2 + */ +public class BaneOfBalaGed extends CardImpl { + + public BaneOfBalaGed(UUID ownerId) { + super(ownerId, 1, "Bane of Bala Ged", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{7}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.power = new MageInt(7); + this.toughness = new MageInt(5); + + // Whenever Bane of Bala Ged attacks, defending player exiles two permanents he or she controls. + this.addAbility(new AttacksTriggeredAbility(new BaneOfBalaGedEffect(), false, "", SetTargetPointer.PLAYER)); + } + + public BaneOfBalaGed(final BaneOfBalaGed card) { + super(card); + } + + @Override + public BaneOfBalaGed copy() { + return new BaneOfBalaGed(this); + } +} + +class BaneOfBalaGedEffect extends OneShotEffect { + + public BaneOfBalaGedEffect() { + super(Outcome.Benefit); + this.staticText = "defending player exiles two permanents he or she controls"; + } + + public BaneOfBalaGedEffect(final BaneOfBalaGedEffect effect) { + super(effect); + } + + @Override + public BaneOfBalaGedEffect copy() { + return new BaneOfBalaGedEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player defendingPlayer = game.getPlayer(getTargetPointer().getFirst(game, source)); + if (defendingPlayer != null) { + Target target = new TargetControlledPermanent(2); + defendingPlayer.chooseTarget(outcome, target, source, game); + defendingPlayer.moveCards(new CardsImpl(target.getTargets()), null, Zone.EXILED, source, game); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BeastcallerSavant.java b/Mage.Sets/src/mage/sets/battleforzendikar/BeastcallerSavant.java new file mode 100644 index 00000000000..7a5d26bc895 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BeastcallerSavant.java @@ -0,0 +1,107 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.ConditionalMana; +import mage.MageInt; +import mage.MageObject; +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.condition.Condition; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.mana.ConditionalAnyColorManaAbility; +import mage.abilities.mana.builder.ConditionalManaBuilder; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.stack.Spell; + +/** + * + * @author fireshoes + */ +public class BeastcallerSavant extends CardImpl { + + public BeastcallerSavant(UUID ownerId) { + super(ownerId, 170, "Beastcaller Savant", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Elf"); + this.subtype.add("Shaman"); + this.subtype.add("Ally"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // {T}: Add one mana of any color to your mana pool. Spend this mana only to cast creature spells. + this.addAbility(new ConditionalAnyColorManaAbility(1, new BeastcallerSavantManaBuilder())); + } + + public BeastcallerSavant(final BeastcallerSavant card) { + super(card); + } + + @Override + public BeastcallerSavant copy() { + return new BeastcallerSavant(this); + } +} + +class BeastcallerSavantManaBuilder extends ConditionalManaBuilder { + + @Override + public ConditionalMana build(Object... options) { + return new BeastcallerSavantConditionalMana(this.mana); + } + + @Override + public String getRule() { + return "Spend this mana only to cast creature spells"; + } +} + +class BeastcallerSavantConditionalMana extends ConditionalMana { + + public BeastcallerSavantConditionalMana(Mana mana) { + super(mana); + this.staticText = "Spend this mana only to cast creature spells"; + addCondition(new BeastcallerSavantManaCondition()); + } +} + +class BeastcallerSavantManaCondition implements Condition { + + @Override + public boolean apply(Game game, Ability source) { + MageObject object = source.getSourceObject(game); + return object != null && (object instanceof Spell) && object.getCardType().contains(CardType.CREATURE); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BelligerentWhiptail.java b/Mage.Sets/src/mage/sets/battleforzendikar/BelligerentWhiptail.java new file mode 100644 index 00000000000..587fa780eed --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BelligerentWhiptail.java @@ -0,0 +1,66 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.LandfallAbility; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class BelligerentWhiptail extends CardImpl { + + public BelligerentWhiptail(UUID ownerId) { + super(ownerId, 141, "Belligerent Whiptail", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Wurm"); + this.power = new MageInt(4); + this.toughness = new MageInt(2); + + // Landfall — Whenever a land enters the battlefield under your control, Belligerent Whiptail gains first strike until end of turn. + this.addAbility(new LandfallAbility(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn), false)); + + } + + public BelligerentWhiptail(final BelligerentWhiptail card) { + super(card); + } + + @Override + public BelligerentWhiptail copy() { + return new BelligerentWhiptail(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BenthicInfiltrator.java b/Mage.Sets/src/mage/sets/battleforzendikar/BenthicInfiltrator.java new file mode 100644 index 00000000000..dd07f088f12 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BenthicInfiltrator.java @@ -0,0 +1,71 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.CantBeBlockedSourceAbility; +import mage.abilities.keyword.DevoidAbility; +import mage.abilities.keyword.IngestAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class BenthicInfiltrator extends CardImpl { + + public BenthicInfiltrator(UUID ownerId) { + super(ownerId, 55, "Benthic Infiltrator", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Drone"); + this.power = new MageInt(1); + this.toughness = new MageInt(4); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + + // Ingest + this.addAbility(new IngestAbility()); + + // Benthic Infiltrator can't be blocked. + this.addAbility(new CantBeBlockedSourceAbility()); + } + + public BenthicInfiltrator(final BenthicInfiltrator card) { + super(card); + } + + @Override + public BenthicInfiltrator copy() { + return new BenthicInfiltrator(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BlightedCataract.java b/Mage.Sets/src/mage/sets/battleforzendikar/BlightedCataract.java new file mode 100644 index 00000000000..a94c79afa25 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BlightedCataract.java @@ -0,0 +1,71 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class BlightedCataract extends CardImpl { + + public BlightedCataract(UUID ownerId) { + super(ownerId, 229, "Blighted Cataract", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "BFZ"; + + // {T}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {5}{U}, {T}, Sacrifice Blighted Cataract: Draw two cards. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(2), new ManaCostsImpl("{5}{U}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public BlightedCataract(final BlightedCataract card) { + super(card); + } + + @Override + public BlightedCataract copy() { + return new BlightedCataract(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BlightedFen.java b/Mage.Sets/src/mage/sets/battleforzendikar/BlightedFen.java new file mode 100644 index 00000000000..253e3d337c9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BlightedFen.java @@ -0,0 +1,76 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.SacrificeEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetOpponent; + +/** + * + * @author LevelX2 + */ +public class BlightedFen extends CardImpl { + + public BlightedFen(UUID ownerId) { + super(ownerId, 230, "Blighted Fen", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "BFZ"; + + // {T}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {4}{B}, {T}, Sacrifice Blighted Fen: Target opponent sacrifices a creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new SacrificeEffect(new FilterCreaturePermanent(), 1, "Target opponent"), + new ManaCostsImpl<>("{4}{B}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + } + + public BlightedFen(final BlightedFen card) { + super(card); + } + + @Override + public BlightedFen copy() { + return new BlightedFen(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BlightedGorge.java b/Mage.Sets/src/mage/sets/battleforzendikar/BlightedGorge.java new file mode 100644 index 00000000000..b67954fd390 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BlightedGorge.java @@ -0,0 +1,75 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LevelX2 + */ +public class BlightedGorge extends CardImpl { + + public BlightedGorge(UUID ownerId) { + super(ownerId, 231, "Blighted Gorge", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "BFZ"; + + // {T}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {4}{R}, {T}, Sacrifice Blighted Gorge: Blighted Gorge deals 2 damage to target creature or player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new DamageTargetEffect(2), + new ManaCostsImpl<>("{4}{R}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public BlightedGorge(final BlightedGorge card) { + super(card); + } + + @Override + public BlightedGorge copy() { + return new BlightedGorge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BlightedSteppe.java b/Mage.Sets/src/mage/sets/battleforzendikar/BlightedSteppe.java new file mode 100644 index 00000000000..c0c4d00ff6f --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BlightedSteppe.java @@ -0,0 +1,75 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class BlightedSteppe extends CardImpl { + + public BlightedSteppe(UUID ownerId) { + super(ownerId, 232, "Blighted Steppe", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "BFZ"; + + // {T}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {3}{W}, {T}, Sacrifice Blighted Steppe: You gain 2 life for each creature you control. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new GainLifeEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent("creature you control"), 2)), + new ManaCostsImpl<>("{3}{W}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public BlightedSteppe(final BlightedSteppe card) { + super(card); + } + + @Override + public BlightedSteppe copy() { + return new BlightedSteppe(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BlightedWoodland.java b/Mage.Sets/src/mage/sets/battleforzendikar/BlightedWoodland.java new file mode 100644 index 00000000000..694a2e74187 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BlightedWoodland.java @@ -0,0 +1,75 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterBasicLandCard; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author LevelX2 + */ +public class BlightedWoodland extends CardImpl { + + public BlightedWoodland(UUID ownerId) { + super(ownerId, 233, "Blighted Woodland", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "BFZ"; + + // {T}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {3}{G}, {T}, Sacrifice Blighted Woodland: Search your library for up to two basic land cards and put them onto the battlefield tapped. Then shuffle your library. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 2, new FilterBasicLandCard()), true, true), + new ManaCostsImpl<>("{3}{G}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public BlightedWoodland(final BlightedWoodland card) { + super(card); + } + + @Override + public BlightedWoodland copy() { + return new BlightedWoodland(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Blisterpod.java b/Mage.Sets/src/mage/sets/battleforzendikar/Blisterpod.java new file mode 100644 index 00000000000..41398c4c2d7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Blisterpod.java @@ -0,0 +1,71 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.game.permanent.token.EldraziScionToken; + +/** + * + * @author LevelX2 + */ +public class Blisterpod extends CardImpl { + + public Blisterpod(UUID ownerId) { + super(ownerId, 163, "Blisterpod", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Drone"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + // When Blisterpod dies, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." + Effect effect = new CreateTokenEffect(new EldraziScionToken()); + effect.setText("put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has \"Sacrifice this creature: Add {1} to your mana pool.\""); + this.addAbility(new DiesTriggeredAbility(effect, false)); + } + + public Blisterpod(final Blisterpod card) { + super(card); + } + + @Override + public Blisterpod copy() { + return new Blisterpod(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BloodbondVampire.java b/Mage.Sets/src/mage/sets/battleforzendikar/BloodbondVampire.java new file mode 100644 index 00000000000..c2e4713537b --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BloodbondVampire.java @@ -0,0 +1,66 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.GainLifeControllerTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; + +/** + * + * @author LevelX2 + */ +public class BloodbondVampire extends CardImpl { + + public BloodbondVampire(UUID ownerId) { + super(ownerId, 104, "Bloodbond Vampire", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Vampire"); + this.subtype.add("Shaman"); + this.subtype.add("Ally"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Whenever you gain life, put a +1/+1 counter on Bloodbond Vampire. + this.addAbility(new GainLifeControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false)); + } + + public BloodbondVampire(final BloodbondVampire card) { + super(card); + } + + @Override + public BloodbondVampire copy() { + return new BloodbondVampire(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BoilingEarth.java b/Mage.Sets/src/mage/sets/battleforzendikar/BoilingEarth.java new file mode 100644 index 00000000000..45dbf95132a --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BoilingEarth.java @@ -0,0 +1,71 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.keyword.AwakenAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author LevelX2 + */ +public class BoilingEarth extends CardImpl { + + private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature your opponents control"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public BoilingEarth(UUID ownerId) { + super(ownerId, 142, "Boiling Earth", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{R}"); + this.expansionSetCode = "BFZ"; + + // Boiling Earth deals 1 damage to each creature your opponents control. + this.getSpellAbility().addEffect(new DamageAllEffect(1, filter)); + + // Awaken 4—{6}{R} + this.addAbility(new AwakenAbility(this, 4, "{6}{R}")); + } + + public BoilingEarth(final BoilingEarth card) { + super(card); + } + + @Override + public BoilingEarth copy() { + return new BoilingEarth(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BoneSplinters.java b/Mage.Sets/src/mage/sets/battleforzendikar/BoneSplinters.java new file mode 100644 index 00000000000..275ba4d99d0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BoneSplinters.java @@ -0,0 +1,52 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class BoneSplinters extends mage.sets.shardsofalara.BoneSplinters { + + public BoneSplinters(UUID ownerId) { + super(ownerId); + this.cardNumber = 105; + this.expansionSetCode = "BFZ"; + } + + public BoneSplinters(final BoneSplinters card) { + super(card); + } + + @Override + public BoneSplinters copy() { + return new BoneSplinters(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BrilliantSpectrum.java b/Mage.Sets/src/mage/sets/battleforzendikar/BrilliantSpectrum.java new file mode 100644 index 00000000000..b1874062817 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BrilliantSpectrum.java @@ -0,0 +1,66 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.ColorsOfManaSpentToCastCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.discard.DiscardControllerEffect; +import mage.cards.CardImpl; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class BrilliantSpectrum extends CardImpl { + + public BrilliantSpectrum(UUID ownerId) { + super(ownerId, 70, "Brilliant Spectrum", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{U}"); + this.expansionSetCode = "BFZ"; + + // Converge — Draw X cards, where X is the number of colors of mana spent to cast Brilliant Spectrum. Then discard two cards. + this.getSpellAbility().setAbilityWord(AbilityWord.CONVERGE); + Effect effect = new DrawCardSourceControllerEffect(ColorsOfManaSpentToCastCount.getInstance()); + effect.setText("Draw X cards, where X is the number of colors of mana spent to cast {this}"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addEffect(new DiscardControllerEffect(2)); + } + + public BrilliantSpectrum(final BrilliantSpectrum card) { + super(card); + } + + @Override + public BrilliantSpectrum copy() { + return new BrilliantSpectrum(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BringToLight.java b/Mage.Sets/src/mage/sets/battleforzendikar/BringToLight.java new file mode 100644 index 00000000000..21f64d21c7e --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BringToLight.java @@ -0,0 +1,117 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.common.ColorsOfManaSpentToCastCount; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.Filter; +import mage.filter.FilterCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author LevelX2 + */ +public class BringToLight extends CardImpl { + + public BringToLight(UUID ownerId) { + super(ownerId, 209, "Bring to Light", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{G}{U}"); + this.expansionSetCode = "BFZ"; + + // Converge-Search your library for a creature, instant, or sorcery card with converted mana + // cost less than or equal to the number of colors of mana spent to cast Bring to Light, exile that card, + // then shuffle your library. You may cast that card without paying its mana cost. + this.getSpellAbility().addEffect(new BringToLightEffect()); + } + + public BringToLight(final BringToLight card) { + super(card); + } + + @Override + public BringToLight copy() { + return new BringToLight(this); + } +} + +class BringToLightEffect extends OneShotEffect { + + public BringToLightEffect() { + super(Outcome.PlayForFree); + this.staticText = "Converge — Search your library for a creature, instant, or sorcery card with converted mana " + + "cost less than or equal to the number of colors of mana spent to cast Bring to Light, exile that card, " + + "then shuffle your library. You may cast that card without paying its mana cost"; + } + + public BringToLightEffect(final BringToLightEffect effect) { + super(effect); + } + + @Override + public BringToLightEffect copy() { + return new BringToLightEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int numberColors = ColorsOfManaSpentToCastCount.getInstance().calculate(game, source, this); + FilterCard filter = new FilterCard(); + filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), new CardTypePredicate(CardType.INSTANT), new CardTypePredicate(CardType.SORCERY))); + filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, numberColors + 1)); + TargetCardInLibrary target = new TargetCardInLibrary(filter); + controller.searchLibrary(target, game); + Card card = controller.getLibrary().getCard(target.getFirstTarget(), game); + if (card != null) { + controller.moveCards(card, null, Zone.EXILED, source, game); + } + controller.shuffleLibrary(game); + if (card != null) { + if (controller.chooseUse(outcome, "Cast " + card.getName() + " without paying its mana cost?", source, game)) { + controller.cast(card.getSpellAbility(), game, true); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BroodMonitor.java b/Mage.Sets/src/mage/sets/battleforzendikar/BroodMonitor.java new file mode 100644 index 00000000000..ecf6c1431d5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BroodMonitor.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.sets.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.game.permanent.token.EldraziScionToken; + +/** + * + * @author LevelX2 + */ +public class BroodMonitor extends CardImpl { + + public BroodMonitor(UUID ownerId) { + super(ownerId, 164, "Brood Monitor", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Drone"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + // When Brood Monitor enters the battlefield, put three 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." + Effect effect = new CreateTokenEffect(new EldraziScionToken(), 3); + effect.setText("put three 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have \"Sacrifice this creature: Add {1} to your mana pool.\""); + this.addAbility(new EntersBattlefieldTriggeredAbility(effect, false)); + + } + + public BroodMonitor(final BroodMonitor card) { + super(card); + } + + @Override + public BroodMonitor copy() { + return new BroodMonitor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BroodhunterWurm.java b/Mage.Sets/src/mage/sets/battleforzendikar/BroodhunterWurm.java new file mode 100644 index 00000000000..59dcb212687 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BroodhunterWurm.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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class BroodhunterWurm extends CardImpl { + + public BroodhunterWurm(UUID ownerId) { + super(ownerId, 171, "Broodhunter Wurm", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Wurm"); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + } + + public BroodhunterWurm(final BroodhunterWurm card) { + super(card); + } + + @Override + public BroodhunterWurm copy() { + return new BroodhunterWurm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/BrutalExpulsion.java b/Mage.Sets/src/mage/sets/battleforzendikar/BrutalExpulsion.java new file mode 100644 index 00000000000..fcddf947e1b --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/BrutalExpulsion.java @@ -0,0 +1,93 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.effects.common.replacement.DealtDamageToCreatureBySourceDies; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.common.FilterSpellOrPermanent; +import mage.target.common.TargetCreatureOrPlaneswalker; +import mage.target.common.TargetSpellOrPermanent; +import mage.watchers.common.DamagedByWatcher; + +/** + * + * @author LevelX2 + */ +public class BrutalExpulsion extends CardImpl { + + private static final FilterSpellOrPermanent filter = new FilterSpellOrPermanent("spell or creature"); + + static { + filter.setPermanentFilter(new FilterCreaturePermanent()); + } + + public BrutalExpulsion(UUID ownerId) { + super(ownerId, 200, "Brutal Expulsion", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{2}{U}{R}"); + this.expansionSetCode = "BFZ"; + + // Devoid + Ability ability = new DevoidAbility(this.color); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + // Choose one or both + this.getSpellAbility().getModes().setMinModes(1); + this.getSpellAbility().getModes().setMaxModes(2); + // - Return target spell or creature to its owner's hand; + this.getSpellAbility().addTarget(new TargetSpellOrPermanent(1, 1, filter, false)); + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + // or Brutal Expulsion deals 2 damage to target creature or planeswalker. If that permanent would be put into a graveyard this turn, exile it instead. + Mode mode = new Mode(); + mode.getEffects().add(new DamageTargetEffect(2)); + mode.getTargets().add(new TargetCreatureOrPlaneswalker()); + Effect effect = new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn); + effect.setText("If that permanent would be put into a graveyard this turn, exile it instead"); + mode.getEffects().add(effect); + this.getSpellAbility().addMode(mode); + this.getSpellAbility().addWatcher(new DamagedByWatcher()); + } + + public BrutalExpulsion(final BrutalExpulsion card) { + super(card); + } + + @Override + public BrutalExpulsion copy() { + return new BrutalExpulsion(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/CallTheScions.java b/Mage.Sets/src/mage/sets/battleforzendikar/CallTheScions.java new file mode 100644 index 00000000000..439dbe84a3a --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/CallTheScions.java @@ -0,0 +1,69 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.game.permanent.token.EldraziScionToken; + +/** + * + * @author LevelX2 + */ +public class CallTheScions extends CardImpl { + + public CallTheScions(UUID ownerId) { + super(ownerId, 165, "Call the Scions", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{G}"); + this.expansionSetCode = "BFZ"; + + // Devoid + Ability ability = new DevoidAbility(this.color); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + // Put two 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: add {1} to your mana pool." + Effect effect = new CreateTokenEffect(new EldraziScionToken(), 2); + effect.setText("put two 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have \"Sacrifice this creature: Add {1} to your mana pool.\""); + this.getSpellAbility().addEffect(effect); + + } + + public CallTheScions(final CallTheScions card) { + super(card); + } + + @Override + public CallTheScions copy() { + return new CallTheScions(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/CarrierThrall.java b/Mage.Sets/src/mage/sets/battleforzendikar/CarrierThrall.java new file mode 100644 index 00000000000..a3097ea8114 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/CarrierThrall.java @@ -0,0 +1,68 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.game.permanent.token.EldraziScionToken; + +/** + * + * @author LevelX2 + */ +public class CarrierThrall extends CardImpl { + + public CarrierThrall(UUID ownerId) { + super(ownerId, 106, "Carrier Thrall", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Vampire"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // When Carrier Thrall dies, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature. Add {1} to your mana pool." + Effect effect = new CreateTokenEffect(new EldraziScionToken()); + effect.setText("put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has \"Sacrifice this creature: Add {1} to your mana pool.\""); + this.addAbility(new DiesTriggeredAbility(effect, false)); + + } + + public CarrierThrall(final CarrierThrall card) { + super(card); + } + + @Override + public CarrierThrall copy() { + return new CarrierThrall(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/ChasmGuide.java b/Mage.Sets/src/mage/sets/battleforzendikar/ChasmGuide.java new file mode 100644 index 00000000000..ecade73ae51 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/ChasmGuide.java @@ -0,0 +1,69 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AllyEntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class ChasmGuide extends CardImpl { + + public ChasmGuide(UUID ownerId) { + super(ownerId, 143, "Chasm Guide", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Goblin"); + this.subtype.add("Scout"); + this.subtype.add("Ally"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Rally — Whenever Chasm Guide or another Ally enters the battlefield under your control, creatures you control gain haste until end of turn. + this.addAbility(new AllyEntersBattlefieldTriggeredAbility( + new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent("creatures you control")), false)); + } + + public ChasmGuide(final ChasmGuide card) { + super(card); + } + + @Override + public ChasmGuide copy() { + return new ChasmGuide(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/CliffsideLookout.java b/Mage.Sets/src/mage/sets/battleforzendikar/CliffsideLookout.java new file mode 100644 index 00000000000..a362b9e360f --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/CliffsideLookout.java @@ -0,0 +1,68 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class CliffsideLookout extends CardImpl { + + public CliffsideLookout(UUID ownerId) { + super(ownerId, 20, "Cliffside Lookout", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Kor"); + this.subtype.add("Scout"); + this.subtype.add("Ally"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {4}{W}: Creatures you control get +1/+1 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl<>("{4}{W}"))); + } + + public CliffsideLookout(final CliffsideLookout card) { + super(card); + } + + @Override + public CliffsideLookout copy() { + return new CliffsideLookout(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/CloudManta.java b/Mage.Sets/src/mage/sets/battleforzendikar/CloudManta.java new file mode 100644 index 00000000000..6771fb73cdb --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/CloudManta.java @@ -0,0 +1,62 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class CloudManta extends CardImpl { + + public CloudManta(UUID ownerId) { + super(ownerId, 71, "Cloud Manta", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Fish"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + } + + public CloudManta(final CloudManta card) { + super(card); + } + + @Override + public CloudManta copy() { + return new CloudManta(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/ClutchOfCurrents.java b/Mage.Sets/src/mage/sets/battleforzendikar/ClutchOfCurrents.java new file mode 100644 index 00000000000..2619589cb6a --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/ClutchOfCurrents.java @@ -0,0 +1,64 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.keyword.AwakenAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class ClutchOfCurrents extends CardImpl { + + public ClutchOfCurrents(UUID ownerId) { + super(ownerId, 72, "Clutch of Currents", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{U}"); + this.expansionSetCode = "BFZ"; + + // Return target creature to its owner's hand. + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // Awaken 3—{4}{U} + this.addAbility(new AwakenAbility(this, 3, "{4}{U}")); + } + + public ClutchOfCurrents(final ClutchOfCurrents card) { + super(card); + } + + @Override + public ClutchOfCurrents copy() { + return new ClutchOfCurrents(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/CompleteDisregard.java b/Mage.Sets/src/mage/sets/battleforzendikar/CompleteDisregard.java new file mode 100644 index 00000000000..9a923541d9c --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/CompleteDisregard.java @@ -0,0 +1,76 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.Filter; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class CompleteDisregard extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 3 or less"); + + static { + filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 4)); + } + + public CompleteDisregard(UUID ownerId) { + super(ownerId, 90, "Complete Disregard", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{B}"); + this.expansionSetCode = "BFZ"; + + // Devoid + Ability ability = new DevoidAbility(this.color); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + + // Exile target creature with power 3 or less. + this.getSpellAbility().addEffect(new ExileTargetEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + } + + public CompleteDisregard(final CompleteDisregard card) { + super(card); + } + + @Override + public CompleteDisregard copy() { + return new CompleteDisregard(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/ConduitOfRuin.java b/Mage.Sets/src/mage/sets/battleforzendikar/ConduitOfRuin.java new file mode 100644 index 00000000000..772c7872c79 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/ConduitOfRuin.java @@ -0,0 +1,164 @@ +/* + * 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.battleforzendikar; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CastSourceTriggeredAbility; +import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect; +import mage.abilities.effects.common.search.SearchLibraryPutOnLibraryEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.WatcherScope; +import mage.constants.Zone; +import mage.filter.Filter; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.ObjectPlayer; +import mage.filter.predicate.ObjectPlayerPredicate; +import mage.filter.predicate.mageobject.ColorlessPredicate; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.game.Controllable; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.stack.Spell; +import mage.target.common.TargetCardInLibrary; +import mage.watchers.Watcher; + +/** + * + * @author LevelX2 + */ +public class ConduitOfRuin extends CardImpl { + + private static final FilterCreatureCard filter = new FilterCreatureCard("a colorless creature card with converted mana cost 7 or greater"); + private static final FilterCreatureCard filterCost = new FilterCreatureCard("The first creature spell"); + + static { + filter.add(new ColorlessPredicate()); + filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 6)); + filterCost.add(new FirstCastCreatureSpellPredicate()); + } + + public ConduitOfRuin(UUID ownerId) { + super(ownerId, 4, "Conduit of Ruin", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{6}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // When you cast Conduit of Ruin, you may search your library for a colorless creature card with converted mana cost 7 or greater, then shuffle your library and put that card on top of it. + TargetCardInLibrary target = new TargetCardInLibrary(filter); + this.addAbility(new CastSourceTriggeredAbility(new SearchLibraryPutOnLibraryEffect(target, true, true), true)); + + // The first creature spell you cast each turn costs {2} less to cast. + Effect effect = new SpellsCostReductionControllerEffect(filterCost, 2); + effect.setText("The first creature spell you cast each turn costs {2} less to cast"); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect), new ConduitOfRuinWatcher()); + } + + public ConduitOfRuin(final ConduitOfRuin card) { + super(card); + } + + @Override + public ConduitOfRuin copy() { + return new ConduitOfRuin(this); + } +} + +class ConduitOfRuinWatcher extends Watcher { + + Map playerCreatureSpells; + int spellCount = 0; + + public ConduitOfRuinWatcher() { + super("FirstCreatureSpellCastThisTurn", WatcherScope.GAME); + playerCreatureSpells = new HashMap<>(); + } + + public ConduitOfRuinWatcher(final ConduitOfRuinWatcher watcher) { + super(watcher); + this.playerCreatureSpells = new HashMap<>(); + playerCreatureSpells.putAll(watcher.playerCreatureSpells); + } + + @Override + public void watch(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.SPELL_CAST) { + Spell spell = (Spell) game.getObject(event.getTargetId()); + if (spell != null && spell.getCardType().contains(CardType.CREATURE)) { + if (playerCreatureSpells.containsKey(event.getPlayerId())) { + playerCreatureSpells.put(event.getPlayerId(), playerCreatureSpells.get(event.getPlayerId()) + 1); + } else { + playerCreatureSpells.put(event.getPlayerId(), 1); + } + } + } + } + + public int creatureSpellsCastThisTurn(UUID playerId) { + if (playerCreatureSpells.containsKey(playerId)) { + return playerCreatureSpells.get(playerId); + } + return 0; + } + + @Override + public ConduitOfRuinWatcher copy() { + return new ConduitOfRuinWatcher(this); + } + + @Override + public void reset() { + super.reset(); + playerCreatureSpells.clear(); + } +} + +class FirstCastCreatureSpellPredicate implements ObjectPlayerPredicate> { + + @Override + public boolean apply(ObjectPlayer input, Game game) { + if (input.getObject() instanceof Spell + && ((Spell) input.getObject()).getCardType().contains(CardType.CREATURE)) { + ConduitOfRuinWatcher watcher = (ConduitOfRuinWatcher) game.getState().getWatchers().get("FirstCreatureSpellCastThisTurn"); + return watcher != null && watcher.creatureSpellsCastThisTurn(input.getPlayerId()) == 0; + } + return false; + } + + @Override + public String toString() { + return "The first creature spell you cast each turn"; + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/CoralhelmGuide.java b/Mage.Sets/src/mage/sets/battleforzendikar/CoralhelmGuide.java new file mode 100644 index 00000000000..30105514328 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/CoralhelmGuide.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.sets.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class CoralhelmGuide extends CardImpl { + + public CoralhelmGuide(UUID ownerId) { + super(ownerId, 74, "Coralhelm Guide", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Merfolk"); + this.subtype.add("Scout"); + this.subtype.add("Ally"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // {4}{U}: Target creature can't be blocked this turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(Duration.EndOfTurn), new ManaCostsImpl<>("{4}{U}")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public CoralhelmGuide(final CoralhelmGuide card) { + super(card); + } + + @Override + public CoralhelmGuide copy() { + return new CoralhelmGuide(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/CourierGriffin.java b/Mage.Sets/src/mage/sets/battleforzendikar/CourierGriffin.java new file mode 100644 index 00000000000..88a03fe4f6f --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/CourierGriffin.java @@ -0,0 +1,66 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class CourierGriffin extends CardImpl { + + public CourierGriffin(UUID ownerId) { + super(ownerId, 21, "Courier Griffin", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Griffin"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // When Courier Griffin enters the battlefield, you gain 2 life. + this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(2), false)); + } + + public CourierGriffin(final CourierGriffin card) { + super(card); + } + + @Override + public CourierGriffin copy() { + return new CourierGriffin(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/CrumbleToDust.java b/Mage.Sets/src/mage/sets/battleforzendikar/CrumbleToDust.java new file mode 100644 index 00000000000..fcbcf0a1c03 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/CrumbleToDust.java @@ -0,0 +1,67 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.common.ExileTargetAndSearchGraveyardHandLibraryEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetNonBasicLandPermanent; + +/** + * + * @author fireshoes + */ +public class CrumbleToDust extends CardImpl { + + public CrumbleToDust(UUID ownerId) { + super(ownerId, 128, "Crumble to Dust", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{R}"); + this.expansionSetCode = "BFZ"; + + // Devoid + Ability ability = new DevoidAbility(this.color); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + + // Exile target nonbasic land. Search its controller's graveyard, hand, and library for any number of cards with the same name as that land and exile them. Then that player shuffles his or her library. + this.getSpellAbility().addTarget(new TargetNonBasicLandPermanent()); + this.getSpellAbility().addEffect(new ExileTargetAndSearchGraveyardHandLibraryEffect(false, "its controller's", "any number of cards with the same name as that land")); + } + + public CrumbleToDust(final CrumbleToDust card) { + super(card); + } + + @Override + public CrumbleToDust copy() { + return new CrumbleToDust(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/CrypticCruiser.java b/Mage.Sets/src/mage/sets/battleforzendikar/CrypticCruiser.java new file mode 100644 index 00000000000..e54defd0ce1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/CrypticCruiser.java @@ -0,0 +1,76 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.ExileOpponentsCardFromExileToGraveyardCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class CrypticCruiser extends CardImpl { + + public CrypticCruiser(UUID ownerId) { + super(ownerId, 56, "Cryptic Cruiser", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Processor"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + // {2}{U}, Put a card an opponent owns from exile into that player's graveyard: Tap target creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new ManaCostsImpl<>("{2}{U}")); + ability.addCost(new ExileOpponentsCardFromExileToGraveyardCost(true)); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + } + + public CrypticCruiser(final CrypticCruiser card) { + super(card); + } + + @Override + public CrypticCruiser copy() { + return new CrypticCruiser(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/CullingDrone.java b/Mage.Sets/src/mage/sets/battleforzendikar/CullingDrone.java new file mode 100644 index 00000000000..a3aa372f585 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/CullingDrone.java @@ -0,0 +1,67 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.DevoidAbility; +import mage.abilities.keyword.IngestAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class CullingDrone extends CardImpl { + + public CullingDrone(UUID ownerId) { + super(ownerId, 91, "Culling Drone", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Drone"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + + // Ingest + this.addAbility(new IngestAbility()); + } + + public CullingDrone(final CullingDrone card) { + super(card); + } + + @Override + public CullingDrone copy() { + return new CullingDrone(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/DampeningPulse.java b/Mage.Sets/src/mage/sets/battleforzendikar/DampeningPulse.java new file mode 100644 index 00000000000..e03a58c6f97 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/DampeningPulse.java @@ -0,0 +1,71 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author LevelX2 + */ +public class DampeningPulse extends CardImpl { + + private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures your opponents control"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public DampeningPulse(UUID ownerId) { + super(ownerId, 75, "Dampening Pulse", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}"); + this.expansionSetCode = "BFZ"; + + // Creatures your opponents control get -1/-0. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(-1, -0, Duration.WhileOnBattlefield, filter, false))); + + } + + public DampeningPulse(final DampeningPulse card) { + super(card); + } + + @Override + public DampeningPulse copy() { + return new DampeningPulse(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/DeathlessBehemoth.java b/Mage.Sets/src/mage/sets/battleforzendikar/DeathlessBehemoth.java index aac83b5c1bb..36085ecf6d1 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/DeathlessBehemoth.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/DeathlessBehemoth.java @@ -49,6 +49,7 @@ import mage.target.common.TargetControlledPermanent; public class DeathlessBehemoth extends CardImpl { private final static FilterControlledPermanent filter = new FilterControlledPermanent("two Eldrazi Scions"); + static { filter.add(Predicates.and( new SubtypePredicate("Eldrazi"), @@ -56,7 +57,7 @@ public class DeathlessBehemoth extends CardImpl { } public DeathlessBehemoth(UUID ownerId) { - super(ownerId, 5, "Deathless Behemoth", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{6}"); + super(ownerId, 5, "Deathless Behemoth", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{6}"); this.expansionSetCode = "BFZ"; this.subtype.add("Eldrazi"); this.power = new MageInt(6); diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/DemonsGrasp.java b/Mage.Sets/src/mage/sets/battleforzendikar/DemonsGrasp.java new file mode 100644 index 00000000000..33b905ad211 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/DemonsGrasp.java @@ -0,0 +1,61 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class DemonsGrasp extends CardImpl { + + public DemonsGrasp(UUID ownerId) { + super(ownerId, 108, "Demon's Grasp", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{4}{B}"); + this.expansionSetCode = "BFZ"; + + // Target creature gets -5/-5 until end of turn. + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new BoostTargetEffect(-5, -5, Duration.EndOfTurn)); + } + + public DemonsGrasp(final DemonsGrasp card) { + super(card); + } + + @Override + public DemonsGrasp copy() { + return new DemonsGrasp(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Dispel.java b/Mage.Sets/src/mage/sets/battleforzendikar/Dispel.java new file mode 100644 index 00000000000..7a408452173 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Dispel.java @@ -0,0 +1,52 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class Dispel extends mage.sets.worldwake.Dispel { + + public Dispel(UUID ownerId) { + super(ownerId); + this.cardNumber = 76; + this.expansionSetCode = "BFZ"; + } + + public Dispel(final Dispel card) { + super(card); + } + + @Override + public Dispel copy() { + return new Dispel(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/DragonmasterOutcast.java b/Mage.Sets/src/mage/sets/battleforzendikar/DragonmasterOutcast.java new file mode 100644 index 00000000000..8689e99c970 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/DragonmasterOutcast.java @@ -0,0 +1,52 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DragonmasterOutcast extends mage.sets.worldwake.DragonmasterOutcast { + + public DragonmasterOutcast(UUID ownerId) { + super(ownerId); + this.cardNumber = 144; + this.expansionSetCode = "BFZ"; + } + + public DragonmasterOutcast(final DragonmasterOutcast card) { + super(card); + } + + @Override + public DragonmasterOutcast copy() { + return new DragonmasterOutcast(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/DranaLiberatorOfMalakir.java b/Mage.Sets/src/mage/sets/battleforzendikar/DranaLiberatorOfMalakir.java new file mode 100644 index 00000000000..e6076d394af --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/DranaLiberatorOfMalakir.java @@ -0,0 +1,83 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersAllEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.counters.CounterType; +import mage.filter.common.FilterAttackingCreature; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author fireshoes + */ +public class DranaLiberatorOfMalakir extends CardImpl { + + private static final FilterAttackingCreature filter = new FilterAttackingCreature("each attacking creature you control"); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public DranaLiberatorOfMalakir(UUID ownerId) { + super(ownerId, 109, "Drana, Liberator of Malakir", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); + this.expansionSetCode = "BFZ"; + this.supertype.add("Legendary"); + this.subtype.add("Vampire"); + this.subtype.add("Ally"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + + // Whenever Drana, Liberator of Malakir deals combat damage to player, put a +1/+1 counter on each attacking creature you control. + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter), false)); + } + + public DranaLiberatorOfMalakir(final DranaLiberatorOfMalakir card) { + super(card); + } + + @Override + public DranaLiberatorOfMalakir copy() { + return new DranaLiberatorOfMalakir(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/DustStalker.java b/Mage.Sets/src/mage/sets/battleforzendikar/DustStalker.java new file mode 100644 index 00000000000..cd751056f6b --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/DustStalker.java @@ -0,0 +1,84 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorlessPredicate; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author LevelX2 + */ +public class DustStalker extends CardImpl { + + private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("if you control no other colorless creatures"); + + static { + filter.add(new AnotherPredicate()); + filter.add(new ColorlessPredicate()); + } + + public DustStalker(UUID ownerId) { + super(ownerId, 202, "Dust Stalker", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{R}"); + this.expansionSetCode = "BFZ"; + this.supertype.add("Creautre"); + this.supertype.add("Eldrazi"); + this.power = new MageInt(5); + this.toughness = new MageInt(3); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + // Haste + this.addAbility(HasteAbility.getInstance()); + // At the beginning of each end step, if you control no other colorless creatures, return Dust Stalker to its owner's hand. + this.addAbility(new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), TargetController.ANY, + new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.EQUAL_TO, 0), false)); + } + + public DustStalker(final DustStalker card) { + super(card); + } + + @Override + public DustStalker copy() { + return new DustStalker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/DutifulReturn.java b/Mage.Sets/src/mage/sets/battleforzendikar/DutifulReturn.java new file mode 100644 index 00000000000..16f15a891a4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/DutifulReturn.java @@ -0,0 +1,52 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class DutifulReturn extends mage.sets.khansoftarkir.DutifulReturn { + + public DutifulReturn(UUID ownerId) { + super(ownerId); + this.cardNumber = 110; + this.expansionSetCode = "BFZ"; + } + + public DutifulReturn(final DutifulReturn card) { + super(card); + } + + @Override + public DutifulReturn copy() { + return new DutifulReturn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/EarthenArms.java b/Mage.Sets/src/mage/sets/battleforzendikar/EarthenArms.java new file mode 100644 index 00000000000..b59920c5383 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/EarthenArms.java @@ -0,0 +1,65 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.AwakenAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; +import mage.target.TargetPermanent; + +/** + * + * @author LevelX2 + */ +public class EarthenArms extends CardImpl { + + public EarthenArms(UUID ownerId) { + super(ownerId, 172, "Earthen Arms", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{G}"); + this.expansionSetCode = "BFZ"; + + // Put two +1/+1 counters on target permanent. + this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance(2))); + this.getSpellAbility().addTarget(new TargetPermanent()); + + // Awaken 4 - {6}{G} + this.addAbility(new AwakenAbility(this, 4, "{6}{G}")); + } + + public EarthenArms(final EarthenArms card) { + super(card); + } + + @Override + public EarthenArms copy() { + return new EarthenArms(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/EldraziSkyspawner.java b/Mage.Sets/src/mage/sets/battleforzendikar/EldraziSkyspawner.java new file mode 100644 index 00000000000..f741b022af0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/EldraziSkyspawner.java @@ -0,0 +1,74 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.game.permanent.token.EldraziScionToken; + +/** + * + * @author LevelX2 + */ +public class EldraziSkyspawner extends CardImpl { + + public EldraziSkyspawner(UUID ownerId) { + super(ownerId, 58, "Eldrazi Skyspawner", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Drone"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + // Flying + this.addAbility(FlyingAbility.getInstance()); + // When Eldrazi Skyspawner enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." + Effect effect = new CreateTokenEffect(new EldraziScionToken()); + effect.setText("put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has \"Sacrifice this creature: Add {1} to your mana pool.\""); + this.addAbility(new EntersBattlefieldTriggeredAbility(effect, false)); + } + + public EldraziSkyspawner(final EldraziSkyspawner card) { + super(card); + } + + @Override + public EldraziSkyspawner copy() { + return new EldraziSkyspawner(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/EmeriaShepherd.java b/Mage.Sets/src/mage/sets/battleforzendikar/EmeriaShepherd.java new file mode 100644 index 00000000000..b4322ab7f47 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/EmeriaShepherd.java @@ -0,0 +1,119 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.LandfallAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterPermanentCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author LevelX2 + */ +public class EmeriaShepherd extends CardImpl { + + private static final FilterPermanentCard filter = new FilterPermanentCard("nonland permanent card from your graveyard"); + + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.LAND))); + } + + public EmeriaShepherd(UUID ownerId) { + super(ownerId, 22, "Emeria Shepherd", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{W}{W}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Angel"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Landfall — Whenever a land enters the battlefield under your control, you may return target nonland permanent card from your graveyard to your hand. + // If that land is a Plains, you may return that nonland permanent card to the battlefield instead. + Ability ability = new LandfallAbility(Zone.BATTLEFIELD, new EmeriaShepherdReturnToHandTargetEffect(), true); + ability.addTarget(new TargetCardInYourGraveyard(new FilterPermanentCard(filter))); + this.addAbility(ability); + } + + public EmeriaShepherd(final EmeriaShepherd card) { + super(card); + } + + @Override + public EmeriaShepherd copy() { + return new EmeriaShepherd(this); + } +} + +class EmeriaShepherdReturnToHandTargetEffect extends OneShotEffect { + + public EmeriaShepherdReturnToHandTargetEffect() { + super(Outcome.ReturnToHand); + staticText = "you may return target nonland permanent card from your graveyard to your hand. If that land is a Plains, you may return that nonland permanent card to the battlefield instead"; + } + + public EmeriaShepherdReturnToHandTargetEffect(final EmeriaShepherdReturnToHandTargetEffect effect) { + super(effect); + } + + @Override + public EmeriaShepherdReturnToHandTargetEffect copy() { + return new EmeriaShepherdReturnToHandTargetEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent triggeringLand = ((LandfallAbility) source).getTriggeringPermanent(); + if (controller == null || triggeringLand == null) { + return false; + } + Zone toZone = Zone.HAND; + if (triggeringLand.getSubtype().contains("Plains") + && controller.chooseUse(Outcome.PutCardInPlay, "Put the card to battlefield instead?", source, game)) { + toZone = Zone.BATTLEFIELD; + } + return controller.moveCards(new CardsImpl(targetPointer.getTargets(game, source)), null, toZone, source, game); + } + +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/EncirclingFissure.java b/Mage.Sets/src/mage/sets/battleforzendikar/EncirclingFissure.java new file mode 100644 index 00000000000..3722f671901 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/EncirclingFissure.java @@ -0,0 +1,103 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.PreventionEffectImpl; +import mage.abilities.keyword.AwakenAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.events.DamageEvent; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.common.TargetOpponent; + +/** + * + * @author LevelX2 + */ +public class EncirclingFissure extends CardImpl { + + public EncirclingFissure(UUID ownerId) { + super(ownerId, 23, "Encircling Fissure", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{W}"); + this.expansionSetCode = "BFZ"; + + // Prevent all combat damage that would be dealt this turn by creatures target opponent controls. + this.getSpellAbility().addEffect(new EncirclingFissurePreventEffect()); + this.getSpellAbility().addTarget(new TargetOpponent()); + + // Awaken 2 —{4}{W} + this.addAbility(new AwakenAbility(this, 2, "{4}{W}")); + } + + public EncirclingFissure(final EncirclingFissure card) { + super(card); + } + + @Override + public EncirclingFissure copy() { + return new EncirclingFissure(this); + } +} + +class EncirclingFissurePreventEffect extends PreventionEffectImpl { + + public EncirclingFissurePreventEffect() { + super(Duration.EndOfTurn, Integer.MAX_VALUE, true, false); + staticText = "Prevent all combat damage that would be dealt this turn by creatures target opponent controls"; + } + + public EncirclingFissurePreventEffect(final EncirclingFissurePreventEffect effect) { + super(effect); + } + + @Override + public EncirclingFissurePreventEffect copy() { + return new EncirclingFissurePreventEffect(this); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (super.applies(event, source, game) && event instanceof DamageEvent && event.getAmount() > 0) { + DamageEvent damageEvent = (DamageEvent) event; + if (damageEvent.isCombatDamage()) { + Permanent permanent = game.getPermanent(damageEvent.getSourceId()); + if (permanent != null + && permanent.getCardType().contains(CardType.CREATURE) + && permanent.getControllerId().equals(getTargetPointer().getFirst(game, source))) { + return true; + } + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/EndlessOne.java b/Mage.Sets/src/mage/sets/battleforzendikar/EndlessOne.java new file mode 100644 index 00000000000..54a615e10a1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/EndlessOne.java @@ -0,0 +1,64 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; + +/** + * + * @author fireshoes + */ +public class EndlessOne extends CardImpl { + + public EndlessOne(UUID ownerId) { + super(ownerId, 8, "Endless One", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{X}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Endless One enters the battlefield with X +1/+1 counters on it. + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance()))); + } + + public EndlessOne(final EndlessOne card) { + super(card); + } + + @Override + public EndlessOne copy() { + return new EndlessOne(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/ExertInfluence.java b/Mage.Sets/src/mage/sets/battleforzendikar/ExertInfluence.java new file mode 100644 index 00000000000..479fdb7709e --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/ExertInfluence.java @@ -0,0 +1,104 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.common.ColorsOfManaSpentToCastCount; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.cards.CardImpl; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class ExertInfluence extends CardImpl { + + public ExertInfluence(UUID ownerId) { + super(ownerId, 77, "Exert Influence", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{4}{U}"); + this.expansionSetCode = "BFZ"; + + // Converge-Gain control of target creature if its power is less than or equal to the number of colors spent to cast Exert Influence. + getSpellAbility().setAbilityWord(AbilityWord.CONVERGE); + getSpellAbility().addEffect(new ExertInfluenceEffect()); + getSpellAbility().addTarget(new TargetCreaturePermanent()); + + } + + public ExertInfluence(final ExertInfluence card) { + super(card); + } + + @Override + public ExertInfluence copy() { + return new ExertInfluence(this); + } +} + +class ExertInfluenceEffect extends OneShotEffect { + + public ExertInfluenceEffect() { + super(Outcome.GainControl); + this.staticText = "Gain control of target creature if its power is less than or equal to the number of colors spent to cast {this}"; + } + + public ExertInfluenceEffect(final ExertInfluenceEffect effect) { + super(effect); + } + + @Override + public ExertInfluenceEffect copy() { + return new ExertInfluenceEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + MageObject sourceObject = game.getObject(source.getSourceId()); + Player controller = game.getPlayer(source.getControllerId()); + Permanent targetCreature = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (controller != null && sourceObject != null) { + int colors = new ColorsOfManaSpentToCastCount().calculate(game, source, this); + if (targetCreature.getPower().getValue() <= colors) { + game.addEffect(new GainControlTargetEffect(Duration.Custom, true), source); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/ExpeditionEnvoy.java b/Mage.Sets/src/mage/sets/battleforzendikar/ExpeditionEnvoy.java new file mode 100644 index 00000000000..2238af4b527 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/ExpeditionEnvoy.java @@ -0,0 +1,60 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class ExpeditionEnvoy extends CardImpl { + + public ExpeditionEnvoy(UUID ownerId) { + super(ownerId, 24, "Expedition Envoy", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{W}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Human"); + this.subtype.add("Scout"); + this.subtype.add("Ally"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + } + + public ExpeditionEnvoy(final ExpeditionEnvoy card) { + super(card); + } + + @Override + public ExpeditionEnvoy copy() { + return new ExpeditionEnvoy(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/EyelessWatcher.java b/Mage.Sets/src/mage/sets/battleforzendikar/EyelessWatcher.java new file mode 100644 index 00000000000..f21d030f168 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/EyelessWatcher.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.sets.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.game.permanent.token.EldraziScionToken; + +/** + * + * @author LevelX2 + */ +public class EyelessWatcher extends CardImpl { + + public EyelessWatcher(UUID ownerId) { + super(ownerId, 166, "Eyeless Watcher", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Drone"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + // When Eyeless Watcher enters the battlefield, put two 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." + Effect effect = new CreateTokenEffect(new EldraziScionToken(), 2); + effect.setText("put two 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have \"Sacrifice this creature: Add {1} to your mana pool.\""); + this.addAbility(new EntersBattlefieldTriggeredAbility(effect, false)); + + } + + public EyelessWatcher(final EyelessWatcher card) { + super(card); + } + + @Override + public EyelessWatcher copy() { + return new EyelessWatcher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/FertileThicket.java b/Mage.Sets/src/mage/sets/battleforzendikar/FertileThicket.java new file mode 100644 index 00000000000..fde59a38378 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/FertileThicket.java @@ -0,0 +1,116 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTappedAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.mana.GreenManaAbility; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterBasicLandCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; + +/** + * + * @author LevelX2 + */ +public class FertileThicket extends CardImpl { + + public FertileThicket(UUID ownerId) { + super(ownerId, 237, "Fertile Thicket", Rarity.COMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "BFZ"; + + // Fertile Thicket enters the battlefield tapped. + this.addAbility(new EntersBattlefieldTappedAbility()); + + // When Fertile Thicket enters the battlefield, you may look at the top five cards of your library. If you do, reveal up to one basic land card from among them, then put that card on top of your library and the rest on the bottom in any order. + this.addAbility(new EntersBattlefieldTriggeredAbility(new FertileThicketEffect(), true)); + + // {T}: Add {G} to your mana pool. + this.addAbility(new GreenManaAbility()); + } + + public FertileThicket(final FertileThicket card) { + super(card); + } + + @Override + public FertileThicket copy() { + return new FertileThicket(this); + } +} + +class FertileThicketEffect extends OneShotEffect { + + public FertileThicketEffect() { + super(Outcome.Benefit); + this.staticText = "you may look at the top five cards of your library. If you do, reveal up to one basic land card from among them, then put that card on top of your library and the rest on the bottom in any order"; + } + + public FertileThicketEffect(final FertileThicketEffect effect) { + super(effect); + } + + @Override + public FertileThicketEffect copy() { + return new FertileThicketEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = game.getObject(source.getSourceId()); + if (controller != null && sourceObject != null) { + Cards cards = new CardsImpl(); + cards.addAll(controller.getLibrary().getTopCards(game, 5)); + controller.lookAtCards(sourceObject.getIdName(), cards, game); + TargetCard target = new TargetCard(0, 1, Zone.LIBRARY, new FilterBasicLandCard()); + controller.chooseTarget(outcome, cards, target, source, game); + Cards cardsRevealed = new CardsImpl(target.getTargets()); + if (!cardsRevealed.isEmpty()) { + controller.revealCards(sourceObject.getIdName(), cardsRevealed, game); + cards.removeAll(cardsRevealed); + controller.putCardsOnTopOfLibrary(cardsRevealed, game, source, true); + } + controller.putCardsOnBottomOfLibrary(cards, game, source, true); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/FiremantleMage.java b/Mage.Sets/src/mage/sets/battleforzendikar/FiremantleMage.java new file mode 100644 index 00000000000..4dfae72574a --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/FiremantleMage.java @@ -0,0 +1,69 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AllyEntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.MenaceAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class FiremantleMage extends CardImpl { + + public FiremantleMage(UUID ownerId) { + super(ownerId, 145, "Firemantle Mage", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Human"); + this.subtype.add("Shaman"); + this.subtype.add("Ally"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Rally — Whenver Firemantle Mage or another Ally enters the battlefield under your control, creatures you control gain menace until end of turn. + this.addAbility(new AllyEntersBattlefieldTriggeredAbility( + new GainAbilityControlledEffect(new MenaceAbility(), Duration.EndOfTurn, new FilterControlledCreaturePermanent("creatures you control")), false)); + } + + public FiremantleMage(final FiremantleMage card) { + super(card); + } + + @Override + public FiremantleMage copy() { + return new FiremantleMage(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/FortifiedRampart.java b/Mage.Sets/src/mage/sets/battleforzendikar/FortifiedRampart.java new file mode 100644 index 00000000000..73543737e94 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/FortifiedRampart.java @@ -0,0 +1,62 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class FortifiedRampart extends CardImpl { + + public FortifiedRampart(UUID ownerId) { + super(ownerId, 27, "Fortified Rampart", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Wall"); + this.power = new MageInt(0); + this.toughness = new MageInt(6); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + } + + public FortifiedRampart(final FortifiedRampart card) { + super(card); + } + + @Override + public FortifiedRampart copy() { + return new FortifiedRampart(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/FromBeyond.java b/Mage.Sets/src/mage/sets/battleforzendikar/FromBeyond.java new file mode 100644 index 00000000000..048f5b9264b --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/FromBeyond.java @@ -0,0 +1,87 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.permanent.token.EldraziScionToken; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author fireshoes + */ +public class FromBeyond extends CardImpl { + + private static final FilterCard filter = new FilterCard("Eldrazi card"); + + static { + filter.add(new SubtypePredicate("Eldrazi")); + } + + public FromBeyond(UUID ownerId) { + super(ownerId, 167, "From Beyond", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}"); + this.expansionSetCode = "BFZ"; + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + + // At the beginning of your upkeep, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new CreateTokenEffect(new EldraziScionToken()), TargetController.YOU, false)); + + // {1}{G}, Sacrifice From Beyond: Search your library for an Eldrazi card, reveal it, put it into your hand, then shuffle your library. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true, true), + new ManaCostsImpl("{1}{G}")); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public FromBeyond(final FromBeyond card) { + super(card); + } + + @Override + public FromBeyond copy() { + return new FromBeyond(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/GeyserfieldStalker.java b/Mage.Sets/src/mage/sets/battleforzendikar/GeyserfieldStalker.java new file mode 100644 index 00000000000..4dac3868387 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/GeyserfieldStalker.java @@ -0,0 +1,67 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.LandfallAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.MenaceAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class GeyserfieldStalker extends CardImpl { + + public GeyserfieldStalker(UUID ownerId) { + super(ownerId, 111, "Geyserfield Stalker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{B}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Elemental"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Menace + this.addAbility(new MenaceAbility()); + // Landfall - Whenever a land enters the battlefield under your control, Geyserfield Stalker gets +2/+2 until end of turn. + this.addAbility(new LandfallAbility(new BoostSourceEffect(2, 2, Duration.EndOfTurn), false)); + } + + public GeyserfieldStalker(final GeyserfieldStalker card) { + super(card); + } + + @Override + public GeyserfieldStalker copy() { + return new GeyserfieldStalker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/GhostlySentinel.java b/Mage.Sets/src/mage/sets/battleforzendikar/GhostlySentinel.java new file mode 100644 index 00000000000..c9397deeb45 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/GhostlySentinel.java @@ -0,0 +1,66 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class GhostlySentinel extends CardImpl { + + public GhostlySentinel(UUID ownerId) { + super(ownerId, 28, "Ghostly Sentinel", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{W}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Kor"); + this.subtype.add("Spirit"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + } + + public GhostlySentinel(final GhostlySentinel card) { + super(card); + } + + @Override + public GhostlySentinel copy() { + return new GhostlySentinel(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/GiantMantis.java b/Mage.Sets/src/mage/sets/battleforzendikar/GiantMantis.java new file mode 100644 index 00000000000..02586302d79 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/GiantMantis.java @@ -0,0 +1,52 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class GiantMantis extends mage.sets.mirage.GiantMantis { + + public GiantMantis(UUID ownerId) { + super(ownerId); + this.cardNumber = 173; + this.expansionSetCode = "BFZ"; + } + + public GiantMantis(final GiantMantis card) { + super(card); + } + + @Override + public GiantMantis copy() { + return new GiantMantis(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/GideonAllyOfZendikar.java b/Mage.Sets/src/mage/sets/battleforzendikar/GideonAllyOfZendikar.java index eb6e52d3e8d..9da9eacd178 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/GideonAllyOfZendikar.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/GideonAllyOfZendikar.java @@ -60,7 +60,7 @@ public class GideonAllyOfZendikar extends CardImpl { super(ownerId, 29, "Gideon, Ally of Zendikar", Rarity.MYTHIC, new CardType[]{CardType.PLANESWALKER}, "{2}{W}{W}"); this.expansionSetCode = "BFZ"; this.subtype.add("Gideon"); - + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(4)), false)); // +1: Until end of turn, Gideon, Ally of Zendikar becomes a 5/5 Human Soldier Ally creature with indestructible that's still a planeswalker. Prevent all damage that would be dealt to him this turn. @@ -69,7 +69,7 @@ public class GideonAllyOfZendikar extends CardImpl { effect.setText("Prevent all damage that would be dealt to him this turn"); ability.addEffect(effect); this.addAbility(ability); - + // 0: Put a 2/2 white Knight Ally creature token onto the battlefield. this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new KnightAllyToken()), 0)); @@ -94,6 +94,7 @@ class GideonAllyOfZendikarEmblem extends Emblem { BoostControlledEffect effect = new BoostControlledEffect(1, 1, Duration.EndOfGame); Ability ability = new SimpleStaticAbility(Zone.COMMAND, effect); this.getAbilities().add(ability); + this.setExpansionSetCodeForImage("BFZ"); } } @@ -107,8 +108,8 @@ class GideonAllyOfZendikarToken extends Token { subtype.add("Ally"); power = new MageInt(5); toughness = new MageInt(5); - - addAbility(IndestructibleAbility.getInstance()); + + addAbility(IndestructibleAbility.getInstance()); } } @@ -123,4 +124,4 @@ class KnightAllyToken extends Token { power = new MageInt(2); toughness = new MageInt(2); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/GoblinWarPaint.java b/Mage.Sets/src/mage/sets/battleforzendikar/GoblinWarPaint.java new file mode 100644 index 00000000000..454e583840b --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/GoblinWarPaint.java @@ -0,0 +1,52 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class GoblinWarPaint extends mage.sets.zendikar.GoblinWarPaint { + + public GoblinWarPaint(UUID ownerId) { + super(ownerId); + this.cardNumber = 146; + this.expansionSetCode = "BFZ"; + } + + public GoblinWarPaint(final GoblinWarPaint card) { + super(card); + } + + @Override + public GoblinWarPaint copy() { + return new GoblinWarPaint(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/GraveBirthing.java b/Mage.Sets/src/mage/sets/battleforzendikar/GraveBirthing.java new file mode 100644 index 00000000000..a33a559e1bd --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/GraveBirthing.java @@ -0,0 +1,112 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.token.EldraziScionToken; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetCardInYourGraveyard; +import mage.target.common.TargetOpponent; + +/** + * + * @author LevelX2 + */ +public class GraveBirthing extends CardImpl { + + public GraveBirthing(UUID ownerId) { + super(ownerId, 93, "Grave Birthing", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{B}"); + this.expansionSetCode = "BFZ"; + + // Devoid + Ability ability = new DevoidAbility(this.color); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + // Target opponent exiles a card from his or her graveyard. You put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." + this.getSpellAbility().addEffect(new GraveBirthingEffect()); + this.getSpellAbility().addTarget(new TargetOpponent()); + Effect effect = new CreateTokenEffect(new EldraziScionToken()); + effect.setText("You put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has \"Sacrifice this creature: Add {1} to your mana pool.\"
"); + this.getSpellAbility().addEffect(effect); // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public GraveBirthing(final GraveBirthing card) { + super(card); + } + + @Override + public GraveBirthing copy() { + return new GraveBirthing(this); + } +} + +class GraveBirthingEffect extends OneShotEffect { + + public GraveBirthingEffect() { + super(Outcome.Benefit); + this.staticText = "Target opponent exiles a card from his or her graveyard"; + } + + public GraveBirthingEffect(final GraveBirthingEffect effect) { + super(effect); + } + + @Override + public GraveBirthingEffect copy() { + return new GraveBirthingEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source)); + if (opponent != null) { + Target target = new TargetCardInYourGraveyard(); + target.setNotTarget(true); + opponent.chooseTarget(outcome, target, source, game); + Card card = game.getCard(target.getFirstTarget()); + opponent.moveCards(card, null, Zone.EXILED, source, game); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/GreenwardenOfMurasa.java b/Mage.Sets/src/mage/sets/battleforzendikar/GreenwardenOfMurasa.java index 697845c16a6..84126d2ce39 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/GreenwardenOfMurasa.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/GreenwardenOfMurasa.java @@ -33,10 +33,12 @@ import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ExileSourceEffect; import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.Card; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Outcome; @@ -44,6 +46,7 @@ import mage.constants.Rarity; import mage.game.Game; import mage.players.Player; import mage.target.common.TargetCardInYourGraveyard; +import mage.target.targetpointer.FixedTarget; /** * @@ -99,10 +102,15 @@ class GreenwardenOfMurasaEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = game.getObject(source.getSourceId()); - if (controller != null && sourceObject != null) { + Card targetCard = game.getCard(getTargetPointer().getFirst(game, source)); + if (controller != null && sourceObject != null && targetCard != null) { if (controller.chooseUse(outcome, "Exile " + sourceObject.getLogName() + " to return card from your graveyard to your hand?", source, game)) { new ExileSourceEffect().apply(game, source); - return new ReturnToHandTargetEffect().apply(game, source); + // Setting the fixed target prevents to return Greenwarden of Murasa itself (becuase it's exiled meanwhile), + // but of course you can target it as the ability triggers I guess + Effect effect = new ReturnToHandTargetEffect(); + effect.setTargetPointer(new FixedTarget(targetCard.getId(), targetCard.getZoneChangeCounter(game))); + return effect.apply(game, source); } return true; } diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/GripOfDesolation.java b/Mage.Sets/src/mage/sets/battleforzendikar/GripOfDesolation.java new file mode 100644 index 00000000000..ab18f020a02 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/GripOfDesolation.java @@ -0,0 +1,75 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetLandPermanent; +import mage.target.targetpointer.SecondTargetPointer; + +/** + * + * @author LevelX2 + */ +public class GripOfDesolation extends CardImpl { + + public GripOfDesolation(UUID ownerId) { + super(ownerId, 94, "Grip of Desolation", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{4}{B}{B}"); + this.expansionSetCode = "BFZ"; + + // Devoid + Ability ability = new DevoidAbility(this.color); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + // Exile target creature and target land. + this.getSpellAbility().addEffect(new ExileTargetEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + Effect effect = new ExileTargetEffect(); + effect.setTargetPointer(new SecondTargetPointer()); + effect.setText("and target land"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetLandPermanent()); + + } + + public GripOfDesolation(final GripOfDesolation card) { + super(card); + } + + @Override + public GripOfDesolation copy() { + return new GripOfDesolation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/GruesomeSlaughter.java b/Mage.Sets/src/mage/sets/battleforzendikar/GruesomeSlaughter.java new file mode 100644 index 00000000000..189f4108e21 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/GruesomeSlaughter.java @@ -0,0 +1,79 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorlessPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class GruesomeSlaughter extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("colorless creatures you control"); + + static { + filter.add(new ColorlessPredicate()); + } + + public GruesomeSlaughter(UUID ownerId) { + super(ownerId, 9, "Gruesome Slaughter", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{6}"); + this.expansionSetCode = "BFZ"; + + // Until end of turn, colorless creatures you control gain "{T}: This creature deals damage equal to its power to target creature." + Effect effect = new DamageTargetEffect(new SourcePermanentPowerCount()); + effect.setText("{this} deals damage equal to its power to target creature."); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new GainAbilityControlledEffect(ability, Duration.EndOfTurn, filter)); + } + + public GruesomeSlaughter(final GruesomeSlaughter card) { + super(card); + } + + @Override + public GruesomeSlaughter copy() { + return new GruesomeSlaughter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/GuulDrazOverseer.java b/Mage.Sets/src/mage/sets/battleforzendikar/GuulDrazOverseer.java new file mode 100644 index 00000000000..745e55c2a94 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/GuulDrazOverseer.java @@ -0,0 +1,107 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.LandfallAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.SetTargetPointer; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class GuulDrazOverseer extends CardImpl { + + public GuulDrazOverseer(UUID ownerId) { + super(ownerId, 112, "Guul Draz Overseer", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Vampire"); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Landfall- Whenever a land enters the battlefield under your control, other creatures you control get +1/+0 until end of turn. If that land is a Swamp, those creatures get +2/+0 until end of turn instead. + this.addAbility(new LandfallAbility(Zone.BATTLEFIELD, new GuulDrazOverseerEffect(), false, SetTargetPointer.PERMANENT)); + } + + public GuulDrazOverseer(final GuulDrazOverseer card) { + super(card); + } + + @Override + public GuulDrazOverseer copy() { + return new GuulDrazOverseer(this); + } +} + +class GuulDrazOverseerEffect extends OneShotEffect { + + public GuulDrazOverseerEffect() { + super(Outcome.BoostCreature); + this.staticText = "other creatures you control get +1/+0 until end of turn. If that land is a Swamp, those creatures get +2/+0 until end of turn instead"; + } + + public GuulDrazOverseerEffect(final GuulDrazOverseerEffect effect) { + super(effect); + } + + @Override + public GuulDrazOverseerEffect copy() { + return new GuulDrazOverseerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent land = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source)); + if (controller != null && land != null) { + int boost = 1; + if (land.getSubtype().contains("Swamp")) { + boost = 2; + } + game.addEffect(new BoostControlledEffect(boost, 0, Duration.EndOfTurn, true), source); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/HagraSharpshooter.java b/Mage.Sets/src/mage/sets/battleforzendikar/HagraSharpshooter.java new file mode 100644 index 00000000000..848b4e1aab4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/HagraSharpshooter.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.sets.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class HagraSharpshooter extends CardImpl { + + public HagraSharpshooter(UUID ownerId) { + super(ownerId, 113, "Hagra Sharpshooter", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Human"); + this.subtype.add("Assassin"); + this.subtype.add("Ally"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {4}{B}: Target creature gets -1/-1 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-1, -1, Duration.EndOfTurn), new ManaCostsImpl("{4}{B}")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public HagraSharpshooter(final HagraSharpshooter card) { + super(card); + } + + @Override + public HagraSharpshooter copy() { + return new HagraSharpshooter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/HalimarTidecaller.java b/Mage.Sets/src/mage/sets/battleforzendikar/HalimarTidecaller.java new file mode 100644 index 00000000000..7afb519a95f --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/HalimarTidecaller.java @@ -0,0 +1,93 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.AwakenAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author LevelX2 + */ +public class HalimarTidecaller extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Land creatures"); + private static final FilterCard filterCard = new FilterCard("card with awaken from your graveyard"); + + static { + filter.add(new CardTypePredicate(CardType.LAND)); + filter.add(new CardTypePredicate(CardType.CREATURE)); + filterCard.add(new AbilityPredicate(AwakenAbility.class)); + } + + public HalimarTidecaller(UUID ownerId) { + super(ownerId, 79, "Halimar Tidecaller", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.subtype.add("Ally"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // When Halimar Tidecaller enters the battlefield, you may return target card with awaken from your graveyard to your hand. + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true); + ability.addTarget(new TargetCardInYourGraveyard(filterCard)); + + this.addAbility(ability); + + // Land creatures you control have flying. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield, filter))); + + } + + public HalimarTidecaller(final HalimarTidecaller card) { + super(card); + } + + @Override + public HalimarTidecaller copy() { + return new HalimarTidecaller(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/HedronBlade.java b/Mage.Sets/src/mage/sets/battleforzendikar/HedronBlade.java new file mode 100644 index 00000000000..a91a6049a96 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/HedronBlade.java @@ -0,0 +1,131 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostEquippedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.DeathtouchAbility; +import mage.abilities.keyword.EquipAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.combat.CombatGroup; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; + +/** + * + * @author LevelX2 + */ +public class HedronBlade extends CardImpl { + + public HedronBlade(UUID ownerId) { + super(ownerId, 224, "Hedron Blade", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{1}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Equipment"); + + // Equipped creature gets +1/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1))); + + // Whenever equipped creature becomes blocked by one or more colorless creatures, it gains deathtouch until end of turn. + this.addAbility(new HedronBladeTriggeredAbility( + new GainAbilityAttachedEffect(DeathtouchAbility.getInstance(), AttachmentType.EQUIPMENT, Duration.EndOfTurn))); + + // Equip {2} + this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); + } + + public HedronBlade(final HedronBlade card) { + super(card); + } + + @Override + public HedronBlade copy() { + return new HedronBlade(this); + } +} + +class HedronBladeTriggeredAbility extends TriggeredAbilityImpl { + + HedronBladeTriggeredAbility(Effect effect) { + super(Zone.BATTLEFIELD, effect, false); + } + + HedronBladeTriggeredAbility(final HedronBladeTriggeredAbility ability) { + super(ability); + } + + @Override + public HedronBladeTriggeredAbility copy() { + return new HedronBladeTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.DECLARED_BLOCKERS; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Permanent equipment = game.getPermanentOrLKIBattlefield((this.getSourceId())); + if (equipment != null && equipment.getAttachedTo() != null) { + Permanent equippedPermanent = game.getPermanentOrLKIBattlefield((equipment.getAttachedTo())); + if (equippedPermanent != null) { + if (equippedPermanent.isAttacking()) { + for (CombatGroup group : game.getCombat().getGroups()) { + if (group.getAttackers().contains(equippedPermanent.getId())) { + for (UUID blockerId : group.getBlockers()) { + Permanent blocker = game.getPermanent(blockerId); + if (blocker != null && blocker.getColor(game).isColorless()) { + return true; + } + } + } + } + } + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever equipped creature becomes blocked by one or more colorless creatures, " + super.getRule(); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/HorriblyAwry.java b/Mage.Sets/src/mage/sets/battleforzendikar/HorriblyAwry.java new file mode 100644 index 00000000000..40d9e1f3104 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/HorriblyAwry.java @@ -0,0 +1,76 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.common.CounterTargetWithReplacementEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.Filter; +import mage.filter.common.FilterCreatureSpell; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.target.TargetSpell; + +/** + * + * @author LevelX2 + */ +public class HorriblyAwry extends CardImpl { + + private static final FilterCreatureSpell filter = new FilterCreatureSpell("creature spell with converted mana cost 4 or less"); + + static { + filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 5)); + } + + public HorriblyAwry(UUID ownerId) { + super(ownerId, 59, "Horribly Awry", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{U}"); + this.expansionSetCode = "BFZ"; + + // Devoid + Ability ability = new DevoidAbility(this.color); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + // Counter target creature spell with converted mana cost 4 or less. If that spell is countered this way, exile it instead of putting it into its owner's graveyard. + this.getSpellAbility().addEffect(new CounterTargetWithReplacementEffect(Zone.EXILED)); + this.getSpellAbility().addTarget(new TargetSpell(filter)); + } + + public HorriblyAwry(final HorriblyAwry card) { + super(card); + } + + @Override + public HorriblyAwry copy() { + return new HorriblyAwry(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/IncubatorDrone.java b/Mage.Sets/src/mage/sets/battleforzendikar/IncubatorDrone.java index c6e27dff96f..aeba4330a7e 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/IncubatorDrone.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/IncubatorDrone.java @@ -30,6 +30,7 @@ package mage.sets.battleforzendikar; import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; @@ -53,9 +54,11 @@ public class IncubatorDrone extends CardImpl { // Devoid this.addAbility(new DevoidAbility(this.color)); - + // Whenever Incubator Drone enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." - this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new EldraziScionToken()))); + Effect effect = new CreateTokenEffect(new EldraziScionToken()); + effect.setText("put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has \"Sacrifice this creature: Add {1} to your mana pool.\""); + this.addAbility(new EntersBattlefieldTriggeredAbility(effect, false)); } public IncubatorDrone(final IncubatorDrone card) { diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/InfuseWithTheElements.java b/Mage.Sets/src/mage/sets/battleforzendikar/InfuseWithTheElements.java new file mode 100644 index 00000000000..5f30903dbf6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/InfuseWithTheElements.java @@ -0,0 +1,74 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.ColorsOfManaSpentToCastCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class InfuseWithTheElements extends CardImpl { + + public InfuseWithTheElements(UUID ownerId) { + super(ownerId, 175, "Infuse with the Elements", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{3}{G}"); + this.expansionSetCode = "BFZ"; + + // Converge - Put X +1/+1 counters on target creature, where X is the number of colors of mana spent to cast Infuse with the Elements. + this.getSpellAbility().setAbilityWord(AbilityWord.CONVERGE); + Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(0), ColorsOfManaSpentToCastCount.getInstance()); + effect.setText("Put X +1/+1 counters on target creature, where X is the number of colors of mana spent to cast {this}"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + // That creature gains trample until end of turn. + effect = new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn); + effect.setText("That creature gains trample until end of turn"); + this.getSpellAbility().addEffect(effect); + } + + public InfuseWithTheElements(final InfuseWithTheElements card) { + super(card); + } + + @Override + public InfuseWithTheElements copy() { + return new InfuseWithTheElements(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/InspiredCharge.java b/Mage.Sets/src/mage/sets/battleforzendikar/InspiredCharge.java new file mode 100644 index 00000000000..3b5d54435b3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/InspiredCharge.java @@ -0,0 +1,52 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class InspiredCharge extends mage.sets.magic2011.InspiredCharge { + + public InspiredCharge(UUID ownerId) { + super(ownerId); + this.cardNumber = 32; + this.expansionSetCode = "BFZ"; + } + + public InspiredCharge(final InspiredCharge card) { + super(card); + } + + @Override + public InspiredCharge copy() { + return new InspiredCharge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/JaddiOffshoot.java b/Mage.Sets/src/mage/sets/battleforzendikar/JaddiOffshoot.java new file mode 100644 index 00000000000..20a35fa49f3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/JaddiOffshoot.java @@ -0,0 +1,66 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.LandfallAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class JaddiOffshoot extends CardImpl { + + public JaddiOffshoot(UUID ownerId) { + super(ownerId, 176, "Jaddi Offshoot", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Plant"); + this.power = new MageInt(0); + this.toughness = new MageInt(3); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + // Landfall - Whenever a land enters the battlefield under your control, you gain 1 life. + this.addAbility(new LandfallAbility(new GainLifeEffect(1), false)); + } + + public JaddiOffshoot(final JaddiOffshoot card) { + super(card); + } + + @Override + public JaddiOffshoot copy() { + return new JaddiOffshoot(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/KalastriaHealer.java b/Mage.Sets/src/mage/sets/battleforzendikar/KalastriaHealer.java new file mode 100644 index 00000000000..961116a0201 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/KalastriaHealer.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.sets.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AllyEntersBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.LoseLifeOpponentsEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class KalastriaHealer extends CardImpl { + + public KalastriaHealer(UUID ownerId) { + super(ownerId, 114, "Kalastria Healer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Vampire"); + this.subtype.add("Cleric"); + this.subtype.add("Ally"); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // Rally - Whenever Kalastria Healer or another Ally enters the battlefield under your control, each opponent loses 1 life and you gain 1 life. + Ability ability = new AllyEntersBattlefieldTriggeredAbility(new LoseLifeOpponentsEffect(1), false); + Effect effect = new GainLifeEffect(1); + effect.setText("and you gain 1 life"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public KalastriaHealer(final KalastriaHealer card) { + super(card); + } + + @Override + public KalastriaHealer copy() { + return new KalastriaHealer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/KalastriaNightwatch.java b/Mage.Sets/src/mage/sets/battleforzendikar/KalastriaNightwatch.java new file mode 100644 index 00000000000..46641e624ae --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/KalastriaNightwatch.java @@ -0,0 +1,67 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.GainLifeControllerTriggeredAbility; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class KalastriaNightwatch extends CardImpl { + + public KalastriaNightwatch(UUID ownerId) { + super(ownerId, 115, "Kalastria Nightwatch", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{B}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Vampire"); + this.subtype.add("Warrior"); + this.subtype.add("Ally"); + this.power = new MageInt(4); + this.toughness = new MageInt(5); + + // Whenever you gain life, Kalastria Nightwatch gains flying until end of turn. + this.addAbility(new GainLifeControllerTriggeredAbility(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), false)); + } + + public KalastriaNightwatch(final KalastriaNightwatch card) { + super(card); + } + + @Override + public KalastriaNightwatch copy() { + return new KalastriaNightwatch(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/KioraMasterOfTheDepths.java b/Mage.Sets/src/mage/sets/battleforzendikar/KioraMasterOfTheDepths.java index 2cabb3005db..557c17be929 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/KioraMasterOfTheDepths.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/KioraMasterOfTheDepths.java @@ -150,17 +150,16 @@ class KioraRevealEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); + Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = game.getObject(source.getSourceId()); - if (sourceObject != null && player != null) { - Cards cards = new CardsImpl(Zone.PICK); + if (sourceObject != null && controller != null) { + Cards cards = new CardsImpl(Zone.LIBRARY); + cards.addAll(controller.getLibrary().getTopCards(game, 4)); boolean creatureCardFound = false; boolean landCardFound = false; - int count = Math.min(player.getLibrary().size(), 4); - for (int i = 0; i < count; i++) { - Card card = player.getLibrary().removeFromTop(game); + for (UUID cardId : cards) { + Card card = game.getCard(cardId); if (card != null) { - game.setZone(card.getId(), Zone.PICK); cards.add(card); if (card.getCardType().contains(CardType.CREATURE)) { creatureCardFound = true; @@ -172,30 +171,30 @@ class KioraRevealEffect extends OneShotEffect { } if (!cards.isEmpty()) { - player.revealCards(sourceObject.getName(), cards, game); - if ((creatureCardFound || landCardFound) - && player.chooseUse(Outcome.DrawCard, + controller.revealCards(sourceObject.getName(), cards, game); + if ((creatureCardFound || landCardFound) + && controller.chooseUse(Outcome.DrawCard, "Put a creature card and/or a land card into your hand?", source, game)) { TargetCard target = new TargetCard(Zone.PICK, new FilterCreatureCard("creature card to put into your hand")); - if (creatureCardFound && player.choose(Outcome.DrawCard, cards, target, game)) { + if (creatureCardFound && controller.chooseTarget(Outcome.DrawCard, cards, target, source, game)) { Card card = cards.get(target.getFirstTarget(), game); if (card != null) { cards.remove(card); - card.moveToZone(Zone.HAND, source.getSourceId(), game, false); + controller.moveCards(card, null, Zone.HAND, source, game); } } - target = new TargetCard(Zone.PICK, new FilterLandCard("land card to put into your hand")); - if (landCardFound && player.choose(Outcome.DrawCard, cards, target, game)) { + target = new TargetCard(Zone.LIBRARY, new FilterLandCard("land card to put into your hand")); + if (landCardFound && controller.chooseTarget(Outcome.DrawCard, cards, target, source, game)) { Card card = cards.get(target.getFirstTarget(), game); if (card != null) { cards.remove(card); - card.moveToZone(Zone.HAND, source.getSourceId(), game, false); + controller.moveCards(card, null, Zone.HAND, source, game); } } } } - player.moveCards(cards, Zone.PICK, Zone.GRAVEYARD, source, game); + controller.moveCards(cards, null, Zone.GRAVEYARD, source, game); return true; } return false; @@ -208,12 +207,13 @@ class KioraMasterOfTheDepthsEmblem extends Emblem { public KioraMasterOfTheDepthsEmblem() { this.setName("EMBLEM: Kiora, Master of the Depths"); - + Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.COMMAND, new KioraFightEffect(), filter, true, SetTargetPointer.PERMANENT, "Whenever a creature enters the battlefield under your control, you may have it fight target creature."); ability.addTarget(new TargetCreaturePermanent()); this.getAbilities().add(ability); + this.setExpansionSetCodeForImage("BFZ"); } } diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/KitesailScout.java b/Mage.Sets/src/mage/sets/battleforzendikar/KitesailScout.java new file mode 100644 index 00000000000..4bc5547dbd3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/KitesailScout.java @@ -0,0 +1,63 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class KitesailScout extends CardImpl { + + public KitesailScout(UUID ownerId) { + super(ownerId, 33, "Kitesail Scout", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Kor"); + this.subtype.add("Scout"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + } + + public KitesailScout(final KitesailScout card) { + super(card); + } + + @Override + public KitesailScout copy() { + return new KitesailScout(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/KorBladewhirl.java b/Mage.Sets/src/mage/sets/battleforzendikar/KorBladewhirl.java new file mode 100644 index 00000000000..283723fab14 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/KorBladewhirl.java @@ -0,0 +1,69 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AllyEntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class KorBladewhirl extends CardImpl { + + public KorBladewhirl(UUID ownerId) { + super(ownerId, 34, "Kor Bladewhirl", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Kor"); + this.subtype.add("Soldier"); + this.subtype.add("Ally"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Rally — Whenever Kor Bladewhirl or another Ally enters the battlefield under your control, creatures you control gain first strike until end of turn. + this.addAbility(new AllyEntersBattlefieldTriggeredAbility( + new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent("creatures you control")), false)); + } + + public KorBladewhirl(final KorBladewhirl card) { + super(card); + } + + @Override + public KorBladewhirl copy() { + return new KorBladewhirl(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/KorCastigator.java b/Mage.Sets/src/mage/sets/battleforzendikar/KorCastigator.java new file mode 100644 index 00000000000..2595f18b8b3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/KorCastigator.java @@ -0,0 +1,75 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleEvasionAbility; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author LevelX2 + */ +public class KorCastigator extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Eldrazi Scions"); + + static { + filter.add(new SubtypePredicate("Eldrazi")); + filter.add(new SubtypePredicate("Scion")); + } + + public KorCastigator(UUID ownerId) { + super(ownerId, 35, "Kor Castigator", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Kor"); + this.subtype.add("Wizard"); + this.subtype.add("Ally"); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // Kor Castigator can't be blocked by Eldrazi Scions. + this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield))); + } + + public KorCastigator(final KorCastigator card) { + super(card); + } + + @Override + public KorCastigator copy() { + return new KorCastigator(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/KorEntanglers.java b/Mage.Sets/src/mage/sets/battleforzendikar/KorEntanglers.java new file mode 100644 index 00000000000..7e4e28338d5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/KorEntanglers.java @@ -0,0 +1,79 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AllyEntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.TapTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class KorEntanglers extends CardImpl { + + private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public KorEntanglers(UUID ownerId) { + super(ownerId, 36, "Kor Entanglers", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{W}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Kor"); + this.subtype.add("Soldier"); + this.subtype.add("Ally"); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Rally — Whenever Kor Entanglers or another Ally enters the battlefield under your control, tap target creature an opponent controls. + Ability ability = new AllyEntersBattlefieldTriggeredAbility(new TapTargetEffect(), false); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + + } + + public KorEntanglers(final KorEntanglers card) { + super(card); + } + + @Override + public KorEntanglers copy() { + return new KorEntanglers(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/KozileksSentinel.java b/Mage.Sets/src/mage/sets/battleforzendikar/KozileksSentinel.java new file mode 100644 index 00000000000..2832635146f --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/KozileksSentinel.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.sets.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.ColorlessPredicate; + +/** + * + * @author LevelX2 + */ +public class KozileksSentinel extends CardImpl { + + private static final FilterSpell filterSpell = new FilterSpell("a colorless spell"); + + static { + filterSpell.add(new ColorlessPredicate()); + } + + public KozileksSentinel(UUID ownerId) { + super(ownerId, 129, "Kozilek's Sentinel", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Drone"); + this.power = new MageInt(1); + this.toughness = new MageInt(4); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + + // Whenever you cast a colorless spell, Kozilek's Sentinel gets +1/+0 until end of turn. + this.addAbility(new SpellCastControllerTriggeredAbility(new BoostSourceEffect(1, 0, Duration.EndOfTurn), filterSpell, false)); + + } + + public KozileksSentinel(final KozileksSentinel card) { + super(card); + } + + @Override + public KozileksSentinel copy() { + return new KozileksSentinel(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/LavastepRaider.java b/Mage.Sets/src/mage/sets/battleforzendikar/LavastepRaider.java new file mode 100644 index 00000000000..e418f4d8807 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/LavastepRaider.java @@ -0,0 +1,67 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class LavastepRaider extends CardImpl { + + public LavastepRaider(UUID ownerId) { + super(ownerId, 147, "Lavastep Raider", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{R}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Goblin"); + this.subtype.add("Warrior"); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // {2}{R}: Lavastep Raider gets +2/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 0, Duration.EndOfTurn), new ManaCostsImpl<>("{2}{R}"))); + } + + public LavastepRaider(final LavastepRaider card) { + super(card); + } + + @Override + public LavastepRaider copy() { + return new LavastepRaider(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/LifespringDruid.java b/Mage.Sets/src/mage/sets/battleforzendikar/LifespringDruid.java new file mode 100644 index 00000000000..72cfe4c7392 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/LifespringDruid.java @@ -0,0 +1,63 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.mana.AnyColorManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class LifespringDruid extends CardImpl { + + public LifespringDruid(UUID ownerId) { + super(ownerId, 177, "Lifespring Druid", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Elf"); + this.subtype.add("Druid"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // {T}: Add one mana of any color to your mana pool. + this.addAbility(new AnyColorManaAbility()); + } + + public LifespringDruid(final LifespringDruid card) { + super(card); + } + + @Override + public LifespringDruid copy() { + return new LifespringDruid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/LithomancersFocus.java b/Mage.Sets/src/mage/sets/battleforzendikar/LithomancersFocus.java new file mode 100644 index 00000000000..93abab3bb34 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/LithomancersFocus.java @@ -0,0 +1,96 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.effects.PreventionEffectImpl; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class LithomancersFocus extends CardImpl { + + public LithomancersFocus(UUID ownerId) { + super(ownerId, 38, "Lithomancer's Focus", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{W}"); + this.expansionSetCode = "BFZ"; + + // Target creature gets +2/+2 until end of turn. + this.getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // Prevent all damage that would be dealt to that creature this turn by colorless sources. + this.getSpellAbility().addEffect(new LithomancersFocusPreventDamageToTargetEffect()); + } + + public LithomancersFocus(final LithomancersFocus card) { + super(card); + } + + @Override + public LithomancersFocus copy() { + return new LithomancersFocus(this); + } +} + +class LithomancersFocusPreventDamageToTargetEffect extends PreventionEffectImpl { + + public LithomancersFocusPreventDamageToTargetEffect() { + super(Duration.EndOfTurn, Integer.MAX_VALUE, false); + staticText = "Prevent all damage that would be dealt to that creature this turn by colorless sources"; + } + + public LithomancersFocusPreventDamageToTargetEffect(final LithomancersFocusPreventDamageToTargetEffect effect) { + super(effect); + } + + @Override + public LithomancersFocusPreventDamageToTargetEffect copy() { + return new LithomancersFocusPreventDamageToTargetEffect(this); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (super.applies(event, source, game) && event.getTargetId().equals(targetPointer.getFirst(game, source))) { + MageObject object = game.getObject(event.getSourceId()); + return object != null && object.getColor(game).isColorless(); + } + return false; + } + +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/LoomingSpires.java b/Mage.Sets/src/mage/sets/battleforzendikar/LoomingSpires.java new file mode 100644 index 00000000000..910c974d2fa --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/LoomingSpires.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.sets.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTappedAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.mana.RedManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class LoomingSpires extends CardImpl { + + public LoomingSpires(UUID ownerId) { + super(ownerId, 238, "Looming Spires", Rarity.COMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "BFZ"; + + // Looming Spires enters the battlefield tapped. + this.addAbility(new EntersBattlefieldTappedAbility()); + + // When Looming Spires enters the battlefield, target creature gets +1/+1 and gain first strike until end of turn. + Effect effect = new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn); + effect.setText("and gains first strike"); + Ability ability = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(1, 1, Duration.EndOfTurn), false); + ability.addEffect(effect); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + // {T}: Add {R} to your mana pool. + this.addAbility(new RedManaAbility()); + } + + public LoomingSpires(final LoomingSpires card) { + super(card); + } + + @Override + public LoomingSpires copy() { + return new LoomingSpires(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/MakindiPatrol.java b/Mage.Sets/src/mage/sets/battleforzendikar/MakindiPatrol.java new file mode 100644 index 00000000000..693d998a174 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/MakindiPatrol.java @@ -0,0 +1,69 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AllyEntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class MakindiPatrol extends CardImpl { + + public MakindiPatrol(UUID ownerId) { + super(ownerId, 39, "Makindi Patrol", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Human"); + this.subtype.add("Knight"); + this.subtype.add("Ally"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Rally — Whenever Makindi Patrol or another Ally enters the battlefield under your control, creatures you control gain vigilance until end of turn. + this.addAbility(new AllyEntersBattlefieldTriggeredAbility( + new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent("creatures")), false)); + } + + public MakindiPatrol(final MakindiPatrol card) { + super(card); + } + + @Override + public MakindiPatrol copy() { + return new MakindiPatrol(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/MakindiSliderunner.java b/Mage.Sets/src/mage/sets/battleforzendikar/MakindiSliderunner.java new file mode 100644 index 00000000000..4f596ad3576 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/MakindiSliderunner.java @@ -0,0 +1,68 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.LandfallAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class MakindiSliderunner extends CardImpl { + + public MakindiSliderunner(UUID ownerId) { + super(ownerId, 148, "Makindi Sliderunner", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Beast"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Landfall- Whenever a land enters the battlefield under your control, Makindi Sliderunner gets +1/+1 until end of turn. + this.addAbility(new LandfallAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), false)); + } + + public MakindiSliderunner(final MakindiSliderunner card) { + super(card); + } + + @Override + public MakindiSliderunner copy() { + return new MakindiSliderunner(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/MalakirFamiliar.java b/Mage.Sets/src/mage/sets/battleforzendikar/MalakirFamiliar.java new file mode 100644 index 00000000000..2fc7b1abe4b --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/MalakirFamiliar.java @@ -0,0 +1,71 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.GainLifeControllerTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.DeathtouchAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class MalakirFamiliar extends CardImpl { + + public MalakirFamiliar(UUID ownerId) { + super(ownerId, 116, "Malakir Familiar", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Bat"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Deahtouch + this.addAbility(DeathtouchAbility.getInstance()); + // Whenever you gain life, Malakir Familiar gets +1/+1 until end of turn. + this.addAbility(new GainLifeControllerTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), false)); + + } + + public MalakirFamiliar(final MalakirFamiliar card) { + super(card); + } + + @Override + public MalakirFamiliar copy() { + return new MalakirFamiliar(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/MarchFromTheTomb.java b/Mage.Sets/src/mage/sets/battleforzendikar/MarchFromTheTomb.java new file mode 100644 index 00000000000..0fcc73f4c8f --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/MarchFromTheTomb.java @@ -0,0 +1,127 @@ +/* + * 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.battleforzendikar; + +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author LevelX2 + */ +public class MarchFromTheTomb extends CardImpl { + + public MarchFromTheTomb(UUID ownerId) { + super(ownerId, 214, "March from the Tomb", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{W}{B}"); + this.expansionSetCode = "BFZ"; + + // Return any number of target Ally creature cards with total converted mana cost of 8 or less from your graveyard to the battlefield. + Effect effect = new ReturnFromGraveyardToBattlefieldTargetEffect(); + effect.setText("Return any number of target Ally creature cards with total converted mana cost of 8 or less from your graveyard to the battlefield"); + this.getSpellAbility().addEffect(effect); + FilterCard filter = new FilterCreatureCard(); + filter.add(new SubtypePredicate("Ally")); + this.getSpellAbility().addTarget(new MarchFromTheTombTarget(0, Integer.MAX_VALUE, filter)); + } + + public MarchFromTheTomb(final MarchFromTheTomb card) { + super(card); + } + + @Override + public MarchFromTheTomb copy() { + return new MarchFromTheTomb(this); + } +} + +class MarchFromTheTombTarget extends TargetCardInYourGraveyard { + + public MarchFromTheTombTarget(int minNumTargets, int maxNumTargets, FilterCard filter) { + super(minNumTargets, maxNumTargets, filter); + } + + public MarchFromTheTombTarget(MarchFromTheTombTarget target) { + super(target); + } + + @Override + public Set possibleTargets(UUID sourceId, UUID sourceControllerId, Game game) { + int cmcLeft = 8; + for (UUID targetId : this.getTargets()) { + Card card = game.getCard(targetId); + if (card != null) { + cmcLeft -= card.getManaCost().convertedManaCost(); + } + } + Set possibleTargets = super.possibleTargets(sourceId, sourceControllerId, game); + Set leftPossibleTargets = new HashSet<>(); + for (UUID targetId : possibleTargets) { + Card card = game.getCard(targetId); + if (card != null && card.getManaCost().convertedManaCost() <= cmcLeft) { + leftPossibleTargets.add(targetId); + } + } + setTargetName("any number of target Ally creature cards with total converted mana cost of 8 or less (" + cmcLeft + " left) from your graveyard"); + return leftPossibleTargets; + } + + @Override + public boolean canTarget(UUID playerId, UUID objectId, Ability source, Game game) { + if (super.canTarget(playerId, objectId, source, game)) { + int cmcLeft = 8; + for (UUID targetId : this.getTargets()) { + Card card = game.getCard(targetId); + if (card != null) { + cmcLeft -= card.getManaCost().convertedManaCost(); + } + } + Card card = game.getCard(objectId); + return card != null && card.getManaCost().convertedManaCost() <= cmcLeft; + } + return false; + } + + @Override + public MarchFromTheTombTarget copy() { + return new MarchFromTheTombTarget(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/MindRaker.java b/Mage.Sets/src/mage/sets/battleforzendikar/MindRaker.java new file mode 100644 index 00000000000..a03fa277ee2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/MindRaker.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.sets.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.common.ExileOpponentsCardFromExileToGraveyardCost; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.discard.DiscardEachPlayerEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; + +/** + * + * @author fireshoes + */ +public class MindRaker extends CardImpl { + + public MindRaker(UUID ownerId) { + super(ownerId, 95, "Mind Raker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Processor"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + + // When Mind Raker enters the battlefield, you may put a card an opponent owns from exile into that player's graveyard. If you do, each opponent discards a card. + this.addAbility(new EntersBattlefieldTriggeredAbility( + new DoIfCostPaid(new DiscardEachPlayerEffect(TargetController.OPPONENT), new ExileOpponentsCardFromExileToGraveyardCost(true)), false)); + } + + public MindRaker(final MindRaker card) { + super(card); + } + + @Override + public MindRaker copy() { + return new MindRaker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/MiresMalice.java b/Mage.Sets/src/mage/sets/battleforzendikar/MiresMalice.java new file mode 100644 index 00000000000..be28d713154 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/MiresMalice.java @@ -0,0 +1,63 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.abilities.keyword.AwakenAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetOpponent; + +/** + * + * @author LevelX2 + */ +public class MiresMalice extends CardImpl { + + public MiresMalice(UUID ownerId) { + super(ownerId, 117, "Mire's Malice", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{B}"); + this.expansionSetCode = "BFZ"; + + // Target opponent discards two cards. + this.getSpellAbility().addEffect(new DiscardTargetEffect(2)); + this.getSpellAbility().addTarget(new TargetOpponent()); + // Awaken 3 - {5}{B} + this.addAbility(new AwakenAbility(this, 3, "{5}{B}")); + } + + public MiresMalice(final MiresMalice card) { + super(card); + } + + @Override + public MiresMalice copy() { + return new MiresMalice(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/MoltenNursery.java b/Mage.Sets/src/mage/sets/battleforzendikar/MoltenNursery.java new file mode 100644 index 00000000000..71404a42606 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/MoltenNursery.java @@ -0,0 +1,76 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.ColorlessPredicate; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author fireshoes + */ +public class MoltenNursery extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("colorless spell"); + + static { + filter.add(new ColorlessPredicate()); + } + + public MoltenNursery(UUID ownerId) { + super(ownerId, 130, "Molten Nursery", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); + this.expansionSetCode = "BFZ"; + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + + // Whenever you cast a colorless spell, Molten Nursery deals 1 damage to target creature or player. + Ability ability = new SpellCastControllerTriggeredAbility(new DamageTargetEffect(1), filter, false); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + + } + + public MoltenNursery(final MoltenNursery card) { + super(card); + } + + @Override + public MoltenNursery copy() { + return new MoltenNursery(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/MortuaryMire.java b/Mage.Sets/src/mage/sets/battleforzendikar/MortuaryMire.java new file mode 100644 index 00000000000..d21925c8ea9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/MortuaryMire.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.sets.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTappedAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.PutOnLibraryTargetEffect; +import mage.abilities.mana.BlackManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreatureCard; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author fireshoes + */ +public class MortuaryMire extends CardImpl { + + public MortuaryMire(UUID ownerId) { + super(ownerId, 240, "Mortuary Mire", Rarity.COMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "BFZ"; + + // Mortuary Mire enters the battlefield tapped. + this.addAbility(new EntersBattlefieldTappedAbility()); + + // When Mortuary Mire enters the battlefield, you may put target creature card from your graveyard on top of your library. + Ability ability = new EntersBattlefieldTriggeredAbility(new PutOnLibraryTargetEffect(true), true); + ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard())); + this.addAbility(ability); + + // {T}: Add {B} to your mana pool. + this.addAbility(new BlackManaAbility()); + } + + public MortuaryMire(final MortuaryMire card) { + super(card); + } + + @Override + public MortuaryMire copy() { + return new MortuaryMire(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/MundaAmbushLeader.java b/Mage.Sets/src/mage/sets/battleforzendikar/MundaAmbushLeader.java new file mode 100644 index 00000000000..0b50bbc13be --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/MundaAmbushLeader.java @@ -0,0 +1,130 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.AllyEntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; + +/** + * + * @author LevelX2 + */ +public class MundaAmbushLeader extends CardImpl { + + public MundaAmbushLeader(UUID ownerId) { + super(ownerId, 215, "Munda, Ambush Leader", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}{W}"); + this.expansionSetCode = "BFZ"; + this.supertype.add("Legendary"); + this.subtype.add("Kor"); + this.subtype.add("Ally"); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Haste + this.addAbility(HasteAbility.getInstance()); + // Rally-Whenever Munda, Ambush Leader or another Ally enters the battlefield under your control, you may look at the top four cards of your library. If you do, reveal any number of Ally cards from among them, then put those cards on top of your library in any order and the rest on the bottom in any order. + this.addAbility(new AllyEntersBattlefieldTriggeredAbility(new MundaAmbushLeaderEffect(), true)); + + } + + public MundaAmbushLeader(final MundaAmbushLeader card) { + super(card); + } + + @Override + public MundaAmbushLeader copy() { + return new MundaAmbushLeader(this); + } +} + +class MundaAmbushLeaderEffect extends OneShotEffect { + + private static final FilterCard filter = new FilterCard("Ally cards to reveal and put on top of your libraray"); + + static { + filter.add(new SubtypePredicate("Ally")); + } + + public MundaAmbushLeaderEffect() { + super(Outcome.Benefit); + this.staticText = "you may look at the top four cards of your library. If you do, reveal any number of Ally cards from among them, then put those cards on top of your library in any order and the rest on the bottom in any order"; + } + + public MundaAmbushLeaderEffect(final MundaAmbushLeaderEffect effect) { + super(effect); + } + + @Override + public MundaAmbushLeaderEffect copy() { + return new MundaAmbushLeaderEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = game.getObject(source.getSourceId()); + if (controller != null && sourceObject != null) { + Cards allCards = new CardsImpl(); + allCards.addAll(controller.getLibrary().getTopCards(game, 4)); + controller.lookAtCards(sourceObject.getIdName(), allCards, game); + if (!allCards.isEmpty()) { + Cards cardsToReveal = new CardsImpl(); + TargetCard target = new TargetCard(0, Integer.MAX_VALUE, Zone.LIBRARY, new FilterCard("Ally cards to put on top of your libraray")); + controller.chooseTarget(outcome, allCards, target, source, game); + cardsToReveal.addAll(target.getTargets()); + if (!cardsToReveal.isEmpty()) { + controller.revealCards(sourceObject.getIdName(), cardsToReveal, game, true); + allCards.removeAll(cardsToReveal); + } + controller.putCardsOnTopOfLibrary(cardsToReveal, game, source, true); + } + if (!allCards.isEmpty()) { + controller.putCardsOnBottomOfLibrary(allCards, game, source, true); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/MurasaRanger.java b/Mage.Sets/src/mage/sets/battleforzendikar/MurasaRanger.java new file mode 100644 index 00000000000..39b26a74afb --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/MurasaRanger.java @@ -0,0 +1,67 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.LandfallAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; + +/** + * + * @author LevelX2 + */ +public class MurasaRanger extends CardImpl { + + public MurasaRanger(UUID ownerId) { + super(ownerId, 178, "Murasa Ranger", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Human"); + this.subtype.add("Warrior"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Landfall - Whenever a land enters the battlefield under your control, you may pay {3}{G}. IF you do, put two +1/+1 counters on Murasa Ranger. + this.addAbility(new LandfallAbility(new DoIfCostPaid(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), new ManaCostsImpl("{3}{G}")), false)); + } + + public MurasaRanger(final MurasaRanger card) { + super(card); + } + + @Override + public MurasaRanger copy() { + return new MurasaRanger(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/MurkStrider.java b/Mage.Sets/src/mage/sets/battleforzendikar/MurkStrider.java new file mode 100644 index 00000000000..0cc67d861b1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/MurkStrider.java @@ -0,0 +1,75 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.common.ExileOpponentsCardFromExileToGraveyardCost; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class MurkStrider extends CardImpl { + + public MurkStrider(UUID ownerId) { + super(ownerId, 62, "Murk Strider", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Processor"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + + // When Murk Strider enters the battlefield, you may put a card an opponent owns from exile into that player's graveyard. If you do, return target creature to its owner's hand. + Ability ability = new EntersBattlefieldTriggeredAbility( + new DoIfCostPaid(new ReturnToHandTargetEffect(), new ExileOpponentsCardFromExileToGraveyardCost(true)), true); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public MurkStrider(final MurkStrider card) { + super(card); + } + + @Override + public MurkStrider copy() { + return new MurkStrider(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/NaturalConnection.java b/Mage.Sets/src/mage/sets/battleforzendikar/NaturalConnection.java new file mode 100644 index 00000000000..acd8ac264e2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/NaturalConnection.java @@ -0,0 +1,62 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterBasicLandCard; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author LevelX2 + */ +public class NaturalConnection extends CardImpl { + + public NaturalConnection(UUID ownerId) { + super(ownerId, 179, "Natural Connection", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{G}"); + this.expansionSetCode = "BFZ"; + + // Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. + TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard()); + this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(target, true)); + + } + + public NaturalConnection(final NaturalConnection card) { + super(card); + } + + @Override + public NaturalConnection copy() { + return new NaturalConnection(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/NettleDrone.java b/Mage.Sets/src/mage/sets/battleforzendikar/NettleDrone.java new file mode 100644 index 00000000000..8c3a075642b --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/NettleDrone.java @@ -0,0 +1,84 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.DamagePlayersEffect; +import mage.abilities.effects.common.UntapSourceEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.ColorlessPredicate; + +/** + * + * @author LevelX2 + */ +public class NettleDrone extends CardImpl { + + private static final FilterSpell filterSpell = new FilterSpell("a colorless spell"); + + static { + filterSpell.add(new ColorlessPredicate()); + } + + public NettleDrone(UUID ownerId) { + super(ownerId, 131, "Nettle Drone", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Drone"); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + + // {T}: Nettle Drone deals 1 damage to each opponent. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamagePlayersEffect(1, TargetController.OPPONENT), new TapSourceCost())); + + // Whenever you cast a colorless spell, untap Nettle Drone. + this.addAbility(new SpellCastControllerTriggeredAbility(new UntapSourceEffect(), filterSpell, false)); + } + + public NettleDrone(final NettleDrone card) { + super(card); + } + + @Override + public NettleDrone copy() { + return new NettleDrone(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/NirkanaAssassin.java b/Mage.Sets/src/mage/sets/battleforzendikar/NirkanaAssassin.java new file mode 100644 index 00000000000..53442a1ddf5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/NirkanaAssassin.java @@ -0,0 +1,67 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.GainLifeControllerTriggeredAbility; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.DeathtouchAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class NirkanaAssassin extends CardImpl { + + public NirkanaAssassin(UUID ownerId) { + super(ownerId, 118, "Nirkana Assassin", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Vampire"); + this.subtype.add("Assassin"); + this.subtype.add("Ally"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Whenever you gain life, Nirkana Assassin gains deathtouch until end of turn. + this.addAbility(new GainLifeControllerTriggeredAbility(new GainAbilitySourceEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn), false)); + } + + public NirkanaAssassin(final NirkanaAssassin card) { + super(card); + } + + @Override + public NirkanaAssassin copy() { + return new NirkanaAssassin(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/NoyanDarRoilShaper.java b/Mage.Sets/src/mage/sets/battleforzendikar/NoyanDarRoilShaper.java new file mode 100644 index 00000000000..0c9c9b6a4b6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/NoyanDarRoilShaper.java @@ -0,0 +1,144 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.counters.CounterType; +import mage.filter.FilterSpell; +import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.game.permanent.token.Token; +import mage.target.Target; +import mage.target.common.TargetControlledPermanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author fireshoes + */ +public class NoyanDarRoilShaper extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("instant or sorcery card"); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.INSTANT), + new CardTypePredicate(CardType.SORCERY))); + } + + public NoyanDarRoilShaper(UUID ownerId) { + super(ownerId, 216, "Noyan Dar, Roil Shaper", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{W}{U}"); + this.expansionSetCode = "BFZ"; + this.supertype.add("Legendary"); + this.subtype.add("Merfolk"); + this.subtype.add("Ally"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Whenever you cast an instant or sorcery spell, you may put three +1/+1 counters on target land you control. + // If you do, that land becomes a 0/0 Elemental creature with haste that's still a land. + Ability ability = new SpellCastControllerTriggeredAbility(new NoyanDarEffect(), filter, false); + ability.addTarget(new TargetControlledPermanent(new FilterControlledLandPermanent())); + this.addAbility(ability); + } + + public NoyanDarRoilShaper(final NoyanDarRoilShaper card) { + super(card); + } + + @Override + public NoyanDarRoilShaper copy() { + return new NoyanDarRoilShaper(this); + } +} + +class NoyanDarEffect extends OneShotEffect { + + public NoyanDarEffect() { + super(Outcome.BoostCreature); + this.staticText = "put three +1/+1 counters on target land you control. If you do, that land becomes a 0/0 Elemental creature with haste that's still a land."; + } + + public NoyanDarEffect(final NoyanDarEffect effect) { + super(effect); + } + + @Override + public NoyanDarEffect copy() { + return new NoyanDarEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + UUID targetId = null; + for (Target target : source.getTargets()) { + targetId = target.getFirstTarget(); + } + if (targetId != null) { + FixedTarget fixedTarget = new FixedTarget(targetId); + ContinuousEffect continuousEffect = new BecomesCreatureTargetEffect(new AwakenElementalToken(), false, true, Duration.Custom); + continuousEffect.setTargetPointer(fixedTarget); + game.addEffect(continuousEffect, source); + Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(3)); + effect.setTargetPointer(fixedTarget); + return effect.apply(game, source); + } + return true; + } +} + + +class AwakenElementalToken extends Token { + + public AwakenElementalToken() { + super("", "0/0 Elemental creature with haste"); + this.cardType.add(CardType.CREATURE); + + this.subtype.add("Elemental"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + this.addAbility(HasteAbility.getInstance()); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/ObNixilisReignited.java b/Mage.Sets/src/mage/sets/battleforzendikar/ObNixilisReignited.java index 82ea5a1df23..419aaba047a 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/ObNixilisReignited.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/ObNixilisReignited.java @@ -60,20 +60,24 @@ public class ObNixilisReignited extends CardImpl { this.expansionSetCode = "BFZ"; this.subtype.add("Nixilis"); - this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(5)), false)); - + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(5)), false)); + // +1: You draw a card and you lose 1 life. - LoyaltyAbility ability1 = new LoyaltyAbility(new DrawCardSourceControllerEffect(1), 1); - ability1.addEffect(new LoseLifeSourceControllerEffect(1)); + Effect effect = new DrawCardSourceControllerEffect(1); + effect.setText("You draw a card"); + LoyaltyAbility ability1 = new LoyaltyAbility(effect, 1); + effect = new LoseLifeSourceControllerEffect(1); + effect.setText("and you lose 1 life"); + ability1.addEffect(effect); this.addAbility(ability1); - + // -3: Destroy target creature. LoyaltyAbility ability2 = new LoyaltyAbility(new DestroyTargetEffect(), -3); ability2.addTarget(new TargetCreaturePermanent()); this.addAbility(ability2); - + // -8: Target opponent gets an emblem with "Whenever a player draws a card, you lose 2 life." - Effect effect = new GetEmblemTargetPlayerEffect(new ObNixilisReignitedEmblem()); + effect = new GetEmblemTargetPlayerEffect(new ObNixilisReignitedEmblem()); effect.setText("Target opponent gets an emblem with \"Whenever a player draws a card, you lose 2 life.\""); LoyaltyAbility ability3 = new LoyaltyAbility(effect, -8); ability3.addTarget(new TargetOpponent()); @@ -94,12 +98,13 @@ class ObNixilisReignitedEmblem extends Emblem { public ObNixilisReignitedEmblem() { setName("EMBLEM: Ob Nixilis Reignited"); - + this.getAbilities().add(new ObNixilisEmblemTriggeredAbility(new LoseLifeSourceControllerEffect(2), false)); + this.setExpansionSetCodeForImage("BFZ"); } } -class ObNixilisEmblemTriggeredAbility extends TriggeredAbilityImpl { +class ObNixilisEmblemTriggeredAbility extends TriggeredAbilityImpl { public ObNixilisEmblemTriggeredAbility(Effect effect, boolean optional) { super(Zone.COMMAND, effect, optional); @@ -128,4 +133,4 @@ class ObNixilisEmblemTriggeredAbility extends TriggeredAbilityImpl { public ObNixilisEmblemTriggeredAbility copy() { return new ObNixilisEmblemTriggeredAbility(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/OblivionSower.java b/Mage.Sets/src/mage/sets/battleforzendikar/OblivionSower.java index bfc7d1b0917..80518ad1c23 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/OblivionSower.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/OblivionSower.java @@ -106,7 +106,9 @@ class OblivionSowerEffect extends OneShotEffect { Cards exiledLands = new CardsImpl(); exiledLands.addAll(exiledCards.getCards(filter, source.getSourceId(), controller.getId(), game)); if (!exiledLands.isEmpty() && controller.chooseUse(outcome, "Put lands into play?", source, game)) { - FilterCard filterToPlay = new FilterCard("Lands owned by " + targetPlayer.getName() + " to put into play under your control"); + FilterCard filterToPlay = new FilterCard("land" + + (exiledLands.size() > 1 ? "s" : "") + " from exile owned by " + + targetPlayer.getName() + " to put into play under your control"); TargetCard targetCards = new TargetCard(0, exiledLands.size(), Zone.EXILED, filterToPlay); if (controller.chooseTarget(outcome, exiledLands, targetCards, source, game)) { controller.moveCards(new CardsImpl(targetCards.getTargets()), null, Zone.BATTLEFIELD, source, game); diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/OnduChampion.java b/Mage.Sets/src/mage/sets/battleforzendikar/OnduChampion.java new file mode 100644 index 00000000000..1db9a5e52e2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/OnduChampion.java @@ -0,0 +1,69 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AllyEntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class OnduChampion extends CardImpl { + + public OnduChampion(UUID ownerId) { + super(ownerId, 149, "Ondu Champion", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Minotaur"); + this.subtype.add("Warrior"); + this.subtype.add("Ally"); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Rally — Whenever Ondu Champion or another Ally enters the battlefield under your control, creatures you control gain trample until end of turn. + this.addAbility(new AllyEntersBattlefieldTriggeredAbility( + new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent("creatures you control")), false)); + } + + public OnduChampion(final OnduChampion card) { + super(card); + } + + @Override + public OnduChampion copy() { + return new OnduChampion(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/OnduGreathorn.java b/Mage.Sets/src/mage/sets/battleforzendikar/OnduGreathorn.java new file mode 100644 index 00000000000..008e92ca918 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/OnduGreathorn.java @@ -0,0 +1,67 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.LandfallAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class OnduGreathorn extends CardImpl { + + public OnduGreathorn(UUID ownerId) { + super(ownerId, 40, "Ondu Greathorn", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Beast"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + // Landfall — Whenever a land enters the battlefield under your control, Ondu Greathorn gets +2/+2 until end of turn. + this.addAbility(new LandfallAbility(new BoostSourceEffect(2, 2, Duration.EndOfTurn), false)); + } + + public OnduGreathorn(final OnduGreathorn card) { + super(card); + } + + @Override + public OnduGreathorn copy() { + return new OnduGreathorn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/OnduRising.java b/Mage.Sets/src/mage/sets/battleforzendikar/OnduRising.java new file mode 100644 index 00000000000..5e8d6d4defa --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/OnduRising.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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.AwakenAbility; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author LevelX2 + */ +public class OnduRising extends CardImpl { + + public OnduRising(UUID ownerId) { + super(ownerId, 41, "Ondu Rising", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{1}{W}"); + this.expansionSetCode = "BFZ"; + + // Whenever a creature attacks this turn, it gains lifelink until end of turn. + this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new OnduRisingTriggeredAbility())); + + // Awaken 4—{4}{W} + this.addAbility(new AwakenAbility(this, 4, "{4}{W}")); + } + + public OnduRising(final OnduRising card) { + super(card); + } + + @Override + public OnduRising copy() { + return new OnduRising(this); + } +} + +class OnduRisingTriggeredAbility extends DelayedTriggeredAbility { + + public OnduRisingTriggeredAbility() { + super(new GainAbilityTargetEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn), Duration.EndOfTurn, false); + } + + public OnduRisingTriggeredAbility(OnduRisingTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.ATTACKER_DECLARED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Permanent permanent = game.getPermanent(event.getSourceId()); + if (permanent != null) { + for (Effect effect : getEffects()) { + effect.setTargetPointer(new FixedTarget(permanent, game)); + } + return true; + } + return false; + } + + @Override + public OnduRisingTriggeredAbility copy() { + return new OnduRisingTriggeredAbility(this); + } + + @Override + public String getRule() { + return "Whenever a creature attacks this turn, it gains lifelink until end of turn."; + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/OracleOfDust.java b/Mage.Sets/src/mage/sets/battleforzendikar/OracleOfDust.java new file mode 100644 index 00000000000..26cfc75ed68 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/OracleOfDust.java @@ -0,0 +1,73 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.ExileOpponentsCardFromExileToGraveyardCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DrawDiscardControllerEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class OracleOfDust extends CardImpl { + + public OracleOfDust(UUID ownerId) { + super(ownerId, 63, "Oracle of Dust", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Processor"); + this.power = new MageInt(3); + this.toughness = new MageInt(5); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + // {2}, Put a card an opponent owns from exile into that player's graveyard: Draw a card, then discard a card. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawDiscardControllerEffect(1, 1), new ManaCostsImpl<>("{2}")); + ability.addCost(new ExileOpponentsCardFromExileToGraveyardCost(true)); + this.addAbility(ability); + } + + public OracleOfDust(final OracleOfDust card) { + super(card); + } + + @Override + public OracleOfDust copy() { + return new OracleOfDust(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/OranRiefInvoker.java b/Mage.Sets/src/mage/sets/battleforzendikar/OranRiefInvoker.java new file mode 100644 index 00000000000..3328a451a09 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/OranRiefInvoker.java @@ -0,0 +1,77 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class OranRiefInvoker extends CardImpl { + + public OranRiefInvoker(UUID ownerId) { + super(ownerId, 182, "Oran-Rief Invoker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Human"); + this.subtype.add("Shaman"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {8}: Oran-Rief Invoker gets +5/+5 and gains trample until end of turn. + Effect effect = new BoostSourceEffect(5, 5, Duration.EndOfTurn); + effect.setText("{source} gets +5/+5"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(8)); + effect = new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn); + effect.setText("and gains trample until end of turn"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public OranRiefInvoker(final OranRiefInvoker card) { + super(card); + } + + @Override + public OranRiefInvoker copy() { + return new OranRiefInvoker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Outnumber.java b/Mage.Sets/src/mage/sets/battleforzendikar/Outnumber.java new file mode 100644 index 00000000000..1c11d5b6658 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Outnumber.java @@ -0,0 +1,66 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class Outnumber extends CardImpl { + + public Outnumber(UUID ownerId) { + super(ownerId, 150, "Outnumber", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{R}"); + this.expansionSetCode = "BFZ"; + + // Outnumber deals damage to target creature equal to the number of creatures you control. + Effect effect = new DamageTargetEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent("the number of creatures you control"))); + effect.setText("{this} deals damage to target creature equal to the number of creatures you control"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + + } + + public Outnumber(final Outnumber card) { + super(card); + } + + @Override + public Outnumber copy() { + return new Outnumber(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/PainfulTruths.java b/Mage.Sets/src/mage/sets/battleforzendikar/PainfulTruths.java new file mode 100644 index 00000000000..c8e1fd01582 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/PainfulTruths.java @@ -0,0 +1,68 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.ColorsOfManaSpentToCastCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class PainfulTruths extends CardImpl { + + public PainfulTruths(UUID ownerId) { + super(ownerId, 120, "Painful Truths", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{B}"); + this.expansionSetCode = "BFZ"; + + // Converge - You draw X cards and lose X life, where X is the number of colors of mana spent to cast Painful Truths. + getSpellAbility().setAbilityWord(AbilityWord.CONVERGE); + Effect effect = new DrawCardSourceControllerEffect(ColorsOfManaSpentToCastCount.getInstance()); + effect.setText("You draw X cards"); + getSpellAbility().addEffect(effect); + effect = new LoseLifeSourceControllerEffect(ColorsOfManaSpentToCastCount.getInstance()); + effect.setText("and lose X life, where X is the number of colors of mana spent to cast {this}"); + getSpellAbility().addEffect(effect); + } + + public PainfulTruths(final PainfulTruths card) { + super(card); + } + + @Override + public PainfulTruths copy() { + return new PainfulTruths(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/PartTheWaterveil.java b/Mage.Sets/src/mage/sets/battleforzendikar/PartTheWaterveil.java new file mode 100644 index 00000000000..b2f050b44e1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/PartTheWaterveil.java @@ -0,0 +1,64 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.effects.common.ExileSpellEffect; +import mage.abilities.effects.common.turn.AddExtraTurnControllerEffect; +import mage.abilities.keyword.AwakenAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class PartTheWaterveil extends CardImpl { + + public PartTheWaterveil(UUID ownerId) { + super(ownerId, 80, "Part the Waterveil", Rarity.MYTHIC, new CardType[]{CardType.SORCERY}, "{4}{U}{U}"); + this.expansionSetCode = "BFZ"; + + // Take an extra turn after this one. Exile Part the Waterveil. + this.getSpellAbility().addEffect(new AddExtraTurnControllerEffect()); + this.getSpellAbility().addEffect(ExileSpellEffect.getInstance()); + + // Awaken 6-{6}{U}{U}{U} + this.addAbility(new AwakenAbility(this, 6, "{6}{U}{U}{U}")); + } + + public PartTheWaterveil(final PartTheWaterveil card) { + super(card); + } + + @Override + public PartTheWaterveil copy() { + return new PartTheWaterveil(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/PathwayArrows.java b/Mage.Sets/src/mage/sets/battleforzendikar/PathwayArrows.java new file mode 100644 index 00000000000..ae0a741649f --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/PathwayArrows.java @@ -0,0 +1,112 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class PathwayArrows extends CardImpl { + + public PathwayArrows(UUID ownerId) { + super(ownerId, 225, "Pathway Arrows", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{1}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Equipment"); + + // Equipped creature has "{2}, {T}: This creature deals 1 damage to target creature. If a colorless creature is dealt damage this way, tap it." + SimpleActivatedAbility ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PathwayArrowsEffect(), new GenericManaCost(2)); + ability2.addCost(new TapSourceCost()); + ability2.addTarget(new TargetCreaturePermanent()); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability2, AttachmentType.EQUIPMENT))); + + // Equip {2} + this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); + } + + public PathwayArrows(final PathwayArrows card) { + super(card); + } + + @Override + public PathwayArrows copy() { + return new PathwayArrows(this); + } +} + +class PathwayArrowsEffect extends OneShotEffect { + + public PathwayArrowsEffect() { + super(Outcome.Benefit); + this.staticText = "This creature deals 1 damage to target creature. If a colorless creature is dealt damage this way, tap it"; + } + + public PathwayArrowsEffect(final PathwayArrowsEffect effect) { + super(effect); + } + + @Override + public PathwayArrowsEffect copy() { + return new PathwayArrowsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Permanent targetCreature = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (targetCreature != null) { + int damageDealt = targetCreature.damage(1, source.getSourceId(), game, false, true); + if (damageDealt > 0 && targetCreature.getColor(game).isColorless()) { + targetCreature.tap(game); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/PilgrimsEye.java b/Mage.Sets/src/mage/sets/battleforzendikar/PilgrimsEye.java new file mode 100644 index 00000000000..67f74e4c74d --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/PilgrimsEye.java @@ -0,0 +1,54 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class PilgrimsEye extends mage.sets.worldwake.PilgrimsEye { + + public PilgrimsEye(UUID ownerId) { + super(ownerId); + this.cardNumber = 226; + this.expansionSetCode = "BFZ"; + this.rarity = Rarity.UNCOMMON; + } + + public PilgrimsEye(final PilgrimsEye card) { + super(card); + } + + @Override + public PilgrimsEye copy() { + return new PilgrimsEye(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/PlatedCrusher.java b/Mage.Sets/src/mage/sets/battleforzendikar/PlatedCrusher.java new file mode 100644 index 00000000000..cb0d151b5ec --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/PlatedCrusher.java @@ -0,0 +1,65 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.TrampleAbility; +import mage.abilities.keyword.HexproofAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class PlatedCrusher extends CardImpl { + + public PlatedCrusher(UUID ownerId) { + super(ownerId, 183, "Plated Crusher", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{G}{G}{G}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Beast"); + this.power = new MageInt(7); + this.toughness = new MageInt(6); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + // Hexproof + this.addAbility(HexproofAbility.getInstance()); + } + + public PlatedCrusher(final PlatedCrusher card) { + super(card); + } + + @Override + public PlatedCrusher copy() { + return new PlatedCrusher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Plummet.java b/Mage.Sets/src/mage/sets/battleforzendikar/Plummet.java new file mode 100644 index 00000000000..a1aad2c25e9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Plummet.java @@ -0,0 +1,52 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class Plummet extends mage.sets.magic2011.Plummet { + + public Plummet(UUID ownerId) { + super(ownerId); + this.cardNumber = 184; + this.expansionSetCode = "BFZ"; + } + + public Plummet(final Plummet card) { + super(card); + } + + @Override + public Plummet copy() { + return new Plummet(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/PrismArray.java b/Mage.Sets/src/mage/sets/battleforzendikar/PrismArray.java new file mode 100644 index 00000000000..f1594a72cf4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/PrismArray.java @@ -0,0 +1,81 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.ColorsOfManaSpentToCastCount; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.keyword.ScryEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class PrismArray extends CardImpl { + + public PrismArray(UUID ownerId) { + super(ownerId, 81, "Prism Array", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{4}{U}"); + this.expansionSetCode = "BFZ"; + + // Converge - Prism Array enters the battlefield with a crystal counter on it for each color of mana spent to cast it. + this.addAbility(new EntersBattlefieldAbility( + new AddCountersSourceEffect(CounterType.CRYSTAL.createInstance(), ColorsOfManaSpentToCastCount.getInstance(), true), + null, true, "Converge — {this} enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it.", null)); + + // Remove a crystal counter from Prism Array: Tap target creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new TapTargetEffect(), + new RemoveCountersSourceCost(CounterType.CRYSTAL.createInstance(1))); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + // {W}{U}{B}{R}{G}: Scry 3. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScryEffect(3), new ManaCostsImpl("{W}{U}{B}{R}{G}"))); + } + + public PrismArray(final PrismArray card) { + super(card); + } + + @Override + public PrismArray copy() { + return new PrismArray(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/ProcessorAssault.java b/Mage.Sets/src/mage/sets/battleforzendikar/ProcessorAssault.java new file mode 100644 index 00000000000..dbcf4c0b8df --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/ProcessorAssault.java @@ -0,0 +1,71 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.costs.common.ExileOpponentsCardFromExileToGraveyardCost; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class ProcessorAssault extends CardImpl { + + public ProcessorAssault(UUID ownerId) { + super(ownerId, 132, "Processor Assault", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{1}{R}"); + this.expansionSetCode = "BFZ"; + + // Devoid + Ability ability = new DevoidAbility(this.color); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + + // As an additional cost to cast Processor Assault, put a card an opponent owns from exile into its owner's graveyard. + this.getSpellAbility().addCost(new ExileOpponentsCardFromExileToGraveyardCost(false)); + + // Processor Assault deals 5 damage to target creature. + this.getSpellAbility().addEffect(new DamageTargetEffect(5)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public ProcessorAssault(final ProcessorAssault card) { + super(card); + } + + @Override + public ProcessorAssault copy() { + return new ProcessorAssault(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/QuarantineField.java b/Mage.Sets/src/mage/sets/battleforzendikar/QuarantineField.java new file mode 100644 index 00000000000..491b8a58b8a --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/QuarantineField.java @@ -0,0 +1,122 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.delayed.OnLeaveReturnExiledToBattlefieldAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.counters.Counter; +import mage.filter.common.FilterNonlandPermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; +import mage.util.CardUtil; + +/** + * + * @author LevelX2 + */ +public class QuarantineField extends CardImpl { + + public QuarantineField(UUID ownerId) { + super(ownerId, 43, "Quarantine Field", Rarity.MYTHIC, new CardType[]{CardType.ENCHANTMENT}, "{X}{X}{W}{W}"); + this.expansionSetCode = "BFZ"; + + // Quarantine Field enters the battlefield with X isolation counters on it. + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(new Counter("isolation")))); + + // When Quarantine Field enters the battlefield, for each isolation counter on it, exile up to one target nonland permanent an opponenet controls until Quarantine Field leaves the battlefield. + Ability ability = new EntersBattlefieldTriggeredAbility(new QuarantineFieldEffect(), false); + ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new OnLeaveReturnExiledToBattlefieldAbility())); + this.addAbility(ability); + + } + + public QuarantineField(final QuarantineField card) { + super(card); + } + + @Override + public void adjustTargets(Ability ability, Game game) { + if (ability instanceof EntersBattlefieldTriggeredAbility) { + Permanent sourceObject = game.getPermanent(ability.getSourceId()); + if (sourceObject != null) { + int isolationCounters = sourceObject.getCounters(game).getCount("isolation"); + FilterNonlandPermanent filter = new FilterNonlandPermanent("up to " + isolationCounters + " nonland permanents controlled by any opponents"); + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + ability.addTarget(new TargetPermanent(0, isolationCounters, filter, false)); + } + + } + } + + @Override + public QuarantineField copy() { + return new QuarantineField(this); + } +} + +class QuarantineFieldEffect extends OneShotEffect { + + public QuarantineFieldEffect() { + super(Outcome.Exile); + this.staticText = "for each isolation counter on it, exile up to one target nonland permanent an opponenet controls until {this} leaves the battlefield"; + } + + public QuarantineFieldEffect(final QuarantineFieldEffect effect) { + super(effect); + } + + @Override + public QuarantineFieldEffect copy() { + return new QuarantineFieldEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + // If the source permanent leaves the battlefield before its triggered ability resolves, + // the targets won't be exiled. + if (permanent != null) { + return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getIdName()).apply(game, source); + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/RecklessCohort.java b/Mage.Sets/src/mage/sets/battleforzendikar/RecklessCohort.java new file mode 100644 index 00000000000..3bebab684a3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/RecklessCohort.java @@ -0,0 +1,84 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalRequirementEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.combat.AttacksIfAbleSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author LevelX2 + */ +public class RecklessCohort extends CardImpl { + + private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another Ally"); + + static { + filter.add(new AnotherPredicate()); + filter.add(new SubtypePredicate("Ally")); + } + + public RecklessCohort(UUID ownerId) { + super(ownerId, 152, "Reckless Cohort", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Human"); + this.subtype.add("Warrior"); + this.subtype.add("Ally"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Reckless Cohort attacks each combat if able unless you control another Ally. + Effect effect = new ConditionalRequirementEffect( + new AttacksIfAbleSourceEffect(Duration.WhileOnBattlefield, true), + new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.FEWER_THAN, 1)); + effect.setText("{this} attacks each combat if able unless you control another Ally"); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + } + + public RecklessCohort(final RecklessCohort card) { + super(card); + } + + @Override + public RecklessCohort copy() { + return new RecklessCohort(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/ReclaimingVines.java b/Mage.Sets/src/mage/sets/battleforzendikar/ReclaimingVines.java new file mode 100644 index 00000000000..8481715ce96 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/ReclaimingVines.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.sets.battleforzendikar; + +import java.util.UUID; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.TargetPermanent; + +/** + * + * @author LevelX2 + */ +public class ReclaimingVines extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("artifact, enchantment, or land"); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.ARTIFACT), + new CardTypePredicate(CardType.ENCHANTMENT), + new CardTypePredicate(CardType.LAND))); + } + + public ReclaimingVines(UUID ownerId) { + super(ownerId, 185, "Reclaiming Vines", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{G}{G}"); + this.expansionSetCode = "BFZ"; + + // Destroy target artifact, enchantment, or land. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + } + + public ReclaimingVines(final ReclaimingVines card) { + super(card); + } + + @Override + public ReclaimingVines copy() { + return new ReclaimingVines(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/RetreatToCoralhelm.java b/Mage.Sets/src/mage/sets/battleforzendikar/RetreatToCoralhelm.java new file mode 100644 index 00000000000..d331ef31a7a --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/RetreatToCoralhelm.java @@ -0,0 +1,67 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.common.LandfallAbility; +import mage.abilities.effects.common.MayTapOrUntapTargetEffect; +import mage.abilities.effects.keyword.ScryEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class RetreatToCoralhelm extends CardImpl { + + public RetreatToCoralhelm(UUID ownerId) { + super(ownerId, 82, "Retreat to Coralhelm", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); + this.expansionSetCode = "BFZ"; + + // Landfall- Whenever a land enters the battlefield under your control, choose one - You may tap or untap target creature; or Scry 1. + LandfallAbility ability = new LandfallAbility(new MayTapOrUntapTargetEffect(), false); + ability.addTarget(new TargetCreaturePermanent()); + Mode mode = new Mode(); + mode.getEffects().add(new ScryEffect(1)); + ability.addMode(mode); + this.addAbility(ability); + } + + public RetreatToCoralhelm(final RetreatToCoralhelm card) { + super(card); + } + + @Override + public RetreatToCoralhelm copy() { + return new RetreatToCoralhelm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/RetreatToHagra.java b/Mage.Sets/src/mage/sets/battleforzendikar/RetreatToHagra.java new file mode 100644 index 00000000000..49dd0bc33ad --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/RetreatToHagra.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.sets.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.common.LandfallAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.LoseLifeOpponentsEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.DeathtouchAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class RetreatToHagra extends CardImpl { + + public RetreatToHagra(UUID ownerId) { + super(ownerId, 121, "Retreat to Hagra", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); + this.expansionSetCode = "BFZ"; + + // Landfall- Whenever a land enters the battlefield under your control, choose one - Target creature gets +1/+0 and gains deathtouch until end of turn; + LandfallAbility ability = new LandfallAbility(new BoostTargetEffect(1, 0, Duration.EndOfTurn), false); + ability.addEffect(new GainAbilityTargetEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn)); + ability.addTarget(new TargetCreaturePermanent()); + + // or Each opponent loses 1 life and you gain 1 life. + Mode mode = new Mode(); + mode.getEffects().add(new LoseLifeOpponentsEffect(1)); + Effect effect = new GainLifeEffect(1); + effect.setText("and you gain 1 life"); + mode.getEffects().add(effect); + ability.addMode(mode); + this.addAbility(ability); + } + + public RetreatToHagra(final RetreatToHagra card) { + super(card); + } + + @Override + public RetreatToHagra copy() { + return new RetreatToHagra(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/RetreatToValakut.java b/Mage.Sets/src/mage/sets/battleforzendikar/RetreatToValakut.java new file mode 100644 index 00000000000..d078c696bc8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/RetreatToValakut.java @@ -0,0 +1,71 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.common.LandfallAbility; +import mage.abilities.effects.common.combat.CantBlockTargetEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class RetreatToValakut extends CardImpl { + + public RetreatToValakut(UUID ownerId) { + super(ownerId, 153, "Retreat to Valakut", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); + this.expansionSetCode = "BFZ"; + + // Landfall- Whenever a land enters the battlefield under your control, choose one - Target creature gets +2/+0 until end of turn; + LandfallAbility ability = new LandfallAbility(new BoostTargetEffect(2, 0, Duration.EndOfTurn), false); + ability.addTarget(new TargetCreaturePermanent()); + + // or Target creature can't block this turn. + Mode mode = new Mode(); + mode.getEffects().add(new CantBlockTargetEffect(Duration.EndOfTurn)); + mode.getTargets().add(new TargetCreaturePermanent()); + ability.addMode(mode); + this.addAbility(ability); + } + + public RetreatToValakut(final RetreatToValakut card) { + super(card); + } + + @Override + public RetreatToValakut copy() { + return new RetreatToValakut(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/RisingMiasma.java b/Mage.Sets/src/mage/sets/battleforzendikar/RisingMiasma.java new file mode 100644 index 00000000000..0fd0a1fe951 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/RisingMiasma.java @@ -0,0 +1,63 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.abilities.keyword.AwakenAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class RisingMiasma extends CardImpl { + + public RisingMiasma(UUID ownerId) { + super(ownerId, 122, "Rising Miasma", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{B}"); + this.expansionSetCode = "BFZ"; + + // All creatures get -2/-2 until end of turn. + this.getSpellAbility().addEffect(new BoostAllEffect(-2, -2, Duration.EndOfTurn)); + + // Awaken 3 - {5}{B}{B} + this.addAbility(new AwakenAbility(this, 3, "{5}{B}{B}")); + } + + public RisingMiasma(final RisingMiasma card) { + super(card); + } + + @Override + public RisingMiasma copy() { + return new RisingMiasma(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/RoilmagesTrick.java b/Mage.Sets/src/mage/sets/battleforzendikar/RoilmagesTrick.java new file mode 100644 index 00000000000..de6e77d02c8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/RoilmagesTrick.java @@ -0,0 +1,79 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.ColorsOfManaSpentToCastCount; +import mage.abilities.dynamicvalue.common.SignInversionDynamicValue; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.cards.CardImpl; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author LevelX2 + */ +public class RoilmagesTrick extends CardImpl { + + private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures your opponents control"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public RoilmagesTrick(UUID ownerId) { + super(ownerId, 83, "Roilmage's Trick", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{3}{U}"); + this.expansionSetCode = "BFZ"; + + // Converge — Creatures your opponents control get -X/-0 until end of turn, where X is the number of colors of mana spent to cast Roilmage's Trick. + this.getSpellAbility().setAbilityWord(AbilityWord.CONVERGE); + this.getSpellAbility().addEffect(new BoostAllEffect( + new SignInversionDynamicValue(ColorsOfManaSpentToCastCount.getInstance()), new StaticValue(-0), Duration.EndOfTurn, filter, false, + "Creatures your opponents control get -X/-0 until end of turn, where X is the number of colors of mana spent to cast {this}.
", true)); + + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public RoilmagesTrick(final RoilmagesTrick card) { + super(card); + } + + @Override + public RoilmagesTrick copy() { + return new RoilmagesTrick(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/RoilsRetribution.java b/Mage.Sets/src/mage/sets/battleforzendikar/RoilsRetribution.java new file mode 100644 index 00000000000..b94090773f5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/RoilsRetribution.java @@ -0,0 +1,61 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.effects.common.DamageMultiEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterAttackingOrBlockingCreature; +import mage.target.common.TargetCreaturePermanentAmount; + +/** + * + * @author LevelX2 + */ +public class RoilsRetribution extends CardImpl { + + public RoilsRetribution(UUID ownerId) { + super(ownerId, 45, "Roil's Retribution", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{3}{W}{W}"); + this.expansionSetCode = "BFZ"; + + // Roil's Retribution deals 5 damage divided as you choose among any number of target attacking or blocking creatures. + this.getSpellAbility().addEffect(new DamageMultiEffect(5)); + this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(5, new FilterAttackingOrBlockingCreature("attacking or blocking creatures"))); + } + + public RoilsRetribution(final RoilsRetribution card) { + super(card); + } + + @Override + public RoilsRetribution copy() { + return new RoilsRetribution(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/RotShambler.java b/Mage.Sets/src/mage/sets/battleforzendikar/RotShambler.java new file mode 100644 index 00000000000..b42c874827b --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/RotShambler.java @@ -0,0 +1,76 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesCreatureTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author LevelX2 + */ +public class RotShambler extends CardImpl { + + private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature you control"); + + static { + filter.add(new AnotherPredicate()); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public RotShambler(UUID ownerId) { + super(ownerId, 187, "Rot Shambler", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Fungus"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Whenever another creature you control dies, put a +1/+1 counter on Rot Shambler. + this.addAbility(new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, filter)); + + } + + public RotShambler(final RotShambler card) { + super(card); + } + + @Override + public RotShambler copy() { + return new RotShambler(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/RuinProcessor.java b/Mage.Sets/src/mage/sets/battleforzendikar/RuinProcessor.java new file mode 100644 index 00000000000..32c73d263fc --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/RuinProcessor.java @@ -0,0 +1,68 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.common.ExileOpponentsCardFromExileToGraveyardCost; +import mage.abilities.effects.common.CastSourceTriggeredAbility; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class RuinProcessor extends CardImpl { + + public RuinProcessor(UUID ownerId) { + super(ownerId, 12, "Ruin Processor", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{7}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Processor"); + this.power = new MageInt(7); + this.toughness = new MageInt(8); + + // When you cast Ruin Processor, you may put a card an opponent owns from exile into that player's graveyard. If you do, you gain 5 life. + this.addAbility(new CastSourceTriggeredAbility( + new DoIfCostPaid(new GainLifeEffect(5), new ExileOpponentsCardFromExileToGraveyardCost(true)), true)); + + } + + public RuinProcessor(final RuinProcessor card) { + super(card); + } + + @Override + public RuinProcessor copy() { + return new RuinProcessor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/RuinationGuide.java b/Mage.Sets/src/mage/sets/battleforzendikar/RuinationGuide.java new file mode 100644 index 00000000000..128a4ae5697 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/RuinationGuide.java @@ -0,0 +1,80 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.abilities.keyword.IngestAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorlessPredicate; + +/** + * + * @author LevelX2 + */ +public class RuinationGuide extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Other colorless creatures you control"); + + static { + filter.add(new ColorlessPredicate()); + } + + public RuinationGuide(UUID ownerId) { + super(ownerId, 64, "Ruination Guide", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Drone"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + // Ingest + this.addAbility(new IngestAbility()); + // Other colorless creatures you control get +1/+0. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 0, Duration.WhileOnBattlefield, filter, true))); + } + + public RuinationGuide(final RuinationGuide card) { + super(card); + } + + @Override + public RuinationGuide copy() { + return new RuinationGuide(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/RushOfIce.java b/Mage.Sets/src/mage/sets/battleforzendikar/RushOfIce.java new file mode 100644 index 00000000000..284b9088325 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/RushOfIce.java @@ -0,0 +1,66 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.keyword.AwakenAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class RushOfIce extends CardImpl { + + public RushOfIce(UUID ownerId) { + super(ownerId, 84, "Rush of Ice", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{U}"); + this.expansionSetCode = "BFZ"; + + // Tap target creature. It doesn't untap during its controller's next untap step. + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new TapTargetEffect()); + this.getSpellAbility().addEffect(new DontUntapInControllersNextUntapStepTargetEffect("It")); + + // Awaken 3—{4}{U} + this.addAbility(new AwakenAbility(this, 3, "{4}{U}")); + } + + public RushOfIce(final RushOfIce card) { + super(card); + } + + @Override + public RushOfIce copy() { + return new RushOfIce(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/SalvageDrone.java b/Mage.Sets/src/mage/sets/battleforzendikar/SalvageDrone.java new file mode 100644 index 00000000000..ddc93565ded --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/SalvageDrone.java @@ -0,0 +1,71 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.common.DrawDiscardControllerEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.abilities.keyword.IngestAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class SalvageDrone extends CardImpl { + + public SalvageDrone(UUID ownerId) { + super(ownerId, 65, "Salvage Drone", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{U}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Drone"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + // Ingest (Whenever this creature deals combat damage to a player, that player exiles the top card of his or her library.) + this.addAbility(new IngestAbility()); + // When Salvage Drone dies, you may draw a card. If you do, discard a card. + this.addAbility(new DiesTriggeredAbility(new DrawDiscardControllerEffect(1, 1, true), false)); + + } + + public SalvageDrone(final SalvageDrone card) { + super(card); + } + + @Override + public SalvageDrone copy() { + return new SalvageDrone(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/SanctumOfUgin.java b/Mage.Sets/src/mage/sets/battleforzendikar/SanctumOfUgin.java new file mode 100644 index 00000000000..43f2551ad26 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/SanctumOfUgin.java @@ -0,0 +1,84 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.Filter.ComparisonType; +import mage.filter.FilterSpell; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.ColorlessPredicate; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author fireshoes + */ +public class SanctumOfUgin extends CardImpl { + + private static final FilterCreatureCard filter = new FilterCreatureCard("colorless creature card"); + private static final FilterSpell filterSpells = new FilterSpell("colorless spell with converted mana cost 7 or greater"); + + static { + filter.add(new ColorlessPredicate()); + filterSpells.add(new ColorlessPredicate()); + filterSpells.add(new ConvertedManaCostPredicate(ComparisonType.GreaterThan, 6)); + } + + public SanctumOfUgin(UUID ownerId) { + super(ownerId, 242, "Sanctum of Ugin", Rarity.RARE, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "BFZ"; + + // {T}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // Whenever you cast a colorless spell with converted mana cost 7 or greater, you may sacrifice Sanctum of Ugin. + // If you do, search your library for a colorless creature card, reveal it, put it into your hand, then shuffle your library. + Effect effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true); + effect.setText("search your library for a colorless creature card, reveal it, put it into your hand, then shuffle your library"); + this.addAbility(new SpellCastControllerTriggeredAbility(new DoIfCostPaid(effect, new SacrificeSourceCost()), filterSpells, false)); + } + + public SanctumOfUgin(final SanctumOfUgin card) { + super(card); + } + + @Override + public SanctumOfUgin copy() { + return new SanctumOfUgin(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/SandstoneBridge.java b/Mage.Sets/src/mage/sets/battleforzendikar/SandstoneBridge.java new file mode 100644 index 00000000000..59094744fdc --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/SandstoneBridge.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.sets.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTappedAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.abilities.mana.WhiteManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class SandstoneBridge extends CardImpl { + + public SandstoneBridge(UUID ownerId) { + super(ownerId, 243, "Sandstone Bridge", Rarity.COMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "BFZ"; + + // Sandstone Bridge enters the battlefield tapped. + this.addAbility(new EntersBattlefieldTappedAbility()); + + // When Sandstone Bridge enters the battlefield, target creature gets +1/+1 and gains vigilance until end of turn. + Effect effect = new GainAbilityTargetEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn); + effect.setText("and gains vigilance"); + Ability ability = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(1, 1, Duration.EndOfTurn), false); + ability.addEffect(effect); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + // {T}: Add {W} to your mana pool. + this.addAbility(new WhiteManaAbility()); + } + + public SandstoneBridge(final SandstoneBridge card) { + super(card); + } + + @Override + public SandstoneBridge copy() { + return new SandstoneBridge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/ScatterToTheWinds.java b/Mage.Sets/src/mage/sets/battleforzendikar/ScatterToTheWinds.java new file mode 100644 index 00000000000..d040bebf35e --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/ScatterToTheWinds.java @@ -0,0 +1,64 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.abilities.keyword.AwakenAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.TargetSpell; + +/** + * + * @author fireshoes + */ +public class ScatterToTheWinds extends CardImpl { + + public ScatterToTheWinds(UUID ownerId) { + super(ownerId, 85, "Scatter to the Winds", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{1}{U}{U}"); + this.expansionSetCode = "BFZ"; + + // Counter target spell. + this.getSpellAbility().addEffect(new CounterTargetEffect()); + this.getSpellAbility().addTarget(new TargetSpell()); + + // Awaken 3-{4}{U}{U} + this.addAbility(new AwakenAbility(this, 3, "{4}{U}{U}")); + } + + public ScatterToTheWinds(final ScatterToTheWinds card) { + super(card); + } + + @Override + public ScatterToTheWinds copy() { + return new ScatterToTheWinds(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/ScourFromExistence.java b/Mage.Sets/src/mage/sets/battleforzendikar/ScourFromExistence.java new file mode 100644 index 00000000000..4b0f6795c60 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/ScourFromExistence.java @@ -0,0 +1,60 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.TargetPermanent; + +/** + * + * @author fireshoes + */ +public class ScourFromExistence extends CardImpl { + + public ScourFromExistence(UUID ownerId) { + super(ownerId, 13, "Scour from Existence", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{7}"); + this.expansionSetCode = "BFZ"; + + // Exile target permanent. + this.getSpellAbility().addEffect(new ExileTargetEffect()); + this.getSpellAbility().addTarget(new TargetPermanent()); + } + + public ScourFromExistence(final ScourFromExistence card) { + super(card); + } + + @Override + public ScourFromExistence copy() { + return new ScourFromExistence(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/SeekTheWilds.java b/Mage.Sets/src/mage/sets/battleforzendikar/SeekTheWilds.java new file mode 100644 index 00000000000..40a3d84db60 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/SeekTheWilds.java @@ -0,0 +1,69 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; + +/** + * + * @author LevelX2 + */ +public class SeekTheWilds extends CardImpl { + + private static final FilterCard filter = new FilterCard("a creature or land card"); + + static { + filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), new CardTypePredicate(CardType.LAND))); + } + + public SeekTheWilds(UUID ownerId) { + super(ownerId, 189, "Seek the Wilds", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{G}"); + this.expansionSetCode = "BFZ"; + + // Look at the top four cards of your library. You may reveal a creature or land card from among them and put it into your hand. Put the rest on the bottom of your library in any order. + this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(4), false, new StaticValue(1), filter, false)); + + } + + public SeekTheWilds(final SeekTheWilds card) { + super(card); + } + + @Override + public SeekTheWilds copy() { + return new SeekTheWilds(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/SereneSteward.java b/Mage.Sets/src/mage/sets/battleforzendikar/SereneSteward.java new file mode 100644 index 00000000000..3b965ef9d60 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/SereneSteward.java @@ -0,0 +1,74 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.GainLifeControllerTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class SereneSteward extends CardImpl { + + public SereneSteward(UUID ownerId) { + super(ownerId, 46, "Serene Steward", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + this.subtype.add("Ally"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever you gain life, you may pay {W}. If you do, put a +1/+1 counter on target creature. + Ability ability = new GainLifeControllerTriggeredAbility( + new DoIfCostPaid(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl("{W}")), + false); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public SereneSteward(final SereneSteward card) { + super(card); + } + + @Override + public SereneSteward copy() { + return new SereneSteward(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/SerpentineSpike.java b/Mage.Sets/src/mage/sets/battleforzendikar/SerpentineSpike.java new file mode 100644 index 00000000000..b6de1e9f1a6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/SerpentineSpike.java @@ -0,0 +1,114 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.replacement.DealtDamageToCreatureBySourceDies; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; +import mage.watchers.common.DamagedByWatcher; + +/** + * + * @author LevelX2 + */ +public class SerpentineSpike extends CardImpl { + + public SerpentineSpike(UUID ownerId) { + super(ownerId, 133, "Serpentine Spike", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{5}{R}{R}"); + this.expansionSetCode = "BFZ"; + + // Devoid + Ability ability = new DevoidAbility(this.color); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + // Serpentine Spike deals 2 damage to target creature, 3 damage to another target creature, and 4 damage to a third target creature. If a creature dealt damage this way would die this turn, exile it instead. + this.getSpellAbility().addEffect(new SerpentineSpikeEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature (2 damage)"))); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature (3 damage)"))); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature (4 damage)"))); + Effect effect = new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn); + effect.setText("If a creature dealt damage this way would die this turn, exile it instead"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addWatcher(new DamagedByWatcher()); + } + + public SerpentineSpike(final SerpentineSpike card) { + super(card); + } + + @Override + public SerpentineSpike copy() { + return new SerpentineSpike(this); + } +} + +class SerpentineSpikeEffect extends OneShotEffect { + + public SerpentineSpikeEffect() { + super(Outcome.Damage); + this.staticText = "{this} deals 2 damage to target creature, 3 damage to another target creature, and 4 damage to a third target creature"; + } + + public SerpentineSpikeEffect(final SerpentineSpikeEffect effect) { + super(effect); + } + + @Override + public SerpentineSpikeEffect copy() { + return new SerpentineSpikeEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getTargets().get(0).getFirstTarget()); + if (permanent != null) { + permanent.damage(2, source.getSourceId(), game, false, true); + } + permanent = game.getPermanent(source.getTargets().get(1).getFirstTarget()); + if (permanent != null) { + permanent.damage(3, source.getSourceId(), game, false, true); + } + permanent = game.getPermanent(source.getTargets().get(2).getFirstTarget()); + if (permanent != null) { + permanent.damage(4, source.getSourceId(), game, false, true); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/ShadowGlider.java b/Mage.Sets/src/mage/sets/battleforzendikar/ShadowGlider.java new file mode 100644 index 00000000000..786eac4e37e --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/ShadowGlider.java @@ -0,0 +1,63 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class ShadowGlider extends CardImpl { + + public ShadowGlider(UUID ownerId) { + super(ownerId, 47, "Shadow Glider", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Kor"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + } + + public ShadowGlider(final ShadowGlider card) { + super(card); + } + + @Override + public ShadowGlider copy() { + return new ShadowGlider(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/ShatterskullRecruit.java b/Mage.Sets/src/mage/sets/battleforzendikar/ShatterskullRecruit.java new file mode 100644 index 00000000000..b60833dab6a --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/ShatterskullRecruit.java @@ -0,0 +1,64 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.MenaceAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class ShatterskullRecruit extends CardImpl { + + public ShatterskullRecruit(UUID ownerId) { + super(ownerId, 155, "Shatterskull Recruit", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Giant"); + this.subtype.add("Warrior"); + this.subtype.add("Ally"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Menace + this.addAbility(new MenaceAbility()); + } + + public ShatterskullRecruit(final ShatterskullRecruit card) { + super(card); + } + + @Override + public ShatterskullRecruit copy() { + return new ShatterskullRecruit(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/ShrineOfTheForsakenGods.java b/Mage.Sets/src/mage/sets/battleforzendikar/ShrineOfTheForsakenGods.java new file mode 100644 index 00000000000..70a54cc1a08 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/ShrineOfTheForsakenGods.java @@ -0,0 +1,80 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.AddConditionalColorlessManaEffect; +import mage.abilities.mana.ActivateIfConditionManaAbility; +import mage.abilities.mana.ColorlessManaAbility; +import mage.abilities.mana.conditional.ConditionalSpellManaBuilder; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterSpell; +import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.predicate.mageobject.ColorlessPredicate; + +/** + * + * @author LevelX2 + */ +public class ShrineOfTheForsakenGods extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("colorless spells"); + + static { + filter.add(new ColorlessPredicate()); + } + + public ShrineOfTheForsakenGods(UUID ownerId) { + super(ownerId, 245, "Shrine of the Forsaken Gods", Rarity.RARE, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "BFZ"; + + // {T}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {T}: Add {2} to your mana pool. Spend this mana only to cast colorless spells. Activate this ability only if you control seven or more lands. + this.addAbility(new ActivateIfConditionManaAbility( + Zone.BATTLEFIELD, + new AddConditionalColorlessManaEffect(2, new ConditionalSpellManaBuilder(filter)), + new TapSourceCost(), + new PermanentsOnTheBattlefieldCondition(new FilterControlledLandPermanent("you control seven or more lands"), PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 6))); + } + + public ShrineOfTheForsakenGods(final ShrineOfTheForsakenGods card) { + super(card); + } + + @Override + public ShrineOfTheForsakenGods copy() { + return new ShrineOfTheForsakenGods(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/SilentSkimmer.java b/Mage.Sets/src/mage/sets/battleforzendikar/SilentSkimmer.java new file mode 100644 index 00000000000..bd3526bc99b --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/SilentSkimmer.java @@ -0,0 +1,76 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.SetTargetPointer; + +/** + * + * @author LevelX2 + */ +public class SilentSkimmer extends CardImpl { + + public SilentSkimmer(UUID ownerId) { + super(ownerId, 96, "Silent Skimmer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Drone"); + this.power = new MageInt(0); + this.toughness = new MageInt(4); + + // Devoid + Ability ability = new DevoidAbility(this.color); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Whenever Silent Skimmer attacks, defending player loses 2 life. + this.addAbility(new AttacksTriggeredAbility(new LoseLifeTargetEffect(2), false, + "Whenever {this} attacks, defending player loses 2 life", SetTargetPointer.PLAYER)); + + } + + public SilentSkimmer(final SilentSkimmer card) { + super(card); + } + + @Override + public SilentSkimmer copy() { + return new SilentSkimmer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/SireOfStagnation.java b/Mage.Sets/src/mage/sets/battleforzendikar/SireOfStagnation.java new file mode 100644 index 00000000000..126dbb1d10c --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/SireOfStagnation.java @@ -0,0 +1,84 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.ExileCardsFromTopOfLibraryTargetEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.SetTargetPointer; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author fireshoes + */ +public class SireOfStagnation extends CardImpl { + + private static final FilterLandPermanent filter = new FilterLandPermanent(); + private static final String rule = "Whenever a land enters the battlefield under an opponent's control, that player exiles the top two cards of his or her library and you draw two cards."; + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public SireOfStagnation(UUID ownerId) { + super(ownerId, 206, "Sire of Stagnation", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{4}{U}{B}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.power = new MageInt(5); + this.toughness = new MageInt(7); + + // Devoid (This card has no color.) + this.addAbility(new DevoidAbility(this.color)); + + // Whenever a land enters the battlefield under an opponent's control, that player exiles the top two cards of his or her library and you draw two cards. + Ability ability = new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, + new ExileCardsFromTopOfLibraryTargetEffect(2, "that player"), filter, false, SetTargetPointer.PLAYER, rule, false); + ability.addEffect(new DrawCardSourceControllerEffect(2)); + this.addAbility(ability); + } + + public SireOfStagnation(final SireOfStagnation card) { + super(card); + } + + @Override + public SireOfStagnation copy() { + return new SireOfStagnation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/SkylineCascade.java b/Mage.Sets/src/mage/sets/battleforzendikar/SkylineCascade.java new file mode 100644 index 00000000000..1f2078bb003 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/SkylineCascade.java @@ -0,0 +1,80 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTappedAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; +import mage.abilities.mana.BlueManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class SkylineCascade extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public SkylineCascade(UUID ownerId) { + super(ownerId, 246, "Skyline Cascade", Rarity.COMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "BFZ"; + + // Skyline Cascade enters the battlefield tapped. + this.addAbility(new EntersBattlefieldTappedAbility()); + + // When Skyline Cascade enters the battlefield, target creature an opponent controls doesn't untap during its controller's next untap step. + Ability ability = new EntersBattlefieldTriggeredAbility(new DontUntapInControllersNextUntapStepTargetEffect(), false); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + + // {T}: Add {U} to your mana pool. + this.addAbility(new BlueManaAbility()); + } + + public SkylineCascade(final SkylineCascade card) { + super(card); + } + + @Override + public SkylineCascade copy() { + return new SkylineCascade(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/SkyriderElf.java b/Mage.Sets/src/mage/sets/battleforzendikar/SkyriderElf.java new file mode 100644 index 00000000000..e08242cc827 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/SkyriderElf.java @@ -0,0 +1,74 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.dynamicvalue.common.ColorsOfManaSpentToCastCount; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; + +/** + * + * @author LevelX2 + */ +public class SkyriderElf extends CardImpl { + + public SkyriderElf(UUID ownerId) { + super(ownerId, 220, "Skyrider Elf", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{X}{G}{U}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Elf"); + this.subtype.add("Warrior"); + this.subtype.add("Ally"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Converge-Skyrider Elf enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it. + this.addAbility(new EntersBattlefieldAbility( + new AddCountersSourceEffect(CounterType.P1P1.createInstance(), ColorsOfManaSpentToCastCount.getInstance(), true), + null, true, "Converge — {this} enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it.", null)); + + } + + public SkyriderElf(final SkyriderElf card) { + super(card); + } + + @Override + public SkyriderElf copy() { + return new SkyriderElf(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/SlabHammer.java b/Mage.Sets/src/mage/sets/battleforzendikar/SlabHammer.java new file mode 100644 index 00000000000..98e97a9e68e --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/SlabHammer.java @@ -0,0 +1,77 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.AttacksAttachedTriggeredAbility; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.continuous.BoostEquippedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledLandPermanent; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author LevelX2 + */ +public class SlabHammer extends CardImpl { + + public SlabHammer(UUID ownerId) { + super(ownerId, 227, "Slab Hammer", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Equipment"); + + // Whenever equipped creature attacks, you may return a land you control to its owner's hand. If you do, the creature gets +2/+2 until end of turn. + Ability ability = new AttacksAttachedTriggeredAbility( + new DoIfCostPaid(new BoostEquippedEffect(2, 2, Duration.EndOfTurn), + new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(new FilterControlledLandPermanent())), + "Return a land you control to its owner's hand? (giving +2/+2 to the equipped creature)")); + this.addAbility(ability); + + // Equip {2} + this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); + + } + + public SlabHammer(final SlabHammer card) { + super(card); + } + + @Override + public SlabHammer copy() { + return new SlabHammer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/SludgeCrawler.java b/Mage.Sets/src/mage/sets/battleforzendikar/SludgeCrawler.java new file mode 100644 index 00000000000..e758d0d2264 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/SludgeCrawler.java @@ -0,0 +1,76 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.abilities.keyword.IngestAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class SludgeCrawler extends CardImpl { + + public SludgeCrawler(UUID ownerId) { + super(ownerId, 98, "Sludge Crawler", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{B}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Drone"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Devoid + Ability ability = new DevoidAbility(this.color); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + // Ingest + this.addAbility(new IngestAbility()); + // {2}: Sludge Crawler gets +1/+1 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), new GenericManaCost(2))); + } + + public SludgeCrawler(final SludgeCrawler card) { + super(card); + } + + @Override + public SludgeCrawler copy() { + return new SludgeCrawler(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/SmiteTheMonstrous.java b/Mage.Sets/src/mage/sets/battleforzendikar/SmiteTheMonstrous.java new file mode 100644 index 00000000000..3599031904a --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/SmiteTheMonstrous.java @@ -0,0 +1,52 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class SmiteTheMonstrous extends mage.sets.innistrad.SmiteTheMonstrous { + + public SmiteTheMonstrous(UUID ownerId) { + super(ownerId); + this.cardNumber = 49; + this.expansionSetCode = "BFZ"; + } + + public SmiteTheMonstrous(final SmiteTheMonstrous card) { + super(card); + } + + @Override + public SmiteTheMonstrous copy() { + return new SmiteTheMonstrous(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/SnappingGnarlid.java b/Mage.Sets/src/mage/sets/battleforzendikar/SnappingGnarlid.java new file mode 100644 index 00000000000..299d4bee641 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/SnappingGnarlid.java @@ -0,0 +1,64 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.LandfallAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class SnappingGnarlid extends CardImpl { + + public SnappingGnarlid(UUID ownerId) { + super(ownerId, 190, "Snapping Gnarlid", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Beast"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Landfall- Whenever a land enters the battlefield under your control, Snapping Gnarlid gets +1/+1 until end of turn. + this.addAbility(new LandfallAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), false)); + } + + public SnappingGnarlid(final SnappingGnarlid card) { + super(card); + } + + @Override + public SnappingGnarlid copy() { + return new SnappingGnarlid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/SpawningBed.java b/Mage.Sets/src/mage/sets/battleforzendikar/SpawningBed.java new file mode 100644 index 00000000000..1dc801574ed --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/SpawningBed.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.sets.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.permanent.token.EldraziScionToken; + +/** + * + * @author fireshoes + */ +public class SpawningBed extends CardImpl { + + public SpawningBed(UUID ownerId) { + super(ownerId, 248, "Spawning Bed", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "BFZ"; + + // {T}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {6}, {T}, Sacrifice Spawning Bed: Put three 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new EldraziScionToken(), 3), new ManaCostsImpl("{6}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public SpawningBed(final SpawningBed card) { + super(card); + } + + @Override + public SpawningBed copy() { + return new SpawningBed(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/SpellShrivel.java b/Mage.Sets/src/mage/sets/battleforzendikar/SpellShrivel.java new file mode 100644 index 00000000000..0ad2aad05c5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/SpellShrivel.java @@ -0,0 +1,125 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.stack.Spell; +import mage.game.stack.StackObject; +import mage.players.Player; +import mage.target.TargetSpell; + +/** + * + * @author LevelX2 + */ +public class SpellShrivel extends CardImpl { + + public SpellShrivel(UUID ownerId) { + super(ownerId, 66, "Spell Shrivel", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{U}"); + this.expansionSetCode = "BFZ"; + + // Devoid + Ability ability = new DevoidAbility(this.color); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + // Counter target spell unless its controller pays {4}. If that spell is countered this way, exile it instead of putting it into its owner's graveyard. + this.getSpellAbility().addEffect(new SpellShrivelCounterUnlessPaysEffect()); + this.getSpellAbility().addTarget(new TargetSpell()); + } + + public SpellShrivel(final SpellShrivel card) { + super(card); + } + + @Override + public SpellShrivel copy() { + return new SpellShrivel(this); + } +} + +class SpellShrivelCounterUnlessPaysEffect extends OneShotEffect { + + public SpellShrivelCounterUnlessPaysEffect() { + super(Outcome.Detriment); + } + + public SpellShrivelCounterUnlessPaysEffect(final SpellShrivelCounterUnlessPaysEffect effect) { + super(effect); + } + + @Override + public SpellShrivelCounterUnlessPaysEffect copy() { + return new SpellShrivelCounterUnlessPaysEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + StackObject spell = game.getStack().getStackObject(targetPointer.getFirst(game, source)); + MageObject sourceObject = source.getSourceObject(game); + if (spell != null && (spell instanceof Spell) && sourceObject != null) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int amount = 4; + if (amount > 0) { + GenericManaCost cost = new GenericManaCost(amount); + if (!cost.pay(source, game, spell.getControllerId(), spell.getControllerId(), false)) { + StackObject stackObject = game.getStack().getStackObject(source.getFirstTarget()); + if (stackObject != null && !game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.COUNTER, source.getFirstTarget(), source.getSourceId(), stackObject.getControllerId()))) { + game.informPlayers(sourceObject.getIdName() + ": cost wasn't payed - countering " + stackObject.getName()); + game.rememberLKI(source.getFirstTarget(), Zone.STACK, (Spell) stackObject); + controller.moveCards((Spell) spell, null, Zone.EXILED, source, game); + game.fireEvent(GameEvent.getEvent(GameEvent.EventType.COUNTERED, source.getFirstTarget(), source.getSourceId(), stackObject.getControllerId())); + return true; + } + return false; + } + } + } + } + return false; + } + + @Override + public String getText(Mode mode) { + return "Counter target spell unless its controller pays {4}. If that spell is countered this way, exile it instead of putting it into its owner's graveyard"; + } + +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/StoneHavenMedic.java b/Mage.Sets/src/mage/sets/battleforzendikar/StoneHavenMedic.java new file mode 100644 index 00000000000..1395376edab --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/StoneHavenMedic.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.sets.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class StoneHavenMedic extends CardImpl { + + public StoneHavenMedic(UUID ownerId) { + super(ownerId, 51, "Stone Haven Medic", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Kor"); + this.subtype.add("Cleric"); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // {W}, {T}: You gain 1 life. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(1), new ManaCostsImpl("{W}")); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public StoneHavenMedic(final StoneHavenMedic card) { + super(card); + } + + @Override + public StoneHavenMedic copy() { + return new StoneHavenMedic(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/Stonefury.java b/Mage.Sets/src/mage/sets/battleforzendikar/Stonefury.java new file mode 100644 index 00000000000..8c58f9e9520 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/Stonefury.java @@ -0,0 +1,65 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledLandPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class Stonefury extends CardImpl { + + public Stonefury(UUID ownerId) { + super(ownerId, 156, "Stonefury", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{3}{R}{R}"); + this.expansionSetCode = "BFZ"; + + // Stonefury deals damage to target creature equal to the number of lands you control. + Effect effect = new DamageTargetEffect(new PermanentsOnBattlefieldCount(new FilterControlledLandPermanent("the number of lands you control"))); + effect.setText("{this} deals damage to target creature equal to the number of lands you control"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public Stonefury(final Stonefury card) { + super(card); + } + + @Override + public Stonefury copy() { + return new Stonefury(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/SunkenHollow.java b/Mage.Sets/src/mage/sets/battleforzendikar/SunkenHollow.java index 6a585b8ca82..0f9edc0a55a 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/SunkenHollow.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/SunkenHollow.java @@ -47,15 +47,15 @@ import mage.filter.predicate.mageobject.SupertypePredicate; * @author fireshoes */ public class SunkenHollow extends CardImpl { - + private static final FilterLandPermanent filter = new FilterLandPermanent(); - + static { filter.add(new SupertypePredicate("Basic")); } public SunkenHollow(UUID ownerId) { - super(ownerId, 248, "Sunken Hollow", Rarity.RARE, new CardType[]{CardType.LAND}, ""); + super(ownerId, 249, "Sunken Hollow", Rarity.RARE, new CardType[]{CardType.LAND}, ""); this.expansionSetCode = "BFZ"; this.subtype.add("Island"); this.subtype.add("Swamp"); diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/SureStrike.java b/Mage.Sets/src/mage/sets/battleforzendikar/SureStrike.java new file mode 100644 index 00000000000..be9007a33d4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/SureStrike.java @@ -0,0 +1,69 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class SureStrike extends CardImpl { + + public SureStrike(UUID ownerId) { + super(ownerId, 157, "Sure Strike", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{R}"); + this.expansionSetCode = "BFZ"; + + // Target creature gets +3/+0 and gains first strike until end of turn. + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + Effect effect = new BoostTargetEffect(3, 0, Duration.EndOfTurn); + effect.setText("Target creature gets +3/+0"); + this.getSpellAbility().addEffect(effect); + effect = new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn); + effect.setText("and gains first strike until end of turn"); + this.getSpellAbility().addEffect(effect); + } + + public SureStrike(final SureStrike card) { + super(card); + } + + @Override + public SureStrike copy() { + return new SureStrike(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/SwarmSurge.java b/Mage.Sets/src/mage/sets/battleforzendikar/SwarmSurge.java new file mode 100644 index 00000000000..4c86dffec66 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/SwarmSurge.java @@ -0,0 +1,82 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorlessPredicate; + +/** + * + * @author LevelX2 + */ +public class SwarmSurge extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Colorless creatures you control"); + + static { + filter.add(new ColorlessPredicate()); + } + + public SwarmSurge(UUID ownerId) { + super(ownerId, 100, "Swarm Surge", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{B}"); + this.expansionSetCode = "BFZ"; + + // Devoid + Ability ability = new DevoidAbility(this.color); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + + // Creatures you control get +2/+0 until end of turn. + this.getSpellAbility().addEffect(new BoostControlledEffect(2, 0, Duration.EndOfTurn)); + + // Colorless creatures you control also gain first strike until end of turn. + Effect effect = new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, filter); + effect.setText("Colorless creatures you control also gain first strike until end of turn"); + this.getSpellAbility().addEffect(effect); + } + + public SwarmSurge(final SwarmSurge card) { + super(card); + } + + @Override + public SwarmSurge copy() { + return new SwarmSurge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/SwellOfGrowth.java b/Mage.Sets/src/mage/sets/battleforzendikar/SwellOfGrowth.java new file mode 100644 index 00000000000..21da131ea05 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/SwellOfGrowth.java @@ -0,0 +1,63 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.effects.common.PutLandFromHandOntoBattlefieldEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class SwellOfGrowth extends CardImpl { + + public SwellOfGrowth(UUID ownerId) { + super(ownerId, 191, "Swell of Growth", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{G}"); + this.expansionSetCode = "BFZ"; + + // Target creature gets +2/+2 until end of turn. You may put a land card from your hand onto the battlefield. + this.getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new PutLandFromHandOntoBattlefieldEffect()); + } + + public SwellOfGrowth(final SwellOfGrowth card) { + super(card); + } + + @Override + public SwellOfGrowth copy() { + return new SwellOfGrowth(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/SylvanScrying.java b/Mage.Sets/src/mage/sets/battleforzendikar/SylvanScrying.java new file mode 100644 index 00000000000..c583cbf1f46 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/SylvanScrying.java @@ -0,0 +1,52 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SylvanScrying extends mage.sets.tenthedition.SylvanScrying { + + public SylvanScrying(UUID ownerId) { + super(ownerId); + this.cardNumber = 192; + this.expansionSetCode = "BFZ"; + } + + public SylvanScrying(final SylvanScrying card) { + super(card); + } + + @Override + public SylvanScrying copy() { + return new SylvanScrying(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/TajuruBeastmaster.java b/Mage.Sets/src/mage/sets/battleforzendikar/TajuruBeastmaster.java new file mode 100644 index 00000000000..a73c8265b5e --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/TajuruBeastmaster.java @@ -0,0 +1,66 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AllyEntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class TajuruBeastmaster extends CardImpl { + + public TajuruBeastmaster(UUID ownerId) { + super(ownerId, 193, "Tajuru Beastmaster", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{5}{G}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Elf"); + this.subtype.add("Warrior"); + this.subtype.add("Ally"); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Rally - Whenever Tajuru Beastmaster or another Ally creature enters the battlefield under your control, creatures you control get +1/+1 until end of turn. + this.addAbility(new AllyEntersBattlefieldTriggeredAbility(new BoostControlledEffect(1, 1, Duration.EndOfTurn), false)); + } + + public TajuruBeastmaster(final TajuruBeastmaster card) { + super(card); + } + + @Override + public TajuruBeastmaster copy() { + return new TajuruBeastmaster(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/TajuruStalwart.java b/Mage.Sets/src/mage/sets/battleforzendikar/TajuruStalwart.java new file mode 100644 index 00000000000..15981c7815d --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/TajuruStalwart.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.sets.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.dynamicvalue.common.ColorsOfManaSpentToCastCount; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; + +/** + * + * @author LevelX2 + */ +public class TajuruStalwart extends CardImpl { + + public TajuruStalwart(UUID ownerId) { + super(ownerId, 194, "Tajuru Stalwart", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Elf"); + this.subtype.add("Scout"); + this.subtype.add("Ally"); + this.power = new MageInt(0); + this.toughness = new MageInt(1); + + // Converge - Tajuru Stalwart enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it. + this.addAbility(new EntersBattlefieldAbility( + new AddCountersSourceEffect(CounterType.P1P1.createInstance(), ColorsOfManaSpentToCastCount.getInstance(), true), + null, true, "Converge - {this} enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it.", null)); + + } + + public TajuruStalwart(final TajuruStalwart card) { + super(card); + } + + @Override + public TajuruStalwart copy() { + return new TajuruStalwart(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/TerritorialBaloth.java b/Mage.Sets/src/mage/sets/battleforzendikar/TerritorialBaloth.java new file mode 100644 index 00000000000..11c2e194b31 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/TerritorialBaloth.java @@ -0,0 +1,52 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class TerritorialBaloth extends mage.sets.zendikar.TerritorialBaloth { + + public TerritorialBaloth(UUID ownerId) { + super(ownerId); + this.cardNumber = 196; + this.expansionSetCode = "BFZ"; + } + + public TerritorialBaloth(final TerritorialBaloth card) { + super(card); + } + + @Override + public TerritorialBaloth copy() { + return new TerritorialBaloth(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/TideDrifter.java b/Mage.Sets/src/mage/sets/battleforzendikar/TideDrifter.java new file mode 100644 index 00000000000..43dcbe4827d --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/TideDrifter.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.sets.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorlessPredicate; + +/** + * + * @author LevelX2 + */ +public class TideDrifter extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Other colorless creatures you control"); + + static { + filter.add(new ColorlessPredicate()); + } + + public TideDrifter(UUID ownerId) { + super(ownerId, 67, "Tide Drifter", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Drone"); + this.power = new MageInt(0); + this.toughness = new MageInt(5); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + // Other colorless creatures you control get +0/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(0, 1, Duration.WhileOnBattlefield, filter, true))); + + } + + public TideDrifter(final TideDrifter card) { + super(card); + } + + @Override + public TideDrifter copy() { + return new TideDrifter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/TighteningCoils.java b/Mage.Sets/src/mage/sets/battleforzendikar/TighteningCoils.java new file mode 100644 index 00000000000..229c632b796 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/TighteningCoils.java @@ -0,0 +1,84 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.LoseAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class TighteningCoils extends CardImpl { + + public TighteningCoils(UUID ownerId) { + super(ownerId, 86, "Tightening Coils", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature gets -6/-0 and loses flying. + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(-6, 0, Duration.WhileOnBattlefield)); + Effect effect = new LoseAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA); + effect.setText("and loses flying"); + ability.addEffect(effect); + this.addAbility(ability); + + } + + public TighteningCoils(final TighteningCoils card) { + super(card); + } + + @Override + public TighteningCoils copy() { + return new TighteningCoils(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/TitansPresence.java b/Mage.Sets/src/mage/sets/battleforzendikar/TitansPresence.java index f19f583b71d..e9910dbcd65 100644 --- a/Mage.Sets/src/mage/sets/battleforzendikar/TitansPresence.java +++ b/Mage.Sets/src/mage/sets/battleforzendikar/TitansPresence.java @@ -52,7 +52,7 @@ import mage.target.common.TargetCreaturePermanent; */ public class TitansPresence extends CardImpl { - private static final FilterCreatureCard filter = new FilterCreatureCard("a colorless creature card from your hand to reveal"); + private static final FilterCreatureCard filter = new FilterCreatureCard("a colorless creature card from your hand"); static { filter.add(new ColorlessPredicate()); diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/TouchOfTheVoid.java b/Mage.Sets/src/mage/sets/battleforzendikar/TouchOfTheVoid.java new file mode 100644 index 00000000000..3ade709aaba --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/TouchOfTheVoid.java @@ -0,0 +1,74 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.replacement.DealtDamageToCreatureBySourceDies; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreatureOrPlayer; +import mage.watchers.common.DamagedByWatcher; + +/** + * + * @author LevelX2 + */ +public class TouchOfTheVoid extends CardImpl { + + public TouchOfTheVoid(UUID ownerId) { + super(ownerId, 134, "Touch of the Void", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{R}"); + this.expansionSetCode = "BFZ"; + + // Devoid + Ability ability = new DevoidAbility(this.color); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + // Touch of the Void deals 3 damage to target creature or player. If a creature dealt damage this way would die this turn, exile it instead. + this.getSpellAbility().addEffect(new DamageTargetEffect(3)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + Effect effect = new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn); + effect.setText("If a creature dealt damage this way would die this turn, exile it instead"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addWatcher(new DamagedByWatcher()); + } + + public TouchOfTheVoid(final TouchOfTheVoid card) { + super(card); + } + + @Override + public TouchOfTheVoid copy() { + return new TouchOfTheVoid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/TransgressTheMind.java b/Mage.Sets/src/mage/sets/battleforzendikar/TransgressTheMind.java new file mode 100644 index 00000000000..aaaef82e6cf --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/TransgressTheMind.java @@ -0,0 +1,79 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.ExileCardYouChooseTargetOpponentEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.Filter; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.target.TargetPlayer; + +/** + * + * @author fireshoes + */ +public class TransgressTheMind extends CardImpl { + + private static final FilterCard filter = new FilterCard("a card from it with converted mana cost 3 or greater"); + + static { + filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 2)); + } + + public TransgressTheMind(UUID ownerId) { + super(ownerId, 101, "Transgress the Mind", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{1}{B}"); + this.expansionSetCode = "BFZ"; + + // Devoid + Ability ability = new DevoidAbility(this.color); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + + // Target player reveals his or her hand. You may choose a card from it with converted mana cost 3 or greater and exile that card. + Effect effect = new ExileCardYouChooseTargetOpponentEffect(filter); + effect.setText("Target player reveals his or her hand. You may choose a card from it with converted mana cost 3 or greater and exile that card"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetPlayer()); + } + + public TransgressTheMind(final TransgressTheMind card) { + super(card); + } + + @Override + public TransgressTheMind copy() { + return new TransgressTheMind(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/TunnelingGeopede.java b/Mage.Sets/src/mage/sets/battleforzendikar/TunnelingGeopede.java new file mode 100644 index 00000000000..c93253bcf38 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/TunnelingGeopede.java @@ -0,0 +1,64 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.LandfallAbility; +import mage.abilities.effects.common.DamagePlayersEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; + +/** + * + * @author LevelX2 + */ +public class TunnelingGeopede extends CardImpl { + + public TunnelingGeopede(UUID ownerId) { + super(ownerId, 158, "Tunneling Geopede", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Insect"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Landfall - Whenever a land enters the battlefield under your control, Tunneling Geopede deals 1 damage to each opponent. + this.addAbility(new LandfallAbility(new DamagePlayersEffect(1, TargetController.OPPONENT), false)); + } + + public TunnelingGeopede(final TunnelingGeopede card) { + super(card); + } + + @Override + public TunnelingGeopede copy() { + return new TunnelingGeopede(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/TurnAgainst.java b/Mage.Sets/src/mage/sets/battleforzendikar/TurnAgainst.java new file mode 100644 index 00000000000..50defaa5d03 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/TurnAgainst.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.sets.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class TurnAgainst extends CardImpl { + + public TurnAgainst(UUID ownerId) { + super(ownerId, 135, "Turn Against", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{4}{R}"); + this.expansionSetCode = "BFZ"; + + // Devoid + Ability ability = new DevoidAbility(this.color); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + // Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn. + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new UntapTargetEffect()); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn)); + } + + public TurnAgainst(final TurnAgainst card) { + super(card); + } + + @Override + public TurnAgainst copy() { + return new TurnAgainst(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/UginsInsight.java b/Mage.Sets/src/mage/sets/battleforzendikar/UginsInsight.java new file mode 100644 index 00000000000..7b1b6ded224 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/UginsInsight.java @@ -0,0 +1,102 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class UginsInsight extends CardImpl { + + public UginsInsight(UUID ownerId) { + super(ownerId, 87, "Ugin's Insight", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{U}{U}"); + this.expansionSetCode = "BFZ"; + + // Scry X, where X is the highest converted mana cost among permanents you control, then draw three cards. + this.getSpellAbility().addEffect(new UginsInsightEffect()); + } + + public UginsInsight(final UginsInsight card) { + super(card); + } + + @Override + public UginsInsight copy() { + return new UginsInsight(this); + } +} + +class UginsInsightEffect extends OneShotEffect { + + public UginsInsightEffect() { + super(Outcome.DrawCard); + this.staticText = "Scry X, where X is the highest converted mana cost among permanents you control, then draw three cards"; + } + + public UginsInsightEffect(final UginsInsightEffect effect) { + super(effect); + } + + @Override + public UginsInsightEffect copy() { + return new UginsInsightEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int highCMC = 0; + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(controller.getId())) { + if (permanent.getSpellAbility() != null) { + int cmc = permanent.getSpellAbility().getManaCosts().convertedManaCost(); + if (cmc > highCMC) { + highCMC = cmc; + } + } + } + if (highCMC > 0) { + controller.scry(highCMC, source, game); + } + controller.drawCards(3, game); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/UlamogsDespoiler.java b/Mage.Sets/src/mage/sets/battleforzendikar/UlamogsDespoiler.java new file mode 100644 index 00000000000..c879bbeb29e --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/UlamogsDespoiler.java @@ -0,0 +1,119 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.FilterCard; +import mage.filter.predicate.other.OwnerPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetCardInExile; + +/** + * + * @author LevelX2 + */ +public class UlamogsDespoiler extends CardImpl { + + public UlamogsDespoiler(UUID ownerId) { + super(ownerId, 16, "Ulamog's Despoiler", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{6}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Processor"); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // As Ulamog's Despoiler enters the battlefield, you may put two cards your opponents own from exile into their owners' graveyards. If you do, Ulamog's Despoiler enters the battlefield with four +1/+1 counters on it. + this.addAbility(new EntersBattlefieldAbility(new UlamogsDespoilerEffect(), null, true, + "As {this} enters the battlefield, you may put two cards your opponents own from exile into their owners' graveyards. If you do, {this} enters the battlefield with four +1/+1 counters on it", null)); + } + + public UlamogsDespoiler(final UlamogsDespoiler card) { + super(card); + } + + @Override + public UlamogsDespoiler copy() { + return new UlamogsDespoiler(this); + } +} + +class UlamogsDespoilerEffect extends OneShotEffect { + + private final static FilterCard filter = new FilterCard("cards your opponents own from exile"); + + static { + filter.add(new OwnerPredicate(TargetController.OPPONENT)); + } + + public UlamogsDespoilerEffect() { + super(Outcome.PutCreatureInPlay); + this.staticText = "you may put two cards your opponents own from exile into their owners' graveyards. If you do, {this} enters the battlefield with four +1/+1 counters on it"; + } + + public UlamogsDespoilerEffect(final UlamogsDespoilerEffect effect) { + super(effect); + } + + @Override + public UlamogsDespoilerEffect copy() { + return new UlamogsDespoilerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Target target = new TargetCardInExile(2, 2, filter, null); + if (target.canChoose(source.getSourceId(), source.getControllerId(), game)) { + if (controller.chooseTarget(outcome, target, source, game)) { + Cards cardsToGraveyard = new CardsImpl(target.getTargets()); + controller.moveCards(cardsToGraveyard, null, Zone.GRAVEYARD, source, game); + return new AddCountersSourceEffect(CounterType.P1P1.createInstance(4)).apply(game, source); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/UlamogsReclaimer.java b/Mage.Sets/src/mage/sets/battleforzendikar/UlamogsReclaimer.java new file mode 100644 index 00000000000..5d9788b7724 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/UlamogsReclaimer.java @@ -0,0 +1,75 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.common.ExileOpponentsCardFromExileToGraveyardCost; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterInstantOrSorceryCard; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author LevelX2 + */ +public class UlamogsReclaimer extends CardImpl { + + public UlamogsReclaimer(UUID ownerId) { + super(ownerId, 68, "Ulamog's Reclaimer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Processor"); + this.power = new MageInt(2); + this.toughness = new MageInt(5); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + // When Ulamog's Reclaimer enters the battlefield, you may put a card an opponent owns from exile into that player's graveyard. If you do, return target instant or sorcery card from your graveyard to your hand. + Ability ability = new EntersBattlefieldTriggeredAbility( + new DoIfCostPaid(new ReturnFromGraveyardToHandTargetEffect(), new ExileOpponentsCardFromExileToGraveyardCost(true)), true); + ability.addTarget(new TargetCardInYourGraveyard(new FilterInstantOrSorceryCard("instant or sorcery card from your graveyard"))); + this.addAbility(ability); + } + + public UlamogsReclaimer(final UlamogsReclaimer card) { + super(card); + } + + @Override + public UlamogsReclaimer copy() { + return new UlamogsReclaimer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/UnifiedFront.java b/Mage.Sets/src/mage/sets/battleforzendikar/UnifiedFront.java new file mode 100644 index 00000000000..a80690b6504 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/UnifiedFront.java @@ -0,0 +1,64 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.ColorsOfManaSpentToCastCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class UnifiedFront extends CardImpl { + + public UnifiedFront(UUID ownerId) { + super(ownerId, 53, "Unified Front", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{W}"); + this.expansionSetCode = "BFZ"; + + // Converge — Put a 1/1 white Kor Ally creature token onto the battlefield for each color of mana spent to cast Unified Front. + getSpellAbility().setAbilityWord(AbilityWord.CONVERGE); + Effect effect = new CreateTokenEffect(new KorAllyToken(), ColorsOfManaSpentToCastCount.getInstance()); + effect.setText("Put a 1/1 white Kor Ally creature token onto the battlefield for each color of mana spent to cast {this}"); + getSpellAbility().addEffect(effect); + } + + public UnifiedFront(final UnifiedFront card) { + super(card); + } + + @Override + public UnifiedFront copy() { + return new UnifiedFront(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/UnnaturalAggression.java b/Mage.Sets/src/mage/sets/battleforzendikar/UnnaturalAggression.java new file mode 100644 index 00000000000..2bc63e6feed --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/UnnaturalAggression.java @@ -0,0 +1,145 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.effects.common.FightTargetsEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.events.ZoneChangeEvent; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author LevelX2 + */ +public class UnnaturalAggression extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public UnnaturalAggression(UUID ownerId) { + super(ownerId, 168, "Unnatural Aggression", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{G}"); + this.expansionSetCode = "BFZ"; + + // Devoid + Ability ability = new DevoidAbility(this.color); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + // Target creature you control fights target creature an opponent controls. + this.getSpellAbility().addEffect(new FightTargetsEffect()); + this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + // If the creature an opponent controls would die this turn, exile it instead. + this.getSpellAbility().addEffect(new DealtDamageToOpponentsCreatureDiesEffect(Duration.EndOfTurn)); + } + + public UnnaturalAggression(final UnnaturalAggression card) { + super(card); + } + + @Override + public UnnaturalAggression copy() { + return new UnnaturalAggression(this); + } +} + +class DealtDamageToOpponentsCreatureDiesEffect extends ReplacementEffectImpl { + + public DealtDamageToOpponentsCreatureDiesEffect(Duration duration) { + super(Duration.EndOfTurn, Outcome.Exile); + staticText = "If the creature an opponent controls would die this turn, exile it instead"; + } + + public DealtDamageToOpponentsCreatureDiesEffect(final DealtDamageToOpponentsCreatureDiesEffect effect) { + super(effect); + } + + @Override + public DealtDamageToOpponentsCreatureDiesEffect copy() { + return new DealtDamageToOpponentsCreatureDiesEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public void init(Ability source, Game game) { + super.init(source, game); + Permanent opponentCreature = game.getPermanent(source.getTargets().get(1).getFirstTarget()); + if (opponentCreature != null) { + this.setTargetPointer(new FixedTarget(opponentCreature, game)); + } else { + discard(); + } + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + Permanent permanent = ((ZoneChangeEvent) event).getTarget(); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null && permanent != null) { + return controller.moveCards(permanent, null, Zone.EXILED, source, game); + } + return false; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == EventType.ZONE_CHANGE; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + ZoneChangeEvent zce = (ZoneChangeEvent) event; + return zce.isDiesEvent() && zce.getTargetId().equals(getTargetPointer().getFirst(game, source)); + } + +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/ValakutInvoker.java b/Mage.Sets/src/mage/sets/battleforzendikar/ValakutInvoker.java new file mode 100644 index 00000000000..e974588fa5e --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/ValakutInvoker.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.sets.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LevelX2 + */ +public class ValakutInvoker extends CardImpl { + + public ValakutInvoker(UUID ownerId) { + super(ownerId, 159, "Valakut Invoker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Human"); + this.subtype.add("Shaman"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // {8}: Valakut Invoker deals 3 damage to target creature or player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new GenericManaCost(8)); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public ValakutInvoker(final ValakutInvoker card) { + super(card); + } + + @Override + public ValakutInvoker copy() { + return new ValakutInvoker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/ValakutPredator.java b/Mage.Sets/src/mage/sets/battleforzendikar/ValakutPredator.java new file mode 100644 index 00000000000..21e53fa69eb --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/ValakutPredator.java @@ -0,0 +1,64 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.LandfallAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class ValakutPredator extends CardImpl { + + public ValakutPredator(UUID ownerId) { + super(ownerId, 160, "Valakut Predator", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Elemental"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Landfall - Whenever a land enters the battlefield under your control, Valakut Predator gets +2/+2 until end of turn. + this.addAbility(new LandfallAbility(new BoostSourceEffect(2, 2, Duration.EndOfTurn), false)); + } + + public ValakutPredator(final ValakutPredator card) { + super(card); + } + + @Override + public ValakutPredator copy() { + return new ValakutPredator(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/VampiricRites.java b/Mage.Sets/src/mage/sets/battleforzendikar/VampiricRites.java new file mode 100644 index 00000000000..349e6d21773 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/VampiricRites.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.sets.battleforzendikar; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class VampiricRites extends CardImpl { + + public VampiricRites(UUID ownerId) { + super(ownerId, 124, "Vampiric Rites", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{B}"); + this.expansionSetCode = "BFZ"; + + // {1}{B}, Sacrifice a creature: You gain 1 life and draw a card. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(1), new ManaCostsImpl<>("{1}{B}")); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent("a creature")))); + Effect effect = new DrawCardSourceControllerEffect(1); + effect.setText("and draw a card"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public VampiricRites(final VampiricRites card) { + super(card); + } + + @Override + public VampiricRites copy() { + return new VampiricRites(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/VestigeOfEmrakul.java b/Mage.Sets/src/mage/sets/battleforzendikar/VestigeOfEmrakul.java new file mode 100644 index 00000000000..3f49bcfc75c --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/VestigeOfEmrakul.java @@ -0,0 +1,66 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.DevoidAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class VestigeOfEmrakul extends CardImpl { + + public VestigeOfEmrakul(UUID ownerId) { + super(ownerId, 136, "Vestige of Emrakul", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Drone"); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + // Trample + this.addAbility(TrampleAbility.getInstance()); + } + + public VestigeOfEmrakul(final VestigeOfEmrakul card) { + super(card); + } + + @Override + public VestigeOfEmrakul copy() { + return new VestigeOfEmrakul(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/VileAggregate.java b/Mage.Sets/src/mage/sets/battleforzendikar/VileAggregate.java new file mode 100644 index 00000000000..60d925eb737 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/VileAggregate.java @@ -0,0 +1,87 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.SetPowerSourceEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.abilities.keyword.IngestAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.ColorlessPredicate; + +/** + * + * @author LevelX2 + */ +public class VileAggregate extends CardImpl { + + private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("colorless creatures you control"); + + static { + filter.add(new ColorlessPredicate()); + } + + public VileAggregate(UUID ownerId) { + super(ownerId, 137, "Vile Aggregate", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Drone"); + this.power = new MageInt(0); + this.toughness = new MageInt(5); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + // Vile Aggregate's power is equal to the number of colorless creatures you control. + Effect effect = new SetPowerSourceEffect(new PermanentsOnBattlefieldCount(filter), Duration.EndOfGame); + this.addAbility(new SimpleStaticAbility(Zone.ALL, effect)); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + // Ingest + this.addAbility(new IngestAbility()); + } + + public VileAggregate(final VileAggregate card) { + super(card); + } + + @Override + public VileAggregate copy() { + return new VileAggregate(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/VoidAttendant.java b/Mage.Sets/src/mage/sets/battleforzendikar/VoidAttendant.java new file mode 100644 index 00000000000..44baa72841d --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/VoidAttendant.java @@ -0,0 +1,79 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.ExileOpponentsCardFromExileToGraveyardCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.permanent.token.EldraziScionToken; + +/** + * + * @author LevelX2 + */ +public class VoidAttendant extends CardImpl { + + public VoidAttendant(UUID ownerId) { + super(ownerId, 169, "Void Attendant", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Processor"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + + // {1}{G}, Put a card an opponent owns from exile into that player's graveyard: Put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." + Effect effect = new CreateTokenEffect(new EldraziScionToken()); + effect.setText("put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has \"Sacrifice this creature: Add {1} to your mana pool.\""); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{1}{G}")); + ability.addCost(new ExileOpponentsCardFromExileToGraveyardCost(true)); + this.addAbility(ability); + + } + + public VoidAttendant(final VoidAttendant card) { + super(card); + } + + @Override + public VoidAttendant copy() { + return new VoidAttendant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/VoidWinnower.java b/Mage.Sets/src/mage/sets/battleforzendikar/VoidWinnower.java new file mode 100644 index 00000000000..f76974193ac --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/VoidWinnower.java @@ -0,0 +1,156 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; +import mage.abilities.effects.RestrictionEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; + +/** + * + * @author LevelX2 + */ +public class VoidWinnower extends CardImpl { + + public VoidWinnower(UUID ownerId) { + super(ownerId, 17, "Void Winnower", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{9}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + + this.power = new MageInt(11); + this.toughness = new MageInt(9); + + // Your opponent can't cast spells with even converted mana costs. (Zero is even.) + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new VoidWinnowerCantCastEffect())); + + // Your opponents can't block with creatures with even converted mana costs. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new VoidWinnowerCantBlockEffect())); + } + + public VoidWinnower(final VoidWinnower card) { + super(card); + } + + @Override + public VoidWinnower copy() { + return new VoidWinnower(this); + } +} + +class VoidWinnowerCantCastEffect extends ContinuousRuleModifyingEffectImpl { + + public VoidWinnowerCantCastEffect() { + super(Duration.WhileOnBattlefield, Outcome.Benefit); + staticText = "Your opponent can't cast spells with even converted mana costs. (Zero is even.)"; + } + + public VoidWinnowerCantCastEffect(final VoidWinnowerCantCastEffect effect) { + super(effect); + } + + @Override + public VoidWinnowerCantCastEffect copy() { + return new VoidWinnowerCantCastEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public String getInfoMessage(Ability source, GameEvent event, Game game) { + MageObject mageObject = game.getObject(source.getSourceId()); + if (mageObject != null) { + return "You can't cast spells with even converted mana costs (" + mageObject.getIdName() + ")."; + } + return null; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == EventType.CAST_SPELL; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) { + MageObject object = game.getObject(event.getSourceId()); + if (object != null) { + // the low bit will always be set on an odd number. + return (object.getManaCost().convertedManaCost() & 1) == 0; + } + } + return false; + } +} + +class VoidWinnowerCantBlockEffect extends RestrictionEffect { + + public VoidWinnowerCantBlockEffect() { + super(Duration.WhileOnBattlefield); + staticText = "Your opponents can't block with creatures with even converted mana costs"; + } + + public VoidWinnowerCantBlockEffect(final VoidWinnowerCantBlockEffect effect) { + super(effect); + } + + @Override + public VoidWinnowerCantBlockEffect copy() { + return new VoidWinnowerCantBlockEffect(this); + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + if (game.getOpponents(source.getControllerId()).contains(permanent.getControllerId())) { + // the low bit will always be set on an odd number. + return (permanent.getManaCost().convertedManaCost() & 1) == 0; + } + return false; + } + + @Override + public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/VolcanicUpheaval.java b/Mage.Sets/src/mage/sets/battleforzendikar/VolcanicUpheaval.java new file mode 100644 index 00000000000..dfb56c8fb84 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/VolcanicUpheaval.java @@ -0,0 +1,61 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author LevelX2 + */ +public class VolcanicUpheaval extends CardImpl { + + public VolcanicUpheaval(UUID ownerId) { + super(ownerId, 161, "Volcanic Upheaval", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{3}{R}"); + this.expansionSetCode = "BFZ"; + + // Destroy target land. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetLandPermanent()); + + } + + public VolcanicUpheaval(final VolcanicUpheaval card) { + super(card); + } + + @Override + public VolcanicUpheaval copy() { + return new VolcanicUpheaval(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/VoraciousNull.java b/Mage.Sets/src/mage/sets/battleforzendikar/VoraciousNull.java new file mode 100644 index 00000000000..e8ddb52479b --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/VoraciousNull.java @@ -0,0 +1,79 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class VoraciousNull extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature"); + + static { + filter.add(new AnotherPredicate()); + } + + public VoraciousNull(UUID ownerId) { + super(ownerId, 125, "Voracious Null", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Zombie"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {1}{B}, Sacrifice another creature: Put two +1/+1 counters on Voracious Null. Activate this ability only any time you could cast a sorcery. + Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), new ManaCostsImpl("{1}{B}")); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, false))); + this.addAbility(ability); + } + + public VoraciousNull(final VoraciousNull card) { + super(card); + } + + @Override + public VoraciousNull copy() { + return new VoraciousNull(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/WastelandStrangler.java b/Mage.Sets/src/mage/sets/battleforzendikar/WastelandStrangler.java new file mode 100644 index 00000000000..739f0d27721 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/WastelandStrangler.java @@ -0,0 +1,76 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.common.ExileOpponentsCardFromExileToGraveyardCost; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class WastelandStrangler extends CardImpl { + + public WastelandStrangler(UUID ownerId) { + super(ownerId, 102, "Wasteland Strangler", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Eldrazi"); + this.subtype.add("Processor"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + + // When Wasteland Strangler enters the battlefield, you may put a card an opponent owns from exile into that player's graveyard. If you do, target creature gets -3/-3 until end of turn. + Ability ability = new EntersBattlefieldTriggeredAbility( + new DoIfCostPaid(new BoostTargetEffect(-3, -3, Duration.EndOfTurn), new ExileOpponentsCardFromExileToGraveyardCost(true)), true); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public WastelandStrangler(final WastelandStrangler card) { + super(card); + } + + @Override + public WastelandStrangler copy() { + return new WastelandStrangler(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/WaveWingElemental.java b/Mage.Sets/src/mage/sets/battleforzendikar/WaveWingElemental.java new file mode 100644 index 00000000000..6baccf24d65 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/WaveWingElemental.java @@ -0,0 +1,68 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.LandfallAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class WaveWingElemental extends CardImpl { + + public WaveWingElemental(UUID ownerId) { + super(ownerId, 88, "Wave-Wing Elemental", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{5}{U}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Elemental"); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Landfall — Whenever a land enters the battlefield under your control, Wave-Wing Elemental gets +2/+2 until end of turn. + this.addAbility(new LandfallAbility(new BoostSourceEffect(2, 2, Duration.EndOfTurn), false)); + + } + + public WaveWingElemental(final WaveWingElemental card) { + super(card); + } + + @Override + public WaveWingElemental copy() { + return new WaveWingElemental(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/WindriderPatrol.java b/Mage.Sets/src/mage/sets/battleforzendikar/WindriderPatrol.java new file mode 100644 index 00000000000..bde6805b885 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/WindriderPatrol.java @@ -0,0 +1,67 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.keyword.ScryEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class WindriderPatrol extends CardImpl { + + public WindriderPatrol(UUID ownerId) { + super(ownerId, 89, "Windrider Patrol", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Merfolk"); + this.subtype.add("Wizard"); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Whenever Windrider Patrol deals combat damage to a player, scry 2. + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new ScryEffect(2), false)); + } + + public WindriderPatrol(final WindriderPatrol card) { + super(card); + } + + @Override + public WindriderPatrol copy() { + return new WindriderPatrol(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/WoodlandWanderer.java b/Mage.Sets/src/mage/sets/battleforzendikar/WoodlandWanderer.java new file mode 100644 index 00000000000..5fa4a7be4c8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/WoodlandWanderer.java @@ -0,0 +1,73 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.dynamicvalue.common.ColorsOfManaSpentToCastCount; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; + +/** + * + * @author LevelX2 + */ +public class WoodlandWanderer extends CardImpl { + + public WoodlandWanderer(UUID ownerId) { + super(ownerId, 198, "Woodland Wanderer", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Elemental"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + // Trample + this.addAbility(TrampleAbility.getInstance()); + // Converge - Woodland Wanderer enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it. + this.addAbility(new EntersBattlefieldAbility( + new AddCountersSourceEffect(CounterType.P1P1.createInstance(), ColorsOfManaSpentToCastCount.getInstance(), true), + null, true, "Converge — {this} enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it.", null)); + } + + public WoodlandWanderer(final WoodlandWanderer card) { + super(card); + } + + @Override + public WoodlandWanderer copy() { + return new WoodlandWanderer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/ZadaHedronGrinder.java b/Mage.Sets/src/mage/sets/battleforzendikar/ZadaHedronGrinder.java new file mode 100644 index 00000000000..2e2648a2024 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/ZadaHedronGrinder.java @@ -0,0 +1,195 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.game.stack.Spell; +import mage.players.Player; +import mage.target.Target; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author LevelX2 + */ +public class ZadaHedronGrinder extends CardImpl { + + public ZadaHedronGrinder(UUID ownerId) { + super(ownerId, 162, "Zada, Hedron Grinder", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.expansionSetCode = "BFZ"; + this.supertype.add("Legendary"); + this.subtype.add("Goblin"); + this.subtype.add("Ally"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Whenever you cast an instant or sorcery spell that targets only Zada, Hedron Grinder, copy that spell for each other creature you control that the spell could target. Each copy targets a different one of those creatures. + this.addAbility(new ZadaHedronGrinderTriggeredAbility()); + + } + + public ZadaHedronGrinder(final ZadaHedronGrinder card) { + super(card); + } + + @Override + public ZadaHedronGrinder copy() { + return new ZadaHedronGrinder(this); + } +} + +class ZadaHedronGrinderTriggeredAbility extends TriggeredAbilityImpl { + + ZadaHedronGrinderTriggeredAbility() { + super(Zone.BATTLEFIELD, new ZadaHedronGrinderEffect(), false); + } + + ZadaHedronGrinderTriggeredAbility(final ZadaHedronGrinderTriggeredAbility ability) { + super(ability); + } + + @Override + public ZadaHedronGrinderTriggeredAbility copy() { + return new ZadaHedronGrinderTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.SPELL_CAST; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getPlayerId().equals(this.getControllerId())) { + Spell spell = game.getStack().getSpell(event.getTargetId()); + if (isControlledInstantOrSorcery(spell)) { + boolean targetsSource = false; + for (Target target : spell.getSpellAbility().getTargets()) { + for (UUID targetId : target.getTargets()) { + if (targetId.equals(getSourceId())) { + targetsSource = true; + } else { + return false; + } + } + } + if (targetsSource) { + this.getEffects().get(0).setTargetPointer(new FixedTarget(spell.getId())); + return true; + } + } + } + return false; + } + + private boolean isControlledInstantOrSorcery(Spell spell) { + return spell != null + && (spell.getControllerId().equals(this.getControllerId())) + && (spell.getCardType().contains(CardType.INSTANT) || spell.getCardType().contains(CardType.SORCERY)); + } + + @Override + public String getRule() { + return "Whenever you cast an instant or sorcery spell that targets only {this}, copy that spell for each other creature you control that the spell could target. Each copy targets a different one of those creatures."; + } +} + +class ZadaHedronGrinderEffect extends OneShotEffect { + + public ZadaHedronGrinderEffect() { + super(Outcome.Detriment); + this.staticText = "copy that spell for each other creature you control that the spell could target. Each copy targets a different one of those creatures"; + } + + public ZadaHedronGrinderEffect(final ZadaHedronGrinderEffect effect) { + super(effect); + } + + @Override + public ZadaHedronGrinderEffect copy() { + return new ZadaHedronGrinderEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source)); + if (spell == null) { + spell = (Spell) game.getLastKnownInformation(targetPointer.getFirst(game, source), Zone.STACK); + } + Player controller = game.getPlayer(source.getControllerId()); + if (spell != null && controller != null) { + Target usedTarget = null; + for (Target target : spell.getSpellAbility().getTargets()) { + if (target.getFirstTarget().equals(source.getSourceId())) { + usedTarget = target.copy(); + usedTarget.clearChosen(); + } + } + if (usedTarget == null) { + return false; + } + for (Permanent creature : game.getState().getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), game)) { + if (!creature.getId().equals(source.getSourceId()) && usedTarget.canTarget(source.getControllerId(), creature.getId(), source, game)) { + Spell copy = spell.copySpell(); + for (Target target : spell.getSpellAbility().getTargets()) { + if (target.getClass().equals(usedTarget.getClass()) && target.getMessage().equals(usedTarget.getMessage())) { + target.clearChosen(); + target.add(creature.getId(), game); + break; + } + } + copy.setControllerId(source.getControllerId()); + copy.setCopiedSpell(true); + game.getStack().push(copy); + String activateMessage = copy.getActivatedMessage(game); + if (activateMessage.startsWith(" casts ")) { + activateMessage = activateMessage.substring(6); + } + if (!game.isSimulation()) { + game.informPlayers(controller.getLogName() + activateMessage); + } + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/ZulaportCutthroat.java b/Mage.Sets/src/mage/sets/battleforzendikar/ZulaportCutthroat.java new file mode 100644 index 00000000000..0264a61edf6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/ZulaportCutthroat.java @@ -0,0 +1,82 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesThisOrAnotherCreatureTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.LoseLifeOpponentsEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author LevelX2 + */ +public class ZulaportCutthroat extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you control"); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public ZulaportCutthroat(UUID ownerId) { + super(ownerId, 126, "Zulaport Cutthroat", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Human"); + this.subtype.add("Rogue"); + this.subtype.add("Ally"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Whenever Zulaport Cutthroat or another creature you control dies, each opponent loses 1 life and you gain 1 life. + Ability ability = new DiesThisOrAnotherCreatureTriggeredAbility(new LoseLifeOpponentsEffect(1), false, filter); + Effect effect = new GainLifeEffect(1); + effect.setText("and you gain 1 life"); + ability.addEffect(effect); + this.addAbility(ability); + + } + + public ZulaportCutthroat(final ZulaportCutthroat card) { + super(card); + } + + @Override + public ZulaportCutthroat copy() { + return new ZulaportCutthroat(this); + } +} diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/Floodbringer.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/Floodbringer.java index fa8a52c1232..cc2eab2da77 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/Floodbringer.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/Floodbringer.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.TapTargetEffect; import mage.abilities.keyword.FlyingAbility; @@ -64,7 +64,7 @@ public class Floodbringer extends CardImpl { // {2}, Return a land you control to its owner's hand: Tap target land. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new GenericManaCost(2)); - ReturnToHandTargetPermanentCost cost = new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)); + ReturnToHandChosenControlledPermanentCost cost = new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)); cost.setText("Return a land you control to its owner's hand"); ability.addCost(cost); ability.addTarget(new TargetLandPermanent()); diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/FumikoTheLowblood.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/FumikoTheLowblood.java index aa93e4cf8d5..02af73fe030 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/FumikoTheLowblood.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/FumikoTheLowblood.java @@ -40,6 +40,7 @@ import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; +import mage.watchers.common.AttackedThisTurnWatcher; /** * @@ -63,7 +64,7 @@ public class FumikoTheLowblood extends CardImpl { // Creatures your opponents control attack each turn if able. FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures your opponents control"); filter.add(new ControllerPredicate(TargetController.OPPONENT)); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AttacksIfAbleAllEffect(filter))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AttacksIfAbleAllEffect(filter)), new AttackedThisTurnWatcher()); } diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/GoryosVengeance.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/GoryosVengeance.java index 87999170a71..c30dfb512fe 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/GoryosVengeance.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/GoryosVengeance.java @@ -70,7 +70,6 @@ public class GoryosVengeance extends CardImpl { this.expansionSetCode = "BOK"; this.subtype.add("Arcane"); - // Return target legendary creature card from your graveyard to the battlefield. That creature gains haste. Exile it at the beginning of the next end step. this.getSpellAbility().addEffect(new GoryosVengeanceEffect()); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter)); @@ -119,8 +118,8 @@ class GoryosVengeanceEffect extends OneShotEffect { effect.setTargetPointer(new FixedTarget(permanent.getId())); game.addEffect(effect, source); // Exile it at end of turn - Effect exileEffect = new ExileTargetEffect(new StringBuilder("Exile ").append(permanent.getName()).append(" at the beginning of the next end step").toString()); - exileEffect.setTargetPointer(new FixedTarget(card.getId())); + Effect exileEffect = new ExileTargetEffect("Exile " + permanent.getName() + " at the beginning of the next end step"); + exileEffect.setTargetPointer(new FixedTarget(permanent, game)); DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect); delayedAbility.setSourceId(source.getSourceId()); delayedAbility.setControllerId(source.getControllerId()); diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/SoratamiMindsweeper.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/SoratamiMindsweeper.java index 141dfacf5e8..d3905fda60b 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/SoratamiMindsweeper.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/SoratamiMindsweeper.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; import mage.abilities.keyword.FlyingAbility; @@ -66,7 +66,7 @@ public class SoratamiMindsweeper extends CardImpl { // {2}, Return a land you control to its owner's hand: Target player puts the top two cards of his or her library into his or her graveyard. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,new PutLibraryIntoGraveTargetEffect(2), new ManaCostsImpl("{2}")); ability.addTarget(new TargetPlayer()); - ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))); + ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/VeilOfSecrecy.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/VeilOfSecrecy.java index c0184c3793c..7b4c81b3575 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/VeilOfSecrecy.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/VeilOfSecrecy.java @@ -29,7 +29,7 @@ package mage.sets.betrayersofkamigawa; import java.util.UUID; import mage.ObjectColor; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.Effect; import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; @@ -71,7 +71,7 @@ public class VeilOfSecrecy extends CardImpl { this.getSpellAbility().addEffect(effect); // Splice onto Arcane-Return a blue creature you control to its owner's hand. - this.addAbility(new SpliceOntoArcaneAbility(new ReturnToHandTargetPermanentCost(new TargetControlledCreaturePermanent(filter)))); + this.addAbility(new SpliceOntoArcaneAbility(new ReturnToHandChosenControlledPermanentCost(new TargetControlledCreaturePermanent(filter)))); } public VeilOfSecrecy(final VeilOfSecrecy card) { diff --git a/Mage.Sets/src/mage/sets/bornofthegods/AstralCornucopia.java b/Mage.Sets/src/mage/sets/bornofthegods/AstralCornucopia.java index d371e9adcc1..6d57185c284 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/AstralCornucopia.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/AstralCornucopia.java @@ -31,17 +31,14 @@ import java.util.List; import java.util.UUID; import mage.Mana; import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.EntersBattlefieldEffect; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.abilities.effects.common.ManaEffect; import mage.abilities.mana.ManaAbility; import mage.cards.CardImpl; import mage.choices.ChoiceColor; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; import mage.counters.CounterType; @@ -60,7 +57,7 @@ public class AstralCornucopia extends CardImpl { this.expansionSetCode = "BNG"; // Astral Cornucopia enters the battlefield with X charge counters on it. - this.addAbility(new EntersBattlefieldAbility(new AstralCornucopiaEffect(), "with X charge counters on it")); + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.CHARGE.createInstance()))); // {T}: Choose a color. Add one mana of that color to your mana pool for each charge counter on Astral Cornucopia. this.addAbility(new AstralCornucopiaManaAbility()); @@ -76,39 +73,6 @@ public class AstralCornucopia extends CardImpl { } } -class AstralCornucopiaEffect extends OneShotEffect { - - public AstralCornucopiaEffect() { - super(Outcome.Benefit); - } - - public AstralCornucopiaEffect(final AstralCornucopiaEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (spellAbility != null - && spellAbility.getSourceId().equals(source.getSourceId()) - && permanent.getZoneChangeCounter(game) - 1 == spellAbility.getSourceObjectZoneChangeCounter()) { - int amount = spellAbility.getManaCostsToPay().getX(); - if (amount > 0) { - permanent.addCounters(CounterType.CHARGE.createInstance(amount), game); - } - } - } - return true; - } - - @Override - public AstralCornucopiaEffect copy() { - return new AstralCornucopiaEffect(this); - } -} - class AstralCornucopiaManaAbility extends ManaAbility { public AstralCornucopiaManaAbility() { diff --git a/Mage.Sets/src/mage/sets/bornofthegods/FloodtideSerpent.java b/Mage.Sets/src/mage/sets/bornofthegods/FloodtideSerpent.java index 0fcebf1fd79..16e5cd91835 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/FloodtideSerpent.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/FloodtideSerpent.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.PayCostToAttackBlockEffectImpl; import mage.abilities.effects.ReplacementEffectImpl; import mage.abilities.effects.common.combat.CantAttackBlockUnlessPaysSourceEffect; @@ -71,7 +71,7 @@ public class FloodtideSerpent extends CardImpl { // Floodtide Serpent can't attack unless you return an enchantment you control to its owner's hand (This cost is paid as attackers are declared.) this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackBlockUnlessPaysSourceEffect( - new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)), PayCostToAttackBlockEffectImpl.RestrictType.ATTACK))); + new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)), PayCostToAttackBlockEffectImpl.RestrictType.ATTACK))); } @@ -106,7 +106,7 @@ class FloodtideSerpentReplacementEffect extends ReplacementEffectImpl { public boolean replaceEvent(GameEvent event, Ability source, Game game) { Player player = game.getPlayer(event.getPlayerId()); if (player != null) { - ReturnToHandTargetPermanentCost attackCost = new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)); + ReturnToHandChosenControlledPermanentCost attackCost = new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)); if (attackCost.canPay(source, source.getSourceId(), event.getPlayerId(), game) && player.chooseUse(Outcome.Neutral, "Return an enchantment you control to hand to attack?", source, game)) { if (attackCost.pay(source, game, source.getSourceId(), event.getPlayerId(), true)) { diff --git a/Mage.Sets/src/mage/sets/bornofthegods/Mindreaver.java b/Mage.Sets/src/mage/sets/bornofthegods/Mindreaver.java index 231854d0afb..c5df6d378d0 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/Mindreaver.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/Mindreaver.java @@ -58,8 +58,8 @@ import mage.target.TargetSpell; import mage.util.CardUtil; /** - import mage.constants.Outcome; -* + * import mage.constants.Outcome; + * * @author LevelX2 */ public class Mindreaver extends CardImpl { @@ -77,10 +77,10 @@ public class Mindreaver extends CardImpl { Ability ability = new HeroicAbility(new MindreaverExileEffect(), false); ability.addTarget(new TargetPlayer()); this.addAbility(ability); - - // {U}{U}, Sacrifice Mindreaver: Counter target spell with the same name as a card exiled with mindreaver. + + // {U}{U}, Sacrifice Mindreaver: Counter target spell with the same name as a card exiled with Mindreaver. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterTargetEffect(), new ManaCostsImpl("{U}{U}")); - FilterSpell filter = new FilterSpell("spell with the same name as a card exiled with mindreaver"); + FilterSpell filter = new FilterSpell("spell with the same name as a card exiled with {this}"); filter.add(new MindreaverNamePredicate(this.getId())); ability.addTarget(new TargetSpell(filter)); ability.addCost(new SacrificeSourceCost()); @@ -116,12 +116,13 @@ class MindreaverExileEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { UUID exileId = CardUtil.getCardExileZoneId(game, source); + MageObject sourceObject = source.getSourceObject(game); Player opponent = game.getPlayer(this.getTargetPointer().getFirst(game, source)); - if (opponent != null) { + if (opponent != null && sourceObject != null) { for (int i = 0; i < 3; i++) { Card card = opponent.getLibrary().getFromTop(game); if (card != null) { - card.moveToExile(exileId, "Mindreaver", source.getSourceId(), game); + card.moveToExile(exileId, sourceObject.getIdName(), source.getSourceId(), game); } } } @@ -130,29 +131,29 @@ class MindreaverExileEffect extends OneShotEffect { } class MindreaverNamePredicate implements Predicate { - + private final UUID sourceId; - + public MindreaverNamePredicate(UUID sourceId) { this.sourceId = sourceId; } - + @Override public boolean apply(MageObject input, Game game) { Set cardNames = new HashSet(); UUID exileId = CardUtil.getCardExileZoneId(game, sourceId); ExileZone exileZone = game.getExile().getExileZone(exileId); if (exileZone != null) { - for(Card card : exileZone.getCards(game)) { + for (Card card : exileZone.getCards(game)) { cardNames.add(card.getName()); } } - // If a player names a card, the player may name either half of a split card, but not both. + // If a player names a card, the player may name either half of a split card, but not both. // A split card has the chosen name if one of its two names matches the chosen name. if (input instanceof SplitCard) { - return cardNames.contains(((SplitCard)input).getLeftHalfCard().getName()) || cardNames.contains(((SplitCard)input).getRightHalfCard().getName()); - } else if (input instanceof Spell && ((Spell)input).getSpellAbility().getSpellAbilityType().equals(SpellAbilityType.SPLIT_FUSED)){ - SplitCard card = (SplitCard) ((Spell)input).getCard(); + return cardNames.contains(((SplitCard) input).getLeftHalfCard().getName()) || cardNames.contains(((SplitCard) input).getRightHalfCard().getName()); + } else if (input instanceof Spell && ((Spell) input).getSpellAbility().getSpellAbilityType().equals(SpellAbilityType.SPLIT_FUSED)) { + SplitCard card = (SplitCard) ((Spell) input).getCard(); return cardNames.contains(card.getLeftHalfCard().getName()) || cardNames.contains(card.getRightHalfCard().getName()); } else { return cardNames.contains(input.getName()); @@ -163,4 +164,4 @@ class MindreaverNamePredicate implements Predicate { public String toString() { return "spell with the same name as a card exiled with {source}"; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/bornofthegods/RaisedByWolves.java b/Mage.Sets/src/mage/sets/bornofthegods/RaisedByWolves.java index 9ae5c235150..d0f51973bd3 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/RaisedByWolves.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/RaisedByWolves.java @@ -28,7 +28,6 @@ package mage.sets.bornofthegods; import java.util.UUID; -import mage.MageInt; import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -47,7 +46,7 @@ import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.WolfToken; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -92,16 +91,3 @@ public class RaisedByWolves extends CardImpl { return new RaisedByWolves(this); } } - -class WolfToken extends Token { - - public WolfToken() { - super("Wolf", "2/2 green Wolf creature token"); - this.setOriginalExpansionSetCode("BNG"); - cardType.add(CardType.CREATURE); - color.setGreen(true); - subtype.add("Wolf"); - power = new MageInt(2); - toughness = new MageInt(2); - } -} diff --git a/Mage.Sets/src/mage/sets/bornofthegods/SatyrNyxSmith.java b/Mage.Sets/src/mage/sets/bornofthegods/SatyrNyxSmith.java index 0c39cbb9c97..79f54d94c8f 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/SatyrNyxSmith.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/SatyrNyxSmith.java @@ -29,7 +29,6 @@ package mage.sets.bornofthegods; import java.util.UUID; import mage.MageInt; -import mage.ObjectColor; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.DoIfCostPaid; diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/MelokuTheCloudedMirror.java b/Mage.Sets/src/mage/sets/championsofkamigawa/MelokuTheCloudedMirror.java index d4e8b1e5690..f1678c2c14c 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/MelokuTheCloudedMirror.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/MelokuTheCloudedMirror.java @@ -35,7 +35,7 @@ import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.FlyingAbility; @@ -66,7 +66,7 @@ public class MelokuTheCloudedMirror extends CardImpl { // {1}, Return a land you control to its owner's hand: Put a 1/1 blue Illusion creature token with flying onto the battlefield. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new MelokuTheCloudedMirrorToken(), 1), new GenericManaCost(1)); - ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))); + ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/OrochiHatchery.java b/Mage.Sets/src/mage/sets/championsofkamigawa/OrochiHatchery.java index 1e2e16c7413..ca6ed57092f 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/OrochiHatchery.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/OrochiHatchery.java @@ -29,23 +29,18 @@ package mage.sets.championsofkamigawa; import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.dynamicvalue.common.CountersCount; -import mage.abilities.effects.EntersBattlefieldEffect; -import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; import mage.counters.CounterType; -import mage.game.Game; -import mage.game.permanent.Permanent; import mage.game.permanent.token.SnakeToken; /** @@ -58,7 +53,7 @@ public class OrochiHatchery extends CardImpl { this.expansionSetCode = "CHK"; // Orochi Hatchery enters the battlefield with X charge counters on it. - this.addAbility(new EntersBattlefieldAbility(new OrochiHatcheryEffect(), "with X charge counters on it")); + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.CHARGE.createInstance()))); // {5}, {T}: Put a 1/1 green Snake creature token onto the battlefield for each charge counter on Orochi Hatchery. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SnakeToken(), new CountersCount(CounterType.CHARGE)), new GenericManaCost(5)); @@ -76,36 +71,3 @@ public class OrochiHatchery extends CardImpl { } } - -class OrochiHatcheryEffect extends OneShotEffect { - - public OrochiHatcheryEffect() { - super(Outcome.Benefit); - } - - public OrochiHatcheryEffect(final OrochiHatcheryEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (spellAbility != null - && spellAbility.getSourceId().equals(source.getSourceId()) - && permanent.getZoneChangeCounter(game) - 1 == spellAbility.getSourceObjectZoneChangeCounter()) { - int amount = spellAbility.getManaCostsToPay().getX(); - if (amount > 0) { - permanent.addCounters(CounterType.CHARGE.createInstance(amount), game); - } - } - } - return true; - } - - @Override - public OrochiHatcheryEffect copy() { - return new OrochiHatcheryEffect(this); - } -} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/SoratamiCloudskater.java b/Mage.Sets/src/mage/sets/championsofkamigawa/SoratamiCloudskater.java index bbcd6a5665e..4832aa5cd82 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/SoratamiCloudskater.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/SoratamiCloudskater.java @@ -25,21 +25,20 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.championsofkamigawa; 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.common.SimpleActivatedAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledPermanent; import mage.target.common.TargetControlledPermanent; @@ -65,7 +64,7 @@ public class SoratamiCloudskater extends CardImpl { // {2}, Return a land you control to its owner's hand: Draw a card, then discard a card. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawDiscardControllerEffect(), new GenericManaCost(2)); - ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))); + ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(1, 1, filter, true))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/SoratamiMirrorGuard.java b/Mage.Sets/src/mage/sets/championsofkamigawa/SoratamiMirrorGuard.java index c429582b1d1..f06f9b1ef96 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/SoratamiMirrorGuard.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/SoratamiMirrorGuard.java @@ -35,7 +35,7 @@ import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; import mage.abilities.keyword.FlyingAbility; @@ -74,7 +74,7 @@ public class SoratamiMirrorGuard extends CardImpl { // {2}, Return a land you control to its owner's hand: Target creature with power 2 or less can't be blocked this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(), new GenericManaCost(2)); - ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))); + ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))); ability.addTarget(new TargetCreaturePermanent(filterCreature)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/SoratamiMirrorMage.java b/Mage.Sets/src/mage/sets/championsofkamigawa/SoratamiMirrorMage.java index 458fdc8a00c..e93013bedc7 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/SoratamiMirrorMage.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/SoratamiMirrorMage.java @@ -25,21 +25,20 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.championsofkamigawa; 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.common.SimpleActivatedAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledPermanent; import mage.target.common.TargetControlledPermanent; @@ -66,7 +65,7 @@ public class SoratamiMirrorMage extends CardImpl { // {3}, Return three lands you control to their owner's hand: Return target creature to its owner's hand. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new GenericManaCost(3)); - ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(3, 3, filter, false))); + ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(3, 3, filter, true))); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/SoratamiRainshaper.java b/Mage.Sets/src/mage/sets/championsofkamigawa/SoratamiRainshaper.java index 7f32cbe86db..3d0e59bc518 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/SoratamiRainshaper.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/SoratamiRainshaper.java @@ -35,7 +35,7 @@ import mage.constants.Rarity; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.keyword.FlyingAbility; @@ -69,7 +69,7 @@ public class SoratamiRainshaper extends CardImpl { // {3}, Return a land you control to its owner's hand: Target creature you control gains shroud until end of turn. (It can't be the target of spells or abilities.) Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(ShroudAbility.getInstance(), Duration.EndOfTurn), new GenericManaCost(3)); - ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))); + ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))); ability.addTarget(new TargetControlledCreaturePermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/SoratamiSavant.java b/Mage.Sets/src/mage/sets/championsofkamigawa/SoratamiSavant.java index 1060fdd8b36..9d479f7d85e 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/SoratamiSavant.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/SoratamiSavant.java @@ -35,7 +35,7 @@ import mage.constants.Rarity; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.CounterUnlessPaysEffect; import mage.abilities.keyword.FlyingAbility; @@ -67,7 +67,7 @@ public class SoratamiSavant extends CardImpl { // {3}, Return a land you control to its owner's hand: Counter target spell unless its controller pays {3}. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterUnlessPaysEffect(new GenericManaCost(3)), new GenericManaCost(3)); - ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))); + ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))); ability.addTarget(new TargetSpell()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/SoratamiSeer.java b/Mage.Sets/src/mage/sets/championsofkamigawa/SoratamiSeer.java index 344923e03db..9887cb743b1 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/SoratamiSeer.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/SoratamiSeer.java @@ -36,7 +36,7 @@ import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.FlyingAbility; @@ -70,7 +70,7 @@ public class SoratamiSeer extends CardImpl { // {4}, Return two lands you control to their owner's hand: Discard all the cards in your hand, then draw that many cards. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SoratamiSeerEffect(), new GenericManaCost(4)); - ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(2, 2, filter, false))); + ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(2, 2, filter, false))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/UyoSilentProphet.java b/Mage.Sets/src/mage/sets/championsofkamigawa/UyoSilentProphet.java index 9b0b414d4ae..e3f4928b4fa 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/UyoSilentProphet.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/UyoSilentProphet.java @@ -34,7 +34,7 @@ import mage.constants.Rarity; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.CopyTargetSpellEffect; import mage.abilities.keyword.FlyingAbility; @@ -75,7 +75,7 @@ public class UyoSilentProphet extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // {2}, Return two lands you control to their owner's hand: Copy target instant or sorcery spell. You may choose new targets for the copy. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetSpellEffect(), new GenericManaCost(2)); - ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(2, 2, new FilterControlledLandPermanent("lands"), false))); + ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(2, 2, new FilterControlledLandPermanent("lands"), false))); ability.addTarget(new TargetSpell(filter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/commander/AvatarOfSlaughter.java b/Mage.Sets/src/mage/sets/commander/AvatarOfSlaughter.java index bfe50914d20..da89c528bdd 100644 --- a/Mage.Sets/src/mage/sets/commander/AvatarOfSlaughter.java +++ b/Mage.Sets/src/mage/sets/commander/AvatarOfSlaughter.java @@ -41,6 +41,7 @@ import mage.constants.Duration; import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; +import mage.watchers.common.AttackedThisTurnWatcher; /** * @@ -62,7 +63,7 @@ public class AvatarOfSlaughter extends CardImpl { effect = new AttacksIfAbleAllEffect(new FilterCreaturePermanent("creatures")); effect.setText("and attack each turn if able"); ability.addEffect(effect); - this.addAbility(ability); + this.addAbility(ability, new AttackedThisTurnWatcher()); } public AvatarOfSlaughter(final AvatarOfSlaughter card) { diff --git a/Mage.Sets/src/mage/sets/commander2013/HullBreach.java b/Mage.Sets/src/mage/sets/commander2013/HullBreach.java index d6a51a65743..0ab48a04ed8 100644 --- a/Mage.Sets/src/mage/sets/commander2013/HullBreach.java +++ b/Mage.Sets/src/mage/sets/commander2013/HullBreach.java @@ -38,7 +38,7 @@ import mage.filter.common.FilterEnchantmentPermanent; import mage.target.Target; import mage.target.TargetPermanent; import mage.target.common.TargetArtifactPermanent; -import mage.target.targetpointer.SecondTargetPointer; +import mage.target.common.TargetEnchantmentPermanent; /** * @@ -62,12 +62,11 @@ public class HullBreach extends CardImpl { this.getSpellAbility().addMode(mode); // or destroy target artifact and target enchantment. mode = new Mode(); - Effect effect = new DestroyTargetEffect(); - effect.setTargetPointer(new SecondTargetPointer()); + Effect effect = new DestroyTargetEffect(false, true); effect.setText("destroy target artifact and target enchantment"); mode.getEffects().add(effect); mode.getTargets().add(new TargetArtifactPermanent()); - mode.getTargets().add(new TargetPermanent(new FilterEnchantmentPermanent())); + mode.getTargets().add(new TargetEnchantmentPermanent()); this.getSpellAbility().addMode(mode); } diff --git a/Mage.Sets/src/mage/sets/commander2013/NayaSoulbeast.java b/Mage.Sets/src/mage/sets/commander2013/NayaSoulbeast.java index a858e59187f..b375229ce70 100644 --- a/Mage.Sets/src/mage/sets/commander2013/NayaSoulbeast.java +++ b/Mage.Sets/src/mage/sets/commander2013/NayaSoulbeast.java @@ -104,7 +104,7 @@ class NayaSoulbeastCastEffect extends OneShotEffect { MageObject sourceObject = source.getSourceObject(game); if (controller != null && sourceObject != null) { int cmc = 0; - for (UUID playerId :controller.getInRange()) { + for (UUID playerId : controller.getInRange()) { Player player = game.getPlayer(playerId); if (player != null) { if (player.getLibrary().size() > 0) { @@ -137,12 +137,12 @@ class NayaSoulbeastReplacementEffect extends ReplacementEffectImpl { public NayaSoulbeastReplacementEffect(final NayaSoulbeastReplacementEffect effect) { super(effect); } - + @Override public boolean checksEventType(GameEvent event, Game game) { return event.getType() == EventType.ENTERS_THE_BATTLEFIELD; } - + @Override public boolean applies(GameEvent event, Ability source, Game game) { return event.getTargetId().equals(source.getSourceId()); @@ -152,7 +152,7 @@ class NayaSoulbeastReplacementEffect extends ReplacementEffectImpl { public boolean replaceEvent(GameEvent event, Ability source, Game game) { Object object = this.getValue("NayaSoulbeastCounters"); if (object instanceof Integer) { - int amount = ((Integer)object); + int amount = ((Integer) object); new AddCountersSourceEffect(CounterType.P1P1.createInstance(amount)).apply(game, source); } return false; diff --git a/Mage.Sets/src/mage/sets/commander2013/SpringjackPasture.java b/Mage.Sets/src/mage/sets/commander2013/SpringjackPasture.java index 8fafdc13ef2..d4873e2dd16 100644 --- a/Mage.Sets/src/mage/sets/commander2013/SpringjackPasture.java +++ b/Mage.Sets/src/mage/sets/commander2013/SpringjackPasture.java @@ -50,7 +50,7 @@ import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.Game; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.GoatToken; import mage.players.Player; /** @@ -136,17 +136,3 @@ class SpringjackPastureEffect extends OneShotEffect { return new SpringjackPastureEffect(this); } } - -class GoatToken extends Token { - - public GoatToken() { - super("Goat", "0/1 white Goat creature token"); - setOriginalExpansionSetCode("EVE"); - cardType.add(CardType.CREATURE); - color.setWhite(true); - - subtype.add("Goat"); - power = new MageInt(0); - toughness = new MageInt(1); - } -} diff --git a/Mage.Sets/src/mage/sets/commander2013/Stonecloaker.java b/Mage.Sets/src/mage/sets/commander2013/Stonecloaker.java index 5cc2d1a4c95..92b4f50836f 100644 --- a/Mage.Sets/src/mage/sets/commander2013/Stonecloaker.java +++ b/Mage.Sets/src/mage/sets/commander2013/Stonecloaker.java @@ -32,14 +32,14 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.ExileTargetEffect; -import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.effects.common.ReturnToHandChosenControlledPermanentEffect; import mage.abilities.keyword.FlashAbility; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; import mage.target.common.TargetCardInGraveyard; -import mage.target.common.TargetControlledCreaturePermanent; /** * @@ -60,8 +60,8 @@ public class Stonecloaker extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); // When Stonecloaker enters the battlefield, return a creature you control to its owner's hand. - Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false); - ability.addTarget(new TargetControlledCreaturePermanent()); + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandChosenControlledPermanentEffect(new FilterControlledCreaturePermanent()), true); + this.addAbility(ability); // When Stonecloaker enters the battlefield, exile target card from a graveyard. ability = new EntersBattlefieldTriggeredAbility(new ExileTargetEffect(), false); diff --git a/Mage.Sets/src/mage/sets/commander2013/TemptWithDiscovery.java b/Mage.Sets/src/mage/sets/commander2013/TemptWithDiscovery.java index e684acd3028..608f28407cd 100644 --- a/Mage.Sets/src/mage/sets/commander2013/TemptWithDiscovery.java +++ b/Mage.Sets/src/mage/sets/commander2013/TemptWithDiscovery.java @@ -27,6 +27,8 @@ */ package mage.sets.commander2013; +import java.util.LinkedHashSet; +import java.util.Set; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; @@ -51,7 +53,6 @@ public class TemptWithDiscovery extends CardImpl { super(ownerId, 174, "Tempt with Discovery", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{G}"); this.expansionSetCode = "C13"; - // Tempting offer - Search your library for a land card and put it onto the battlefield. // Each opponent may search his or her library for a land card and put it onto the battlefield. // For each opponent who searches a library this way, search your library for a land card and put it onto the battlefield. @@ -89,12 +90,14 @@ class TemptWithDiscoveryEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { + Set playersShuffle = new LinkedHashSet<>(); + playersShuffle.add(controller.getId()); TargetCardInLibrary target = new TargetCardInLibrary(new FilterLandCard()); if (controller.searchLibrary(target, game)) { - for (UUID cardId: target.getTargets()) { + for (UUID cardId : target.getTargets()) { Card card = game.getCard(cardId); if (card != null) { - card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), controller.getId()); + controller.moveCards(card, null, Zone.BATTLEFIELD, source, game); } } } @@ -105,11 +108,12 @@ class TemptWithDiscoveryEffect extends OneShotEffect { if (opponent.chooseUse(outcome, "Search your library for a land card and put it onto the battlefield?", source, game)) { target.clearChosen(); opponentsUsedSearch++; + playersShuffle.add(playerId); if (opponent.searchLibrary(target, game)) { - for (UUID cardId: target.getTargets()) { + for (UUID cardId : target.getTargets()) { Card card = game.getCard(cardId); if (card != null) { - card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), opponent.getId()); + opponent.moveCards(card, null, Zone.BATTLEFIELD, source, game); } } } @@ -119,17 +123,23 @@ class TemptWithDiscoveryEffect extends OneShotEffect { if (opponentsUsedSearch > 0) { target = new TargetCardInLibrary(0, opponentsUsedSearch, new FilterLandCard()); if (controller.searchLibrary(target, game)) { - for (UUID cardId: target.getTargets()) { + for (UUID cardId : target.getTargets()) { Card card = game.getCard(cardId); if (card != null) { - card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), controller.getId()); + controller.moveCards(card, null, Zone.BATTLEFIELD, source, game); } } } } + for (UUID playerId : playersShuffle) { + Player player = game.getPlayer(playerId); + if (player != null) { + player.shuffleLibrary(game); + } + } return true; } - + return false; } } diff --git a/Mage.Sets/src/mage/sets/commander2014/CoralAtoll.java b/Mage.Sets/src/mage/sets/commander2014/CoralAtoll.java index d2a186eb83c..3785405c2c3 100644 --- a/Mage.Sets/src/mage/sets/commander2014/CoralAtoll.java +++ b/Mage.Sets/src/mage/sets/commander2014/CoralAtoll.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.Mana; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.abilities.mana.SimpleManaAbility; @@ -66,7 +66,7 @@ public class CoralAtoll extends CardImpl { // Coral Atoll enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); // When Coral Atoll enters the battlefield, sacrifice it unless you return an untapped Island you control to its owner's hand. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))))); // {tap}: Add {1}{U} to your mana pool. this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 0, 0, 1,0 ), new TapSourceCost())); diff --git a/Mage.Sets/src/mage/sets/commander2014/DormantVolcano.java b/Mage.Sets/src/mage/sets/commander2014/DormantVolcano.java index 800f515fca7..c4b046863bd 100644 --- a/Mage.Sets/src/mage/sets/commander2014/DormantVolcano.java +++ b/Mage.Sets/src/mage/sets/commander2014/DormantVolcano.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.Mana; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.abilities.mana.SimpleManaAbility; @@ -66,7 +66,7 @@ public class DormantVolcano extends CardImpl { this.addAbility(new EntersBattlefieldTappedAbility()); // When Dormant Volcano enters the battlefield, sacrifice it unless you return an untapped Mountain you control to its owner's hand. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))))); // {tap}: Add {1}{R} to your mana pool. this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 0, 0, 1,0 ), new TapSourceCost())); diff --git a/Mage.Sets/src/mage/sets/commander2014/Everglades.java b/Mage.Sets/src/mage/sets/commander2014/Everglades.java index 7cf1f874132..e9693d66a88 100644 --- a/Mage.Sets/src/mage/sets/commander2014/Everglades.java +++ b/Mage.Sets/src/mage/sets/commander2014/Everglades.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.Mana; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.abilities.mana.SimpleManaAbility; @@ -53,7 +53,7 @@ public class Everglades extends CardImpl { private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("an untapped Swamp"); - static{ + static { filter.add(new SubtypePredicate("Swamp")); filter.add(Predicates.not(new TappedPredicate())); } @@ -66,10 +66,10 @@ public class Everglades extends CardImpl { this.addAbility(new EntersBattlefieldTappedAbility()); // When Everglades enters the battlefield, sacrifice it unless you return an untapped Swamp you control to its owner's hand. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(1, 1, filter, true))))); // {tap}: Add {1}{B} to your mana pool. - this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 0, 1, 1,0 ), new TapSourceCost())); + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 0, 1, 1, 0), new TapSourceCost())); } diff --git a/Mage.Sets/src/mage/sets/commander2014/HallowedSpiritkeeper.java b/Mage.Sets/src/mage/sets/commander2014/HallowedSpiritkeeper.java index b052260ed7e..e9fd02c7262 100644 --- a/Mage.Sets/src/mage/sets/commander2014/HallowedSpiritkeeper.java +++ b/Mage.Sets/src/mage/sets/commander2014/HallowedSpiritkeeper.java @@ -39,7 +39,7 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.filter.common.FilterCreatureCard; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.SpiritWhiteToken; /** * @@ -59,7 +59,7 @@ public class HallowedSpiritkeeper extends CardImpl { this.addAbility(VigilanceAbility.getInstance()); // When Hallowed Spiritkeeper dies, put X 1/1 white Spirit creature tokens with flying onto the battlefield, where X is the number of creature cards in your graveyard. - Effect effect = new CreateTokenEffect(new HallowedSpiritkeeperSpiritToken(), new CardsInControllerGraveyardCount(new FilterCreatureCard("creature cards"))); + Effect effect = new CreateTokenEffect(new SpiritWhiteToken(), new CardsInControllerGraveyardCount(new FilterCreatureCard("creature cards"))); effect.setText("put X 1/1 white Spirit creature tokens with flying onto the battlefield, where X is the number of creature cards in your graveyard"); this.addAbility(new DiesTriggeredAbility(effect, false)); @@ -74,19 +74,3 @@ public class HallowedSpiritkeeper extends CardImpl { return new HallowedSpiritkeeper(this); } } - -class HallowedSpiritkeeperSpiritToken extends Token { - - public HallowedSpiritkeeperSpiritToken() { - super("Spirit", "1/1 white Spirit creature token with flying"); - setOriginalExpansionSetCode("C14"); - cardType.add(CardType.CREATURE); - color.setWhite(true); - subtype.add("Spirit"); - power = new MageInt(1); - toughness = new MageInt(1); - - addAbility(FlyingAbility.getInstance()); - - } -} diff --git a/Mage.Sets/src/mage/sets/commander2014/JungleBasin.java b/Mage.Sets/src/mage/sets/commander2014/JungleBasin.java index c90e7f0e107..dfa53c525a9 100644 --- a/Mage.Sets/src/mage/sets/commander2014/JungleBasin.java +++ b/Mage.Sets/src/mage/sets/commander2014/JungleBasin.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.Mana; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.abilities.mana.SimpleManaAbility; @@ -66,7 +66,7 @@ public class JungleBasin extends CardImpl { this.addAbility(new EntersBattlefieldTappedAbility()); // When Jungle Basin enters the battlefield, sacrifice it unless you return an untapped Forest you control to its owner's hand. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))))); // {tap}: Add {1}{G} to your mana pool. this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 0, 0, 0, 1,0 ), new TapSourceCost())); diff --git a/Mage.Sets/src/mage/sets/commander2014/Karoo.java b/Mage.Sets/src/mage/sets/commander2014/Karoo.java index eed52e1bc32..095d04b79d6 100644 --- a/Mage.Sets/src/mage/sets/commander2014/Karoo.java +++ b/Mage.Sets/src/mage/sets/commander2014/Karoo.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.Mana; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.abilities.mana.SimpleManaAbility; @@ -66,7 +66,7 @@ public class Karoo extends CardImpl { this.addAbility(new EntersBattlefieldTappedAbility()); // When Karoo enters the battlefield, sacrifice it unless you return an untapped Plains you control to its owner's hand. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))))); // {tap}: Add {1}{W} to your mana pool. this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 1, 0, 1,0 ), new TapSourceCost())); diff --git a/Mage.Sets/src/mage/sets/commander2014/LifebloodHydra.java b/Mage.Sets/src/mage/sets/commander2014/LifebloodHydra.java index 89228518820..a0f13d131dd 100644 --- a/Mage.Sets/src/mage/sets/commander2014/LifebloodHydra.java +++ b/Mage.Sets/src/mage/sets/commander2014/LifebloodHydra.java @@ -30,11 +30,10 @@ package mage.sets.commander2014; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.common.EntersBattlefieldAbility; -import mage.abilities.effects.EntersBattlefieldEffect; import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.constants.CardType; @@ -63,7 +62,7 @@ public class LifebloodHydra extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // Lifeblood Hydra enters the battlefield with X +1/+1 counters on it. - this.addAbility(new EntersBattlefieldAbility(new LifebloodHydraComesIntoPlayEffect(), "with X +1/+1 counters on it")); + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance()))); // When Lifeblood Hydra dies, you gain life and draw cards equal to its power. this.addAbility(new DiesTriggeredAbility(new LifebloodHydraEffect(), false)); @@ -79,41 +78,6 @@ public class LifebloodHydra extends CardImpl { } } -class LifebloodHydraComesIntoPlayEffect extends OneShotEffect { - - public LifebloodHydraComesIntoPlayEffect() { - super(Outcome.BoostCreature); - staticText = "{this} enters the battlefield with X +1/+1 counters on it"; - } - - public LifebloodHydraComesIntoPlayEffect(final LifebloodHydraComesIntoPlayEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null && !permanent.isFaceDown(game)) { - SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (spellAbility != null - && spellAbility.getSourceId().equals(source.getSourceId()) - && permanent.getZoneChangeCounter(game) - 1 == spellAbility.getSourceObjectZoneChangeCounter()) { - int amount = spellAbility.getManaCostsToPay().getX(); - if (amount > 0) { - permanent.addCounters(CounterType.P1P1.createInstance(amount), game); - } - } - } - return true; - } - - @Override - public LifebloodHydraComesIntoPlayEffect copy() { - return new LifebloodHydraComesIntoPlayEffect(this); - } - -} - class LifebloodHydraEffect extends OneShotEffect { public LifebloodHydraEffect() { diff --git a/Mage.Sets/src/mage/sets/commander2014/NahiriTheLithomancer.java b/Mage.Sets/src/mage/sets/commander2014/NahiriTheLithomancer.java index 826add7420e..c9f5dad4248 100644 --- a/Mage.Sets/src/mage/sets/commander2014/NahiriTheLithomancer.java +++ b/Mage.Sets/src/mage/sets/commander2014/NahiriTheLithomancer.java @@ -61,6 +61,7 @@ import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.Game; import mage.game.permanent.Permanent; +import mage.game.permanent.token.KorSoldierToken; import mage.game.permanent.token.Token; import mage.players.Player; import mage.target.Target; @@ -79,20 +80,20 @@ public class NahiriTheLithomancer extends CardImpl { this.expansionSetCode = "C14"; this.subtype.add("Nahiri"); - + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(3)), false)); // +2: Put a 1/1 white Kor Soldier creature token onto the battlefield. You may attach an Equipment you control to it. this.addAbility(new LoyaltyAbility(new NahiriTheLithomancerFirstAbilityEffect(), 2)); - + // -2: You may put an Equipment card from your hand or graveyard onto the battlefield. this.addAbility(new LoyaltyAbility(new NahiriTheLithomancerSecondAbilityEffect(), -2)); - + // -10: Put a colorless Equipment artifact token named Stoneforged Blade onto the battlefield. It has indestructible, "Equipped creature gets +5/+5 and has double strike," and equip {0}. Effect effect = new CreateTokenEffect(new NahiriTheLithomancerEquipmentToken()); effect.setText("Put a colorless Equipment artifact token named Stoneforged Blade onto the battlefield. It has indestructible, \"Equipped creature gets +5/+5 and has double strike,\" and equip {0}"); this.addAbility(new LoyaltyAbility(effect, -10)); - + // Nahiri, the Lithomancer can be your commander. this.addAbility(CanBeYourCommanderAbility.getInstance()); } @@ -108,31 +109,31 @@ public class NahiriTheLithomancer extends CardImpl { } class NahiriTheLithomancerFirstAbilityEffect extends OneShotEffect { - + private static final FilterControlledPermanent filter = new FilterControlledPermanent("an Equipment you control"); static { filter.add(new SubtypePredicate("Equipment")); } - + NahiriTheLithomancerFirstAbilityEffect() { super(Outcome.PutCreatureInPlay); this.staticText = "Put a 1/1 white Kor Soldier creature token onto the battlefield. You may attach an Equipment you control to it"; } - + NahiriTheLithomancerFirstAbilityEffect(final NahiriTheLithomancerFirstAbilityEffect effect) { super(effect); } - + @Override public NahiriTheLithomancerFirstAbilityEffect copy() { return new NahiriTheLithomancerFirstAbilityEffect(this); } - + @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - Token token = new NahiriTheLithomancerKorSoldierToken(); + Token token = new KorSoldierToken(); if (token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId())) { Permanent tokenPermanent = game.getPermanent(token.getLastAddedToken()); if (tokenPermanent != null) { @@ -160,41 +161,27 @@ class NahiriTheLithomancerFirstAbilityEffect extends OneShotEffect { } } -class NahiriTheLithomancerKorSoldierToken extends Token { - - NahiriTheLithomancerKorSoldierToken() { - super("Kor Soldier", "1/1 white Kor Soldier creature token"); - setOriginalExpansionSetCode("C14"); - cardType.add(CardType.CREATURE); - color.setWhite(true); - subtype.add("Kor"); - subtype.add("Soldier"); - power = new MageInt(1); - toughness = new MageInt(1); - } -} - class NahiriTheLithomancerSecondAbilityEffect extends OneShotEffect { - + private static final FilterCard filter = new FilterCard("an Equipment"); static { filter.add(new SubtypePredicate("Equipment")); } - + NahiriTheLithomancerSecondAbilityEffect() { super(Outcome.PutCardInPlay); this.staticText = "You may put an Equipment card from your hand or graveyard onto the battlefield"; } - + NahiriTheLithomancerSecondAbilityEffect(final NahiriTheLithomancerSecondAbilityEffect effect) { super(effect); } - + @Override public NahiriTheLithomancerSecondAbilityEffect copy() { return new NahiriTheLithomancerSecondAbilityEffect(this); } - + @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); @@ -227,13 +214,13 @@ class NahiriTheLithomancerEquipmentToken extends Token { super("Stoneforged Blade", "colorless Equipment artifact token named Stoneforged Blade with indestructible, \"Equipped creature gets +5/+5 and has double strike,\" and equip {0}"); cardType.add(CardType.ARTIFACT); subtype.add("Equipment"); - + this.addAbility(IndestructibleAbility.getInstance()); - + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(5, 5)); ability.addEffect(new GainAbilityAttachedEffect(DoubleStrikeAbility.getInstance(), AttachmentType.EQUIPMENT, Duration.WhileOnBattlefield, "and has double strike")); this.addAbility(ability); - + this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(0))); } } diff --git a/Mage.Sets/src/mage/sets/commander2014/ObNixilisOfTheBlackOath.java b/Mage.Sets/src/mage/sets/commander2014/ObNixilisOfTheBlackOath.java index 79cb66aa248..2593433d2ea 100644 --- a/Mage.Sets/src/mage/sets/commander2014/ObNixilisOfTheBlackOath.java +++ b/Mage.Sets/src/mage/sets/commander2014/ObNixilisOfTheBlackOath.java @@ -28,7 +28,6 @@ package mage.sets.commander2014; import java.util.UUID; -import mage.MageInt; import mage.abilities.Ability; import mage.abilities.LoyaltyAbility; import mage.abilities.common.CanBeYourCommanderAbility; @@ -55,7 +54,7 @@ import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; import mage.game.command.Emblem; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.DemonToken; import mage.players.Player; import mage.target.common.TargetControlledCreaturePermanent; @@ -77,13 +76,13 @@ public class ObNixilisOfTheBlackOath extends CardImpl { this.addAbility(new LoyaltyAbility(new ObNixilisOfTheBlackOathEffect1(), 2)); // -2: Put a 5/5 black Demon creature token with flying onto the battlefield. You lose 2 life. - LoyaltyAbility loyaltyAbility = new LoyaltyAbility(new CreateTokenEffect(new ObNixilisDemonToken()), -2); + LoyaltyAbility loyaltyAbility = new LoyaltyAbility(new CreateTokenEffect(new DemonToken()), -2); loyaltyAbility.addEffect(new LoseLifeSourceControllerEffect(2)); this.addAbility(loyaltyAbility); // -8: You get an emblem with "{1}{B}, Sacrifice a creature: You gain X life and draw X cards, where X is the sacrificed creature's power." this.addAbility(new LoyaltyAbility(new GetEmblemEffect(new ObNixilisOfTheBlackOathEmblem()), -8)); - + // Ob Nixilis of the Black Oath can be your commander. this.addAbility(CanBeYourCommanderAbility.getInstance()); } @@ -134,23 +133,6 @@ class ObNixilisOfTheBlackOathEffect1 extends OneShotEffect { } -class ObNixilisDemonToken extends Token { - - ObNixilisDemonToken() { - super("Demon", "5/5 black Demon creature token with flying"); - setTokenType(1); - setOriginalExpansionSetCode("C14"); - cardType.add(CardType.CREATURE); - subtype.add("Demon"); - - color.setBlack(true); - power = new MageInt(5); - toughness = new MageInt(5); - - addAbility(FlyingAbility.getInstance()); - } -} - class ObNixilisOfTheBlackOathEmblem extends Emblem { // You get an emblem with "{1}{B}, Sacrifice a creature: You gain X life and draw X cards, where X is the sacrificed creature's power." public ObNixilisOfTheBlackOathEmblem() { diff --git a/Mage.Sets/src/mage/sets/commander2014/SylvanOffering.java b/Mage.Sets/src/mage/sets/commander2014/SylvanOffering.java index 069978000ba..fab6eea4bed 100644 --- a/Mage.Sets/src/mage/sets/commander2014/SylvanOffering.java +++ b/Mage.Sets/src/mage/sets/commander2014/SylvanOffering.java @@ -41,6 +41,7 @@ import mage.constants.Outcome; import mage.constants.Rarity; import mage.game.Game; import mage.game.permanent.token.SpiritWhiteToken; +import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.Token; import mage.players.Player; import mage.target.Target; @@ -149,28 +150,13 @@ class SylvanOfferingEffect2 extends OneShotEffect { Player opponent = game.getPlayer(target.getFirstTarget()); if (opponent != null) { int xValue = source.getManaCostsToPay().getX(); - Effect effect = new CreateTokenTargetEffect(new SylvanOfferingElfWarriorToken(), xValue); + Effect effect = new CreateTokenTargetEffect(new ElfToken(), xValue); effect.setTargetPointer(new FixedTarget(opponent.getId())); effect.apply(game, source); - new CreateTokenEffect(new SylvanOfferingElfWarriorToken(), xValue).apply(game, source); + new CreateTokenEffect(new ElfToken(), xValue).apply(game, source); return true; } } return false; } } - -class SylvanOfferingElfWarriorToken extends Token { - - public SylvanOfferingElfWarriorToken() { - super("Elf Warrior", "1/1 green Elf Warrior creature token"); - setOriginalExpansionSetCode("C14"); - cardType.add(CardType.CREATURE); - subtype.add("Elf"); - subtype.add("Warrior"); - color.setGreen(true); - power = new MageInt(1); - toughness = new MageInt(1); - - } -} diff --git a/Mage.Sets/src/mage/sets/commander2014/WarmongerHellkite.java b/Mage.Sets/src/mage/sets/commander2014/WarmongerHellkite.java index facef8d227a..450a026bcab 100644 --- a/Mage.Sets/src/mage/sets/commander2014/WarmongerHellkite.java +++ b/Mage.Sets/src/mage/sets/commander2014/WarmongerHellkite.java @@ -62,7 +62,7 @@ public class WarmongerHellkite extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // All creatures attack each combat if able. - Effect effect = new AttacksIfAbleAllEffect(new FilterCreaturePermanent("creatures")); + Effect effect = new AttacksIfAbleAllEffect(new FilterCreaturePermanent("creatures"), Duration.WhileOnBattlefield, true); effect.setText("All creatures attack each combat if able"); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); diff --git a/Mage.Sets/src/mage/sets/conflux/CelestialPurge.java b/Mage.Sets/src/mage/sets/conflux/CelestialPurge.java index cb2aeb00788..5547e8dcce9 100644 --- a/Mage.Sets/src/mage/sets/conflux/CelestialPurge.java +++ b/Mage.Sets/src/mage/sets/conflux/CelestialPurge.java @@ -1,16 +1,16 @@ /* * 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 @@ -20,20 +20,19 @@ * 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.conflux; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Rarity; import mage.ObjectColor; import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -57,6 +56,7 @@ public class CelestialPurge extends CardImpl { super(ownerId, 5, "Celestial Purge", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{W}"); this.expansionSetCode = "CON"; + // Exile target black or red permanent. this.getSpellAbility().addTarget(new TargetPermanent(filter)); this.getSpellAbility().addEffect(new ExileTargetEffect()); } diff --git a/Mage.Sets/src/mage/sets/conflux/MasterTransmuter.java b/Mage.Sets/src/mage/sets/conflux/MasterTransmuter.java index fcae2dcac52..ae89e66ea5d 100644 --- a/Mage.Sets/src/mage/sets/conflux/MasterTransmuter.java +++ b/Mage.Sets/src/mage/sets/conflux/MasterTransmuter.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.PutPermanentOnBattlefieldEffect; @@ -61,7 +61,7 @@ public class MasterTransmuter extends CardImpl { // {U}, {tap}, Return an artifact you control to its owner's hand: You may put an artifact card from your hand onto the battlefield. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutPermanentOnBattlefieldEffect(new FilterArtifactCard("an artifact card")), new ManaCostsImpl("{U}")); ability.addCost(new TapSourceCost()); - ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent("an artifact")))); + ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent("an artifact")))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/conspiracy/GrenzoDungeonWarden.java b/Mage.Sets/src/mage/sets/conspiracy/GrenzoDungeonWarden.java index e583ec71adf..2a152f5c5d6 100644 --- a/Mage.Sets/src/mage/sets/conspiracy/GrenzoDungeonWarden.java +++ b/Mage.Sets/src/mage/sets/conspiracy/GrenzoDungeonWarden.java @@ -30,12 +30,11 @@ package mage.sets.conspiracy; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.EntersBattlefieldEffect; import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.constants.CardType; @@ -64,7 +63,7 @@ public class GrenzoDungeonWarden extends CardImpl { this.toughness = new MageInt(2); // Grenzo, Dungeon Warden enters the battlefield with X +1/+1 counters on it. - this.addAbility(new EntersBattlefieldAbility(new GrenzoDungeonWardenEtBEffect())); + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance()))); // {2}: Put the bottom card of your library into your graveyard. If it's a creature card with power less than or equal to Grenzo's power, put it onto the battlefield. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GrenzoDungeonWardenEffect(), new GenericManaCost(2))); @@ -80,40 +79,6 @@ public class GrenzoDungeonWarden extends CardImpl { } } -class GrenzoDungeonWardenEtBEffect extends OneShotEffect { - - GrenzoDungeonWardenEtBEffect() { - super(Outcome.BoostCreature); - staticText = "{this} enters the battlefield with X +1/+1 counters on it"; - } - - GrenzoDungeonWardenEtBEffect(final GrenzoDungeonWardenEtBEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (spellAbility != null - && spellAbility.getSourceId().equals(source.getSourceId()) - && permanent.getZoneChangeCounter(game) - 1 == spellAbility.getSourceObjectZoneChangeCounter()) { - int amount = spellAbility.getManaCostsToPay().getX(); - if (amount > 0) { - permanent.addCounters(CounterType.P1P1.createInstance(amount), game); - } - } - } - return true; - } - - @Override - public GrenzoDungeonWardenEtBEffect copy() { - return new GrenzoDungeonWardenEtBEffect(this); - } -} - class GrenzoDungeonWardenEffect extends OneShotEffect { GrenzoDungeonWardenEffect() { diff --git a/Mage.Sets/src/mage/sets/darkascension/GatherTheTownsfolk.java b/Mage.Sets/src/mage/sets/darkascension/GatherTheTownsfolk.java index d734501cf7f..15553884e18 100644 --- a/Mage.Sets/src/mage/sets/darkascension/GatherTheTownsfolk.java +++ b/Mage.Sets/src/mage/sets/darkascension/GatherTheTownsfolk.java @@ -30,13 +30,12 @@ package mage.sets.darkascension; import java.util.UUID; import mage.constants.CardType; import mage.constants.Rarity; -import mage.MageInt; import mage.ObjectColor; import mage.abilities.condition.common.FatefulHourCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.HumanToken; /** * @@ -64,17 +63,3 @@ public class GatherTheTownsfolk extends CardImpl { return new GatherTheTownsfolk(this); } } - -class HumanToken extends Token { - - public HumanToken() { - super("Human", "1/1 white Human creature token"); - cardType.add(CardType.CREATURE); - color.setWhite(true); - - subtype.add("Human"); - power = new MageInt(1); - toughness = new MageInt(1); - } - -} diff --git a/Mage.Sets/src/mage/sets/darkascension/IncreasingDevotion.java b/Mage.Sets/src/mage/sets/darkascension/IncreasingDevotion.java index e5405b471e6..12f7f2fcd06 100644 --- a/Mage.Sets/src/mage/sets/darkascension/IncreasingDevotion.java +++ b/Mage.Sets/src/mage/sets/darkascension/IncreasingDevotion.java @@ -28,14 +28,18 @@ package mage.sets.darkascension; import java.util.UUID; - -import mage.constants.*; import mage.abilities.Ability; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.FlashbackAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TimingRule; +import mage.constants.Zone; import mage.game.Game; +import mage.game.permanent.token.HumanToken; import mage.game.stack.Spell; /** @@ -48,7 +52,6 @@ public class IncreasingDevotion extends CardImpl { super(ownerId, 11, "Increasing Devotion", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{W}{W}"); this.expansionSetCode = "DKA"; - // Put five 1/1 white Human creature tokens onto the battlefield. If Increasing Devotion was cast from a graveyard, put ten of those tokens onto the battlefield instead. this.getSpellAbility().addEffect(new IncreasingDevotionEffect()); diff --git a/Mage.Sets/src/mage/sets/darkascension/ThrabenDoomsayer.java b/Mage.Sets/src/mage/sets/darkascension/ThrabenDoomsayer.java index 5da2eef4b10..0b0946ed834 100644 --- a/Mage.Sets/src/mage/sets/darkascension/ThrabenDoomsayer.java +++ b/Mage.Sets/src/mage/sets/darkascension/ThrabenDoomsayer.java @@ -28,9 +28,6 @@ package mage.sets.darkascension; import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Rarity; import mage.MageInt; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; @@ -40,8 +37,11 @@ import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; +import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.Rarity; import mage.constants.Zone; +import mage.game.permanent.token.HumanToken; /** * @@ -61,7 +61,7 @@ public class ThrabenDoomsayer extends CardImpl { // {tap}: Put a 1/1 white Human creature token onto the battlefield. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new HumanToken()), new TapSourceCost())); // Fateful hour - As long as you have 5 or less life, other creatures you control get +2/+2. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new BoostControlledEffect(2, 2, Duration.WhileOnBattlefield, false), + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new BoostControlledEffect(2, 2, Duration.WhileOnBattlefield, true), FatefulHourCondition.getInstance(), "As long as you have 5 or less life, other creatures you control get +2/+2"))); } diff --git a/Mage.Sets/src/mage/sets/dissension/MagewrightsStone.java b/Mage.Sets/src/mage/sets/dissension/MagewrightsStone.java new file mode 100644 index 00000000000..d6023e49db6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/dissension/MagewrightsStone.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.dissension; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Abilities; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.AbilityType; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicate; +import mage.game.Game; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author BursegSardaukar + */ +public class MagewrightsStone extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that has an ability with {T} in its cost"); + + static { + filter.add(new HasAbilityWithTapSymbolPredicate()); + } + + public MagewrightsStone(UUID ownerId) { + super(ownerId, 162, "Magewright's Stone", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); + this.expansionSetCode = "DIS"; + + // {1}, {T}: Untap target creature that has an activated ability with {T} in its cost. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new ManaCostsImpl("{1}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public MagewrightsStone(final MagewrightsStone card) { + super(card); + } + + @Override + public MagewrightsStone copy() { + return new MagewrightsStone(this); + } +} + +class HasAbilityWithTapSymbolPredicate implements Predicate { + + @Override + public boolean apply(MageObject input, Game game) { + Abilities abilities; + if (input instanceof Card) { + abilities = ((Card) input).getAbilities(game); + } else { + abilities = input.getAbilities(); + } + + for (Ability ability : abilities) { + if (ability.getAbilityType().equals(AbilityType.ACTIVATED) && !ability.getCosts().isEmpty()) { + for (Cost cost : ability.getCosts()) { + if (cost instanceof TapSourceCost) { + return true; + } + } + } + } + return false; + } + + @Override + public String toString() { + return "activated ability with {T} in its cost"; + } +} diff --git a/Mage.Sets/src/mage/sets/dissension/PillarOfTheParuns.java b/Mage.Sets/src/mage/sets/dissension/PillarOfTheParuns.java index 629823f495a..a548ba5adeb 100644 --- a/Mage.Sets/src/mage/sets/dissension/PillarOfTheParuns.java +++ b/Mage.Sets/src/mage/sets/dissension/PillarOfTheParuns.java @@ -28,19 +28,13 @@ package mage.sets.dissension; import java.util.UUID; -import mage.ConditionalMana; -import mage.MageObject; -import mage.Mana; -import mage.abilities.Ability; -import mage.abilities.SpellAbility; -import mage.abilities.condition.Condition; import mage.abilities.mana.ConditionalAnyColorManaAbility; -import mage.abilities.mana.builder.ConditionalManaBuilder; -import mage.abilities.mana.conditional.ManaCondition; +import mage.abilities.mana.conditional.ConditionalSpellManaBuilder; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.game.Game; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.MulticoloredPredicate; /** * @@ -48,12 +42,18 @@ import mage.game.Game; */ public class PillarOfTheParuns extends CardImpl { + private static final FilterSpell filter = new FilterSpell("a multicolored spell"); + + static { + filter.add(new MulticoloredPredicate()); + } + public PillarOfTheParuns(UUID ownerId) { super(ownerId, 176, "Pillar of the Paruns", Rarity.RARE, new CardType[]{CardType.LAND}, ""); this.expansionSetCode = "DIS"; // {T}: Add one mana of any color to your mana pool. Spend this mana only to cast a multicolored spell. - this.addAbility(new ConditionalAnyColorManaAbility(1, new PillarOfTheParunsManaBuilder())); + this.addAbility(new ConditionalAnyColorManaAbility(1, new ConditionalSpellManaBuilder(filter))); } public PillarOfTheParuns(final PillarOfTheParuns card) { @@ -65,44 +65,3 @@ public class PillarOfTheParuns extends CardImpl { return new PillarOfTheParuns(this); } } - - -class PillarOfTheParunsManaBuilder extends ConditionalManaBuilder { - @Override - public ConditionalMana build(Object... options) { - return new PillarOfTheParunsConditionalMana(this.mana); - } - - @Override - public String getRule() { - return "Spend this mana only to cast a multicolored spell"; - } -} - -class PillarOfTheParunsConditionalMana extends ConditionalMana { - - public PillarOfTheParunsConditionalMana(Mana mana) { - super(mana); - staticText = "Spend this mana only to cast a multicolored spell"; - addCondition(new MultiColoredSpellCastManaCondition()); - } -} - -class MultiColoredSpellCastManaCondition extends ManaCondition implements Condition { - - @Override - public boolean apply(Game game, Ability source) { - if (source instanceof SpellAbility) { - MageObject object = game.getObject(source.getSourceId()); - if (object != null && object.getColor(game).getColorCount() > 1) { - return true; - } - } - return false; - } - - @Override - public boolean apply(Game game, Ability source, UUID originalId) { - return apply(game, source); - } -} diff --git a/Mage.Sets/src/mage/sets/dragonsmaze/RenderSilent.java b/Mage.Sets/src/mage/sets/dragonsmaze/RenderSilent.java index 052fb394804..7d819e8b6f9 100644 --- a/Mage.Sets/src/mage/sets/dragonsmaze/RenderSilent.java +++ b/Mage.Sets/src/mage/sets/dragonsmaze/RenderSilent.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.dragonsmaze; import java.util.UUID; @@ -52,11 +51,10 @@ import mage.target.targetpointer.FixedTarget; * * @author LevelX2 */ - - public class RenderSilent extends CardImpl { private static final FilterControlledPermanent filter = new FilterControlledPermanent("multicolored permanent"); + static { filter.add(new MulticoloredPredicate()); } @@ -65,7 +63,6 @@ public class RenderSilent extends CardImpl { super(ownerId, 96, "Render Silent", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{W}{U}{U}"); this.expansionSetCode = "DGM"; - // Counter target spell. Its controller can't cast spells this turn. this.getSpellAbility().addEffect(new RenderSilentCounterEffect()); this.getSpellAbility().addTarget(new TargetSpell()); @@ -139,7 +136,7 @@ class RenderSilentEffect extends ContinuousRuleModifyingEffectImpl { public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { - return "You can't cast spells this turn (" + mageObject.getLogName() + ")."; + return "You can't cast spells this turn (" + mageObject.getIdName() + ")."; } return null; } diff --git a/Mage.Sets/src/mage/sets/dragonsmaze/SavagebornHydra.java b/Mage.Sets/src/mage/sets/dragonsmaze/SavagebornHydra.java index 1ed4e842ea6..bee58de919f 100644 --- a/Mage.Sets/src/mage/sets/dragonsmaze/SavagebornHydra.java +++ b/Mage.Sets/src/mage/sets/dragonsmaze/SavagebornHydra.java @@ -29,23 +29,17 @@ package mage.sets.dragonsmaze; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.common.ActivateAsSorceryActivatedAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.EntersBattlefieldEffect; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.DoubleStrikeAbility; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; import mage.counters.CounterType; -import mage.game.Game; -import mage.game.permanent.Permanent; /** * @@ -65,7 +59,7 @@ public class SavagebornHydra extends CardImpl { this.addAbility(DoubleStrikeAbility.getInstance()); // Savageborn Hydra enters the battlefield with X +1/+1 counters on it. - this.addAbility(new EntersBattlefieldAbility(new SavageBornHydraEffect(), true)); + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance()))); // {1}{RG}: Put a +1/+1 counter on Savageborn Hydra. Activate this ability only any time you could cast a sorcery. this.addAbility(new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl("{1}{R/G}"))); @@ -80,37 +74,3 @@ public class SavagebornHydra extends CardImpl { return new SavagebornHydra(this); } } - -class SavageBornHydraEffect extends OneShotEffect { - - public SavageBornHydraEffect() { - super(Outcome.BoostCreature); - staticText = "with X +1/+1 counters on it"; - } - - public SavageBornHydraEffect(final SavageBornHydraEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (spellAbility != null - && spellAbility.getSourceId().equals(source.getSourceId()) - && permanent.getZoneChangeCounter(game) - 1 == spellAbility.getSourceObjectZoneChangeCounter()) { - int amount = spellAbility.getManaCostsToPay().getX(); - if (amount > 0) { - permanent.addCounters(CounterType.P1P1.createInstance(amount), game); - } - } - } - return true; - } - - @Override - public SavageBornHydraEffect copy() { - return new SavageBornHydraEffect(this); - } -} diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/SecureTheWastes.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/SecureTheWastes.java index 0f3666570af..102d77a2e78 100644 --- a/Mage.Sets/src/mage/sets/dragonsoftarkir/SecureTheWastes.java +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/SecureTheWastes.java @@ -28,13 +28,12 @@ package mage.sets.dragonsoftarkir; import java.util.UUID; -import mage.MageInt; import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.WarriorToken; /** * @@ -47,7 +46,7 @@ public class SecureTheWastes extends CardImpl { this.expansionSetCode = "DTK"; // Put X 1/1 white Warrior creature tokens onto the battlefield. - this.getSpellAbility().addEffect(new CreateTokenEffect(new SecureTheWastesToken(), new ManacostVariableValue())); + this.getSpellAbility().addEffect(new CreateTokenEffect(new WarriorToken(), new ManacostVariableValue())); } public SecureTheWastes(final SecureTheWastes card) { @@ -59,17 +58,3 @@ public class SecureTheWastes extends CardImpl { return new SecureTheWastes(this); } } - -class SecureTheWastesToken extends Token { - - SecureTheWastesToken() { - super("Warrior", "1/1 white Warrior creature token"); - this.setOriginalExpansionSetCode("DTK"); - cardType.add(CardType.CREATURE); - subtype.add("Warrior"); - - color.setWhite(true); - power = new MageInt(1); - toughness = new MageInt(1); - } -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/eventide/Moonhold.java b/Mage.Sets/src/mage/sets/eventide/Moonhold.java index 25d6d5105f4..acb45b4cbea 100644 --- a/Mage.Sets/src/mage/sets/eventide/Moonhold.java +++ b/Mage.Sets/src/mage/sets/eventide/Moonhold.java @@ -58,7 +58,6 @@ public class Moonhold extends CardImpl { super(ownerId, 143, "Moonhold", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{R/W}"); this.expansionSetCode = "EVE"; - // Target player can't play land cards this turn if {R} was spent to cast Moonhold and can't play creature cards this turn if {W} was spent to cast it. ContinuousRuleModifyingEffect effect = new MoonholdEffect(); ContinuousRuleModifyingEffect effect2 = new MoonholdEffect2(); @@ -109,7 +108,7 @@ class MoonholdEffect extends ContinuousRuleModifyingEffectImpl { public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { - return "you can't play land cards this turn (" + mageObject.getLogName() + ")."; + return "you can't play land cards this turn (" + mageObject.getIdName() + ")."; } return null; } @@ -152,7 +151,7 @@ class MoonholdEffect2 extends ContinuousRuleModifyingEffectImpl { public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { - return "You can't play creature cards this turn (" + mageObject.getLogName() + ")."; + return "You can't play creature cards this turn (" + mageObject.getIdName() + ")."; } return null; } diff --git a/Mage.Sets/src/mage/sets/eventide/PatrolSignaler.java b/Mage.Sets/src/mage/sets/eventide/PatrolSignaler.java index d23a120320f..3f4c9e306f0 100644 --- a/Mage.Sets/src/mage/sets/eventide/PatrolSignaler.java +++ b/Mage.Sets/src/mage/sets/eventide/PatrolSignaler.java @@ -39,7 +39,7 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.KithkinToken; /** * @@ -57,10 +57,9 @@ public class PatrolSignaler extends CardImpl { this.toughness = new MageInt(1); // {1}{W}, {untap}: Put a 1/1 white Kithkin Soldier creature token onto the battlefield. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new KithkinSoldierToken()), new ManaCostsImpl("{1}{W}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new KithkinToken()), new ManaCostsImpl("{1}{W}")); ability.addCost(new UntapSourceCost()); this.addAbility(ability); - } public PatrolSignaler(final PatrolSignaler card) { @@ -72,17 +71,3 @@ public class PatrolSignaler extends CardImpl { return new PatrolSignaler(this); } } - -class KithkinSoldierToken extends Token { - - public KithkinSoldierToken() { - super("Kithkin Soldier", "1/1 white Kithkin Soldier creature token"); - cardType.add(CardType.CREATURE); - color.setWhite(true); - - subtype.add("Soldier"); - power = new MageInt(1); - toughness = new MageInt(1); - } - -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/eventide/SelkieHedgeMage.java b/Mage.Sets/src/mage/sets/eventide/SelkieHedgeMage.java index 4b93e395876..fef55274374 100644 --- a/Mage.Sets/src/mage/sets/eventide/SelkieHedgeMage.java +++ b/Mage.Sets/src/mage/sets/eventide/SelkieHedgeMage.java @@ -44,27 +44,26 @@ import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.TappedPredicate; import mage.target.TargetPermanent; -import mage.target.common.TargetArtifactPermanent; /** * * @author jeffwadsworth - + * */ public class SelkieHedgeMage extends CardImpl { - + private static final FilterLandPermanent filter = new FilterLandPermanent("Forests"); private static final FilterLandPermanent filter2 = new FilterLandPermanent("Islands"); private static final FilterCreaturePermanent filter3 = new FilterCreaturePermanent("tapped creature"); static { - filter.add(new SubtypePredicate("Forests")); - filter2.add(new SubtypePredicate("Islands")); + filter.add(new SubtypePredicate("Forest")); + filter2.add(new SubtypePredicate("Island")); filter3.add(new TappedPredicate()); } - - private String rule1 = "When {this} enters the battlefield, if you control two or more Forests, you may gain 3 life."; - private String rule2 = "When {this} enters the battlefield, if you control two or more Islands, you may return target tapped creature to its owner's hand."; + + private final String rule1 = "When {this} enters the battlefield, if you control two or more Forests, you may gain 3 life."; + private final String rule2 = "When {this} enters the battlefield, if you control two or more Islands, you may return target tapped creature to its owner's hand."; public SelkieHedgeMage(UUID ownerId) { super(ownerId, 158, "Selkie Hedge-Mage", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G/U}"); @@ -80,12 +79,12 @@ public class SelkieHedgeMage extends CardImpl { // When Selkie Hedge-Mage enters the battlefield, if you control two or more Forests, you may gain 3 life. Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3), true), new PermanentsOnTheBattlefieldCondition(filter, CountType.MORE_THAN, 1), rule1); this.addAbility(ability); - + // When Selkie Hedge-Mage enters the battlefield, if you control two or more Islands, you may return target tapped creature to its owner's hand. Ability ability2 = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true), new PermanentsOnTheBattlefieldCondition(filter2, CountType.MORE_THAN, 1), rule2); ability2.addTarget(new TargetPermanent(filter3)); this.addAbility(ability2); - + } public SelkieHedgeMage(final SelkieHedgeMage card) { diff --git a/Mage.Sets/src/mage/sets/eventide/SpringjackShepherd.java b/Mage.Sets/src/mage/sets/eventide/SpringjackShepherd.java index 460d913355a..481269f78f2 100644 --- a/Mage.Sets/src/mage/sets/eventide/SpringjackShepherd.java +++ b/Mage.Sets/src/mage/sets/eventide/SpringjackShepherd.java @@ -1,116 +1,104 @@ -/* - * 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.eventide; - -import java.util.UUID; -import mage.MageInt; -import mage.ObjectColor; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.dynamicvalue.DynamicValue; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.cards.CardImpl; -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.filter.FilterPermanent; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.game.permanent.token.Token; - -/** - * - * @author jeffwadsworth - * - */ -public class SpringjackShepherd extends CardImpl { - - public SpringjackShepherd(UUID ownerId) { - super(ownerId, 15, "Springjack Shepherd", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); - this.expansionSetCode = "EVE"; - this.subtype.add("Kithkin"); - this.subtype.add("Wizard"); - - this.power = new MageInt(1); - this.toughness = new MageInt(2); - - // Chroma - When Springjack Shepherd enters the battlefield, put a 0/1 white Goat creature token onto the battlefield for each white mana symbol in the mana costs of permanents you control. - Effect effect = new CreateTokenEffect(new GoatToken(), new ChromaSpringjackShepherdCount()); - effect.setText("Chroma - When Springjack Shepherd enters the battlefield, put a 0/1 white Goat creature token onto the battlefield for each white mana symbol in the mana costs of permanents you control."); - this.addAbility(new EntersBattlefieldTriggeredAbility(effect, false, true)); - - } - - public SpringjackShepherd(final SpringjackShepherd card) { - super(card); - } - - @Override - public SpringjackShepherd copy() { - return new SpringjackShepherd(this); - } -} - -class ChromaSpringjackShepherdCount implements DynamicValue { - - @Override - public int calculate(Game game, Ability sourceAbility, Effect effect) { - int chroma = 0; - for (Permanent permanent : game.getBattlefield().getAllActivePermanents(new FilterPermanent(), sourceAbility.getControllerId(), game)) { - chroma += permanent.getManaCost().getMana().getWhite(); - } - return chroma; - } - - @Override - public DynamicValue copy() { - return new ChromaSpringjackShepherdCount(); - } - - @Override - public String toString() { - return "1"; - } - - @Override - public String getMessage() { - return ""; - } -} - -class GoatToken extends Token { - - public GoatToken() { - super("Goat", "a 0/1 white Goat creature token"); - cardType.add(CardType.CREATURE); - color.setWhite(true); - subtype.add("Goat"); - power = new MageInt(0); - toughness = new MageInt(1); - } +/* + * 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.eventide; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterPermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.GoatToken; + +/** + * + * @author jeffwadsworth + * + */ +public class SpringjackShepherd extends CardImpl { + + public SpringjackShepherd(UUID ownerId) { + super(ownerId, 15, "Springjack Shepherd", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "EVE"; + this.subtype.add("Kithkin"); + this.subtype.add("Wizard"); + + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // Chroma - When Springjack Shepherd enters the battlefield, put a 0/1 white Goat creature token onto the battlefield for each white mana symbol in the mana costs of permanents you control. + Effect effect = new CreateTokenEffect(new GoatToken(), new ChromaSpringjackShepherdCount()); + effect.setText("Chroma - When Springjack Shepherd enters the battlefield, put a 0/1 white Goat creature token onto the battlefield for each white mana symbol in the mana costs of permanents you control."); + this.addAbility(new EntersBattlefieldTriggeredAbility(effect, false, true)); + + } + + public SpringjackShepherd(final SpringjackShepherd card) { + super(card); + } + + @Override + public SpringjackShepherd copy() { + return new SpringjackShepherd(this); + } +} + +class ChromaSpringjackShepherdCount implements DynamicValue { + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + int chroma = 0; + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(new FilterPermanent(), sourceAbility.getControllerId(), game)) { + chroma += permanent.getManaCost().getMana().getWhite(); + } + return chroma; + } + + @Override + public DynamicValue copy() { + return new ChromaSpringjackShepherdCount(); + } + + @Override + public String toString() { + return "1"; + } + + @Override + public String getMessage() { + return ""; + } } diff --git a/Mage.Sets/src/mage/sets/exodus/DauthiCutthroat.java b/Mage.Sets/src/mage/sets/exodus/DauthiCutthroat.java new file mode 100644 index 00000000000..031474abcb2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/exodus/DauthiCutthroat.java @@ -0,0 +1,83 @@ +/* + * 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.exodus; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.keyword.ShadowAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class DauthiCutthroat extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with shadow"); + + static { + filter.add(new AbilityPredicate(ShadowAbility.class)); + } + + public DauthiCutthroat(UUID ownerId) { + super(ownerId, 57, "Dauthi Cutthroat", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "EXO"; + this.subtype.add("Dauthi"); + this.subtype.add("Minion"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Shadow + this.addAbility(ShadowAbility.getInstance()); + // {1}{B}, {tap}: Destroy target creature with shadow. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{B}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public DauthiCutthroat(final DauthiCutthroat card) { + super(card); + } + + @Override + public DauthiCutthroat copy() { + return new DauthiCutthroat(this); + } +} diff --git a/Mage.Sets/src/mage/sets/exodus/PegasusStampede.java b/Mage.Sets/src/mage/sets/exodus/PegasusStampede.java index 908aee2eb2e..7d9869a6633 100644 --- a/Mage.Sets/src/mage/sets/exodus/PegasusStampede.java +++ b/Mage.Sets/src/mage/sets/exodus/PegasusStampede.java @@ -32,12 +32,11 @@ import mage.MageInt; import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.BuybackAbility; -import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.filter.common.FilterControlledLandPermanent; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.PegasusToken; import mage.target.common.TargetControlledPermanent; /** @@ -52,7 +51,7 @@ public class PegasusStampede extends CardImpl { // Buyback-Sacrifice a land. this.addAbility(new BuybackAbility(new SacrificeTargetCost(new TargetControlledPermanent(1,1, new FilterControlledLandPermanent(), true)))); - + // Put a 1/1 white Pegasus creature token with flying onto the battlefield. this.getSpellAbility().addEffect(new CreateTokenEffect(new PegasusToken())); } @@ -66,16 +65,3 @@ public class PegasusStampede extends CardImpl { return new PegasusStampede(this); } } - -class PegasusToken extends Token { - - PegasusToken() { - super("Pegasus", "1/1 white Pegasus creature token with flying"); - cardType.add(CardType.CREATURE); - color.setWhite(true); - subtype.add("Pegasus"); - power = new MageInt(1); - toughness = new MageInt(1); - addAbility(FlyingAbility.getInstance()); - } -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/fatereforged/FlamerushRider.java b/Mage.Sets/src/mage/sets/fatereforged/FlamerushRider.java index 888ce088d0b..784e936b901 100644 --- a/Mage.Sets/src/mage/sets/fatereforged/FlamerushRider.java +++ b/Mage.Sets/src/mage/sets/fatereforged/FlamerushRider.java @@ -112,7 +112,7 @@ class FlamerushRiderEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); Permanent permanent = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source)); if (controller != null && permanent != null) { - PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(source.getControllerId(), null, true); + PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(source.getControllerId(), null, true, 1, true, true); effect.setTargetPointer(new FixedTarget(permanent, game)); effect.apply(game, source); for (Permanent addedToken : effect.getAddedPermanent()) { diff --git a/Mage.Sets/src/mage/sets/fifthedition/Aurochs.java b/Mage.Sets/src/mage/sets/fifthedition/Aurochs.java new file mode 100644 index 00000000000..78e90439d46 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/Aurochs.java @@ -0,0 +1,52 @@ +/* + * 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.fifthedition; + +import java.util.UUID; + +/** + * + * @author anonymous + */ +public class Aurochs extends mage.sets.iceage.Aurochs { + + public Aurochs(UUID ownerId) { + super(ownerId); + this.cardNumber = 141; + this.expansionSetCode = "5ED"; + } + + public Aurochs(final Aurochs card) { + super(card); + } + + @Override + public Aurochs copy() { + return new Aurochs(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthedition/Flood.java b/Mage.Sets/src/mage/sets/fifthedition/Flood.java new file mode 100644 index 00000000000..cd715597cef --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/Flood.java @@ -0,0 +1,52 @@ +/* + * 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.fifthedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class Flood extends mage.sets.fourthedition.Flood { + + public Flood(UUID ownerId) { + super(ownerId); + this.cardNumber = 87; + this.expansionSetCode = "5ED"; + } + + public Flood(final Flood card) { + super(card); + } + + @Override + public Flood copy() { + return new Flood(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fourthedition/Flood.java b/Mage.Sets/src/mage/sets/fourthedition/Flood.java new file mode 100644 index 00000000000..642a518bf89 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fourthedition/Flood.java @@ -0,0 +1,75 @@ +/* + * 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.fourthedition; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class Flood extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature without flying"); + + static { + filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); + } + + public Flood(UUID ownerId) { + super(ownerId, 73, "Flood", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{U}"); + this.expansionSetCode = "4ED"; + + // {U}{U}: Tap target creature without flying. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new ManaCostsImpl("{U}{U}")); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public Flood(final Flood card) { + super(card); + } + + @Override + public Flood copy() { + return new Flood(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fourthedition/SunkenCity.java b/Mage.Sets/src/mage/sets/fourthedition/SunkenCity.java new file mode 100644 index 00000000000..e5c8de8c8a8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fourthedition/SunkenCity.java @@ -0,0 +1,54 @@ +/* + * 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.fourthedition; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class SunkenCity extends mage.sets.mastersedition.SunkenCity { + + public SunkenCity(UUID ownerId) { + super(ownerId); + this.cardNumber = 106; + this.expansionSetCode = "4ED"; + this.rarity = Rarity.COMMON; + } + + public SunkenCity(final SunkenCity card) { + super(card); + } + + @Override + public SunkenCity copy() { + return new SunkenCity(this); + } +} diff --git a/Mage.Sets/src/mage/sets/futuresight/CutthroatIlDal.java b/Mage.Sets/src/mage/sets/futuresight/CutthroatIlDal.java new file mode 100644 index 00000000000..b74a7724e2b --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/CutthroatIlDal.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.sets.futuresight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.HellbentCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.ShadowAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class CutthroatIlDal extends CardImpl { + + public CutthroatIlDal(UUID ownerId) { + super(ownerId, 64, "Cutthroat il-Dal", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "FUT"; + this.subtype.add("Human"); + this.subtype.add("Rogue"); + this.power = new MageInt(4); + this.toughness = new MageInt(1); + + // Hellbent - Cutthroat il-Dal has shadow as long as you have no cards in hand. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new GainAbilitySourceEffect(ShadowAbility.getInstance(), Duration.WhileOnBattlefield), HellbentCondition.getInstance(), + "Hellbent - {this} has shadow as long as you have no cards in hand"))); } + + public CutthroatIlDal(final CutthroatIlDal card) { + super(card); + } + + @Override + public CutthroatIlDal copy() { + return new CutthroatIlDal(this); + } +} diff --git a/Mage.Sets/src/mage/sets/futuresight/GraveScrabbler.java b/Mage.Sets/src/mage/sets/futuresight/GraveScrabbler.java new file mode 100644 index 00000000000..44e7ee27ac2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/GraveScrabbler.java @@ -0,0 +1,47 @@ +package mage.sets.futuresight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.keyword.MadnessAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreatureCard; +import mage.target.common.TargetCardInGraveyard; + +public class GraveScrabbler extends CardImpl { + + public GraveScrabbler(UUID ownerId) { + super(ownerId, 86, "Grave Scrabbler", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "FUT"; + this.subtype.add("Zombie"); + + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + //Madness {1}{B} + this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{1}{B}"))); + + //When Grave Scrabbler enters the battlefield, if its madness cost was paid, + //you may return target creature card from a graveyard to its owner's hand. + EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true); + ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card in a graveyard"))); + this.addAbility(new ConditionalTriggeredAbility(ability, MadnessAbility.GetCondition(), + "When {this} enters the battlefield, if its madness cost was paid, you may return target creature card from a graveyard to its owner's hand.")); + } + + public GraveScrabbler(final GraveScrabbler card) { + super(card); + } + + @Override + public Card copy() { + return new GraveScrabbler(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/futuresight/InfiltratorIlKor.java b/Mage.Sets/src/mage/sets/futuresight/InfiltratorIlKor.java new file mode 100644 index 00000000000..0b402309a6d --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/InfiltratorIlKor.java @@ -0,0 +1,67 @@ +/* + * 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.futuresight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.ShadowAbility; +import mage.abilities.keyword.SuspendAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class InfiltratorIlKor extends CardImpl { + + public InfiltratorIlKor(UUID ownerId) { + super(ownerId, 37, "Infiltrator il-Kor", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "FUT"; + this.subtype.add("Kor"); + this.subtype.add("Rogue"); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // Shadow + this.addAbility(ShadowAbility.getInstance()); + // Suspend 2-{1}{U} + this.addAbility(new SuspendAbility(2, new ManaCostsImpl("{1}{U}"), this)); + } + + public InfiltratorIlKor(final InfiltratorIlKor card) { + super(card); + } + + @Override + public InfiltratorIlKor copy() { + return new InfiltratorIlKor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/futuresight/VenserShaperSavant.java b/Mage.Sets/src/mage/sets/futuresight/VenserShaperSavant.java index 1045ba09c7c..ff25793eca5 100644 --- a/Mage.Sets/src/mage/sets/futuresight/VenserShaperSavant.java +++ b/Mage.Sets/src/mage/sets/futuresight/VenserShaperSavant.java @@ -31,18 +31,11 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.keyword.FlashAbility; -import mage.cards.Card; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.game.stack.Spell; -import mage.players.Player; import mage.target.Target; import mage.target.common.TargetSpellOrPermanent; @@ -65,7 +58,7 @@ public class VenserShaperSavant extends CardImpl { // Flash this.addAbility(FlashAbility.getInstance()); // When Venser, Shaper Savant enters the battlefield, return target spell or permanent to its owner's hand. - Ability ability = new EntersBattlefieldTriggeredAbility(new VenserShaperSavantEffect(), false); + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(true), false); Target target = new TargetSpellOrPermanent(); ability.addTarget(target); this.addAbility(ability); @@ -80,56 +73,3 @@ public class VenserShaperSavant extends CardImpl { return new VenserShaperSavant(this); } } - -class VenserShaperSavantEffect extends OneShotEffect { - - public VenserShaperSavantEffect() { - super(Outcome.ReturnToHand); - this.staticText = "return target spell or permanent to its owner's hand"; - } - - public VenserShaperSavantEffect(final VenserShaperSavantEffect effect) { - super(effect); - } - - @Override - public VenserShaperSavantEffect copy() { - return new VenserShaperSavantEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - Permanent permanent = game.getPermanent(this.getTargetPointer().getFirst(game, source)); - if (permanent != null) { - return controller.moveCards(permanent, null, Zone.HAND, source, game); - } - - /** - * 01.05.2007 If a spell is returned to its owner's hand, it's - * removed from the stack and thus will not resolve. The spell isn't - * countered; it just no longer exists. 01.05.2007 If a copy of a - * spell is returned to its owner's hand, it's moved there, then it - * will cease to exist as a state-based action. 01.05.2007 If - * Venser's enters-the-battlefield ability targets a spell cast with - * flashback, that spell will be exiled instead of returning to its - * owner's hand. - */ - Spell spell = game.getStack().getSpell(this.getTargetPointer().getFirst(game, source)); - if (spell != null) { - Card card = null; - if (!spell.isCopy()) { - card = spell.getCard(); - } - game.getStack().remove(spell); - if (card != null) { - controller.moveCards(card, null, Zone.HAND, source, game); - } - return true; - } - - } - return false; - } -} diff --git a/Mage.Sets/src/mage/sets/gatecrash/NimbusSwimmer.java b/Mage.Sets/src/mage/sets/gatecrash/NimbusSwimmer.java index e7dbf68a9cb..eacb454a99b 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/NimbusSwimmer.java +++ b/Mage.Sets/src/mage/sets/gatecrash/NimbusSwimmer.java @@ -29,18 +29,13 @@ package mage.sets.gatecrash; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.common.EntersBattlefieldAbility; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; import mage.counters.CounterType; -import mage.game.Game; -import mage.game.permanent.Permanent; /** * @@ -59,7 +54,7 @@ public class NimbusSwimmer extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); // Nimbus Swimmer enters the battlefield with X +1/+1 counters on it. - this.addAbility(new EntersBattlefieldAbility(new NimbusSwimmerEffect(), true)); + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance()))); } public NimbusSwimmer(final NimbusSwimmer card) { @@ -71,37 +66,3 @@ public class NimbusSwimmer extends CardImpl { return new NimbusSwimmer(this); } } - -class NimbusSwimmerEffect extends OneShotEffect { - - public NimbusSwimmerEffect() { - super(Outcome.BoostCreature); - staticText = "{this} enters the battlefield with X +1/+1 counters on it"; - } - - public NimbusSwimmerEffect(final NimbusSwimmerEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - SpellAbility spellAbility = (SpellAbility) getValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (spellAbility != null - && spellAbility.getSourceId().equals(source.getSourceId()) - && permanent.getZoneChangeCounter(game) - 1 == spellAbility.getSourceObjectZoneChangeCounter()) { - int amount = spellAbility.getManaCostsToPay().getX(); - if (amount > 0) { - permanent.addCounters(CounterType.P1P1.createInstance(amount), game); - } - } - } - return true; - } - - @Override - public NimbusSwimmerEffect copy() { - return new NimbusSwimmerEffect(this); - } -} diff --git a/Mage.Sets/src/mage/sets/guildpact/StormHerd.java b/Mage.Sets/src/mage/sets/guildpact/StormHerd.java index 0e623afe8bf..82a2fe9002e 100644 --- a/Mage.Sets/src/mage/sets/guildpact/StormHerd.java +++ b/Mage.Sets/src/mage/sets/guildpact/StormHerd.java @@ -31,11 +31,10 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.dynamicvalue.common.ControllerLifeCount; import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.PegasusToken; /** * @@ -60,16 +59,3 @@ public class StormHerd extends CardImpl { return new StormHerd(this); } } - -class PegasusToken extends Token { - - public PegasusToken() { - super("Pegasus", "1/1 white Pegasus creature tokens with flying"); - cardType.add(CardType.CREATURE); - color.setWhite(true); - subtype.add("Pegasus"); - power = new MageInt(1); - toughness = new MageInt(1); - addAbility(FlyingAbility.getInstance()); - } -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/guildpact/WurmweaverCoil.java b/Mage.Sets/src/mage/sets/guildpact/WurmweaverCoil.java index da5e93aa789..afc106c50d5 100644 --- a/Mage.Sets/src/mage/sets/guildpact/WurmweaverCoil.java +++ b/Mage.Sets/src/mage/sets/guildpact/WurmweaverCoil.java @@ -28,8 +28,6 @@ package mage.sets.guildpact; import java.util.UUID; - -import mage.constants.*; import mage.MageInt; import mage.ObjectColor; import mage.abilities.Ability; @@ -42,9 +40,14 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.continuous.BoostEnchantedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.WurmToken; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -71,7 +74,7 @@ public class WurmweaverCoil extends CardImpl { Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(6, 6, Duration.WhileOnBattlefield))); - Ability activatedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new WurmweaverCoilToken(), 1), new ManaCostsImpl("{G}{G}{G}")); + Ability activatedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new WurmToken(), 1), new ManaCostsImpl("{G}{G}{G}")); activatedAbility.addCost(new SacrificeSourceCost()); this.addAbility(activatedAbility); } @@ -85,14 +88,3 @@ public class WurmweaverCoil extends CardImpl { return new WurmweaverCoil(this); } } - -class WurmweaverCoilToken extends Token { - WurmweaverCoilToken() { - super("Wurm", "6/6 green Wurm creature token"); - cardType.add(CardType.CREATURE); - color.setGreen(true); - subtype.add("Wurm"); - power = new MageInt(6); - toughness = new MageInt(6); - } -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/homelands/ClockworkGnomes.java b/Mage.Sets/src/mage/sets/homelands/ClockworkGnomes.java new file mode 100644 index 00000000000..d46a6c006b4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/ClockworkGnomes.java @@ -0,0 +1,54 @@ +/* + * 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.homelands; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author hanasu + */ +public class ClockworkGnomes extends mage.sets.masterseditioniv.ClockworkGnomes { + + public ClockworkGnomes(UUID ownerId) { + super(ownerId); + this.cardNumber = 127; + this.expansionSetCode = "HML"; + this.rarity = Rarity.COMMON; + } + + public ClockworkGnomes(final ClockworkGnomes card) { + super(card); + } + + @Override + public ClockworkGnomes copy() { + return new ClockworkGnomes(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/GrandmotherSengir.java b/Mage.Sets/src/mage/sets/homelands/GrandmotherSengir.java new file mode 100644 index 00000000000..a1b27a00df1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/GrandmotherSengir.java @@ -0,0 +1,52 @@ +/* + * 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.homelands; + +import java.util.UUID; + +/** + * + * @author hanasu + */ +public class GrandmotherSengir extends mage.sets.masterseditionii.GrandmotherSengir { + + public GrandmotherSengir(UUID ownerId) { + super(ownerId); + this.cardNumber = 13; + this.expansionSetCode = "HML"; + } + + public GrandmotherSengir(final GrandmotherSengir card) { + super(card); + } + + @Override + public GrandmotherSengir copy() { + return new GrandmotherSengir(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/RevekaWizardSavant.java b/Mage.Sets/src/mage/sets/homelands/RevekaWizardSavant.java new file mode 100644 index 00000000000..8a878245f28 --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/RevekaWizardSavant.java @@ -0,0 +1,54 @@ +/* + * 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.homelands; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author hanasu + */ +public class RevekaWizardSavant extends mage.sets.masterseditioniii.RevekaWizardSavant { + + public RevekaWizardSavant(UUID ownerId) { + super(ownerId); + this.cardNumber = 47; + this.expansionSetCode = "HML"; + this.rarity = Rarity.RARE; + } + + public RevekaWizardSavant(final RevekaWizardSavant card) { + super(card); + } + + @Override + public RevekaWizardSavant copy() { + return new RevekaWizardSavant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/AegisOfTheMeek.java b/Mage.Sets/src/mage/sets/iceage/AegisOfTheMeek.java new file mode 100644 index 00000000000..e6173c3bda6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/AegisOfTheMeek.java @@ -0,0 +1,79 @@ +/* + * 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.iceage; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.Filter; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.filter.predicate.mageobject.ToughnessPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Leathios + */ +public class AegisOfTheMeek extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("1/1 creature"); + + static { + filter.add(new PowerPredicate(Filter.ComparisonType.Equal, 1)); + filter.add(new ToughnessPredicate(Filter.ComparisonType.Equal, 1)); + } + + public AegisOfTheMeek(UUID ownerId) { + super(ownerId, 282, "Aegis of the Meek", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{3}"); + this.expansionSetCode = "ICE"; + + // {1}, {T}: Target 1/1 creature gets +1/+2 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(1, 2, Duration.EndOfTurn), new ManaCostsImpl("{1}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public AegisOfTheMeek(final AegisOfTheMeek card) { + super(card); + } + + @Override + public AegisOfTheMeek copy() { + return new AegisOfTheMeek(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/Aurochs.java b/Mage.Sets/src/mage/sets/iceage/Aurochs.java new file mode 100644 index 00000000000..109a175ff29 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/Aurochs.java @@ -0,0 +1,80 @@ +/* + * 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.iceage; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterAttackingCreature; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author anonymous + */ +public class Aurochs extends CardImpl { + + private static final FilterAttackingCreature filter1 = new FilterAttackingCreature("other attacking Aurochs"); + + static { + filter1.add(new SubtypePredicate("Aurochs")); + filter1.add(new AnotherPredicate()); + } + + public Aurochs(UUID ownerId) { + super(ownerId, 113, "Aurochs", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "ICE"; + this.subtype.add("Aurochs"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + // Whenever Aurochs attacks, it gets +1/+0 until end of turn for each other attacking Aurochs. + PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(filter1, 1); + this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(value, new StaticValue(0), Duration.EndOfTurn, true), false)); + } + + public Aurochs(final Aurochs card) { + super(card); + } + + @Override + public Aurochs copy() { + return new Aurochs(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/FanaticalFever.java b/Mage.Sets/src/mage/sets/iceage/FanaticalFever.java new file mode 100644 index 00000000000..82ecfeef4ca --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/FanaticalFever.java @@ -0,0 +1,64 @@ +/* + * 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.iceage; + +import java.util.UUID; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author hanasu + */ +public class FanaticalFever extends CardImpl { + + public FanaticalFever(UUID ownerId) { + super(ownerId, 122, "Fanatical Fever", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{G}{G}"); + this.expansionSetCode = "ICE"; + + // Target creature gets +3/+0 and gains trample until end of turn. + this.getSpellAbility().addEffect(new BoostTargetEffect(3, 0, Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public FanaticalFever(final FanaticalFever card) { + super(card); + } + + @Override + public FanaticalFever copy() { + return new FanaticalFever(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/FolkOfThePines.java b/Mage.Sets/src/mage/sets/iceage/FolkOfThePines.java new file mode 100644 index 00000000000..58da771154d --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/FolkOfThePines.java @@ -0,0 +1,52 @@ +/* + * 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.iceage; + +import java.util.UUID; + +/** + * + * @author anonymous + */ +public class FolkOfThePines extends mage.sets.masterseditionii.FolkOfThePines { + + public FolkOfThePines(UUID ownerId) { + super(ownerId); + this.cardNumber = 123; + this.expansionSetCode = "ICE"; + } + + public FolkOfThePines(final FolkOfThePines card) { + super(card); + } + + @Override + public FolkOfThePines copy() { + return new FolkOfThePines(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/HoarShade.java b/Mage.Sets/src/mage/sets/iceage/HoarShade.java new file mode 100644 index 00000000000..bd4425138da --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/HoarShade.java @@ -0,0 +1,67 @@ +/* + * 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.iceage; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ColoredManaCost; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.ColoredManaSymbol; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author hanasu + */ +public class HoarShade extends CardImpl { + + public HoarShade(UUID ownerId) { + super(ownerId, 19, "Hoar Shade", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "ICE"; + this.subtype.add("Shade"); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // {B}: Hoar Shade gets +1/+1 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.B))); + } + + public HoarShade(final HoarShade card) { + super(card); + } + + @Override + public HoarShade copy() { + return new HoarShade(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/JuniperOrderDruid.java b/Mage.Sets/src/mage/sets/iceage/JuniperOrderDruid.java new file mode 100644 index 00000000000..ee317ff7673 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/JuniperOrderDruid.java @@ -0,0 +1,71 @@ +/* + * 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.iceage; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author hanasu + */ +public class JuniperOrderDruid extends CardImpl { + + public JuniperOrderDruid(UUID ownerId) { + super(ownerId, 139, "Juniper Order Druid", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "ICE"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + this.subtype.add("Druid"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}: Untap target land. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new TapSourceCost()); + ability.addTarget(new TargetLandPermanent()); + this.addAbility(ability); + } + + public JuniperOrderDruid(final JuniperOrderDruid card) { + super(card); + } + + @Override + public JuniperOrderDruid copy() { + return new JuniperOrderDruid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/ShamblingStrider.java b/Mage.Sets/src/mage/sets/iceage/ShamblingStrider.java new file mode 100644 index 00000000000..7e1cd13bd8c --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/ShamblingStrider.java @@ -0,0 +1,52 @@ +/* + * 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.iceage; + +import java.util.UUID; + +/** + * + * @author hanasu + */ +public class ShamblingStrider extends mage.sets.mastersedition.ShamblingStrider { + + public ShamblingStrider(UUID ownerId) { + super(ownerId); + this.cardNumber = 151; + this.expansionSetCode = "ICE"; + } + + public ShamblingStrider(final ShamblingStrider card) { + super(card); + } + + @Override + public ShamblingStrider copy() { + return new ShamblingStrider(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/SoldeviMachinist.java b/Mage.Sets/src/mage/sets/iceage/SoldeviMachinist.java new file mode 100644 index 00000000000..9df965ecfd5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/SoldeviMachinist.java @@ -0,0 +1,52 @@ +/* + * 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.iceage; + +import java.util.UUID; + +/** + * + * @author anonymous + */ +public class SoldeviMachinist extends mage.sets.masterseditioniv.SoldeviMachinist { + + public SoldeviMachinist(UUID ownerId) { + super(ownerId); + this.cardNumber = 102; + this.expansionSetCode = "ICE"; + } + + public SoldeviMachinist(final SoldeviMachinist card) { + super(card); + } + + @Override + public SoldeviMachinist copy() { + return new SoldeviMachinist(this); + } +} diff --git a/Mage.Sets/src/mage/sets/innistrad/MikaeusTheLunarch.java b/Mage.Sets/src/mage/sets/innistrad/MikaeusTheLunarch.java index c87a6c44bc4..2eb92ada3ea 100644 --- a/Mage.Sets/src/mage/sets/innistrad/MikaeusTheLunarch.java +++ b/Mage.Sets/src/mage/sets/innistrad/MikaeusTheLunarch.java @@ -30,26 +30,21 @@ package mage.sets.innistrad; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.RemoveCountersSourceCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.Effect; -import mage.abilities.effects.EntersBattlefieldEffect; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.abilities.effects.common.counter.AddCountersAllEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; /** * @author nantuko @@ -73,7 +68,7 @@ public class MikaeusTheLunarch extends CardImpl { this.toughness = new MageInt(0); // Mikaeus, the Lunarch enters the battlefield with X +1/+1 counters on it. - this.addAbility(new EntersBattlefieldAbility(new MikaeusTheLunarchEffect())); + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance()))); // {T}: Put a +1/+1 counter on Mikaeus. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new TapSourceCost())); @@ -94,38 +89,3 @@ public class MikaeusTheLunarch extends CardImpl { return new MikaeusTheLunarch(this); } } - -class MikaeusTheLunarchEffect extends OneShotEffect { - - public MikaeusTheLunarchEffect() { - super(Outcome.BoostCreature); - staticText = "{this} enters the battlefield with X +1/+1 counters on it"; - } - - public MikaeusTheLunarchEffect(final MikaeusTheLunarchEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (spellAbility != null - && spellAbility.getSourceId().equals(source.getSourceId()) - && permanent.getZoneChangeCounter(game) - 1 == spellAbility.getSourceObjectZoneChangeCounter()) { - int amount = spellAbility.getManaCostsToPay().getX(); - if (amount > 0) { - permanent.addCounters(CounterType.P1P1.createInstance(amount), game); - } - } - } - return true; - } - - @Override - public MikaeusTheLunarchEffect copy() { - return new MikaeusTheLunarchEffect(this); - } - -} diff --git a/Mage.Sets/src/mage/sets/innistrad/SkirsdagHighPriest.java b/Mage.Sets/src/mage/sets/innistrad/SkirsdagHighPriest.java index 08e333a7ef6..16fef1058fe 100644 --- a/Mage.Sets/src/mage/sets/innistrad/SkirsdagHighPriest.java +++ b/Mage.Sets/src/mage/sets/innistrad/SkirsdagHighPriest.java @@ -44,7 +44,7 @@ import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.permanent.TappedPredicate; import mage.game.Game; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.DemonToken; import mage.target.common.TargetControlledCreaturePermanent; /** @@ -111,18 +111,3 @@ class SkirsdagHighPriestCost extends CostImpl { return paid; } } - -class DemonToken extends Token { - - DemonToken() { - super("Demon", "5/5 black Demon creature token with flying"); - cardType.add(CardType.CREATURE); - subtype.add("Demon"); - - color.setBlack(true); - power = new MageInt(5); - toughness = new MageInt(5); - - addAbility(FlyingAbility.getInstance()); - } -} diff --git a/Mage.Sets/src/mage/sets/jacevschandra/FathomSeer.java b/Mage.Sets/src/mage/sets/jacevschandra/FathomSeer.java index b3b9fa11778..e322cd800d2 100644 --- a/Mage.Sets/src/mage/sets/jacevschandra/FathomSeer.java +++ b/Mage.Sets/src/mage/sets/jacevschandra/FathomSeer.java @@ -30,7 +30,7 @@ package mage.sets.jacevschandra; import java.util.UUID; import mage.MageInt; import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; @@ -60,7 +60,7 @@ public class FathomSeer extends CardImpl { this.toughness = new MageInt(3); // Morph-Return two Islands you control to their owner's hand. - this.addAbility(new MorphAbility(this, new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(2,2, filter, true)))); + this.addAbility(new MorphAbility(this, new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(2,2, filter, true)))); // When Fathom Seer is turned face up, draw two cards. this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new DrawCardSourceControllerEffect(2))); } diff --git a/Mage.Sets/src/mage/sets/jacevschandra/Gush.java b/Mage.Sets/src/mage/sets/jacevschandra/Gush.java index eabcd98d8c8..ab9d0a300fa 100644 --- a/Mage.Sets/src/mage/sets/jacevschandra/Gush.java +++ b/Mage.Sets/src/mage/sets/jacevschandra/Gush.java @@ -29,7 +29,7 @@ package mage.sets.jacevschandra; import java.util.UUID; import mage.abilities.costs.AlternativeCostSourceAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.constants.CardType; @@ -55,7 +55,7 @@ public class Gush extends CardImpl { // You may return two Islands you control to their owner's hand rather than pay Gush's mana cost. AlternativeCostSourceAbility ability; - ability = new AlternativeCostSourceAbility(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(2, 2, filter, true))); + ability = new AlternativeCostSourceAbility(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(2, 2, filter, true))); this.addAbility(ability); // Draw two cards. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2)); diff --git a/Mage.Sets/src/mage/sets/jacevschandra/WaterspoutDjinn.java b/Mage.Sets/src/mage/sets/jacevschandra/WaterspoutDjinn.java index ecf4bef9930..711ed79fc65 100644 --- a/Mage.Sets/src/mage/sets/jacevschandra/WaterspoutDjinn.java +++ b/Mage.Sets/src/mage/sets/jacevschandra/WaterspoutDjinn.java @@ -30,7 +30,7 @@ package mage.sets.jacevschandra; import java.util.UUID; import mage.MageInt; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; @@ -67,7 +67,7 @@ public class WaterspoutDjinn extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // At the beginning of your upkeep, sacrifice Waterspout Djinn unless you return an untapped Island you control to its owner's hand. this.addAbility(new BeginningOfUpkeepTriggeredAbility( - new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))), + new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))), TargetController.YOU, false)); } diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/DictateOfErebos.java b/Mage.Sets/src/mage/sets/journeyintonyx/DictateOfErebos.java index 6fd46c4aaf0..82b8bc6e849 100644 --- a/Mage.Sets/src/mage/sets/journeyintonyx/DictateOfErebos.java +++ b/Mage.Sets/src/mage/sets/journeyintonyx/DictateOfErebos.java @@ -44,22 +44,21 @@ import mage.filter.predicate.permanent.ControllerPredicate; * @author LevelX2 */ public class DictateOfErebos extends CardImpl { - + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you control"); - + static { filter.add(new ControllerPredicate(TargetController.YOU)); } - + public DictateOfErebos(UUID ownerId) { super(ownerId, 65, "Dictate of Erebos", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}{B}"); this.expansionSetCode = "JOU"; - // Flash this.addAbility(FlashAbility.getInstance()); // Whenever a creature you control dies, each opponent sacrifices a creature. - this.addAbility(new DiesCreatureTriggeredAbility(new SacrificeOpponentsEffect(new FilterControlledCreaturePermanent("a creature")), false, filter)); + this.addAbility(new DiesCreatureTriggeredAbility(new SacrificeOpponentsEffect(new FilterControlledCreaturePermanent("a creature")), false, filter)); } public DictateOfErebos(final DictateOfErebos card) { diff --git a/Mage.Sets/src/mage/sets/judgment/BookBurning.java b/Mage.Sets/src/mage/sets/judgment/BookBurning.java new file mode 100644 index 00000000000..c6ff0c160f7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/judgment/BookBurning.java @@ -0,0 +1,107 @@ +/* + * 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.judgment; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPlayer; + +/** + * + * @author tomd1990 + */ +public class BookBurning extends CardImpl { + + public BookBurning(UUID ownerId) { + super(ownerId, 80, "Book Burning", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{R}"); + this.expansionSetCode = "JUD"; + + // Any player may have Book Burning deal 6 damage to him or her. If no one does, target player puts the top six cards of his or her library into his or her graveyard. + this.getSpellAbility().addEffect(new BookBurningMillEffect()); + this.getSpellAbility().addTarget(new TargetPlayer()); + } + + public BookBurning(final BookBurning card) { + super(card); + } + + @Override + public BookBurning copy() { + return new BookBurning(this); + } +} + +class BookBurningMillEffect extends OneShotEffect { + + public BookBurningMillEffect() { + super(Outcome.Detriment); + staticText = "Any player may have {source} deal 6 damage to him or her. If no one does, target player puts the top six cards of his or her library into his or her graveyard"; + } + + public BookBurningMillEffect(final BookBurningMillEffect effect) { + super(effect); + } + + @Override + public BookBurningMillEffect copy() { + return new BookBurningMillEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + MageObject sourceObject = source.getSourceObject(game); + if (sourceObject != null) { + boolean millCards = true; + for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null && player.chooseUse(Outcome.Detriment, "Have " + sourceObject.getLogName() + " deal 6 damage to you?", source, game)) { + millCards = false; + player.damage(6, source.getSourceId(), game, false, true); + game.informPlayers(player.getLogName() + " has " + sourceObject.getLogName() + " deal 6 damage to him or her"); + } + } + if (millCards) { + Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source)); + if (targetPlayer != null) { + targetPlayer.moveCards(targetPlayer.getLibrary().getTopCards(game, 6), Zone.LIBRARY, Zone.GRAVEYARD, source, game); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/BribersPurse.java b/Mage.Sets/src/mage/sets/khansoftarkir/BribersPurse.java index ac166275b31..4e539b0a845 100644 --- a/Mage.Sets/src/mage/sets/khansoftarkir/BribersPurse.java +++ b/Mage.Sets/src/mage/sets/khansoftarkir/BribersPurse.java @@ -29,24 +29,19 @@ package mage.sets.khansoftarkir; import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.RemoveCountersSourceCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.EntersBattlefieldEffect; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.abilities.effects.common.combat.CantAttackBlockTargetEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; -import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; import mage.counters.Counter; -import mage.game.Game; -import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; /** @@ -60,7 +55,7 @@ public class BribersPurse extends CardImpl { this.expansionSetCode = "KTK"; // Briber's Purse enters the battlefield with X gem counters on it. - this.addAbility(new EntersBattlefieldAbility(new BribersPurseEffect(), "{this} enters the battlefield with X gem counters on it")); + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(new Counter("gem")))); // {1}, {T}, Remove a gem counter from Briber's Purse: Target creature can't attack or block this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantAttackBlockTargetEffect(Duration.EndOfTurn), new GenericManaCost(1)); @@ -79,36 +74,3 @@ public class BribersPurse extends CardImpl { return new BribersPurse(this); } } - -class BribersPurseEffect extends OneShotEffect { - - public BribersPurseEffect() { - super(Outcome.Benefit); - } - - public BribersPurseEffect(final BribersPurseEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (spellAbility != null - && spellAbility.getSourceId().equals(source.getSourceId()) - && permanent.getZoneChangeCounter(game) - 1 == spellAbility.getSourceObjectZoneChangeCounter()) { - int amount = spellAbility.getManaCostsToPay().getX(); - if (amount > 0) { - permanent.addCounters(new Counter("gem", amount), game); - } - } - } - return true; - } - - @Override - public BribersPurseEffect copy() { - return new BribersPurseEffect(this); - } -} diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/HeraldOfAnafenza.java b/Mage.Sets/src/mage/sets/khansoftarkir/HeraldOfAnafenza.java index d1383261c6f..09e806e8bab 100644 --- a/Mage.Sets/src/mage/sets/khansoftarkir/HeraldOfAnafenza.java +++ b/Mage.Sets/src/mage/sets/khansoftarkir/HeraldOfAnafenza.java @@ -40,7 +40,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.WarriorToken; import mage.game.stack.StackAbility; /** @@ -79,7 +79,7 @@ public class HeraldOfAnafenza extends CardImpl { class HeraldOfAnafenzaTriggeredAbility extends TriggeredAbilityImpl { public HeraldOfAnafenzaTriggeredAbility() { - super(Zone.BATTLEFIELD, new CreateTokenEffect(new HeraldOfAnafenzaWarriorToken()), false); + super(Zone.BATTLEFIELD, new CreateTokenEffect(new WarriorToken()), false); } public HeraldOfAnafenzaTriggeredAbility(final HeraldOfAnafenzaTriggeredAbility ability) { @@ -90,7 +90,7 @@ class HeraldOfAnafenzaTriggeredAbility extends TriggeredAbilityImpl { public HeraldOfAnafenzaTriggeredAbility copy() { return new HeraldOfAnafenzaTriggeredAbility(this); } - + @Override public boolean checkEventType(GameEvent event, Game game) { return event.getType() == GameEvent.EventType.ACTIVATED_ABILITY; @@ -112,18 +112,3 @@ class HeraldOfAnafenzaTriggeredAbility extends TriggeredAbilityImpl { return "Whenever you activate {this}'s outlast ability, " + super.getRule(); } } - -class HeraldOfAnafenzaWarriorToken extends Token { - - public HeraldOfAnafenzaWarriorToken() { - super("Warrior", "1/1 white Warrior creature token"); - this.setOriginalExpansionSetCode("KTK"); - this.setTokenType(1); - cardType.add(CardType.CREATURE); - subtype.add("Warrior"); - - color.setWhite(true); - power = new MageInt(1); - toughness = new MageInt(1); - } -} diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/HoodedHydra.java b/Mage.Sets/src/mage/sets/khansoftarkir/HoodedHydra.java index 9f577aba4dc..00f8710f667 100644 --- a/Mage.Sets/src/mage/sets/khansoftarkir/HoodedHydra.java +++ b/Mage.Sets/src/mage/sets/khansoftarkir/HoodedHydra.java @@ -30,7 +30,6 @@ package mage.sets.khansoftarkir; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleStaticAbility; @@ -38,19 +37,15 @@ import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.dynamicvalue.common.CountersCount; import mage.abilities.effects.AsTurnedFaceUpEffect; import mage.abilities.effects.Effect; -import mage.abilities.effects.EntersBattlefieldEffect; -import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; import mage.counters.CounterType; -import mage.game.Game; -import mage.game.permanent.Permanent; import mage.game.permanent.token.SnakeToken; /** @@ -69,7 +64,7 @@ public class HoodedHydra extends CardImpl { this.toughness = new MageInt(0); // Hooded Hydra enters the battlefield with X +1/+1 counters on it. - this.addAbility(new EntersBattlefieldAbility(new HoodedHydraEffect1(), "with X +1/+1 counters on it")); + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance()))); // When Hooded Hydra dies, put a 1/1 green Snake creature token onto the battlefield for each +1/+1 counter on it. this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new SnakeToken("KTK"), new CountersCount(CounterType.P1P1)), false)); @@ -95,38 +90,3 @@ public class HoodedHydra extends CardImpl { return new HoodedHydra(this); } } - -class HoodedHydraEffect1 extends OneShotEffect { - - public HoodedHydraEffect1() { - super(Outcome.BoostCreature); - staticText = "{this} enters the battlefield with X +1/+1 counters on it"; - } - - public HoodedHydraEffect1(final HoodedHydraEffect1 effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null && !permanent.isFaceDown(game)) { - SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (spellAbility != null - && spellAbility.getSourceId().equals(source.getSourceId()) - && permanent.getZoneChangeCounter(game) - 1 == spellAbility.getSourceObjectZoneChangeCounter()) { - int amount = spellAbility.getManaCostsToPay().getX(); - if (amount > 0) { - permanent.addCounters(CounterType.P1P1.createInstance(amount), game); - } - } - } - return true; - } - - @Override - public HoodedHydraEffect1 copy() { - return new HoodedHydraEffect1(this); - } - -} diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/MarduCharm.java b/Mage.Sets/src/mage/sets/khansoftarkir/MarduCharm.java index 44b4423042d..2153f4e42dd 100644 --- a/Mage.Sets/src/mage/sets/khansoftarkir/MarduCharm.java +++ b/Mage.Sets/src/mage/sets/khansoftarkir/MarduCharm.java @@ -28,7 +28,6 @@ package mage.sets.khansoftarkir; import java.util.UUID; -import mage.MageInt; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.effects.ContinuousEffect; @@ -48,7 +47,7 @@ import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.WarriorToken; import mage.players.Player; import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetOpponent; @@ -61,12 +60,12 @@ import mage.target.targetpointer.FixedTarget; public class MarduCharm extends CardImpl { private static final FilterCard filter = new FilterCard("a noncreature, nonland card"); - + static { filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); filter.add(Predicates.not(new CardTypePredicate(CardType.LAND))); } - + public MarduCharm(UUID ownerId) { super(ownerId, 186, "Mardu Charm", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{R}{W}{B}"); this.expansionSetCode = "KTK"; @@ -76,18 +75,18 @@ public class MarduCharm extends CardImpl { // * Mardu Charm deals 4 damage to target creature. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - + // * Put two 1/1 white Warrior creature tokens onto the battlefield. They gain first strike until end of turn. Mode mode = new Mode(); mode.getEffects().add(new MarduCharmCreateTokenEffect()); this.getSpellAbility().addMode(mode); - + // * Target opponent reveals his or her hand. You choose a noncreature, nonland card from it. That player discards that card. mode = new Mode(); mode.getEffects().add(new DiscardCardYouChooseTargetEffect(filter)); mode.getTargets().add(new TargetOpponent()); this.getSpellAbility().addMode(mode); - + } public MarduCharm(final MarduCharm card) { @@ -101,26 +100,26 @@ public class MarduCharm extends CardImpl { } class MarduCharmCreateTokenEffect extends OneShotEffect { - + public MarduCharmCreateTokenEffect() { super(Outcome.PutCreatureInPlay); this.staticText = "Put two 1/1 white Warrior creature tokens onto the battlefield. They gain first strike until end of turn"; } - + public MarduCharmCreateTokenEffect(final MarduCharmCreateTokenEffect effect) { super(effect); } - + @Override public MarduCharmCreateTokenEffect copy() { return new MarduCharmCreateTokenEffect(this); } - + @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - CreateTokenEffect effect = new CreateTokenEffect(new MarduCharmWarriorToken(), 2); + CreateTokenEffect effect = new CreateTokenEffect(new WarriorToken(), 2); effect.apply(game, source); for (UUID tokenId :effect.getLastAddedTokenIds()) { Permanent token = game.getPermanent(tokenId); @@ -135,16 +134,3 @@ class MarduCharmCreateTokenEffect extends OneShotEffect { return false; } } -class MarduCharmWarriorToken extends Token { - - public MarduCharmWarriorToken() { - super("Warrior", "1/1 white Warrior creature token"); - this.setOriginalExpansionSetCode("KTK"); - this.setTokenType(2); - cardType.add(CardType.CREATURE); - color.setWhite(true); - subtype.add("Warrior"); - power = new MageInt(1); - toughness = new MageInt(1); - } -} diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/MarduHordechief.java b/Mage.Sets/src/mage/sets/khansoftarkir/MarduHordechief.java index 4452b0dd55b..5338301b668 100644 --- a/Mage.Sets/src/mage/sets/khansoftarkir/MarduHordechief.java +++ b/Mage.Sets/src/mage/sets/khansoftarkir/MarduHordechief.java @@ -36,7 +36,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.WarriorToken; import mage.watchers.common.PlayerAttackedWatcher; /** @@ -55,7 +55,7 @@ public class MarduHordechief extends CardImpl { this.toughness = new MageInt(3); // Raid - When Mardu Hordechief enters the battlefield, if you attacked with a creature this turn, put a 1/1 white Warrior creature token onto the battlefield - this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new MarduHordechiefToken())), RaidCondition.getInstance(), + this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new WarriorToken())), RaidCondition.getInstance(), "Raid - When {this} enters the battlefield, if you attacked with a creature this turn, put a 1/1 white Warrior creature token onto the battlefield."), new PlayerAttackedWatcher()); } @@ -69,17 +69,3 @@ public class MarduHordechief extends CardImpl { return new MarduHordechief(this); } } - -class MarduHordechiefToken extends Token { - - MarduHordechiefToken() { - super("Warrior", "1/1 white Warrior creature token"); - this.setOriginalExpansionSetCode("KTK"); - cardType.add(CardType.CREATURE); - subtype.add("Warrior"); - - color.setWhite(true); - power = new MageInt(1); - toughness = new MageInt(1); - } -} diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/PearlLakeAncient.java b/Mage.Sets/src/mage/sets/khansoftarkir/PearlLakeAncient.java index a2b8784709f..9681a0d2bc6 100644 --- a/Mage.Sets/src/mage/sets/khansoftarkir/PearlLakeAncient.java +++ b/Mage.Sets/src/mage/sets/khansoftarkir/PearlLakeAncient.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.CantBeCounteredAbility; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.abilities.keyword.FlashAbility; import mage.abilities.keyword.ProwessAbility; @@ -67,7 +67,7 @@ public class PearlLakeAncient extends CardImpl { // Return three lands you control to their owner's hand: Return Pearl Lake Ancient to its owner's hand. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), - new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(3, 3, new FilterControlledLandPermanent("lands"), true)))); + new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(3, 3, new FilterControlledLandPermanent("lands"), true)))); } public PearlLakeAncient(final PearlLakeAncient card) { diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/TakeUpArms.java b/Mage.Sets/src/mage/sets/khansoftarkir/TakeUpArms.java index 2d448508bb2..6aaf4499cac 100644 --- a/Mage.Sets/src/mage/sets/khansoftarkir/TakeUpArms.java +++ b/Mage.Sets/src/mage/sets/khansoftarkir/TakeUpArms.java @@ -28,12 +28,11 @@ package mage.sets.khansoftarkir; import java.util.UUID; -import mage.MageInt; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.WarriorToken; /** * @@ -47,7 +46,7 @@ public class TakeUpArms extends CardImpl { // Put three 1/1 white Warrior creature tokens onto the battlefield. - this.getSpellAbility().addEffect(new CreateTokenEffect(new TakeUpArmsToken(), 3)); + this.getSpellAbility().addEffect(new CreateTokenEffect(new WarriorToken(), 3)); } public TakeUpArms(final TakeUpArms card) { @@ -59,17 +58,3 @@ public class TakeUpArms extends CardImpl { return new TakeUpArms(this); } } - -class TakeUpArmsToken extends Token { - - TakeUpArmsToken() { - super("Warrior", "1/1 white Warrior creature token"); - this.setOriginalExpansionSetCode("KTK"); - cardType.add(CardType.CREATURE); - subtype.add("Warrior"); - - color.setWhite(true); - power = new MageInt(1); - toughness = new MageInt(1); - } -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/legends/GhostsOfTheDamned.java b/Mage.Sets/src/mage/sets/legends/GhostsOfTheDamned.java new file mode 100644 index 00000000000..3f713ceaa40 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/GhostsOfTheDamned.java @@ -0,0 +1,52 @@ +/* + * 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.legends; + +import java.util.UUID; + +/** + * + * @author hanasu + */ +public class GhostsOfTheDamned extends mage.sets.masterseditioniii.GhostsOfTheDamned { + + public GhostsOfTheDamned(UUID ownerId) { + super(ownerId); + this.cardNumber = 12; + this.expansionSetCode = "LEG"; + } + + public GhostsOfTheDamned(final GhostsOfTheDamned card) { + super(card); + } + + @Override + public GhostsOfTheDamned copy() { + return new GhostsOfTheDamned(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legends/PixieQueen.java b/Mage.Sets/src/mage/sets/legends/PixieQueen.java new file mode 100644 index 00000000000..1bfe612f28b --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/PixieQueen.java @@ -0,0 +1,76 @@ +/* + * 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.legends; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author hanasu + */ +public class PixieQueen extends CardImpl { + + public PixieQueen(UUID ownerId) { + super(ownerId, 110, "Pixie Queen", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + this.expansionSetCode = "LEG"; + this.subtype.add("Faerie"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // {G}{G}{G}, {tap}: Target creature gains flying until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{G}{G}{G}")); + ability.addTarget(new TargetCreaturePermanent()); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public PixieQueen(final PixieQueen card) { + super(card); + } + + @Override + public PixieQueen copy() { + return new PixieQueen(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legends/StormSeeker.java b/Mage.Sets/src/mage/sets/legends/StormSeeker.java new file mode 100644 index 00000000000..53dd9ddc226 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/StormSeeker.java @@ -0,0 +1,52 @@ +/* + * 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.legends; + +import java.util.UUID; + +/** + * + * @author hanasu + */ +public class StormSeeker extends mage.sets.mastersedition.StormSeeker { + + public StormSeeker(UUID ownerId) { + super(ownerId); + this.cardNumber = 119; + this.expansionSetCode = "LEG"; + } + + public StormSeeker(final StormSeeker card) { + super(card); + } + + @Override + public StormSeeker copy() { + return new StormSeeker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legions/BroodSliver.java b/Mage.Sets/src/mage/sets/legions/BroodSliver.java index 48e856b3b72..86ea9e7ec7b 100644 --- a/Mage.Sets/src/mage/sets/legions/BroodSliver.java +++ b/Mage.Sets/src/mage/sets/legions/BroodSliver.java @@ -37,7 +37,7 @@ import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.SetTargetPointer; import mage.filter.common.FilterCreaturePermanent; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.SliverToken; /** * @@ -53,12 +53,11 @@ public class BroodSliver extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(3); - // Whenever a Sliver deals combat damage to a player, its controller may put a 1/1 colorless Sliver creature token onto the battlefield. + // Whenever a Sliver deals combat damage to a player, its controller may put a 1/1 colorless Sliver creature token onto the battlefield. Effect effect = new CreateTokenTargetEffect(new SliverToken()); effect.setText("its controller may put a 1/1 colorless Sliver creature token onto the battlefield"); - this.addAbility(new DealsDamageToAPlayerAllTriggeredAbility(effect, - new FilterCreaturePermanent("Sliver", "a Sliver"), - true, SetTargetPointer.PLAYER, true)); + this.addAbility(new DealsDamageToAPlayerAllTriggeredAbility(effect, + new FilterCreaturePermanent("Sliver", "a Sliver"), true, SetTargetPointer.PLAYER, true)); } public BroodSliver(final BroodSliver card) { @@ -70,14 +69,3 @@ public class BroodSliver extends CardImpl { return new BroodSliver(this); } } - -class SliverToken extends Token { - - public SliverToken() { - super("Sliver", "1/1 colorless Sliver creature token"); - cardType.add(CardType.CREATURE); - subtype.add("Sliver"); - power = new MageInt(1); - toughness = new MageInt(1); - } -} diff --git a/Mage.Sets/src/mage/sets/lorwyn/BoggartMob.java b/Mage.Sets/src/mage/sets/lorwyn/BoggartMob.java index 0bfee0cd162..e80f8e9d8f4 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/BoggartMob.java +++ b/Mage.Sets/src/mage/sets/lorwyn/BoggartMob.java @@ -38,14 +38,14 @@ import mage.constants.Rarity; import mage.constants.SetTargetPointer; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.GoblinRogueToken; /** * * @author fireshoes */ public class BoggartMob extends CardImpl { - + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Goblin you control"); static { @@ -62,10 +62,10 @@ public class BoggartMob extends CardImpl { // Champion a Goblin this.addAbility(new ChampionAbility(this, "Goblin")); - + // Whenever a Goblin you control deals combat damage to a player, you may put a 1/1 black Goblin Rogue creature token onto the battlefield. this.addAbility(new DealsDamageToAPlayerAllTriggeredAbility( - new CreateTokenEffect(new BlackGoblinRogueToken()), + new CreateTokenEffect(new GoblinRogueToken()), filter, true, SetTargetPointer.NONE, true)); } @@ -78,15 +78,3 @@ public class BoggartMob extends CardImpl { return new BoggartMob(this); } } - -class BlackGoblinRogueToken extends Token { - BlackGoblinRogueToken() { - super("Goblin Rogue", "1/1 black Goblin Rogue creature token"); - cardType.add(CardType.CREATURE); - color.setBlack(true); - subtype.add("Goblin"); - subtype.add("Rogue"); - power = new MageInt(1); - toughness = new MageInt(1); - } -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/lorwyn/BrigidHeroOfKinsbaile.java b/Mage.Sets/src/mage/sets/lorwyn/BrigidHeroOfKinsbaile.java index bdc1a5e46ca..cf17a7d815c 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/BrigidHeroOfKinsbaile.java +++ b/Mage.Sets/src/mage/sets/lorwyn/BrigidHeroOfKinsbaile.java @@ -39,11 +39,7 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; -import mage.filter.FilterPermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.filter.predicate.permanent.AttackingPredicate; -import mage.filter.predicate.permanent.BlockingPredicate; +import mage.filter.common.FilterAttackingOrBlockingCreature; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; @@ -68,7 +64,7 @@ public class BrigidHeroOfKinsbaile extends CardImpl { // First strike this.addAbility(FirstStrikeAbility.getInstance()); - // {t}: Brigid, Hero of Kinsbaile deals 2 damage to each attacking or blocking creature target player controls. + // {T}: Brigid, Hero of Kinsbaile deals 2 damage to each attacking or blocking creature target player controls. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BrigidHeroOfKinsbaileEffect(), new TapSourceCost()); ability.addTarget(new TargetPlayer()); this.addAbility(ability); @@ -87,16 +83,6 @@ public class BrigidHeroOfKinsbaile extends CardImpl { class BrigidHeroOfKinsbaileEffect extends OneShotEffect { - private static final FilterPermanent filter = new FilterPermanent("each attacking or blocking creature target player controls"); - - static { - filter.add(new CardTypePredicate(CardType.CREATURE)); - filter.add(Predicates.or( - new AttackingPredicate(), - new BlockingPredicate())); - - } - public BrigidHeroOfKinsbaileEffect() { super(Outcome.Damage); staticText = "{this} deals 2 damage to each attacking or blocking creature target player controls"; @@ -108,12 +94,10 @@ class BrigidHeroOfKinsbaileEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source)); + Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source)); if (targetPlayer != null) { - for (Permanent creature : game.getBattlefield().getActivePermanents(filter, targetPlayer.getId(), game)) { - if (creature != null) { - creature.damage(2, source.getSourceId(), game, false, true); - } + for (Permanent creature : game.getBattlefield().getAllActivePermanents(new FilterAttackingOrBlockingCreature(), targetPlayer.getId(), game)) { + creature.damage(2, source.getSourceId(), game, false, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/lorwyn/FamiliarsRuse.java b/Mage.Sets/src/mage/sets/lorwyn/FamiliarsRuse.java index ba12a2e3612..4bf7c42fe6b 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/FamiliarsRuse.java +++ b/Mage.Sets/src/mage/sets/lorwyn/FamiliarsRuse.java @@ -27,17 +27,16 @@ */ package mage.sets.lorwyn; -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import java.util.UUID; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.common.CounterTargetEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; import mage.target.TargetSpell; import mage.target.common.TargetControlledCreaturePermanent; -import java.util.UUID; -import mage.filter.common.FilterControlledCreaturePermanent; - /** * * @author Loki @@ -48,7 +47,10 @@ public class FamiliarsRuse extends CardImpl { super(ownerId, 64, "Familiar's Ruse", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{U}{U}"); this.expansionSetCode = "LRW"; - this.getSpellAbility().addCost(new ReturnToHandTargetPermanentCost(new TargetControlledCreaturePermanent(1,1, new FilterControlledCreaturePermanent("creature"),false))); + // As an additional cost to cast Familiar's Ruse, return a creature you control to its owner's hand. + this.getSpellAbility().addCost(new ReturnToHandChosenControlledPermanentCost( + new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent("creature"), true))); + // Counter target spell. this.getSpellAbility().addEffect(new CounterTargetEffect()); this.getSpellAbility().addTarget(new TargetSpell()); } diff --git a/Mage.Sets/src/mage/sets/magic2010/Earthquake.java b/Mage.Sets/src/mage/sets/magic2010/Earthquake.java index b49cd07434b..632d7fc6116 100644 --- a/Mage.Sets/src/mage/sets/magic2010/Earthquake.java +++ b/Mage.Sets/src/mage/sets/magic2010/Earthquake.java @@ -1,16 +1,16 @@ /* * 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 @@ -20,7 +20,7 @@ * 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. @@ -29,19 +29,15 @@ package mage.sets.magic2010; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.DamageEverythingEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.AbilityPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; /** * @@ -49,11 +45,18 @@ import mage.players.Player; */ public class Earthquake extends CardImpl { + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature without flying"); + + static { + filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); + } + public Earthquake(UUID ownerId) { super(ownerId, 134, "Earthquake", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{R}"); this.expansionSetCode = "M10"; - this.getSpellAbility().addEffect(new EarthquakeEffect()); + // Hurricane deals X damage to each creature with flying and each player. + this.getSpellAbility().addEffect(new DamageEverythingEffect(new ManacostVariableValue(), filter)); } public Earthquake(final Earthquake card) { @@ -65,41 +68,3 @@ public class Earthquake extends CardImpl { return new Earthquake(this); } } - -class EarthquakeEffect extends OneShotEffect { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); - - static { - filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); - } - - public EarthquakeEffect() { - super(Outcome.Damage); - staticText = "{this} deals X damage to each creature without flying and each player"; - } - - public EarthquakeEffect(final EarthquakeEffect effect) { - super(effect); - } - - @Override - public EarthquakeEffect copy() { - return new EarthquakeEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - int amount = source.getManaCostsToPay().getX(); - for (Permanent permanent: game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) { - permanent.damage(amount, source.getSourceId(), game, false, true); - } - for (UUID playerId: game.getPlayer(source.getControllerId()).getInRange()) { - Player player = game.getPlayer(playerId); - if (player != null) - player.damage(amount, source.getSourceId(), game, false, true); - } - return true; - } - -} diff --git a/Mage.Sets/src/mage/sets/magic2010/MindSpring.java b/Mage.Sets/src/mage/sets/magic2010/MindSpring.java index 72955a428fb..db84d2644b3 100644 --- a/Mage.Sets/src/mage/sets/magic2010/MindSpring.java +++ b/Mage.Sets/src/mage/sets/magic2010/MindSpring.java @@ -1,16 +1,16 @@ /* * 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 @@ -20,7 +20,7 @@ * 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. @@ -29,14 +29,11 @@ package mage.sets.magic2010; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; -import mage.game.Game; -import mage.players.Player; +import mage.constants.CardType; +import mage.constants.Rarity; /** * @@ -48,7 +45,7 @@ public class MindSpring extends CardImpl { super(ownerId, 64, "Mind Spring", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{U}{U}"); this.expansionSetCode = "M10"; - this.getSpellAbility().addEffect(new MindSpringEffect()); + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new ManacostVariableValue())); } public MindSpring(final MindSpring card) { @@ -61,32 +58,3 @@ public class MindSpring extends CardImpl { } } - -class MindSpringEffect extends OneShotEffect { - - public MindSpringEffect() { - super(Outcome.DrawCard); - staticText = "Draw X cards"; - } - - public MindSpringEffect(final MindSpringEffect effect) { - super(effect); - } - - @Override - public MindSpringEffect copy() { - return new MindSpringEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - int amount = source.getManaCostsToPay().getX(); - Player player = game.getPlayer(source.getControllerId()); - if (player != null) { - player.drawCards(amount, game); - return true; - } - return false; - } - -} diff --git a/Mage.Sets/src/mage/sets/magic2010/ProteanHydra.java b/Mage.Sets/src/mage/sets/magic2010/ProteanHydra.java index e84b732672a..c036b45ee5d 100644 --- a/Mage.Sets/src/mage/sets/magic2010/ProteanHydra.java +++ b/Mage.Sets/src/mage/sets/magic2010/ProteanHydra.java @@ -31,20 +31,17 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.DelayedTriggeredAbility; -import mage.abilities.SpellAbility; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.EntersBattlefieldEffect; -import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.PreventionEffectData; import mage.abilities.effects.PreventionEffectImpl; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; -import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; import mage.counters.CounterType; @@ -68,7 +65,7 @@ public class ProteanHydra extends CardImpl { this.toughness = new MageInt(0); // Protean Hydra enters the battlefield with X +1/+1 counters on it. - this.addAbility(new EntersBattlefieldAbility(new ProteanHydraEffect1(), "with X +1/+1 counters on it")); + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance()))); // If damage would be dealt to Protean Hydra, prevent that damage and remove that many +1/+1 counters from it. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ProteanHydraEffect2())); @@ -87,41 +84,6 @@ public class ProteanHydra extends CardImpl { return new ProteanHydra(this); } - class ProteanHydraEffect1 extends OneShotEffect { - - public ProteanHydraEffect1() { - super(Outcome.BoostCreature); - staticText = "{this} enters the battlefield with X +1/+1 counters on it"; - } - - public ProteanHydraEffect1(final ProteanHydraEffect1 effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (spellAbility != null - && spellAbility.getSourceId().equals(source.getSourceId()) - && permanent.getZoneChangeCounter(game) - 1 == spellAbility.getSourceObjectZoneChangeCounter()) { - int amount = spellAbility.getManaCostsToPay().getX(); - if (amount > 0) { - permanent.addCounters(CounterType.P1P1.createInstance(amount), game); - } - } - } - return true; - } - - @Override - public ProteanHydraEffect1 copy() { - return new ProteanHydraEffect1(this); - } - - } - class ProteanHydraEffect2 extends PreventionEffectImpl { public ProteanHydraEffect2() { diff --git a/Mage.Sets/src/mage/sets/magic2010/Silence.java b/Mage.Sets/src/mage/sets/magic2010/Silence.java index 4637cd9f97e..4d801a75d47 100644 --- a/Mage.Sets/src/mage/sets/magic2010/Silence.java +++ b/Mage.Sets/src/mage/sets/magic2010/Silence.java @@ -1,16 +1,16 @@ /* * 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 @@ -20,12 +20,11 @@ * 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; @@ -90,7 +89,7 @@ class SilenceEffect extends ContinuousRuleModifyingEffectImpl { public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { - return "You can't cast spells this turn (" + mageObject.getLogName() + ")."; + return "You can't cast spells this turn (" + mageObject.getIdName() + ")."; } return null; } diff --git a/Mage.Sets/src/mage/sets/magic2010/WarpWorld.java b/Mage.Sets/src/mage/sets/magic2010/WarpWorld.java index 3fac6066e28..71a2986efa0 100644 --- a/Mage.Sets/src/mage/sets/magic2010/WarpWorld.java +++ b/Mage.Sets/src/mage/sets/magic2010/WarpWorld.java @@ -94,7 +94,7 @@ class WarpWorldEffect extends OneShotEffect { return false; } Map> permanentsOwned = new HashMap<>(); - Collection permanents = game.getBattlefield().getAllPermanents(); + Collection permanents = game.getBattlefield().getAllActivePermanents(); for (Permanent permanent : permanents) { Set set = permanentsOwned.get(permanent.getOwnerId()); if (set == null) { diff --git a/Mage.Sets/src/mage/sets/magic2010/Weakness.java b/Mage.Sets/src/mage/sets/magic2010/Weakness.java index 2047968193f..a30710683af 100644 --- a/Mage.Sets/src/mage/sets/magic2010/Weakness.java +++ b/Mage.Sets/src/mage/sets/magic2010/Weakness.java @@ -29,21 +29,17 @@ 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.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; -import mage.game.Game; -import mage.game.permanent.Permanent; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -56,14 +52,16 @@ public class Weakness extends CardImpl { public Weakness(UUID ownerId) { super(ownerId, 121, "Weakness", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{B}"); this.expansionSetCode = "M10"; - this.subtype.add("Aura"); + + // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); - this.getSpellAbility().addTarget(auraTarget); - this.getSpellAbility().addEffect(new AttachEffect(Outcome.UnboostCreature)); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.UnboostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); - this.addAbility(ability); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new WeaknessEffect())); + this.addAbility(ability); + // Enchanted creature gets -2/-1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(-2, -1, Duration.WhileOnBattlefield))); } public Weakness(final Weakness card) { @@ -75,51 +73,3 @@ public class Weakness extends CardImpl { return new Weakness(this); } } - -class WeaknessEffect extends ContinuousEffectImpl { - - public WeaknessEffect() { - super(Duration.WhileOnBattlefield, Outcome.UnboostCreature); - staticText = "Enchanted creature gets -2/-1"; - } - - public WeaknessEffect(final WeaknessEffect effect) { - super(effect); - } - - @Override - public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { - Permanent enchantment = game.getPermanent(source.getSourceId()); - if (enchantment != null && enchantment.getAttachedTo() != null) { - Permanent creature = game.getPermanent(enchantment.getAttachedTo()); - if (creature != null) { - switch (layer) { - case PTChangingEffects_7: - if (sublayer == SubLayer.ModifyPT_7c) { - creature.addPower(-2); - creature.addToughness(-1); - } - break; - } - return true; - } - } - return false; - } - - @Override - public boolean apply(Game game, Ability source) { - return false; - } - - @Override - public boolean hasLayer(Layer layer) { - return layer == Layer.PTChangingEffects_7; - } - - @Override - public WeaknessEffect copy() { - return new WeaknessEffect(this); - } - -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/Triskelion.java b/Mage.Sets/src/mage/sets/magic2011/Triskelion.java index ee0d37abde0..2ecf10dba0f 100644 --- a/Mage.Sets/src/mage/sets/magic2011/Triskelion.java +++ b/Mage.Sets/src/mage/sets/magic2011/Triskelion.java @@ -1,16 +1,16 @@ /* * 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 @@ -20,26 +20,25 @@ * 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.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetCreatureOrPlayer; @@ -56,7 +55,10 @@ public class Triskelion extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); + // Triskelion enters the battlefield with three +1/+1 counters on it. this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)), "with three +1/+1 counters on it")); + + // Remove a +1/+1 counter from Triskelion: Triskelion deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/magic2012/PrimordialHydra.java b/Mage.Sets/src/mage/sets/magic2012/PrimordialHydra.java index 76a4fe38a78..5030d6044f3 100644 --- a/Mage.Sets/src/mage/sets/magic2012/PrimordialHydra.java +++ b/Mage.Sets/src/mage/sets/magic2012/PrimordialHydra.java @@ -30,14 +30,13 @@ package mage.sets.magic2012; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.SourceHasCounterCondition; import mage.abilities.decorator.ConditionalContinuousEffect; -import mage.abilities.effects.EntersBattlefieldEffect; import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; @@ -67,8 +66,13 @@ public class PrimordialHydra extends CardImpl { this.power = new MageInt(0); this.toughness = new MageInt(0); - this.addAbility(new EntersBattlefieldAbility(new PrimordialHydraEntersEffect(), "{this} enters the battlefield with X +1/+1 counters on it")); + // Primordial Hydra enters the battlefield with X +1/+1 counters on it. + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance()))); + + // At the beginning of your upkeep, double the number of +1/+1 counters on Primordial Hydra. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new PrimordialHydraDoubleEffect(), TargetController.YOU, false)); + + // Primordial Hydra has trample as long as it has ten or more +1/+1 counters on it. ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance()), new SourceHasCounterCondition(CounterType.P1P1, 10), staticText); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); @@ -84,39 +88,6 @@ public class PrimordialHydra extends CardImpl { } } -class PrimordialHydraEntersEffect extends OneShotEffect { - - public PrimordialHydraEntersEffect() { - super(Outcome.BoostCreature); - } - - public PrimordialHydraEntersEffect(final PrimordialHydraEntersEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (spellAbility != null - && spellAbility.getSourceId().equals(source.getSourceId()) - && permanent.getZoneChangeCounter(game) - 1 == spellAbility.getSourceObjectZoneChangeCounter()) { - int amount = spellAbility.getManaCostsToPay().getX(); - if (amount > 0) { - permanent.addCounters(CounterType.P1P1.createInstance(amount), game); - } - } - } - return true; - } - - @Override - public PrimordialHydraEntersEffect copy() { - return new PrimordialHydraEntersEffect(this); - } -} - class PrimordialHydraDoubleEffect extends OneShotEffect { PrimordialHydraDoubleEffect() { diff --git a/Mage.Sets/src/mage/sets/magic2013/AjaniCallerOfThePride.java b/Mage.Sets/src/mage/sets/magic2013/AjaniCallerOfThePride.java index 9c4305c3bef..2575cf4bc83 100644 --- a/Mage.Sets/src/mage/sets/magic2013/AjaniCallerOfThePride.java +++ b/Mage.Sets/src/mage/sets/magic2013/AjaniCallerOfThePride.java @@ -46,7 +46,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; import mage.counters.CounterType; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.CatToken; import mage.target.common.TargetCreaturePermanent; /** @@ -91,15 +91,3 @@ public class AjaniCallerOfThePride extends CardImpl { return new AjaniCallerOfThePride(this); } } - -class CatToken extends Token { - - public CatToken() { - super("Cat", "2/2 white Cat creature tokens"); - cardType.add(CardType.CREATURE); - color.setWhite(true); - subtype.add("Cat"); - power = new MageInt(2); - toughness = new MageInt(2); - } -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2013/RoaringPrimadox.java b/Mage.Sets/src/mage/sets/magic2013/RoaringPrimadox.java index f2a2062eb01..5ed8a2f9894 100644 --- a/Mage.Sets/src/mage/sets/magic2013/RoaringPrimadox.java +++ b/Mage.Sets/src/mage/sets/magic2013/RoaringPrimadox.java @@ -28,22 +28,14 @@ package mage.sets.magic2013; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.common.OnEventTriggeredAbility; -import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ReturnToHandChosenControlledPermanentEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.filter.common.FilterControlledCreaturePermanent; -import mage.game.Game; import mage.game.events.GameEvent.EventType; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.common.TargetControlledCreaturePermanent; /** * diff --git a/Mage.Sets/src/mage/sets/magic2013/TradingPost.java b/Mage.Sets/src/mage/sets/magic2013/TradingPost.java index 2b933e21b2d..f6370a6d285 100644 --- a/Mage.Sets/src/mage/sets/magic2013/TradingPost.java +++ b/Mage.Sets/src/mage/sets/magic2013/TradingPost.java @@ -49,7 +49,7 @@ import mage.constants.Zone; import mage.filter.common.FilterArtifactCard; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.GoatToken; import mage.target.common.TargetCardInGraveyard; import mage.target.common.TargetCardInHand; import mage.target.common.TargetControlledPermanent; @@ -59,10 +59,10 @@ import mage.target.common.TargetControlledPermanent; * @author jeffwadsworth */ public class TradingPost extends CardImpl { - + final static FilterControlledPermanent filter = new FilterControlledPermanent("creature"); final static FilterControlledPermanent filter2 = new FilterControlledPermanent("artifact"); - + static { filter.add(new CardTypePredicate(CardType.CREATURE)); filter2.add(new CardTypePredicate(CardType.ARTIFACT)); @@ -77,26 +77,26 @@ public class TradingPost extends CardImpl { ability1.addCost(new TapSourceCost()); ability1.addCost(new DiscardTargetCost(new TargetCardInHand())); this.addAbility(ability1); - + // {1}, {tap}, Pay 1 life: Put a 0/1 white Goat creature token onto the battlefield. Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new GoatToken()), new GenericManaCost(1)); ability2.addCost(new TapSourceCost()); ability2.addCost(new PayLifeCost(1)); this.addAbility(ability2); - + // {1}, {tap}, Sacrifice a creature: Return target artifact card from your graveyard to your hand. Ability ability3 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToHandTargetEffect(), new GenericManaCost(1)); ability3.addTarget(new TargetCardInGraveyard(new FilterArtifactCard("artifact card in your graveyard"))); ability3.addCost(new TapSourceCost()); ability3.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); this.addAbility(ability3); - + // {1}, {tap}, Sacrifice an artifact: Draw a card. Ability ability4 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(1)); ability4.addCost(new TapSourceCost()); ability4.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter2))); this.addAbility(ability4); - + } public TradingPost(final TradingPost card) { @@ -108,15 +108,3 @@ public class TradingPost extends CardImpl { return new TradingPost(this); } } - -class GoatToken extends Token { - public GoatToken() { - super("Goat", "a 0/1 white Goat creature token"); - cardType.add(CardType.CREATURE); - color.setWhite(true); - - subtype.add("Goat"); - power = new MageInt(0); - toughness = new MageInt(1); - } -} diff --git a/Mage.Sets/src/mage/sets/magic2014/AjanisChosen.java b/Mage.Sets/src/mage/sets/magic2014/AjanisChosen.java index 62e2921c40a..1728e7f1f4a 100644 --- a/Mage.Sets/src/mage/sets/magic2014/AjanisChosen.java +++ b/Mage.Sets/src/mage/sets/magic2014/AjanisChosen.java @@ -43,6 +43,7 @@ import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.game.Game; import mage.game.permanent.Permanent; +import mage.game.permanent.token.CatToken; import mage.game.permanent.token.Token; import mage.players.Player; @@ -56,7 +57,7 @@ public class AjanisChosen extends CardImpl { static { filter.add(new CardTypePredicate(CardType.ENCHANTMENT)); } - + public AjanisChosen(UUID ownerId) { super(ownerId, 2, "Ajani's Chosen", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); this.expansionSetCode = "M14"; @@ -123,16 +124,3 @@ class AjanisChosenEffect extends OneShotEffect { } } - - -class CatToken extends Token { - public CatToken() { - super("Cat", "2/2 white Cat creature token"); - cardType.add(CardType.CREATURE); - color.setWhite(true); - - subtype.add("Cat"); - power = new MageInt(2); - toughness = new MageInt(2); - } -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2014/ChandraPyromaster.java b/Mage.Sets/src/mage/sets/magic2014/ChandraPyromaster.java index 1ce15ed3de0..8c3d87f6aad 100644 --- a/Mage.Sets/src/mage/sets/magic2014/ChandraPyromaster.java +++ b/Mage.Sets/src/mage/sets/magic2014/ChandraPyromaster.java @@ -74,7 +74,6 @@ public class ChandraPyromaster extends CardImpl { this.expansionSetCode = "M14"; this.subtype.add("Chandra"); - this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(4)), false)); // +1: Chandra, Pyromaster deals 1 damage to target player and 1 damage to up to one target creature that player controls. That creature can't block this turn. @@ -215,7 +214,7 @@ class ChandraPyromasterEffect2 extends OneShotEffect { Card card = library.removeFromTop(game); if (card != null) { controller.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getIdName() + " ", source.getSourceId(), game, Zone.LIBRARY, true); - ContinuousEffect effect = new ChandraPyromasterCastFromExileEffect(); + ContinuousEffect effect = new ChandraPyromasterCastFromExileEffect(); effect.setTargetPointer(new FixedTarget(card.getId())); game.addEffect(effect, source); } @@ -273,36 +272,31 @@ class ChandraPyromasterEffect3 extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player you = game.getPlayer(source.getControllerId()); - if (you == null) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + if (controller == null || sourceObject == null) { return false; } Cards cards = new CardsImpl(); - int max = Math.min(you.getLibrary().size(), 10); - for (int i = 0; i < max; i++) { - Card card = you.getLibrary().removeFromTop(game); - if (card != null) { - card.moveToExile(source.getSourceId(), "Chandra Pyromaster", source.getSourceId(), game); - cards.add(card); - } - } + cards.addAll(controller.getLibrary().getTopCards(game, 10)); + controller.moveCardsToExile(cards.getCards(game), source, game, true, source.getSourceId(), sourceObject.getIdName()); if (cards.getCards(new FilterInstantOrSorceryCard(), game).size() > 0) { TargetCard target = new TargetCard(Zone.EXILED, new FilterInstantOrSorceryCard()); - if (you.chooseTarget(Outcome.PlayForFree, cards, target, source, game)) { + if (controller.chooseTarget(Outcome.PlayForFree, cards, target, source, game)) { Card card = cards.get(target.getFirstTarget(), game); if (card != null) { - Card copy1 = card.copy(); - Card copy2 = card.copy(); - Card copy3 = card.copy(); - if (copy1 != null && you.chooseUse(outcome, "Do you wish to cast copy 1 of " + card.getName(), source, game)) { - you.cast(copy1.getSpellAbility(), game, true); + if (controller.chooseUse(outcome, "Do you wish to cast copy 1 of " + card.getName(), source, game)) { + Card copy1 = card.copy(); + controller.cast(copy1.getSpellAbility(), game, true); } - if (copy2 != null && you.chooseUse(outcome, "Do you wish to cast copy 2 of " + card.getName(), source, game)) { - you.cast(copy2.getSpellAbility(), game, true); + if (controller.chooseUse(outcome, "Do you wish to cast copy 2 of " + card.getName(), source, game)) { + Card copy2 = card.copy(); + controller.cast(copy2.getSpellAbility(), game, true); } - if (copy3 != null && you.chooseUse(outcome, "Do you wish to cast copy 3 of " + card.getName(), source, game)) { - you.cast(copy3.getSpellAbility(), game, true); + if (controller.chooseUse(outcome, "Do you wish to cast copy 3 of " + card.getName(), source, game)) { + Card copy3 = card.copy(); + controller.cast(copy3.getSpellAbility(), game, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/magic2014/HiveStirrings.java b/Mage.Sets/src/mage/sets/magic2014/HiveStirrings.java index 2d378cc5167..9f9a6a6f027 100644 --- a/Mage.Sets/src/mage/sets/magic2014/HiveStirrings.java +++ b/Mage.Sets/src/mage/sets/magic2014/HiveStirrings.java @@ -28,12 +28,11 @@ package mage.sets.magic2014; import java.util.UUID; -import mage.MageInt; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.SliverToken; /** * @@ -45,10 +44,8 @@ public class HiveStirrings extends CardImpl { super(ownerId, 21, "Hive Stirrings", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{W}"); this.expansionSetCode = "M14"; - // Put two 1/1 colorless Sliver creature tokens onto the battlefield. this.getSpellAbility().addEffect(new CreateTokenEffect(new SliverToken(), 2)); - } public HiveStirrings(final HiveStirrings card) { @@ -60,13 +57,3 @@ public class HiveStirrings extends CardImpl { return new HiveStirrings(this); } } - -class SliverToken extends Token { - SliverToken() { - super("Sliver", "a 1/1 colorless Sliver creature token"); - cardType.add(CardType.CREATURE); - subtype.add("Sliver"); - power = new MageInt(1); - toughness = new MageInt(1); - } -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2014/MaraudingMaulhorn.java b/Mage.Sets/src/mage/sets/magic2014/MaraudingMaulhorn.java index 3a4ab14bfe0..7a36230e0cb 100644 --- a/Mage.Sets/src/mage/sets/magic2014/MaraudingMaulhorn.java +++ b/Mage.Sets/src/mage/sets/magic2014/MaraudingMaulhorn.java @@ -29,7 +29,6 @@ package mage.sets.magic2014; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.decorator.ConditionalRequirementEffect; import mage.abilities.effects.Effect; @@ -38,10 +37,8 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; -import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.NamePredicate; -import mage.watchers.common.AttackedThisTurnWatcher; /** * @@ -68,9 +65,6 @@ public class MaraudingMaulhorn extends CardImpl { new AttacksIfAbleSourceEffect(Duration.WhileOnBattlefield, true), new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.FEWER_THAN, 1)); effect.setText("{this} attacks each combat if able unless you control a creature named Advocate of the Beast"); - - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect), new AttackedThisTurnWatcher()); - } public MaraudingMaulhorn(final MaraudingMaulhorn card) { diff --git a/Mage.Sets/src/mage/sets/magic2014/VastwoodHydra.java b/Mage.Sets/src/mage/sets/magic2014/VastwoodHydra.java index 128e2d989fd..9ac69ece96e 100644 --- a/Mage.Sets/src/mage/sets/magic2014/VastwoodHydra.java +++ b/Mage.Sets/src/mage/sets/magic2014/VastwoodHydra.java @@ -30,12 +30,11 @@ package mage.sets.magic2014; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.dynamicvalue.common.CountersCount; -import mage.abilities.effects.EntersBattlefieldEffect; import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Outcome; @@ -70,7 +69,8 @@ public class VastwoodHydra extends CardImpl { this.toughness = new MageInt(0); // Vastwood Hydra enters the battlefield with X +1/+1 counters on it. - this.addAbility(new EntersBattlefieldAbility(new VastwoodHydraEffect())); + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance()))); + // When Vastwood Hydra dies, you may distribute a number of +1/+1 counters equal to the number of +1/+1 counters on Vastwood Hydra among any number of creatures you control. Ability ability = new DiesTriggeredAbility(new VastwoodHydraDistributeEffect(), true); ability.addTarget(new TargetCreaturePermanentAmount(new CountersCount(CounterType.P1P1), filter)); @@ -87,41 +87,6 @@ public class VastwoodHydra extends CardImpl { } } -class VastwoodHydraEffect extends OneShotEffect { - - public VastwoodHydraEffect() { - super(Outcome.BoostCreature); - staticText = "with X +1/+1 counters on it"; - } - - public VastwoodHydraEffect(final VastwoodHydraEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (spellAbility != null - && spellAbility.getSourceId().equals(source.getSourceId()) - && permanent.getZoneChangeCounter(game) - 1 == spellAbility.getSourceObjectZoneChangeCounter()) { - int amount = spellAbility.getManaCostsToPay().getX(); - if (amount > 0) { - permanent.addCounters(CounterType.P1P1.createInstance(amount), game); - } - } - } - return true; - } - - @Override - public VastwoodHydraEffect copy() { - return new VastwoodHydraEffect(this); - } - -} - class VastwoodHydraDistributeEffect extends OneShotEffect { public VastwoodHydraDistributeEffect() { diff --git a/Mage.Sets/src/mage/sets/magic2015/ChasmSkulker.java b/Mage.Sets/src/mage/sets/magic2015/ChasmSkulker.java index 874f933c5a9..b8af72b4240 100644 --- a/Mage.Sets/src/mage/sets/magic2015/ChasmSkulker.java +++ b/Mage.Sets/src/mage/sets/magic2015/ChasmSkulker.java @@ -29,7 +29,6 @@ package mage.sets.magic2015; import java.util.UUID; import mage.MageInt; -import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.common.DrawCardControllerTriggeredAbility; @@ -65,7 +64,7 @@ public class ChasmSkulker extends CardImpl { // Whenever you draw a card, put a +1/+1 counter on Chasm Skulker. this.addAbility(new DrawCardControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false)); - + // When Chasm Skulker dies, put X 1/1 blue Squid creature tokens with islandwalk onto the battlefield, where X is the number of +1/+1 counters on Chasm Skulker. this.addAbility(new DiesTriggeredAbility(new ChasmSkulkerEffect(), false)); } @@ -127,4 +126,4 @@ class ChasmSkulkerSquidToken extends Token { this.addAbility(new IslandwalkAbility()); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/magic2015/GenesisHydra.java b/Mage.Sets/src/mage/sets/magic2015/GenesisHydra.java index af7a92c7e13..703a9f5a0cf 100644 --- a/Mage.Sets/src/mage/sets/magic2015/GenesisHydra.java +++ b/Mage.Sets/src/mage/sets/magic2015/GenesisHydra.java @@ -31,10 +31,10 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.SpellAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.EntersBattlefieldEffect; +import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CastSourceTriggeredAbility; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.Cards; @@ -51,7 +51,6 @@ import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; -import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetCard; @@ -72,8 +71,9 @@ public class GenesisHydra extends CardImpl { // When you cast Genesis Hydra, reveal the top X cards of your library. You may put a nonland permanent card with converted mana cost X or less from among them onto the battlefield. Then shuffle the rest into your library. this.addAbility(new CastSourceTriggeredAbility(new GenesisHydraPutOntoBattlefieldEffect(), false)); + // Genesis Hydra enters the battlefield with X +1/+1 counters on it. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new EntersBattlefieldEffect(new GenesisHydraEntersBattlefieldEffect()))); + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance()))); } public GenesisHydra(final GenesisHydra card) { @@ -86,43 +86,6 @@ public class GenesisHydra extends CardImpl { } } -class GenesisHydraEntersBattlefieldEffect extends OneShotEffect { - - public GenesisHydraEntersBattlefieldEffect() { - super(Outcome.BoostCreature); - staticText = "{this} enters the battlefield with X +1/+1 counters on it"; - } - - public GenesisHydraEntersBattlefieldEffect(final GenesisHydraEntersBattlefieldEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (spellAbility != null - && spellAbility.getSourceId().equals(source.getSourceId()) - && permanent.getZoneChangeCounter(game) - 1 == spellAbility.getSourceObjectZoneChangeCounter()) { - if (spellAbility.getSourceId().equals(source.getSourceId())) { // put into play by normal cast - int amount = spellAbility.getManaCostsToPay().getX(); - if (amount > 0) { - permanent.addCounters(CounterType.P1P1.createInstance(amount), game); - } - } - } - } - return true; - } - - @Override - public GenesisHydraEntersBattlefieldEffect copy() { - return new GenesisHydraEntersBattlefieldEffect(this); - } - -} - class GenesisHydraPutOntoBattlefieldEffect extends OneShotEffect { public GenesisHydraPutOntoBattlefieldEffect() { diff --git a/Mage.Sets/src/mage/sets/magic2015/GoblinRabblemaster.java b/Mage.Sets/src/mage/sets/magic2015/GoblinRabblemaster.java index 9d23e6719af..cf2df4c91fa 100644 --- a/Mage.Sets/src/mage/sets/magic2015/GoblinRabblemaster.java +++ b/Mage.Sets/src/mage/sets/magic2015/GoblinRabblemaster.java @@ -50,6 +50,7 @@ import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AttackingPredicate; import mage.filter.predicate.permanent.ControllerPredicate; import mage.game.permanent.token.Token; +import mage.watchers.common.AttackedThisTurnWatcher; /** * @@ -59,15 +60,15 @@ public class GoblinRabblemaster extends CardImpl { private static final FilterCreaturePermanent otherGoblinFilter = new FilterCreaturePermanent("Goblin", "Other Goblin creatures you control"); private static final FilterCreaturePermanent attackingFilter = new FilterCreaturePermanent("Goblin", "other attacking Goblin"); - + static { otherGoblinFilter.add(new AnotherPredicate()); otherGoblinFilter.add(new ControllerPredicate(TargetController.YOU)); - + attackingFilter.add(new AttackingPredicate()); attackingFilter.add(new AnotherPredicate()); } - + public GoblinRabblemaster(UUID ownerId) { super(ownerId, 145, "Goblin Rabblemaster", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}"); this.expansionSetCode = "M15"; @@ -79,11 +80,11 @@ public class GoblinRabblemaster extends CardImpl { // Other Goblin creatures you control attack each turn if able. Effect effect = new AttacksIfAbleAllEffect(otherGoblinFilter); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); - + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect), new AttackedThisTurnWatcher()); + // At the beginning of combat on your turn, put a 1/1 red Goblin creature token with haste onto the battlefield. this.addAbility(new BeginningOfCombatTriggeredAbility(new CreateTokenEffect(new GoblinToken()), TargetController.YOU, false)); - + // When Goblin Rabblemaster attacks, it gets +1/+0 until end of turn for each other attacking Goblin. this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(new PermanentsOnBattlefieldCount(attackingFilter), new StaticValue(0), Duration.EndOfTurn, true), false)); } @@ -110,5 +111,5 @@ class GoblinToken extends Token { toughness = new MageInt(1); addAbility(HasteAbility.getInstance()); } - + } diff --git a/Mage.Sets/src/mage/sets/magic2015/KurkeshOnakkeAncient.java b/Mage.Sets/src/mage/sets/magic2015/KurkeshOnakkeAncient.java index ad94b5cce07..c76ad2d95b4 100644 --- a/Mage.Sets/src/mage/sets/magic2015/KurkeshOnakkeAncient.java +++ b/Mage.Sets/src/mage/sets/magic2015/KurkeshOnakkeAncient.java @@ -101,13 +101,15 @@ class KurkeshOnakkeAncientTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { - Card source = game.getPermanentOrLKIBattlefield(event.getSourceId()); - if (source != null && source.getCardType().contains(CardType.ARTIFACT)) { - StackAbility stackAbility = (StackAbility) game.getStack().getStackObject(event.getSourceId()); - if (!(stackAbility.getStackAbility() instanceof ManaAbility)) { - Effect effect = this.getEffects().get(0); - effect.setValue("stackAbility", stackAbility.getStackAbility()); - return true; + if (event.getPlayerId().equals(getControllerId())) { + Card source = game.getPermanentOrLKIBattlefield(event.getSourceId()); + if (source != null && source.getCardType().contains(CardType.ARTIFACT)) { + StackAbility stackAbility = (StackAbility) game.getStack().getStackObject(event.getSourceId()); + if (!(stackAbility.getStackAbility() instanceof ManaAbility)) { + Effect effect = this.getEffects().get(0); + effect.setValue("stackAbility", stackAbility.getStackAbility()); + return true; + } } } return false; @@ -115,7 +117,7 @@ class KurkeshOnakkeAncientTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever you activate an ability of an artifact, if it isn't a mana ability, you may pay {R}. If you do, copy that ability. You may choose new targets for the copy."; + return "Whenever you activate an ability of an artifact, if it isn't a mana ability" + super.getRule(); } } @@ -123,7 +125,7 @@ class KurkeshOnakkeAncientEffect extends OneShotEffect { KurkeshOnakkeAncientEffect() { super(Outcome.Benefit); - this.staticText = ", you may pay {R}. If you do, copy that ability. You may choose new targets for the copy."; + this.staticText = ", you may pay {R}. If you do, copy that ability. You may choose new targets for the copy"; } KurkeshOnakkeAncientEffect(final KurkeshOnakkeAncientEffect effect) { diff --git a/Mage.Sets/src/mage/sets/magic2015/SliverHive.java b/Mage.Sets/src/mage/sets/magic2015/SliverHive.java index 3bcd1d26d85..cfba0c94491 100644 --- a/Mage.Sets/src/mage/sets/magic2015/SliverHive.java +++ b/Mage.Sets/src/mage/sets/magic2015/SliverHive.java @@ -41,15 +41,17 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.mana.ColorlessManaAbility; import mage.abilities.mana.ConditionalAnyColorManaAbility; import mage.abilities.mana.builder.ConditionalManaBuilder; +import mage.abilities.mana.conditional.ConditionalSpellManaBuilder; import mage.abilities.mana.conditional.CreatureCastManaCondition; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; +import mage.filter.FilterSpell; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.Game; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.SliverToken; /** * @@ -58,9 +60,14 @@ import mage.game.permanent.token.Token; public class SliverHive extends CardImpl { private static final FilterControlledPermanent filter = new FilterControlledPermanent("Sliver"); + private static final FilterSpell filterSpell = new FilterSpell("a Sliver spell"); + + static { + } static { filter.add(new SubtypePredicate("Sliver")); + filterSpell.add(new SubtypePredicate("Sliver")); } public SliverHive(UUID ownerId) { @@ -71,7 +78,7 @@ public class SliverHive extends CardImpl { this.addAbility(new ColorlessManaAbility()); // {T}: Add one mana of any color to your mana pool. Spend this mana only to cast a Sliver spell. - this.addAbility(new ConditionalAnyColorManaAbility(new TapSourceCost(), 1, new SliverHiveManaBuilder(), true)); + this.addAbility(new ConditionalAnyColorManaAbility(new TapSourceCost(), 1, new ConditionalSpellManaBuilder(filterSpell), true)); // {5}, {T}: Put a 1/1 colorless Sliver creature token onto the battlefield. Activate this ability only if you control a Sliver. Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SliverToken()), new TapSourceCost(), @@ -127,15 +134,3 @@ class SliverHiveManaCondition extends CreatureCastManaCondition { return false; } } - -class SliverToken extends Token { - - SliverToken() { - super("Sliver", "1/1 colorless Sliver creature token"); - setOriginalExpansionSetCode("M15"); - cardType.add(CardType.CREATURE); - subtype.add("Sliver"); - power = new MageInt(1); - toughness = new MageInt(1); - } -} diff --git a/Mage.Sets/src/mage/sets/magicorigins/AlhammarretHighArbiter.java b/Mage.Sets/src/mage/sets/magicorigins/AlhammarretHighArbiter.java index a3ffd5c8fb0..3ae24d013b9 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/AlhammarretHighArbiter.java +++ b/Mage.Sets/src/mage/sets/magicorigins/AlhammarretHighArbiter.java @@ -166,7 +166,7 @@ class AlhammarretHighArbiterCantCastEffect extends ContinuousRuleModifyingEffect public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { - return "You may not cast a card named " + cardName + " (" + mageObject.getLogName() + ")."; + return "You may not cast a card named " + cardName + " (" + mageObject.getIdName() + ")."; } return null; } diff --git a/Mage.Sets/src/mage/sets/magicorigins/EvolutionaryLeap.java b/Mage.Sets/src/mage/sets/magicorigins/EvolutionaryLeap.java index 60209bb3d7c..29b4b9dc852 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/EvolutionaryLeap.java +++ b/Mage.Sets/src/mage/sets/magicorigins/EvolutionaryLeap.java @@ -42,6 +42,7 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterCreatureCard; import mage.game.Game; import mage.players.Library; @@ -60,7 +61,7 @@ public class EvolutionaryLeap extends CardImpl { // {G}, Sacrifice a creature: Reveal cards from the top of your library until you reveal a creature card. Put that card into your hand and the rest on the bottom of your library in a random order. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new EvolutionaryLeapEffect(), new ManaCostsImpl("{G}")); - ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent())); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent("a creature")))); this.addAbility(ability); } @@ -96,7 +97,7 @@ class EvolutionaryLeapEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = game.getObject(source.getSourceId()); - if (controller != null && controller.getLibrary().size() > 0) { + if (controller != null && controller.getLibrary().size() > 0) { Cards cards = new CardsImpl(); Library library = controller.getLibrary(); Card card = null; @@ -108,22 +109,27 @@ class EvolutionaryLeapEffect extends OneShotEffect { } while (library.size() > 0 && card != null && !filter.match(card, game)); // reveal cards if (!cards.isEmpty()) { - controller.revealCards(sourceObject.getName(), cards, game); - } - // put creature card in hand - controller.moveCards(card, Zone.LIBRARY, Zone.HAND, source, game); - // remove it from revealed card list - cards.remove(card); - // Put the rest on the bottom of your library in a random order - while (cards.size() > 0) { - card = cards.getRandom(game); - if (card != null) { + controller.revealCards(sourceObject.getIdName(), cards, game); + if (filter.match(card, game)) { + // put creature card in hand + controller.moveCards(card, Zone.LIBRARY, Zone.HAND, source, game); + // remove it from revealed card list cards.remove(card); - controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.HAND, false, false); } + // Put the rest on the bottom of your library in a random order + Cards randomOrder = new CardsImpl(); + while (cards.size() > 0) { + card = cards.getRandom(game); + if (card != null) { + cards.remove(card); + randomOrder.add(card); + controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.HAND, false, false); + } + } + controller.putCardsOnBottomOfLibrary(randomOrder, game, source, false); } return true; } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/magicorigins/GatherThePack.java b/Mage.Sets/src/mage/sets/magicorigins/GatherThePack.java index c6087d29b07..2d02e4ee35b 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/GatherThePack.java +++ b/Mage.Sets/src/mage/sets/magicorigins/GatherThePack.java @@ -28,6 +28,7 @@ package mage.sets.magicorigins; import java.util.UUID; +import mage.MageObject; import mage.abilities.Ability; import mage.abilities.condition.common.SpellMasteryCondition; import mage.abilities.effects.OneShotEffect; @@ -83,12 +84,14 @@ class GatherThePackEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); - if (controller == null) { + MageObject sourceObject = source.getSourceObject(game); + if (controller == null || sourceObject == null) { return false; } Cards cards = new CardsImpl(Zone.LIBRARY); cards.addAll(controller.getLibrary().getTopCards(game, 5)); if (!cards.isEmpty()) { + controller.revealCards(sourceObject.getIdName(), cards, game); int creatures = cards.count(new FilterCreatureCard(), source.getSourceId(), source.getControllerId(), game); if (creatures > 0) { int max = 1; diff --git a/Mage.Sets/src/mage/sets/magicorigins/GideonsPhalanx.java b/Mage.Sets/src/mage/sets/magicorigins/GideonsPhalanx.java index 58afd8bc82e..d091b330b4e 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/GideonsPhalanx.java +++ b/Mage.Sets/src/mage/sets/magicorigins/GideonsPhalanx.java @@ -28,7 +28,6 @@ package mage.sets.magicorigins; import java.util.UUID; -import mage.MageInt; import mage.ObjectColor; import mage.abilities.condition.common.SpellMasteryCondition; import mage.abilities.decorator.ConditionalOneShotEffect; @@ -37,13 +36,12 @@ import mage.abilities.effects.common.AddContinuousEffectToGame; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.continuous.GainAbilityAllEffect; import mage.abilities.keyword.IndestructibleAbility; -import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; import mage.filter.common.FilterControlledCreaturePermanent; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.KnightToken; /** * @@ -56,7 +54,7 @@ public class GideonsPhalanx extends CardImpl { this.expansionSetCode = "ORI"; // Put four 2/2 white Knight creature tokens with vigilance onto the battlefield. - this.getSpellAbility().addEffect(new CreateTokenEffect(new GideonsPhalanxKnightToken(), 4)); + this.getSpellAbility().addEffect(new CreateTokenEffect(new KnightToken(), 4)); // Spell mastery - If there are two or more instant and/or sorcery cards in your graveyard, creatures you control gain indestructible until end of turn. Effect effect = new ConditionalOneShotEffect( @@ -75,17 +73,3 @@ public class GideonsPhalanx extends CardImpl { return new GideonsPhalanx(this); } } - -class GideonsPhalanxKnightToken extends Token { - - public GideonsPhalanxKnightToken() { - super("Knight", "2/2 white Knight creature tokens with vigilance"); - this.setOriginalExpansionSetCode("ORI"); - cardType.add(CardType.CREATURE); - color.setColor(ObjectColor.WHITE); - subtype.add("Knight"); - power = new MageInt(2); - toughness = new MageInt(2); - addAbility(VigilanceAbility.getInstance()); - } -} diff --git a/Mage.Sets/src/mage/sets/magicorigins/HangarbackWalker.java b/Mage.Sets/src/mage/sets/magicorigins/HangarbackWalker.java index 0b0a72bf055..652cbf4a8c0 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/HangarbackWalker.java +++ b/Mage.Sets/src/mage/sets/magicorigins/HangarbackWalker.java @@ -30,25 +30,20 @@ package mage.sets.magicorigins; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.dynamicvalue.common.CountersCount; -import mage.abilities.effects.EntersBattlefieldEffect; -import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; import mage.counters.CounterType; -import mage.game.Game; -import mage.game.permanent.Permanent; import mage.game.permanent.token.ThopterColorlessToken; /** @@ -65,7 +60,7 @@ public class HangarbackWalker extends CardImpl { this.toughness = new MageInt(0); // Hangarback Walker enters the battlefield with X +1/+1 counters on it. - this.addAbility(new EntersBattlefieldAbility(new HangarbackWalkerEffect(), "with X +1/+1 counters on it")); + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance()))); // When Hangarback Walker dies, put a 1/1 colorless Thopter artifact creature token with flying onto the battlefield for each +1/+1 counter on Hangarback Walker. this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new ThopterColorlessToken(), new CountersCount(CounterType.P1P1)), false)); @@ -85,38 +80,3 @@ public class HangarbackWalker extends CardImpl { return new HangarbackWalker(this); } } - -class HangarbackWalkerEffect extends OneShotEffect { - - public HangarbackWalkerEffect() { - super(Outcome.BoostCreature); - staticText = "{this} enters the battlefield with X +1/+1 counters on it"; - } - - public HangarbackWalkerEffect(final HangarbackWalkerEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (spellAbility != null - && spellAbility.getSourceId().equals(source.getSourceId()) - && permanent.getZoneChangeCounter(game) - 1 == spellAbility.getSourceObjectZoneChangeCounter()) { - int amount = spellAbility.getManaCostsToPay().getX(); - if (amount > 0) { - permanent.addCounters(CounterType.P1P1.createInstance(amount), game); - } - } - } - return true; - } - - @Override - public HangarbackWalkerEffect copy() { - return new HangarbackWalkerEffect(this); - } - -} diff --git a/Mage.Sets/src/mage/sets/magicorigins/PriestOfTheBloodRite.java b/Mage.Sets/src/mage/sets/magicorigins/PriestOfTheBloodRite.java index 6eed42819e2..ad780413154 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/PriestOfTheBloodRite.java +++ b/Mage.Sets/src/mage/sets/magicorigins/PriestOfTheBloodRite.java @@ -38,7 +38,7 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.TargetController; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.DemonToken; /** * @@ -70,19 +70,3 @@ public class PriestOfTheBloodRite extends CardImpl { return new PriestOfTheBloodRite(this); } } - -class DemonToken extends Token { - - DemonToken() { - super("Demon", "5/5 black Demon creature token with flying"); - cardType.add(CardType.CREATURE); - subtype.add("Demon"); - setOriginalExpansionSetCode("ORI"); - - color.setBlack(true); - power = new MageInt(5); - toughness = new MageInt(5); - - addAbility(FlyingAbility.getInstance()); - } -} diff --git a/Mage.Sets/src/mage/sets/magicorigins/ThopterEngineer.java b/Mage.Sets/src/mage/sets/magicorigins/ThopterEngineer.java index dd0a4a1c202..a0cd37ed550 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/ThopterEngineer.java +++ b/Mage.Sets/src/mage/sets/magicorigins/ThopterEngineer.java @@ -42,7 +42,7 @@ import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.ThopterColorlessToken; /** * @@ -55,7 +55,7 @@ public class ThopterEngineer extends CardImpl { static { filter.add(new CardTypePredicate(CardType.ARTIFACT)); } - + public ThopterEngineer(UUID ownerId) { super(ownerId, 165, "Thopter Engineer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); this.expansionSetCode = "ORI"; @@ -65,8 +65,8 @@ public class ThopterEngineer extends CardImpl { this.toughness = new MageInt(3); // When Thopter Engineer enters the battlefield, put a 1/1 colorless Thopter artifact creature token with flying onto the battlefield. - this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ThopterEngineerThopterToken(), 1))); - + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ThopterColorlessToken(), 1))); + // Artifact creatures you control have haste. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, filter, false))); } @@ -80,15 +80,3 @@ public class ThopterEngineer extends CardImpl { return new ThopterEngineer(this); } } - -class ThopterEngineerThopterToken extends Token { - ThopterEngineerThopterToken() { - super("Thopter", "a 1/1 colorless Thopter artifact creature token with flying"); - cardType.add(CardType.CREATURE); - cardType.add(CardType.ARTIFACT); - subtype.add("Thopter"); - power = new MageInt(1); - toughness = new MageInt(1); - this.addAbility(FlyingAbility.getInstance()); - } -} diff --git a/Mage.Sets/src/mage/sets/magicorigins/TouchOfMoonglove.java b/Mage.Sets/src/mage/sets/magicorigins/TouchOfMoonglove.java index 07c52503d96..9edcf4a82fd 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/TouchOfMoonglove.java +++ b/Mage.Sets/src/mage/sets/magicorigins/TouchOfMoonglove.java @@ -33,7 +33,7 @@ import mage.abilities.Ability; import mage.abilities.DelayedTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.keyword.DeathtouchAbility; @@ -86,7 +86,7 @@ public class TouchOfMoonglove extends CardImpl { class TouchOfMoongloveAddTriggerEffect extends OneShotEffect { public TouchOfMoongloveAddTriggerEffect() { - super(Outcome.Damage); + super(Outcome.LoseLife); this.staticText = "Whenever a creature dealt damage by that creature this turn dies, its controller loses 2 life"; } @@ -118,7 +118,7 @@ class TouchOfMoongloveDelayedTriggeredAbility extends DelayedTriggeredAbility { private final MageObjectReference creatureToCheck; public TouchOfMoongloveDelayedTriggeredAbility(MageObjectReference creatureToCheck) { - super(new DamageTargetEffect(2), Duration.EndOfTurn, false); + super(new LoseLifeTargetEffect(2), Duration.EndOfTurn, false); this.creatureToCheck = creatureToCheck; } diff --git a/Mage.Sets/src/mage/sets/mastersedition/GoblinWizard.java b/Mage.Sets/src/mage/sets/mastersedition/GoblinWizard.java new file mode 100644 index 00000000000..47465f6d88b --- /dev/null +++ b/Mage.Sets/src/mage/sets/mastersedition/GoblinWizard.java @@ -0,0 +1,52 @@ +/* + * 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.mastersedition; + +import java.util.UUID; + +/** + * + * @author BursegSardaukar + */ +public class GoblinWizard extends mage.sets.thedark.GoblinWizard { + + public GoblinWizard(UUID ownerId) { + super(ownerId); + this.cardNumber = 97; + this.expansionSetCode = "MED"; + } + + public GoblinWizard(final GoblinWizard card) { + super(card); + } + + @Override + public GoblinWizard copy() { + return new GoblinWizard(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mastersedition/ShamblingStrider.java b/Mage.Sets/src/mage/sets/mastersedition/ShamblingStrider.java new file mode 100644 index 00000000000..e4751e59105 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mastersedition/ShamblingStrider.java @@ -0,0 +1,66 @@ +/* + * 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.mastersedition; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author hanasu + */ +public class ShamblingStrider extends CardImpl { + + public ShamblingStrider(UUID ownerId) { + super(ownerId, 129, "Shambling Strider", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); + this.expansionSetCode = "MED"; + this.subtype.add("Yeti"); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // {R}{G}: Shambling Strider gets +1/-1 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, -1, Duration.EndOfTurn), new ManaCostsImpl("{R}{G}"))); + } + + public ShamblingStrider(final ShamblingStrider card) { + super(card); + } + + @Override + public ShamblingStrider copy() { + return new ShamblingStrider(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mastersedition/StormSeeker.java b/Mage.Sets/src/mage/sets/mastersedition/StormSeeker.java new file mode 100644 index 00000000000..d2aca3cc6b1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mastersedition/StormSeeker.java @@ -0,0 +1,95 @@ +/* + * 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.mastersedition; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPlayer; + +/** + * + * @author hanasu + */ +public class StormSeeker extends CardImpl { + + public StormSeeker(UUID ownerId) { + super(ownerId, 132, "Storm Seeker", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{3}{G}"); + this.expansionSetCode = "MED"; + + // Storm Seeker deals damage to target player equal to the number of cards in that player's hand. + Effect effect = new DamageTargetEffect(new TargetPlayerCardsInHandCount()); + effect.setText("{this} deals damage to target player equal to the number of cards in that player's hand."); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetPlayer()); + } + + public StormSeeker(final StormSeeker card) { + super(card); + } + + @Override + public StormSeeker copy() { + return new StormSeeker(this); + } +} + +class TargetPlayerCardsInHandCount implements DynamicValue { + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + Player targetPlayer = game.getPlayer(sourceAbility.getFirstTarget()); + if (targetPlayer != null) { + return targetPlayer.getHand().size(); + } + + return 0; + } + + @Override + public DynamicValue copy() { + return new TargetPlayerCardsInHandCount(); + } + + @Override + public String toString() { + return "1"; + } + + @Override + public String getMessage() { + return "target player's cards in hand"; + } +} diff --git a/Mage.Sets/src/mage/sets/mastersedition/SunkenCity.java b/Mage.Sets/src/mage/sets/mastersedition/SunkenCity.java new file mode 100644 index 00000000000..566daa28c39 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mastersedition/SunkenCity.java @@ -0,0 +1,76 @@ +/* + * 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.mastersedition; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author LoneFox + */ +public class SunkenCity extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("blue creatures"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLUE)); + } + + public SunkenCity(UUID ownerId) { + super(ownerId, 51, "Sunken City", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{U}{U}"); + this.expansionSetCode = "MED"; + + // At the beginning of your upkeep, sacrifice Sunken City unless you pay {U}{U}. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ManaCostsImpl("{U}{U}")), TargetController.YOU, false)); + // Blue creatures get +1/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, false))); + } + + public SunkenCity(final SunkenCity card) { + super(card); + } + + @Override + public SunkenCity copy() { + return new SunkenCity(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditionii/Aurochs.java b/Mage.Sets/src/mage/sets/masterseditionii/Aurochs.java new file mode 100644 index 00000000000..56ff3077b2a --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditionii/Aurochs.java @@ -0,0 +1,52 @@ +/* + * 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.masterseditionii; + +import java.util.UUID; + +/** + * + * @author anonymous + */ +public class Aurochs extends mage.sets.iceage.Aurochs { + + public Aurochs(UUID ownerId) { + super(ownerId); + this.cardNumber = 153; + this.expansionSetCode = "ME2"; + } + + public Aurochs(final Aurochs card) { + super(card); + } + + @Override + public Aurochs copy() { + return new Aurochs(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditionii/FolkOfThePines.java b/Mage.Sets/src/mage/sets/masterseditionii/FolkOfThePines.java new file mode 100644 index 00000000000..c769ee7d288 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditionii/FolkOfThePines.java @@ -0,0 +1,66 @@ +/* + * 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.masterseditionii; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author hanasu + */ +public class FolkOfThePines extends CardImpl { + + public FolkOfThePines(UUID ownerId) { + super(ownerId, 162, "Folk of the Pines", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{G}"); + this.expansionSetCode = "ME2"; + this.subtype.add("Dryad"); + this.power = new MageInt(2); + this.toughness = new MageInt(5); + + // {1}{G}: Folk of the Pines gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{1}{G}"))); + } + + public FolkOfThePines(final FolkOfThePines card) { + super(card); + } + + @Override + public FolkOfThePines copy() { + return new FolkOfThePines(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditionii/GrandmotherSengir.java b/Mage.Sets/src/mage/sets/masterseditionii/GrandmotherSengir.java new file mode 100644 index 00000000000..5a1ea84a567 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditionii/GrandmotherSengir.java @@ -0,0 +1,74 @@ +/* + * 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.masterseditionii; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author hanasu + */ +public class GrandmotherSengir extends CardImpl { + + public GrandmotherSengir(UUID ownerId) { + super(ownerId, 93, "Grandmother Sengir", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{B}"); + this.expansionSetCode = "ME2"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {1}{B}, {tap}: Target creature gets -1/-1 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-1, -1, Duration.EndOfTurn), new ManaCostsImpl("{1}{B}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public GrandmotherSengir(final GrandmotherSengir card) { + super(card); + } + + @Override + public GrandmotherSengir copy() { + return new GrandmotherSengir(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/GhostsOfTheDamned.java b/Mage.Sets/src/mage/sets/masterseditioniii/GhostsOfTheDamned.java new file mode 100644 index 00000000000..e2d6369df47 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/GhostsOfTheDamned.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.sets.masterseditioniii; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author hanasu + */ +public class GhostsOfTheDamned extends CardImpl { + + public GhostsOfTheDamned(UUID ownerId) { + super(ownerId, 68, "Ghosts of the Damned", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); + this.expansionSetCode = "ME3"; + this.subtype.add("Spirit"); + this.power = new MageInt(0); + this.toughness = new MageInt(2); + + // {tap}: Target creature gets -1/-0 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-1, 0, Duration.EndOfTurn), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public GhostsOfTheDamned(final GhostsOfTheDamned card) { + super(card); + } + + @Override + public GhostsOfTheDamned copy() { + return new GhostsOfTheDamned(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/RevekaWizardSavant.java b/Mage.Sets/src/mage/sets/masterseditioniii/RevekaWizardSavant.java new file mode 100644 index 00000000000..2416727587a --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/RevekaWizardSavant.java @@ -0,0 +1,74 @@ +/* + * 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.masterseditioniii; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.DamageControllerEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.DontUntapInControllersNextUntapStepSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author hanasu + */ +public class RevekaWizardSavant extends CardImpl { + + public RevekaWizardSavant(UUID ownerId) { + super(ownerId, 49, "Reveka, Wizard Savant", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); + this.expansionSetCode = "ME3"; + this.supertype.add("Legendary"); + this.subtype.add("Dwarf"); + this.subtype.add("Wizard"); + this.power = new MageInt(0); + this.toughness = new MageInt(1); + + // {tap}: Reveka, Wizard Savant deals 2 damage to target creature or player and doesn't untap during your next untap step. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); + ability.addTarget(new TargetCreatureOrPlayer()); + ability.addEffect(new DontUntapInControllersNextUntapStepSourceEffect()); + this.addAbility(ability); + } + + public RevekaWizardSavant(final RevekaWizardSavant card) { + super(card); + } + + @Override + public RevekaWizardSavant copy() { + return new RevekaWizardSavant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniv/ClockworkGnomes.java b/Mage.Sets/src/mage/sets/masterseditioniv/ClockworkGnomes.java new file mode 100644 index 00000000000..d56765d987f --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniv/ClockworkGnomes.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.sets.masterseditioniv; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.RegenerateTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author hanasu + */ +public class ClockworkGnomes extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("artifact creature"); + + static { + filter.add(new CardTypePredicate(CardType.ARTIFACT)); + } + + public ClockworkGnomes(UUID ownerId) { + super(ownerId, 191, "Clockwork Gnomes", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); + this.expansionSetCode = "ME4"; + this.subtype.add("Gnome"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {3}, {tap}: Regenerate target artifact creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateTargetEffect(), new ManaCostsImpl("{3}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + } + + public ClockworkGnomes(final ClockworkGnomes card) { + super(card); + } + + @Override + public ClockworkGnomes copy() { + return new ClockworkGnomes(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniv/Drowned.java b/Mage.Sets/src/mage/sets/masterseditioniv/Drowned.java new file mode 100644 index 00000000000..94839a3396c --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniv/Drowned.java @@ -0,0 +1,52 @@ +/* + * 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.masterseditioniv; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class Drowned extends mage.sets.thedark.Drowned { + + public Drowned(UUID ownerId) { + super(ownerId); + this.cardNumber = 47; + this.expansionSetCode = "ME4"; + } + + public Drowned(final Drowned card) { + super(card); + } + + @Override + public Drowned copy() { + return new Drowned(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniv/SoldeviMachinist.java b/Mage.Sets/src/mage/sets/masterseditioniv/SoldeviMachinist.java new file mode 100644 index 00000000000..6af888069af --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniv/SoldeviMachinist.java @@ -0,0 +1,115 @@ +/* + * 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.masterseditioniv; + +import java.util.UUID; +import mage.ConditionalMana; +import mage.MageInt; +import mage.MageObject; +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.condition.Condition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.mana.ConditionalColorlessManaAbility; +import mage.abilities.mana.builder.ConditionalManaBuilder; +import mage.abilities.mana.conditional.ManaCondition; +import mage.cards.CardImpl; +import mage.constants.AbilityType; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.game.Game; + +/** + * + * @author hanasu + */ +public class SoldeviMachinist extends CardImpl { + + public SoldeviMachinist(UUID ownerId) { + super(ownerId, 63, "Soldevi Machinist", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "ME4"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.subtype.add("Artificer"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}: Add {2} to your mana pool. Spend this mana only to activate abilities of artifacts. + this.addAbility(new ConditionalColorlessManaAbility(new TapSourceCost(), 2, new SoldeviMachinistManaBuilder())); + } + + public SoldeviMachinist(final SoldeviMachinist card) { + super(card); + } + + @Override + public SoldeviMachinist copy() { + return new SoldeviMachinist(this); + } +} + +class SoldeviMachinistManaBuilder extends ConditionalManaBuilder { + + @Override + public ConditionalMana build(Object... options) { + return new ArtifactAbilityConditionalMana(this.mana); + } + + @Override + public String getRule() { + return "Spend this mana only to activate abilities of artifacts"; + } +} + +class ArtifactAbilityConditionalMana extends ConditionalMana { + + public ArtifactAbilityConditionalMana(Mana mana) { + super(mana); + staticText = "Spend this mana only to activate abilities of artifacts"; + addCondition(new ArtifactAbilityManaCondition()); + } +} + +class ArtifactAbilityManaCondition extends ManaCondition implements Condition { + + @Override + public boolean apply(Game game, Ability source) { + if (source != null && source.getAbilityType().equals(AbilityType.ACTIVATED)) { + MageObject object = game.getObject(source.getSourceId()); + if (object != null && object.getCardType().contains(CardType.ARTIFACT)) { + return true; + } + } + return false; + } + + @Override + public boolean apply(Game game, Ability source, UUID originalId) { + return apply(game, source); + } +} diff --git a/Mage.Sets/src/mage/sets/mercadianmasques/Thwart.java b/Mage.Sets/src/mage/sets/mercadianmasques/Thwart.java index a8c224e8dfe..0ecda013df4 100644 --- a/Mage.Sets/src/mage/sets/mercadianmasques/Thwart.java +++ b/Mage.Sets/src/mage/sets/mercadianmasques/Thwart.java @@ -29,7 +29,7 @@ package mage.sets.mercadianmasques; import java.util.UUID; import mage.abilities.costs.AlternativeCostSourceAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.common.CounterTargetEffect; import mage.cards.CardImpl; import mage.constants.CardType; @@ -54,7 +54,7 @@ public class Thwart extends CardImpl { // You may return three Islands you control to their owner's hand rather than pay Thwart's mana cost. AlternativeCostSourceAbility ability; - ability = new AlternativeCostSourceAbility(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(3, 3, filter, true))); + ability = new AlternativeCostSourceAbility(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(3, 3, filter, true))); this.addAbility(ability); // Counter target spell. diff --git a/Mage.Sets/src/mage/sets/mercadianmasques/TidalBore.java b/Mage.Sets/src/mage/sets/mercadianmasques/TidalBore.java index abd9bf620da..792c862964f 100644 --- a/Mage.Sets/src/mage/sets/mercadianmasques/TidalBore.java +++ b/Mage.Sets/src/mage/sets/mercadianmasques/TidalBore.java @@ -29,7 +29,7 @@ package mage.sets.mercadianmasques; import java.util.UUID; import mage.abilities.costs.AlternativeCostSourceAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.common.MayTapOrUntapTargetEffect; import mage.cards.CardImpl; import mage.constants.CardType; @@ -58,7 +58,7 @@ public class TidalBore extends CardImpl { this.expansionSetCode = "MMQ"; // You may return an Island you control to its owner's hand rather than pay Tidal Bore's mana cost. - this.addAbility(new AlternativeCostSourceAbility(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)))); + this.addAbility(new AlternativeCostSourceAbility(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)))); // You may tap or untap target creature. this.getSpellAbility().addEffect(new MayTapOrUntapTargetEffect()); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); diff --git a/Mage.Sets/src/mage/sets/mirage/BarbedBackWurm.java b/Mage.Sets/src/mage/sets/mirage/BarbedBackWurm.java new file mode 100644 index 00000000000..139d3f54ac7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/BarbedBackWurm.java @@ -0,0 +1,77 @@ +/* + * 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.mirage; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.permanent.BlockingAttackerIdPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class BarbedBackWurm extends CardImpl { + + public BarbedBackWurm(UUID ownerId) { + super(ownerId, 3, "Barbed-Back Wurm", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{B}"); + this.expansionSetCode = "MIR"; + this.subtype.add("Wurm"); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // {B}: Target green creature blocking Barbed-Back Wurm gets -1/-1 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-1, -1, Duration.EndOfTurn), new ManaCostsImpl("{B}")); + FilterCreaturePermanent filter = new FilterCreaturePermanent("green creature blocking {this}"); + filter.add(new ColorPredicate(ObjectColor.GREEN)); + filter.add(new BlockingAttackerIdPredicate(this.getId())); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public BarbedBackWurm(final BarbedBackWurm card) { + super(card); + } + + @Override + public BarbedBackWurm copy() { + return new BarbedBackWurm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirage/JungleWurm.java b/Mage.Sets/src/mage/sets/mirage/JungleWurm.java new file mode 100644 index 00000000000..0ad27034812 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/JungleWurm.java @@ -0,0 +1,119 @@ +/* + * 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.mirage; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BecomesBlockedTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.combat.CombatGroup; +import mage.game.events.GameEvent; + +/** + * + * @author LoneFox + */ +public class JungleWurm extends CardImpl { + + public JungleWurm(UUID ownerId) { + super(ownerId, 122, "Jungle Wurm", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + this.expansionSetCode = "MIR"; + this.subtype.add("Wurm"); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Whenever Jungle Wurm becomes blocked, it gets -1/-1 until end of turn for each creature blocking it beyond the first. + this.addAbility(new JungleWurmAbility()); + } + + public JungleWurm(final JungleWurm card) { + super(card); + } + + @Override + public JungleWurm copy() { + return new JungleWurm(this); + } +} + +class JungleWurmAbility extends BecomesBlockedTriggeredAbility { + + public JungleWurmAbility() { + super(null, false); + JungleWurmValue value = new JungleWurmValue(); + this.addEffect(new BoostSourceEffect(value, value, Duration.EndOfTurn)); + } + + public JungleWurmAbility(final JungleWurmAbility ability) { + super(ability); + } + + @Override + public JungleWurmAbility copy() { + return new JungleWurmAbility(this); + } + + @Override + public String getRule() { + return "Whenever {this} becomes blocked, it gets -1/-1 until end of turn for each creature blocking it beyond the first."; + } +} + +class JungleWurmValue implements DynamicValue { + + @Override + public JungleWurmValue copy() { + return new JungleWurmValue(); + } + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + int count = 0; + for(CombatGroup combatGroup : game.getCombat().getGroups()) { + if(combatGroup.getAttackers().contains(sourceAbility.getSourceId())) { + int blockers = combatGroup.getBlockers().size(); + return blockers > 1 ? -(blockers - 1) : 0; + } + } + return 0; + } + + @Override + public String getMessage() { + return "-1/-1 until end of turn for each creature blocking it beyond the first"; + } +} + diff --git a/Mage.Sets/src/mage/sets/mirage/SacredMesa.java b/Mage.Sets/src/mage/sets/mirage/SacredMesa.java index 825bdbc7be6..1f44ac6bc21 100644 --- a/Mage.Sets/src/mage/sets/mirage/SacredMesa.java +++ b/Mage.Sets/src/mage/sets/mirage/SacredMesa.java @@ -35,7 +35,6 @@ import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; -import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; @@ -43,7 +42,7 @@ import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.PegasusToken; import mage.target.common.TargetControlledPermanent; /** @@ -51,7 +50,7 @@ import mage.target.common.TargetControlledPermanent; * @author emerald000 */ public class SacredMesa extends CardImpl { - + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Pegasus"); static { filter.add(new SubtypePredicate("Pegasus")); @@ -61,12 +60,11 @@ public class SacredMesa extends CardImpl { super(ownerId, 241, "Sacred Mesa", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); this.expansionSetCode = "MIR"; - // At the beginning of your upkeep, sacrifice Sacred Mesa unless you sacrifice a Pegasus. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new SacrificeTargetCost(new TargetControlledPermanent(filter))), TargetController.YOU, false)); - + // {1}{W}: Put a 1/1 white Pegasus creature token with flying onto the battlefield. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SacredMesaPegasusToken()), new ManaCostsImpl<>("{1}{W}"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new PegasusToken()), new ManaCostsImpl<>("{1}{W}"))); } public SacredMesa(final SacredMesa card) { @@ -78,16 +76,3 @@ public class SacredMesa extends CardImpl { return new SacredMesa(this); } } - -class SacredMesaPegasusToken extends Token { - - SacredMesaPegasusToken() { - super("Pegasus", "1/1 white Pegasus creature token with flying"); - cardType.add(CardType.CREATURE); - color.setWhite(true); - subtype.add("Pegasus"); - power = new MageInt(1); - toughness = new MageInt(1); - addAbility(FlyingAbility.getInstance()); - } -} diff --git a/Mage.Sets/src/mage/sets/mirrodin/ChaliceOfTheVoid.java b/Mage.Sets/src/mage/sets/mirrodin/ChaliceOfTheVoid.java index afab045802d..4192513f685 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/ChaliceOfTheVoid.java +++ b/Mage.Sets/src/mage/sets/mirrodin/ChaliceOfTheVoid.java @@ -29,12 +29,11 @@ package mage.sets.mirrodin; import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.effects.Effect; -import mage.abilities.effects.EntersBattlefieldEffect; import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Outcome; @@ -58,7 +57,7 @@ public class ChaliceOfTheVoid extends CardImpl { this.expansionSetCode = "MRD"; // Chalice of the Void enters the battlefield with X charge counters on it. - this.addAbility(new EntersBattlefieldAbility(new ChaliceOfTheVoidEffect(), "with X charge counters on it")); + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.CHARGE.createInstance()))); // Whenever a player casts a spell with converted mana cost equal to the number of charge counters on Chalice of the Void, counter that spell. this.addAbility(new ChaliceOfTheVoidTriggeredAbility()); @@ -74,39 +73,6 @@ public class ChaliceOfTheVoid extends CardImpl { } } -class ChaliceOfTheVoidEffect extends OneShotEffect { - - public ChaliceOfTheVoidEffect() { - super(Outcome.Benefit); - } - - public ChaliceOfTheVoidEffect(final ChaliceOfTheVoidEffect effect) { - super(effect); - } - - @java.lang.Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (spellAbility != null - && spellAbility.getSourceId().equals(source.getSourceId()) - && permanent.getZoneChangeCounter(game) - 1 == spellAbility.getSourceObjectZoneChangeCounter()) { - int amount = spellAbility.getManaCostsToPay().getX(); - if (amount > 0) { - permanent.addCounters(CounterType.CHARGE.createInstance(amount), game); - } - } - } - return true; - } - - @java.lang.Override - public ChaliceOfTheVoidEffect copy() { - return new ChaliceOfTheVoidEffect(this); - } -} - class ChaliceOfTheVoidTriggeredAbility extends TriggeredAbilityImpl { public ChaliceOfTheVoidTriggeredAbility() { diff --git a/Mage.Sets/src/mage/sets/mirrodin/InciteWar.java b/Mage.Sets/src/mage/sets/mirrodin/InciteWar.java index b7635f2125e..d646a4430e0 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/InciteWar.java +++ b/Mage.Sets/src/mage/sets/mirrodin/InciteWar.java @@ -48,18 +48,19 @@ import mage.filter.predicate.permanent.ControllerPredicate; import mage.game.Game; import mage.players.Player; import mage.target.TargetPlayer; +import mage.watchers.common.AttackedThisTurnWatcher; /** * * @author fireshoes */ public class InciteWar extends CardImpl { - + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures you control"); static { filter.add(new ControllerPredicate(TargetController.YOU)); - } + } public InciteWar(UUID ownerId) { super(ownerId, 96, "Incite War", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{R}"); @@ -68,12 +69,13 @@ public class InciteWar extends CardImpl { // Choose one - Creatures target player controls attack this turn if able; this.getSpellAbility().addEffect(new InciteWarMustAttackEffect()); this.getSpellAbility().addTarget(new TargetPlayer()); - + this.getSpellAbility().addWatcher(new AttackedThisTurnWatcher()); + // or creatures you control gain first strike until end of turn. Mode mode = new Mode(); mode.getEffects().add(new GainAbilityAllEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, filter)); this.getSpellAbility().getModes().addMode(mode); - + // Entwine {2} this.addAbility(new EntwineAbility("{2}")); } @@ -91,7 +93,7 @@ public class InciteWar extends CardImpl { class InciteWarMustAttackEffect extends OneShotEffect { public InciteWarMustAttackEffect() { - super(Outcome.Detriment); + super(Outcome.Detriment); staticText = "Creatures target player control attack this turn if able"; } @@ -116,4 +118,4 @@ class InciteWarMustAttackEffect extends OneShotEffect { } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/CorruptedConscience.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/CorruptedConscience.java index 74adb82e243..c26e3cff44c 100644 --- a/Mage.Sets/src/mage/sets/mirrodinbesieged/CorruptedConscience.java +++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/CorruptedConscience.java @@ -25,12 +25,9 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.mirrodinbesieged; import java.util.UUID; - -import mage.constants.*; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.AttachEffect; @@ -39,6 +36,11 @@ import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; import mage.abilities.keyword.EnchantAbility; import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -48,21 +50,26 @@ import mage.target.common.TargetCreaturePermanent; */ public class CorruptedConscience extends CardImpl { - public CorruptedConscience (UUID ownerId) { + public CorruptedConscience(UUID ownerId) { super(ownerId, 22, "Corrupted Conscience", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}{U}"); this.expansionSetCode = "MBS"; this.subtype.add("Aura"); + // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); + + // You control enchanted creature. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ControlEnchantedEffect())); + + // Enchanted creature has infect. (It deals damage to creatures in the form of -1/-1 counters and to players in the form of poison counters.) this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(InfectAbility.getInstance(), AttachmentType.AURA))); } - public CorruptedConscience (final CorruptedConscience card) { + public CorruptedConscience(final CorruptedConscience card) { super(card); } diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/HeroOfOxidRidge.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/HeroOfOxidRidge.java index a05107e2675..30ed390b48f 100644 --- a/Mage.Sets/src/mage/sets/mirrodinbesieged/HeroOfOxidRidge.java +++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/HeroOfOxidRidge.java @@ -25,13 +25,9 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.mirrodinbesieged; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Rarity; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; @@ -39,6 +35,9 @@ import mage.abilities.effects.RestrictionEffect; import mage.abilities.keyword.BattleCryAbility; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; import mage.game.Game; import mage.game.permanent.Permanent; @@ -91,9 +90,7 @@ class HeroOfOxidRidgeEffect extends RestrictionEffect { @Override public boolean applies(Permanent permanent, Ability source, Game game) { - if (permanent.getPower().getValue() <= 1) - return true; - return false; + return permanent.getPower().getValue() <= 1; } @Override diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/WhiteSunsZenith.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/WhiteSunsZenith.java index ca6630a0c4d..4ff0f362062 100644 --- a/Mage.Sets/src/mage/sets/mirrodinbesieged/WhiteSunsZenith.java +++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/WhiteSunsZenith.java @@ -29,7 +29,6 @@ package mage.sets.mirrodinbesieged; import java.util.UUID; -import mage.MageInt; import mage.ObjectColor; import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.effects.common.CreateTokenEffect; @@ -37,7 +36,7 @@ import mage.abilities.effects.common.ShuffleSpellEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.CatToken; /** * @@ -62,16 +61,3 @@ public class WhiteSunsZenith extends CardImpl { return new WhiteSunsZenith(this); } } - -class CatToken extends Token { - public CatToken() { - super("Cat", "2/2 white Cat creature token"); - setOriginalExpansionSetCode("SOM"); - cardType.add(CardType.CREATURE); - color.setWhite(true); - - subtype.add("Cat"); - power = new MageInt(2); - toughness = new MageInt(2); - } -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/modernmasters/MarshFlitter.java b/Mage.Sets/src/mage/sets/modernmasters/MarshFlitter.java index 56a97459bb9..65428a838bb 100644 --- a/Mage.Sets/src/mage/sets/modernmasters/MarshFlitter.java +++ b/Mage.Sets/src/mage/sets/modernmasters/MarshFlitter.java @@ -44,7 +44,7 @@ import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.GoblinRogueToken; import mage.target.common.TargetControlledPermanent; /** @@ -70,7 +70,7 @@ public class MarshFlitter extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); // When Marsh Flitter enters the battlefield, put two 1/1 black Goblin Rogue creature tokens onto the battlefield. - this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new BlackGoblinRogueToken(), 2), false)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new GoblinRogueToken(), 2), false)); // Sacrifice a Goblin: Marsh Flitter has base power and toughness 3/3 until end of turn. Effect effect = new SetPowerToughnessSourceEffect(3, 3, Duration.EndOfTurn); effect.setText("{this} has base power and toughness 3/3 until end of turn"); @@ -88,15 +88,3 @@ public class MarshFlitter extends CardImpl { return new MarshFlitter(this); } } - -class BlackGoblinRogueToken extends Token { - BlackGoblinRogueToken() { - super("Goblin Rogue", "1/1 black Goblin Rogue creature tokens"); - cardType.add(CardType.CREATURE); - color.setBlack(true); - subtype.add("Goblin"); - subtype.add("Rogue"); - power = new MageInt(1); - toughness = new MageInt(1); - } -} diff --git a/Mage.Sets/src/mage/sets/modernmasters/WarrenWeirding.java b/Mage.Sets/src/mage/sets/modernmasters/WarrenWeirding.java index 8a294fd70a3..b3f6d2144fa 100644 --- a/Mage.Sets/src/mage/sets/modernmasters/WarrenWeirding.java +++ b/Mage.Sets/src/mage/sets/modernmasters/WarrenWeirding.java @@ -47,6 +47,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.ControllerIdPredicate; import mage.game.Game; import mage.game.permanent.Permanent; +import mage.game.permanent.token.GoblinRogueToken; import mage.game.permanent.token.Token; import mage.players.Player; import mage.target.TargetPlayer; @@ -83,9 +84,11 @@ public class WarrenWeirding extends CardImpl { class WarrenWeirdingEffect extends OneShotEffect { private static final FilterCreaturePermanent filterGoblin = new FilterCreaturePermanent(); + static { filterGoblin.add(new SubtypePredicate("Goblin")); } + WarrenWeirdingEffect ( ) { super(Outcome.Sacrifice); staticText = "Target player sacrifices a creature. If a Goblin is sacrificed this way, that player puts two 1/1 black Goblin Rogue creature tokens onto the battlefield, and those tokens gain haste until end of turn"; @@ -113,7 +116,7 @@ class WarrenWeirdingEffect extends OneShotEffect { permanent.sacrifice(source.getSourceId(), game); if (filterGoblin.match(permanent, game)) { for (int i = 0; i < 2; i++) { - Token token = new WarrenWeirdingBlackGoblinRogueToken(); + Token token = new GoblinRogueToken(); Effect effect = new CreateTokenTargetEffect(token); effect.setTargetPointer(new FixedTarget(player.getId())); if (effect.apply(game, source)) { @@ -138,15 +141,3 @@ class WarrenWeirdingEffect extends OneShotEffect { } } - -class WarrenWeirdingBlackGoblinRogueToken extends Token { - WarrenWeirdingBlackGoblinRogueToken() { - super("Goblin Rogue", "1/1 black Goblin Rogue creature tokens, and those tokens gain haste until end of turn"); - cardType.add(CardType.CREATURE); - color.setBlack(true); - subtype.add("Goblin"); - subtype.add("Rogue"); - power.setValue(1); - toughness.setValue(1); - } -} diff --git a/Mage.Sets/src/mage/sets/morningtide/Bitterblossom.java b/Mage.Sets/src/mage/sets/morningtide/Bitterblossom.java index e7a64e2a949..2a19532c5d4 100644 --- a/Mage.Sets/src/mage/sets/morningtide/Bitterblossom.java +++ b/Mage.Sets/src/mage/sets/morningtide/Bitterblossom.java @@ -1,82 +1,66 @@ -/* - * 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.morningtide; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.LoseLifeSourceControllerEffect; -import mage.abilities.keyword.FlyingAbility; -import mage.cards.CardImpl; -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.constants.TargetController; -import mage.game.permanent.token.Token; - -/** - * - * @author Loki - */ -public class Bitterblossom extends CardImpl { - - public Bitterblossom(UUID ownerId) { - super(ownerId, 58, "Bitterblossom", Rarity.RARE, new CardType[]{CardType.TRIBAL, CardType.ENCHANTMENT}, "{1}{B}"); - this.expansionSetCode = "MOR"; - this.subtype.add("Faerie"); - - - // At the beginning of your upkeep, you lose 1 life and put a 1/1 black Faerie Rogue creature token with flying onto the battlefield. - Ability ability = new BeginningOfUpkeepTriggeredAbility(new LoseLifeSourceControllerEffect(1), TargetController.YOU, false); - ability.addEffect(new CreateTokenEffect(new FaerieToken(), 1)); - this.addAbility(ability); - } - - public Bitterblossom(final Bitterblossom card) { - super(card); - } - - @Override - public Bitterblossom copy() { - return new Bitterblossom(this); - } -} - -class FaerieToken extends Token { - FaerieToken() { - super("Faerie Rogue", "1/1 black Faerie Rogue creature token with flying"); - cardType.add(CardType.CREATURE); - color.setBlack(true); - subtype.add("Faerie"); - subtype.add("Rogue"); - power = new MageInt(1); - toughness = new MageInt(1); - this.addAbility(FlyingAbility.getInstance()); - } -} \ No newline at end of file +/* + * 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.morningtide; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.game.permanent.token.FaerieRogueToken; + +/** + * + * @author Loki + */ +public class Bitterblossom extends CardImpl { + + public Bitterblossom(UUID ownerId) { + super(ownerId, 58, "Bitterblossom", Rarity.RARE, new CardType[]{CardType.TRIBAL, CardType.ENCHANTMENT}, "{1}{B}"); + this.expansionSetCode = "MOR"; + this.subtype.add("Faerie"); + + // At the beginning of your upkeep, you lose 1 life and put a 1/1 black Faerie Rogue creature token with flying onto the battlefield. + Ability ability = new BeginningOfUpkeepTriggeredAbility(new LoseLifeSourceControllerEffect(1), TargetController.YOU, false); + ability.addEffect(new CreateTokenEffect(new FaerieRogueToken(), 1)); + this.addAbility(ability); + } + + public Bitterblossom(final Bitterblossom card) { + super(card); + } + + @Override + public Bitterblossom copy() { + return new Bitterblossom(this); + } +} diff --git a/Mage.Sets/src/mage/sets/morningtide/IdyllicTutor.java b/Mage.Sets/src/mage/sets/morningtide/IdyllicTutor.java index 9663c6739a9..f224f660074 100644 --- a/Mage.Sets/src/mage/sets/morningtide/IdyllicTutor.java +++ b/Mage.Sets/src/mage/sets/morningtide/IdyllicTutor.java @@ -28,11 +28,10 @@ package mage.sets.morningtide; import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Rarity; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.common.TargetCardInLibrary; @@ -42,7 +41,7 @@ import mage.target.common.TargetCardInLibrary; */ public class IdyllicTutor extends CardImpl { - private static final FilterCard filter = new FilterCard("enchantment"); + private static final FilterCard filter = new FilterCard("an enchantment"); static { filter.add(new CardTypePredicate(CardType.ENCHANTMENT)); @@ -52,7 +51,6 @@ public class IdyllicTutor extends CardImpl { super(ownerId, 12, "Idyllic Tutor", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{W}"); this.expansionSetCode = "MOR"; - // Search your library for an enchantment card, reveal it, and put it into your hand. Then shuffle your library. this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true)); } diff --git a/Mage.Sets/src/mage/sets/morningtide/NotoriousThrong.java b/Mage.Sets/src/mage/sets/morningtide/NotoriousThrong.java new file mode 100644 index 00000000000..d943672f4a4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/morningtide/NotoriousThrong.java @@ -0,0 +1,112 @@ +/* + * 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.morningtide; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.condition.common.ProwlCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.turn.AddExtraTurnControllerEffect; +import mage.abilities.keyword.ProwlAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.permanent.token.FaerieRogueToken; +import mage.players.Player; +import mage.watchers.common.AmountOfDamageAPlayerReceivedThisTurnWatcher; + +/** + * + * @author LoneFox + */ +public class NotoriousThrong extends CardImpl { + + public NotoriousThrong(UUID ownerId) { + super(ownerId, 45, "Notorious Throng", Rarity.RARE, new CardType[]{CardType.TRIBAL, CardType.SORCERY}, "{3}{U}"); + this.expansionSetCode = "MOR"; + this.subtype.add("Rogue"); + + // Prowl {5}{U} + this.addAbility(new ProwlAbility(this, "{5}{U}")); + // Put X 1/1 black Faerie Rogue creature tokens with flying onto the battlefield, where X is the damage dealt to your opponents this turn. + this.getSpellAbility().addEffect(new NotoriousThrongEffect()); + this.getSpellAbility().addWatcher(new AmountOfDamageAPlayerReceivedThisTurnWatcher()); + // If Notorious Throng's prowl cost was paid, take an extra turn after this one. + Effect effect = new ConditionalOneShotEffect(new AddExtraTurnControllerEffect(), ProwlCondition.getInstance()); + effect.setText("If {this}'s prowl cost was paid, take an extra turn after this one."); + this.getSpellAbility().addEffect(effect); + } + + public NotoriousThrong(final NotoriousThrong card) { + super(card); + } + + @Override + public NotoriousThrong copy() { + return new NotoriousThrong(this); + } +} + +class NotoriousThrongEffect extends OneShotEffect { + + public NotoriousThrongEffect() { + super(Outcome.PutCreatureInPlay); + staticText = "Put X 1/1 black Faerie Rogue creature tokens with flying onto the battlefield, where X is the damage dealt to your opponents this turn"; + } + + public NotoriousThrongEffect(NotoriousThrongEffect effect) { + super(effect); + } + + @Override + public NotoriousThrongEffect copy() { + return new NotoriousThrongEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + AmountOfDamageAPlayerReceivedThisTurnWatcher watcher = (AmountOfDamageAPlayerReceivedThisTurnWatcher) game.getState().getWatchers().get("AmountOfDamageReceivedThisTurn"); + if(controller != null && watcher != null) { + int numTokens = 0; + for(UUID opponentId: game.getOpponents(controller.getId())) { + numTokens += watcher.getAmountOfDamageReceivedThisTurn(opponentId); + } + if(numTokens > 0) { + new CreateTokenEffect(new FaerieRogueToken(), numTokens).apply(game, source); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/morningtide/PrimalBeyond.java b/Mage.Sets/src/mage/sets/morningtide/PrimalBeyond.java index c58aba7dd96..ff3738c83a0 100644 --- a/Mage.Sets/src/mage/sets/morningtide/PrimalBeyond.java +++ b/Mage.Sets/src/mage/sets/morningtide/PrimalBeyond.java @@ -46,7 +46,6 @@ import mage.constants.Rarity; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.Game; - import mage.target.common.TargetCardInHand; /** @@ -54,25 +53,24 @@ import mage.target.common.TargetCardInHand; * @author TGower */ public class PrimalBeyond extends CardImpl { - + private static final FilterCard filter = new FilterCard("a Elemental card from your hand"); - + static { filter.add(new SubtypePredicate("Elemental")); } - public PrimalBeyond(UUID ownerId) { super(ownerId, 149, "Primal Beyond", Rarity.RARE, new CardType[]{CardType.LAND}, ""); this.expansionSetCode = "MOR"; - + // As Primal Beyond enters the battlefield, you may reveal an Elemental card from your hand. If you don't, Primal Beyond enters the battlefield tapped. this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new RevealTargetFromHandCost(new TargetCardInHand(filter))), "you may reveal a Elemental card from your hand. If you don't, {this} enters the battlefield tapped")); // {tap}: Add {1} to your mana pool. this.addAbility(new ColorlessManaAbility()); // {tap}: Add one mana of any color to your mana pool. Spend this mana only to cast an Elemental spell or activate an ability of an Elemental. - Ability ability = new ConditionalAnyColorManaAbility(new TapSourceCost(), 1, new PrimalBeyondManaBuilder(), true); - this.addAbility(ability); + Ability ability = new ConditionalAnyColorManaAbility(new TapSourceCost(), 1, new PrimalBeyondManaBuilder(), true); + this.addAbility(ability); } public PrimalBeyond(final PrimalBeyond card) { @@ -85,7 +83,6 @@ public class PrimalBeyond extends CardImpl { } } - class PrimalBeyondManaBuilder extends ConditionalManaBuilder { @Override @@ -113,9 +110,6 @@ class PrimalBeyondManaCondition implements Condition { @Override public boolean apply(Game game, Ability source) { MageObject object = game.getObject(source.getSourceId()); - if (object != null && object.hasSubtype("Elemental")) { - return true; - } - return false; + return object != null && object.hasSubtype("Elemental"); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/morningtide/VioletPall.java b/Mage.Sets/src/mage/sets/morningtide/VioletPall.java index 7b760e28e44..b76090f5c2e 100644 --- a/Mage.Sets/src/mage/sets/morningtide/VioletPall.java +++ b/Mage.Sets/src/mage/sets/morningtide/VioletPall.java @@ -28,18 +28,16 @@ package mage.sets.morningtide; import java.util.UUID; -import mage.MageInt; -import mage.constants.CardType; -import mage.constants.Rarity; import mage.ObjectColor; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.DestroyTargetEffect; -import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.FaerieRogueToken; import mage.target.common.TargetCreaturePermanent; /** @@ -61,7 +59,7 @@ public class VioletPall extends CardImpl { this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); - this.getSpellAbility().addEffect(new CreateTokenEffect(new VioletPallFaerieToken(), 1)); + this.getSpellAbility().addEffect(new CreateTokenEffect(new FaerieRogueToken(), 1)); } public VioletPall(final VioletPall card) { @@ -73,17 +71,3 @@ public class VioletPall extends CardImpl { return new VioletPall(this); } } - -class VioletPallFaerieToken extends Token { - - VioletPallFaerieToken() { - super("Faerie Rogue", "1/1 black Faerie Rogue creature token with flying"); - cardType.add(CardType.CREATURE); - color.setBlack(true); - subtype.add("Faerie"); - subtype.add("Rogue"); - power = new MageInt(1); - toughness = new MageInt(1); - this.addAbility(FlyingAbility.getInstance()); - } -} diff --git a/Mage.Sets/src/mage/sets/morningtide/WeirdingShaman.java b/Mage.Sets/src/mage/sets/morningtide/WeirdingShaman.java index 8bc8b3e8eb4..063142396ed 100644 --- a/Mage.Sets/src/mage/sets/morningtide/WeirdingShaman.java +++ b/Mage.Sets/src/mage/sets/morningtide/WeirdingShaman.java @@ -41,7 +41,7 @@ import mage.cards.CardImpl; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.GoblinRogueToken; import mage.target.common.TargetControlledPermanent; /** @@ -64,7 +64,7 @@ public class WeirdingShaman extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(1); - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new goblinRogueToken(), 2), new ManaCostsImpl("{3}{B}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new GoblinRogueToken(), 2), new ManaCostsImpl("{3}{B}")); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); this.addAbility(ability); } @@ -78,15 +78,3 @@ public class WeirdingShaman extends CardImpl { return new WeirdingShaman(this); } } - -class goblinRogueToken extends Token { - goblinRogueToken() { - super("Goblin", "1/1 black Goblin Rogue creature tokens"); - cardType.add(CardType.CREATURE); - color.setBlack(true); - subtype.add("Goblin"); - subtype.add("Rogue"); - power = new MageInt(1); - toughness = new MageInt(1); - } -} diff --git a/Mage.Sets/src/mage/sets/nemesis/Daze.java b/Mage.Sets/src/mage/sets/nemesis/Daze.java index 5cdf8ec4c8c..ecb769b3740 100644 --- a/Mage.Sets/src/mage/sets/nemesis/Daze.java +++ b/Mage.Sets/src/mage/sets/nemesis/Daze.java @@ -29,7 +29,7 @@ package mage.sets.nemesis; import java.util.UUID; import mage.abilities.costs.AlternativeCostSourceAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.CounterUnlessPaysEffect; import mage.cards.CardImpl; @@ -60,7 +60,7 @@ public class Daze extends CardImpl { // You may return an Island you control to its owner's hand rather than pay Daze's mana cost. - this.addAbility(new AlternativeCostSourceAbility(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)))); + this.addAbility(new AlternativeCostSourceAbility(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)))); // Counter target spell unless its controller pays {1}. this.getSpellAbility().addTarget(new TargetSpell()); diff --git a/Mage.Sets/src/mage/sets/newphyrexia/BrutalizerExarch.java b/Mage.Sets/src/mage/sets/newphyrexia/BrutalizerExarch.java index 9c516b48f16..76a5f179f4f 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/BrutalizerExarch.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/BrutalizerExarch.java @@ -28,19 +28,17 @@ package mage.sets.newphyrexia; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; +import mage.abilities.effects.common.search.SearchLibraryPutOnLibraryEffect; import mage.cards.CardImpl; -import mage.cards.Cards; -import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.Predicates; @@ -71,7 +69,11 @@ public class BrutalizerExarch extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(3); - Ability ability = new EntersBattlefieldTriggeredAbility(new BrutalizerExarchEffect1()); + // When Brutalizer Exarch enters the battlefield, choose one + // - Search your library for a creature card, reveal it, then shuffle your library and put that card on top of it; + TargetCardInLibrary target = new TargetCardInLibrary(new FilterCreatureCard("a creature card")); + Ability ability = new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(target, true, true), false); + // or put target noncreature permanent on the bottom of its owner's library. Mode mode = new Mode(); mode.getEffects().add(new BrutalizerExarchEffect2()); mode.getTargets().add(new TargetPermanent(filter)); @@ -89,45 +91,6 @@ public class BrutalizerExarch extends CardImpl { } } -class BrutalizerExarchEffect1 extends OneShotEffect { - - public BrutalizerExarchEffect1() { - super(Outcome.Benefit); - this.staticText = "Search your library for a creature card, reveal it, then shuffle your library and put that card on top of it"; - } - - public BrutalizerExarchEffect1(final BrutalizerExarchEffect1 effect) { - super(effect); - } - - @Override - public BrutalizerExarchEffect1 copy() { - return new BrutalizerExarchEffect1(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - if (player != null) { - TargetCardInLibrary target = new TargetCardInLibrary(new FilterCreatureCard("creature card in your library")); - if (player.searchLibrary(target, game)) { - Card card = player.getLibrary().remove(target.getFirstTarget(), game); - if (card != null) { - Cards cards = new CardsImpl(); - cards.add(card); - player.revealCards("Brutalizer Exarch", cards, game); - } - player.shuffleLibrary(game); - if (card != null) - card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); - return true; - } - player.shuffleLibrary(game); - } - return false; - } -} - class BrutalizerExarchEffect2 extends OneShotEffect { public BrutalizerExarchEffect2() { diff --git a/Mage.Sets/src/mage/sets/newphyrexia/Enslave.java b/Mage.Sets/src/mage/sets/newphyrexia/Enslave.java index d158331c83f..b9bd7826273 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/Enslave.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/Enslave.java @@ -25,12 +25,9 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.newphyrexia; import java.util.UUID; - -import mage.constants.*; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; @@ -39,6 +36,11 @@ import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.continuous.ControlEnchantedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; @@ -51,21 +53,26 @@ import mage.target.common.TargetCreaturePermanent; */ public class Enslave extends CardImpl { - public Enslave (UUID ownerId) { + public Enslave(UUID ownerId) { super(ownerId, 58, "Enslave", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{4}{B}{B}"); this.expansionSetCode = "NPH"; this.subtype.add("Aura"); + // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); + + // You control enchanted creature. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ControlEnchantedEffect())); + + // At the beginning of your upkeep, enchanted creature deals 1 damage to its owner. this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new EnslaveEffect(), TargetController.YOU, false, false)); } - public Enslave (final Enslave card) { + public Enslave(final Enslave card) { super(card); } @@ -77,6 +84,7 @@ public class Enslave extends CardImpl { } class EnslaveEffect extends OneShotEffect { + EnslaveEffect() { super(Outcome.Damage); staticText = "enchanted creature deals 1 damage to its owner"; @@ -88,13 +96,13 @@ class EnslaveEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Permanent sourcePermanent = game.getPermanent(source.getSourceId()); + Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); if (sourcePermanent != null) { - Permanent attached = game.getPermanent(sourcePermanent.getAttachedTo()); + Permanent attached = game.getPermanentOrLKIBattlefield(sourcePermanent.getAttachedTo()); if (attached != null) { Player owner = game.getPlayer(attached.getOwnerId()); if (owner != null) { - owner.damage(1, source.getSourceId(), game, false, true); + owner.damage(1, attached.getId(), game, false, true); return true; } } @@ -108,4 +116,4 @@ class EnslaveEffect extends OneShotEffect { return new EnslaveEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/newphyrexia/HexParasite.java b/Mage.Sets/src/mage/sets/newphyrexia/HexParasite.java index e1190a24fbc..dd9bf4bfea6 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/HexParasite.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/HexParasite.java @@ -28,11 +28,6 @@ package mage.sets.newphyrexia; 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.SimpleActivatedAbility; @@ -40,6 +35,11 @@ import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; @@ -77,12 +77,12 @@ public class HexParasite extends CardImpl { class HexParasiteEffect extends OneShotEffect { - HexParasiteEffect ( ) { + HexParasiteEffect() { super(Outcome.Benefit); staticText = "Remove up to X counters from target permanent. For each counter removed this way, {this} gets +1/+0 until end of turn"; } - HexParasiteEffect ( HexParasiteEffect effect ) { + HexParasiteEffect(HexParasiteEffect effect) { super(effect); } @@ -93,7 +93,7 @@ class HexParasiteEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - TargetPermanent target = (TargetPermanent)source.getTargets().get(0); + TargetPermanent target = (TargetPermanent) source.getTargets().get(0); Permanent permanent = game.getPermanent(target.getFirstTarget()); Player player = game.getPlayer(source.getControllerId()); if (permanent != null && player != null) { @@ -104,8 +104,8 @@ class HexParasiteEffect extends OneShotEffect { if (player.chooseUse(Outcome.Neutral, "Do you want to remove " + counterName + " counters?", source, game)) { if (permanent.getCounters().get(counterName).getCount() == 1 || toRemove == 1) { permanent.getCounters().removeCounter(counterName, 1); - } - else { + removed++; + } else { int amount = player.getAmount(1, Math.min(permanent.getCounters().get(counterName).getCount(), toRemove - removed), "How many?", game); if (amount > 0) { removed += amount; @@ -113,8 +113,9 @@ class HexParasiteEffect extends OneShotEffect { } } } - if (removed >= toRemove) + if (removed >= toRemove) { break; + } } game.addEffect(new BoostSourceEffect(removed, 0, Duration.EndOfTurn), source); return true; diff --git a/Mage.Sets/src/mage/sets/newphyrexia/PhyrexianObliterator.java b/Mage.Sets/src/mage/sets/newphyrexia/PhyrexianObliterator.java index 5811c99d20a..16b0136dbda 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/PhyrexianObliterator.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/PhyrexianObliterator.java @@ -58,7 +58,10 @@ public class PhyrexianObliterator extends CardImpl { this.power = new MageInt(5); this.toughness = new MageInt(5); + // Trample this.addAbility(TrampleAbility.getInstance()); + + // Whenever a source deals damage to Phyrexian Obliterator, that source's controller sacrifices that many permanents. this.addAbility(new PhyrexianObliteratorTriggeredAbility()); } @@ -73,6 +76,7 @@ public class PhyrexianObliterator extends CardImpl { } class PhyrexianObliteratorTriggeredAbility extends TriggeredAbilityImpl { + PhyrexianObliteratorTriggeredAbility() { super(Zone.BATTLEFIELD, new SacrificeEffect(new FilterPermanent(), 0, "")); } diff --git a/Mage.Sets/src/mage/sets/newphyrexia/ReaperOfSheoldred.java b/Mage.Sets/src/mage/sets/newphyrexia/ReaperOfSheoldred.java index c8da60dba23..5e9a8469cf7 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/ReaperOfSheoldred.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/ReaperOfSheoldred.java @@ -41,6 +41,7 @@ import mage.counters.CounterType; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; +import mage.players.Player; import mage.target.targetpointer.FixedTarget; /** @@ -57,7 +58,10 @@ public class ReaperOfSheoldred extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(5); + // Infect (This creature deals damage to creatures in the form of -1/-1 counters and to players in the form of poison counters.) this.addAbility(InfectAbility.getInstance()); + + // Whenever a source deals damage to Reaper of Sheoldred, that source's controller gets a poison counter. this.addAbility(new ReaperOfSheoldredTriggeredAbility()); } @@ -72,6 +76,7 @@ public class ReaperOfSheoldred extends CardImpl { } class ReaperOfSheoldredTriggeredAbility extends TriggeredAbilityImpl { + ReaperOfSheoldredTriggeredAbility() { super(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.POISON.createInstance())); } @@ -93,10 +98,16 @@ class ReaperOfSheoldredTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { if (event.getTargetId().equals(this.getSourceId())) { - for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getPlayerId())); + UUID controller = game.getControllerId(event.getSourceId()); + if (controller != null) { + Player player = game.getPlayer(controller); + if (player != null) { + for (Effect effect : this.getEffects()) { + effect.setTargetPointer(new FixedTarget(player.getId())); + } + return true; + } } - return true; } return false; } diff --git a/Mage.Sets/src/mage/sets/odyssey/CeaseFire.java b/Mage.Sets/src/mage/sets/odyssey/CeaseFire.java index 46fb361deca..e10245abbee 100644 --- a/Mage.Sets/src/mage/sets/odyssey/CeaseFire.java +++ b/Mage.Sets/src/mage/sets/odyssey/CeaseFire.java @@ -31,7 +31,6 @@ import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; -import mage.abilities.effects.ReplacementEffectImpl; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.constants.CardType; @@ -55,11 +54,10 @@ public class CeaseFire extends CardImpl { super(ownerId, 14, "Cease-Fire", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{W}"); this.expansionSetCode = "ODY"; - // Target player can't cast creature spells this turn. this.getSpellAbility().addEffect(new CeaseFireEffect()); this.getSpellAbility().addTarget(new TargetPlayer()); - + // Draw a card. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); } @@ -77,6 +75,7 @@ public class CeaseFire extends CardImpl { class CeaseFireEffect extends ContinuousRuleModifyingEffectImpl { private static final FilterSpell filter = new FilterSpell(); + static { filter.add(new CardTypePredicate(CardType.CREATURE)); } @@ -104,7 +103,7 @@ class CeaseFireEffect extends ContinuousRuleModifyingEffectImpl { public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { - return "You can't cast creature spells this turn (" + mageObject.getLogName() + ")."; + return "You can't cast creature spells this turn (" + mageObject.getIdName() + ")."; } return null; } diff --git a/Mage.Sets/src/mage/sets/odyssey/PardicMiner.java b/Mage.Sets/src/mage/sets/odyssey/PardicMiner.java index 3dcbfb8222b..42875327669 100644 --- a/Mage.Sets/src/mage/sets/odyssey/PardicMiner.java +++ b/Mage.Sets/src/mage/sets/odyssey/PardicMiner.java @@ -75,7 +75,7 @@ public class PardicMiner extends CardImpl { } class PardicMinerEffect extends ContinuousRuleModifyingEffectImpl { - + public PardicMinerEffect() { super(Duration.EndOfTurn, Outcome.Detriment); staticText = "Target player can't play lands this turn."; @@ -99,7 +99,7 @@ class PardicMinerEffect extends ContinuousRuleModifyingEffectImpl { public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { - return "You can't play lands this turn (" + mageObject.getLogName() + ")."; + return "You can't play lands this turn (" + mageObject.getIdName() + ")."; } return null; } diff --git a/Mage.Sets/src/mage/sets/onslaught/CentaurGlade.java b/Mage.Sets/src/mage/sets/onslaught/CentaurGlade.java index 75c0807d8d2..83937e00c64 100644 --- a/Mage.Sets/src/mage/sets/onslaught/CentaurGlade.java +++ b/Mage.Sets/src/mage/sets/onslaught/CentaurGlade.java @@ -28,7 +28,6 @@ package mage.sets.onslaught; import java.util.UUID; -import mage.MageInt; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.CreateTokenEffect; @@ -36,7 +35,7 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.CentaurToken; /** * @@ -61,14 +60,3 @@ public class CentaurGlade extends CardImpl { return new CentaurGlade(this); } } - -class CentaurToken extends Token { - CentaurToken() { - super("Centaur", "3/3 green Centaur creature token"); - cardType.add(CardType.CREATURE); - color.setGreen(true); - subtype.add("Centaur"); - power = new MageInt(3); - toughness = new MageInt(3); - } -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/onslaught/EbonbladeReaper.java b/Mage.Sets/src/mage/sets/onslaught/EbonbladeReaper.java new file mode 100644 index 00000000000..12b22f0ff17 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/EbonbladeReaper.java @@ -0,0 +1,111 @@ +/* + * 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.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.LoseHalfLifeEffect; +import mage.abilities.keyword.MorphAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author BijanT + */ +public class EbonbladeReaper extends CardImpl { + + public EbonbladeReaper(UUID ownerId) { + super(ownerId, 141, "Ebonblade Reaper", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + //Whenever Ebonblade Reaper attacks, you lose half your life, rounded up. + this.addAbility(new AttacksTriggeredAbility(new LoseHalfLifeEffect(), false)); + + //Whenever Ebonblade Reaper deals combat damage to a player, that player loses half his or her life, rounded up. + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new EbonbladeReaperEffect(), false, true)); + + //Morph {3}{B}{B} + this.addAbility(new MorphAbility(this, new ManaCostsImpl<>("{3}{B}{B}"))); + } + + public EbonbladeReaper(final EbonbladeReaper card) { + super(card); + } + + @Override + public Card copy() { + return new EbonbladeReaper(this); + } +} + +class EbonbladeReaperEffect extends OneShotEffect { + + public EbonbladeReaperEffect() { + super(Outcome.Damage); + this.staticText = "that player loses half his or her life, rounded up"; + } + + public EbonbladeReaperEffect(final EbonbladeReaperEffect effect) { + super(effect); + } + + @Override + public Effect copy() { + return new EbonbladeReaperEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(getTargetPointer().getFirst(game, source)); + if (player != null) { + Integer amount = (int) Math.ceil(player.getLife() / 2f); + if (amount > 0) { + player.loseLife(amount, game); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/planarchaos/VoidstoneGargoyle.java b/Mage.Sets/src/mage/sets/planarchaos/VoidstoneGargoyle.java index 76bc947d8e7..9292efe16a6 100644 --- a/Mage.Sets/src/mage/sets/planarchaos/VoidstoneGargoyle.java +++ b/Mage.Sets/src/mage/sets/planarchaos/VoidstoneGargoyle.java @@ -28,8 +28,6 @@ package mage.sets.planarchaos; import java.util.UUID; - -import mage.constants.*; import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; @@ -42,6 +40,11 @@ import mage.cards.CardImpl; import mage.cards.repository.CardRepository; import mage.choices.Choice; import mage.choices.ChoiceImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; @@ -110,9 +113,9 @@ class VoidstoneGargoyleChooseCardEffect extends OneShotEffect { String cardName = cardChoice.getChoice(); game.informPlayers(permanent.getLogName() + ", named card: [" + cardName + "]"); game.getState().setValue(source.getSourceId().toString(), cardName); - permanent.addInfo("named card", CardUtil.addToolTipMarkTags("Named card: [" + cardName +"]"), game); + permanent.addInfo("named card", CardUtil.addToolTipMarkTags("Named card: [" + cardName + "]"), game); return true; - } + } return false; } @@ -148,7 +151,7 @@ class VoidstoneGargoyleReplacementEffect1 extends ContinuousRuleModifyingEffectI public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { - return "You can't cast a card with that name (" + mageObject.getLogName() + ")."; + return "You can't cast a card with that name (" + mageObject.getIdName() + ")."; } return null; } diff --git a/Mage.Sets/src/mage/sets/planechase/IvyElemental.java b/Mage.Sets/src/mage/sets/planechase/IvyElemental.java index 757482edb40..acda1a8a755 100644 --- a/Mage.Sets/src/mage/sets/planechase/IvyElemental.java +++ b/Mage.Sets/src/mage/sets/planechase/IvyElemental.java @@ -29,18 +29,12 @@ package mage.sets.planechase; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.common.EntersBattlefieldAbility; -import mage.abilities.effects.EntersBattlefieldEffect; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; import mage.counters.CounterType; -import mage.game.Game; -import mage.game.permanent.Permanent; /** * @@ -57,7 +51,7 @@ public class IvyElemental extends CardImpl { this.toughness = new MageInt(0); // Ivy Elemental enters the battlefield with X +1/+1 counters on it. - this.addAbility(new EntersBattlefieldAbility(new IvyElementalEntersBattlefieldEffect(), "with X +1/+1 counters on it")); + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance()))); } public IvyElemental(final IvyElemental card) { @@ -69,40 +63,3 @@ public class IvyElemental extends CardImpl { return new IvyElemental(this); } } - -class IvyElementalEntersBattlefieldEffect extends OneShotEffect { - - public IvyElementalEntersBattlefieldEffect() { - super(Outcome.BoostCreature); - staticText = "{this} enters the battlefield with X +1/+1 counters on it"; - } - - public IvyElementalEntersBattlefieldEffect(final IvyElementalEntersBattlefieldEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (spellAbility != null - && spellAbility.getSourceId().equals(source.getSourceId()) - && permanent.getZoneChangeCounter(game) - 1 == spellAbility.getSourceObjectZoneChangeCounter()) { - if (spellAbility.getSourceId().equals(source.getSourceId())) { // put into play by normal cast - int amount = spellAbility.getManaCostsToPay().getX(); - if (amount > 0) { - permanent.addCounters(CounterType.P1P1.createInstance(amount), game); - } - } - } - } - return true; - } - - @Override - public IvyElementalEntersBattlefieldEffect copy() { - return new IvyElementalEntersBattlefieldEffect(this); - } - -} diff --git a/Mage.Sets/src/mage/sets/planechase2012/KrondTheDawnClad.java b/Mage.Sets/src/mage/sets/planechase2012/KrondTheDawnClad.java index a42a96ec85f..75c25f891d0 100644 --- a/Mage.Sets/src/mage/sets/planechase2012/KrondTheDawnClad.java +++ b/Mage.Sets/src/mage/sets/planechase2012/KrondTheDawnClad.java @@ -28,8 +28,6 @@ package mage.sets.planechase2012; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Rarity; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; @@ -37,7 +35,10 @@ import mage.abilities.condition.common.EnchantedCondition; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.common.ExileTargetEffect; import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.target.TargetPermanent; /** @@ -52,18 +53,18 @@ public class KrondTheDawnClad extends CardImpl { this.supertype.add("Legendary"); this.subtype.add("Archon"); - this.power = new MageInt(6); this.toughness = new MageInt(6); - // Flying + // Flying, vigilance this.addAbility(FlyingAbility.getInstance()); + this.addAbility(VigilanceAbility.getInstance()); // Whenever Krond the Dawn-Clad attacks, if it's enchanted, exile target permanent. Ability ability = new ConditionalTriggeredAbility( new AttacksTriggeredAbility(new ExileTargetEffect(), false), new EnchantedCondition(), - "Whenever Krond the Dawn-Clad attacks, if it's enchanted, exile target permanent."); + "Whenever {this} attacks, if it's enchanted, exile target permanent."); ability.addTarget(new TargetPermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/planeshift/ArcticMerfolk.java b/Mage.Sets/src/mage/sets/planeshift/ArcticMerfolk.java index e7993aa1681..0125728af80 100644 --- a/Mage.Sets/src/mage/sets/planeshift/ArcticMerfolk.java +++ b/Mage.Sets/src/mage/sets/planeshift/ArcticMerfolk.java @@ -33,7 +33,7 @@ import mage.constants.Rarity; import mage.MageInt; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; @@ -56,7 +56,7 @@ public class ArcticMerfolk extends CardImpl { this.toughness = new MageInt(1); // Kicker—Return a creature you control to its owner's hand. (You may return a creature you control to its owner's hand in addition to any other costs as you cast this spell.) - this.addAbility(new KickerAbility(new ReturnToHandTargetPermanentCost(new TargetControlledCreaturePermanent(1,1,new FilterControlledCreaturePermanent("a creature"),true)))); + this.addAbility(new KickerAbility(new ReturnToHandChosenControlledPermanentCost(new TargetControlledCreaturePermanent(1,1,new FilterControlledCreaturePermanent("a creature"),true)))); // If Arctic Merfolk was kicked, it enters the battlefield with a +1/+1 counter on it. this.addAbility(new EntersBattlefieldAbility( diff --git a/Mage.Sets/src/mage/sets/planeshift/CrosissCatacombs.java b/Mage.Sets/src/mage/sets/planeshift/CrosissCatacombs.java index 40cafe55313..7efc25e7f80 100644 --- a/Mage.Sets/src/mage/sets/planeshift/CrosissCatacombs.java +++ b/Mage.Sets/src/mage/sets/planeshift/CrosissCatacombs.java @@ -29,7 +29,7 @@ package mage.sets.planeshift; import java.util.UUID; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.BlueManaAbility; @@ -59,7 +59,7 @@ public class CrosissCatacombs extends CardImpl { this.subtype.add("Lair"); // When Crosis's Catacombs enters the battlefield, sacrifice it unless you return a non-Lair land you control to its owner's hand. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))))); // {tap}: Add {U}, {B}, or {R} to your mana pool. this.addAbility(new BlueManaAbility()); this.addAbility(new BlackManaAbility()); diff --git a/Mage.Sets/src/mage/sets/planeshift/DarigaazsCaldera.java b/Mage.Sets/src/mage/sets/planeshift/DarigaazsCaldera.java index cf9b3567fda..09e9902d6cc 100644 --- a/Mage.Sets/src/mage/sets/planeshift/DarigaazsCaldera.java +++ b/Mage.Sets/src/mage/sets/planeshift/DarigaazsCaldera.java @@ -29,7 +29,7 @@ package mage.sets.planeshift; import java.util.UUID; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.GreenManaAbility; @@ -59,7 +59,7 @@ public class DarigaazsCaldera extends CardImpl { this.subtype.add("Lair"); // When Darigaaz's Caldera enters the battlefield, sacrifice it unless you return a non-Lair land you control to its owner's hand. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))))); // {tap}: Add {B}, {R}, or {G} to your mana pool. this.addAbility(new BlackManaAbility()); this.addAbility(new RedManaAbility()); diff --git a/Mage.Sets/src/mage/sets/planeshift/DromarsCavern.java b/Mage.Sets/src/mage/sets/planeshift/DromarsCavern.java index 0527355c9bc..87e138351ae 100644 --- a/Mage.Sets/src/mage/sets/planeshift/DromarsCavern.java +++ b/Mage.Sets/src/mage/sets/planeshift/DromarsCavern.java @@ -29,7 +29,7 @@ package mage.sets.planeshift; import java.util.UUID; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.BlueManaAbility; @@ -58,7 +58,7 @@ public class DromarsCavern extends CardImpl { this.subtype.add("Lair"); // When Dromar's Cavern enters the battlefield, sacrifice it unless you return a non-Lair land you control to its owner's hand. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))))); // {tap}: Add {W}, {U}, or {B} to your mana pool. this.addAbility(new WhiteManaAbility()); this.addAbility(new BlueManaAbility()); diff --git a/Mage.Sets/src/mage/sets/planeshift/RithsGrove.java b/Mage.Sets/src/mage/sets/planeshift/RithsGrove.java index d0fe9fde6f0..aa36ec7965a 100644 --- a/Mage.Sets/src/mage/sets/planeshift/RithsGrove.java +++ b/Mage.Sets/src/mage/sets/planeshift/RithsGrove.java @@ -29,7 +29,7 @@ package mage.sets.planeshift; import java.util.UUID; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.RedManaAbility; @@ -59,7 +59,7 @@ public class RithsGrove extends CardImpl { this.subtype.add("Lair"); // When Rith's Grove enters the battlefield, sacrifice it unless you return a non-Lair land you control to its owner's hand. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))))); // {tap}: Add {R}, {G}, or {W} to your mana pool. this.addAbility(new RedManaAbility()); this.addAbility(new GreenManaAbility()); diff --git a/Mage.Sets/src/mage/sets/planeshift/TrevasRuins.java b/Mage.Sets/src/mage/sets/planeshift/TrevasRuins.java index 64b9eec6c94..d72cc657f27 100644 --- a/Mage.Sets/src/mage/sets/planeshift/TrevasRuins.java +++ b/Mage.Sets/src/mage/sets/planeshift/TrevasRuins.java @@ -29,7 +29,7 @@ package mage.sets.planeshift; import java.util.UUID; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.abilities.mana.BlueManaAbility; import mage.abilities.mana.GreenManaAbility; @@ -59,7 +59,7 @@ public class TrevasRuins extends CardImpl { this.subtype.add("Lair"); // When Treva's Ruins enters the battlefield, sacrifice it unless you return a non-Lair land you control to its owner's hand. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))))); // {tap}: Add {G}, {W}, or {U} to your mana pool. this.addAbility(new GreenManaAbility()); this.addAbility(new WhiteManaAbility()); diff --git a/Mage.Sets/src/mage/sets/returntoravnica/CentaursHerald.java b/Mage.Sets/src/mage/sets/returntoravnica/CentaursHerald.java index 92c32cd12fa..6d3819d0672 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/CentaursHerald.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/CentaursHerald.java @@ -29,8 +29,6 @@ package mage.sets.returntoravnica; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Rarity; import mage.MageInt; import mage.ObjectColor; import mage.abilities.Ability; @@ -39,8 +37,10 @@ import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.constants.Zone; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.CentaurToken; /** * @@ -58,7 +58,7 @@ public class CentaursHerald extends CardImpl { this.toughness = new MageInt(1); // {2}{G}, Sacrifice Centaur's Herald: Put a 3/3 green Centaur creature token onto the battlefield. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new CentaursHeraldToken()), new ManaCostsImpl("{2}{G}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new CentaurToken()), new ManaCostsImpl("{2}{G}")); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); } @@ -71,16 +71,4 @@ public class CentaursHerald extends CardImpl { public CentaursHerald copy() { return new CentaursHerald(this); } - - private class CentaursHeraldToken extends Token { - - public CentaursHeraldToken() { - super("Centaur", "3/3 green Centaur creature token"); - cardType.add(CardType.CREATURE); - color.setGreen(true); - subtype.add("Centaur"); - power = new MageInt(3); - toughness = new MageInt(3); - } - } } diff --git a/Mage.Sets/src/mage/sets/returntoravnica/ManaBloom.java b/Mage.Sets/src/mage/sets/returntoravnica/ManaBloom.java index f0d423cd6f4..87a8f09f4b8 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/ManaBloom.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/ManaBloom.java @@ -29,27 +29,22 @@ package mage.sets.returntoravnica; import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.common.SourceHasCounterCondition; import mage.abilities.costs.common.RemoveCountersSourceCost; import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.EntersBattlefieldEffect; -import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.AddManaOfAnyColorEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.abilities.mana.ActivateOncePerTurnManaAbility; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; -import mage.game.Game; -import mage.game.permanent.Permanent; /** * @@ -64,7 +59,7 @@ public class ManaBloom extends CardImpl { this.expansionSetCode = "RTR"; // Mana Bloom enters the battlefield with X charge counters on it. - this.addAbility(new EntersBattlefieldAbility(new ManaBloomEffect(), rule)); + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.CHARGE.createInstance()))); // Remove a charge counter from Mana Bloom: Add one mana of any color to your mana pool. Activate this ability only once each turn. Ability ability = new ActivateOncePerTurnManaAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(), new RemoveCountersSourceCost(CounterType.CHARGE.createInstance())); @@ -85,39 +80,3 @@ public class ManaBloom extends CardImpl { return new ManaBloom(this); } } - -class ManaBloomEffect extends OneShotEffect { - - public ManaBloomEffect() { - super(Outcome.Benefit); - } - - public ManaBloomEffect(final ManaBloomEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (spellAbility != null - && spellAbility.getSourceId().equals(source.getSourceId()) - && permanent.getZoneChangeCounter(game) - 1 == spellAbility.getSourceObjectZoneChangeCounter()) { - // delete to prevent using it again if put into battlefield from other effect - setValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY, null); - int amount = spellAbility.getManaCostsToPay().getX(); - if (amount > 0) { - permanent.addCounters(CounterType.CHARGE.createInstance(amount), game); - return true; - } - } - } - return true; - } - - @Override - public ManaBloomEffect copy() { - return new ManaBloomEffect(this); - } -} diff --git a/Mage.Sets/src/mage/sets/returntoravnica/Syncopate.java b/Mage.Sets/src/mage/sets/returntoravnica/Syncopate.java index e275c8a853f..aa20cacdeb1 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/Syncopate.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/Syncopate.java @@ -40,7 +40,6 @@ import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.stack.Spell; @@ -56,7 +55,6 @@ public class Syncopate extends CardImpl { super(ownerId, 54, "Syncopate", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{X}{U}"); this.expansionSetCode = "RTR"; - // Counter target spell unless its controller pays {X}. If that spell is countered this way, exile it instead of putting it into its owner's graveyard. this.getSpellAbility().addEffect(new SyncopateCounterUnlessPaysEffect()); this.getSpellAbility().addTarget(new TargetSpell()); @@ -90,27 +88,19 @@ class SyncopateCounterUnlessPaysEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { StackObject spell = game.getStack().getStackObject(targetPointer.getFirst(game, source)); - if (spell != null) { - Player player = game.getPlayer(spell.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + if (spell != null && (spell instanceof Spell) && sourceObject != null) { Player controller = game.getPlayer(source.getControllerId()); - if (player != null && controller != null) { - + if (controller != null) { int amount = source.getManaCostsToPay().getX(); if (amount > 0) { GenericManaCost cost = new GenericManaCost(amount); if (!cost.pay(source, game, spell.getControllerId(), spell.getControllerId(), false)) { - StackObject stackObject = game.getStack().getStackObject(source.getFirstTarget()); if (stackObject != null && !game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.COUNTER, source.getFirstTarget(), source.getSourceId(), stackObject.getControllerId()))) { - game.informPlayers("Syncopate: cost wasn't payed - countering " + stackObject.getName()); - if (stackObject instanceof Spell) { - game.rememberLKI(source.getFirstTarget(), Zone.STACK, (Spell) stackObject); - } - game.getStack().remove(stackObject); - MageObject card = game.getObject(stackObject.getSourceId()); - if (card instanceof Card) { - ((Card) card).moveToZone(Zone.EXILED, source.getSourceId(), game, false); - } + game.informPlayers(sourceObject.getIdName() + ": cost wasn't payed - countering " + stackObject.getName()); + game.rememberLKI(source.getFirstTarget(), Zone.STACK, (Spell) stackObject); + controller.moveCards((Spell) spell, null, Zone.EXILED, source, game); game.fireEvent(GameEvent.getEvent(GameEvent.EventType.COUNTERED, source.getFirstTarget(), source.getSourceId(), stackObject.getControllerId())); return true; } @@ -127,4 +117,4 @@ class SyncopateCounterUnlessPaysEffect extends OneShotEffect { return "Counter target spell unless its controller pays {X}. If that spell is countered this way, exile it instead of putting it into its owner's graveyard"; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/AwakeningZone.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/AwakeningZone.java index 6eaa7d2c8be..25ce8d98831 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/AwakeningZone.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/AwakeningZone.java @@ -29,12 +29,12 @@ package mage.sets.riseoftheeldrazi; import java.util.UUID; -import mage.abilities.common.OnEventTriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.game.events.GameEvent.EventType; +import mage.constants.TargetController; import mage.game.permanent.token.EldraziSpawnToken; /** @@ -46,7 +46,7 @@ public class AwakeningZone extends CardImpl { public AwakeningZone(UUID ownerId) { super(ownerId, 176, "Awakening Zone", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); this.expansionSetCode = "ROE"; - this.addAbility(new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", new CreateTokenEffect(new EldraziSpawnToken()), true)); + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new CreateTokenEffect(new EldraziSpawnToken()), TargetController.YOU, false)); } public AwakeningZone(final AwakeningZone card) { diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/Deprive.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Deprive.java index afa39d5afc2..773a63bab34 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/Deprive.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Deprive.java @@ -31,7 +31,7 @@ package mage.sets.riseoftheeldrazi; import java.util.UUID; import mage.constants.CardType; import mage.constants.Rarity; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.common.CounterTargetEffect; import mage.cards.CardImpl; import mage.filter.common.FilterControlledLandPermanent; @@ -52,7 +52,7 @@ public class Deprive extends CardImpl { this.expansionSetCode = "ROE"; // As an additional cost to cast Deprive, return a land you control to its owner's hand. - this.getSpellAbility().addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))); + this.getSpellAbility().addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))); // Counter target spell. this.getSpellAbility().addTarget(new TargetSpell()); diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/EmrakulTheAeonsTorn.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/EmrakulTheAeonsTorn.java index 11b0df213d7..81f7d3e5c6d 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/EmrakulTheAeonsTorn.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/EmrakulTheAeonsTorn.java @@ -29,30 +29,20 @@ package mage.sets.riseoftheeldrazi; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.CantBeCounteredAbility; import mage.abilities.common.PutIntoGraveFromAnywhereSourceTriggeredAbility; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CastSourceTriggeredAbility; +import mage.abilities.effects.common.ShuffleIntoLibraryGraveOfSourceOwnerEffect; +import mage.abilities.effects.common.turn.AddExtraTurnControllerEffect; import mage.abilities.keyword.AnnihilatorAbility; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.ProtectionAbility; -import mage.cards.Card; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; -import mage.constants.Zone; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorlessPredicate; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.game.stack.Spell; -import mage.game.turn.TurnMod; -import mage.players.Player; - /** * @author Loki @@ -72,17 +62,18 @@ public class EmrakulTheAeonsTorn extends CardImpl { this.subtype.add("Eldrazi"); this.power = new MageInt(15); this.toughness = new MageInt(15); - + // Emrakul, the Aeons Torn can't be countered. this.addAbility(new CantBeCounteredAbility()); - // When you cast Emrakul, take an extra turn after this one. - this.addAbility(new EmrakulTheAeonsTornOnCastAbility()); + // When you cast Emrakul, take an extra turn after this one. + this.addAbility(new CastSourceTriggeredAbility(new AddExtraTurnControllerEffect())); + // Flying, protection from colored spells, annihilator 6 this.addAbility(FlyingAbility.getInstance()); this.addAbility(new ProtectionAbility(filter)); this.addAbility(new AnnihilatorAbility(6)); // When Emrakul is put into a graveyard from anywhere, its owner shuffles his or her graveyard into his or her library. - this.addAbility(new PutIntoGraveFromAnywhereSourceTriggeredAbility(new EmrakulTheAeonsTornEffect(), false)); + this.addAbility(new PutIntoGraveFromAnywhereSourceTriggeredAbility(new ShuffleIntoLibraryGraveOfSourceOwnerEffect(), false)); } public EmrakulTheAeonsTorn(final EmrakulTheAeonsTorn card) { @@ -94,89 +85,3 @@ public class EmrakulTheAeonsTorn extends CardImpl { return new EmrakulTheAeonsTorn(this); } } -class EmrakulTheAeonsTornOnCastAbility extends TriggeredAbilityImpl { - - private static final String abilityText = "When you cast {this}, take an extra turn after this one"; - - EmrakulTheAeonsTornOnCastAbility() { - super(Zone.STACK, new EmrakulExtraTurnEffect()); - } - - EmrakulTheAeonsTornOnCastAbility(EmrakulTheAeonsTornOnCastAbility ability) { - super(ability); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.SPELL_CAST; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - Spell spell = (Spell) game.getObject(event.getTargetId()); - return this.getSourceId().equals(spell.getSourceId()); - } - - @Override - public EmrakulTheAeonsTornOnCastAbility copy() { - return new EmrakulTheAeonsTornOnCastAbility(this); - } - - @Override - public String getRule() { - return abilityText; - } -} - -class EmrakulTheAeonsTornEffect extends OneShotEffect { - - EmrakulTheAeonsTornEffect() { - super(Outcome.Benefit); - staticText = "its owner shuffles his or her graveyard into his or her library"; - } - - EmrakulTheAeonsTornEffect(final EmrakulTheAeonsTornEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - if (player != null) { - for (Card card: player.getGraveyard().getCards(game)) { - card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); - } - player.shuffleLibrary(game); - return true; - } - return false; - } - - @Override - public EmrakulTheAeonsTornEffect copy() { - return new EmrakulTheAeonsTornEffect(this); - } -} - -class EmrakulExtraTurnEffect extends OneShotEffect { - - EmrakulExtraTurnEffect() { - super(Outcome.ExtraTurn); - staticText = "take an extra turn after this one"; - } - - EmrakulExtraTurnEffect(final EmrakulExtraTurnEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - game.getState().getTurnMods().add(new TurnMod(source.getControllerId(), false)); - return true; - } - - @Override - public EmrakulExtraTurnEffect copy() { - return new EmrakulExtraTurnEffect(this); - } -} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/KozilekButcherOfTruth.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/KozilekButcherOfTruth.java index 81f0622ac4c..00a59b921e3 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/KozilekButcherOfTruth.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/KozilekButcherOfTruth.java @@ -25,28 +25,18 @@ * 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; - -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.PutIntoGraveFromAnywhereSourceTriggeredAbility; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CastSourceTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.ShuffleIntoLibraryGraveOfSourceOwnerEffect; import mage.abilities.keyword.AnnihilatorAbility; -import mage.cards.Card; import mage.cards.CardImpl; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.stack.Spell; -import mage.players.Player; +import mage.constants.CardType; +import mage.constants.Rarity; /** * @@ -54,25 +44,25 @@ import mage.players.Player; */ public class KozilekButcherOfTruth extends CardImpl { - public KozilekButcherOfTruth (UUID ownerId) { + public KozilekButcherOfTruth(UUID ownerId) { super(ownerId, 6, "Kozilek, Butcher of Truth", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{10}"); this.expansionSetCode = "ROE"; this.supertype.add("Legendary"); this.subtype.add("Eldrazi"); this.power = new MageInt(12); this.toughness = new MageInt(12); - - // When you cast Kozilek, Butcher of Truth, draw four cards. - this.addAbility(new KozilekButcherOfTruthOnCastAbility()); - + + // When you cast Kozilek, Butcher of Truth, draw four cards. + this.addAbility(new CastSourceTriggeredAbility(new DrawCardSourceControllerEffect(4))); + // Annihilator 4 (Whenever this creature attacks, defending player sacrifices four permanents.) this.addAbility(new AnnihilatorAbility(4)); - + // When Kozilek is put into a graveyard from anywhere, its owner shuffles his or her graveyard into his or her library. - this.addAbility(new PutIntoGraveFromAnywhereSourceTriggeredAbility(new KozilekButcherOfTruthEffect(), false)); + this.addAbility(new PutIntoGraveFromAnywhereSourceTriggeredAbility(new ShuffleIntoLibraryGraveOfSourceOwnerEffect(), false)); } - public KozilekButcherOfTruth (final KozilekButcherOfTruth card) { + public KozilekButcherOfTruth(final KozilekButcherOfTruth card) { super(card); } @@ -82,67 +72,3 @@ public class KozilekButcherOfTruth extends CardImpl { } } - -class KozilekButcherOfTruthOnCastAbility extends TriggeredAbilityImpl { - - private static final String abilityText = "When you cast {this}, draw four cards"; - - KozilekButcherOfTruthOnCastAbility() { - super(Zone.STACK, new DrawCardSourceControllerEffect(4)); - } - - KozilekButcherOfTruthOnCastAbility(final KozilekButcherOfTruthOnCastAbility ability) { - super(ability); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.SPELL_CAST; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - Spell spell = (Spell) game.getObject(event.getTargetId()); - return this.getSourceId().equals(spell.getSourceId()); - } - - @Override - public KozilekButcherOfTruthOnCastAbility copy() { - return new KozilekButcherOfTruthOnCastAbility(this); - } - - @Override - public String getRule() { - return abilityText; - } -} - -class KozilekButcherOfTruthEffect extends OneShotEffect { - KozilekButcherOfTruthEffect() { - super(Outcome.Benefit); - staticText = "its owner shuffles his or her graveyard into his or her library"; - } - - KozilekButcherOfTruthEffect(final KozilekButcherOfTruthEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - for (Card card: controller.getGraveyard().getCards(game)) { - controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.GRAVEYARD, true, true); - } - controller.shuffleLibrary(game); - return true; - } - return false; - } - - @Override - public KozilekButcherOfTruthEffect copy() { - return new KozilekButcherOfTruthEffect(this); - } - -} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/NomadsAssembly.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/NomadsAssembly.java index 7dd99c31499..12b1af89ef3 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/NomadsAssembly.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/NomadsAssembly.java @@ -35,7 +35,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.ReboundAbility; import mage.cards.CardImpl; import mage.filter.common.FilterControlledCreaturePermanent; -import mage.game.permanent.token.SoldierToken; +import mage.game.permanent.token.KorSoldierToken; /** * @@ -50,7 +50,7 @@ public class NomadsAssembly extends CardImpl { this.expansionSetCode = "ROE"; - this.getSpellAbility().addEffect(new CreateTokenEffect(new SoldierToken(), new PermanentsOnBattlefieldCount(filter))); + this.getSpellAbility().addEffect(new CreateTokenEffect(new KorSoldierToken(), new PermanentsOnBattlefieldCount(filter))); this.addAbility(new ReboundAbility()); } diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/SoulsurgeElemental.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/SoulsurgeElemental.java index 227628209b9..0e049447a51 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/SoulsurgeElemental.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/SoulsurgeElemental.java @@ -28,19 +28,16 @@ package mage.sets.riseoftheeldrazi; import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Rarity; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; -import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.Effect; -import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.SetPowerSourceEffect; import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; @@ -50,7 +47,6 @@ import mage.filter.common.FilterControlledCreaturePermanent; */ public class SoulsurgeElemental extends CardImpl { - public SoulsurgeElemental(UUID ownerId) { super(ownerId, 163, "Soulsurge Elemental", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}"); this.expansionSetCode = "ROE"; diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/UlamogTheInfiniteGyre.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/UlamogTheInfiniteGyre.java index 7f3cf02de88..4a25d967f60 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/UlamogTheInfiniteGyre.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/UlamogTheInfiniteGyre.java @@ -30,24 +30,15 @@ package mage.sets.riseoftheeldrazi; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.PutIntoGraveFromAnywhereSourceTriggeredAbility; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CastSourceTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.ShuffleIntoLibraryGraveOfSourceOwnerEffect; import mage.abilities.keyword.AnnihilatorAbility; import mage.abilities.keyword.IndestructibleAbility; -import mage.cards.Card; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.game.permanent.Permanent; -import mage.game.stack.Spell; -import mage.players.Player; import mage.target.TargetPermanent; /** @@ -66,13 +57,16 @@ public class UlamogTheInfiniteGyre extends CardImpl { this.toughness = new MageInt(10); // When you cast Ulamog, the Infinite Gyre, destroy target permanent. - this.addAbility(new UlamogTheInfiniteGyreDestroyOnCastAbility()); + Ability ability = new CastSourceTriggeredAbility(new DestroyTargetEffect()); + ability.addTarget(new TargetPermanent()); + this.addAbility(ability); + // Annihilator 4 (Whenever this creature attacks, defending player sacrifices four permanents.) this.addAbility(new AnnihilatorAbility(4)); // Indestructible this.addAbility(IndestructibleAbility.getInstance()); // When Ulamog is put into a graveyard from anywhere, its owner shuffles his or her graveyard into his or her library. - this.addAbility(new PutIntoGraveFromAnywhereSourceTriggeredAbility(new UlamogTheInfiniteGyreEnterGraveyardEffect(), false)); + this.addAbility(new PutIntoGraveFromAnywhereSourceTriggeredAbility(new ShuffleIntoLibraryGraveOfSourceOwnerEffect(), false)); } public UlamogTheInfiniteGyre(final UlamogTheInfiniteGyre card) { @@ -84,77 +78,3 @@ public class UlamogTheInfiniteGyre extends CardImpl { return new UlamogTheInfiniteGyre(this); } } - -class UlamogTheInfiniteGyreDestroyOnCastAbility extends TriggeredAbilityImpl { - - UlamogTheInfiniteGyreDestroyOnCastAbility() { - super(Zone.STACK, new DestroyTargetEffect()); - this.addTarget(new TargetPermanent()); - } - - UlamogTheInfiniteGyreDestroyOnCastAbility(UlamogTheInfiniteGyreDestroyOnCastAbility ability) { - super(ability); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.SPELL_CAST; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - Spell spell = (Spell) game.getObject(event.getTargetId()); - return this.getSourceId().equals(spell.getSourceId()); - } - - @Override - public UlamogTheInfiniteGyreDestroyOnCastAbility copy() { - return new UlamogTheInfiniteGyreDestroyOnCastAbility(this); - } - - @Override - public String getRule() { - return "When you cast {this}, " + super.getRule(); - } -} - -class UlamogTheInfiniteGyreEnterGraveyardEffect extends OneShotEffect { - - UlamogTheInfiniteGyreEnterGraveyardEffect() { - super(Outcome.Benefit); - staticText = "its owner shuffles his or her graveyard into his or her library"; - } - - UlamogTheInfiniteGyreEnterGraveyardEffect(UlamogTheInfiniteGyreEnterGraveyardEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - UUID ownerId = null; - Card card = game.getCard(source.getSourceId()); - if (card != null) { - ownerId = card.getOwnerId(); - } - if (ownerId == null) { - Permanent permanent = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); - if (permanent != null) { - ownerId = permanent.getOwnerId(); - } - } - Player player = game.getPlayer(ownerId); - if (player != null) { - for (Card cardToMove : player.getGraveyard().getCards(game)) { - cardToMove.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); - } - player.shuffleLibrary(game); - return true; - } - return false; - } - - @Override - public UlamogTheInfiniteGyreEnterGraveyardEffect copy() { - return new UlamogTheInfiniteGyreEnterGraveyardEffect(this); - } -} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/ElderPineOfJukai.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/ElderPineOfJukai.java index 860c187ec2f..91e83fce440 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/ElderPineOfJukai.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/ElderPineOfJukai.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; -import mage.abilities.common.SpellCastAllTriggeredAbility; +import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.SoulshiftAbility; import mage.cards.Card; @@ -61,7 +61,7 @@ public class ElderPineOfJukai extends CardImpl { this.toughness = new MageInt(1); // Whenever you cast a Spirit or Arcane spell, reveal the top three cards of your library. Put all land cards revealed this way into your hand and the rest on the bottom of your library in any order. - this.addAbility(new SpellCastAllTriggeredAbility(new ElderPineOfJukaiEffect(), new FilterSpiritOrArcaneCard(), false)); + this.addAbility(new SpellCastControllerTriggeredAbility(new ElderPineOfJukaiEffect(), new FilterSpiritOrArcaneCard(), false)); // Soulshift 2 this.addAbility(new SoulshiftAbility(2)); diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/MagaTraitorToMortals.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/MagaTraitorToMortals.java index 028f9299594..ac4e94bcef7 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/MagaTraitorToMortals.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/MagaTraitorToMortals.java @@ -30,20 +30,15 @@ package mage.sets.saviorsofkamigawa; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.dynamicvalue.common.CountersCount; -import mage.abilities.effects.EntersBattlefieldEffect; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; import mage.counters.CounterType; -import mage.game.Game; -import mage.game.permanent.Permanent; import mage.target.TargetPlayer; /** @@ -63,7 +58,7 @@ public class MagaTraitorToMortals extends CardImpl { this.toughness = new MageInt(0); // Maga, Traitor to Mortals enters the battlefield with X +1/+1 counters on it. - this.addAbility(new EntersBattlefieldAbility(new MagaTraitorToMortalsEnterBattlefieldEffect())); + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance()))); // When Maga enters the battlefield, target player loses life equal to the number of +1/+1 counters on it. Ability ability = new EntersBattlefieldTriggeredAbility( @@ -81,38 +76,3 @@ public class MagaTraitorToMortals extends CardImpl { return new MagaTraitorToMortals(this); } } - -class MagaTraitorToMortalsEnterBattlefieldEffect extends OneShotEffect { - - public MagaTraitorToMortalsEnterBattlefieldEffect() { - super(Outcome.BoostCreature); - staticText = "{this} enters the battlefield with X +1/+1 counters on it"; - } - - public MagaTraitorToMortalsEnterBattlefieldEffect(final MagaTraitorToMortalsEnterBattlefieldEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (spellAbility != null - && spellAbility.getSourceId().equals(source.getSourceId()) - && permanent.getZoneChangeCounter(game) - 1 == spellAbility.getSourceObjectZoneChangeCounter()) { - int amount = spellAbility.getManaCostsToPay().getX(); - if (amount > 0) { - permanent.addCounters(CounterType.P1P1.createInstance(amount), game); - } - } - } - return true; - } - - @Override - public MagaTraitorToMortalsEnterBattlefieldEffect copy() { - return new MagaTraitorToMortalsEnterBattlefieldEffect(this); - } - -} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/MoonbowIllusionist.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/MoonbowIllusionist.java index ef110170247..d41c6240d87 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/MoonbowIllusionist.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/MoonbowIllusionist.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.continuous.BecomesBasicLandTargetEffect; import mage.abilities.keyword.FlyingAbility; @@ -63,7 +63,7 @@ public class MoonbowIllusionist extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // {2}, Return a land you control to its owner's hand: Target land becomes the basic land type of your choice until end of turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn), new GenericManaCost(2)); - ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(new FilterControlledLandPermanent("land")))); + ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(new FilterControlledLandPermanent("land")))); ability.addTarget(new TargetLandPermanent()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/OboroBreezecaller.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/OboroBreezecaller.java index c3f406d50ff..9578e96727f 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/OboroBreezecaller.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/OboroBreezecaller.java @@ -34,7 +34,7 @@ import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.UntapTargetEffect; import mage.abilities.keyword.FlyingAbility; @@ -66,7 +66,7 @@ public class OboroBreezecaller extends CardImpl { // {2}, Return a land you control to its owner's hand: Untap target land. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new GenericManaCost(2)); - ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))); + ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))); ability.addTarget(new TargetLandPermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/OboroEnvoy.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/OboroEnvoy.java index 4ed03c26ba5..1c1e54e47aa 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/OboroEnvoy.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/OboroEnvoy.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.dynamicvalue.common.CardsInControllerHandCount; import mage.abilities.dynamicvalue.common.SignInversionDynamicValue; @@ -68,7 +68,7 @@ public class OboroEnvoy extends CardImpl { Effect effect = new BoostTargetEffect(new SignInversionDynamicValue(new CardsInControllerHandCount()), new StaticValue(-0), Duration.EndOfTurn); effect.setText("Target creature gets -X/-0 until end of turn, where X is the number of cards in your hand"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(2)); - ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land")))); + ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land")))); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/SoramaroFirstToDream.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/SoramaroFirstToDream.java index a4134bda06e..6ea5106fd85 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/SoramaroFirstToDream.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/SoramaroFirstToDream.java @@ -32,7 +32,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.CardsInControllerHandCount; @@ -70,7 +70,7 @@ public class SoramaroFirstToDream extends CardImpl { // {4}, Return a land you control to its owner's hand: Draw a card. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(4)); - ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land")))); + ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land")))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/ArgentumArmor.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/ArgentumArmor.java index bcf45fb822a..3063cec871f 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/ArgentumArmor.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/ArgentumArmor.java @@ -25,23 +25,21 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.scarsofmirrodin; import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.abilities.Ability; import mage.abilities.common.AttacksAttachedTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.common.continuous.BoostEquippedEffect; import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.continuous.BoostEquippedEffect; import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; +import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.target.TargetPermanent; /** @@ -50,18 +48,24 @@ import mage.target.TargetPermanent; */ public class ArgentumArmor extends CardImpl { - public ArgentumArmor (UUID ownerId) { + public ArgentumArmor(UUID ownerId) { super(ownerId, 137, "Argentum Armor", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{6}"); this.expansionSetCode = "SOM"; this.subtype.add("Equipment"); + + // Equipped creature gets +6/+6. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(6, 6))); + + // Whenever equipped creature attacks, destroy target permanent. Ability ability = new AttacksAttachedTriggeredAbility(new DestroyTargetEffect()); ability.addTarget(new TargetPermanent()); this.addAbility(ability); + + // Equip {6} this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(6))); } - public ArgentumArmor (final ArgentumArmor card) { + public ArgentumArmor(final ArgentumArmor card) { super(card); } diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/CarrionCall.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/CarrionCall.java index 6e230d5b0a5..230f49814f1 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/CarrionCall.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/CarrionCall.java @@ -29,13 +29,12 @@ package mage.sets.scarsofmirrodin; import java.util.UUID; -import mage.MageInt; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.InsectInfectToken; /** * @@ -48,7 +47,7 @@ public class CarrionCall extends CardImpl { this.expansionSetCode = "SOM"; // Put two 1/1 green Insect creature tokens with infect onto the battlefield. (They deal damage to creatures in the form of -1/-1 counters and to players in the form of poison counters.) - this.getSpellAbility().addEffect(new CreateTokenEffect(new CarrionCallInsectToken(), 2)); + this.getSpellAbility().addEffect(new CreateTokenEffect(new InsectInfectToken(), 2)); } public CarrionCall (final CarrionCall card) { @@ -60,19 +59,3 @@ public class CarrionCall extends CardImpl { return new CarrionCall(this); } } - -class CarrionCallInsectToken extends Token { - - public CarrionCallInsectToken() { - super("Insect", "1/1 green Insect creature tokens with infect"); - setOriginalExpansionSetCode("SOM"); - cardType.add(CardType.CREATURE); - color.setGreen(true); - subtype.add("Insect"); - power = new MageInt(1); - toughness = new MageInt(1); - - addAbility(InfectAbility.getInstance()); - } -} - diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/ChimericMass.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/ChimericMass.java index 6ca59c6d7b8..ed95ec8d7af 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/ChimericMass.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/ChimericMass.java @@ -29,26 +29,20 @@ package mage.sets.scarsofmirrodin; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.dynamicvalue.common.CountersCount; -import mage.abilities.effects.EntersBattlefieldEffect; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; -import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; import mage.counters.CounterType; -import mage.game.Game; -import mage.game.permanent.Permanent; import mage.game.permanent.token.Token; /** @@ -61,7 +55,7 @@ public class ChimericMass extends CardImpl { this.expansionSetCode = "SOM"; // Chimeric Mass enters the battlefield with X charge counters on it. - this.addAbility(new EntersBattlefieldAbility(new ChimericMassEffect(), "{this} enters the battlefield with X charge counters on it")); + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.CHARGE.createInstance()))); // {1}: Until end of turn, Chimeric Mass becomes a Construct artifact creature with "This creature's power and toughness are each equal to the number of charge counters on it." this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new ChimericMassToken(), "", Duration.EndOfTurn), new GenericManaCost(1))); @@ -78,39 +72,6 @@ public class ChimericMass extends CardImpl { } -class ChimericMassEffect extends OneShotEffect { - - public ChimericMassEffect() { - super(Outcome.Benefit); - } - - public ChimericMassEffect(final ChimericMassEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (spellAbility != null - && spellAbility.getSourceId().equals(source.getSourceId()) - && permanent.getZoneChangeCounter(game) - 1 == spellAbility.getSourceObjectZoneChangeCounter()) { - int amount = spellAbility.getManaCostsToPay().getX(); - if (amount > 0) { - permanent.addCounters(CounterType.CHARGE.createInstance(amount), game); - } - } - } - return true; - } - - @Override - public ChimericMassEffect copy() { - return new ChimericMassEffect(this); - } -} - class ChimericMassToken extends Token { public ChimericMassToken() { diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/GoldenUrn.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/GoldenUrn.java index 96a83ffbe4d..b05de39496e 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/GoldenUrn.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/GoldenUrn.java @@ -30,23 +30,20 @@ package mage.sets.scarsofmirrodin; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.dynamicvalue.common.CountersCount; +import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; -import mage.constants.Outcome; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.constants.TargetController; +import mage.constants.Zone; import mage.counters.CounterType; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; /** * @@ -58,7 +55,7 @@ public class GoldenUrn extends CardImpl { super(ownerId, 158, "Golden Urn", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{1}"); this.expansionSetCode = "SOM"; this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), TargetController.YOU, true)); - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GoldenUrnEffect(), new TapSourceCost()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(new CountersCount(CounterType.CHARGE)), new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); } @@ -73,34 +70,3 @@ public class GoldenUrn extends CardImpl { } } - -class GoldenUrnEffect extends OneShotEffect { - public GoldenUrnEffect() { - super(Outcome.GainLife); - staticText = "You gain life equal to the number of charge counters on {this}"; - } - - public GoldenUrnEffect(final GoldenUrnEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent p = game.getBattlefield().getPermanent(source.getSourceId()); - Player player = game.getPlayer(source.getControllerId()); - if (p == null) { - p = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); - } - if (p != null && player != null) { - player.gainLife(p.getCounters().getCount(CounterType.CHARGE), game); - return true; - } - return false; - } - - @Override - public GoldenUrnEffect copy() { - return new GoldenUrnEffect(this); - } - -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/KembaKhaRegent.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/KembaKhaRegent.java index 91e4e6d7672..acbfb13f318 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/KembaKhaRegent.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/KembaKhaRegent.java @@ -38,7 +38,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.dynamicvalue.common.EquipmentAttachedCount; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.CatToken; /** * @@ -69,16 +69,3 @@ public class KembaKhaRegent extends CardImpl { return new KembaKhaRegent(this); } } - -class CatToken extends Token { - - public CatToken() { - super("Cat", "a 2/2 white Cat creature token"); - cardType.add(CardType.CREATURE); - color.setWhite(true); - - subtype.add("Cat"); - power = new MageInt(2); - toughness = new MageInt(2); - } -} diff --git a/Mage.Sets/src/mage/sets/scourge/WirewoodSymbiote.java b/Mage.Sets/src/mage/sets/scourge/WirewoodSymbiote.java index 8bc500b1c35..3c676c3bdb7 100644 --- a/Mage.Sets/src/mage/sets/scourge/WirewoodSymbiote.java +++ b/Mage.Sets/src/mage/sets/scourge/WirewoodSymbiote.java @@ -34,7 +34,7 @@ import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.common.UntapTargetEffect; import mage.cards.CardImpl; import mage.filter.common.FilterControlledCreaturePermanent; @@ -63,7 +63,7 @@ public class WirewoodSymbiote extends CardImpl { this.toughness = new MageInt(1); // Return an Elf you control to its owner's hand: Untap target creature. Activate this ability only once each turn. - Ability ability = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))); + Ability ability = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/shadowmoor/RosheenMeanderer.java b/Mage.Sets/src/mage/sets/shadowmoor/RosheenMeanderer.java index 80bc63dda1a..6907063e21f 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/RosheenMeanderer.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/RosheenMeanderer.java @@ -37,6 +37,7 @@ import mage.abilities.condition.Condition; import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.mana.BasicManaAbility; import mage.cards.CardImpl; +import mage.constants.AbilityType; import mage.constants.CardType; import mage.constants.Rarity; import mage.game.Game; @@ -56,9 +57,9 @@ public class RosheenMeanderer extends CardImpl { this.power = new MageInt(4); this.toughness = new MageInt(4); - // {tap}: Add {4} to your mana pool. Spend this mana only on costs that contain {X}. + // {T}: Add {4} to your mana pool. Spend this mana only on costs that contain {X}. this.addAbility(new RosheenMeandererManaAbility()); - + } public RosheenMeanderer(final RosheenMeanderer card) { @@ -75,7 +76,7 @@ class RosheenMeandererManaAbility extends BasicManaAbility { RosheenMeandererManaAbility() { super(new BasicManaEffect(new RosheenMeandererConditionalMana())); - this.netMana.add(new Mana(0,0,0,0,0,4,0)); + this.netMana.add(new Mana(0, 0, 0, 0, 0, 4, 0)); } RosheenMeandererManaAbility(RosheenMeandererManaAbility ability) { @@ -98,10 +99,16 @@ class RosheenMeandererConditionalMana extends ConditionalMana { } class RosheenMeandererManaCondition implements Condition { + @Override public boolean apply(Game game, Ability source) { - MageObject object = game.getObject(source.getSourceId()); - return object != null - && object.getManaCost().getText().contains("X"); + if (AbilityType.SPELL.equals(source.getAbilityType())) { + MageObject object = game.getObject(source.getSourceId()); + return object != null + && object.getManaCost().getText().contains("X"); + + } else { + return source.getManaCosts().getText().contains("X"); + } } } diff --git a/Mage.Sets/src/mage/sets/shadowmoor/ScarscaleRitual.java b/Mage.Sets/src/mage/sets/shadowmoor/ScarscaleRitual.java index 242203fede3..8e955f022ff 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/ScarscaleRitual.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/ScarscaleRitual.java @@ -33,11 +33,13 @@ import mage.abilities.costs.CostImpl; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.constants.CardType; +import mage.constants.Outcome; import mage.constants.Rarity; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.game.permanent.Permanent; +import mage.players.Player; import mage.target.Target; import mage.target.common.TargetControlledCreaturePermanent; @@ -52,14 +54,11 @@ public class ScarscaleRitual extends CardImpl { this.expansionSetCode = "SHM"; // As an additional cost to cast Scarscale Ritual, put a -1/-1 counter on a creature you control. - Target target = new TargetControlledCreaturePermanent(); - target.setNotTarget(true); - this.getSpellAbility().addTarget(target); this.getSpellAbility().addCost(new ScarscaleRitualCost()); - + // Draw two cards. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2)); - + } public ScarscaleRitual(final ScarscaleRitual card) { @@ -84,7 +83,7 @@ class ScarscaleRitualCost extends CostImpl { @Override public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { - for (Permanent permanent :game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), controllerId, game)) { + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), controllerId, game)) { return permanent != null; } return false; @@ -92,10 +91,18 @@ class ScarscaleRitualCost extends CostImpl { @Override public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) { - Permanent permanent = game.getPermanent(ability.getFirstTarget()); - if (permanent != null) { - permanent.addCounters(CounterType.M1M1.createInstance(), game); - this.paid = true; + Player controller = game.getPlayer(ability.getControllerId()); + if (controller != null) { + Target target = new TargetControlledCreaturePermanent(); + target.setNotTarget(true); + controller.chooseTarget(Outcome.UnboostCreature, target, ability, game); + Permanent permanent = game.getPermanent(target.getFirstTarget()); + if (permanent != null) { + permanent.addCounters(CounterType.M1M1.createInstance(), game); + game.informPlayers(controller.getLogName() + " puts a -1/-1 counter on " + permanent.getLogName()); + this.paid = true; + } + } return paid; } @@ -104,4 +111,4 @@ class ScarscaleRitualCost extends CostImpl { public ScarscaleRitualCost copy() { return new ScarscaleRitualCost(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/BoneSplinters.java b/Mage.Sets/src/mage/sets/shardsofalara/BoneSplinters.java index c499cc268e0..77ac4cc3a49 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/BoneSplinters.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/BoneSplinters.java @@ -28,11 +28,13 @@ package mage.sets.shardsofalara; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Rarity; import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterCreaturePermanent; import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetCreaturePermanent; @@ -46,12 +48,11 @@ public class BoneSplinters extends CardImpl { super(ownerId, 67, "Bone Splinters", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{B}"); this.expansionSetCode = "ALA"; - // As an additional cost to cast Bone Splinters, sacrifice a creature. - this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent())); + this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent("a creature")))); // Destroy target creature. - this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature (to destoy)"))); + this.getSpellAbility().addEffect(new DestroyTargetEffect("Destroy target creature")); } public BoneSplinters(final BoneSplinters card) { diff --git a/Mage.Sets/src/mage/sets/shardsofalara/FeralHydra.java b/Mage.Sets/src/mage/sets/shardsofalara/FeralHydra.java index a6d8eeda839..5eed25187ea 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/FeralHydra.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/FeralHydra.java @@ -29,24 +29,18 @@ package mage.sets.shardsofalara; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.EntersBattlefieldEffect; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.abilities.effects.common.InfoEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; -import mage.game.Game; -import mage.game.permanent.Permanent; /** * @@ -64,7 +58,8 @@ public class FeralHydra extends CardImpl { this.toughness = new MageInt(0); // Feral Hydra enters the battlefield with X +1/+1 counters on it. - this.addAbility(new EntersBattlefieldAbility(new FeralHydraEffect(), true)); + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance()))); + // {3}: Put a +1/+1 counter on Feral Hydra. Any player may activate this ability. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl("{3}")); ability.setMayActivate(TargetController.ANY); @@ -81,37 +76,3 @@ public class FeralHydra extends CardImpl { return new FeralHydra(this); } } - -class FeralHydraEffect extends OneShotEffect { - - public FeralHydraEffect() { - super(Outcome.BoostCreature); - staticText = "{this} enters the battlefield with X +1/+1 counters on it"; - } - - public FeralHydraEffect(final FeralHydraEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (spellAbility != null - && spellAbility.getSourceId().equals(source.getSourceId()) - && permanent.getZoneChangeCounter(game) - 1 == spellAbility.getSourceObjectZoneChangeCounter()) { - int amount = spellAbility.getManaCostsToPay().getX(); - if (amount > 0) { - permanent.addCounters(CounterType.P1P1.createInstance(amount), game); - } - } - } - return true; - } - - @Override - public FeralHydraEffect copy() { - return new FeralHydraEffect(this); - } -} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/GoblinAssault.java b/Mage.Sets/src/mage/sets/shardsofalara/GoblinAssault.java index 43ca9f54978..7877a087dc0 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/GoblinAssault.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/GoblinAssault.java @@ -28,22 +28,22 @@ package mage.sets.shardsofalara; import java.util.UUID; - -import mage.constants.*; import mage.MageInt; -import mage.ObjectColor; -import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.RequirementEffect; import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.combat.AttacksIfAbleAllEffect; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; import mage.game.permanent.token.Token; +import mage.watchers.common.AttackedThisTurnWatcher; /** * @@ -51,15 +51,21 @@ import mage.game.permanent.token.Token; */ public class GoblinAssault extends CardImpl { + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblin creatures"); + + static { + filter.add(new SubtypePredicate("Goblin")); + } + public GoblinAssault(UUID ownerId) { super(ownerId, 101, "Goblin Assault", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); this.expansionSetCode = "ALA"; - // At the beginning of your upkeep, put a 1/1 red Goblin creature token with haste onto the battlefield. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new CreateTokenEffect(new GoblinAssaultToken()), TargetController.YOU, false)); + // Goblin creatures attack each turn if able. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GoblinAssaultEffect())); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AttacksIfAbleAllEffect(filter, Duration.WhileOnBattlefield)), new AttackedThisTurnWatcher()); } public GoblinAssault(final GoblinAssault card) { @@ -72,48 +78,6 @@ public class GoblinAssault extends CardImpl { } } - -class GoblinAssaultEffect extends RequirementEffect { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblin creatures"); - static { - filter.add(new SubtypePredicate("Goblin")); - } - - public GoblinAssaultEffect() { - super(Duration.WhileOnBattlefield); - staticText = "Goblin creatures attack each turn if able"; - } - - public GoblinAssaultEffect(final GoblinAssaultEffect effect) { - super(effect); - } - - @Override - public GoblinAssaultEffect copy() { - return new GoblinAssaultEffect(this); - } - - @Override - public boolean applies(Permanent permanent, Ability source, Game game) { - if (filter.match(permanent, source.getSourceId(), source.getControllerId(), game)) { - return true; - } - return false; - } - - @Override - public boolean mustAttack(Game game) { - return true; - } - - @Override - public boolean mustBlock(Game game) { - return false; - } - -} - class GoblinAssaultToken extends Token { public GoblinAssaultToken() { diff --git a/Mage.Sets/src/mage/sets/shardsofalara/SigilOfDistinction.java b/Mage.Sets/src/mage/sets/shardsofalara/SigilOfDistinction.java index dc7aa39b6e6..d390ef3ac8c 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/SigilOfDistinction.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/SigilOfDistinction.java @@ -28,14 +28,11 @@ package mage.sets.shardsofalara; import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.common.RemoveCountersSourceCost; import mage.abilities.dynamicvalue.common.CountersCount; -import mage.abilities.effects.EntersBattlefieldEffect; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.abilities.effects.common.continuous.BoostEquippedEffect; import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; @@ -44,8 +41,6 @@ import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; import mage.counters.CounterType; -import mage.game.Game; -import mage.game.permanent.Permanent; /** * @author Loki @@ -58,7 +53,7 @@ public class SigilOfDistinction extends CardImpl { this.subtype.add("Equipment"); // Sigil of Distinction enters the battlefield with X charge counters on it. - this.addAbility(new EntersBattlefieldAbility(new SigilOfDistinctionEffect(), "{this} enters the battlefield with X charge counters on it")); + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.CHARGE.createInstance()))); // Equipped creature gets +1/+1 for each charge counter on Sigil of Distinction. BoostEquippedEffect effect = new BoostEquippedEffect(new CountersCount(CounterType.CHARGE), new CountersCount(CounterType.CHARGE)); @@ -78,37 +73,3 @@ public class SigilOfDistinction extends CardImpl { return new SigilOfDistinction(this); } } - -class SigilOfDistinctionEffect extends OneShotEffect { - - public SigilOfDistinctionEffect() { - super(Outcome.Benefit); - } - - public SigilOfDistinctionEffect(final SigilOfDistinctionEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (spellAbility != null - && spellAbility.getSourceId().equals(source.getSourceId()) - && permanent.getZoneChangeCounter(game) - 1 == spellAbility.getSourceObjectZoneChangeCounter()) { - int amount = spellAbility.getManaCostsToPay().getX(); - if (amount > 0) { - permanent.addCounters(CounterType.CHARGE.createInstance(amount), game); - return true; - } - } - } - return true; - } - - @Override - public SigilOfDistinctionEffect copy() { - return new SigilOfDistinctionEffect(this); - } -} diff --git a/Mage.Sets/src/mage/sets/stronghold/Amok.java b/Mage.Sets/src/mage/sets/stronghold/Amok.java new file mode 100644 index 00000000000..730748afe88 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/Amok.java @@ -0,0 +1,68 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class Amok extends CardImpl { + + public Amok(UUID ownerId) { + super(ownerId, 76, "Amok", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); + this.expansionSetCode = "STH"; + + // {1}, Discard a card at random: Put a +1/+1 counter on target creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl("{1}")); + ability.addCost(new DiscardCardCost(true)); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public Amok(final Amok card) { + super(card); + } + + @Override + public Amok copy() { + return new Amok(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/BrushWithDeath.java b/Mage.Sets/src/mage/sets/stronghold/BrushWithDeath.java new file mode 100644 index 00000000000..9e7e567a4f6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/BrushWithDeath.java @@ -0,0 +1,65 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.abilities.keyword.BuybackAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetOpponent; + +/** + * + * @author LoneFox + */ +public class BrushWithDeath extends CardImpl { + + public BrushWithDeath(UUID ownerId) { + super(ownerId, 2, "Brush with Death", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{B}"); + this.expansionSetCode = "STH"; + + // Buyback {2}{B}{B} + this.addAbility(new BuybackAbility("{2}{B}{B}")); + // Target opponent loses 2 life. You gain 2 life. + this.getSpellAbility().addEffect(new LoseLifeTargetEffect(2)); + this.getSpellAbility().addEffect(new GainLifeEffect(2)); + this.getSpellAbility().addTarget(new TargetOpponent()); + } + + public BrushWithDeath(final BrushWithDeath card) { + super(card); + } + + @Override + public BrushWithDeath copy() { + return new BrushWithDeath(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/Bullwhip.java b/Mage.Sets/src/mage/sets/stronghold/Bullwhip.java new file mode 100644 index 00000000000..f63732f299f --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/Bullwhip.java @@ -0,0 +1,73 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.combat.AttacksIfAbleTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class Bullwhip extends CardImpl { + + public Bullwhip(UUID ownerId) { + super(ownerId, 126, "Bullwhip", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{4}"); + this.expansionSetCode = "STH"; + + // {2}, {tap}: Bullwhip deals 1 damage to target creature. That creature attacks this turn if able. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{2}")); + Effect effect = new AttacksIfAbleTargetEffect(Duration.EndOfTurn); + effect.setText("that creature attacks this turn if able"); + ability.addEffect(effect); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public Bullwhip(final Bullwhip card) { + super(card); + } + + @Override + public Bullwhip copy() { + return new Bullwhip(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/ChangeOfHeart.java b/Mage.Sets/src/mage/sets/stronghold/ChangeOfHeart.java new file mode 100644 index 00000000000..37bda326618 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/ChangeOfHeart.java @@ -0,0 +1,64 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.abilities.effects.common.combat.CantAttackTargetEffect; +import mage.abilities.keyword.BuybackAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class ChangeOfHeart extends CardImpl { + + public ChangeOfHeart(UUID ownerId) { + super(ownerId, 103, "Change of Heart", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{W}"); + this.expansionSetCode = "STH"; + + // Buyback {3} + this.addAbility(new BuybackAbility("{3}")); + // Target creature can't attack this turn. + this.getSpellAbility().addEffect(new CantAttackTargetEffect(Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public ChangeOfHeart(final ChangeOfHeart card) { + super(card); + } + + @Override + public ChangeOfHeart copy() { + return new ChangeOfHeart(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/Contemplation.java b/Mage.Sets/src/mage/sets/stronghold/Contemplation.java new file mode 100644 index 00000000000..62520909369 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/Contemplation.java @@ -0,0 +1,59 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class Contemplation extends CardImpl { + + public Contemplation(UUID ownerId) { + super(ownerId, 104, "Contemplation", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{W}"); + this.expansionSetCode = "STH"; + + // Whenever you cast a spell, you gain 1 life. + this.addAbility(new SpellCastControllerTriggeredAbility(new GainLifeEffect(1), false)); + } + + public Contemplation(final Contemplation card) { + super(card); + } + + @Override + public Contemplation copy() { + return new Contemplation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/CrossbowAmbush.java b/Mage.Sets/src/mage/sets/stronghold/CrossbowAmbush.java new file mode 100644 index 00000000000..e6b7a06173d --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/CrossbowAmbush.java @@ -0,0 +1,61 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.ReachAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class CrossbowAmbush extends CardImpl { + + public CrossbowAmbush(UUID ownerId) { + super(ownerId, 55, "Crossbow Ambush", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G}"); + this.expansionSetCode = "STH"; + + // Creatures you control gain reach until end of turn. + this.getSpellAbility().addEffect(new GainAbilityControlledEffect(ReachAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent("Creatures"))); + } + + public CrossbowAmbush(final CrossbowAmbush card) { + super(card); + } + + @Override + public CrossbowAmbush copy() { + return new CrossbowAmbush(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/FurnaceSpirit.java b/Mage.Sets/src/mage/sets/stronghold/FurnaceSpirit.java new file mode 100644 index 00000000000..1463d52a822 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/FurnaceSpirit.java @@ -0,0 +1,69 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class FurnaceSpirit extends CardImpl { + + public FurnaceSpirit(UUID ownerId) { + super(ownerId, 87, "Furnace Spirit", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "STH"; + this.subtype.add("Spirit"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Haste + this.addAbility(HasteAbility.getInstance()); + // {R}: Furnace Spirit gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}"))); + } + + public FurnaceSpirit(final FurnaceSpirit card) { + super(card); + } + + @Override + public FurnaceSpirit copy() { + return new FurnaceSpirit(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/Hesitation.java b/Mage.Sets/src/mage/sets/stronghold/Hesitation.java new file mode 100644 index 00000000000..da704679fb5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/Hesitation.java @@ -0,0 +1,68 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.abilities.common.SpellCastAllTriggeredAbility; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.SetTargetPointer; +import mage.filter.FilterSpell; +import mage.abilities.Ability; +import mage.abilities.effects.Effect; + +/** + * + * @author LoneFox + */ +public class Hesitation extends CardImpl { + + public Hesitation(UUID ownerId) { + super(ownerId, 33, "Hesitation", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); + this.expansionSetCode = "STH"; + + // When a player casts a spell, sacrifice Hesitation and counter that spell. + Ability ability = new SpellCastAllTriggeredAbility(new SacrificeSourceEffect(), new FilterSpell("a spell"), false, SetTargetPointer.SPELL); + Effect effect = new CounterTargetEffect(); + effect.setText("and counter that spell"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public Hesitation(final Hesitation card) { + super(card); + } + + @Override + public Hesitation copy() { + return new Hesitation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/IntruderAlarm.java b/Mage.Sets/src/mage/sets/stronghold/IntruderAlarm.java index 2fe7b279841..83e4c1a291b 100644 --- a/Mage.Sets/src/mage/sets/stronghold/IntruderAlarm.java +++ b/Mage.Sets/src/mage/sets/stronghold/IntruderAlarm.java @@ -28,18 +28,17 @@ package mage.sets.stronghold; import java.util.UUID; - -import mage.constants.*; -import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DontUntapInControllersUntapStepAllEffect; +import mage.abilities.effects.common.UntapAllEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; /** * @@ -53,9 +52,9 @@ public class IntruderAlarm extends CardImpl { // Creatures don't untap during their controllers' untap steps. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, new FilterCreaturePermanent("Creatures")))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, new FilterCreaturePermanent("creatures")))); // Whenever a creature enters the battlefield, untap all creatures. - this.addAbility(new EntersBattlefieldAllTriggeredAbility(new UntapAllCreatureEffect(), new FilterCreaturePermanent())); + this.addAbility(new EntersBattlefieldAllTriggeredAbility(new UntapAllEffect(new FilterCreaturePermanent("creatures")), new FilterCreaturePermanent("a creature"))); } public IntruderAlarm(final IntruderAlarm card) { @@ -67,33 +66,3 @@ public class IntruderAlarm extends CardImpl { return new IntruderAlarm(this); } } - -class UntapAllCreatureEffect extends OneShotEffect { - - public UntapAllCreatureEffect() { - super(Outcome.Untap); - staticText = "untap all creatures"; - } - - public UntapAllCreatureEffect(final UntapAllCreatureEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - if (player != null) { - for (Permanent land: game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), source.getSourceId(), game)) { - land.untap(game); - } - return true; - } - return false; - } - - @Override - public UntapAllCreatureEffect copy() { - return new UntapAllCreatureEffect(this); - } - -} diff --git a/Mage.Sets/src/mage/sets/stronghold/Leap.java b/Mage.Sets/src/mage/sets/stronghold/Leap.java new file mode 100644 index 00000000000..2ad2988484e --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/Leap.java @@ -0,0 +1,65 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class Leap extends CardImpl { + + public Leap(UUID ownerId) { + super(ownerId, 35, "Leap", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}"); + this.expansionSetCode = "STH"; + + // Target creature gains flying until end of turn. + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public Leap(final Leap card) { + super(card); + } + + @Override + public Leap copy() { + return new Leap(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/Mindwarper.java b/Mage.Sets/src/mage/sets/stronghold/Mindwarper.java new file mode 100644 index 00000000000..336d9dcf743 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/Mindwarper.java @@ -0,0 +1,76 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.TargetPlayer; + +/** + * + * @author LoneFox + */ +public class Mindwarper extends CardImpl { + + public Mindwarper(UUID ownerId) { + super(ownerId, 14, "Mindwarper", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + this.expansionSetCode = "STH"; + this.subtype.add("Spirit"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Mindwarper enters the battlefield with three +1/+1 counters on it. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)), "with three +1/+1 counters on it")); + // {2}{B}, Remove a +1/+1 counter from Mindwarper: Target player discards a card. Activate this ability only any time you could cast a sorcery. + Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(1), new ManaCostsImpl("{2}{B}")); + ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public Mindwarper(final Mindwarper card) { + super(card); + } + + @Override + public Mindwarper copy() { + return new Mindwarper(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/MobJustice.java b/Mage.Sets/src/mage/sets/stronghold/MobJustice.java new file mode 100644 index 00000000000..d2acb4c934c --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/MobJustice.java @@ -0,0 +1,65 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.target.TargetPlayer; + +/** + * + * @author LoneFox + */ +public class MobJustice extends CardImpl { + + public MobJustice(UUID ownerId) { + super(ownerId, 90, "Mob Justice", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{R}"); + this.expansionSetCode = "STH"; + + // Mob Justice deals damage to target player equal to the number of creatures you control. + Effect effect = new DamageTargetEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent())); + effect.setText("{this} deals damage to target player equal to the number of creatures you control"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetPlayer()); + } + + public MobJustice(final MobJustice card) { + super(card); + } + + @Override + public MobJustice copy() { + return new MobJustice(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/RabidRats.java b/Mage.Sets/src/mage/sets/stronghold/RabidRats.java new file mode 100644 index 00000000000..628d6224f67 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/RabidRats.java @@ -0,0 +1,71 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterBlockingCreature; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class RabidRats extends CardImpl { + + public RabidRats(UUID ownerId) { + super(ownerId, 17, "Rabid Rats", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "STH"; + this.subtype.add("Rat"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}: Target blocking creature gets -1/-1 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-1, -1, Duration.EndOfTurn), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(new FilterBlockingCreature())); + this.addAbility(ability); + } + + public RabidRats(final RabidRats card) { + super(card); + } + + @Override + public RabidRats copy() { + return new RabidRats(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/SkyshroudArcher.java b/Mage.Sets/src/mage/sets/stronghold/SkyshroudArcher.java new file mode 100644 index 00000000000..10d3bd2ee1e --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/SkyshroudArcher.java @@ -0,0 +1,80 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class SkyshroudArcher extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with flying"); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + } + + public SkyshroudArcher(UUID ownerId) { + super(ownerId, 64, "Skyshroud Archer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "STH"; + this.subtype.add("Elf"); + this.subtype.add("Archer"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}: Target creature with flying gets -1/-1 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-1, -1, Duration.EndOfTurn), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public SkyshroudArcher(final SkyshroudArcher card) { + super(card); + } + + @Override + public SkyshroudArcher copy() { + return new SkyshroudArcher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/SliverQueen.java b/Mage.Sets/src/mage/sets/stronghold/SliverQueen.java index a7d7b7c7273..c5218656fc1 100644 --- a/Mage.Sets/src/mage/sets/stronghold/SliverQueen.java +++ b/Mage.Sets/src/mage/sets/stronghold/SliverQueen.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.SliverToken; /** * @@ -66,14 +66,3 @@ public class SliverQueen extends CardImpl { return new SliverQueen(this); } } - -class SliverToken extends Token { - - public SliverToken() { - super("Sliver", "1/1 colorless Sliver creature token"); - cardType.add(CardType.CREATURE); - subtype.add("Sliver"); - power = new MageInt(1); - toughness = new MageInt(1); - } -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/stronghold/SpikeSoldier.java b/Mage.Sets/src/mage/sets/stronghold/SpikeSoldier.java new file mode 100644 index 00000000000..503276d58e9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/SpikeSoldier.java @@ -0,0 +1,82 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class SpikeSoldier extends CardImpl { + + public SpikeSoldier(UUID ownerId) { + super(ownerId, 69, "Spike Soldier", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + this.expansionSetCode = "STH"; + this.subtype.add("Spike"); + this.subtype.add("Soldier"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Spike Soldier enters the battlefield with three +1/+1 counters on it. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)), "with three +1/+1 counters on it")); + // {2}, Remove a +1/+1 counter from Spike Soldier: Put a +1/+1 counter on target creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl("{2}")); + ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + // Remove a +1/+1 counter from Spike Soldier: Spike Soldier gets +2/+2 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 2, Duration.EndOfTurn), + new RemoveCountersSourceCost(CounterType.P1P1.createInstance()))); + } + + public SpikeSoldier(final SpikeSoldier card) { + super(card); + } + + @Override + public SpikeSoldier copy() { + return new SpikeSoldier(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/SpikeWorker.java b/Mage.Sets/src/mage/sets/stronghold/SpikeWorker.java new file mode 100644 index 00000000000..ae078c7b71a --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/SpikeWorker.java @@ -0,0 +1,76 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class SpikeWorker extends CardImpl { + + public SpikeWorker(UUID ownerId) { + super(ownerId, 70, "Spike Worker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "STH"; + this.subtype.add("Spike"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Spike Worker enters the battlefield with two +1/+1 counters on it. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), "with two +1/+1 counters on it")); + // {2}, Remove a +1/+1 counter from Spike Worker: Put a +1/+1 counter on target creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl("{2}")); + ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public SpikeWorker(final SpikeWorker card) { + super(card); + } + + @Override + public SpikeWorker copy() { + return new SpikeWorker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/Torment.java b/Mage.Sets/src/mage/sets/stronghold/Torment.java new file mode 100644 index 00000000000..42f2de23cf2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/Torment.java @@ -0,0 +1,74 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class Torment extends CardImpl { + + public Torment(UUID ownerId) { + super(ownerId, 23, "Torment", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); + this.expansionSetCode = "STH"; + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.UnboostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + // Enchanted creature gets -3/-0. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(-3, 0, Duration.WhileOnBattlefield))); + } + + public Torment(final Torment card) { + super(card); + } + + @Override + public Torment copy() { + return new Torment(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/CircleOfProtectionShadow.java b/Mage.Sets/src/mage/sets/tempest/CircleOfProtectionShadow.java new file mode 100644 index 00000000000..195c8378d33 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/CircleOfProtectionShadow.java @@ -0,0 +1,74 @@ +/* + * 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.tempest; + +import java.util.UUID; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.PreventNextDamageFromChosenSourceToYouEffect; +import mage.abilities.keyword.ShadowAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; + +/** + * + * @author LoneFox + */ +public class CircleOfProtectionShadow extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature of your choice with shadow"); + + static { + filter.add(new AbilityPredicate(ShadowAbility.class)); + } + + public CircleOfProtectionShadow(UUID ownerId) { + super(ownerId, 224, "Circle of Protection: Shadow", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); + this.expansionSetCode = "TMP"; + + // {1}: The next time a creature of your choice with shadow would deal damage to you this turn, prevent that damage. + Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter); + effect.setText("The next time a creature of your choice with shadow would deal damage to you this turn, prevent that damage"); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("1"))); + } + + public CircleOfProtectionShadow(final CircleOfProtectionShadow card) { + super(card); + } + + @Override + public CircleOfProtectionShadow copy() { + return new CircleOfProtectionShadow(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/DauthiGhoul.java b/Mage.Sets/src/mage/sets/tempest/DauthiGhoul.java new file mode 100644 index 00000000000..8b81a6833e1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/DauthiGhoul.java @@ -0,0 +1,77 @@ +/* + * 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.tempest; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesCreatureTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.ShadowAbility; +import mage.abilities.keyword.ShadowAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; + +/** + * + * @author LoneFox + */ +public class DauthiGhoul extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with shadow"); + + static { + filter.add(new AbilityPredicate(ShadowAbility.class)); + } + + public DauthiGhoul(UUID ownerId) { + super(ownerId, 15, "Dauthi Ghoul", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "TMP"; + this.subtype.add("Dauthi"); + this.subtype.add("Zombie"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Shadow + this.addAbility(ShadowAbility.getInstance()); + // Whenever a creature with shadow dies, put a +1/+1 counter on Dauthi Ghoul. + this.addAbility(new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, filter)); + } + + public DauthiGhoul(final DauthiGhoul card) { + super(card); + } + + @Override + public DauthiGhoul copy() { + return new DauthiGhoul(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/HandToHand.java b/Mage.Sets/src/mage/sets/tempest/HandToHand.java index 0e6ce50ad75..d3e4984f674 100644 --- a/Mage.Sets/src/mage/sets/tempest/HandToHand.java +++ b/Mage.Sets/src/mage/sets/tempest/HandToHand.java @@ -92,7 +92,7 @@ class HandToHandEffect extends ContinuousRuleModifyingEffectImpl { public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { - return "During combat, players can't cast instant spells or activate abilities that aren't mana abilities (" + mageObject.getLogName() + ")."; + return "During combat, players can't cast instant spells or activate abilities that aren't mana abilities (" + mageObject.getIdName() + ")."; } return null; } diff --git a/Mage.Sets/src/mage/sets/tempest/Krakilin.java b/Mage.Sets/src/mage/sets/tempest/Krakilin.java index 55ac185a0ef..4f1cb03d1bd 100644 --- a/Mage.Sets/src/mage/sets/tempest/Krakilin.java +++ b/Mage.Sets/src/mage/sets/tempest/Krakilin.java @@ -29,22 +29,16 @@ package mage.sets.tempest; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.EntersBattlefieldEffect; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.abilities.effects.common.RegenerateSourceEffect; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; import mage.counters.CounterType; -import mage.game.Game; -import mage.game.permanent.Permanent; /** * @@ -60,7 +54,7 @@ public class Krakilin extends CardImpl { this.toughness = new MageInt(0); // Krakilin enters the battlefield with X +1/+1 counters on it. - this.addAbility(new EntersBattlefieldAbility(new KrakilinEffect())); + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance()))); // {1}{G}: Regenerate Krakilin. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{1}{G}"))); @@ -75,37 +69,3 @@ public class Krakilin extends CardImpl { return new Krakilin(this); } } - -class KrakilinEffect extends OneShotEffect { - - public KrakilinEffect() { - super(Outcome.BoostCreature); - staticText = "{this} enters the battlefield with X +1/+1 counters on it"; - } - - public KrakilinEffect(final KrakilinEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (spellAbility != null - && spellAbility.getSourceId().equals(source.getSourceId()) - && permanent.getZoneChangeCounter(game) - 1 == spellAbility.getSourceObjectZoneChangeCounter()) { - int amount = spellAbility.getManaCostsToPay().getX(); - if (amount > 0) { - permanent.addCounters(CounterType.P1P1.createInstance(amount), game); - } - } - } - return true; - } - - @Override - public KrakilinEffect copy() { - return new KrakilinEffect(this); - } -} diff --git a/Mage.Sets/src/mage/sets/tempest/PegasusRefuge.java b/Mage.Sets/src/mage/sets/tempest/PegasusRefuge.java new file mode 100644 index 00000000000..483a7e1925a --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/PegasusRefuge.java @@ -0,0 +1,66 @@ +/* + * 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.tempest; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.permanent.token.PegasusToken; + +/** + * + * @author LoneFox + */ +public class PegasusRefuge extends CardImpl { + + public PegasusRefuge(UUID ownerId) { + super(ownerId, 247, "Pegasus Refuge", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); + this.expansionSetCode = "TMP"; + + // {2}, Discard a card: Put a 1/1 white Pegasus creature token with flying onto the battlefield. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new PegasusToken()), new ManaCostsImpl("{2}")); + ability.addCost(new DiscardCardCost()); + this.addAbility(ability); + } + + public PegasusRefuge(final PegasusRefuge card) { + super(card); + } + + @Override + public PegasusRefuge copy() { + return new PegasusRefuge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/ThalakosMistfolk.java b/Mage.Sets/src/mage/sets/tempest/ThalakosMistfolk.java new file mode 100644 index 00000000000..d13503cf7ed --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/ThalakosMistfolk.java @@ -0,0 +1,69 @@ +/* + * 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.tempest; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.PutOnLibrarySourceEffect; +import mage.abilities.keyword.ShadowAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class ThalakosMistfolk extends CardImpl { + + public ThalakosMistfolk(UUID ownerId) { + super(ownerId, 93, "Thalakos Mistfolk", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "TMP"; + this.subtype.add("Thalakos"); + this.subtype.add("Illusion"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Shadow + this.addAbility(ShadowAbility.getInstance()); + // {U}: Put Thalakos Mistfolk on top of its owner's library. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutOnLibrarySourceEffect(true), new ManaCostsImpl("{U}"))); + } + + public ThalakosMistfolk(final ThalakosMistfolk card) { + super(card); + } + + @Override + public ThalakosMistfolk copy() { + return new ThalakosMistfolk(this); + } +} diff --git a/Mage.Sets/src/mage/sets/thedark/CityOfShadows.java b/Mage.Sets/src/mage/sets/thedark/CityOfShadows.java index 8651daa4ad0..781370f3cec 100644 --- a/Mage.Sets/src/mage/sets/thedark/CityOfShadows.java +++ b/Mage.Sets/src/mage/sets/thedark/CityOfShadows.java @@ -60,7 +60,7 @@ public class CityOfShadows extends CardImpl { // {T}: Add {X} to your mana pool, where X is the number of storage counters on City of Shadows. ability = new DynamicManaAbility(Mana.ColorlessMana, new CountersCount(CounterType.STORAGE), - "{tap}: Add {X} to your mana pool, where X is the number of storage counters on {this}"); + "Add {X} to your mana pool, where X is the number of storage counters on {this}"); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/thedark/DanceOfMany.java b/Mage.Sets/src/mage/sets/thedark/DanceOfMany.java index de05affa1de..1b858cc40fa 100644 --- a/Mage.Sets/src/mage/sets/thedark/DanceOfMany.java +++ b/Mage.Sets/src/mage/sets/thedark/DanceOfMany.java @@ -84,7 +84,7 @@ public class DanceOfMany extends CardImpl { // When Dance of Many leaves the battlefield, exile the token. // When the token leaves the battlefield, sacrifice Dance of Many. Ability ability2 = new LeavesBattlefieldTriggeredAbility(new DanceOfManyExileTokenEffect(), false); - ability2.addEffect(new InfoEffect("When the token leaves the battlfield, sacrifice {this}")); + ability2.addEffect(new InfoEffect("When the token leaves the battlefield, sacrifice {this}")); this.addAbility(ability2); // At the beginning of your upkeep, sacrifice Dance of Many unless you pay {U}{U}. diff --git a/Mage.Sets/src/mage/sets/thedark/Drowned.java b/Mage.Sets/src/mage/sets/thedark/Drowned.java new file mode 100644 index 00000000000..ad60e1e8770 --- /dev/null +++ b/Mage.Sets/src/mage/sets/thedark/Drowned.java @@ -0,0 +1,65 @@ +/* + * 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.thedark; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.RegenerateSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class Drowned extends CardImpl { + + public Drowned(UUID ownerId) { + super(ownerId, 23, "Drowned", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "DRK"; + this.subtype.add("Zombie"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {B}: Regenerate Drowned. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{B}"))); + } + + public Drowned(final Drowned card) { + super(card); + } + + @Override + public Drowned copy() { + return new Drowned(this); + } +} diff --git a/Mage.Sets/src/mage/sets/thedark/Flood.java b/Mage.Sets/src/mage/sets/thedark/Flood.java new file mode 100644 index 00000000000..c1b651ec76c --- /dev/null +++ b/Mage.Sets/src/mage/sets/thedark/Flood.java @@ -0,0 +1,54 @@ +/* + * 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.thedark; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class Flood extends mage.sets.fourthedition.Flood { + + public Flood(UUID ownerId) { + super(ownerId); + this.cardNumber = 26; + this.expansionSetCode = "DRK"; + this.rarity = Rarity.UNCOMMON; + } + + public Flood(final Flood card) { + super(card); + } + + @Override + public Flood copy() { + return new Flood(this); + } +} diff --git a/Mage.Sets/src/mage/sets/thedark/GoblinWizard.java b/Mage.Sets/src/mage/sets/thedark/GoblinWizard.java new file mode 100644 index 00000000000..32f51bfeabd --- /dev/null +++ b/Mage.Sets/src/mage/sets/thedark/GoblinWizard.java @@ -0,0 +1,102 @@ +/* + * 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.thedark; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.PutPermanentOnBattlefieldEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterPermanentCard; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.Target; +import mage.target.TargetPermanent; + +/** + * + * @author BursegSardaukar + */ +public class GoblinWizard extends CardImpl { + + private static final FilterPermanentCard filter = new FilterPermanentCard("Goblin"); + private static final FilterCard protectionFilter = new FilterCard("white"); + private static final FilterPermanent goblinPermanent = new FilterPermanent("Goblin"); + + static { + filter.add(new SubtypePredicate("Goblin")); + goblinPermanent.add(new SubtypePredicate("Goblin")); + protectionFilter.add(new ColorPredicate(ObjectColor.WHITE)); + } + + public GoblinWizard(UUID ownerId) { + super(ownerId, 68, "Goblin Wizard", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + this.expansionSetCode = "DRK"; + this.rarity = Rarity.RARE; + + this.subtype.add("Goblin"); + this.subtype.add("Wizard"); + + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}: You may put a Goblin permanent card from your hand onto the battlefield. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, + new PutPermanentOnBattlefieldEffect(filter), + new TapSourceCost())); + + // {R}: Target Goblin gains protection from white until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new GainAbilityTargetEffect(new ProtectionAbility(protectionFilter), Duration.EndOfTurn), new ManaCostsImpl("{R}")); + Target target = new TargetPermanent(goblinPermanent); + ability.addTarget(target); + this.addAbility(ability); + + } + + public GoblinWizard(final GoblinWizard card) { + super(card); + } + + @Override + public GoblinWizard copy() { + return new GoblinWizard(this); + } +} diff --git a/Mage.Sets/src/mage/sets/thedark/Riptide.java b/Mage.Sets/src/mage/sets/thedark/Riptide.java new file mode 100644 index 00000000000..e2fd424ed0f --- /dev/null +++ b/Mage.Sets/src/mage/sets/thedark/Riptide.java @@ -0,0 +1,67 @@ +/* + * 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.thedark; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.effects.common.TapAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author LoneFox + */ +public class Riptide extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("blue creatures"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLUE)); + } + + public Riptide(UUID ownerId) { + super(ownerId, 34, "Riptide", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}"); + this.expansionSetCode = "DRK"; + + // Tap all blue creatures. + this.getSpellAbility().addEffect(new TapAllEffect(filter)); + } + + public Riptide(final Riptide card) { + super(card); + } + + @Override + public Riptide copy() { + return new Riptide(this); + } +} diff --git a/Mage.Sets/src/mage/sets/thedark/SunkenCity.java b/Mage.Sets/src/mage/sets/thedark/SunkenCity.java new file mode 100644 index 00000000000..52d66ec2239 --- /dev/null +++ b/Mage.Sets/src/mage/sets/thedark/SunkenCity.java @@ -0,0 +1,54 @@ +/* + * 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.thedark; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class SunkenCity extends mage.sets.mastersedition.SunkenCity { + + public SunkenCity(UUID ownerId) { + super(ownerId); + this.cardNumber = 35; + this.expansionSetCode = "DRK"; + this.rarity = Rarity.COMMON; + } + + public SunkenCity(final SunkenCity card) { + super(card); + } + + @Override + public SunkenCity copy() { + return new SunkenCity(this); + } +} diff --git a/Mage.Sets/src/mage/sets/theros/AkroanHorse.java b/Mage.Sets/src/mage/sets/theros/AkroanHorse.java index 014fb58c23a..702daa268df 100644 --- a/Mage.Sets/src/mage/sets/theros/AkroanHorse.java +++ b/Mage.Sets/src/mage/sets/theros/AkroanHorse.java @@ -49,6 +49,7 @@ import mage.constants.TargetController; import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; +import mage.game.permanent.token.SoldierToken; import mage.game.permanent.token.Token; import mage.players.Player; import mage.target.Target; @@ -175,23 +176,9 @@ class AkroanHorseCreateTokenEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { for (UUID opponentId: game.getOpponents(source.getControllerId())) { - Token token = new AkroanHorseSoldierToken(); + Token token = new SoldierToken(); token.putOntoBattlefield(1, game, source.getSourceId(), opponentId); } return true; } } - -class AkroanHorseSoldierToken extends Token { - - public AkroanHorseSoldierToken() { - super("Soldier", "1/1 white Soldier creature token"); - cardType.add(CardType.CREATURE); - color.setWhite(true); - - subtype.add("Soldier"); - power = new MageInt(1); - toughness = new MageInt(1); - } - -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/theros/EvangelOfHeliod.java b/Mage.Sets/src/mage/sets/theros/EvangelOfHeliod.java index 21614846b7b..81b53460c64 100644 --- a/Mage.Sets/src/mage/sets/theros/EvangelOfHeliod.java +++ b/Mage.Sets/src/mage/sets/theros/EvangelOfHeliod.java @@ -37,7 +37,7 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.ColoredManaSymbol; import mage.constants.Rarity; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.SoldierToken; /** * @@ -55,7 +55,7 @@ public class EvangelOfHeliod extends CardImpl { this.toughness = new MageInt(3); // When Evangel of Heliod enters the battlefield, put a number of 1/1 white Soldier creature tokens onto the battlefield equal to your devotion to white. - this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new EvangelOfHeliodSoldierToken(), new DevotionCount(ColoredManaSymbol.W)))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new SoldierToken(), new DevotionCount(ColoredManaSymbol.W)))); } public EvangelOfHeliod(final EvangelOfHeliod card) { @@ -67,17 +67,3 @@ public class EvangelOfHeliod extends CardImpl { return new EvangelOfHeliod(this); } } - -class EvangelOfHeliodSoldierToken extends Token { - - public EvangelOfHeliodSoldierToken() { - super("Soldier", "1/1 white Soldier creature tokens"); - cardType.add(CardType.CREATURE); - color.setWhite(true); - - subtype.add("Soldier"); - power = new MageInt(1); - toughness = new MageInt(1); - } - -} diff --git a/Mage.Sets/src/mage/sets/theros/MistcutterHydra.java b/Mage.Sets/src/mage/sets/theros/MistcutterHydra.java index 7fa563f6761..8ccd965236b 100644 --- a/Mage.Sets/src/mage/sets/theros/MistcutterHydra.java +++ b/Mage.Sets/src/mage/sets/theros/MistcutterHydra.java @@ -30,23 +30,17 @@ package mage.sets.theros; import java.util.UUID; import mage.MageInt; import mage.ObjectColor; -import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.common.CantBeCounteredAbility; import mage.abilities.common.EntersBattlefieldAbility; -import mage.abilities.effects.EntersBattlefieldEffect; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; import mage.counters.CounterType; import mage.filter.FilterObject; import mage.filter.predicate.mageobject.ColorPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; /** * @@ -75,7 +69,7 @@ public class MistcutterHydra extends CardImpl { // protection from blue this.addAbility(new ProtectionAbility(filter)); // Mistcutter Hydra enters the battlefield with X +1/+1 counters on it. - this.addAbility(new EntersBattlefieldAbility(new MistcutterHydraEffect())); + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance()))); } public MistcutterHydra(final MistcutterHydra card) { @@ -87,37 +81,3 @@ public class MistcutterHydra extends CardImpl { return new MistcutterHydra(this); } } - -class MistcutterHydraEffect extends OneShotEffect { - - public MistcutterHydraEffect() { - super(Outcome.BoostCreature); - staticText = "{this} enters the battlefield with X +1/+1 counters on it"; - } - - public MistcutterHydraEffect(final MistcutterHydraEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (spellAbility != null - && spellAbility.getSourceId().equals(source.getSourceId()) - && permanent.getZoneChangeCounter(game) - 1 == spellAbility.getSourceObjectZoneChangeCounter()) { - int amount = spellAbility.getManaCostsToPay().getX(); - if (amount > 0) { - permanent.addCounters(CounterType.P1P1.createInstance(amount), game); - } - } - } - return true; - } - - @Override - public MistcutterHydraEffect copy() { - return new MistcutterHydraEffect(this); - } -} diff --git a/Mage.Sets/src/mage/sets/timeshifted/FacelessButcher.java b/Mage.Sets/src/mage/sets/timeshifted/FacelessButcher.java index 3fc17bbe5a5..9ff88812945 100644 --- a/Mage.Sets/src/mage/sets/timeshifted/FacelessButcher.java +++ b/Mage.Sets/src/mage/sets/timeshifted/FacelessButcher.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.LeavesBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.ExileTargetForSourceEffect; import mage.abilities.effects.common.ReturnFromExileForSourceEffect; import mage.cards.CardImpl; @@ -56,8 +57,8 @@ public class FacelessButcher extends CardImpl { static { filter.add(new AnotherPredicate()); } - - + + public FacelessButcher(UUID ownerId) { super(ownerId, 43, "Faceless Butcher", Rarity.SPECIAL, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); this.expansionSetCode = "TSB"; @@ -65,10 +66,12 @@ public class FacelessButcher extends CardImpl { this.subtype.add("Horror"); this.power = new MageInt(2); this.toughness = new MageInt(3); - + // When Faceless Butcher enters the battlefield, exile target creature other than Faceless Butcher. - Ability ability1 = new EntersBattlefieldTriggeredAbility(new ExileTargetForSourceEffect(), false); + Effect effect = new ExileTargetForSourceEffect(); + effect.setText("exile target creature other than {this}"); + Ability ability1 = new EntersBattlefieldTriggeredAbility(effect, false); Target target = new TargetPermanent(filter); ability1.addTarget(target); this.addAbility(ability1); @@ -76,7 +79,7 @@ public class FacelessButcher extends CardImpl { // When Faceless Butcher leaves the battlefield, return the exiled card to the battlefield under its owner's control. Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false); this.addAbility(ability2); - + } public FacelessButcher(final FacelessButcher card) { diff --git a/Mage.Sets/src/mage/sets/timeshifted/MysticEnforcer.java b/Mage.Sets/src/mage/sets/timeshifted/MysticEnforcer.java index ed25bec6c7b..2c9a23cb576 100644 --- a/Mage.Sets/src/mage/sets/timeshifted/MysticEnforcer.java +++ b/Mage.Sets/src/mage/sets/timeshifted/MysticEnforcer.java @@ -34,7 +34,10 @@ import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.CardsInControllerGraveCondition; import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.constants.CardType; @@ -72,10 +75,13 @@ public class MysticEnforcer extends CardImpl { Ability thresholdAbility = new SimpleStaticAbility( Zone.BATTLEFIELD, new ConditionalContinuousEffect( - new BoostSourceEffect(3, 3, Duration.WhileOnBattlefield), - new CardsInControllerGraveCondition(7), - "Threshold - {this} gets +3/+3 as long as seven or more cards are in your graveyard" + new BoostSourceEffect(3, 3, Duration.WhileOnBattlefield), + new CardsInControllerGraveCondition(7), + "Threshold - {this} gets +3/+3 as long as seven or more cards are in your graveyard" )); + Effect effect = new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield); + effect.setText("and has flying"); + thresholdAbility.addEffect(effect); this.addAbility(thresholdAbility); } diff --git a/Mage.Sets/src/mage/sets/timespiral/FacelessDevourer.java b/Mage.Sets/src/mage/sets/timespiral/FacelessDevourer.java new file mode 100644 index 00000000000..10a7130adcd --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/FacelessDevourer.java @@ -0,0 +1,92 @@ +/* + * 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.timespiral; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.LeavesBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.ExileTargetForSourceEffect; +import mage.abilities.effects.common.ReturnFromExileForSourceEffect; +import mage.abilities.keyword.ShadowAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.target.Target; +import mage.target.TargetPermanent; + +/** + * + * @author LoneFox + */ +public class FacelessDevourer extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); + + static { + filter.add(new AnotherPredicate()); + filter.add(new AbilityPredicate(ShadowAbility.class)); + } + + public FacelessDevourer(UUID ownerId) { + super(ownerId, 108, "Faceless Devourer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Nightmare"); + this.subtype.add("Horror"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Shadow + this.addAbility(ShadowAbility.getInstance()); + // When Faceless Devourer enters the battlefield, exile another target creature with shadow. + Effect effect = new ExileTargetForSourceEffect(); + effect.setText("exile another target creature with shadow"); + Ability ability = new EntersBattlefieldTriggeredAbility(effect, false); + Target target = new TargetPermanent(filter); + ability.addTarget(target); + this.addAbility(ability); + // When Faceless Devourer leaves the battlefield, return the exiled card to the battlefield under its owner's control. + ability = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false); + this.addAbility(ability); + } + + public FacelessDevourer(final FacelessDevourer card) { + super(card); + } + + @Override + public FacelessDevourer copy() { + return new FacelessDevourer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/LimDulTheNecromancer.java b/Mage.Sets/src/mage/sets/timespiral/LimDulTheNecromancer.java index 4e1f91ddda7..daf9621e884 100644 --- a/Mage.Sets/src/mage/sets/timespiral/LimDulTheNecromancer.java +++ b/Mage.Sets/src/mage/sets/timespiral/LimDulTheNecromancer.java @@ -34,19 +34,16 @@ import mage.abilities.common.DiesCreatureTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.ContinuousEffect; -import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DoIfCostPaid; import mage.abilities.effects.common.RegenerateTargetEffect; +import mage.abilities.effects.common.continuous.AddCardSubTypeTargetEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; -import mage.constants.Layer; -import static mage.constants.Layer.TypeChangingEffects_4; import mage.constants.Outcome; import mage.constants.Rarity; -import mage.constants.SubLayer; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.FilterPermanent; @@ -63,15 +60,15 @@ import mage.target.targetpointer.FixedTarget; * @author jeffwadsworth */ public class LimDulTheNecromancer extends CardImpl { - + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); private static final FilterPermanent filter2 = new FilterPermanent("Zombie"); - + static { filter.add(new ControllerPredicate(TargetController.OPPONENT)); filter2.add(new SubtypePredicate("Zombie")); } - + public LimDulTheNecromancer(UUID ownerId) { super(ownerId, 114, "Lim-Dul the Necromancer", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{B}{B}"); this.expansionSetCode = "TSP"; @@ -88,13 +85,13 @@ public class LimDulTheNecromancer extends CardImpl { Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateTargetEffect(), new ManaCostsImpl("{1}{B}")); ability2.addTarget(new TargetPermanent(filter2)); this.addAbility(ability2); - + } - + public LimDulTheNecromancer(final LimDulTheNecromancer card) { super(card); } - + @Override public LimDulTheNecromancer copy() { return new LimDulTheNecromancer(this); @@ -102,29 +99,30 @@ public class LimDulTheNecromancer extends CardImpl { } class LimDulTheNecromancerEffect extends OneShotEffect { - + public LimDulTheNecromancerEffect() { super(Outcome.PutCreatureInPlay); - staticText = " return that card to the battlefield under your control. If it's a creature, it's a Zombie in addition to its other creature types"; + staticText = "return that card to the battlefield under your control. If it's a creature, it's a Zombie in addition to its other creature types"; } - + public LimDulTheNecromancerEffect(final LimDulTheNecromancerEffect effect) { super(effect); } - + @Override public LimDulTheNecromancerEffect copy() { return new LimDulTheNecromancerEffect(this); } - + @Override public boolean apply(Game game, Ability source) { Card card = game.getCard(targetPointer.getFirst(game, source)); if (card != null) { Zone currentZone = game.getState().getZone(card.getId()); - if (card.putOntoBattlefield(game, currentZone, source.getSourceId(), source.getControllerId())) { + if (card.putOntoBattlefield(game, currentZone, source.getSourceId(), source.getControllerId()) + && card.getCardType().contains(CardType.CREATURE)) { Permanent creature = game.getPermanent(card.getId()); - ContinuousEffect effect = new LimDulTheNecromancerContiniousEffect(); + ContinuousEffect effect = new AddCardSubTypeTargetEffect("Zombie", Duration.WhileOnBattlefield); effect.setTargetPointer(new FixedTarget(creature.getId())); game.addEffect(effect, source); return true; @@ -132,52 +130,4 @@ class LimDulTheNecromancerEffect extends OneShotEffect { } return false; } - -} - -class LimDulTheNecromancerContiniousEffect extends ContinuousEffectImpl { - - public LimDulTheNecromancerContiniousEffect() { - super(Duration.Custom, Outcome.Neutral); - staticText = "If it's a creature, it's a Zombie in addition to its other creature types"; - } - - public LimDulTheNecromancerContiniousEffect(final LimDulTheNecromancerContiniousEffect effect) { - super(effect); - } - - @Override - public LimDulTheNecromancerContiniousEffect copy() { - return new LimDulTheNecromancerContiniousEffect(this); - } - - @Override - public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { - Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source)); - if (permanent != null - && permanent.getCardType().contains(CardType.CREATURE)) { - switch (layer) { - case TypeChangingEffects_4: - if (sublayer == SubLayer.NA) { - permanent.getSubtype().add("Zombie"); - } - break; - } - return true; - } else { - this.used = true; - } - return false; - } - - @Override - public boolean apply(Game game, Ability source) { - return false; - } - - @Override - public boolean hasLayer(Layer layer) { - return layer == Layer.TypeChangingEffects_4; - } - } diff --git a/Mage.Sets/src/mage/sets/timespiral/SarpadianEmpiresVolVii.java b/Mage.Sets/src/mage/sets/timespiral/SarpadianEmpiresVolVii.java index 406595d7c1e..8b3f154f19d 100644 --- a/Mage.Sets/src/mage/sets/timespiral/SarpadianEmpiresVolVii.java +++ b/Mage.Sets/src/mage/sets/timespiral/SarpadianEmpiresVolVii.java @@ -43,6 +43,7 @@ import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; import mage.game.Game; +import mage.game.permanent.token.CitizenToken; import mage.game.permanent.token.GoblinToken; import mage.game.permanent.token.SaprolingToken; import mage.game.permanent.token.Token; @@ -154,17 +155,6 @@ class CreateSelectedTokenEffect extends OneShotEffect { } } -class CitizenToken extends Token { - public CitizenToken() { - super("Citizen", "1/1 white Citizen creature token"); - cardType.add(CardType.CREATURE); - subtype.add("Citizen"); - color.setWhite(true); - power = new MageInt(1); - toughness = new MageInt(1); - } -} - class CamaridToken extends Token { public CamaridToken() { super("Camarid", "1/1 blue Camarid creature token"); diff --git a/Mage.Sets/src/mage/sets/timespiral/ScrybRanger.java b/Mage.Sets/src/mage/sets/timespiral/ScrybRanger.java index f4218fe4bd2..e3fe4173f65 100644 --- a/Mage.Sets/src/mage/sets/timespiral/ScrybRanger.java +++ b/Mage.Sets/src/mage/sets/timespiral/ScrybRanger.java @@ -32,7 +32,7 @@ import mage.MageInt; import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.common.UntapTargetEffect; import mage.abilities.keyword.FlashAbility; import mage.abilities.keyword.FlyingAbility; @@ -76,7 +76,7 @@ public class ScrybRanger extends CardImpl { // protection from blue this.addAbility(new ProtectionAbility(filter)); // Return a Forest you control to its owner's hand: Untap target creature. Activate this ability only once each turn. - Ability ability = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filterForest))); + Ability ability = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filterForest))); ability.addTarget(new TargetCreaturePermanent(1)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/timespiral/StrongholdOverseer.java b/Mage.Sets/src/mage/sets/timespiral/StrongholdOverseer.java new file mode 100644 index 00000000000..6127f98184d --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/StrongholdOverseer.java @@ -0,0 +1,89 @@ +/* + * 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.timespiral; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ShadowAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; + +/** + * + * @author LoneFox + */ +public class StrongholdOverseer extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with shadow"); + private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creatures without shadow"); + + static { + filter.add(new AbilityPredicate(ShadowAbility.class)); + filter2.add(Predicates.not(new AbilityPredicate(ShadowAbility.class))); + } + + public StrongholdOverseer(UUID ownerId) { + super(ownerId, 133, "Stronghold Overseer", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{B}{B}{B}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Demon"); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Shadow + this.addAbility(ShadowAbility.getInstance()); + // {B}{B}: Creatures with shadow get +1/+0 until end of turn and creatures without shadow get -1/-0 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 0, Duration.EndOfTurn, filter, false), new ManaCostsImpl("{B}{B}")); + Effect effect = new BoostAllEffect(-1, 0, Duration.EndOfTurn, filter2, false); + effect.setText("and creatures without shadow get -1/-0 until end of turn"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public StrongholdOverseer(final StrongholdOverseer card) { + super(card); + } + + @Override + public StrongholdOverseer copy() { + return new StrongholdOverseer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/TeferiMageOfZhalfir.java b/Mage.Sets/src/mage/sets/timespiral/TeferiMageOfZhalfir.java index 26395fa7c3a..8e58dc1c9bd 100644 --- a/Mage.Sets/src/mage/sets/timespiral/TeferiMageOfZhalfir.java +++ b/Mage.Sets/src/mage/sets/timespiral/TeferiMageOfZhalfir.java @@ -73,7 +73,6 @@ public class TeferiMageOfZhalfir extends CardImpl { // Each opponent can cast spells only any time he or she could cast a sorcery. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new TeferiMageOfZhalfirReplacementEffect())); - } public TeferiMageOfZhalfir(final TeferiMageOfZhalfir card) { @@ -107,31 +106,31 @@ class TeferiMageOfZhalfirAddFlashEffect extends ContinuousEffectImpl { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { // in graveyard - for (UUID cardId: controller.getGraveyard()) { + for (UUID cardId : controller.getGraveyard()) { Card card = game.getCard(cardId); if (card.getCardType().contains(CardType.CREATURE)) { game.getState().addOtherAbility(card, FlashAbility.getInstance()); } } // on Hand - for (UUID cardId: controller.getHand()) { + for (UUID cardId : controller.getHand()) { Card card = game.getCard(cardId); if (card.getCardType().contains(CardType.CREATURE)) { game.getState().addOtherAbility(card, FlashAbility.getInstance()); } } // in Exile - for (Card card: game.getState().getExile().getAllCards(game)) { + for (Card card : game.getState().getExile().getAllCards(game)) { if (card.getOwnerId().equals(controller.getId()) && card.getCardType().contains(CardType.CREATURE)) { game.getState().addOtherAbility(card, FlashAbility.getInstance()); } } // in Library (e.g. for Mystical Teachings) - for (Card card: controller.getLibrary().getCards(game)) { + for (Card card : controller.getLibrary().getCards(game)) { if (card.getOwnerId().equals(controller.getId()) && card.getCardType().contains(CardType.CREATURE)) { game.getState().addOtherAbility(card, FlashAbility.getInstance()); } - } + } // commander in command zone if (controller.getCommanderId() != null && game.getState().getZone(controller.getCommanderId()).equals(Zone.COMMAND)) { Card card = game.getCard(controller.getCommanderId()); @@ -160,7 +159,7 @@ class TeferiMageOfZhalfirReplacementEffect extends ContinuousRuleModifyingEffect public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { - return "You can cast spells only any time you could cast a sorcery (" + mageObject.getLogName() + ")."; + return "You can cast spells only any time you could cast a sorcery (" + mageObject.getIdName() + ")."; } return null; } @@ -170,7 +169,6 @@ class TeferiMageOfZhalfirReplacementEffect extends ContinuousRuleModifyingEffect return event.getType() == GameEvent.EventType.CAST_SPELL; } - @Override public boolean applies(GameEvent event, Ability source, Game game) { Player controller = game.getPlayer(source.getControllerId()); diff --git a/Mage.Sets/src/mage/sets/timespiral/Triskelavus.java b/Mage.Sets/src/mage/sets/timespiral/Triskelavus.java index 704c4c478d8..6a95558fbb8 100644 --- a/Mage.Sets/src/mage/sets/timespiral/Triskelavus.java +++ b/Mage.Sets/src/mage/sets/timespiral/Triskelavus.java @@ -34,6 +34,7 @@ import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.RemoveCountersSourceCost; import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; @@ -61,12 +62,14 @@ public class Triskelavus extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - + // Triskelavus enters the battlefield with three +1/+1 counters on it. this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)), "with three +1/+1 counters on it")); - + // {1}, Remove a +1/+1 counter from Triskelavus: Put a 1/1 colorless Triskelavite artifact creature token with flying onto the battlefield. It has "Sacrifice this creature: This creature deals 1 damage to target creature or player." - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new TriskelaviteToken()), new RemoveCountersSourceCost(CounterType.P1P1.createInstance()))); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new TriskelaviteToken()), new GenericManaCost(1)); + ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); + this.addAbility(ability); } public Triskelavus(final Triskelavus card) { @@ -93,7 +96,7 @@ class TriskelaviteToken extends Token { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new SacrificeSourceCost()); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); - + addAbility(FlyingAbility.getInstance()); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/urzaslegacy/LastDitchEffort.java b/Mage.Sets/src/mage/sets/urzaslegacy/LastDitchEffort.java new file mode 100644 index 00000000000..cba7cd00b53 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzaslegacy/LastDitchEffort.java @@ -0,0 +1,117 @@ +/* + * 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.urzaslegacy; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author BursegSardaukar + */ +public class LastDitchEffort extends CardImpl { + + public LastDitchEffort(UUID ownerId) { + super(ownerId, 83, "Last-Ditch Effort", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{R}"); + this.expansionSetCode = "ULG"; + + // Sacrifice any number of creatures. Last-Ditch Effort deals that much damage to target creature or player. + this.getSpellAbility().addEffect(new LastDitchEffortEffect()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + } + + public LastDitchEffort(final LastDitchEffort card) { + super(card); + } + + @Override + public LastDitchEffort copy() { + return new LastDitchEffort(this); + } +} + +class LastDitchEffortEffect extends OneShotEffect { + + LastDitchEffortEffect() { + super(Outcome.Damage); + this.staticText = "Sacrifice any number of creatures. {this} deals that much damage to target creature or player"; + } + + LastDitchEffortEffect(final LastDitchEffortEffect effect) { + super(effect); + } + + @Override + public LastDitchEffortEffect copy() { + return new LastDitchEffortEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + Target target = new TargetControlledCreaturePermanent(0, Integer.MAX_VALUE, new FilterControlledCreaturePermanent(), true); + player.chooseTarget(Outcome.Sacrifice, target, source, game); + int numSacrificed = 0; + for (UUID permanentId : target.getTargets()) { + Permanent permanent = game.getPermanent(permanentId); + if (permanent != null) { + if (permanent.sacrifice(source.getSourceId(), game)) { + numSacrificed++; + } + } + } + if (numSacrificed > 0) { + int damage = numSacrificed; + UUID uuid = this.getTargetPointer().getFirst(game, source); + Permanent permanent = game.getPermanent(uuid); + Player opponent = game.getPlayer(uuid); + if (permanent != null) { + permanent.damage(damage, source.getSourceId(), game, false, true); + } + if (opponent != null) { + opponent.damage(damage, source.getSourceId(), game, false, true); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/Crosswinds.java b/Mage.Sets/src/mage/sets/urzassaga/Crosswinds.java new file mode 100644 index 00000000000..73aaa540fba --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/Crosswinds.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.sets.urzassaga; + +import java.util.UUID; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; + +/** + * + * @author hanasu + */ +public class Crosswinds extends CardImpl { + + private static final FilterCreaturePermanent filter1 = new FilterCreaturePermanent("Creatures with flying"); + + static { + filter1.add(new AbilityPredicate(FlyingAbility.class)); + } + + public Crosswinds(UUID ownerId) { + super(ownerId, 246, "Crosswinds", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); + this.expansionSetCode = "USG"; + + // Creatures with flying get -2/-0. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(-2, 0, Duration.WhileOnBattlefield, filter1, false))); + } + + public Crosswinds(final Crosswinds card) { + super(card); + } + + @Override + public Crosswinds copy() { + return new Crosswinds(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/Despondency.java b/Mage.Sets/src/mage/sets/urzassaga/Despondency.java new file mode 100644 index 00000000000..603c895cee1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/Despondency.java @@ -0,0 +1,80 @@ +/* + * 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.urzassaga; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author hanasu + */ +public class Despondency extends CardImpl { + + public Despondency(UUID ownerId) { + super(ownerId, 129, "Despondency", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); + this.expansionSetCode = "USG"; + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature gets -2/-0. + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(-2, 0)); + this.addAbility(ability); + + // When Despondency is put into a graveyard from the battlefield, return Despondency to its owner's hand. + this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new ReturnToHandSourceEffect())); + } + + public Despondency(final Despondency card) { + super(card); + } + + @Override + public Despondency copy() { + return new Despondency(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/Fluctuator.java b/Mage.Sets/src/mage/sets/urzassaga/Fluctuator.java index 931c2d8a008..11c4d3241d6 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/Fluctuator.java +++ b/Mage.Sets/src/mage/sets/urzassaga/Fluctuator.java @@ -32,6 +32,7 @@ import java.util.Set; import java.util.UUID; import mage.Mana; import mage.abilities.Ability; +import mage.abilities.ActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.cost.CostModificationEffectImpl; import mage.abilities.keyword.CyclingAbility; @@ -73,7 +74,7 @@ public class Fluctuator extends CardImpl { } class FluctuatorEffect extends CostModificationEffectImpl { - + private static final String effectText = "Cycling abilities you activate cost you up to {2} less to activate"; public FluctuatorEffect() { @@ -87,37 +88,44 @@ class FluctuatorEffect extends CostModificationEffectImpl { @Override public boolean applies(Ability abilityToModify, Ability source, Game game) { - return abilityToModify.getControllerId().equals(source.getControllerId()) && - abilityToModify.getAbilityType().equals(AbilityType.ACTIVATED) && - (abilityToModify instanceof CyclingAbility); + return abilityToModify.getControllerId().equals(source.getControllerId()) + && (abilityToModify instanceof CyclingAbility); } - + @Override public boolean apply(Game game, Ability source, Ability abilityToModify) { Player controller = game.getPlayer(abilityToModify.getControllerId()); - if (controller != null){ + if (controller != null) { Mana mana = abilityToModify.getManaCostsToPay().getMana(); int reduceMax = mana.getColorless(); - if (reduceMax > 2){ + if (reduceMax > 2) { reduceMax = 2; } if (reduceMax > 0) { - ChoiceImpl choice = new ChoiceImpl(true); - Set set = new LinkedHashSet<>(); + int reduce = 0; + if (abilityToModify.getAbilityType().equals(AbilityType.ACTIVATED) + && ((ActivatedAbility) abilityToModify).isCheckPlayableMode()) { + reduce = reduceMax; + } else { + ChoiceImpl choice = new ChoiceImpl(true); + Set set = new LinkedHashSet<>(); - for(int i = 0; i <= reduceMax; i++){ - set.add(String.valueOf(i)); - } - choice.setChoices(set); - choice.setMessage("Reduce cycling cost"); - if(controller.choose(Outcome.Benefit, choice, game)){ - int reduce = Integer.parseInt(choice.getChoice()); - CardUtil.reduceCost(abilityToModify, reduce); + for (int i = 0; i <= reduceMax; i++) { + set.add(String.valueOf(i)); + } + choice.setChoices(set); + choice.setMessage("Reduce cycling cost"); + + if (controller.choose(Outcome.Benefit, choice, game)) { + reduce = Integer.parseInt(choice.getChoice()); + + } } + CardUtil.reduceCost(abilityToModify, reduce); } return true; } - return false; + return false; } @Override diff --git a/Mage.Sets/src/mage/sets/urzassaga/Fortitude.java b/Mage.Sets/src/mage/sets/urzassaga/Fortitude.java new file mode 100644 index 00000000000..34e1c426be3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/Fortitude.java @@ -0,0 +1,90 @@ +/* + * 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.urzassaga; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.RegenerateAttachedEffect; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.TargetPermanent; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author hanasu + */ +public class Fortitude extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Forest"); + + static { + filter.add(new SubtypePredicate("Forest")); + } + + public Fortitude(UUID ownerId) { + super(ownerId, 253, "Fortitude", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); + this.expansionSetCode = "USG"; + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Sacrifice a Forest: Regenerate enchanted creature. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateAttachedEffect(AttachmentType.AURA), new SacrificeTargetCost(new TargetControlledPermanent(filter)))); + + // When Fortitude is put into a graveyard from the battlefield, return Fortitude to its owner's hand. + this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new ReturnToHandSourceEffect())); + } + + public Fortitude(final Fortitude card) { + super(card); + } + + @Override + public Fortitude copy() { + return new Fortitude(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/GaeasBounty.java b/Mage.Sets/src/mage/sets/urzassaga/GaeasBounty.java new file mode 100644 index 00000000000..a97e7cc9aa8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/GaeasBounty.java @@ -0,0 +1,67 @@ +/* + * 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.urzassaga; + +import java.util.UUID; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterLandCard; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author hanasu + */ +public class GaeasBounty extends CardImpl { + + private static final FilterLandCard filter = new FilterLandCard("Forest"); + + static { + filter.add(new SubtypePredicate("Forest")); + } + + public GaeasBounty(UUID ownerId) { + super(ownerId, 254, "Gaea's Bounty", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{G}"); + this.expansionSetCode = "USG"; + + // Search your library for up to two Forest cards, reveal those cards, and put them into your hand. Then shuffle your library. + this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 2, filter), false)); + } + + public GaeasBounty(final GaeasBounty card) { + super(card); + } + + @Override + public GaeasBounty copy() { + return new GaeasBounty(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/GoblinOffensive.java b/Mage.Sets/src/mage/sets/urzassaga/GoblinOffensive.java index 4d11aa29eec..a9937de242e 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/GoblinOffensive.java +++ b/Mage.Sets/src/mage/sets/urzassaga/GoblinOffensive.java @@ -28,13 +28,12 @@ package mage.sets.urzassaga; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.MageInt; import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; -import mage.game.permanent.token.Token; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.game.permanent.token.GoblinToken; /** * @@ -46,7 +45,6 @@ public class GoblinOffensive extends CardImpl { super(ownerId, 192, "Goblin Offensive", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{X}{1}{R}{R}"); this.expansionSetCode = "USG"; - // Put X 1/1 red Goblin creature tokens onto the battlefield. this.getSpellAbility().addEffect(new CreateTokenEffect(new GoblinToken(), new ManacostVariableValue())); } @@ -60,14 +58,3 @@ public class GoblinOffensive extends CardImpl { return new GoblinOffensive(this); } } - -class GoblinToken extends Token { - public GoblinToken() { - super("Goblin", "1/1 red Goblin creature token"); - cardType.add(CardType.CREATURE); - color.setRed(true); - subtype.add("Goblin"); - power = new MageInt(1); - toughness = new MageInt(1); - } -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/urzassaga/GreatWhale.java b/Mage.Sets/src/mage/sets/urzassaga/GreatWhale.java new file mode 100644 index 00000000000..e8b5b9f6c5f --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/GreatWhale.java @@ -0,0 +1,63 @@ +/* + * 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.urzassaga; + +import java.util.UUID; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.UntapLandsEffect; +import mage.cards.CardImpl; + +/** + * + * @author LoneFox + */ +public class GreatWhale extends CardImpl { + + public GreatWhale(UUID ownerId) { + super(ownerId, 77, "Great Whale", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{U}{U}"); + this.expansionSetCode = "USG"; + this.subtype.add("Whale"); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // When Great Whale enters the battlefield, untap up to seven lands. + this.addAbility(new EntersBattlefieldTriggeredAbility(new UntapLandsEffect(7))); + } + + public GreatWhale(final GreatWhale card) { + super(card); + } + + @Override + public GreatWhale copy() { + return new GreatWhale(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/HermeticStudy.java b/Mage.Sets/src/mage/sets/urzassaga/HermeticStudy.java new file mode 100644 index 00000000000..d04371b3e0c --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/HermeticStudy.java @@ -0,0 +1,81 @@ +/* + * 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.urzassaga; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetCreaturePermanent; +/** + * + * @author LoneFox + */ +public class HermeticStudy extends CardImpl { + + public HermeticStudy(UUID ownerId) { + super(ownerId, 78, "Hermetic Study", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); + this.expansionSetCode = "USG"; + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + // Enchanted creature has "{tap}: This creature deals 1 damage to target creature or player." + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability, AttachmentType.AURA, Duration.WhileOnBattlefield, + "Enchanted creature has \"{T}: This creature deals 1 damage to target creature or player.\""))); + } + + public HermeticStudy(final HermeticStudy card) { + super(card); + } + + @Override + public HermeticStudy copy() { + return new HermeticStudy(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/MidsummerRevel.java b/Mage.Sets/src/mage/sets/urzassaga/MidsummerRevel.java new file mode 100644 index 00000000000..4197bea2266 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/MidsummerRevel.java @@ -0,0 +1,75 @@ +/* + * 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.urzassaga; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.CountersCount; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.permanent.token.BeastToken; + +/** + * + * @author LoneFox + */ +public class MidsummerRevel extends CardImpl { + + public MidsummerRevel(UUID ownerId) { + super(ownerId, 268, "Midsummer Revel", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}{G}"); + this.expansionSetCode = "USG"; + + // At the beginning of your upkeep, you may put a verse counter on Midsummer Revel. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, + new AddCountersSourceEffect(CounterType.VERSE.createInstance(), true), TargetController.YOU, true)); + // {G}, Sacrifice Midsummer Revel: Put X 3/3 green Beast creature tokens onto the battlefield, where X is the number of verse counters on Midsummer Revel. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new BeastToken(), + new CountersCount(CounterType.VERSE)), new ManaCostsImpl("{G}")); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public MidsummerRevel(final MidsummerRevel card) { + super(card); + } + + @Override + public MidsummerRevel copy() { + return new MidsummerRevel(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/MonkIdealist.java b/Mage.Sets/src/mage/sets/urzassaga/MonkIdealist.java new file mode 100644 index 00000000000..8e24a1ac389 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/MonkIdealist.java @@ -0,0 +1,77 @@ +/* + * 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.urzassaga; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author hanasu + */ +public class MonkIdealist extends CardImpl { + + private static final FilterCard filter = new FilterCard("enchantment card from your graveyard"); + + static { + filter.add(new CardTypePredicate(CardType.ENCHANTMENT)); + } + + public MonkIdealist(UUID ownerId) { + super(ownerId, 20, "Monk Idealist", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "USG"; + this.subtype.add("Human"); + this.subtype.add("Monk"); + this.subtype.add("Cleric"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Monk Idealist enters the battlefield, return target enchantment card from your graveyard to your hand. + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true); + ability.addTarget(new TargetCardInYourGraveyard(filter)); + this.addAbility(ability); + } + + public MonkIdealist(final MonkIdealist card) { + super(card); + } + + @Override + public MonkIdealist copy() { + return new MonkIdealist(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/SkitteringSkirge.java b/Mage.Sets/src/mage/sets/urzassaga/SkitteringSkirge.java new file mode 100644 index 00000000000..be3d7a99302 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/SkitteringSkirge.java @@ -0,0 +1,75 @@ +/* + * 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.urzassaga; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.CardTypePredicate; + +/** + * + * @author hanasu + */ +public class SkitteringSkirge extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("a creature spell"); + + static { + filter.add(new CardTypePredicate(CardType.CREATURE)); + } + + public SkitteringSkirge(UUID ownerId) { + super(ownerId, 158, "Skittering Skirge", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{B}{B}"); + this.expansionSetCode = "USG"; + this.subtype.add("Imp"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When you cast a creature spell, sacrifice Skittering Skirge. + this.addAbility(new SpellCastControllerTriggeredAbility(new SacrificeSourceEffect(), filter, true)); + } + + public SkitteringSkirge(final SkitteringSkirge card) { + super(card); + } + + @Override + public SkitteringSkirge copy() { + return new SkitteringSkirge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/TorchSong.java b/Mage.Sets/src/mage/sets/urzassaga/TorchSong.java new file mode 100644 index 00000000000..edd10ecd569 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/TorchSong.java @@ -0,0 +1,75 @@ +/* + * 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.urzassaga; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.CountersCount; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LoneFox + */ +public class TorchSong extends CardImpl { + + public TorchSong(UUID ownerId) { + super(ownerId, 222, "Torch Song", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); + this.expansionSetCode = "USG"; + + // At the beginning of your upkeep, you may put a verse counter on Torch Song. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, + new AddCountersSourceEffect(CounterType.VERSE.createInstance(), true), TargetController.YOU, true)); + // {2}{R}, Sacrifice Torch Song: Torch Song deals X damage to target creature or player, where X is the number of verse counters on Torch Song. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new CountersCount(CounterType.VERSE)), new ManaCostsImpl("{2}{R}")); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public TorchSong(final TorchSong card) { + super(card); + } + + @Override + public TorchSong copy() { + return new TorchSong(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/ViashinoWeaponsmith.java b/Mage.Sets/src/mage/sets/urzassaga/ViashinoWeaponsmith.java new file mode 100644 index 00000000000..fef2a24dfe9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/ViashinoWeaponsmith.java @@ -0,0 +1,64 @@ +/* + * 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.urzassaga; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BecomesBlockedByCreatureTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author hanasu + */ +public class ViashinoWeaponsmith extends CardImpl { + + public ViashinoWeaponsmith(UUID ownerId) { + super(ownerId, 226, "Viashino Weaponsmith", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.expansionSetCode = "USG"; + this.subtype.add("Viashino"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever Viashino Weaponsmith becomes blocked by a creature, Viashino Weaponsmith gets +2/+2 until end of turn. + this.addAbility(new BecomesBlockedByCreatureTriggeredAbility(new BoostSourceEffect(2, 2, Duration.EndOfTurn), false)); + } + + public ViashinoWeaponsmith(final ViashinoWeaponsmith card) { + super(card); + } + + @Override + public ViashinoWeaponsmith copy() { + return new ViashinoWeaponsmith(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/VileRequiem.java b/Mage.Sets/src/mage/sets/urzassaga/VileRequiem.java index 0bb7130dc62..e41d1ff8d95 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/VileRequiem.java +++ b/Mage.Sets/src/mage/sets/urzassaga/VileRequiem.java @@ -71,11 +71,11 @@ public class VileRequiem extends CardImpl { // At the beginning of your upkeep, you may put a verse counter on Vile Requiem. this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, - new AddCountersSourceEffect(CounterType.VILE.createInstance(), true ), TargetController.YOU, true)); + new AddCountersSourceEffect(CounterType.VERSE.createInstance(), true ), TargetController.YOU, true)); // {1}{B}, Sacrifice Vile Requiem: Destroy up to X target nonblack creatures, where X is the number of verse counters on Vile Requiem. They can't be regenerated. Effect effect = new DestroyTargetEffect(true); effect.setText("Destroy up to X target nonblack creatures, where X is the number of verse counters on {this}. They can't be regenerated"); - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{1}{B}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{1}{B}")); ability.addCost(new SacrificeSourceCost()); ability.addTarget(new TargetCreaturePermanent(0,0,filter, false)); this.addAbility(ability); @@ -88,7 +88,7 @@ public class VileRequiem extends CardImpl { if (ability.getOriginalId().equals(originalId)) { Permanent sourcePermanent = game.getPermanent(ability.getSourceId()); if (sourcePermanent != null) { - int numberCounters = sourcePermanent.getCounters().getCount(CounterType.VILE); + int numberCounters = sourcePermanent.getCounters().getCount(CounterType.VERSE); ability.getTargets().clear(); FilterCreaturePermanent newFilter = filter.copy(); newFilter.setMessage(new StringBuilder("up to ").append(CardUtil.numberToText(numberCounters)).append(" target nonblack creatures").toString()); diff --git a/Mage.Sets/src/mage/sets/vintagemasters/JungleWurm.java b/Mage.Sets/src/mage/sets/vintagemasters/JungleWurm.java new file mode 100644 index 00000000000..85d9d57a05e --- /dev/null +++ b/Mage.Sets/src/mage/sets/vintagemasters/JungleWurm.java @@ -0,0 +1,52 @@ +/* + * 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.vintagemasters; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class JungleWurm extends mage.sets.mirage.JungleWurm { + + public JungleWurm(UUID ownerId) { + super(ownerId); + this.cardNumber = 217; + this.expansionSetCode = "VMA"; + } + + public JungleWurm(final JungleWurm card) { + super(card); + } + + @Override + public JungleWurm copy() { + return new JungleWurm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/vintagemasters/MishrasWorkshop.java b/Mage.Sets/src/mage/sets/vintagemasters/MishrasWorkshop.java index afac89175d6..f81f43f940b 100644 --- a/Mage.Sets/src/mage/sets/vintagemasters/MishrasWorkshop.java +++ b/Mage.Sets/src/mage/sets/vintagemasters/MishrasWorkshop.java @@ -28,14 +28,13 @@ package mage.sets.vintagemasters; import java.util.UUID; -import mage.ConditionalMana; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.mana.ConditionalColorlessManaAbility; -import mage.abilities.mana.builder.ConditionalManaBuilder; -import mage.abilities.mana.conditional.ArtifactCastConditionalMana; +import mage.abilities.mana.conditional.ConditionalSpellManaBuilder; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; +import mage.filter.common.FilterArtifactSpell; /** * @@ -48,7 +47,8 @@ public class MishrasWorkshop extends CardImpl { this.expansionSetCode = "VMA"; // {tap}: Add {3} to your mana pool. Spend this mana only to cast artifact spells. - this.addAbility(new ConditionalColorlessManaAbility(new TapSourceCost(), 3, new MishrasWorkshopManaBuilder())); + this.addAbility(new ConditionalColorlessManaAbility(new TapSourceCost(), 3, + new ConditionalSpellManaBuilder(new FilterArtifactSpell("artifact spells")))); } @@ -61,15 +61,3 @@ public class MishrasWorkshop extends CardImpl { return new MishrasWorkshop(this); } } - -class MishrasWorkshopManaBuilder extends ConditionalManaBuilder { - @Override - public ConditionalMana build(Object... options) { - return new ArtifactCastConditionalMana(this.mana); - } - - @Override - public String getRule() { - return "Spend this mana only to cast artifact spells"; - } -} diff --git a/Mage.Sets/src/mage/sets/vintagemasters/ThopterSquadron.java b/Mage.Sets/src/mage/sets/vintagemasters/ThopterSquadron.java index c5748f4dcc3..24ec01d3920 100644 --- a/Mage.Sets/src/mage/sets/vintagemasters/ThopterSquadron.java +++ b/Mage.Sets/src/mage/sets/vintagemasters/ThopterSquadron.java @@ -48,7 +48,7 @@ import mage.counters.CounterType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.AnotherPredicate; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.ThopterColorlessToken; import mage.target.common.TargetControlledPermanent; /** @@ -56,14 +56,14 @@ import mage.target.common.TargetControlledPermanent; * @author LevelX2 */ public class ThopterSquadron extends CardImpl { - + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another Thopter"); - + static { filter.add(new AnotherPredicate()); filter.add(new SubtypePredicate("Thopter")); } - + public ThopterSquadron(UUID ownerId) { super(ownerId, 286, "Thopter Squadron", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}"); this.expansionSetCode = "VMA"; @@ -75,16 +75,16 @@ public class ThopterSquadron extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Thopter Squadron enters the battlefield with three +1/+1 counters on it. this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)), "with three +1/+1 counters on it")); - + // {1}, Remove a +1/+1 counter from Thopter Squadron: Put a 1/1 colorless Thopter artifact creature token with flying onto the battlefield. Activate this ability only any time you could cast a sorcery. - Ability firstAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new ThopterSquadronThopterToken(), 1), new GenericManaCost(1)); + Ability firstAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new ThopterColorlessToken(), 1), new GenericManaCost(1)); firstAbility.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance(1))); this.addAbility(firstAbility); - + // {1}, Sacrifice another Thopter: Put a +1/+1 counter on Thopter Squadron. Activate this ability only any time you could cast a sorcery. Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(), true), new ManaCostsImpl("{1}")); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); - + } public ThopterSquadron(final ThopterSquadron card) { @@ -96,16 +96,3 @@ public class ThopterSquadron extends CardImpl { return new ThopterSquadron(this); } } - -class ThopterSquadronThopterToken extends Token { - public ThopterSquadronThopterToken() { - super("Thopter", "1/1 colorless Thopter artifact creature token with flying"); - cardType.add(CardType.ARTIFACT); - cardType.add(CardType.CREATURE); - subtype.add("Thopter"); - power = new MageInt(1); - toughness = new MageInt(1); - this.addAbility(FlyingAbility.getInstance()); - } - -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/visions/GossamerChains.java b/Mage.Sets/src/mage/sets/visions/GossamerChains.java new file mode 100644 index 00000000000..aa991ac8fd6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/GossamerChains.java @@ -0,0 +1,74 @@ +/* + * 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.visions; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.ReturnToHandSourceCost; +import mage.abilities.effects.common.PreventDamageByTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.UnblockedPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class GossamerChains extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("unblocked creature"); + + static { + filter.add(new UnblockedPredicate()); + } + + public GossamerChains(UUID ownerId) { + super(ownerId, 106, "Gossamer Chains", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{W}{W}"); + this.expansionSetCode = "VIS"; + + // Return Gossamer Chains to its owner's hand: Prevent all combat damage that would be dealt by target unblocked creature this turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageByTargetEffect(Duration.EndOfTurn, true), new ReturnToHandSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public GossamerChains(final GossamerChains card) { + super(card); + } + + @Override + public GossamerChains copy() { + return new GossamerChains(this); + } +} diff --git a/Mage.Sets/src/mage/sets/visions/KnightOfValor.java b/Mage.Sets/src/mage/sets/visions/KnightOfValor.java new file mode 100644 index 00000000000..1c12875167f --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/KnightOfValor.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.sets.visions; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.abilities.keyword.FlankingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.filter.predicate.permanent.BlockingAttackerIdPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class KnightOfValor extends CardImpl { + + public KnightOfValor(UUID ownerId) { + super(ownerId, 111, "Knight of Valor", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "VIS"; + this.subtype.add("Human"); + this.subtype.add("Knight"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flanking + this.addAbility(new FlankingAbility()); + // {1}{W}: Each creature without flanking blocking Knight of Valor gets -1/-1 until end of turn. Activate this ability only once each turn. + FilterCreaturePermanent filter = new FilterCreaturePermanent("each creature without flanking blocking {this}"); + filter.add(Predicates.not(new AbilityPredicate(FlankingAbility.class))); + filter.add(new BlockingAttackerIdPredicate(this.getId())); + this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new BoostAllEffect(-1, -1, Duration.EndOfTurn, filter, false), new ManaCostsImpl("{1}{W}"))); + } + + public KnightOfValor(final KnightOfValor card) { + super(card); + } + + @Override + public KnightOfValor copy() { + return new KnightOfValor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/visions/PhyrexianMarauder.java b/Mage.Sets/src/mage/sets/visions/PhyrexianMarauder.java index e06229d3abb..8e513985729 100644 --- a/Mage.Sets/src/mage/sets/visions/PhyrexianMarauder.java +++ b/Mage.Sets/src/mage/sets/visions/PhyrexianMarauder.java @@ -30,18 +30,15 @@ package mage.sets.visions; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.common.CantBlockAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.ManaCosts; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.EntersBattlefieldEffect; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.abilities.effects.common.combat.CantAttackBlockUnlessPaysSourceEffect; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; import mage.counters.CounterType; @@ -63,7 +60,7 @@ public class PhyrexianMarauder extends CardImpl { this.toughness = new MageInt(0); // Phyrexian Marauder enters the battlefield with X +1/+1 counters on it. - this.addAbility(new EntersBattlefieldAbility(new PhyrexianMarauderEntersEffect(), "with X +1/+1 counters on it")); + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance()))); // Phyrexian Marauder can't block. this.addAbility(new CantBlockAbility()); @@ -82,39 +79,6 @@ public class PhyrexianMarauder extends CardImpl { } } -class PhyrexianMarauderEntersEffect extends OneShotEffect { - - PhyrexianMarauderEntersEffect() { - super(Outcome.BoostCreature); - } - - PhyrexianMarauderEntersEffect(final PhyrexianMarauderEntersEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null && !permanent.isFaceDown(game)) { - SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (spellAbility != null - && spellAbility.getSourceId().equals(source.getSourceId()) - && permanent.getZoneChangeCounter(game) - 1 == spellAbility.getSourceObjectZoneChangeCounter()) { - int amount = spellAbility.getManaCostsToPay().getX(); - if (amount > 0) { - permanent.addCounters(CounterType.P1P1.createInstance(amount), game); - } - } - } - return true; - } - - @Override - public PhyrexianMarauderEntersEffect copy() { - return new PhyrexianMarauderEntersEffect(this); - } -} - class PhyrexianMarauderCantAttackUnlessYouPayEffect extends CantAttackBlockUnlessPaysSourceEffect { PhyrexianMarauderCantAttackUnlessYouPayEffect() { diff --git a/Mage.Sets/src/mage/sets/visions/QuirionRanger.java b/Mage.Sets/src/mage/sets/visions/QuirionRanger.java index bfba3fdce8c..1df79ddb4ce 100644 --- a/Mage.Sets/src/mage/sets/visions/QuirionRanger.java +++ b/Mage.Sets/src/mage/sets/visions/QuirionRanger.java @@ -34,7 +34,7 @@ import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.common.UntapTargetEffect; import mage.cards.CardImpl; import mage.filter.common.FilterControlledPermanent; @@ -63,7 +63,7 @@ public class QuirionRanger extends CardImpl { this.toughness = new MageInt(1); // Return a Forest you control to its owner's hand: Untap target creature. Activate this ability only once each turn. - Ability ability = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))); + Ability ability = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/visions/Solfatara.java b/Mage.Sets/src/mage/sets/visions/Solfatara.java index 293563acd92..53ec304a503 100644 --- a/Mage.Sets/src/mage/sets/visions/Solfatara.java +++ b/Mage.Sets/src/mage/sets/visions/Solfatara.java @@ -56,7 +56,7 @@ public class Solfatara extends CardImpl { // Target player can't play land cards this turn. this.getSpellAbility().addEffect(new SolfataraEffect()); this.getSpellAbility().addTarget(new TargetPlayer()); - + // Draw a card at the beginning of the next turn's upkeep. this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect( new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1), Duration.OneUse), false)); @@ -73,7 +73,7 @@ public class Solfatara extends CardImpl { } class SolfataraEffect extends ContinuousRuleModifyingEffectImpl { - + public SolfataraEffect() { super(Duration.EndOfTurn, Outcome.Detriment); staticText = "Target player can't play land cards this turn."; @@ -97,7 +97,7 @@ class SolfataraEffect extends ContinuousRuleModifyingEffectImpl { public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { - return "You can't play lands this turn (" + mageObject.getLogName() + ")."; + return "You can't play lands this turn (" + mageObject.getIdName() + ")."; } return null; } diff --git a/Mage.Sets/src/mage/sets/weatherlight/Abeyance.java b/Mage.Sets/src/mage/sets/weatherlight/Abeyance.java index fe3b4d4f6e4..4a48d8daa7a 100644 --- a/Mage.Sets/src/mage/sets/weatherlight/Abeyance.java +++ b/Mage.Sets/src/mage/sets/weatherlight/Abeyance.java @@ -55,7 +55,7 @@ public class Abeyance extends CardImpl { // Until end of turn, target player can't cast instant or sorcery spells, and that player can't activate abilities that aren't mana abilities. this.getSpellAbility().addEffect(new AbeyanceEffect()); this.getSpellAbility().addTarget(new TargetPlayer()); - + // Draw a card. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); } @@ -95,7 +95,7 @@ class AbeyanceEffect extends ContinuousRuleModifyingEffectImpl { public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { - return "You can't cast instant or sorcery spells or activate abilities that aren't mana abilities this turn (" + mageObject.getLogName() + ")."; + return "You can't cast instant or sorcery spells or activate abilities that aren't mana abilities this turn (" + mageObject.getIdName() + ")."; } return null; } diff --git a/Mage.Sets/src/mage/sets/weatherlight/AngelicRenewal.java b/Mage.Sets/src/mage/sets/weatherlight/AngelicRenewal.java new file mode 100644 index 00000000000..6b7ef11f4c1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/AngelicRenewal.java @@ -0,0 +1,64 @@ +/* + * 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.weatherlight; + +import java.util.UUID; +import mage.abilities.common.PutIntoGraveFromBattlefieldAllTriggeredAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class AngelicRenewal extends CardImpl { + + public AngelicRenewal(UUID ownerId) { + super(ownerId, 120, "Angelic Renewal", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); + this.expansionSetCode = "WTH"; + + // Whenever a creature is put into your graveyard from the battlefield, you may sacrifice Angelic Renewal. If you do, return that card to the battlefield. + this.addAbility(new PutIntoGraveFromBattlefieldAllTriggeredAbility(new DoIfCostPaid( + new ReturnToBattlefieldUnderOwnerControlTargetEffect(), new SacrificeSourceCost()), false, + new FilterCreaturePermanent("a creature"), true, true)); + } + + public AngelicRenewal(final AngelicRenewal card) { + super(card); + } + + @Override + public AngelicRenewal copy() { + return new AngelicRenewal(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/BenalishMissionary.java b/Mage.Sets/src/mage/sets/weatherlight/BenalishMissionary.java new file mode 100644 index 00000000000..2c5d65f0133 --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/BenalishMissionary.java @@ -0,0 +1,81 @@ +/* + * 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.weatherlight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.PreventDamageByTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.BlockedPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class BenalishMissionary extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("blocked creature"); + + static { + filter.add(new BlockedPredicate()); + } + + public BenalishMissionary(UUID ownerId) { + super(ownerId, 126, "Benalish Missionary", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}"); + this.expansionSetCode = "WTH"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {1}{W}, {tap}: Prevent all combat damage that would be dealt by target blocked creature this turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageByTargetEffect(Duration.EndOfTurn, true), new ManaCostsImpl("{1}{W}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public BenalishMissionary(final BenalishMissionary card) { + super(card); + } + + @Override + public BenalishMissionary copy() { + return new BenalishMissionary(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/BoilingBlood.java b/Mage.Sets/src/mage/sets/weatherlight/BoilingBlood.java new file mode 100644 index 00000000000..1a7482d074a --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/BoilingBlood.java @@ -0,0 +1,64 @@ +/* + * 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.weatherlight; + +import java.util.UUID; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.combat.AttacksIfAbleTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class BoilingBlood extends CardImpl { + + public BoilingBlood(UUID ownerId) { + super(ownerId, 92, "Boiling Blood", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{R}"); + this.expansionSetCode = "WTH"; + + // Target creature attacks this turn if able. + this.getSpellAbility().addEffect(new AttacksIfAbleTargetEffect(Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public BoilingBlood(final BoilingBlood card) { + super(card); + } + + @Override + public BoilingBlood copy() { + return new BoilingBlood(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/BriarShield.java b/Mage.Sets/src/mage/sets/weatherlight/BriarShield.java new file mode 100644 index 00000000000..4d85b60f09e --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/BriarShield.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.sets.weatherlight; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class BriarShield extends CardImpl { + + public BriarShield(UUID ownerId) { + super(ownerId, 63, "Briar Shield", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{G}"); + this.expansionSetCode = "WTH"; + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + // Enchanted creature gets +1/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1, Duration.WhileOnBattlefield))); + // Sacrifice Briar Shield: Enchanted creature gets +3/+3 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(3, 3, Duration.EndOfTurn), new SacrificeSourceCost())); + } + + public BriarShield(final BriarShield card) { + super(card); + } + + @Override + public BriarShield copy() { + return new BriarShield(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/BubbleMatrix.java b/Mage.Sets/src/mage/sets/weatherlight/BubbleMatrix.java new file mode 100644 index 00000000000..e9f0a587ff2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/BubbleMatrix.java @@ -0,0 +1,62 @@ +/* + * 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.weatherlight; + +import java.util.UUID; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.PreventAllDamageToAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class BubbleMatrix extends CardImpl { + + public BubbleMatrix(UUID ownerId) { + super(ownerId, 147, "Bubble Matrix", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}"); + this.expansionSetCode = "WTH"; + + // Prevent all damage that would be dealt to creatures. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PreventAllDamageToAllEffect(Duration.WhileOnBattlefield, new FilterCreaturePermanent("creatures")))); + } + + public BubbleMatrix(final BubbleMatrix card) { + super(card); + } + + @Override + public BubbleMatrix copy() { + return new BubbleMatrix(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/ChimericSphere.java b/Mage.Sets/src/mage/sets/weatherlight/ChimericSphere.java new file mode 100644 index 00000000000..5fa0b62b516 --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/ChimericSphere.java @@ -0,0 +1,94 @@ +/* + * 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.weatherlight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.permanent.token.Token; + +/** + * + * @author LoneFox + */ +public class ChimericSphere extends CardImpl { + + public ChimericSphere(UUID ownerId) { + super(ownerId, 148, "Chimeric Sphere", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}"); + this.expansionSetCode = "WTH"; + + // {2}: Until end of turn, Chimeric Sphere becomes a 2/1 Construct artifact creature with flying. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new ChimericSphereCreature1(), + "", Duration.EndOfTurn), new ManaCostsImpl("{2}"))); + // {2}: Until end of turn, Chimeric Sphere becomes a 3/2 Construct artifact creature without flying. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new ChimericSphereCreature2(), + "", Duration.EndOfTurn), new ManaCostsImpl("{2}"))); + } + + public ChimericSphere(final ChimericSphere card) { + super(card); + } + + @Override + public ChimericSphere copy() { + return new ChimericSphere(this); + } +} + +class ChimericSphereCreature1 extends Token { + + public ChimericSphereCreature1() { + super("Chimeric Sphere", "2/1 Construct artifact creature with flying"); + cardType.add(CardType.ARTIFACT); + cardType.add(CardType.CREATURE); + power = new MageInt(2); + toughness = new MageInt(1); + + this.addAbility(FlyingAbility.getInstance()); + } +} + +class ChimericSphereCreature2 extends Token { + + public ChimericSphereCreature2() { + super("Chimeric Sphere", "3/2 Construct artifact creature without flying"); + cardType.add(CardType.ARTIFACT); + cardType.add(CardType.CREATURE); + power = new MageInt(3); + toughness = new MageInt(2); + } +} + diff --git a/Mage.Sets/src/mage/sets/weatherlight/DwarvenBerserker.java b/Mage.Sets/src/mage/sets/weatherlight/DwarvenBerserker.java new file mode 100644 index 00000000000..c022ab31a01 --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/DwarvenBerserker.java @@ -0,0 +1,75 @@ +/* + * 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.weatherlight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BecomesBlockedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class DwarvenBerserker extends CardImpl { + + public DwarvenBerserker(UUID ownerId) { + super(ownerId, 97, "Dwarven Berserker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "WTH"; + this.subtype.add("Dwarf"); + this.subtype.add("Berserker"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Whenever Dwarven Berserker becomes blocked, it gets +3/+0 and gains trample until end of turn. + Effect effect = new BoostSourceEffect(3, 0, Duration.EndOfTurn); + effect.setText("it gets +3/+0"); + Ability ability = new BecomesBlockedTriggeredAbility(effect, false); + effect = new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn); + effect.setText("and gains trample until end of turn"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public DwarvenBerserker(final DwarvenBerserker card) { + super(card); + } + + @Override + public DwarvenBerserker copy() { + return new DwarvenBerserker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/FallowWurm.java b/Mage.Sets/src/mage/sets/weatherlight/FallowWurm.java new file mode 100644 index 00000000000..b930d82bdea --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/FallowWurm.java @@ -0,0 +1,65 @@ +/* + * 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.weatherlight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterLandCard; + +/** + * + * @author LoneFox + */ +public class FallowWurm extends CardImpl { + + public FallowWurm(UUID ownerId) { + super(ownerId, 68, "Fallow Wurm", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "WTH"; + this.subtype.add("Wurm"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // When Fallow Wurm enters the battlefield, sacrifice it unless you discard a land card. + this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new DiscardCardCost(new FilterLandCard("a land card"))))); + } + + public FallowWurm(final FallowWurm card) { + super(card); + } + + @Override + public FallowWurm copy() { + return new FallowWurm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/ForiysianBrigade.java b/Mage.Sets/src/mage/sets/weatherlight/ForiysianBrigade.java new file mode 100644 index 00000000000..e8d7ddce8d9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/ForiysianBrigade.java @@ -0,0 +1,65 @@ +/* + * 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.weatherlight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.combat.CanBlockAdditionalCreatureEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class ForiysianBrigade extends CardImpl { + + public ForiysianBrigade(UUID ownerId) { + super(ownerId, 130, "Foriysian Brigade", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "WTH"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Foriysian Brigade can block an additional creature. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanBlockAdditionalCreatureEffect())); + } + + public ForiysianBrigade(final ForiysianBrigade card) { + super(card); + } + + @Override + public ForiysianBrigade copy() { + return new ForiysianBrigade(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/Gallowbraid.java b/Mage.Sets/src/mage/sets/weatherlight/Gallowbraid.java new file mode 100644 index 00000000000..c80abcfb030 --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/Gallowbraid.java @@ -0,0 +1,67 @@ +/* + * 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.weatherlight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class Gallowbraid extends CardImpl { + + public Gallowbraid(UUID ownerId) { + super(ownerId, 12, "Gallowbraid", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + this.expansionSetCode = "WTH"; + this.supertype.add("Legendary"); + this.subtype.add("Horror"); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + // Cumulative upkeep-Pay 1 life. + this.addAbility(new CumulativeUpkeepAbility(new PayLifeCost(1))); + } + + public Gallowbraid(final Gallowbraid card) { + super(card); + } + + @Override + public Gallowbraid copy() { + return new Gallowbraid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/ManaChains.java b/Mage.Sets/src/mage/sets/weatherlight/ManaChains.java new file mode 100644 index 00000000000..19a1c5559cf --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/ManaChains.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.sets.weatherlight; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class ManaChains extends CardImpl { + + public ManaChains(UUID ownerId) { + super(ownerId, 41, "Mana Chains", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{U}"); + this.expansionSetCode = "WTH"; + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + // Enchanted creature has "Cumulative upkeep {1}." + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect( + new CumulativeUpkeepAbility(new ManaCostsImpl("{1}")), AttachmentType.AURA))); + } + + public ManaChains(final ManaChains card) { + super(card); + } + + @Override + public ManaChains copy() { + return new ManaChains(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/MasterOfArms.java b/Mage.Sets/src/mage/sets/weatherlight/MasterOfArms.java new file mode 100644 index 00000000000..d032b2616e6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/MasterOfArms.java @@ -0,0 +1,77 @@ +/* + * 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.weatherlight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.BlockingAttackerIdPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class MasterOfArms extends CardImpl { + + public MasterOfArms(UUID ownerId) { + super(ownerId, 136, "Master of Arms", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "WTH"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + // {1}{W}: Tap target creature blocking Master of Arms. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new ManaCostsImpl("{1}{W}")); + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature blocking {this}"); + filter.add(new BlockingAttackerIdPredicate(this.getId())); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public MasterOfArms(final MasterOfArms card) { + super(card); + } + + @Override + public MasterOfArms copy() { + return new MasterOfArms(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/MerfolkTraders.java b/Mage.Sets/src/mage/sets/weatherlight/MerfolkTraders.java new file mode 100644 index 00000000000..5633b978d79 --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/MerfolkTraders.java @@ -0,0 +1,63 @@ +/* + * 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.weatherlight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DrawDiscardControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class MerfolkTraders extends CardImpl { + + public MerfolkTraders(UUID ownerId) { + super(ownerId, 43, "Merfolk Traders", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "WTH"; + this.subtype.add("Merfolk"); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // When Merfolk Traders enters the battlefield, draw a card, then discard a card. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawDiscardControllerEffect())); + } + + public MerfolkTraders(final MerfolkTraders card) { + super(card); + } + + @Override + public MerfolkTraders copy() { + return new MerfolkTraders(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/Morinfen.java b/Mage.Sets/src/mage/sets/weatherlight/Morinfen.java new file mode 100644 index 00000000000..c6634294106 --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/Morinfen.java @@ -0,0 +1,67 @@ +/* + * 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.weatherlight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class Morinfen extends CardImpl { + + public Morinfen(UUID ownerId) { + super(ownerId, 17, "Morinfen", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + this.expansionSetCode = "WTH"; + this.supertype.add("Legendary"); + this.subtype.add("Horror"); + this.power = new MageInt(5); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Cumulative upkeep-Pay 1 life. + this.addAbility(new CumulativeUpkeepAbility(new PayLifeCost(1))); + } + + public Morinfen(final Morinfen card) { + super(card); + } + + @Override + public Morinfen copy() { + return new Morinfen(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/MwonvuliOoze.java b/Mage.Sets/src/mage/sets/weatherlight/MwonvuliOoze.java new file mode 100644 index 00000000000..e9ff59f123b --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/MwonvuliOoze.java @@ -0,0 +1,101 @@ +/* + * 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.weatherlight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.CountersCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; + +/** + * + * @author LoneFox + */ +public class MwonvuliOoze extends CardImpl { + + public MwonvuliOoze(UUID ownerId) { + super(ownerId, 77, "Mwonvuli Ooze", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "WTH"; + this.subtype.add("Ooze"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Cumulative upkeep {2} + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{2}"))); + // Mwonvuli Ooze's power and toughness are each equal to 1 plus twice the number of age counters on it. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new MwonvuliOozePTValue(), Duration.EndOfGame))); + } + + public MwonvuliOoze(final MwonvuliOoze card) { + super(card); + } + + @Override + public MwonvuliOoze copy() { + return new MwonvuliOoze(this); + } +} + + +class MwonvuliOozePTValue extends CountersCount { + + public MwonvuliOozePTValue() { + super(CounterType.AGE); + } + + public MwonvuliOozePTValue(final MwonvuliOozePTValue value) { + super(value); + } + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + return 2 * super.calculate(game, sourceAbility, effect) + 1; + } + + @Override + public MwonvuliOozePTValue copy() { + return new MwonvuliOozePTValue(this); + } + + @Override + public String getMessage() { + return "1 plus twice the number of age counters on it"; + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/ReveredUnicorn.java b/Mage.Sets/src/mage/sets/weatherlight/ReveredUnicorn.java new file mode 100644 index 00000000000..2897ba0ec64 --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/ReveredUnicorn.java @@ -0,0 +1,69 @@ +/* + * 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.weatherlight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.LeavesBattlefieldTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.CountersCount; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; + +/** + * + * @author LoneFox + */ +public class ReveredUnicorn extends CardImpl { + + public ReveredUnicorn(UUID ownerId) { + super(ownerId, 139, "Revered Unicorn", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "WTH"; + this.subtype.add("Unicorn"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Cumulative upkeep {1} + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{1}"))); + // When Revered Unicorn leaves the battlefield, you gain life equal to the number of age counters on it. + this.addAbility(new LeavesBattlefieldTriggeredAbility(new GainLifeEffect(new CountersCount(CounterType.AGE)), false)); + } + + public ReveredUnicorn(final ReveredUnicorn card) { + super(card); + } + + @Override + public ReveredUnicorn copy() { + return new ReveredUnicorn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/RocHatchling.java b/Mage.Sets/src/mage/sets/weatherlight/RocHatchling.java new file mode 100644 index 00000000000..28983d991fd --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/RocHatchling.java @@ -0,0 +1,86 @@ +/* + * 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.weatherlight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.SourceHasCounterCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author LoneFox + */ +public class RocHatchling extends CardImpl { + + public RocHatchling(UUID ownerId) { + super(ownerId, 113, "Roc Hatchling", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{R}"); + this.expansionSetCode = "WTH"; + this.subtype.add("Bird"); + this.power = new MageInt(0); + this.toughness = new MageInt(1); + + // Roc Hatchling enters the battlefield with four shell counters on it. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.SHELL.createInstance(4)), "with four shell counters on it")); + // At the beginning of your upkeep, remove a shell counter from Roc Hatchling. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new RemoveCounterSourceEffect(CounterType.SHELL.createInstance()), TargetController.YOU, false)); + // As long as Roc Hatchling has no shell counters on it, it gets +3/+2 and has flying. + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostSourceEffect(3, 2, Duration.WhileOnBattlefield), + new SourceHasCounterCondition(CounterType.SHELL, 0, 0), + "As long as {this} has no shell counters on it, it gets +3/+2")); + ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()), + new SourceHasCounterCondition(CounterType.SHELL, 0, 0), "and has flying")); + this.addAbility(ability); + } + + public RocHatchling(final RocHatchling card) { + super(card); + } + + @Override + public RocHatchling copy() { + return new RocHatchling(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/SoulShepherd.java b/Mage.Sets/src/mage/sets/weatherlight/SoulShepherd.java new file mode 100644 index 00000000000..3590e304225 --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/SoulShepherd.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.sets.weatherlight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.ExileFromGraveCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureCard; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author LoneFox + */ +public class SoulShepherd extends CardImpl { + + public SoulShepherd(UUID ownerId) { + super(ownerId, 142, "Soul Shepherd", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "WTH"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // {W}, Exile a creature card from your graveyard: You gain 1 life. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(1), new ManaCostsImpl("{W}")); + ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(new FilterCreatureCard("a creature card from your graveyard")))); + this.addAbility(ability); + } + + public SoulShepherd(final SoulShepherd card) { + super(card); + } + + @Override + public SoulShepherd copy() { + return new SoulShepherd(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/Touchstone.java b/Mage.Sets/src/mage/sets/weatherlight/Touchstone.java new file mode 100644 index 00000000000..23339f313a6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/Touchstone.java @@ -0,0 +1,74 @@ +/* + * 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.weatherlight; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.TapTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterArtifactPermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetArtifactPermanent; + +/** + * + * @author LoneFox + */ +public class Touchstone extends CardImpl { + + private static final FilterArtifactPermanent filter = new FilterArtifactPermanent("artifact you don't control"); + + static { + filter.add(new ControllerPredicate(TargetController.NOT_YOU)); + } + + public Touchstone(UUID ownerId) { + super(ownerId, 161, "Touchstone", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); + this.expansionSetCode = "WTH"; + + // {tap}: Tap target artifact you don't control. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new TapSourceCost()); + ability.addTarget(new TargetArtifactPermanent(filter)); + this.addAbility(ability); + } + + public Touchstone(final Touchstone card) { + super(card); + } + + @Override + public Touchstone copy() { + return new Touchstone(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/XanthicStatue.java b/Mage.Sets/src/mage/sets/weatherlight/XanthicStatue.java new file mode 100644 index 00000000000..4df293f62ff --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/XanthicStatue.java @@ -0,0 +1,79 @@ +/* + * 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.weatherlight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.permanent.token.Token; + +/** + * + * @author LoneFox + */ +public class XanthicStatue extends CardImpl { + + public XanthicStatue(UUID ownerId) { + super(ownerId, 163, "Xanthic Statue", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{8}"); + this.expansionSetCode = "WTH"; + + // {5}: Until end of turn, Xanthic Statue becomes an 8/8 Golem artifact creature with trample. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new XanthicStatueCreature(), + "", Duration.EndOfTurn), new ManaCostsImpl("{5}"))); + } + + public XanthicStatue(final XanthicStatue card) { + super(card); + } + + @Override + public XanthicStatue copy() { + return new XanthicStatue(this); + } +} + +class XanthicStatueCreature extends Token { + + public XanthicStatueCreature() { + super("Xanthic Statue", "8/8 Golem artifact creature with trample"); + cardType.add(CardType.ARTIFACT); + cardType.add(CardType.CREATURE); + power = new MageInt(8); + toughness = new MageInt(8); + + this.addAbility(TrampleAbility.getInstance()); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikar/ArrowVolleyTrap.java b/Mage.Sets/src/mage/sets/zendikar/ArrowVolleyTrap.java index 704c1011a60..cf786931cf8 100644 --- a/Mage.Sets/src/mage/sets/zendikar/ArrowVolleyTrap.java +++ b/Mage.Sets/src/mage/sets/zendikar/ArrowVolleyTrap.java @@ -35,8 +35,7 @@ import mage.abilities.effects.common.DamageMultiEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.AttackingPredicate; +import mage.filter.common.FilterAttackingCreature; import mage.game.Game; import mage.target.common.TargetCreaturePermanentAmount; @@ -45,23 +44,16 @@ import mage.target.common.TargetCreaturePermanentAmount; */ public class ArrowVolleyTrap extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("attacking creatures"); - - static { - filter.add(new AttackingPredicate()); - } - public ArrowVolleyTrap(UUID ownerId) { super(ownerId, 2, "Arrow Volley Trap", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{3}{W}{W}"); this.expansionSetCode = "ZEN"; - // If four or more creatures are attacking, you may pay {1}{W} rather than pay Arrow Volley Trap's mana cost. this.getSpellAbility().addAlternativeCost(new ArrowVolleyTrapAlternativeCost()); // Arrow Volley Trap deals 5 damage divided as you choose among any number of target attacking creatures. this.getSpellAbility().addEffect(new DamageMultiEffect(5)); - this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(5, filter)); + this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(5, new FilterAttackingCreature("attacking creatures"))); } @@ -100,4 +92,4 @@ class ArrowVolleyTrapAlternativeCost extends AlternativeCostImpl { public String getText() { return "If four or more creatures are attacking, you may pay {1}{W} rather than pay {this}'s mana cost"; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/zendikar/ConquerorsPledge.java b/Mage.Sets/src/mage/sets/zendikar/ConquerorsPledge.java index de37a7675b9..02fbd720725 100644 --- a/Mage.Sets/src/mage/sets/zendikar/ConquerorsPledge.java +++ b/Mage.Sets/src/mage/sets/zendikar/ConquerorsPledge.java @@ -37,7 +37,7 @@ import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.KorSoldierToken; /** * @@ -67,17 +67,3 @@ public class ConquerorsPledge extends CardImpl { } } - -class KorSoldierToken extends Token { - - public KorSoldierToken() { - super("Kor Soldier", "1/1 white Kor Soldier creature token"); - cardType.add(CardType.CREATURE); - color.setWhite(true); - subtype.add("Kor"); - subtype.add("Soldier"); - power = new MageInt(1); - toughness = new MageInt(1); - } - -} diff --git a/Mage.Sets/src/mage/sets/zendikar/IonaShieldOfEmeria.java b/Mage.Sets/src/mage/sets/zendikar/IonaShieldOfEmeria.java index 91fc8f24195..ae55b9d3e56 100644 --- a/Mage.Sets/src/mage/sets/zendikar/IonaShieldOfEmeria.java +++ b/Mage.Sets/src/mage/sets/zendikar/IonaShieldOfEmeria.java @@ -99,7 +99,7 @@ class IonaShieldOfEmeriaReplacementEffect extends ContinuousRuleModifyingEffectI ObjectColor chosenColor = (ObjectColor) game.getState().getValue(source.getSourceId() + "_color"); MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null && chosenColor != null) { - return "You can't cast " + chosenColor.toString() +" spells (" + mageObject.getLogName() + ")."; + return "You can't cast " + chosenColor.toString() + " spells (" + mageObject.getIdName() + ")."; } return null; } @@ -107,11 +107,11 @@ class IonaShieldOfEmeriaReplacementEffect extends ContinuousRuleModifyingEffectI @Override public boolean checksEventType(GameEvent event, Game game) { return event.getType() == GameEvent.EventType.CAST_SPELL; - } - + } + @Override public boolean applies(GameEvent event, Ability source, Game game) { - if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId()) ) { + if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) { ObjectColor chosenColor = (ObjectColor) game.getState().getValue(source.getSourceId() + "_color"); // spell is not on the stack yet, so we have to check the card Card card = game.getCard(event.getSourceId()); diff --git a/Mage.Sets/src/mage/sets/zendikar/LivingTsunami.java b/Mage.Sets/src/mage/sets/zendikar/LivingTsunami.java index 8c761ff0bfe..436b2886265 100644 --- a/Mage.Sets/src/mage/sets/zendikar/LivingTsunami.java +++ b/Mage.Sets/src/mage/sets/zendikar/LivingTsunami.java @@ -34,7 +34,7 @@ import mage.constants.Rarity; import mage.constants.TargetController; import mage.MageInt; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; -import mage.abilities.costs.common.ReturnToHandTargetPermanentCost; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; @@ -67,7 +67,7 @@ public class LivingTsunami extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // At the beginning of your upkeep, sacrifice Living Tsunami unless you return a land you control to its owner's hand. - this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(1, 1, filter, true))), TargetController.YOU, false)); + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(1, 1, filter, true))), TargetController.YOU, false)); } public LivingTsunami(final LivingTsunami card) { diff --git a/Mage.Sets/src/mage/sets/zendikar/SpreadingSeas.java b/Mage.Sets/src/mage/sets/zendikar/SpreadingSeas.java index 7b75921e09f..ab0741a212c 100644 --- a/Mage.Sets/src/mage/sets/zendikar/SpreadingSeas.java +++ b/Mage.Sets/src/mage/sets/zendikar/SpreadingSeas.java @@ -1,16 +1,16 @@ /* * 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 @@ -20,19 +20,14 @@ * 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; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; @@ -41,6 +36,10 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.continuous.BecomesBasicLandEnchantedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.target.TargetPermanent; import mage.target.common.TargetLandPermanent; @@ -61,6 +60,7 @@ public class SpreadingSeas extends CardImpl { this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); + this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1), false)); // Enchanted land is an Island. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BecomesBasicLandEnchantedEffect("Island"))); diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/AridMesa.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/AridMesa.java new file mode 100644 index 00000000000..c74cea7246e --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/AridMesa.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class AridMesa extends mage.sets.zendikar.AridMesa { + + public AridMesa(UUID ownerId) { + super(ownerId); + this.cardNumber = 24; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public AridMesa(final AridMesa card) { + super(card); + } + + @Override + public AridMesa copy() { + return new AridMesa(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/BloodCrypt.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/BloodCrypt.java new file mode 100644 index 00000000000..75f2c346c37 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/BloodCrypt.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class BloodCrypt extends mage.sets.dissension.BloodCrypt { + + public BloodCrypt(UUID ownerId) { + super(ownerId); + this.cardNumber = 8; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public BloodCrypt(final BloodCrypt card) { + super(card); + } + + @Override + public BloodCrypt copy() { + return new BloodCrypt(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/BloodstainedMire.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/BloodstainedMire.java new file mode 100644 index 00000000000..30f5956274b --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/BloodstainedMire.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class BloodstainedMire extends mage.sets.onslaught.BloodstainedMire { + + public BloodstainedMire(UUID ownerId) { + super(ownerId); + this.cardNumber = 18; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public BloodstainedMire(final BloodstainedMire card) { + super(card); + } + + @Override + public BloodstainedMire copy() { + return new BloodstainedMire(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/BreedingPool.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/BreedingPool.java new file mode 100644 index 00000000000..a7a407d5b3f --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/BreedingPool.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class BreedingPool extends mage.sets.dissension.BreedingPool { + + public BreedingPool(UUID ownerId) { + super(ownerId); + this.cardNumber = 15; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public BreedingPool(final BreedingPool card) { + super(card); + } + + @Override + public BreedingPool copy() { + return new BreedingPool(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/CanopyVista.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/CanopyVista.java new file mode 100644 index 00000000000..15a45bb0ae5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/CanopyVista.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class CanopyVista extends mage.sets.battleforzendikar.CanopyVista { + + public CanopyVista(UUID ownerId) { + super(ownerId); + this.cardNumber = 5; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public CanopyVista(final CanopyVista card) { + super(card); + } + + @Override + public CanopyVista copy() { + return new CanopyVista(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/CinderGlade.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/CinderGlade.java new file mode 100644 index 00000000000..c81265ccb5a --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/CinderGlade.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class CinderGlade extends mage.sets.battleforzendikar.CinderGlade { + + public CinderGlade(UUID ownerId) { + super(ownerId); + this.cardNumber = 4; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public CinderGlade(final CinderGlade card) { + super(card); + } + + @Override + public CinderGlade copy() { + return new CinderGlade(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/FloodedStrand.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/FloodedStrand.java new file mode 100644 index 00000000000..f1da51bfc14 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/FloodedStrand.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class FloodedStrand extends mage.sets.onslaught.FloodedStrand { + + public FloodedStrand(UUID ownerId) { + super(ownerId); + this.cardNumber = 16; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public FloodedStrand(final FloodedStrand card) { + super(card); + } + + @Override + public FloodedStrand copy() { + return new FloodedStrand(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/GodlessShrine.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/GodlessShrine.java new file mode 100644 index 00000000000..92fb6f57178 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/GodlessShrine.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class GodlessShrine extends mage.sets.guildpact.GodlessShrine { + + public GodlessShrine(UUID ownerId) { + super(ownerId); + this.cardNumber = 11; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public GodlessShrine(final GodlessShrine card) { + super(card); + } + + @Override + public GodlessShrine copy() { + return new GodlessShrine(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/HallowedFountain.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/HallowedFountain.java new file mode 100644 index 00000000000..a2221249147 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/HallowedFountain.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class HallowedFountain extends mage.sets.dissension.HallowedFountain { + + public HallowedFountain(UUID ownerId) { + super(ownerId); + this.cardNumber = 6; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public HallowedFountain(final HallowedFountain card) { + super(card); + } + + @Override + public HallowedFountain copy() { + return new HallowedFountain(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/MarshFlats.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/MarshFlats.java new file mode 100644 index 00000000000..030eb459e3a --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/MarshFlats.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class MarshFlats extends mage.sets.zendikar.MarshFlats { + + public MarshFlats(UUID ownerId) { + super(ownerId); + this.cardNumber = 21; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public MarshFlats(final MarshFlats card) { + super(card); + } + + @Override + public MarshFlats copy() { + return new MarshFlats(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/MistyRainforest.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/MistyRainforest.java new file mode 100644 index 00000000000..4c22fa52e19 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/MistyRainforest.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class MistyRainforest extends mage.sets.zendikar.MistyRainforest { + + public MistyRainforest(UUID ownerId) { + super(ownerId); + this.cardNumber = 25; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public MistyRainforest(final MistyRainforest card) { + super(card); + } + + @Override + public MistyRainforest copy() { + return new MistyRainforest(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/OvergrownTomb.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/OvergrownTomb.java new file mode 100644 index 00000000000..ae424e0f58f --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/OvergrownTomb.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class OvergrownTomb extends mage.sets.ravnica.OvergrownTomb { + + public OvergrownTomb(UUID ownerId) { + super(ownerId); + this.cardNumber = 13; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public OvergrownTomb(final OvergrownTomb card) { + super(card); + } + + @Override + public OvergrownTomb copy() { + return new OvergrownTomb(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/PollutedDelta.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/PollutedDelta.java new file mode 100644 index 00000000000..35fb00d05d3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/PollutedDelta.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class PollutedDelta extends mage.sets.onslaught.PollutedDelta { + + public PollutedDelta(UUID ownerId) { + super(ownerId); + this.cardNumber = 17; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public PollutedDelta(final PollutedDelta card) { + super(card); + } + + @Override + public PollutedDelta copy() { + return new PollutedDelta(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/PrairieStream.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/PrairieStream.java new file mode 100644 index 00000000000..54965a94fdf --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/PrairieStream.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class PrairieStream extends mage.sets.battleforzendikar.PrairieStream { + + public PrairieStream(UUID ownerId) { + super(ownerId); + this.cardNumber = 1; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public PrairieStream(final PrairieStream card) { + super(card); + } + + @Override + public PrairieStream copy() { + return new PrairieStream(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/SacredFoundry.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/SacredFoundry.java new file mode 100644 index 00000000000..25d51b68ba3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/SacredFoundry.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class SacredFoundry extends mage.sets.ravnica.SacredFoundry { + + public SacredFoundry(UUID ownerId) { + super(ownerId); + this.cardNumber = 14; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public SacredFoundry(final SacredFoundry card) { + super(card); + } + + @Override + public SacredFoundry copy() { + return new SacredFoundry(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/ScaldingTarn.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/ScaldingTarn.java new file mode 100644 index 00000000000..1d4a9534d33 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/ScaldingTarn.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class ScaldingTarn extends mage.sets.zendikar.ScaldingTarn { + + public ScaldingTarn(UUID ownerId) { + super(ownerId); + this.cardNumber = 22; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public ScaldingTarn(final ScaldingTarn card) { + super(card); + } + + @Override + public ScaldingTarn copy() { + return new ScaldingTarn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/SmolderingMarsh.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/SmolderingMarsh.java new file mode 100644 index 00000000000..3a9b4adabca --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/SmolderingMarsh.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class SmolderingMarsh extends mage.sets.battleforzendikar.SmolderingMarsh { + + public SmolderingMarsh(UUID ownerId) { + super(ownerId); + this.cardNumber = 3; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public SmolderingMarsh(final SmolderingMarsh card) { + super(card); + } + + @Override + public SmolderingMarsh copy() { + return new SmolderingMarsh(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/SteamVents.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/SteamVents.java new file mode 100644 index 00000000000..5f9f5adfc8f --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/SteamVents.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class SteamVents extends mage.sets.guildpact.SteamVents { + + public SteamVents(UUID ownerId) { + super(ownerId); + this.cardNumber = 12; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public SteamVents(final SteamVents card) { + super(card); + } + + @Override + public SteamVents copy() { + return new SteamVents(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/StompingGround.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/StompingGround.java new file mode 100644 index 00000000000..06acf8a4b58 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/StompingGround.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class StompingGround extends mage.sets.guildpact.StompingGround { + + public StompingGround(UUID ownerId) { + super(ownerId); + this.cardNumber = 9; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public StompingGround(final StompingGround card) { + super(card); + } + + @Override + public StompingGround copy() { + return new StompingGround(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/SunkenHollow.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/SunkenHollow.java new file mode 100644 index 00000000000..8ea9fe8546b --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/SunkenHollow.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class SunkenHollow extends mage.sets.battleforzendikar.SunkenHollow { + + public SunkenHollow(UUID ownerId) { + super(ownerId); + this.cardNumber = 2; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public SunkenHollow(final SunkenHollow card) { + super(card); + } + + @Override + public SunkenHollow copy() { + return new SunkenHollow(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/TempleGarden.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/TempleGarden.java new file mode 100644 index 00000000000..60feb64b6e2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/TempleGarden.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class TempleGarden extends mage.sets.ravnica.TempleGarden { + + public TempleGarden(UUID ownerId) { + super(ownerId); + this.cardNumber = 10; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public TempleGarden(final TempleGarden card) { + super(card); + } + + @Override + public TempleGarden copy() { + return new TempleGarden(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/VerdantCatacombs.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/VerdantCatacombs.java new file mode 100644 index 00000000000..339425a636c --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/VerdantCatacombs.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class VerdantCatacombs extends mage.sets.zendikar.VerdantCatacombs { + + public VerdantCatacombs(UUID ownerId) { + super(ownerId); + this.cardNumber = 23; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public VerdantCatacombs(final VerdantCatacombs card) { + super(card); + } + + @Override + public VerdantCatacombs copy() { + return new VerdantCatacombs(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/WateryGrave.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/WateryGrave.java new file mode 100644 index 00000000000..3cfc5781323 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/WateryGrave.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class WateryGrave extends mage.sets.ravnica.WateryGrave { + + public WateryGrave(UUID ownerId) { + super(ownerId); + this.cardNumber = 7; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public WateryGrave(final WateryGrave card) { + super(card); + } + + @Override + public WateryGrave copy() { + return new WateryGrave(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/WindsweptHeath.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/WindsweptHeath.java new file mode 100644 index 00000000000..7513ad9be8b --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/WindsweptHeath.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class WindsweptHeath extends mage.sets.onslaught.WindsweptHeath { + + public WindsweptHeath(UUID ownerId) { + super(ownerId); + this.cardNumber = 20; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public WindsweptHeath(final WindsweptHeath card) { + super(card); + } + + @Override + public WindsweptHeath copy() { + return new WindsweptHeath(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarexpeditions/WoodedFoothills.java b/Mage.Sets/src/mage/sets/zendikarexpeditions/WoodedFoothills.java new file mode 100644 index 00000000000..30909248a96 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarexpeditions/WoodedFoothills.java @@ -0,0 +1,54 @@ +/* + * 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.zendikarexpeditions; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class WoodedFoothills extends mage.sets.onslaught.WoodedFoothills { + + public WoodedFoothills(UUID ownerId) { + super(ownerId); + this.cardNumber = 19; + this.expansionSetCode = "EXP"; + this.rarity = Rarity.MYTHIC; + } + + public WoodedFoothills(final WoodedFoothills card) { + super(card); + } + + @Override + public WoodedFoothills copy() { + return new WoodedFoothills(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/VeteranWarleader.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/VeteranWarleader.java index 234e3e4a159..7da3274afa2 100644 --- a/Mage.Sets/src/mage/sets/zendikarvseldrazi/VeteranWarleader.java +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/VeteranWarleader.java @@ -64,8 +64,8 @@ import mage.target.common.TargetControlledPermanent; * @author fireshoes */ public class VeteranWarleader extends CardImpl { - - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another untapped Ally"); + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another untapped Ally you control"); static { filter.add(new AnotherPredicate()); @@ -84,9 +84,9 @@ public class VeteranWarleader extends CardImpl { // Veteran Warleader's power and toughness are each equal to the number of creatures you control. this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect( new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()), Duration.EndOfGame))); - + // Tap another untapped Ally you control: Veteran Warleader gains your choice of first strike, vigilance, or trample until end of turn. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new VeteranWarleaderEffect(), new TapTargetCost(new TargetControlledPermanent(1, 1, filter, true)))); } @@ -101,6 +101,7 @@ public class VeteranWarleader extends CardImpl { } class VeteranWarleaderEffect extends OneShotEffect { + VeteranWarleaderEffect() { super(Outcome.AddAbility); staticText = "{this} gains your choice of first strike, vigilance, or trample until end of turn"; diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/activated/ReturnToHandTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/activated/ReturnToHandTest.java index 9864c33cfdb..5e55cb4d37d 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/activated/ReturnToHandTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/activated/ReturnToHandTest.java @@ -36,7 +36,6 @@ import org.mage.test.serverside.base.CardTestPlayerBase; * * @author LevelX2 */ - public class ReturnToHandTest extends CardTestPlayerBase { /** @@ -47,23 +46,23 @@ public class ReturnToHandTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Pillarfield Ox"); // Bloodthirst 3 // Flying - // {R}{R}{R}: Return Skarrgan Firebird from your graveyard to your hand. Activate this ability only if an opponent was dealt damage this turn. + // {R}{R}{R}: Return Skarrgan Firebird from your graveyard to your hand. Activate this ability only if an opponent was dealt damage this turn. addCard(Zone.BATTLEFIELD, playerB, "Skarrgan Firebird"); addCard(Zone.BATTLEFIELD, playerB, "Swamp", 2); addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion"); addCard(Zone.BATTLEFIELD, playerB, "Mountain", 3); addCard(Zone.HAND, playerB, "Bone Splinters"); - + // As an additional cost to cast Bone Splinters, sacrifice a creature. // Destroy target creature. castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Bone Splinters", "Pillarfield Ox"); setChoice(playerB, "Skarrgan Firebird"); - + attack(2, playerB, "Silvercoat Lion"); - + activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "{R}{R}{R}: Return"); setStopAt(2, PhaseStep.END_TURN); - + execute(); assertPermanentCount(playerA, "Skarrgan Firebird", 0); @@ -79,40 +78,71 @@ public class ReturnToHandTest extends CardTestPlayerBase { @Test public void VeilbornGhoulTest1() { // Veilborn Ghoul can't block. - // Whenever a Swamp enters the battlefield under your control, you may return Veilborn Ghoul from your graveyard to your hand. + // Whenever a Swamp enters the battlefield under your control, you may return Veilborn Ghoul from your graveyard to your hand. addCard(Zone.GRAVEYARD, playerA, "Veilborn Ghoul"); addCard(Zone.HAND, playerA, "Swamp"); - + playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Swamp"); setStopAt(1, PhaseStep.BEGIN_COMBAT); - + execute(); - assertPermanentCount(playerA, "Swamp", 1); + assertPermanentCount(playerA, "Swamp", 1); assertHandCount(playerA, "Veilborn Ghoul", 1); } + /** - * Return from graveyard to hand if you play a non swamp land but Urborg, Tomb of Yawgmoth is in play + * Return from graveyard to hand if you play a non swamp land but Urborg, + * Tomb of Yawgmoth is in play */ @Test public void VeilbornGhoulTest2() { // Veilborn Ghoul can't block. - // Whenever a Swamp enters the battlefield under your control, you may return Veilborn Ghoul from your graveyard to your hand. + // Whenever a Swamp enters the battlefield under your control, you may return Veilborn Ghoul from your graveyard to your hand. addCard(Zone.GRAVEYARD, playerA, "Veilborn Ghoul"); addCard(Zone.HAND, playerA, "Flood Plain"); - + // Each land is a Swamp in addition to its other land types. addCard(Zone.BATTLEFIELD, playerA, "Urborg, Tomb of Yawgmoth", 1); - + playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Flood Plain"); setStopAt(1, PhaseStep.BEGIN_COMBAT); - + execute(); - assertPermanentCount(playerA, "Flood Plain", 1); + assertPermanentCount(playerA, "Flood Plain", 1); assertHandCount(playerA, "Veilborn Ghoul", 1); - } - + } + + /** + * Return a spell from stack to Hand + */ + @Test + public void BrutalExpulsionTest() { + addCard(Zone.BATTLEFIELD, playerA, "Island", 2); + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2); + // Devoid + // Choose one or both + // - Return target spell or creature to its owner's hand; + // or Brutal Expulsion deals 2 damage to target creature or planeswalker. If that permanent would be put into a graveyard this turn, exile it instead. + addCard(Zone.HAND, playerA, "Brutal Expulsion"); // {2}{U}{R} + + addCard(Zone.BATTLEFIELD, playerB, "Plains", 4); + addCard(Zone.HAND, playerB, "Pillarfield Ox", 1); + addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1); + + castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Pillarfield Ox"); + castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerA, "Brutal Expulsion", "mode=1Pillarfield Ox^mode=2Silvercoat Lion", "Pillarfield Ox"); + setStopAt(2, PhaseStep.BEGIN_COMBAT); + + execute(); + + assertGraveyardCount(playerA, "Brutal Expulsion", 1); + assertExileCount("Silvercoat Lion", 1); + assertPermanentCount(playerB, "Pillarfield Ox", 0); + assertHandCount(playerB, "Pillarfield Ox", 1); + + } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/InfectTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/InfectTest.java index d1f5ab38482..c404d825452 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/InfectTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/InfectTest.java @@ -27,6 +27,7 @@ */ package org.mage.test.cards.abilities.keywords; +import mage.abilities.keyword.InfectAbility; import mage.constants.PhaseStep; import mage.constants.Zone; import mage.counters.CounterType; @@ -126,4 +127,46 @@ public class InfectTest extends CardTestPlayerBase { } + /** + * Phyrexian Obliterator is enchanted with Corrupted Conscience and Enslave + * + * on upkeep Phyrexian Obliterator does 1 damage to its owner but this + * damage was NOT infect damage and it should have been + */ + @Test + public void GainedInfectByEnchantment() { + // Trample + // Whenever a source deals damage to Phyrexian Obliterator, that source's controller sacrifices that many permanents. + addCard(Zone.BATTLEFIELD, playerB, "Phyrexian Obliterator"); + + // Enchant creature + // You control enchanted creature. + // Enchanted creature has infect. (It deals damage to creatures in the form of -1/-1 counters and to players in the form of poison counters.) + addCard(Zone.HAND, playerA, "Corrupted Conscience"); // Enchantment {3}{U}{U} + // Enchant creature + // You control enchanted creature. + // At the beginning of your upkeep, enchanted creature deals 1 damage to its owner. + addCard(Zone.HAND, playerA, "Enslave"); // Enchantment {4}{B}{B} + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 9); + addCard(Zone.BATTLEFIELD, playerA, "Island", 2); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Corrupted Conscience", "Phyrexian Obliterator"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Enslave", "Phyrexian Obliterator"); + + setStopAt(3, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertPermanentCount(playerA, "Phyrexian Obliterator", 1); + assertPermanentCount(playerA, "Corrupted Conscience", 1); + assertPermanentCount(playerA, "Enslave", 1); + + assertAbility(playerA, "Phyrexian Obliterator", InfectAbility.getInstance(), true); + + assertLife(playerA, 20); + assertLife(playerB, 20); + + assertCounterCount(playerB, CounterType.POISON, 1); + + } + } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/SpliceOnArcaneTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/SpliceOnArcaneTest.java index 6eff8eaae26..0cd925879a7 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/SpliceOnArcaneTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/SpliceOnArcaneTest.java @@ -38,70 +38,70 @@ import org.mage.test.serverside.base.CardTestPlayerBase; * * @author LevelX2 */ - public class SpliceOnArcaneTest extends CardTestPlayerBase { /** - * Test that it works to cast Through the Breach - * by slicing it on an arcane spell + * Test that it works to cast Through the Breach by slicing it on an arcane + * spell * */ @Test public void testSpliceThroughTheBreach() { - + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5); // Sorcery - Arcane {R} // Lava Spike deals 3 damage to target player. - addCard(Zone.HAND, playerA, "Lava Spike",1); + addCard(Zone.HAND, playerA, "Lava Spike", 1); // You may put a creature card from your hand onto the battlefield. That creature gains haste. Sacrifice that creature at the beginning of the next end step. // Splice onto Arcane {2}{R}{R} (As you cast an Arcane spell, you may reveal this card from your hand and pay its splice cost. If you do, add this card's effects to that spell.) - addCard(Zone.HAND, playerA, "Through the Breach",1); - addCard(Zone.HAND, playerA, "Silvercoat Lion",1); + addCard(Zone.HAND, playerA, "Through the Breach", 1); + addCard(Zone.HAND, playerA, "Silvercoat Lion", 1); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lava Spike", playerB); setChoice(playerA, "Silvercoat Lion"); - + setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); assertLife(playerA, 20); assertLife(playerB, 17); - + assertGraveyardCount(playerA, "Lava Spike", 1); assertHandCount(playerA, "Through the Breach", 1); - assertPermanentCount(playerA, "Silvercoat Lion", 1); + assertPermanentCount(playerA, "Silvercoat Lion", 1); assertAbility(playerA, "Silvercoat Lion", HasteAbility.getInstance(), true); Assert.assertEquals("All available mana has to be used", 0, playerA.getManaAvailable(currentGame).size()); } - + @Test - public void testSpliceTorrentOfStone() { - + public void testSpliceTorrentOfStone() { + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2); // Sorcery - Arcane {R} // Lava Spike deals 3 damage to target player. - addCard(Zone.HAND, playerA, "Lava Spike",1); + addCard(Zone.HAND, playerA, "Lava Spike", 1); // Torrent of Stone deals 4 damage to target creature. - // Splice onto Arcane-Sacrifice two Mountains. (As you cast an Arcane spell, you may reveal this card from your hand and pay its splice cost. If you do, add this card's effects to that spell.) - addCard(Zone.HAND, playerA, "Torrent of Stone",1); + // Splice onto Arcane-Sacrifice two Mountains. (As you cast an Arcane spell, you may reveal this card from your hand and pay its splice cost. If you do, add this card's effects to that spell.) + addCard(Zone.HAND, playerA, "Torrent of Stone", 1); + + addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1); - addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion",1); - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lava Spike", playerB); addTarget(playerA, "Silvercoat Lion"); - + setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); assertLife(playerA, 20); assertLife(playerB, 17); - + assertGraveyardCount(playerA, "Lava Spike", 1); assertHandCount(playerA, "Torrent of Stone", 1); assertGraveyardCount(playerB, "Silvercoat Lion", 1); - assertPermanentCount(playerA, "Mountain", 0); + assertPermanentCount(playerA, "Mountain", 0); Assert.assertEquals("No more mana available", "[]", playerA.getManaAvailable(currentGame).toString()); - } + } + /** * Nourishing Shoal's interaction with Splicing Through the Breach is * bugged. You should still need to pay 2RR as an additional cost, which is @@ -111,34 +111,94 @@ public class SpliceOnArcaneTest extends CardTestPlayerBase { * powerful. */ @Test - public void testSpliceThroughTheBreach2() { + public void testSpliceThroughTheBreach2() { addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4); // You may exile a green card with converted mana cost X from your hand rather than pay Nourishing Shoal's mana cost. // You gain X life. - addCard(Zone.HAND, playerA, "Nourishing Shoal",1); - addCard(Zone.HAND, playerA, "Giant Growth",1); + addCard(Zone.HAND, playerA, "Nourishing Shoal", 1); + addCard(Zone.HAND, playerA, "Giant Growth", 1); // You may put a creature card from your hand onto the battlefield. That creature gains haste. Sacrifice that creature at the beginning of the next end step. // Splice onto Arcane {2}{R}{R} (As you cast an Arcane spell, you may reveal this card from your hand and pay its splice cost. If you do, add this card's effects to that spell.) - addCard(Zone.HAND, playerA, "Through the Breach",1); - addCard(Zone.HAND, playerA, "Silvercoat Lion",1); + addCard(Zone.HAND, playerA, "Through the Breach", 1); + addCard(Zone.HAND, playerA, "Silvercoat Lion", 1); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Nourishing Shoal"); setChoice(playerA, "Yes"); setChoice(playerA, "Silvercoat Lion"); - + setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); assertLife(playerA, 21); assertLife(playerB, 20); - + assertGraveyardCount(playerA, "Nourishing Shoal", 1); assertHandCount(playerA, "Through the Breach", 1); - assertPermanentCount(playerA, "Silvercoat Lion", 1); + assertPermanentCount(playerA, "Silvercoat Lion", 1); assertAbility(playerA, "Silvercoat Lion", HasteAbility.getInstance(), true); - - Assert.assertEquals("All available mana has to be used","[]", playerA.getManaAvailable(currentGame).toString()); - } - - + + Assert.assertEquals("All available mana has to be used", "[]", playerA.getManaAvailable(currentGame).toString()); + } + + /** + * Cards involved: Nourishing Shoal, Goryo's Vengeance, Griselbrand, + * Terminate + * + * I actually noticed this bug on the 1.4.3 client, but I didn't see it in + * the change log for 1.4.4, so I assume it is still unknown. Also, it is a + * bit of a rules corner case and I haven't seen anyone else report it, so + * the players of this deck may actually not realize it's incorrect. + * + * The scenario was that I cast a Nourishing Shoal with a Goryo's Vengeance + * spliced to it targeting Griselbrand in my graveyard and exiling + * Worldspine Wurm. My opponent responded with a Snapcaster Mage, so to + * deprive him of his ability to reuse his counterspell, I cast the Goryo's + * Vengeance on the Griselbrand. This one resolved. He then used Terminate + * on the Griselbrand after I had activated it once. When the Shoal tried to + * resolve, it should have been countered due to no legal target. However, + * it caused me to gain 11 life. It did not resurrect Griselbrand + * (correctly), but it should have done nothing at all. + * + * I include the info about the Terminate because thinking through, it could + * be pertinent. I would guess what is going on here is one of two things. + * Either the client doesn't recognize the Shoal with a spliced Vengeance as + * a spell with a single target (because Shoal normally doesn't have a + * target) or because the Griselbrand ended up back in the graveyard before + * the Shoal tried to resolve, the client thought its target was still + * valid. I lean toward the former since the Shoal/Vengeance properly failed + * to resurrect the now dead again Griselbrand, so I don't think it was + * reading that as the target, but I'm not certain. I will try to reproduce + * the error against a bot and update this report. + */ + @Test + public void testCounteredBecauseOfNoLegalTarget() { + addCard(Zone.BATTLEFIELD, playerA, "Forest", 2); + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 8); + // You may exile a green card with converted mana cost X from your hand rather than pay Nourishing Shoal's mana cost. + // You gain X life. + addCard(Zone.HAND, playerA, "Nourishing Shoal", 1); // "{X}{G}{G}" + // Return target legendary creature card from your graveyard to the battlefield. That creature gains haste. Exile it at the beginning of the next end step. + // Splice onto Arcane {2}{B} + addCard(Zone.HAND, playerA, "Goryo's Vengeance", 1); // {1}{B} + addCard(Zone.GRAVEYARD, playerA, "Griselbrand", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Nourishing Shoal"); + setChoice(playerA, "X=3"); + setChoice(playerA, "Yes"); // splice + addTarget(playerA, "Griselbrand"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Goryo's Vengeance", "Griselbrand", "Nourishing Shoal"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, "Nourishing Shoal", 1); + assertGraveyardCount(playerA, "Goryo's Vengeance", 1); + assertPermanentCount(playerA, "Griselbrand", 1); + + assertLife(playerA, 20); // no life gain because Nourishing Shoal has to be countered having no legal targets (from Goryo's V.) + assertLife(playerB, 20); + + } + } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/exile/CelestialPurgeTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/exile/CelestialPurgeTest.java new file mode 100644 index 00000000000..ba5ae1387d1 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/exile/CelestialPurgeTest.java @@ -0,0 +1,68 @@ +/* + * 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 org.mage.test.cards.abilities.oneshot.exile; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class CelestialPurgeTest extends CardTestPlayerBase { + + /** + * I activated Celestial Purge trying to targeting a Bitterblossom but i + * couldn't so please fix that bug + */ + @Test + public void testExileWorks() { + addCard(Zone.BATTLEFIELD, playerA, "Plains", 2); + // Exile target black or red permanent. + addCard(Zone.HAND, playerA, "Celestial Purge"); + + // At the beginning of your upkeep, you lose 1 life and put a 1/1 black Faerie Rogue creature token with flying onto the battlefield. + addCard(Zone.BATTLEFIELD, playerB, "Bitterblossom"); + + castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerA, "Celestial Purge", "Bitterblossom"); + + setStopAt(2, PhaseStep.BEGIN_COMBAT); + execute(); + + assertLife(playerA, 20); + assertLife(playerB, 19); + + assertGraveyardCount(playerA, "Celestial Purge", 1); + + assertExileCount("Bitterblossom", 1); + assertPermanentCount(playerB, "Faerie Rogue", 1); + + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/control/GainControlTargetEffectTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/control/GainControlTargetEffectTest.java index 3293ebacf13..3b73418f9d8 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/control/GainControlTargetEffectTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/control/GainControlTargetEffectTest.java @@ -18,7 +18,7 @@ public class GainControlTargetEffectTest extends CardTestPlayerBase { /** * Checks if control has changed and the controlled creature has Haste - * + * */ @Test public void testPermanentControlEffect() { @@ -39,13 +39,12 @@ public class GainControlTargetEffectTest extends CardTestPlayerBase { } /** - * I gained control of my opponent's Glen Elendra Archmage with Vedalken Shackles. - * After I sacrificed it to counter a spell, it Persisted back to my battlefield, - * but it should return under its owner's control. Maybe a Persist problem, but I - * am thinking Vedalken Shackles doesn't realize that it is a different object - * when it returns from the graveyard instead. + * I gained control of my opponent's Glen Elendra Archmage with Vedalken + * Shackles. After I sacrificed it to counter a spell, it Persisted back to + * my battlefield, but it should return under its owner's control. Maybe a + * Persist problem, but I am thinking Vedalken Shackles doesn't realize that + * it is a different object when it returns from the graveyard instead. */ - @Test public void testGainControlOfCreatureWithPersistEffect() { // {2},{T}: Gain control of target creature with power less than or equal to the number of Islands you control for as long as Vedalken Shackles remains tapped. @@ -60,7 +59,7 @@ public class GainControlTargetEffectTest extends CardTestPlayerBase { // Persist (When this creature dies, if it had no -1/-1 counters on it, return it to the battlefield under its owner's control with a -1/-1 counter on it.) addCard(Zone.BATTLEFIELD, playerB, "Glen Elendra Archmage"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}: Gain control of target creature with power less than or equal to the number of Islands you control for as long as {this} remains tapped.","Glen Elendra Archmage"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}: Gain control of target creature with power less than or equal to the number of Islands you control for as long as {this} remains tapped.", "Glen Elendra Archmage"); castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Lightning Strike", playerA); activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{U},Sacrifice {this}: Counter target noncreature spell.", "Lightning Strike"); @@ -76,4 +75,33 @@ public class GainControlTargetEffectTest extends CardTestPlayerBase { assertPermanentCount(playerB, "Glen Elendra Archmage", 1); } + + /** + * The shackles can maintain control of Mutavault indefinitely, even when + * it's not a creature. + * + */ + @Test + public void testKeepControlOfMutavault() { + // {2},{T}: Gain control of target creature with power less than or equal to the number of Islands you control for as long as Vedalken Shackles remains tapped. + addCard(Zone.BATTLEFIELD, playerA, "Vedalken Shackles", 1); + addCard(Zone.BATTLEFIELD, playerA, "Island", 3); + + addCard(Zone.BATTLEFIELD, playerB, "Island", 1); + // {T}: Add {1} to your mana pool. + // {1}: Mutavault becomes a 2/2 creature with all creature types until end of turn. It's still a land. + addCard(Zone.BATTLEFIELD, playerB, "Mutavault", 1); + + activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{1}: Until end of turn {this} becomes"); + activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerA, "{2},{T}: Gain control", "Mutavault"); + + setChoice(playerA, "No"); // Don't untap the Shackles + setStopAt(3, PhaseStep.PRECOMBAT_MAIN); + execute(); + + // under control of Shackles even if it's no longer a creature + assertPermanentCount(playerB, "Mutavault", 0); + assertPermanentCount(playerA, "Mutavault", 1); + + } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/SagesReverieTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/SagesReverieTest.java new file mode 100644 index 00000000000..76ac28c6922 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/SagesReverieTest.java @@ -0,0 +1,88 @@ +/* + * 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 org.mage.test.cards.enchantments; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class SagesReverieTest extends CardTestPlayerBase { + + /* + 21:11: MarioPineda casts Sage's Reverie [26d] targeting face down creature + 21:11: Ability triggers: Sage's Reverie [26d] - When Sage's Reverie [26d] enters the battlefield, draw a card for each aura you control that's attached to a creature. + 21:11: mbvash casts Crackling Doom [b78] + 21:11: MarioPineda loses 2 life + 21:11: MarioPineda sacrificed face down creature + 21:11: mbvash puts Crackling Doom [b78] from stack into his or her graveyard + 21:11: Cloudform [9cd] is put into graveyard from battlefield + 21:11: Sage's Reverie [26d] is put into graveyard from battlefield + 21:11: MarioPineda draws two cards + + There were two other Auras on the battlefield, and Sage's Reverie made me draw two cards even though the creature it was going to enchant left the battlefield. + + http://www.mtgsalvation.com/forums/magic-fundamentals/magic-rulings/604851-sages-reverie-question + */ + @Test + public void testNoCardDrawIfTargetIllegal() { + addCard(Zone.BATTLEFIELD, playerA, "Plains", 5); + // Enchant creature + // When Sage's Reverie enters the battlefield, draw a card for each aura you control that's attached to a creature. + addCard(Zone.BATTLEFIELD, playerA, "Sage's Reverie", 1); // {3}{W} + // Enchant creature + // Enchanted creature has lifelink + addCard(Zone.HAND, playerA, "Lifelink", 1); // {W} + addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 1); + addCard(Zone.BATTLEFIELD, playerA, "Pillarfield Ox", 1); + + addCard(Zone.BATTLEFIELD, playerB, "Swamp", 3); + // Destroy target creature or planeswalker. + addCard(Zone.HAND, playerB, "Hero's Downfall"); // {1}{B}{B} + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lifelink", "Silvercoat Lion"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Sage's Reverie", "Pillarfield Ox"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Hero's Downfall", "Pillarfield Ox"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "Lifelink", 1); + assertGraveyardCount(playerB, "Hero's Downfall", 1); + assertGraveyardCount(playerA, "Pillarfield Ox", 1); + assertGraveyardCount(playerA, "Sage's Reverie", 1); + + assertHandCount(playerA, 0); + } + +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/mana/ConditionalManaTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/mana/ConditionalManaTest.java index d7a9ca20297..80560b23bec 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/mana/ConditionalManaTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/mana/ConditionalManaTest.java @@ -36,7 +36,6 @@ import org.mage.test.serverside.base.CardTestPlayerBase; * * @author LevelX2 */ - public class ConditionalManaTest extends CardTestPlayerBase { @Test @@ -47,11 +46,11 @@ public class ConditionalManaTest extends CardTestPlayerBase { // Target player gains 7 life. addCard(Zone.HAND, playerA, "Heroes' Reunion", 1); - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Heroes' Reunion", playerA); - + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Heroes' Reunion", playerA); + setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); - + assertGraveyardCount(playerA, "Heroes' Reunion", 1); assertHandCount(playerA, "Heroes' Reunion", 0); // player A could not cast it assertLife(playerA, 27); @@ -63,16 +62,16 @@ public class ConditionalManaTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Pillar of the Paruns", 2); addCard(Zone.HAND, playerA, "Silvercoat Lion", 1); - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Silvercoat Lion"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Silvercoat Lion"); playerA.addChoice("White"); playerA.addChoice("White"); - + setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); assertHandCount(playerA, "Silvercoat Lion", 1); // player A could not cast Silvercoat Lion because the conditional mana is not available } - + @Test public void testWorkingWithReflectingPool() { addCard(Zone.BATTLEFIELD, playerA, "Cavern of Souls", 1); @@ -80,13 +79,13 @@ public class ConditionalManaTest extends CardTestPlayerBase { addCard(Zone.HAND, playerA, "Silvercoat Lion", 1); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Silvercoat Lion"); - + setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); - assertPermanentCount(playerA, "Silvercoat Lion", 1); + assertPermanentCount(playerA, "Silvercoat Lion", 1); } - + @Test public void testWorkingWithReflectingPool2() { addCard(Zone.BATTLEFIELD, playerA, "Reflecting Pool", 1); // can create white mana without restriction from the Hive @@ -98,10 +97,48 @@ public class ConditionalManaTest extends CardTestPlayerBase { setChoice(playerA, "White"); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Silvercoat Lion"); - + setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); - - assertPermanentCount(playerA, "Silvercoat Lion", 1); - } + + assertPermanentCount(playerA, "Silvercoat Lion", 1); + } + + /** + * I wasunable to use "Rosheen Meanderer" ability to pay for "Candelabra of + * Tawnos" ability even thought it has "X" on its cost + */ + @Test + public void testRosheenMeandererUsingAbility() { + // Flying + addCard(Zone.HAND, playerB, "Snapping Drake", 2); // {3}{U} + // {T}: Add {4} to your mana pool. Spend this mana only on costs that contain {X}. + addCard(Zone.BATTLEFIELD, playerB, "Rosheen Meanderer", 1); + // {X}, {T}: Untap X target lands. + addCard(Zone.BATTLEFIELD, playerB, "Candelabra of Tawnos", 1); + + addCard(Zone.BATTLEFIELD, playerB, "Island", 4); + + castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Snapping Drake"); + + activateManaAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "{T}: Add {4}"); + + activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "{X},{T}: Untap"); + setChoice(playerB, "X=4"); + addTarget(playerB, "Island"); + addTarget(playerB, "Island"); + addTarget(playerB, "Island"); + addTarget(playerB, "Island"); + + castSpell(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "Snapping Drake"); + + setStopAt(2, PhaseStep.END_TURN); + execute(); + + assertTappedCount("Island", true, 4); + assertTappedCount("Rosheen Meanderer", true, 1); + assertTappedCount("Candelabra of Tawnos", true, 1); + + assertPermanentCount(playerB, "Snapping Drake", 2); + } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/mana/HybridManaTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/mana/HybridManaTest.java new file mode 100644 index 00000000000..d39028ab764 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/mana/HybridManaTest.java @@ -0,0 +1,62 @@ +/* + * 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 org.mage.test.cards.mana; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class HybridManaTest extends CardTestPlayerBase { + + @Test + public void testCastReaperKingMonoHybrid() { + addCard(Zone.BATTLEFIELD, playerA, "Island", 1); + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1); + addCard(Zone.BATTLEFIELD, playerA, "Forest", 1); + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1); + addCard(Zone.BATTLEFIELD, playerA, "Plains", 1); + + // Other Scarecrow creatures you control get +1/+1. + // Whenever another Scarecrow enters the battlefield under your control, destroy target permanent. + addCard(Zone.HAND, playerA, "Reaper King", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Reaper King"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "Reaper King", 1); + + } + +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/DrawTriggeredTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/DrawTriggeredTest.java new file mode 100644 index 00000000000..38bed27ca82 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/DrawTriggeredTest.java @@ -0,0 +1,71 @@ +/* + * 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 org.mage.test.cards.triggers; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class DrawTriggeredTest extends CardTestPlayerBase { + + /* + * Day's Undoing - Doesn't create card draw triggers "Specifically, it + * doesn't work with Chasm Skulker. + * + * Steps to reproduce: + 1) Have Chasm Skulker on the battlefield. + 2) Cast Day's Undoing. + 3) You will draw 7 cards, but Chasm Skulker's ""when you draw a card"" trigger does not trigger." ==> What is correct + */ + @Test + public void DaysUndoingTriggeredDrewEventAreRemovedTest() { + // Each player shuffles his or her hand and graveyard into his or her library, then draws seven cards. If it's your turn, end the turn. + addCard(Zone.HAND, playerA, "Day's Undoing"); + addCard(Zone.BATTLEFIELD, playerA, "Island", 3); + + // Whenever you draw a card, put a +1/+1 counter on Chasm Skulker. + // When Chasm Skulker dies, put X 1/1 blue Squid creature tokens with islandwalk onto the battlefield, where X is the number of +1/+1 counters on Chasm Skulker. + addCard(Zone.BATTLEFIELD, playerB, "Chasm Skulker", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Day's Undoing"); + + setStopAt(2, PhaseStep.UNTAP); + execute(); + + assertExileCount("Day's Undoing", 1); + assertPermanentCount(playerB, "Chasm Skulker", 1); + assertPowerToughness(playerB, "Chasm Skulker", 1, 1); + + } + +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/ReturnToHandEffectsTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/ReturnToHandEffectsTest.java index 9159d14fd9d..63fff00ea54 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/ReturnToHandEffectsTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/ReturnToHandEffectsTest.java @@ -36,7 +36,6 @@ import org.mage.test.serverside.base.CardTestPlayerBase; * * @author LevelX2 */ - public class ReturnToHandEffectsTest extends CardTestPlayerBase { /** @@ -49,24 +48,59 @@ public class ReturnToHandEffectsTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2); // Play with your hand revealed. // If you would draw a card, reveal the top card of your library instead. If it's a creature card, put it into your graveyard. Otherwise, draw a card. - // Whenever a creature is put into your graveyard from the battlefield, return it to your hand. + // Whenever a creature is put into your graveyard from the battlefield, return it to your hand. addCard(Zone.BATTLEFIELD, playerA, "Enduring Renewal"); // {T}, Sacrifice an artifact: Target player puts the top three cards of his or her library into his or her graveyard. - // Whenever an artifact enters the battlefield, you may untap Grinding Station. + // Whenever an artifact enters the battlefield, you may untap Grinding Station. addCard(Zone.BATTLEFIELD, playerA, "Grinding Station", 1); addCard(Zone.BATTLEFIELD, playerA, "Ornithopter", 1); activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}, Sacrifice an artifact", playerB); - // addTarget(playerA, "Ornithopter"); + // addTarget(playerA, "Ornithopter"); setChoice(playerA, "Ornithopter"); setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); - assertGraveyardCount(playerB, 3); + assertGraveyardCount(playerB, 3); assertHandCount(playerA, "Ornithopter", 1); - + } - + + @Test + public void testStormfrontRidersTriggerForToken() { + addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 2); + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 5); + addCard(Zone.BATTLEFIELD, playerA, "Plains", 1); + // Flying + // When Stormfront Riders enters the battlefield, return two creatures you control to their owner's hand. + // Whenever Stormfront Riders or another creature is returned to your hand from the battlefield, put a 1/1 white Soldier creature token onto the battlefield. + addCard(Zone.HAND, playerA, "Stormfront Riders"); // {4}{W} + // Buyback {4} (You may pay an additional {4} as you cast this spell. If you do, put this card into your hand as it resolves.) + // Put a 1/1 black Rat creature token onto the battlefield. + addCard(Zone.HAND, playerA, "Lab Rats"); // {B} + + addCard(Zone.BATTLEFIELD, playerB, "Island", 2); + addCard(Zone.HAND, playerB, "Boomerang", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Stormfront Riders"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lab Rats"); + setChoice(playerA, "No"); + + castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Boomerang", "Rat"); + + setStopAt(1, PhaseStep.END_TURN); + execute(); + + assertPermanentCount(playerA, "Stormfront Riders", 1); + assertPermanentCount(playerA, "Rat", 0); + assertHandCount(playerA, "Silvercoat Lion", 2); + assertGraveyardCount(playerA, "Lab Rats", 1); + assertGraveyardCount(playerB, "Boomerang", 1); + + assertPermanentCount(playerA, "Soldier", 3); + + } + } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/UlamogTheInfiniteGyreTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/UlamogTheInfiniteGyreTest.java index 44a39cd25c7..dfde867688b 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/UlamogTheInfiniteGyreTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/UlamogTheInfiniteGyreTest.java @@ -36,11 +36,11 @@ import org.mage.test.serverside.base.CardTestPlayerBase; * * @author LevelX2 */ - public class UlamogTheInfiniteGyreTest extends CardTestPlayerBase { /** - * Tests if Ulamog, the Infinite Gyre is countered its triggered ability resolves anyway + * Tests if Ulamog, the Infinite Gyre is countered its triggered ability + * resolves anyway */ @Test public void testDisabledEffectOnChangeZone() { @@ -57,11 +57,57 @@ public class UlamogTheInfiniteGyreTest extends CardTestPlayerBase { setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); - assertHandCount(playerA, "Ulamog, the Infinite Gyre", 0); assertPermanentCount(playerA, "Ulamog, the Infinite Gyre", 0); assertGraveyardCount(playerB, "Counterspell", 1); assertPermanentCount(playerB, "Island", 1); } + /** + * If one of the big eldrazi is under the control of someone that is not its + * owner when it goes to the graveyard, it's ability doesn't trigger + * correctly. + */ + @Test + public void testControlledByOtherPlayer() { + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 15); + // When you cast Kozilek, Butcher of Truth, draw four cards. + // Annihilator 4 (Whenever this creature attacks, defending player sacrifices four permanents.) + // When Kozilek is put into a graveyard from anywhere, its owner shuffles his or her graveyard into his or her library. + addCard(Zone.HAND, playerA, "Kozilek, Butcher of Truth"); // {10} + // Destroy target creature. + // Spell mastery - If there are two or more instant and/or sorcery cards in your graveyard, you gain 2 life. + addCard(Zone.HAND, playerA, "Unholy Hunger"); // {3}{B}{B} + addCard(Zone.GRAVEYARD, playerA, "Silvercoat Lion"); + + addCard(Zone.BATTLEFIELD, playerB, "Island", 4); + addCard(Zone.HAND, playerB, "Control Magic", 1); + addCard(Zone.GRAVEYARD, playerB, "Silvercoat Lion"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Kozilek, Butcher of Truth"); + + castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Control Magic", "Kozilek, Butcher of Truth"); + castSpell(2, PhaseStep.POSTCOMBAT_MAIN, playerA, "Unholy Hunger", "Kozilek, Butcher of Truth"); + setStopAt(2, PhaseStep.END_TURN); + execute(); + + assertPermanentCount(playerA, "Kozilek, Butcher of Truth", 0); + assertPermanentCount(playerB, "Kozilek, Butcher of Truth", 0); + + assertLife(playerA, 20); + + assertGraveyardCount(playerB, "Silvercoat Lion", 1); + assertHandCount(playerB, "Control Magic", 0); + assertGraveyardCount(playerB, "Control Magic", 1); + + assertGraveyardCount(playerA, "Kozilek, Butcher of Truth", 0); + + assertHandCount(playerA, "Kozilek, Butcher of Truth", 0); + assertGraveyardCount(playerA, "Silvercoat Lion", 0); + + assertGraveyardCount(playerA, "Unholy Hunger", 0); + + assertHandCount(playerA, 4); + + } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/delayed/OnduRisingTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/delayed/OnduRisingTest.java new file mode 100644 index 00000000000..d6b92fe2fee --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/delayed/OnduRisingTest.java @@ -0,0 +1,71 @@ +/* + * 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 org.mage.test.cards.triggers.delayed; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class OnduRisingTest extends CardTestPlayerBase { + + @Test + public void testLiflinkGained() { + addCard(Zone.BATTLEFIELD, playerB, "Plains", 5); + addCard(Zone.BATTLEFIELD, playerB, "Mountain", 1); + addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1); + // Whenever a creature attacks this turn, it gains lifelink until end of turn. + // Awaken 4—{4}{W} + addCard(Zone.HAND, playerB, "Ondu Rising", 1); + + activateManaAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{T}: Add {W}"); + activateManaAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{T}: Add {W}"); + activateManaAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{T}: Add {W}"); + activateManaAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{T}: Add {W}"); + activateManaAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{T}: Add {W}"); + + castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Ondu Rising with awaken"); + + attack(2, playerB, "Silvercoat Lion"); + attack(2, playerB, "Mountain"); + + setStopAt(2, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertGraveyardCount(playerB, "Ondu Rising", 1); + assertPowerToughness(playerB, "Mountain", 4, 4); + + assertLife(playerA, 14); + assertLife(playerB, 26); + } + +} diff --git a/Mage.Tests/src/test/java/org/mage/test/serverside/base/impl/CardTestPlayerAPIImpl.java b/Mage.Tests/src/test/java/org/mage/test/serverside/base/impl/CardTestPlayerAPIImpl.java index 1114d2d0732..bc7f74a40f4 100644 --- a/Mage.Tests/src/test/java/org/mage/test/serverside/base/impl/CardTestPlayerAPIImpl.java +++ b/Mage.Tests/src/test/java/org/mage/test/serverside/base/impl/CardTestPlayerAPIImpl.java @@ -574,7 +574,7 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement } } } - Assert.assertEquals("(Battlefield) Card counts are not equal (" + cardName + ")", count, actualCount); + Assert.assertEquals("(Battlefield) Card counts for " + player.getName() + " are not equal (" + cardName + ")", count, actualCount); } @Override @@ -858,7 +858,7 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement } } - Assert.assertEquals("(Graveyard) Card counts are not equal (" + cardName + ")", count, actualCount); + Assert.assertEquals("(Graveyard " + player.getName() + ") Card counts are not equal (" + cardName + ")", count, actualCount); } /** @@ -935,7 +935,8 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement * @param step * @param player * @param cardName - * @param targetName + * @param targetName for modal spells add the mode to the name e.g. + * "mode=2SilvercoatLion^mode3=PillarfieldOx" * @param spellOnStack */ public void castSpell(int turnNum, PhaseStep step, TestPlayer player, String cardName, String targetName, String spellOnStack) { diff --git a/Mage/src/mage/abilities/AbilityImpl.java b/Mage/src/mage/abilities/AbilityImpl.java index 838204cfa09..50746636057 100644 --- a/Mage/src/mage/abilities/AbilityImpl.java +++ b/Mage/src/mage/abilities/AbilityImpl.java @@ -759,9 +759,7 @@ public abstract class AbilityImpl implements Ability { sbRule.append(": "); } } - if (abilityWord != null) { - sbRule.insert(0, new StringBuilder("").append(abilityWord.toString()).append(" — ")); - } + String ruleStart = sbRule.toString(); String text = modes.getText(); String rule; @@ -779,6 +777,9 @@ public abstract class AbilityImpl implements Ability { } else { rule = ruleStart; } + if (abilityWord != null) { + rule = "" + abilityWord + " — " + Character.toUpperCase(rule.charAt(0)) + rule.substring(1); + } return rule; } diff --git a/Mage/src/mage/abilities/common/AttacksTriggeredAbility.java b/Mage/src/mage/abilities/common/AttacksTriggeredAbility.java index c7e021de865..7d25d03291f 100644 --- a/Mage/src/mage/abilities/common/AttacksTriggeredAbility.java +++ b/Mage/src/mage/abilities/common/AttacksTriggeredAbility.java @@ -1,16 +1,16 @@ /* * 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 @@ -20,12 +20,11 @@ * 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.common; import java.util.UUID; @@ -42,14 +41,14 @@ import mage.target.targetpointer.FixedTarget; * @author BetaSteward_at_googlemail.com */ public class AttacksTriggeredAbility extends TriggeredAbilityImpl { - + protected SetTargetPointer setTargetPointer; protected String text; public AttacksTriggeredAbility(Effect effect, boolean optional) { this(effect, optional, null); } - + public AttacksTriggeredAbility(Effect effect, boolean optional, String text) { this(effect, optional, text, SetTargetPointer.NONE); } @@ -73,12 +72,12 @@ public class AttacksTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { - if (game.getCombat().getAttackers().contains(this.getSourceId()) ) { - switch(setTargetPointer) { + if (game.getCombat().getAttackers().contains(this.getSourceId())) { + switch (setTargetPointer) { case PLAYER: UUID defendingPlayerId = game.getCombat().getDefendingPlayerId(getSourceId(), game); if (defendingPlayerId != null) { - for (Effect effect: getEffects()) { + for (Effect effect : getEffects()) { effect.setTargetPointer(new FixedTarget(defendingPlayerId)); } } @@ -93,7 +92,7 @@ public class AttacksTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { if (text == null || text.isEmpty()) { - return "When {this} attacks, " + super.getRule(); + return "Whenever {this} attacks, " + super.getRule(); } return text; } diff --git a/Mage/src/mage/abilities/common/LandfallAbility.java b/Mage/src/mage/abilities/common/LandfallAbility.java index db19efb0ffd..17560ca6926 100644 --- a/Mage/src/mage/abilities/common/LandfallAbility.java +++ b/Mage/src/mage/abilities/common/LandfallAbility.java @@ -1,40 +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. -*/ - + * 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.common; -import mage.constants.CardType; -import mage.constants.Zone; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; +import mage.constants.CardType; +import mage.constants.SetTargetPointer; +import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; +import mage.target.targetpointer.FixedTarget; /** * @@ -42,16 +43,26 @@ import mage.game.permanent.Permanent; */ public class LandfallAbility extends TriggeredAbilityImpl { + protected SetTargetPointer setTargetPointer; + protected Permanent triggeringLand; + public LandfallAbility(Effect effect, boolean optional) { - this(Zone.BATTLEFIELD, effect, optional); + this(Zone.BATTLEFIELD, effect, optional); } - public LandfallAbility (Zone zone, Effect effect, Boolean optional ) { + public LandfallAbility(Zone zone, Effect effect, Boolean optional) { + this(zone, effect, optional, SetTargetPointer.NONE); + } + + public LandfallAbility(Zone zone, Effect effect, Boolean optional, SetTargetPointer setTargetPointer) { super(zone, effect, optional); + this.setTargetPointer = setTargetPointer; } public LandfallAbility(final LandfallAbility ability) { super(ability); + this.setTargetPointer = ability.setTargetPointer; + this.triggeringLand = ability.triggeringLand; } @Override @@ -62,7 +73,18 @@ public class LandfallAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Permanent permanent = game.getPermanent(event.getTargetId()); - return permanent != null && permanent.getCardType().contains(CardType.LAND) && permanent.getControllerId().equals(this.controllerId); + if (permanent != null + && permanent.getCardType().contains(CardType.LAND) + && permanent.getControllerId().equals(this.controllerId)) { + triggeringLand = permanent; + if (setTargetPointer.equals(SetTargetPointer.PERMANENT)) { + for (Effect effect : getEffects()) { + effect.setTargetPointer(new FixedTarget(permanent, game)); + } + } + return true; + } + return false; } @Override @@ -75,4 +97,7 @@ public class LandfallAbility extends TriggeredAbilityImpl { return new LandfallAbility(this); } + public Permanent getTriggeringPermanent() { + return triggeringLand; + } } diff --git a/Mage/src/mage/abilities/common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java b/Mage/src/mage/abilities/common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java index 45b41aec3ef..835cfeb2c2d 100644 --- a/Mage/src/mage/abilities/common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java +++ b/Mage/src/mage/abilities/common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java @@ -60,7 +60,7 @@ public class PutIntoGraveFromBattlefieldAllTriggeredAbility extends TriggeredAbi public PutIntoGraveFromBattlefieldAllTriggeredAbility(final PutIntoGraveFromBattlefieldAllTriggeredAbility ability) { super(ability); this.filter = ability.filter; - this.onlyToControllerGraveyard = ability.onlyToControllerGraveyard; + this.onlyToControllerGraveyard = ability.onlyToControllerGraveyard; this.setTargetPointer = ability.setTargetPointer; } @@ -73,8 +73,11 @@ public class PutIntoGraveFromBattlefieldAllTriggeredAbility extends TriggeredAbi public boolean checkTrigger(GameEvent event, Game game) { ZoneChangeEvent zEvent = (ZoneChangeEvent) event; if (zEvent.getFromZone() == Zone.BATTLEFIELD - && zEvent.getToZone() == Zone.GRAVEYARD) { + && zEvent.getToZone() == Zone.GRAVEYARD) { if (filter.match(zEvent.getTarget(), this.getSourceId(), this.getControllerId(), game)) { + if(onlyToControllerGraveyard && !this.getControllerId().equals(game.getOwnerId(zEvent.getTargetId()))) { + return false; + } if (setTargetPointer) { for (Effect effect :this.getEffects()) { effect.setTargetPointer(new FixedTarget(event.getTargetId())); diff --git a/Mage/src/mage/abilities/costs/common/ExileOpponentsCardFromExileToGraveyardCost.java b/Mage/src/mage/abilities/costs/common/ExileOpponentsCardFromExileToGraveyardCost.java new file mode 100644 index 00000000000..94e498b2e3d --- /dev/null +++ b/Mage/src/mage/abilities/costs/common/ExileOpponentsCardFromExileToGraveyardCost.java @@ -0,0 +1,76 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package mage.abilities.costs.common; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.costs.CostImpl; +import mage.cards.Card; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.other.OwnerPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetCardInExile; + +/** + * + * @author LevelX2 + */ +public class ExileOpponentsCardFromExileToGraveyardCost extends CostImpl { + + public ExileOpponentsCardFromExileToGraveyardCost(boolean thatPlayersText) { + if (false) { + this.text = "put a card an opponent owns from exile into its owner's graveyard"; + } else { + this.text = "put a card an opponent owns from exile into that player's graveyard"; + } + } + + public ExileOpponentsCardFromExileToGraveyardCost(ExileOpponentsCardFromExileToGraveyardCost cost) { + super(cost); + } + + @Override + public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) { + Player controller = game.getPlayer(controllerId); + if (controller != null) { + FilterCard filter = new FilterCard(); + filter.add(new OwnerPredicate(TargetController.OPPONENT)); + Target target = new TargetCardInExile(filter); + if (controller.chooseTarget(Outcome.Damage, target, ability, game)) { + Card card = game.getCard(target.getFirstTarget()); + if (card != null) { + paid = true; + controller.moveCards(card, null, Zone.GRAVEYARD, ability, game); + } + } + } + return paid; + } + + @Override + public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { + Player controller = game.getPlayer(controllerId); + if (controller != null) { + for (Card card : game.getExile().getAllCards(game)) { + if (controller.hasOpponent(card.getOwnerId(), game)) { + return true; + } + } + } + return false; + } + + @Override + public ExileOpponentsCardFromExileToGraveyardCost copy() { + return new ExileOpponentsCardFromExileToGraveyardCost(this); + } + +} diff --git a/Mage/src/mage/abilities/costs/common/PutTopCardOfYourLibraryToGraveyardCost.java b/Mage/src/mage/abilities/costs/common/PutTopCardOfYourLibraryToGraveyardCost.java index bd097d47ab7..2b1b4f28595 100644 --- a/Mage/src/mage/abilities/costs/common/PutTopCardOfYourLibraryToGraveyardCost.java +++ b/Mage/src/mage/abilities/costs/common/PutTopCardOfYourLibraryToGraveyardCost.java @@ -25,26 +25,16 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.abilities.costs.common; import java.util.UUID; -import mage.constants.Zone; import mage.abilities.Ability; import mage.abilities.costs.CostImpl; -import mage.cards.Card; -import mage.cards.Cards; -import mage.cards.CardsImpl; +import mage.constants.Zone; import mage.game.Game; import mage.players.Player; import mage.util.CardUtil; -/** - * - * @author LevelX2 - */ - - public class PutTopCardOfYourLibraryToGraveyardCost extends CostImpl { int numberOfCards; diff --git a/Mage/src/mage/abilities/costs/common/ReturnToHandTargetPermanentCost.java b/Mage/src/mage/abilities/costs/common/ReturnToHandChosenControlledPermanentCost.java similarity index 88% rename from Mage/src/mage/abilities/costs/common/ReturnToHandTargetPermanentCost.java rename to Mage/src/mage/abilities/costs/common/ReturnToHandChosenControlledPermanentCost.java index 6a0e383c83f..238377fdf4b 100644 --- a/Mage/src/mage/abilities/costs/common/ReturnToHandTargetPermanentCost.java +++ b/Mage/src/mage/abilities/costs/common/ReturnToHandChosenControlledPermanentCost.java @@ -40,9 +40,10 @@ import mage.target.common.TargetControlledPermanent; * * @author BetaSteward_at_googlemail.com */ -public class ReturnToHandTargetPermanentCost extends CostImpl { +public class ReturnToHandChosenControlledPermanentCost extends CostImpl { - public ReturnToHandTargetPermanentCost(TargetControlledPermanent target) { + public ReturnToHandChosenControlledPermanentCost(TargetControlledPermanent target) { + target.setNotTarget(true); this.addTarget(target); if (target.getMaxNumberOfTargets() > 1 && target.getMaxNumberOfTargets() == target.getNumberOfTargets()) { this.text = new StringBuilder("return ").append(target.getMaxNumberOfTargets()).append(" ").append(target.getTargetName()).append(" you control to its owner's hand").toString(); @@ -51,7 +52,7 @@ public class ReturnToHandTargetPermanentCost extends CostImpl { } } - public ReturnToHandTargetPermanentCost(ReturnToHandTargetPermanentCost cost) { + public ReturnToHandChosenControlledPermanentCost(ReturnToHandChosenControlledPermanentCost cost) { super(cost); } @@ -78,8 +79,8 @@ public class ReturnToHandTargetPermanentCost extends CostImpl { } @Override - public ReturnToHandTargetPermanentCost copy() { - return new ReturnToHandTargetPermanentCost(this); + public ReturnToHandChosenControlledPermanentCost copy() { + return new ReturnToHandChosenControlledPermanentCost(this); } } diff --git a/Mage/src/mage/abilities/costs/common/SacrificeTargetCost.java b/Mage/src/mage/abilities/costs/common/SacrificeTargetCost.java index 96f21b26ec7..be90768d5fd 100644 --- a/Mage/src/mage/abilities/costs/common/SacrificeTargetCost.java +++ b/Mage/src/mage/abilities/costs/common/SacrificeTargetCost.java @@ -1,16 +1,16 @@ /* * 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 @@ -20,12 +20,11 @@ * 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.costs.common; import java.util.ArrayList; @@ -51,16 +50,17 @@ public class SacrificeTargetCost extends CostImpl { public SacrificeTargetCost(TargetControlledPermanent target) { this.addTarget(target); target.setNotTarget(true); // sacrifice is never targeted - this.text = "Sacrifice " + target.getTargetName(); + this.text = "sacrifice " + target.getTargetName(); + target.setTargetName(target.getTargetName() + " (to sacrifice)"); } - + public SacrificeTargetCost(TargetControlledPermanent target, boolean noText) { this.addTarget(target); } public SacrificeTargetCost(SacrificeTargetCost cost) { super(cost); - for (Permanent permanent: cost.permanents) { + for (Permanent permanent : cost.permanents) { this.permanents.add(permanent.copy()); } } @@ -69,10 +69,10 @@ public class SacrificeTargetCost extends CostImpl { public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) { UUID activator = controllerId; if (ability.getAbilityType().equals(AbilityType.ACTIVATED) || ability.getAbilityType().equals(AbilityType.SPECIAL_ACTION)) { - activator = ((ActivatedAbilityImpl)ability).getActivatorId(); + activator = ((ActivatedAbilityImpl) ability).getActivatorId(); } if (targets.choose(Outcome.Sacrifice, activator, sourceId, game)) { - for (UUID targetId: targets.get(0).getTargets()) { + for (UUID targetId : targets.get(0).getTargets()) { Permanent permanent = game.getPermanent(targetId); if (permanent == null) { return false; @@ -91,8 +91,8 @@ public class SacrificeTargetCost extends CostImpl { public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { UUID activator = controllerId; if (ability.getAbilityType().equals(AbilityType.ACTIVATED) || ability.getAbilityType().equals(AbilityType.SPECIAL_ACTION)) { - if (((ActivatedAbilityImpl)ability).getActivatorId() != null) { - activator = ((ActivatedAbilityImpl)ability).getActivatorId(); + if (((ActivatedAbilityImpl) ability).getActivatorId() != null) { + activator = ((ActivatedAbilityImpl) ability).getActivatorId(); } else { // Aktivator not filled? activator = controllerId; diff --git a/Mage/src/mage/abilities/costs/common/TapTargetCost.java b/Mage/src/mage/abilities/costs/common/TapTargetCost.java index a793bd6e3ba..749eea7aff5 100644 --- a/Mage/src/mage/abilities/costs/common/TapTargetCost.java +++ b/Mage/src/mage/abilities/costs/common/TapTargetCost.java @@ -1,16 +1,16 @@ /* * 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 @@ -20,12 +20,11 @@ * 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.costs.common; import java.util.List; @@ -49,10 +48,10 @@ public class TapTargetCost extends CostImpl { public TapTargetCost(TargetControlledPermanent target) { this.target = target; this.target.setNotTarget(true); // costs are never targeted - this.text = - new StringBuilder("Tap ") - .append(target.getTargetName().startsWith("a ") || target.getTargetName().startsWith("an ") ? "":CardUtil.numberToText(target.getMaxNumberOfTargets())) - .append(" ") + this.text + = new StringBuilder("Tap ") + .append((target.getTargetName().startsWith("a ") || target.getTargetName().startsWith("an ") || target.getTargetName().startsWith("another")) + ? "" : CardUtil.numberToText(target.getMaxNumberOfTargets()) + " ") .append(target.getTargetName()).toString(); } @@ -64,7 +63,7 @@ public class TapTargetCost extends CostImpl { @Override public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) { if (target.choose(Outcome.Tap, controllerId, sourceId, game)) { - for (UUID targetId: (List)target.getTargets()) { + for (UUID targetId : (List) target.getTargets()) { Permanent permanent = game.getPermanent(targetId); if (permanent == null) { return false; @@ -85,5 +84,4 @@ public class TapTargetCost extends CostImpl { return new TapTargetCost(this); } - } diff --git a/Mage/src/mage/abilities/costs/mana/ManaCostsImpl.java b/Mage/src/mage/abilities/costs/mana/ManaCostsImpl.java index c6d7654244a..5c6cb083be8 100644 --- a/Mage/src/mage/abilities/costs/mana/ManaCostsImpl.java +++ b/Mage/src/mage/abilities/costs/mana/ManaCostsImpl.java @@ -228,30 +228,62 @@ public class ManaCostsImpl extends ArrayList implements M for (ManaCost cost : this) { if (!cost.isPaid() && cost instanceof ColoredManaCost) { cost.assignPayment(game, ability, pool); + if (pool.count() == 0) { + return; + } } } for (ManaCost cost : this) { if (!cost.isPaid() && cost instanceof HybridManaCost) { cost.assignPayment(game, ability, pool); + if (pool.count() == 0) { + return; + } } } + // Mono Hybrid mana costs + // First try only to pay colored mana with the pool + for (ManaCost cost : this) { + if (!cost.isPaid() && cost instanceof MonoHybridManaCost) { + if (((((MonoHybridManaCost) cost).containsColor(ColoredManaSymbol.W)) && pool.getWhite() > 0) + || ((((MonoHybridManaCost) cost).containsColor(ColoredManaSymbol.B)) && pool.getBlack() > 0) + || ((((MonoHybridManaCost) cost).containsColor(ColoredManaSymbol.R)) && pool.getRed() > 0) + || ((((MonoHybridManaCost) cost).containsColor(ColoredManaSymbol.G)) && pool.getGreen() > 0) + || ((((MonoHybridManaCost) cost).containsColor(ColoredManaSymbol.U)) && pool.getBlue() > 0)) { + cost.assignPayment(game, ability, pool); + if (pool.count() == 0) { + return; + } + } + } + } + // if colored didn't fit pay colorless with the mana for (ManaCost cost : this) { if (!cost.isPaid() && cost instanceof MonoHybridManaCost) { cost.assignPayment(game, ability, pool); + if (pool.count() == 0) { + return; + } } } for (ManaCost cost : this) { if (!cost.isPaid() && cost instanceof SnowManaCost) { cost.assignPayment(game, ability, pool); + if (pool.count() == 0) { + return; + } } } for (ManaCost cost : this) { if (!cost.isPaid() && cost instanceof GenericManaCost) { cost.assignPayment(game, ability, pool); + if (pool.count() == 0) { + return; + } } } diff --git a/Mage/src/mage/abilities/effects/common/AddConditionalColorlessManaEffect.java b/Mage/src/mage/abilities/effects/common/AddConditionalColorlessManaEffect.java index 495d234b7a5..7e0de77c756 100644 --- a/Mage/src/mage/abilities/effects/common/AddConditionalColorlessManaEffect.java +++ b/Mage/src/mage/abilities/effects/common/AddConditionalColorlessManaEffect.java @@ -3,7 +3,6 @@ * To change this template file, choose Tools | Templates * and open the template in the editor. */ - package mage.abilities.effects.common; import mage.Mana; @@ -16,7 +15,6 @@ import mage.players.Player; * * @author LevelX2 */ - public class AddConditionalColorlessManaEffect extends ManaEffect { private final int amount; @@ -26,7 +24,7 @@ public class AddConditionalColorlessManaEffect extends ManaEffect { super(); this.amount = amount; this.manaBuilder = manaBuilder; - staticText = "Add {" + amount + "} to your mana pool. " + manaBuilder.getRule(); + staticText = "Add {" + amount + "} to your mana pool. " + manaBuilder.getRule(); } public AddConditionalColorlessManaEffect(final AddConditionalColorlessManaEffect effect) { @@ -54,4 +52,8 @@ public class AddConditionalColorlessManaEffect extends ManaEffect { public Mana getMana(Game game, Ability source) { return manaBuilder.setMana(Mana.ColorlessMana(amount), source, game).build(); } + + public Mana getMana() { + return new Mana(0, 0, 0, 0, 0, amount, 0); + } } diff --git a/Mage/src/mage/abilities/effects/common/DestroyAllEffect.java b/Mage/src/mage/abilities/effects/common/DestroyAllEffect.java index 6546b17f8ae..51331c4e819 100644 --- a/Mage/src/mage/abilities/effects/common/DestroyAllEffect.java +++ b/Mage/src/mage/abilities/effects/common/DestroyAllEffect.java @@ -42,6 +42,10 @@ public class DestroyAllEffect extends OneShotEffect { private FilterPermanent filter; private boolean noRegen; + public DestroyAllEffect(FilterPermanent filter) { + this(filter, false); + } + public DestroyAllEffect(FilterPermanent filter, boolean noRegen) { super(Outcome.DestroyPermanent); this.filter = filter; @@ -53,10 +57,6 @@ public class DestroyAllEffect extends OneShotEffect { } } - public DestroyAllEffect(FilterPermanent filter) { - this(filter, false); - } - public DestroyAllEffect(final DestroyAllEffect effect) { super(effect); this.filter = effect.filter.copy(); @@ -70,7 +70,6 @@ public class DestroyAllEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { permanent.destroy(source.getSourceId(), game, noRegen); } diff --git a/Mage/src/mage/abilities/effects/common/DoIfCostPaid.java b/Mage/src/mage/abilities/effects/common/DoIfCostPaid.java index 35ff9555c63..2d33c3d7484 100644 --- a/Mage/src/mage/abilities/effects/common/DoIfCostPaid.java +++ b/Mage/src/mage/abilities/effects/common/DoIfCostPaid.java @@ -94,6 +94,7 @@ public class DoIfCostPaid extends OneShotEffect { StringBuilder sb = new StringBuilder(); String costText = cost.getText(); if (costText != null + && !costText.toLowerCase().startsWith("put") && !costText.toLowerCase().startsWith("exile") && !costText.toLowerCase().startsWith("discard") && !costText.toLowerCase().startsWith("sacrifice") diff --git a/Mage/src/mage/abilities/effects/common/DontUntapInControllersNextUntapStepTargetEffect.java b/Mage/src/mage/abilities/effects/common/DontUntapInControllersNextUntapStepTargetEffect.java index 44403167deb..e679a45d44b 100644 --- a/Mage/src/mage/abilities/effects/common/DontUntapInControllersNextUntapStepTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/DontUntapInControllersNextUntapStepTargetEffect.java @@ -148,7 +148,7 @@ public class DontUntapInControllersNextUntapStepTargetEffect extends ContinuousR if (targetName != null && targetName.length() > 0) { return targetName + " doesn't untap during its controller's next untap step"; } else { - return "Target " + (mode == null ? "creature" : mode.getTargets().get(0).getTargetName()) + " doesn't untap during its controller's next untap step"; + return "target " + (mode == null ? "creature" : mode.getTargets().get(0).getTargetName()) + " doesn't untap during its controller's next untap step"; } } diff --git a/Mage/src/mage/abilities/effects/common/DrawCardSourceControllerEffect.java b/Mage/src/mage/abilities/effects/common/DrawCardSourceControllerEffect.java index 00ce366db90..2a152eebc1d 100644 --- a/Mage/src/mage/abilities/effects/common/DrawCardSourceControllerEffect.java +++ b/Mage/src/mage/abilities/effects/common/DrawCardSourceControllerEffect.java @@ -1,16 +1,16 @@ /* * 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 @@ -20,20 +20,19 @@ * 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.Outcome; import mage.abilities.Ability; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.OneShotEffect; +import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; import mage.util.CardUtil; @@ -78,7 +77,7 @@ public class DrawCardSourceControllerEffect extends OneShotEffect { private void setText() { StringBuilder sb = new StringBuilder(); boolean oneCard = (amount instanceof StaticValue && amount.calculate(null, null, this) == 1) - || amount instanceof PermanentsOnBattlefieldCount || amount.toString().equals("1"); + || amount instanceof PermanentsOnBattlefieldCount || amount.toString().equals("1"); sb.append("draw ").append(oneCard ? "a" : CardUtil.numberToText(amount.toString())).append(" card"); if (!oneCard) { sb.append("s"); @@ -91,5 +90,4 @@ public class DrawCardSourceControllerEffect extends OneShotEffect { staticText = sb.toString(); } - } diff --git a/Mage/src/mage/abilities/effects/common/DrawDiscardControllerEffect.java b/Mage/src/mage/abilities/effects/common/DrawDiscardControllerEffect.java index 811addcd588..a710d9aff7e 100644 --- a/Mage/src/mage/abilities/effects/common/DrawDiscardControllerEffect.java +++ b/Mage/src/mage/abilities/effects/common/DrawDiscardControllerEffect.java @@ -57,10 +57,12 @@ public class DrawDiscardControllerEffect extends OneShotEffect { this.cardsToDraw = cardsToDraw; this.cardsToDiscard = cardsToDiscard; this.optional = optional; - staticText = new StringBuilder("Draw ") + staticText = new StringBuilder(optional ? "you may " : "") + .append("draw ") .append(cardsToDraw == 1 ? "a" : CardUtil.numberToText(cardsToDraw)) .append(" card").append(cardsToDraw == 1 ? "" : "s") - .append(", then discard ") + .append(optional ? ", if you do" : ", then") + .append(" discard ") .append(cardsToDiscard == 1 ? "a" : CardUtil.numberToText(cardsToDiscard)) .append(" card").append(cardsToDiscard == 1 ? "" : "s").toString(); } diff --git a/Mage/src/mage/abilities/effects/common/EntersBattlefieldWithXCountersEffect.java b/Mage/src/mage/abilities/effects/common/EntersBattlefieldWithXCountersEffect.java new file mode 100644 index 00000000000..999e70423dc --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/EntersBattlefieldWithXCountersEffect.java @@ -0,0 +1,85 @@ +/* + * 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.abilities.Ability; +import mage.abilities.SpellAbility; +import mage.abilities.effects.EntersBattlefieldEffect; +import mage.abilities.effects.OneShotEffect; +import mage.constants.Outcome; +import mage.counters.Counter; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * Use this effect only (I guess) with EntersBattlefieldAbility like abilities + * + * @author LevelX2 + */ +public class EntersBattlefieldWithXCountersEffect extends OneShotEffect { + + protected final Counter counter; + + public EntersBattlefieldWithXCountersEffect(Counter counter) { + super(Outcome.BoostCreature); + this.counter = counter; + staticText = "with X " + counter.getName() + " counters on it"; + } + + public EntersBattlefieldWithXCountersEffect(final EntersBattlefieldWithXCountersEffect effect) { + super(effect); + this.counter = effect.counter; + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null) { + SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); + if (spellAbility != null + && spellAbility.getSourceId().equals(source.getSourceId()) + && permanent.getZoneChangeCounter(game) - 1 == spellAbility.getSourceObjectZoneChangeCounter()) { + if (spellAbility.getSourceId().equals(source.getSourceId())) { // put into play by normal cast + int amount = spellAbility.getManaCostsToPay().getX(); + if (amount > 0) { + Counter counterToAdd = counter.copy(); + counterToAdd.add(amount - counter.getCount()); + permanent.addCounters(counterToAdd, game); + } + } + } + } + return true; + } + + @Override + public EntersBattlefieldWithXCountersEffect copy() { + return new EntersBattlefieldWithXCountersEffect(this); + } + +} diff --git a/Mage/src/mage/abilities/effects/common/ExileTargetForSourceEffect.java b/Mage/src/mage/abilities/effects/common/ExileTargetForSourceEffect.java index 99b3a1e0bdc..f909d0828ea 100644 --- a/Mage/src/mage/abilities/effects/common/ExileTargetForSourceEffect.java +++ b/Mage/src/mage/abilities/effects/common/ExileTargetForSourceEffect.java @@ -84,6 +84,10 @@ public class ExileTargetForSourceEffect extends OneShotEffect { @Override public String getText(Mode mode) { + if(staticText != null && !staticText.isEmpty()) { + return staticText; + } + if (mode.getTargets().isEmpty()) { return "Exile it"; } else { diff --git a/Mage/src/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java b/Mage/src/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java index 88121480466..89b065c0306 100644 --- a/Mage/src/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java +++ b/Mage/src/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java @@ -1,5 +1,5 @@ /* - * + * * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -25,10 +25,11 @@ * 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 java.util.UUID; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.dynamicvalue.DynamicValue; @@ -42,32 +43,28 @@ import mage.filter.FilterCard; import mage.game.Game; import mage.players.Player; import mage.target.TargetCard; - -import java.util.List; -import java.util.UUID; import mage.util.CardUtil; /** * * @author LevelX */ - public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEffect { protected FilterCard filter; // which kind of cards to reveal protected DynamicValue numberToPick; protected boolean revealPickedCards = true; - protected Zone targetPickedCards = Zone.HAND; // HAND + protected Zone targetPickedCards = Zone.HAND; // HAND protected int foundCardsToPick = 0; protected boolean optional; private boolean upTo; public LookLibraryAndPickControllerEffect(DynamicValue numberOfCards, boolean mayShuffleAfter, DynamicValue numberToPick, FilterCard pickFilter, boolean putOnTop) { - this(numberOfCards, mayShuffleAfter, numberToPick, pickFilter, putOnTop, true); + this(numberOfCards, mayShuffleAfter, numberToPick, pickFilter, putOnTop, true); } public LookLibraryAndPickControllerEffect(DynamicValue numberOfCards, boolean mayShuffleAfter, DynamicValue numberToPick, FilterCard pickFilter, boolean putOnTop, boolean reveal) { - this(numberOfCards, mayShuffleAfter, numberToPick, pickFilter, Zone.LIBRARY, putOnTop, reveal); + this(numberOfCards, mayShuffleAfter, numberToPick, pickFilter, Zone.LIBRARY, putOnTop, reveal); } public LookLibraryAndPickControllerEffect(DynamicValue numberOfCards, boolean mayShuffleAfter, DynamicValue numberToPick, @@ -92,13 +89,13 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff public LookLibraryAndPickControllerEffect(DynamicValue numberOfCards, boolean mayShuffleAfter, DynamicValue numberToPick, FilterCard pickFilter, Zone targetZoneLookedCards, boolean putOnTop, boolean reveal, boolean upTo, Zone targetZonePickedCards, boolean optional) { - super(Outcome.DrawCard, numberOfCards, mayShuffleAfter, targetZoneLookedCards, putOnTop); - this.numberToPick = numberToPick; - this.filter = pickFilter; - this.revealPickedCards = reveal; - this.targetPickedCards = targetZonePickedCards; - this.upTo = upTo; - this.optional = optional; + super(Outcome.DrawCard, numberOfCards, mayShuffleAfter, targetZoneLookedCards, putOnTop); + this.numberToPick = numberToPick; + this.filter = pickFilter; + this.revealPickedCards = reveal; + this.targetPickedCards = targetZonePickedCards; + this.upTo = upTo; + this.optional = optional; } public LookLibraryAndPickControllerEffect(final LookLibraryAndPickControllerEffect effect) { @@ -116,6 +113,7 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff return new LookLibraryAndPickControllerEffect(this); } + @Override protected void cardLooked(Card card, Game game, Ability source) { if (numberToPick.calculate(game, source, this) > 0 && filter.match(card, game)) { @@ -130,7 +128,7 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff if (!optional || player.chooseUse(Outcome.DrawCard, getMayText(), source, game)) { FilterCard pickFilter = filter.copy(); pickFilter.setMessage(getPickText()); - TargetCard target = new TargetCard((upTo ? 0:numberToPick.calculate(game, source, this)),numberToPick.calculate(game, source, this), Zone.PICK, pickFilter); + TargetCard target = new TargetCard((upTo ? 0 : numberToPick.calculate(game, source, this)), numberToPick.calculate(game, source, this), Zone.PICK, pickFilter); if (player.choose(Outcome.DrawCard, cards, target, game)) { Cards reveal = new CardsImpl(); for (UUID cardId : target.getTargets()) { @@ -141,8 +139,9 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff player.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId()); } else { card.moveToZone(targetPickedCards, source.getSourceId(), game, false); - if (!game.isSimulation()) + if (!game.isSimulation()) { game.informPlayers(player.getLogName() + " moves a card to " + targetPickedCards.toString().toLowerCase()); + } } if (revealPickedCards) { reveal.add(card); @@ -161,7 +160,7 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff private String getMayText() { StringBuilder sb = new StringBuilder("Do you wish to "); - switch(targetPickedCards) { + switch (targetPickedCards) { case HAND: if (revealPickedCards) { sb.append("reveal ").append(filter.getMessage()).append(" and put into your hand"); @@ -181,7 +180,7 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff private String getPickText() { StringBuilder sb = new StringBuilder(filter.getMessage()).append(" to "); - switch(targetPickedCards) { + switch (targetPickedCards) { case HAND: if (revealPickedCards) { sb.append("reveal and put into your hand"); @@ -206,37 +205,37 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff } StringBuilder sb = new StringBuilder(); if (numberToPick.calculate(null, null, this) > 0) { - - if (revealPickedCards) { - sb.append(". You may reveal "); - sb.append(filter.getMessage()).append(" from among them and put it into your "); + + if (revealPickedCards) { + sb.append(". You may reveal "); + sb.append(filter.getMessage()).append(" from among them and put it into your "); + } else { + if (targetPickedCards.equals(Zone.BATTLEFIELD)) { + sb.append(". You "); + if (optional) { + sb.append("may "); + } + sb.append("put ").append(filter.getMessage()).append(" from among them onto the "); } else { - if (targetPickedCards.equals(Zone.BATTLEFIELD)) { - sb.append(". You "); - if (optional) { - sb.append("may "); - } - sb.append("put ").append(filter.getMessage()).append(" from among them onto the "); - } else { - sb.append(". Put "); - if (numberToPick.calculate(null, null, this) > 1 ) { - if (upTo) { - if (numberToPick.calculate(null, null, this) == (numberOfCards.calculate(null, null, this))) { - sb.append("any number"); - } else { - sb.append("up to ").append(CardUtil.numberToText(numberToPick.calculate(null, null, this))); - } - } else{ - sb.append(CardUtil.numberToText(numberToPick.calculate(null, null, this))); + sb.append(". Put "); + if (numberToPick.calculate(null, null, this) > 1) { + if (upTo) { + if (numberToPick.calculate(null, null, this) == (numberOfCards.calculate(null, null, this))) { + sb.append("any number"); + } else { + sb.append("up to ").append(CardUtil.numberToText(numberToPick.calculate(null, null, this))); } } else { - sb.append("one"); + sb.append(CardUtil.numberToText(numberToPick.calculate(null, null, this))); } - - sb.append(" of them into your "); + } else { + sb.append("one"); } + + sb.append(" of them into your "); } - sb.append(targetPickedCards.toString().toLowerCase()); + } + sb.append(targetPickedCards.toString().toLowerCase()); if (targetZoneLookedCards == Zone.LIBRARY) { sb.append(". Put the rest "); @@ -252,6 +251,6 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff } // get text frame from super class and inject action text return setText(mode, sb.toString()); - } + } } diff --git a/Mage/src/mage/abilities/effects/common/LookLibraryControllerEffect.java b/Mage/src/mage/abilities/effects/common/LookLibraryControllerEffect.java index c32ff30e18d..087323a12c2 100644 --- a/Mage/src/mage/abilities/effects/common/LookLibraryControllerEffect.java +++ b/Mage/src/mage/abilities/effects/common/LookLibraryControllerEffect.java @@ -108,12 +108,12 @@ public class LookLibraryControllerEffect extends OneShotEffect { if (source instanceof SpellAbility) { Card sourceCard = game.getCard(source.getSourceId()); if (sourceCard != null) { - windowName = sourceCard.getName(); + windowName = sourceCard.getIdName(); } } else { Permanent sourcePermanent = game.getPermanent(source.getSourceId()); if (sourcePermanent != null) { - windowName = sourcePermanent.getName(); + windowName = sourcePermanent.getIdName(); } } diff --git a/Mage/src/mage/abilities/effects/common/LoseHalfLifeEffect.java b/Mage/src/mage/abilities/effects/common/LoseHalfLifeEffect.java index 90d6b589300..939b59b90c9 100644 --- a/Mage/src/mage/abilities/effects/common/LoseHalfLifeEffect.java +++ b/Mage/src/mage/abilities/effects/common/LoseHalfLifeEffect.java @@ -13,7 +13,7 @@ public class LoseHalfLifeEffect extends OneShotEffect { public LoseHalfLifeEffect() { super(Outcome.LoseLife); - staticText = "You lose half your life, rounded up"; + staticText = "you lose half your life, rounded up"; } public LoseHalfLifeEffect(final LoseHalfLifeEffect effect) { @@ -37,4 +37,4 @@ public class LoseHalfLifeEffect extends OneShotEffect { } return false; } -} \ No newline at end of file +} diff --git a/Mage/src/mage/abilities/effects/common/PreventDamageByTargetEffect.java b/Mage/src/mage/abilities/effects/common/PreventDamageByTargetEffect.java index 47550fe2b3a..873da6beac9 100644 --- a/Mage/src/mage/abilities/effects/common/PreventDamageByTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/PreventDamageByTargetEffect.java @@ -1,16 +1,16 @@ /* * 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 @@ -20,7 +20,7 @@ * 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. @@ -45,7 +45,7 @@ public class PreventDamageByTargetEffect extends PreventionEffectImpl { public PreventDamageByTargetEffect(Duration duration) { this(duration, false); } - + public PreventDamageByTargetEffect(Duration duration, int amount) { this(duration, amount, false); } @@ -53,11 +53,11 @@ public class PreventDamageByTargetEffect extends PreventionEffectImpl { public PreventDamageByTargetEffect(Duration duration, boolean onlyCombat) { this(duration, Integer.MAX_VALUE, onlyCombat); } - + public PreventDamageByTargetEffect(Duration duration, int amount, boolean onlyCombat) { super(duration, amount, onlyCombat); } - + public PreventDamageByTargetEffect(final PreventDamageByTargetEffect effect) { super(effect); } @@ -88,7 +88,7 @@ public class PreventDamageByTargetEffect extends PreventionEffectImpl { StringBuilder sb = new StringBuilder(); sb.append("Prevent all"); if (onlyCombat) { - sb.append("combat "); + sb.append(" combat "); } sb.append(" damage target "); sb.append(mode.getTargets().get(0).getTargetName()).append(" would deal ").append(duration.toString()); diff --git a/Mage/src/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java b/Mage/src/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java index 2cc2381a78d..3d42d6db098 100644 --- a/Mage/src/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java @@ -58,6 +58,8 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { private final int number; private List addedTokenPermanents; private String additionalSubType; + private boolean tapped; + private boolean attacking; public PutTokenOntoBattlefieldCopyTargetEffect() { super(Outcome.PutCreatureInPlay); @@ -76,6 +78,10 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { this(playerId, additionalCardType, gainsHaste, 1); } + public PutTokenOntoBattlefieldCopyTargetEffect(UUID playerId, CardType additionalCardType, boolean gainsHaste, int number) { + this(playerId, additionalCardType, gainsHaste, number, false, false); + } + /** * * @param playerId null the token is controlled/owned by the controller of @@ -84,13 +90,15 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { * @param gainsHaste the token gains haste * @param number number of tokens to put into play */ - public PutTokenOntoBattlefieldCopyTargetEffect(UUID playerId, CardType additionalCardType, boolean gainsHaste, int number) { + public PutTokenOntoBattlefieldCopyTargetEffect(UUID playerId, CardType additionalCardType, boolean gainsHaste, int number, boolean tapped, boolean attacking) { super(Outcome.PutCreatureInPlay); this.playerId = playerId; this.additionalCardType = additionalCardType; this.gainsHaste = gainsHaste; this.addedTokenPermanents = new ArrayList<>(); this.number = number; + this.tapped = tapped; + this.attacking = attacking; } public PutTokenOntoBattlefieldCopyTargetEffect(final PutTokenOntoBattlefieldCopyTargetEffect effect) { @@ -101,6 +109,8 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { this.addedTokenPermanents = new ArrayList<>(effect.addedTokenPermanents); this.number = effect.number; this.additionalSubType = effect.additionalSubType; + this.tapped = effect.tapped; + this.attacking = effect.attacking; } @Override @@ -149,7 +159,7 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { token.getSubtype().add(additionalSubType); } } - token.putOntoBattlefield(number, game, source.getSourceId(), playerId == null ? source.getControllerId() : playerId); + token.putOntoBattlefield(number, game, source.getSourceId(), playerId == null ? source.getControllerId() : playerId, tapped, attacking); for (UUID tokenId : token.getLastAddedTokenIds()) { // by cards like Doubling Season multiple tokens can be added to the battlefield Permanent tokenPermanent = game.getPermanent(tokenId); if (tokenPermanent != null) { @@ -170,7 +180,15 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { return staticText; } StringBuilder sb = new StringBuilder(); - sb.append("Put a token onto the battlefield that's a copy of target "); + sb.append("Put a token onto the battlefield "); + if (tapped && !attacking) { + sb.append("tapped "); + } else if (!tapped && attacking) { + sb.append("attacking "); + } else if (tapped && attacking) { + sb.append("tapped and attacking "); + } + sb.append("that's a copy of target "); if (mode.getTargets() != null) { sb.append(mode.getTargets().get(0).getTargetName()); } diff --git a/Mage/src/mage/abilities/effects/common/ReturnToHandTargetEffect.java b/Mage/src/mage/abilities/effects/common/ReturnToHandTargetEffect.java index ebf5260bbb5..7e6d25c1477 100644 --- a/Mage/src/mage/abilities/effects/common/ReturnToHandTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/ReturnToHandTargetEffect.java @@ -27,13 +27,9 @@ */ package mage.abilities.effects.common; -import java.util.UUID; -import mage.MageObject; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.Outcome; import mage.constants.Zone; @@ -74,16 +70,7 @@ public class ReturnToHandTargetEffect extends OneShotEffect { if (controller == null) { return false; } - Cards cardsToHand = new CardsImpl(); - Zone fromZone = game.getState().getZone(targetPointer.getFirst(game, source)); - - for (UUID targetId : targetPointer.getTargets(game, source)) { - MageObject mageObject = game.getObject(targetId); - if (mageObject instanceof Card) { - cardsToHand.add((Card) mageObject); - } - } - return controller.moveCards(cardsToHand, fromZone, Zone.HAND, source, game); + return controller.moveCards(new CardsImpl(targetPointer.getTargets(game, source)), null, Zone.HAND, source, game); } @Override diff --git a/Mage/src/mage/abilities/effects/common/SacrificeOpponentsEffect.java b/Mage/src/mage/abilities/effects/common/SacrificeOpponentsEffect.java index 6edd6c83449..54e94ab31b8 100644 --- a/Mage/src/mage/abilities/effects/common/SacrificeOpponentsEffect.java +++ b/Mage/src/mage/abilities/effects/common/SacrificeOpponentsEffect.java @@ -25,7 +25,6 @@ * 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 java.util.ArrayList; @@ -46,8 +45,7 @@ import mage.target.TargetPermanent; import mage.util.CardUtil; /** - * All opponents have to sacrifice [amount] permanents - * that match the [filter]. + * All opponents have to sacrifice [amount] permanents that match the [filter]. * * @author LevelX2 */ @@ -59,6 +57,7 @@ public class SacrificeOpponentsEffect extends OneShotEffect { public SacrificeOpponentsEffect(FilterPermanent filter) { this(1, filter); } + public SacrificeOpponentsEffect(int amount, FilterPermanent filter) { this(new StaticValue(amount), filter); } @@ -87,12 +86,14 @@ public class SacrificeOpponentsEffect extends OneShotEffect { filter.add(new ControllerPredicate(TargetController.YOU)); for (UUID playerId : game.getOpponents(source.getControllerId())) { Player player = game.getPlayer(playerId); - if (player != null) { + if (player != null) { int numTargets = Math.min(amount.calculate(game, source, this), game.getBattlefield().countAll(filter, player.getId(), game)); - TargetPermanent target = new TargetPermanent(numTargets, numTargets, filter, true); - if (target.canChoose(player.getId(), game)) { - player.chooseTarget(Outcome.Sacrifice, target, source, game); - perms.addAll(target.getTargets()); + if (numTargets > 0) { + TargetPermanent target = new TargetPermanent(numTargets, numTargets, filter, true); + if (target.canChoose(player.getId(), game)) { + player.chooseTarget(Outcome.Sacrifice, target, source, game); + perms.addAll(target.getTargets()); + } } } } diff --git a/Mage/src/mage/abilities/effects/common/ShuffleIntoLibraryGraveOfSourceOwnerEffect.java b/Mage/src/mage/abilities/effects/common/ShuffleIntoLibraryGraveOfSourceOwnerEffect.java new file mode 100644 index 00000000000..149117f39f0 --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/ShuffleIntoLibraryGraveOfSourceOwnerEffect.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.effects.common; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class ShuffleIntoLibraryGraveOfSourceOwnerEffect extends OneShotEffect { + + public ShuffleIntoLibraryGraveOfSourceOwnerEffect() { + super(Outcome.Benefit); + staticText = "its owner shuffles his or her graveyard into his or her library"; + } + + public ShuffleIntoLibraryGraveOfSourceOwnerEffect(final ShuffleIntoLibraryGraveOfSourceOwnerEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + UUID ownerId = game.getOwnerId(source.getSourceId()); + if (ownerId == null) { + return false; + } + Player owner = game.getPlayer(ownerId); + if (owner != null) { + owner.moveCards(owner.getGraveyard(), null, Zone.LIBRARY, source, game); + owner.shuffleLibrary(game); + return true; + } + return false; + } + + @Override + public ShuffleIntoLibraryGraveOfSourceOwnerEffect copy() { + return new ShuffleIntoLibraryGraveOfSourceOwnerEffect(this); + } +} diff --git a/Mage/src/mage/abilities/effects/common/combat/AttacksIfAbleAllEffect.java b/Mage/src/mage/abilities/effects/common/combat/AttacksIfAbleAllEffect.java index 4cdc3b8317a..2983f348322 100644 --- a/Mage/src/mage/abilities/effects/common/combat/AttacksIfAbleAllEffect.java +++ b/Mage/src/mage/abilities/effects/common/combat/AttacksIfAbleAllEffect.java @@ -3,7 +3,6 @@ * To change this template file, choose Tools | Templates * and open the template in the editor. */ - package mage.abilities.effects.common.combat; import mage.abilities.Ability; @@ -12,6 +11,7 @@ import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.game.permanent.Permanent; +import mage.watchers.common.AttackedThisTurnWatcher; /** * @@ -24,19 +24,28 @@ public class AttacksIfAbleAllEffect extends RequirementEffect { public AttacksIfAbleAllEffect(FilterCreaturePermanent filter) { this(filter, Duration.WhileOnBattlefield); } - + + boolean eachCombat; + public AttacksIfAbleAllEffect(FilterCreaturePermanent filter, Duration duration) { + this(filter, duration, false); + } + + public AttacksIfAbleAllEffect(FilterCreaturePermanent filter, Duration duration, boolean eachCombat) { super(duration); - staticText = new StringBuilder(filter.getMessage()) - .append(" attack ") - .append(duration.equals(Duration.EndOfTurn) ? "this":"each") - .append(" turn if able").toString(); this.filter = filter; + this.eachCombat = eachCombat; + if (this.duration == Duration.EndOfTurn) { + staticText = filter.getMessage() + " attack " + (eachCombat ? "each combat" : "this turn") + " if able"; + } else { + staticText = filter.getMessage() + " attack each " + (eachCombat ? "combat" : "turn") + " if able"; + } } public AttacksIfAbleAllEffect(final AttacksIfAbleAllEffect effect) { super(effect); this.filter = effect.filter; + this.eachCombat = effect.eachCombat; } @Override @@ -46,7 +55,14 @@ public class AttacksIfAbleAllEffect extends RequirementEffect { @Override public boolean applies(Permanent permanent, Ability source, Game game) { - return filter.match(permanent, source.getSourceId(), source.getControllerId(), game); + if (filter.match(permanent, source.getSourceId(), source.getControllerId(), game)) { + if (eachCombat) { + return true; + } + AttackedThisTurnWatcher watcher = (AttackedThisTurnWatcher) game.getState().getWatchers().get("AttackedThisTurn"); + return watcher != null && !watcher.getAttackedThisTurnCreatures().contains(permanent.getId()); + } + return false; } @Override diff --git a/Mage/src/mage/abilities/effects/common/combat/AttacksIfAbleTargetEffect.java b/Mage/src/mage/abilities/effects/common/combat/AttacksIfAbleTargetEffect.java index a3f5889ce3d..cc9600fb9c2 100644 --- a/Mage/src/mage/abilities/effects/common/combat/AttacksIfAbleTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/combat/AttacksIfAbleTargetEffect.java @@ -1,16 +1,16 @@ /* * 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 @@ -20,18 +20,17 @@ * 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.combat; -import mage.constants.Duration; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.effects.RequirementEffect; +import mage.constants.Duration; import mage.game.Game; import mage.game.permanent.Permanent; @@ -56,10 +55,7 @@ public class AttacksIfAbleTargetEffect extends RequirementEffect { @Override public boolean applies(Permanent permanent, Ability source, Game game) { - if (this.getTargetPointer().getTargets(game, source).contains(permanent.getId())) { - return true; - } - return false; + return this.getTargetPointer().getTargets(game, source).contains(permanent.getId()); } @Override @@ -74,12 +70,14 @@ public class AttacksIfAbleTargetEffect extends RequirementEffect { @Override public String getText(Mode mode) { + if (staticText != null && !staticText.isEmpty()) { + return staticText; + } if (this.duration == Duration.EndOfTurn) { return new StringBuilder("Target ").append(mode.getTargets().get(0).getTargetName()).append(" attacks this turn if able").toString(); - } - else { + } else { return new StringBuilder("Target ").append(mode.getTargets().get(0).getTargetName()).append(" attacks each turn if able").toString(); } } -} \ No newline at end of file +} diff --git a/Mage/src/mage/abilities/effects/common/combat/CantAttackTargetEffect.java b/Mage/src/mage/abilities/effects/common/combat/CantAttackTargetEffect.java index 887c8f401d5..210b2d609de 100644 --- a/Mage/src/mage/abilities/effects/common/combat/CantAttackTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/combat/CantAttackTargetEffect.java @@ -28,9 +28,10 @@ package mage.abilities.effects.common.combat; -import mage.constants.Duration; import mage.abilities.Ability; +import mage.abilities.Mode; import mage.abilities.effects.RestrictionEffect; +import mage.constants.Duration; import mage.game.Game; import mage.game.permanent.Permanent; @@ -63,4 +64,15 @@ public class CantAttackTargetEffect extends RestrictionEffect { return new CantAttackTargetEffect(this); } + @Override + public String getText(Mode mode) { + if(staticText != null && !staticText.isEmpty()) { + return staticText; + } + String text = "target " + mode.getTargets().get(0).getTargetName() + " can't attack"; + if(this.duration == Duration.EndOfTurn) { + text += " this turn"; + } + return text; + } } diff --git a/Mage/src/mage/abilities/effects/common/continuous/BecomesBasicLandEnchantedEffect.java b/Mage/src/mage/abilities/effects/common/continuous/BecomesBasicLandEnchantedEffect.java index 068fee171e2..41f4c112c21 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/BecomesBasicLandEnchantedEffect.java +++ b/Mage/src/mage/abilities/effects/common/continuous/BecomesBasicLandEnchantedEffect.java @@ -25,12 +25,10 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.abilities.effects.common.continuous; import java.util.ArrayList; import java.util.Arrays; -import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.mana.BlackManaAbility; @@ -46,12 +44,6 @@ import mage.constants.SubLayer; import mage.game.Game; import mage.game.permanent.Permanent; -/** - * - * @author LevelX2 - */ - - public class BecomesBasicLandEnchantedEffect extends ContinuousEffectImpl { protected ArrayList landTypes = new ArrayList<>(); @@ -93,7 +85,7 @@ public class BecomesBasicLandEnchantedEffect extends ContinuousEffectImpl { break; case AbilityAddingRemovingEffects_6: permanent.removeAllAbilities(source.getSourceId(), game); - for (String landType : landTypes) { + for (String landType : landTypes) { switch (landType) { case "Swamp": permanent.addAbility(new BlackManaAbility(), source.getSourceId(), game); @@ -134,8 +126,8 @@ public class BecomesBasicLandEnchantedEffect extends ContinuousEffectImpl { private String setText() { StringBuilder sb = new StringBuilder("Enchanted land is a "); int i = 1; - for (String landType : landTypes) { - if (i >1) { + for (String landType : landTypes) { + if (i > 1) { if (i == landTypes.size()) { sb.append(" and "); } else { diff --git a/Mage/src/mage/abilities/effects/common/continuous/BoostControlledEffect.java b/Mage/src/mage/abilities/effects/common/continuous/BoostControlledEffect.java index eb834b17d70..763e78028b5 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/BoostControlledEffect.java +++ b/Mage/src/mage/abilities/effects/common/continuous/BoostControlledEffect.java @@ -81,7 +81,8 @@ public class BoostControlledEffect extends ContinuousEffectImpl { * @param power * @param toughness * @param duration - * @param filter + * @param filter AnotherPredicate is not working, you need to use the + * excludeSource option * @param lockedIn if true, power and toughness will be calculated only * once, when the ability resolves * @param excludeSource diff --git a/Mage/src/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java b/Mage/src/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java index 0f60a80c170..461dd0e13dc 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java +++ b/Mage/src/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java @@ -84,7 +84,7 @@ public class BoostEnchantedEffect extends ContinuousEffectImpl { if (affectedObjectsSet) { // Added boosts of activated or triggered abilities exist independent from the source they are created by // so a continuous effect for the permanent itself with the attachment is created - Permanent equipment = game.getPermanent(source.getSourceId()); + Permanent equipment = game.getPermanentOrLKIBattlefield(source.getSourceId()); if (equipment != null && equipment.getAttachedTo() != null) { this.setTargetPointer(new FixedTarget(equipment.getAttachedTo(), game.getState().getZoneChangeCounter(equipment.getAttachedTo()))); } diff --git a/Mage/src/mage/abilities/effects/common/cost/SpellsCostReductionControllerEffect.java b/Mage/src/mage/abilities/effects/common/cost/SpellsCostReductionControllerEffect.java index d8149f33cb1..b91b76a182e 100644 --- a/Mage/src/mage/abilities/effects/common/cost/SpellsCostReductionControllerEffect.java +++ b/Mage/src/mage/abilities/effects/common/cost/SpellsCostReductionControllerEffect.java @@ -56,17 +56,16 @@ public class SpellsCostReductionControllerEffect extends CostModificationEffectI private final boolean upTo; private ManaCosts manaCostsToReduce = null; - public SpellsCostReductionControllerEffect(FilterCard filter, ManaCosts manaCostsToReduce) { super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST); this.filter = filter; this.amount = 0; this.manaCostsToReduce = manaCostsToReduce; this.upTo = false; - + StringBuilder sb = new StringBuilder(); sb.append(filter.getMessage()).append(" you cast cost "); - for (String manaSymbol :manaCostsToReduce.getSymbols()) { + for (String manaSymbol : manaCostsToReduce.getSymbols()) { sb.append(manaSymbol); } sb.append(" less to cast. This effect reduces only the amount of colored mana you pay."); @@ -81,8 +80,8 @@ public class SpellsCostReductionControllerEffect extends CostModificationEffectI super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST); this.filter = filter; this.amount = amount; - this.upTo = upTo; - this.staticText = filter.getMessage() + " you cast cost " + (upTo ?"up to " :"") + "{" +amount + "} less to cast"; + this.upTo = upTo; + this.staticText = filter.getMessage() + " you cast cost " + (upTo ? "up to " : "") + "{" + amount + "} less to cast"; } protected SpellsCostReductionControllerEffect(final SpellsCostReductionControllerEffect effect) { @@ -95,28 +94,28 @@ public class SpellsCostReductionControllerEffect extends CostModificationEffectI @Override public boolean apply(Game game, Ability source, Ability abilityToModify) { - if (manaCostsToReduce != null){ + if (manaCostsToReduce != null) { CardUtil.adjustCost((SpellAbility) abilityToModify, manaCostsToReduce, false); } else { if (upTo) { Mana mana = abilityToModify.getManaCostsToPay().getMana(); int reduceMax = mana.getColorless(); - if (reduceMax > 2){ + if (reduceMax > 2) { reduceMax = 2; } if (reduceMax > 0) { Player controller = game.getPlayer(abilityToModify.getControllerId()); - if (controller == null){ + if (controller == null) { return false; } ChoiceImpl choice = new ChoiceImpl(true); Set set = new LinkedHashSet<>(); - for(int i = 0; i <= reduceMax; i++){ + for (int i = 0; i <= reduceMax; i++) { set.add(String.valueOf(i)); } choice.setChoices(set); choice.setMessage("Reduce cost of " + filter); - if(controller.choose(Outcome.Benefit, choice, game)){ + if (controller.choose(Outcome.Benefit, choice, game)) { int reduce = Integer.parseInt(choice.getChoice()); CardUtil.reduceCost(abilityToModify, reduce); } @@ -134,11 +133,11 @@ public class SpellsCostReductionControllerEffect extends CostModificationEffectI if (abilityToModify.getControllerId().equals(source.getControllerId())) { Spell spell = (Spell) game.getStack().getStackObject(abilityToModify.getId()); if (spell != null) { - return this.filter.match(spell, game); + return this.filter.match(spell, source.getSourceId(), source.getControllerId(), game); } else { // used at least for flashback ability because Flashback ability doesn't use stack or for getPlayables where spell is not cast yet Card sourceCard = game.getCard(abilityToModify.getSourceId()); - return sourceCard != null && this.filter.match(sourceCard, game); + return sourceCard != null && this.filter.match(sourceCard, source.getSourceId(), source.getControllerId(), game); } } } diff --git a/Mage/src/mage/abilities/effects/common/counter/AddCountersTargetEffect.java b/Mage/src/mage/abilities/effects/common/counter/AddCountersTargetEffect.java index 25df790451c..9f421323473 100644 --- a/Mage/src/mage/abilities/effects/common/counter/AddCountersTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/counter/AddCountersTargetEffect.java @@ -1,16 +1,16 @@ /* * 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 @@ -20,28 +20,26 @@ * 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.counter; -import mage.constants.Outcome; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.counters.Counter; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; - import java.util.UUID; import mage.MageObject; +import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.OneShotEffect; +import mage.constants.Outcome; +import mage.counters.Counter; import mage.counters.CounterType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; import mage.util.CardUtil; /** @@ -54,7 +52,7 @@ public class AddCountersTargetEffect extends OneShotEffect { private DynamicValue amount; public AddCountersTargetEffect(Counter counter) { - this(counter, counter.getName().equals(CounterType.M1M1.getName()) ? Outcome.UnboostCreature: Outcome.Benefit); + this(counter, counter.getName().equals(CounterType.M1M1.getName()) ? Outcome.UnboostCreature : Outcome.Benefit); } public AddCountersTargetEffect(Counter counter, DynamicValue amount) { @@ -94,10 +92,10 @@ public class AddCountersTargetEffect extends OneShotEffect { int before = permanent.getCounters().getCount(counter.getName()); permanent.addCounters(newCounter, game); int numberAdded = permanent.getCounters().getCount(counter.getName()) - before; - affectedTargets ++; + affectedTargets++; if (!game.isSimulation()) { - game.informPlayers(sourceObject.getLogName() +": "+ controller.getLogName()+ " puts " + - numberAdded + " " + counter.getName().toLowerCase() + " counter on " + permanent.getLogName()); + game.informPlayers(sourceObject.getLogName() + ": " + controller.getLogName() + " puts " + + numberAdded + " " + counter.getName().toLowerCase() + " counter on " + permanent.getLogName()); } } } else { @@ -106,14 +104,14 @@ public class AddCountersTargetEffect extends OneShotEffect { Counter newCounter = counter.copy(); newCounter.add(amount.calculate(game, source, this)); player.addCounters(newCounter, game); - affectedTargets ++; + affectedTargets++; if (!game.isSimulation()) { - game.informPlayers(sourceObject.getLogName() +": " + controller.getLogName() + " puts " + - counter.getCount() + " " + counter.getName().toLowerCase() + " counter on " + player.getLogName()); - } + game.informPlayers(sourceObject.getLogName() + ": " + controller.getLogName() + " puts " + + counter.getCount() + " " + counter.getName().toLowerCase() + " counter on " + player.getLogName()); + } } } - } + } return affectedTargets > 0; } return false; @@ -131,8 +129,11 @@ public class AddCountersTargetEffect extends OneShotEffect { } else { sb.append("a "); } - sb.append(counter.getName().toLowerCase()).append(" counter on "); - + sb.append(counter.getName().toLowerCase()).append(" counter"); + if (counter.getCount() > 1) { + sb.append("s"); + } + sb.append(" on "); // TODO: add normal text infrastructure for target pointers if (mode.getTargets().size() > 0) { @@ -155,5 +156,4 @@ public class AddCountersTargetEffect extends OneShotEffect { return new AddCountersTargetEffect(this); } - } diff --git a/Mage/src/mage/abilities/effects/common/replacement/DealtDamageToCreatureBySourceDies.java b/Mage/src/mage/abilities/effects/common/replacement/DealtDamageToCreatureBySourceDies.java index 7132048114b..ddb8825748e 100644 --- a/Mage/src/mage/abilities/effects/common/replacement/DealtDamageToCreatureBySourceDies.java +++ b/Mage/src/mage/abilities/effects/common/replacement/DealtDamageToCreatureBySourceDies.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.abilities.effects.common.replacement; import mage.abilities.Ability; @@ -47,11 +46,10 @@ import mage.watchers.common.DamagedByWatcher; * * @author LevelX2 */ - public class DealtDamageToCreatureBySourceDies extends ReplacementEffectImpl { public DealtDamageToCreatureBySourceDies(Card card, Duration duration) { - super(Duration.WhileOnBattlefield, Outcome.Exile); + super(duration, Outcome.Exile); if (card.getCardType().contains(CardType.CREATURE)) { staticText = "If a creature dealt damage by {this} this turn would die, exile it instead"; } else { @@ -75,7 +73,7 @@ public class DealtDamageToCreatureBySourceDies extends ReplacementEffectImpl { @Override public boolean replaceEvent(GameEvent event, Ability source, Game game) { - Permanent permanent = ((ZoneChangeEvent)event).getTarget(); + Permanent permanent = ((ZoneChangeEvent) event).getTarget(); Player controller = game.getPlayer(source.getControllerId()); if (controller != null && permanent != null) { return controller.moveCardToExileWithInfo(permanent, null, "", source.getSourceId(), game, Zone.BATTLEFIELD, true); @@ -90,7 +88,7 @@ public class DealtDamageToCreatureBySourceDies extends ReplacementEffectImpl { @Override public boolean applies(GameEvent event, Ability source, Game game) { - ZoneChangeEvent zce = (ZoneChangeEvent) event; + ZoneChangeEvent zce = (ZoneChangeEvent) event; if (zce.isDiesEvent()) { DamagedByWatcher watcher = (DamagedByWatcher) game.getState().getWatchers().get("DamagedByWatcher", source.getSourceId()); if (watcher != null) { diff --git a/Mage/src/mage/abilities/effects/common/search/SearchLibraryPutOnLibraryEffect.java b/Mage/src/mage/abilities/effects/common/search/SearchLibraryPutOnLibraryEffect.java index 65e05e65846..124b173a5af 100644 --- a/Mage/src/mage/abilities/effects/common/search/SearchLibraryPutOnLibraryEffect.java +++ b/Mage/src/mage/abilities/effects/common/search/SearchLibraryPutOnLibraryEffect.java @@ -1,16 +1,16 @@ /* * 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 @@ -20,25 +20,19 @@ * 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.search; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; import mage.MageObject; -import mage.constants.Outcome; -import mage.constants.Zone; import mage.abilities.Ability; import mage.abilities.effects.SearchEffect; -import mage.cards.Card; import mage.cards.Cards; import mage.cards.CardsImpl; +import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; import mage.target.common.TargetCardInLibrary; @@ -48,7 +42,7 @@ import mage.target.common.TargetCardInLibrary; * @author BetaSteward_at_googlemail.com */ public class SearchLibraryPutOnLibraryEffect extends SearchEffect { - + private boolean reveal; private boolean forceShuffle; @@ -56,7 +50,7 @@ public class SearchLibraryPutOnLibraryEffect extends SearchEffect { this(target, false, true); setText(); } - + public SearchLibraryPutOnLibraryEffect(TargetCardInLibrary target, boolean reveal, boolean forceShuffle) { super(target, Outcome.DrawCard); this.reveal = reveal; @@ -83,27 +77,14 @@ public class SearchLibraryPutOnLibraryEffect extends SearchEffect { return false; } if (controller.searchLibrary(target, game)) { - List cards = new ArrayList<>(); - for (UUID cardId: target.getTargets()) { - Card card = controller.getLibrary().remove(cardId, game); - if (card != null) { - cards.add(card); - } - } - Cards foundCards = new CardsImpl(); - foundCards.addAll(target.getTargets()); - if (reveal) { + Cards foundCards = new CardsImpl(target.getTargets()); + if (reveal && !foundCards.isEmpty()) { controller.revealCards(sourceObject.getIdName(), foundCards, game); } if (forceShuffle) { controller.shuffleLibrary(game); } - if (cards.size() > 0 && !game.isSimulation()) { - game.informPlayers(controller.getLogName() + " moves " + cards.size() + " card" + (cards.size() == 1 ? " ":"s ") + "on top of his or her library"); - } - for (Card card: cards) { - card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); - } + controller.putCardsOnTopOfLibrary(foundCards, game, source, reveal); return true; } // shuffle @@ -115,7 +96,7 @@ public class SearchLibraryPutOnLibraryEffect extends SearchEffect { private void setText() { StringBuilder sb = new StringBuilder(); - sb.append("Search your library for a ").append(target.getTargetName()); + sb.append("search your library for a ").append(target.getTargetName()); if (reveal) { sb.append(" and reveal that card. Shuffle"); } else { diff --git a/Mage/src/mage/abilities/effects/common/turn/AddExtraTurnControllerEffect.java b/Mage/src/mage/abilities/effects/common/turn/AddExtraTurnControllerEffect.java index 9b08d1d3618..82ada6f9893 100644 --- a/Mage/src/mage/abilities/effects/common/turn/AddExtraTurnControllerEffect.java +++ b/Mage/src/mage/abilities/effects/common/turn/AddExtraTurnControllerEffect.java @@ -1,30 +1,30 @@ /* -* 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. -*/ + * 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.turn; import java.util.UUID; @@ -54,8 +54,8 @@ public class AddExtraTurnControllerEffect extends OneShotEffect { public AddExtraTurnControllerEffect(boolean loseGameAtEnd) { super(loseGameAtEnd ? Outcome.AIDontUseIt : Outcome.ExtraTurn); this.loseGameAtEnd = loseGameAtEnd; - staticText = "Take an extra turn after this one"; - if(loseGameAtEnd) { + staticText = "take an extra turn after this one"; + if (loseGameAtEnd) { staticText += ". At the beginning of that turn's end step, you lose the game"; } } @@ -76,7 +76,7 @@ public class AddExtraTurnControllerEffect extends OneShotEffect { if (player != null) { TurnMod extraTurn = new TurnMod(player.getId(), false); game.getState().getTurnMods().add(extraTurn); - if(loseGameAtEnd) { + if (loseGameAtEnd) { LoseGameDelayedTriggeredAbility delayedTriggeredAbility = new LoseGameDelayedTriggeredAbility(); delayedTriggeredAbility.setSourceId(source.getSourceId()); delayedTriggeredAbility.setControllerId(source.getControllerId()); diff --git a/Mage/src/mage/abilities/effects/keyword/ScryEffect.java b/Mage/src/mage/abilities/effects/keyword/ScryEffect.java index dec42b05dae..ab35b3dfdd0 100644 --- a/Mage/src/mage/abilities/effects/keyword/ScryEffect.java +++ b/Mage/src/mage/abilities/effects/keyword/ScryEffect.java @@ -71,7 +71,7 @@ public class ScryEffect extends OneShotEffect { } private void setText() { - StringBuilder sb = new StringBuilder("Scry ").append(scryNumber); + StringBuilder sb = new StringBuilder("scry ").append(scryNumber); if (scryNumber == 1) { sb.append(". (Look at the top card of your library. You may put that card on the bottom of your library.)"); } else { diff --git a/Mage/src/mage/abilities/keyword/DoubleStrikeAbility.java b/Mage/src/mage/abilities/keyword/DoubleStrikeAbility.java index f1988843f67..ab99217ac27 100644 --- a/Mage/src/mage/abilities/keyword/DoubleStrikeAbility.java +++ b/Mage/src/mage/abilities/keyword/DoubleStrikeAbility.java @@ -1,38 +1,36 @@ /* -* 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. -*/ - + * 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.keyword; -import mage.constants.Zone; +import java.io.ObjectStreamException; import mage.abilities.MageSingleton; import mage.abilities.StaticAbility; - -import java.io.ObjectStreamException; +import mage.constants.Zone; /** * @@ -40,7 +38,7 @@ import java.io.ObjectStreamException; */ public class DoubleStrikeAbility extends StaticAbility implements MageSingleton { - private static final DoubleStrikeAbility fINSTANCE = new DoubleStrikeAbility(); + private static final DoubleStrikeAbility fINSTANCE = new DoubleStrikeAbility(); private Object readResolve() throws ObjectStreamException { return fINSTANCE; @@ -56,7 +54,7 @@ public class DoubleStrikeAbility extends StaticAbility implements MageSingleton @Override public String getRule() { - return "Double Strike"; + return "double strike"; } @Override @@ -64,4 +62,4 @@ public class DoubleStrikeAbility extends StaticAbility implements MageSingleton return fINSTANCE; } -} \ No newline at end of file +} diff --git a/Mage/src/mage/abilities/keyword/DredgeAbility.java b/Mage/src/mage/abilities/keyword/DredgeAbility.java index afed19ef46b..44ff99b07ff 100644 --- a/Mage/src/mage/abilities/keyword/DredgeAbility.java +++ b/Mage/src/mage/abilities/keyword/DredgeAbility.java @@ -71,7 +71,7 @@ class DredgeEffect extends ReplacementEffectImpl { super(Duration.WhileInGraveyard, Outcome.ReturnToHand); this.amount = value; this.staticText = new StringBuilder("Dredge ").append(Integer.toString(value)) - .append(" (If you would draw a card, instead you may put exactly three cards from the top of your library into your graveyard. If you do, return this card from your graveyard to your hand. Otherwise, draw a card.)").toString(); + .append(" (If you would draw a card, instead you may put exactly " + value + " card(s) from the top of your library into your graveyard. If you do, return this card from your graveyard to your hand. Otherwise, draw a card.)").toString(); } public DredgeEffect(final DredgeEffect effect) { diff --git a/Mage/src/mage/abilities/keyword/IngestAbility.java b/Mage/src/mage/abilities/keyword/IngestAbility.java index 40f68dc4b8f..8bc5c9857e5 100644 --- a/Mage/src/mage/abilities/keyword/IngestAbility.java +++ b/Mage/src/mage/abilities/keyword/IngestAbility.java @@ -1,71 +1,71 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package mage.abilities.keyword; - -import mage.abilities.Ability; -import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; -import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.game.Game; -import mage.players.Player; - -/** - * - * @author LevelX2 - */ -public class IngestAbility extends DealsCombatDamageToAPlayerTriggeredAbility { - - public IngestAbility() { - super(new IngestEffect(), false, true); - - } - - public IngestAbility(IngestAbility ability) { - super(ability); - } - - @Override - public String getRule() { - return "Ingest (Whenever this creature deals combat damage to a player, that player exiles the top card of his or her library.)"; - } - - @Override - public IngestAbility copy() { - return new IngestAbility(this); - } -} - -class IngestEffect extends OneShotEffect { - - public IngestEffect() { - super(Outcome.Exile); - this.staticText = "that player exiles the top card of his or her library"; - } - - public IngestEffect(final IngestEffect effect) { - super(effect); - } - - @Override - public IngestEffect copy() { - return new IngestEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source)); - if (targetPlayer != null) { - Card card = targetPlayer.getLibrary().getFromTop(game); - if (card != null) { - targetPlayer.moveCards(card, Zone.LIBRARY, Zone.EXILED, source, game); - } - return true; - } - return false; - } -} +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package mage.abilities.keyword; + +import mage.abilities.Ability; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class IngestAbility extends DealsCombatDamageToAPlayerTriggeredAbility { + + public IngestAbility() { + super(new IngestEffect(), false, true); + + } + + public IngestAbility(IngestAbility ability) { + super(ability); + } + + @Override + public String getRule() { + return "Ingest (Whenever this creature deals combat damage to a player, that player exiles the top card of his or her library.)"; + } + + @Override + public IngestAbility copy() { + return new IngestAbility(this); + } +} + +class IngestEffect extends OneShotEffect { + + public IngestEffect() { + super(Outcome.Exile); + this.staticText = "that player exiles the top card of his or her library"; + } + + public IngestEffect(final IngestEffect effect) { + super(effect); + } + + @Override + public IngestEffect copy() { + return new IngestEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source)); + if (targetPlayer != null) { + Card card = targetPlayer.getLibrary().getFromTop(game); + if (card != null) { + targetPlayer.moveCards(card, Zone.LIBRARY, Zone.EXILED, source, game); + } + return true; + } + return false; + } +} diff --git a/Mage/src/mage/abilities/keyword/MadnessAbility.java b/Mage/src/mage/abilities/keyword/MadnessAbility.java index b7ceb209ca3..e679fd72d0e 100644 --- a/Mage/src/mage/abilities/keyword/MadnessAbility.java +++ b/Mage/src/mage/abilities/keyword/MadnessAbility.java @@ -1,8 +1,11 @@ package mage.abilities.keyword; +import java.util.ArrayList; +import java.util.UUID; import mage.abilities.Ability; import mage.abilities.StaticAbility; import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.condition.Condition; import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCosts; import mage.abilities.effects.OneShotEffect; @@ -13,7 +16,6 @@ import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; import mage.game.events.ZoneChangeEvent; import mage.players.Player; @@ -22,27 +24,30 @@ import mage.players.Player; * * 702.33a. Madness is a keyword that represents two abilities. * - * The first is a static ability that functions while the card with madness is in a player's hand. - * The second is a triggered ability that functions when the first ability is applied. + * The first is a static ability that functions while the card with madness is + * in a player's hand. The second is a triggered ability that functions when the + * first ability is applied. * - * "Madness [cost]" means "If a player would discard this card, that player discards it, but may exile it instead of putting it into his or her graveyard" and - * "When this card is exiled this way, its owner may cast it by paying [cost] rather than paying its mana cost. - * If that player doesn't, he or she puts this card into his or her graveyard. + * "Madness [cost]" means "If a player would discard this card, that player + * discards it, but may exile it instead of putting it into his or her + * graveyard" and "When this card is exiled this way, its owner may cast it by + * paying [cost] rather than paying its mana cost. If that player doesn't, he or + * she puts this card into his or her graveyard. * - * 702.33b. Casting a spell using its madness ability follows the rules for paying alternative costs in rules 601.2b and 601.2e-g. + * 702.33b. Casting a spell using its madness ability follows the rules for + * paying alternative costs in rules 601.2b and 601.2e-g. * * @author LevelX2 */ - public class MadnessAbility extends StaticAbility { private String rule; - + @SuppressWarnings("unchecked") public MadnessAbility(Card card, ManaCosts madnessCost) { - super(Zone.HAND, new MadnessReplacementEffect((ManaCosts)madnessCost)); - addSubAbility(new MadnessTriggeredAbility((ManaCosts)madnessCost)); - rule = "Madness " + madnessCost.getText() + " (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.)"; + super(Zone.HAND, new MadnessReplacementEffect((ManaCosts) madnessCost)); + addSubAbility(new MadnessTriggeredAbility((ManaCosts) madnessCost)); + rule = "Madness " + madnessCost.getText() + " (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.)"; } public MadnessAbility(final MadnessAbility ability) { @@ -54,17 +59,20 @@ public class MadnessAbility extends StaticAbility { return new MadnessAbility(this); } + public static Condition GetCondition() { + return MadnessCondition.getInstance(); + } + @Override public String getRule() { return rule; } } - class MadnessReplacementEffect extends ReplacementEffectImpl { - + public MadnessReplacementEffect(ManaCosts madnessCost) { - super(Duration.EndOfGame, Outcome.Benefit); + super(Duration.EndOfGame, Outcome.Benefit); staticText = "Madness " + madnessCost.getText() + " (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.)"; } @@ -90,14 +98,14 @@ class MadnessReplacementEffect extends ReplacementEffectImpl { if (card != null) { if (controller.chooseUse(outcome, "Move " + card.getLogName() + " to exile to cast it by Madness?", source, game)) { controller.moveCardToExileWithInfo(card, source.getSourceId(), "Madness", source.getSourceId(), game, ((ZoneChangeEvent) event).getFromZone(), true); - game.fireEvent(GameEvent.getEvent(GameEvent.EventType.MADNESS_CARD_EXILED, card.getId(), card.getId(),controller.getId())); + game.fireEvent(GameEvent.getEvent(GameEvent.EventType.MADNESS_CARD_EXILED, card.getId(), card.getId(), controller.getId())); return true; } } } return false; } - + @Override public boolean checksEventType(GameEvent event, Game game) { return event.getType() == GameEvent.EventType.ZONE_CHANGE; @@ -105,22 +113,24 @@ class MadnessReplacementEffect extends ReplacementEffectImpl { @Override public boolean applies(GameEvent event, Ability source, Game game) { - return event.getTargetId().equals(source.getSourceId()) && - ((ZoneChangeEvent) event).getFromZone() == Zone.HAND && ((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD; + return event.getTargetId().equals(source.getSourceId()) + && ((ZoneChangeEvent) event).getFromZone() == Zone.HAND && ((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD; } } /** - * Checks for the MADNESS_CARD_EXILED event to ask the player - * if he wants to cast the card by it's Madness costs. - * If not, the card goes to the graveyard. + * Checks for the MADNESS_CARD_EXILED event to ask the player if he wants to + * cast the card by it's Madness costs. If not, the card goes to the graveyard. */ class MadnessTriggeredAbility extends TriggeredAbilityImpl { - - MadnessTriggeredAbility(ManaCosts madnessCost ) { + + //This array holds the Id's of all of the cards that activated madness + private static ArrayList activatedIds = new ArrayList<>(); + + MadnessTriggeredAbility(ManaCosts madnessCost) { super(Zone.EXILED, new MadnessCastEffect(madnessCost), true); - this.setRuleVisible(false); + this.setRuleVisible(false); } MadnessTriggeredAbility(final MadnessTriggeredAbility ability) { @@ -147,17 +157,33 @@ class MadnessTriggeredAbility extends TriggeredAbilityImpl { if (!super.resolve(game)) { Card card = game.getCard(getSourceId()); if (card != null) { - Player owner = game.getPlayer(card.getOwnerId()); + Player owner = game.getPlayer(card.getOwnerId()); if (owner != null) { // if cast was not successfull, the card is moved to graveyard owner.moveCards(card, Zone.EXILED, Zone.GRAVEYARD, this, game); } - } + } return false; } + activatedIds.add(getSourceId()); return true; } + @Override + public boolean isActivated() { + //Look through the list of activated Ids and see if the current source's Id is one of them + for (UUID currentId : activatedIds) { + if (currentId.equals(getSourceId())) { + //Remove the current source from the list, so if the card is somehow recast without + //paying the madness cost, this will return false + activatedIds.remove(currentId); + return true; + } + } + //If the current source's Id was not found, return false + return false; + } + @Override public String getRule() { return "When this card is exiled this way, " + super.getRule(); @@ -165,13 +191,13 @@ class MadnessTriggeredAbility extends TriggeredAbilityImpl { } class MadnessCastEffect extends OneShotEffect { - + private final ManaCosts madnessCost; - + public MadnessCastEffect(ManaCosts madnessCost) { super(Outcome.Benefit); this.madnessCost = madnessCost; - staticText = "cast it by paying " + madnessCost.getText() + " rather than paying its mana cost. If that player doesn’t, he or she puts this card into his or her graveyard."; + staticText = "cast it by paying " + madnessCost.getText() + " rather than paying its mana cost. If that player doesn’t, he or she puts this card into his or her graveyard."; } public MadnessCastEffect(final MadnessCastEffect effect) { @@ -185,7 +211,7 @@ class MadnessCastEffect extends OneShotEffect { Card card = game.getCard(source.getSourceId()); if (card != null) { owner = game.getPlayer(card.getOwnerId()); - } + } if (owner != null && card != null) { ManaCosts costRef = card.getSpellAbility().getManaCostsToPay(); // replace with the new cost @@ -209,3 +235,35 @@ class MadnessCastEffect extends OneShotEffect { return new MadnessCastEffect(this); } } + +class MadnessCondition implements Condition { + + private static MadnessCondition fInstance = null; + + private MadnessCondition() { + } + + public static Condition getInstance() { + if (fInstance == null) { + fInstance = new MadnessCondition(); + } + + return fInstance; + } + + @Override + public boolean apply(Game game, Ability source) { + Card card = game.getCard(source.getSourceId()); + if (card != null) { + for (Ability ability : card.getAbilities()) { + if (ability instanceof MadnessTriggeredAbility) { + if (((MadnessTriggeredAbility) ability).isActivated()) { + return true; + } + } + } + } + return false; + } + +} diff --git a/Mage/src/mage/abilities/keyword/NinjutsuAbility.java b/Mage/src/mage/abilities/keyword/NinjutsuAbility.java index 23d23b2aad4..8fc900bd3d1 100644 --- a/Mage/src/mage/abilities/keyword/NinjutsuAbility.java +++ b/Mage/src/mage/abilities/keyword/NinjutsuAbility.java @@ -1,36 +1,33 @@ /* -* 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. -*/ - + * 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.keyword; import java.util.UUID; - -import mage.constants.Zone; import mage.abilities.Ability; import mage.abilities.ActivatedAbilityImpl; import mage.abilities.costs.Cost; @@ -41,6 +38,7 @@ import mage.cards.Card; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.Outcome; +import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.UnblockedPredicate; import mage.game.Game; @@ -52,9 +50,9 @@ import mage.target.common.TargetControlledPermanent; /** * 702.47. Ninjutsu * - * 702.47a Ninjutsu is an activated ability that functions only while the card - * with ninjutsu is in a player's hand. "Ninjutsu [cost]" means "[Cost], Reveal - * this card from your hand, Return an unblocked attacking creature you control + * 702.47a Ninjutsu is an activated ability that functions only while the card + * with ninjutsu is in a player's hand. "Ninjutsu [cost]" means "[Cost], Reveal + * this card from your hand, Return an unblocked attacking creature you control * to its owner's hand: Put this card onto the battlefield from your hand tapped * and attacking." * @@ -62,8 +60,8 @@ import mage.target.common.TargetControlledPermanent; * announced until the ability leaves the stack. * * 702.47c A ninjutsu ability may be activated only while a creature on the - * battlefield is unblocked (see rule 509.1h). The creature with ninjutsu is - * put onto the battlefield unblocked. It will be attacking the same player or + * battlefield is unblocked (see rule 509.1h). The creature with ninjutsu is put + * onto the battlefield unblocked. It will be attacking the same player or * planeswalker as the creature that was returned to its owner's hand. * * @@ -78,13 +76,13 @@ public class NinjutsuAbility extends ActivatedAbilityImpl { } /** - * + * * @param manaCost ninjutsu mana cost */ public NinjutsuAbility(ManaCost manaCost) { - super(Zone.HAND,new NinjutsuEffect(), manaCost); + super(Zone.HAND, new NinjutsuEffect(), manaCost); this.addCost(new RevealNinjutsuCardCost()); - this.addCost(new ReturnAttackerToHandTargetCost(new TargetControlledCreaturePermanent(1,1,filter,false))); + this.addCost(new ReturnAttackerToHandTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true))); } public NinjutsuAbility(NinjutsuAbility ability) { @@ -128,7 +126,7 @@ class NinjutsuEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { UUID defendingPlayerId = null; - for (Cost cost :source.getCosts()) { + for (Cost cost : source.getCosts()) { if (cost instanceof ReturnAttackerToHandTargetCost) { defendingPlayerId = ((ReturnAttackerToHandTargetCost) cost).getDefendingPlayerId(); } @@ -161,7 +159,7 @@ class ReturnAttackerToHandTargetCost extends CostImpl { @Override public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) { if (targets.choose(Outcome.ReturnToHand, controllerId, sourceId, game)) { - for (UUID targetId: targets.get(0).getTargets()) { + for (UUID targetId : targets.get(0).getTargets()) { Permanent permanent = game.getPermanent(targetId); if (permanent == null) { return false; diff --git a/Mage/src/mage/abilities/mana/ActivateIfConditionManaAbility.java b/Mage/src/mage/abilities/mana/ActivateIfConditionManaAbility.java index e6a5ac7c8e6..33fb10bbef3 100644 --- a/Mage/src/mage/abilities/mana/ActivateIfConditionManaAbility.java +++ b/Mage/src/mage/abilities/mana/ActivateIfConditionManaAbility.java @@ -25,23 +25,16 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.abilities.mana; import java.util.UUID; -import mage.Mana; -import mage.constants.Zone; import mage.abilities.condition.Condition; import mage.abilities.costs.Cost; +import mage.abilities.effects.common.AddConditionalColorlessManaEffect; import mage.abilities.effects.common.BasicManaEffect; +import mage.constants.Zone; import mage.game.Game; -/** - * - * @author LevelX2 - */ - - public class ActivateIfConditionManaAbility extends ManaAbility { private final Condition condition; @@ -52,6 +45,12 @@ public class ActivateIfConditionManaAbility extends ManaAbility { this.condition = condition; } + public ActivateIfConditionManaAbility(Zone zone, AddConditionalColorlessManaEffect effect, Cost cost, Condition condition) { + super(zone, effect, cost); + this.netMana.add(effect.getMana()); + this.condition = condition; + } + public ActivateIfConditionManaAbility(ActivateIfConditionManaAbility ability) { super(ability); this.condition = ability.condition; @@ -75,7 +74,7 @@ public class ActivateIfConditionManaAbility extends ManaAbility { @Override public String getRule() { - return new StringBuilder(super.getRule()).append(" Activate this ability only if ").append(condition.toString()).append(".").toString() ; + return new StringBuilder(super.getRule()).append(" Activate this ability only if ").append(condition.toString()).append(".").toString(); } @Override diff --git a/Mage/src/mage/abilities/mana/conditional/ConditionalSpellManaBuilder.java b/Mage/src/mage/abilities/mana/conditional/ConditionalSpellManaBuilder.java new file mode 100644 index 00000000000..5dfe2f7c3ae --- /dev/null +++ b/Mage/src/mage/abilities/mana/conditional/ConditionalSpellManaBuilder.java @@ -0,0 +1,77 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package mage.abilities.mana.conditional; + +import java.util.UUID; +import mage.ConditionalMana; +import mage.MageObject; +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.SpellAbility; +import mage.abilities.condition.Condition; +import mage.abilities.mana.builder.ConditionalManaBuilder; +import mage.filter.FilterSpell; +import mage.game.Game; +import mage.game.stack.StackObject; + +/** + * + * @author LevelX2 + */ +public class ConditionalSpellManaBuilder extends ConditionalManaBuilder { + + private final FilterSpell filter; + + public ConditionalSpellManaBuilder(FilterSpell filter) { + this.filter = filter; + } + + @Override + public ConditionalMana build(Object... options) { + this.mana.setFlag(true); // indicates that the mana is from second ability + return new SpellCastConditionalMana(this.mana, filter); + } + + @Override + public String getRule() { + return "Spend this mana only to cast " + filter.getMessage() + "."; + } +} + +class SpellCastConditionalMana extends ConditionalMana { + + SpellCastConditionalMana(Mana mana, FilterSpell filter) { + super(mana); + staticText = "Spend this mana only to cast " + filter.getMessage() + "."; + addCondition(new SpellCastManaCondition(filter)); + } +} + +class SpellCastManaCondition extends ManaCondition implements Condition { + + private final FilterSpell filter; + + public SpellCastManaCondition(FilterSpell filter) { + this.filter = filter; + } + + @Override + public boolean apply(Game game, Ability source) { + if (source instanceof SpellAbility) { + MageObject object = game.getObject(source.getSourceId()); + if (object != null && (object instanceof StackObject)) { + return filter.match((StackObject) object, source.getSourceId(), source.getControllerId(), game); + } + } + return false; + } + + @Override + public boolean apply(Game game, Ability source, UUID originalId) { + return apply(game, source); + } + +} diff --git a/Mage/src/mage/cards/ExpansionSet.java b/Mage/src/mage/cards/ExpansionSet.java index 23c5649fbe3..7758bb84a3f 100644 --- a/Mage/src/mage/cards/ExpansionSet.java +++ b/Mage/src/mage/cards/ExpansionSet.java @@ -56,7 +56,10 @@ public abstract class ExpansionSet implements Serializable { protected String blockName; protected boolean hasBoosters = false; protected int numBoosterSpecial; + protected int numBoosterLands; + protected int ratioBoosterSpecialLand = 0; // if > 0 basic lands are replaced with speical land in the ratio every X land is replaced by special land + protected int numBoosterCommon; protected int numBoosterUncommon; protected int numBoosterRare; @@ -150,9 +153,14 @@ public abstract class ExpansionSet implements Serializable { } if (numBoosterLands > 0) { + List specialLands = getSpecialLand(); List basicLands = getCardsByRarity(Rarity.LAND); for (int i = 0; i < numBoosterLands; i++) { - addToBooster(booster, basicLands); + if (ratioBoosterSpecialLand > 0 && rnd.nextInt(ratioBoosterSpecialLand) == 1 && specialLands != null) { + addToBooster(booster, specialLands); + } else { + addToBooster(booster, basicLands); + } } } List commons = getCardsByRarity(Rarity.COMMON); @@ -320,6 +328,10 @@ public abstract class ExpansionSet implements Serializable { return null; } + public List getSpecialLand() { + return null; + } + public void removeSavedCards() { savedCards.clear(); } diff --git a/Mage/src/mage/cards/repository/CardRepository.java b/Mage/src/mage/cards/repository/CardRepository.java index 8c25fb6d3b5..7717a3766e1 100644 --- a/Mage/src/mage/cards/repository/CardRepository.java +++ b/Mage/src/mage/cards/repository/CardRepository.java @@ -63,7 +63,7 @@ public enum CardRepository { // raise this if db structure was changed private static final long CARD_DB_VERSION = 41; // raise this if new cards were added to the server - private static final long CARD_CONTENT_VERSION = 36; + private static final long CARD_CONTENT_VERSION = 39; private final Random random = new Random(); private Dao cardDao; diff --git a/Mage/src/mage/counters/CounterType.java b/Mage/src/mage/counters/CounterType.java index 51f242d1034..52ebd732211 100644 --- a/Mage/src/mage/counters/CounterType.java +++ b/Mage/src/mage/counters/CounterType.java @@ -41,6 +41,7 @@ public enum CounterType { BLAZE("blaze"), BRIBERY("bribery"), CHARGE("charge"), + CRYSTAL("crystal"), DELAY("delay"), DEPLETION("depletion"), DESPAIR("despair"), @@ -80,6 +81,7 @@ public enum CounterType { POISON("poison"), PRESSURE("pressure"), QUEST("quest"), + SHELL("shell"), SHIELD("shield"), SHRED("shred"), SLIME("slime"), @@ -92,7 +94,6 @@ public enum CounterType { TOWER("tower"), VELOCITY("velocity"), VERSE("verse"), - VILE("vile"), VITALITY("vitality"), WISH("wish"); diff --git a/Mage/src/mage/filter/common/FilterSpellOrPermanent.java b/Mage/src/mage/filter/common/FilterSpellOrPermanent.java index a4d3371cf63..e0d6a093065 100644 --- a/Mage/src/mage/filter/common/FilterSpellOrPermanent.java +++ b/Mage/src/mage/filter/common/FilterSpellOrPermanent.java @@ -91,6 +91,14 @@ public class FilterSpellOrPermanent extends FilterImpl implements Filter return this.spellFilter; } + public void setPermanentFilter(FilterPermanent permanentFilter) { + this.permanentFilter = permanentFilter; + } + + public void setSpellFilter(FilterSpell spellFilter) { + this.spellFilter = spellFilter; + } + @Override public FilterSpellOrPermanent copy() { return new FilterSpellOrPermanent(this); diff --git a/Mage/src/mage/game/Game.java b/Mage/src/mage/game/Game.java index e558dc02ad7..1b19e9d30c5 100644 --- a/Mage/src/mage/game/Game.java +++ b/Mage/src/mage/game/Game.java @@ -107,6 +107,10 @@ public interface Game extends MageItem, Serializable { UUID getControllerId(UUID objectId); + UUID getOwnerId(UUID objectId); + + UUID getOwnerId(MageObject object); + Permanent getPermanent(UUID permanentId); Permanent getPermanentOrLKIBattlefield(UUID permanentId); diff --git a/Mage/src/mage/game/GameImpl.java b/Mage/src/mage/game/GameImpl.java index f1d6cf8b25d..65f39f5be52 100644 --- a/Mage/src/mage/game/GameImpl.java +++ b/Mage/src/mage/game/GameImpl.java @@ -347,12 +347,12 @@ public abstract class GameImpl implements Game, Serializable { MageObject object; if (state.getBattlefield().containsPermanent(objectId)) { object = state.getBattlefield().getPermanent(objectId); - state.setZone(objectId, Zone.BATTLEFIELD); + state.setZone(objectId, Zone.BATTLEFIELD); // why is this neccessary? return object; } for (StackObject item : state.getStack()) { if (item.getId().equals(objectId)) { - state.setZone(objectId, Zone.STACK); + state.setZone(objectId, Zone.STACK); // why is this neccessary? return item; } if (item.getSourceId().equals(objectId) && item instanceof Spell) { @@ -361,7 +361,7 @@ public abstract class GameImpl implements Game, Serializable { } for (CommandObject commandObject : state.getCommand()) { - if (commandObject instanceof Commander && commandObject.getId().equals(objectId)) { + if (commandObject.getId().equals(objectId)) { return commandObject; } } @@ -369,11 +369,11 @@ public abstract class GameImpl implements Game, Serializable { object = getCard(objectId); if (object == null) { - for (CommandObject commandObject : state.getCommand()) { - if (commandObject.getId().equals(objectId)) { - return commandObject; - } - } +// for (CommandObject commandObject : state.getCommand()) { +// if (commandObject.getId().equals(objectId)) { +// return commandObject; +// } +// } // can be an ability of a sacrificed Token trying to get it's source object object = getLastKnownInformation(objectId, Zone.BATTLEFIELD); } @@ -431,6 +431,29 @@ public abstract class GameImpl implements Game, Serializable { return null; } + @Override + public UUID getOwnerId(UUID objectId) { + return getOwnerId(getObject(objectId)); + } + + @Override + public UUID getOwnerId(MageObject object) { + if (object instanceof Card) { + return ((Card) object).getOwnerId(); + } + if (object instanceof Spell) { + return ((Spell) object).getOwnerId(); + } + if (object instanceof StackObject) { + // maybe this is not correct in all cases? + return ((StackObject) object).getControllerId(); + } + if (object instanceof CommandObject) { + return ((CommandObject) object).getControllerId(); + } + return null; + } + @Override public UUID getControllerId(UUID objectId) { if (objectId == null) { @@ -851,28 +874,53 @@ public abstract class GameImpl implements Game, Serializable { Player choosingPlayer = null; if (choosingPlayerId != null) { choosingPlayer = this.getPlayer(choosingPlayerId); + if (choosingPlayer != null && !choosingPlayer.isInGame()) { + choosingPlayer = null; + } } if (choosingPlayer == null) { choosingPlayerId = pickChoosingPlayer(); + if (choosingPlayerId == null) { + return; + } choosingPlayer = getPlayer(choosingPlayerId); } + if (choosingPlayer == null) { + return; + } getState().setChoosingPlayerId(choosingPlayerId); // needed to start/stop the timer if active if (choosingPlayer != null && choosingPlayer.choose(Outcome.Benefit, targetPlayer, null, this)) { startingPlayerId = targetPlayer.getTargets().get(0); - Player startingPlayer = state.getPlayer(startingPlayerId); - StringBuilder message = new StringBuilder(choosingPlayer.getLogName()).append(" chooses that "); - if (choosingPlayer.getId().equals(startingPlayerId)) { - message.append("he or she"); - } else { - message.append(startingPlayer.getLogName()); - } - message.append(" takes the first turn"); - - this.informPlayers(message.toString()); - } else { - // not possible to choose starting player, stop here + } else if (getState().getPlayers().size() < 3) { + // not possible to choose starting player, choosing player has probably conceded, so stop here return; } + if (startingPlayerId == null) { + // choose any available player as starting player + for (Player player : state.getPlayers().values()) { + if (player.isInGame()) { + startingPlayerId = player.getId(); + break; + } + } + if (startingPlayerId == null) { + return; + } + } + Player startingPlayer = state.getPlayer(startingPlayerId); + if (startingPlayer == null) { + logger.debug("Starting player not found. playerId:" + startingPlayerId); + return; + } + StringBuilder message = new StringBuilder(choosingPlayer.getLogName()).append(" chooses that "); + if (choosingPlayer.getId().equals(startingPlayerId)) { + message.append("he or she"); + } else { + message.append(startingPlayer.getLogName()); + } + message.append(" takes the first turn"); + + this.informPlayers(message.toString()); //20091005 - 103.3 int startingHandSize = 7; @@ -980,6 +1028,7 @@ public abstract class GameImpl implements Game, Serializable { } } } + } protected UUID findWinnersAndLosers() { @@ -1014,9 +1063,17 @@ public abstract class GameImpl implements Game, Serializable { protected UUID pickChoosingPlayer() { UUID[] players = getPlayers().keySet().toArray(new UUID[0]); - UUID playerId = players[rnd.nextInt(players.length)]; - fireInformEvent(state.getPlayer(playerId).getLogName() + " won the toss"); - return playerId; + UUID playerId; + while (!hasEnded()) { + playerId = players[rnd.nextInt(players.length)]; + Player player = getPlayer(playerId); + if (player != null && player.isInGame()) { + fireInformEvent(state.getPlayer(playerId).getLogName() + " won the toss"); + return player.getId(); + } + } + logger.debug("Game was not possible to pick a choosing player. GameId:" + getId()); + return null; } @Override diff --git a/Mage/src/mage/game/combat/Combat.java b/Mage/src/mage/game/combat/Combat.java index 8474758049c..d8d815e94e9 100644 --- a/Mage/src/mage/game/combat/Combat.java +++ b/Mage/src/mage/game/combat/Combat.java @@ -424,7 +424,7 @@ public class Combat implements Serializable, Copyable { */ private void logBlockerInfo(Player defender, Game game) { boolean shownDefendingPlayer = game.getPlayers().size() < 3; // only two players no ned to sow the attacked player - for (CombatGroup group : this.getGroups()) { + for (CombatGroup group : game.getCombat().getGroups()) { if (group.defendingPlayerId.equals(defender.getId())) { if (!shownDefendingPlayer) { game.informPlayers("Attacked player: " + defender.getLogName()); @@ -927,15 +927,15 @@ public class Combat implements Serializable, Copyable { } } - public boolean declareAttacker(UUID attackerId, UUID defenderId, UUID playerId, Game game) { - Permanent attacker = game.getPermanent(attackerId); + public boolean declareAttacker(UUID creatureId, UUID defenderId, UUID playerId, Game game) { + Permanent attacker = game.getPermanent(creatureId); if (!attacker.getAbilities().containsKey(VigilanceAbility.getInstance().getId())) { if (!attacker.isTapped()) { attacker.tap(game); } } - if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.DECLARE_ATTACKER, defenderId, attackerId, playerId))) { - return addAttackerToCombat(attackerId, defenderId, game); + if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.DECLARE_ATTACKER, defenderId, creatureId, playerId))) { + return addAttackerToCombat(creatureId, defenderId, game); } return false; } diff --git a/Mage/src/mage/game/events/GameEvent.java b/Mage/src/mage/game/events/GameEvent.java index fcabb52c61a..93d4cef0249 100644 --- a/Mage/src/mage/game/events/GameEvent.java +++ b/Mage/src/mage/game/events/GameEvent.java @@ -154,6 +154,12 @@ public class GameEvent implements Serializable { COUNTER, COUNTERED, DECLARING_ATTACKERS, DECLARED_ATTACKERS, + /* DECLARE_ATTACKER + REPLACE EVENT - can be used to replace attack declaration + targetId id of the defending player or planeswalker attacked + sourceId id of the attacking creature + playerId player defining the attacking creatures + */ DECLARE_ATTACKER, /* ATTACKER_DECLARED targetId id of the defending player or planeswalker attacked diff --git a/Mage/src/mage/game/permanent/token/CatToken.java b/Mage/src/mage/game/permanent/token/CatToken.java new file mode 100644 index 00000000000..486891abbb1 --- /dev/null +++ b/Mage/src/mage/game/permanent/token/CatToken.java @@ -0,0 +1,50 @@ +/* +* 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.game.permanent.token; + +import java.util.Arrays; +import mage.constants.CardType; +import mage.MageInt; + +/** + * + * @author LoneFox + */ +public class CatToken extends Token { + + public CatToken() { + super("Cat", "2/2 white Cat creature token"); + cardType.add(CardType.CREATURE); + color.setWhite(true); + subtype.add("Cat"); + power = new MageInt(2); + toughness = new MageInt(2); + availableImageSetCodes.addAll(Arrays.asList("SOM", "M13", "M14", "C14")); + } +} diff --git a/Mage/src/mage/game/permanent/token/DemonToken.java b/Mage/src/mage/game/permanent/token/DemonToken.java new file mode 100644 index 00000000000..824d6eb0a28 --- /dev/null +++ b/Mage/src/mage/game/permanent/token/DemonToken.java @@ -0,0 +1,69 @@ +/* +* 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.game.permanent.token; + +import java.util.Arrays; +import mage.constants.CardType; +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; + +/** + * + * @author LoneFox + */ +public class DemonToken extends Token { + + public DemonToken() { + super("Demon", "5/5 black Demon creature token with flying"); + cardType.add(CardType.CREATURE); + color.setBlack(true); + subtype.add("Demon"); + power = new MageInt(5); + toughness = new MageInt(5); + addAbility(FlyingAbility.getInstance()); + availableImageSetCodes.addAll(Arrays.asList("INN", "AVR", "C14", "ORI")); + } + + public DemonToken(final DemonToken token) { + super(token); + } + + @Override + public DemonToken copy() { + return new DemonToken(this); + } + + @Override + public void setExpansionSetCodeForImage(String code) { + super.setExpansionSetCodeForImage(code); + if (getOriginalExpansionSetCode().equals("C14")) { + this.setTokenType(2); + } + } +} diff --git a/Mage/src/mage/game/permanent/token/EldraziScionToken.java b/Mage/src/mage/game/permanent/token/EldraziScionToken.java index 1b8e1cd6a74..92d33cadc1f 100644 --- a/Mage/src/mage/game/permanent/token/EldraziScionToken.java +++ b/Mage/src/mage/game/permanent/token/EldraziScionToken.java @@ -1,16 +1,16 @@ /* * 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 @@ -20,14 +20,14 @@ * 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.game.permanent.token; +import java.util.Random; import mage.MageInt; import mage.Mana; import mage.abilities.costs.common.SacrificeSourceCost; @@ -49,7 +49,24 @@ public class EldraziScionToken extends Token { power = new MageInt(1); toughness = new MageInt(1); addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana, new SacrificeSourceCost())); - this.setOriginalExpansionSetCode("BFZ"); + setOriginalExpansionSetCode("BFZ"); + } + @Override + public void setExpansionSetCodeForImage(String code) { + super.setExpansionSetCodeForImage(code); + if (getOriginalExpansionSetCode().equals("BFZ")) { + this.setTokenType(new Random().nextInt(3) + 1); // 3 different images + } + } + + public EldraziScionToken(final EldraziScionToken token) { + super(token); + } + + @Override + public EldraziScionToken copy() { + return new EldraziScionToken(this); //To change body of generated methods, choose Tools | Templates. + } } diff --git a/Mage/src/mage/game/permanent/token/FaerieRogueToken.java b/Mage/src/mage/game/permanent/token/FaerieRogueToken.java new file mode 100644 index 00000000000..a64ff364484 --- /dev/null +++ b/Mage/src/mage/game/permanent/token/FaerieRogueToken.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.game.permanent.token; + +import java.util.Arrays; +import mage.constants.CardType; +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; + +/** + * + * @author LoneFox + */ +public class FaerieRogueToken extends Token { + + public FaerieRogueToken() { + super("Faerie Rogue", "1/1 black Faerie Rogue creature token with flying"); + cardType.add(CardType.CREATURE); + color.setBlack(true); + subtype.add("Faerie"); + subtype.add("Rogue"); + power = new MageInt(1); + toughness = new MageInt(1); + addAbility(FlyingAbility.getInstance()); + availableImageSetCodes.addAll(Arrays.asList("SHM", "MOR", "MMA")); + } +} diff --git a/Mage/src/mage/game/permanent/token/GoatToken.java b/Mage/src/mage/game/permanent/token/GoatToken.java new file mode 100644 index 00000000000..82ea1284145 --- /dev/null +++ b/Mage/src/mage/game/permanent/token/GoatToken.java @@ -0,0 +1,50 @@ +/* +* 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.game.permanent.token; + +import java.util.Arrays; +import mage.constants.CardType; +import mage.MageInt; + +/** + * + * @author LoneFox + */ +public class GoatToken extends Token { + + public GoatToken() { + super("Goat", "0/1 white Goat creature token"); + cardType.add(CardType.CREATURE); + color.setWhite(true); + subtype.add("Goat"); + power = new MageInt(0); + toughness = new MageInt(1); + availableImageSetCodes.addAll(Arrays.asList("EVE", "M13", "M14", "C14")); + } +} diff --git a/Mage/src/mage/game/permanent/token/GoblinRogueToken.java b/Mage/src/mage/game/permanent/token/GoblinRogueToken.java new file mode 100644 index 00000000000..b7839593c22 --- /dev/null +++ b/Mage/src/mage/game/permanent/token/GoblinRogueToken.java @@ -0,0 +1,51 @@ +/* +* 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.game.permanent.token; + +import java.util.Arrays; +import mage.constants.CardType; +import mage.MageInt; + +/** + * + * @author LoneFox + */ +public class GoblinRogueToken extends Token { + + public GoblinRogueToken() { + super("Goblin Rogue", "1/1 black Goblin Rogue creature token"); + cardType.add(CardType.CREATURE); + color.setBlack(true); + subtype.add("Goblin"); + subtype.add("Rogue"); + power = new MageInt(1); + toughness = new MageInt(1); + availableImageSetCodes.addAll(Arrays.asList("LRW", "MMA")); + } +} diff --git a/Mage/src/mage/game/permanent/token/HumanToken.java b/Mage/src/mage/game/permanent/token/HumanToken.java new file mode 100644 index 00000000000..6e580a5642f --- /dev/null +++ b/Mage/src/mage/game/permanent/token/HumanToken.java @@ -0,0 +1,67 @@ +/* +* 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.game.permanent.token; + +import java.util.Arrays; +import mage.constants.CardType; +import mage.MageInt; + +/** + * + * @author LoneFox + */ +public class HumanToken extends Token { + + public HumanToken() { + super("Human", "1/1 white Human creature token"); + cardType.add(CardType.CREATURE); + color.setWhite(true); + subtype.add("Human"); + power = new MageInt(1); + toughness = new MageInt(1); + availableImageSetCodes.addAll(Arrays.asList("DKA", "AVR", "FNMP")); + } + + public HumanToken(final HumanToken token) { + super(token); + } + + @Override + public HumanToken copy() { + return new HumanToken(this); + } + + @Override + public void setExpansionSetCodeForImage(String code) { + super.setExpansionSetCodeForImage(code); + if (getOriginalExpansionSetCode().equals("AVR")) { + this.setTokenType(1); + } + } +} diff --git a/Mage/src/mage/game/permanent/token/KorSoldierToken.java b/Mage/src/mage/game/permanent/token/KorSoldierToken.java new file mode 100644 index 00000000000..8f6b41c93bd --- /dev/null +++ b/Mage/src/mage/game/permanent/token/KorSoldierToken.java @@ -0,0 +1,51 @@ +/* +* 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 O +R +* 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.game.permanent.token; + +import java.util.Arrays; +import mage.constants.CardType; +import mage.MageInt; + +/** + * + * @author LoneFox + */ +public class KorSoldierToken extends Token { + + public KorSoldierToken() { + super("Kor Soldier", "1/1 white Kor Soldier creature token"); + cardType.add(CardType.CREATURE); + color.setWhite(true); + subtype.add("Kor"); + subtype.add("Soldier"); + power = new MageInt(1); + toughness = new MageInt(1); + availableImageSetCodes.addAll(Arrays.asList("C14", "ZEN")); } +} diff --git a/Mage/src/mage/game/permanent/token/PegasusToken.java b/Mage/src/mage/game/permanent/token/PegasusToken.java new file mode 100644 index 00000000000..12e90966ac0 --- /dev/null +++ b/Mage/src/mage/game/permanent/token/PegasusToken.java @@ -0,0 +1,52 @@ +/* +* 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 O +R +* 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.game.permanent.token; + +import mage.constants.CardType; +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; + +/** + * + * @author LoneFox + */ +public class PegasusToken extends Token { + + public PegasusToken() { + super("Pegasus", "1/1 white Pegasus creature token with flying"); + cardType.add(CardType.CREATURE); + color.setWhite(true); + subtype.add("Pegasus"); + power = new MageInt(1); + toughness = new MageInt(1); + addAbility(FlyingAbility.getInstance()); + setOriginalExpansionSetCode("C14"); + } +} diff --git a/Mage/src/mage/game/permanent/token/SliverToken.java b/Mage/src/mage/game/permanent/token/SliverToken.java new file mode 100644 index 00000000000..1c95852bfe0 --- /dev/null +++ b/Mage/src/mage/game/permanent/token/SliverToken.java @@ -0,0 +1,49 @@ +/* +* 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.game.permanent.token; + +import java.util.Arrays; +import mage.constants.CardType; +import mage.MageInt; + +/** + * + * @author LoneFox + */ +public class SliverToken extends Token { + + public SliverToken() { + super("Sliver", "1/1 colorless Sliver creature token"); + cardType.add(CardType.CREATURE); + subtype.add("Sliver"); + power = new MageInt(1); + toughness = new MageInt(1); + availableImageSetCodes.addAll(Arrays.asList("M14", "M15")); + } +} diff --git a/Mage/src/mage/game/permanent/token/WarriorToken.java b/Mage/src/mage/game/permanent/token/WarriorToken.java new file mode 100644 index 00000000000..5ddc1c3aa21 --- /dev/null +++ b/Mage/src/mage/game/permanent/token/WarriorToken.java @@ -0,0 +1,68 @@ +/* +* 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.game.permanent.token; + +import java.util.Arrays; +import java.util.Random; +import mage.MageInt; +import mage.constants.CardType; + +/** + * + * @author LoneFox + */ +public class WarriorToken extends Token { + + public WarriorToken() { + super("Warrior", "1/1 white Warrior creature token"); + cardType.add(CardType.CREATURE); + color.setWhite(true); + subtype.add("Warrior"); + power = new MageInt(1); + toughness = new MageInt(1); + availableImageSetCodes.addAll(Arrays.asList("KTK", "DTK")); + } + + public WarriorToken(final WarriorToken token) { + super(token); + } + + @Override + public WarriorToken copy() { + return new WarriorToken(this); + } + + @Override + public void setExpansionSetCodeForImage(String code) { + super.setExpansionSetCodeForImage(code); + if (getOriginalExpansionSetCode().equals("KTK")) { + this.setTokenType(new Random().nextInt(2) + 1); + } + } +} diff --git a/Mage/src/mage/game/stack/Spell.java b/Mage/src/mage/game/stack/Spell.java index f51d8c3ed1c..b1cf6950138 100644 --- a/Mage/src/mage/game/stack/Spell.java +++ b/Mage/src/mage/game/stack/Spell.java @@ -171,6 +171,7 @@ public class Spell extends StackObjImpl implements Card { int index = 0; result = false; boolean legalParts = false; + boolean notTargeted = true; // check for legal parts for (SpellAbility spellAbility : this.spellAbilities) { // if muliple modes are selected, and there are modes with targets, then at least one mode has to have a legal target or @@ -178,10 +179,15 @@ public class Spell extends StackObjImpl implements Card { // If all targets are illegal when the spell tries to resolve, the spell is countered and none of its effects happen. // If at least one target is still legal at that time, the spell resolves, but an illegal target can't perform any actions // or have any actions performed on it. - legalParts |= spellAbilityHasLegalParts(spellAbility, game); + // if only a spliced spell has targets and all targets ar illegal, the complete spell is countered + if (hasTargets(spellAbility, game)) { + notTargeted = false; + legalParts |= spellAbilityHasLegalParts(spellAbility, game); + } + } // resolve if legal parts - if (legalParts) { + if (notTargeted || legalParts) { for (SpellAbility spellAbility : this.spellAbilities) { if (spellAbilityHasLegalParts(spellAbility, game)) { for (UUID modeId : spellAbility.getModes().getSelectedModes()) { @@ -262,6 +268,21 @@ public class Spell extends StackObjImpl implements Card { } } + private boolean hasTargets(SpellAbility spellAbility, Game game) { + if (spellAbility.getModes().getSelectedModes().size() > 1) { + for (UUID modeId : spellAbility.getModes().getSelectedModes()) { + spellAbility.getModes().setActiveMode(modeId); + if (!spellAbility.getTargets().isEmpty()) { + return true; + } + + } + return false; + } else { + return !spellAbility.getTargets().isEmpty(); + } + } + private boolean spellAbilityHasLegalParts(SpellAbility spellAbility, Game game) { if (spellAbility.getModes().getSelectedModes().size() > 1) { boolean targetedMode = false; diff --git a/Mage/src/mage/players/PlayerImpl.java b/Mage/src/mage/players/PlayerImpl.java index 00d83fc7cfc..eb175ea8a29 100644 --- a/Mage/src/mage/players/PlayerImpl.java +++ b/Mage/src/mage/players/PlayerImpl.java @@ -877,7 +877,7 @@ public abstract class PlayerImpl implements Player, Serializable { public boolean putCardsOnTopOfLibrary(Cards cardsToLibrary, Game game, Ability source, boolean anyOrder) { Cards cards = new CardsImpl(cardsToLibrary); // prevent possible ConcurrentModificationException cards.addAll(cardsToLibrary); - if (cards.size() != 0) { + if (!cards.isEmpty()) { UUID sourceId = (source == null ? null : source.getSourceId()); if (!anyOrder) { for (UUID cardId : cards) { @@ -1136,7 +1136,9 @@ public abstract class PlayerImpl implements Player, Serializable { justActivatedType = null; if (result) { if (isHuman() && (ability.getAbilityType().equals(AbilityType.SPELL) || ability.getAbilityType().equals(AbilityType.ACTIVATED))) { - setJustActivatedType(ability.getAbilityType()); + if (ability.isUsesStack()) { // if the ability does not use the stack (e.g. Suspend) auto pass would go to next phase unintended + setJustActivatedType(ability.getAbilityType()); + } } game.getPlayers().resetPassed(); } @@ -2924,16 +2926,31 @@ public abstract class PlayerImpl implements Player, Serializable { @Override public boolean moveCards(Cards cards, Zone fromZone, Zone toZone, Ability source, Game game) { + if (cards.isEmpty()) { + return true; + } Set cardList = new HashSet<>(); for (UUID cardId : cards) { fromZone = game.getState().getZone(cardId); - if (fromZone.equals(Zone.BATTLEFIELD)) { + if (Zone.BATTLEFIELD.equals(fromZone)) { Permanent permanent = game.getPermanent(cardId); if (permanent != null) { cardList.add(permanent); } } else { Card card = game.getCard(cardId); + if (card == null) { + Spell spell = game.getState().getStack().getSpell(cardId); + if (spell != null) { + if (!spell.isCopy()) { + card = spell.getCard(); + } else { + // If a spell is returned to its owner's hand, it's removed from the stack and thus will not resolve + game.getStack().remove(spell); + game.informPlayers(spell.getLogName() + " was removed from the stack"); + } + } + } if (card != null) { cardList.add(card); } @@ -2973,6 +2990,13 @@ public abstract class PlayerImpl implements Player, Serializable { case HAND: for (Card card : cards) { fromZone = game.getState().getZone(card.getId()); + if (fromZone == Zone.STACK) { + // If a spell is returned to its owner's hand, it's removed from the stack and thus will not resolve + Spell spell = game.getStack().getSpell(card.getId()); + if (spell != null) { + game.getStack().remove(spell); + } + } boolean hideCard = fromZone.equals(Zone.LIBRARY) || (card.isFaceDown(game) && !fromZone.equals(Zone.STACK) && !fromZone.equals(Zone.BATTLEFIELD)); if (moveCardToHandWithInfo(card, source == null ? null : source.getSourceId(), game, !hideCard)) { @@ -3183,7 +3207,13 @@ public abstract class PlayerImpl implements Player, Serializable { if (card.moveToExile(exileId, exileName, sourceId, game)) { if (!game.isSimulation()) { if (card instanceof PermanentCard) { - card = game.getCard(card.getId()); + // in case it's face down or name was changed by copying from other permanent + Card basicCard = game.getCard(card.getId()); + if (basicCard != null) { + card = basicCard; + } else { + logger.error("Couldn't get the card object for the PermanenCard named " + card.getName()); + } } game.informPlayers(this.getLogName() + " moves " + (withName ? card.getLogName() : "a card face down") + " " + (fromZone != null ? "from " + fromZone.toString().toLowerCase(Locale.ENGLISH) + " " : "") + "to the exile zone"); diff --git a/Mage/src/mage/target/Target.java b/Mage/src/mage/target/Target.java index 0ac5a3c43ba..b6bd637b1e4 100644 --- a/Mage/src/mage/target/Target.java +++ b/Mage/src/mage/target/Target.java @@ -1,43 +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. -*/ - + * 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.target; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.abilities.Ability; -import mage.filter.Filter; -import mage.game.Game; - import java.io.Serializable; import java.util.List; import java.util.Set; import java.util.UUID; +import mage.abilities.Ability; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.Filter; +import mage.game.Game; import mage.players.Player; /** @@ -47,69 +45,110 @@ import mage.players.Player; public interface Target extends Serializable { boolean isChosen(); + boolean doneChosing(); + void clearChosen(); + boolean isNotTarget(); /** - * controlls if it will be checked, if the target can be targeted from source - * @param notTarget true = do not check for protection, false = check for protection + * controlls if it will be checked, if the target can be targeted from + * source + * + * @param notTarget true = do not check for protection, false = check for + * protection */ void setNotTarget(boolean notTarget); // methods for targets boolean canChoose(UUID sourceId, UUID sourceControllerId, Game game); + Set possibleTargets(UUID sourceId, UUID sourceControllerId, Game game); + boolean chooseTarget(Outcome outcome, UUID playerId, Ability source, Game game); + void addTarget(UUID id, Ability source, Game game); + void addTarget(UUID id, int amount, Ability source, Game game); + void addTarget(UUID id, Ability source, Game game, boolean skipEvent); + void addTarget(UUID id, int amount, Ability source, Game game, boolean skipEvent); + boolean canTarget(UUID id, Game game); + boolean canTarget(UUID id, Ability source, Game game); - boolean canTarget(UUID playerId, UUID id, Ability source, Game game); + + boolean canTarget(UUID playerId, UUID id, Ability source, Game game); + boolean isLegal(Ability source, Game game); + List getTargetOptions(Ability source, Game game); //methods for non-targets boolean canChoose(UUID sourceControllerId, Game game); + Set possibleTargets(UUID sourceControllerId, Game game); + boolean choose(Outcome outcome, UUID playerId, UUID sourceId, Game game); + void add(UUID id, Game game); + void remove(UUID targetId); + void updateTarget(UUID targetId, Game game); String getMessage(); + String getTargetName(); + void setTargetName(String name); + String getTargetedName(Game game); + Zone getZone(); int getTargetAmount(UUID targetId); + int getNumberOfTargets(); + int getMaxNumberOfTargets(); + void setMinNumberOfTargets(int minNumberofTargets); + void setMaxNumberOfTargets(int maxNumberofTargets); - + List getTargets(); + Filter getFilter(); boolean isRequired(); + boolean isRequired(UUID sourceId, Game game); + boolean isRequired(Ability ability); + void setRequired(boolean required); + boolean isRequiredExplicitlySet(); + boolean isRandom(); + void setRandom(boolean atRandom); UUID getFirstTarget(); Target copy(); - + // some targets are choosen from players that are not the controller of the ability (e.g. Pandemonium) void setTargetController(UUID playerId); + UUID getTargetController(); + void setAbilityController(UUID playerId); + UUID getAbilityController(); + Player getTargetController(Game game, UUID playerId); -} +} diff --git a/Mage/src/mage/target/TargetImpl.java b/Mage/src/mage/target/TargetImpl.java index aa4b2a27047..ee54c12a77b 100644 --- a/Mage/src/mage/target/TargetImpl.java +++ b/Mage/src/mage/target/TargetImpl.java @@ -536,4 +536,9 @@ public abstract class TargetImpl implements Target { } } + @Override + public boolean isRequiredExplicitlySet() { + return requiredExplicitlySet; + } + } diff --git a/Mage/src/mage/target/common/TargetCardInLibrary.java b/Mage/src/mage/target/common/TargetCardInLibrary.java index 5d6205e80d3..49d3eca2430 100644 --- a/Mage/src/mage/target/common/TargetCardInLibrary.java +++ b/Mage/src/mage/target/common/TargetCardInLibrary.java @@ -64,6 +64,9 @@ public class TargetCardInLibrary extends TargetCard { public TargetCardInLibrary(int minNumTargets, int maxNumTargets, FilterCard filter) { super(minNumTargets, maxNumTargets, Zone.LIBRARY, filter); + // 701.15b If a player is searching a hidden zone for cards with a stated quality, such as a card + // with a certain card type or color, that player isn’t required to find some or all of those cards + // even if they’re present in that zone. this.setRequired(!filter.hasPredicates()); this.librarySearchLimit = Integer.MAX_VALUE; } diff --git a/Mage/src/mage/target/common/TargetCardInYourGraveyard.java b/Mage/src/mage/target/common/TargetCardInYourGraveyard.java index a6e26451369..eba50fb268d 100644 --- a/Mage/src/mage/target/common/TargetCardInYourGraveyard.java +++ b/Mage/src/mage/target/common/TargetCardInYourGraveyard.java @@ -1,16 +1,16 @@ /* * 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 @@ -20,12 +20,11 @@ * 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.target.common; import java.util.HashSet; @@ -106,13 +105,14 @@ public class TargetCardInYourGraveyard extends TargetCard { public Set possibleTargets(UUID sourceControllerId, Cards cards, Game game) { Set possibleTargets = new HashSet<>(); Player player = game.getPlayer(sourceControllerId); - for (Card card: cards.getCards(filter, game)) { + for (Card card : cards.getCards(filter, game)) { if (player.getGraveyard().getCards(game).contains(card)) { possibleTargets.add(card.getId()); } } return possibleTargets; } + /** * Checks if there are enough {@link Card} that can be selected. * @@ -127,6 +127,7 @@ public class TargetCardInYourGraveyard extends TargetCard { } return false; } + @Override public boolean canChoose(UUID sourceId, UUID sourceControllerId, Game game) { Player player = game.getPlayer(sourceControllerId); diff --git a/Mage/src/mage/target/common/TargetSpellOrPermanent.java b/Mage/src/mage/target/common/TargetSpellOrPermanent.java index 0e338680926..a52afb47ca7 100644 --- a/Mage/src/mage/target/common/TargetSpellOrPermanent.java +++ b/Mage/src/mage/target/common/TargetSpellOrPermanent.java @@ -1,5 +1,5 @@ /* - * + * * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -25,7 +25,7 @@ * 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.target.common; @@ -51,7 +51,6 @@ import mage.target.TargetImpl; public class TargetSpellOrPermanent extends TargetImpl { protected FilterSpellOrPermanent filter; - protected FilterPermanent filterPermanent; public TargetSpellOrPermanent() { this(1, 1); @@ -62,28 +61,28 @@ public class TargetSpellOrPermanent extends TargetImpl { } public TargetSpellOrPermanent(int minNumTargets, int maxNumTargets) { - this.minNumberOfTargets = minNumTargets; - this.maxNumberOfTargets = maxNumTargets; - this.zone = Zone.ALL; - this.filter = new FilterSpellOrPermanent(); - this.targetName = filter.getMessage(); - this.filterPermanent = new FilterPermanent(); + this(minNumTargets, maxNumTargets, false); } public TargetSpellOrPermanent(int minNumTargets, int maxNumTargets, boolean notTarget) { - this(minNumTargets, maxNumTargets); + this(minNumTargets, maxNumTargets, new FilterSpellOrPermanent(), notTarget); this.notTarget = notTarget; } - public TargetSpellOrPermanent(int minNumTargets, int maxNumTargets, FilterSpellOrPermanent filter,boolean notTarget) { - this(minNumTargets, maxNumTargets); + public TargetSpellOrPermanent(int minNumTargets, int maxNumTargets, FilterSpellOrPermanent filter, boolean notTarget) { + super(notTarget); + this.minNumberOfTargets = minNumTargets; + this.maxNumberOfTargets = maxNumTargets; + this.zone = Zone.ALL; + this.targetName = filter.getMessage(); this.notTarget = notTarget; this.filter = filter; + this.targetName = filter.getMessage(); } + public TargetSpellOrPermanent(final TargetSpellOrPermanent target) { super(target); this.filter = target.filter.copy(); - this.filterPermanent = target.filterPermanent.copy(); } @Override @@ -92,7 +91,7 @@ public class TargetSpellOrPermanent extends TargetImpl { } public FilterPermanent getPermanentFilter() { - return this.filterPermanent; + return this.filter.getPermanentFilter(); } public void setFilter(FilterSpellOrPermanent filter) { @@ -118,13 +117,15 @@ public class TargetSpellOrPermanent extends TargetImpl { if (permanent != null) { if (source != null) { MageObject targetSource = game.getObject(source.getSourceId()); - return permanent.canBeTargetedBy(targetSource, source.getControllerId(), game) && filter.match(permanent, source.getSourceId(), source.getControllerId(), game); + return permanent.canBeTargetedBy(targetSource, source.getControllerId(), game) + && filter.match(permanent, source.getSourceId(), source.getControllerId(), game); } else { return filter.match(permanent, game); } } Spell spell = game.getStack().getSpell(id); - if (spell != null) { + if (spell != null + && !source.getSourceId().equals(id)) { // 114.4. A spell or ability on the stack is an illegal target for itself. return filter.match(spell, game); } return false; @@ -136,28 +137,32 @@ public class TargetSpellOrPermanent extends TargetImpl { } /** - * Checks if there are enough {@link mage.game.permanent.Permanent} or {@link mage.game.stack.Spell} that can be chosen. Should only be used - * for Ability targets since this checks for protection, shroud etc. + * Checks if there are enough {@link mage.game.permanent.Permanent} or + * {@link mage.game.stack.Spell} that can be chosen. Should only be used for + * Ability targets since this checks for protection, shroud etc. * * @param sourceId - the target event source * @param sourceControllerId - controller of the target event source * @param game - * @return - true if enough valid {@link mage.game.permanent.Permanent} or {@link mage.game.stack.Spell} exist + * @return - true if enough valid {@link mage.game.permanent.Permanent} or + * {@link mage.game.stack.Spell} exist */ @Override public boolean canChoose(UUID sourceId, UUID sourceControllerId, Game game) { int count = 0; MageObject targetSource = game.getObject(sourceId); - for (StackObject stackObject: game.getStack()) { + for (StackObject stackObject : game.getStack()) { Spell spell = game.getStack().getSpell(stackObject.getId()); - if (spell != null && filter.match(spell, sourceId, sourceControllerId, game)) { + if (spell != null + && !sourceId.equals(spell.getSourceId()) + && filter.match(spell, sourceId, sourceControllerId, game)) { count++; if (count >= this.minNumberOfTargets) { return true; } } } - for (Permanent permanent: game.getBattlefield().getActivePermanents(filterPermanent, sourceControllerId, game)) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter.getPermanentFilter(), sourceControllerId, game)) { if (permanent.canBeTargetedBy(targetSource, sourceControllerId, game) && filter.match(permanent, sourceId, sourceControllerId, game)) { count++; if (count >= this.minNumberOfTargets) { @@ -169,26 +174,29 @@ public class TargetSpellOrPermanent extends TargetImpl { } /** - * Checks if there are enough {@link mage.game.permanent.Permanent} or {@link mage.game.stack.Spell} that can be selected. Should not be used + * Checks if there are enough {@link mage.game.permanent.Permanent} or + * {@link mage.game.stack.Spell} that can be selected. Should not be used * for Ability targets since this does not check for protection, shroud etc. * * @param sourceControllerId - controller of the select event * @param game - * @return - true if enough valid {@link mage.game.permanent.Permanent} or {@link mage.game.stack.Spell} exist + * @return - true if enough valid {@link mage.game.permanent.Permanent} or + * {@link mage.game.stack.Spell} exist */ @Override public boolean canChoose(UUID sourceControllerId, Game game) { int count = 0; - for (StackObject stackObject: game.getStack()) { + for (StackObject stackObject : game.getStack()) { Spell spell = game.getStack().getSpell(stackObject.getId()); - if (spell != null && filter.match(spell, null, sourceControllerId, game) && filter.match(spell, game)) { + if (spell != null + && filter.match(spell, null, sourceControllerId, game) && filter.match(spell, game)) { count++; if (count >= this.minNumberOfTargets) { return true; } } } - for (Permanent permanent: game.getBattlefield().getActivePermanents(filterPermanent, sourceControllerId, game)) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter.getPermanentFilter(), sourceControllerId, game)) { if (filter.match(permanent, null, sourceControllerId, game) && filter.match(permanent, game)) { count++; if (count >= this.minNumberOfTargets) { @@ -203,13 +211,15 @@ public class TargetSpellOrPermanent extends TargetImpl { public Set possibleTargets(UUID sourceId, UUID sourceControllerId, Game game) { Set possibleTargets = new HashSet<>(); MageObject targetSource = game.getObject(sourceId); - for (StackObject stackObject: game.getStack()) { + for (StackObject stackObject : game.getStack()) { Spell spell = game.getStack().getSpell(stackObject.getId()); - if (spell != null && filter.match(spell, null, sourceControllerId, game) && filter.match(spell, game)) { + if (spell != null + && !sourceId.equals(spell.getSourceId()) + && filter.match(spell, sourceId, sourceControllerId, game)) { possibleTargets.add(spell.getId()); } } - for (Permanent permanent: game.getBattlefield().getActivePermanents(filterPermanent, sourceControllerId, game)) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter.getPermanentFilter(), sourceControllerId, game)) { if (permanent.canBeTargetedBy(targetSource, sourceControllerId, game) && filter.match(permanent, sourceId, sourceControllerId, game)) { possibleTargets.add(permanent.getId()); } @@ -220,13 +230,14 @@ public class TargetSpellOrPermanent extends TargetImpl { @Override public Set possibleTargets(UUID sourceControllerId, Game game) { Set possibleTargets = new HashSet<>(); - for (StackObject stackObject: game.getStack()) { + for (StackObject stackObject : game.getStack()) { Spell spell = game.getStack().getSpell(stackObject.getId()); - if (spell != null && filter.match(spell, null, sourceControllerId, game) && filter.match(spell, game)) { + if (spell != null + && filter.match(spell, null, sourceControllerId, game)) { possibleTargets.add(spell.getId()); } } - for (Permanent permanent: game.getBattlefield().getActivePermanents(filterPermanent, sourceControllerId, game)) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter.getPermanentFilter(), sourceControllerId, game)) { if (filter.match(permanent, null, sourceControllerId, game)) { possibleTargets.add(permanent.getId()); } @@ -237,12 +248,11 @@ public class TargetSpellOrPermanent extends TargetImpl { @Override public String getTargetedName(Game game) { StringBuilder sb = new StringBuilder(); - for (UUID targetId: getTargets()) { + for (UUID targetId : getTargets()) { Permanent permanent = game.getPermanent(targetId); if (permanent != null) { sb.append(permanent.getLogName()).append(" "); - } - else { + } else { Spell spell = game.getStack().getSpell(targetId); sb.append(spell.getLogName()).append(" "); } diff --git a/Utils/known-sets.txt b/Utils/known-sets.txt index 2f7739ae8cf..9b462e003ae 100644 --- a/Utils/known-sets.txt +++ b/Utils/known-sets.txt @@ -101,6 +101,7 @@ Morningtide|morningtide| Nemesis|nemesis| New Phyrexia|newphyrexia| Ninth Edition|ninthedition| +Oath of the Gatewatch|oathofthegatewatch| Odyssey|odyssey| Onslaught|onslaught| Planar Chaos|planarchaos| @@ -147,3 +148,4 @@ World Magic Cup Qualifier|worldmagiccupqualifier| Worldwake|worldwake| WPN Gateway|wpngateway| Zendikar|zendikar| +Zendikar Expeditions|zendikarexpeditions| \ No newline at end of file diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index a82019c6502..9146198e3b3 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -5894,6 +5894,7 @@ Serum Visions|Friday Night Magic|183|C|{U}|Sorcery|||Draw a card.$Scry 2. (To Orator of Ojutai|Friday Night Magic|184|U|{1}{W}|Creature - Bird Monk|0|4|Defneder, flying$As an additional cost to cast Orator of Ojutai, you may reveal a Dragon card from your hand.$When Orator of Ojutai enters the battlefield, if you revealed a Dragon card or controlled a Dragon as you cast Orator of Ojutai, draw a card.| Ultimate Price|Friday Night Magic|185|U|{1}{B}|Instant|||Destroy target monocolored creature.| Roast|Friday Night Magic|186|U|{1}{R}|Sorcery|||Roast deals 5 damage to target creature without flying.| +Anticipate|Friday Night Magic|186|C|{1}{U}|Instant|||Look at the top three cards of your library. Put one of them into your hand and the rest on the bottom of your library in any order.| Angel of Salvation|Future Sight|1|R|{6}{W}{W}|Creature - Angel|5|5|Flash; convoke (Each creature you tap while casting this spell reduces its cost by {1} or by one mana of that creature's color.)$Flying$When Angel of Salvation enters the battlefield, prevent the next 5 damage that would be dealt this turn to any number of target creatures and/or players, divided as you choose.| Knight of Sursi|Future Sight|10|C|{3}{W}|Creature - Human Knight|2|2|Flying; flanking (Whenever a creature without flanking blocks this creature, the blocking creature gets -1/-1 until end of turn.)$Suspend 3-{W} (Rather than cast this card from your hand, you may pay {W} and exile it with three time counters on it. At the beginning of your upkeep, remove a time counter. When the last is removed, cast it without paying its mana cost. It has haste.)| Haze of Rage|Future Sight|100|U|{1}{R}|Sorcery|||Buyback {2} (You may pay an additional {2} as you cast this spell. If you do, put this card into your hand as it resolves.)$Creatures you control get +1/+0 until end of turn.$Storm (When you cast this spell, copy it for each spell cast before it this turn.)| @@ -27356,109 +27357,277 @@ Swamp|Duel Decks: Zendikar vs. Eldrazi|72|L||Basic Land - Swamp|||B| Mountain|Duel Decks: Zendikar vs. Eldrazi|73|L||Basic Land - Mountain|||M| Mountain|Duel Decks: Zendikar vs. Eldrazi|74|L||Basic Land - Mountain|||M| Mountain|Duel Decks: Zendikar vs. Eldrazi|75|L||Basic Land - Mountain|||M| -Blight Herder|Battle for Zendikar|2|R|{5}|Creature - Eldrazi Processor|4|5|When you cast Blight Herder, you may put two cards your opponents own from exile into their owners' graveyards. If you do, put three 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool."| -Breaker of Armies|Battle for Zendikar|3|U|{8}|Creature - Eldrazi|10|8|All creatures able to block Breaker of Armies do so.| -Conduit of Ruin|Battle for Zendikar|4|R|{6}|Creature - Eldrazi|5|5|When you cast Conduit of Ruin, you may search your library for a colorless creature card with converted mana cost 7 or greater, then shuffle your library and put that card on top of it. The first creature spell you cast each turn costs {2} less to cast.| -Deathless Behemoth|Battle for Zendikar|5|R|{6}|Creature - Eldrazi|6|6|Vigilance$Sacrifice two Eldrazi Scions: Return Deathless Behemoth from your graveyard to your hand. Activate this ability only any time you could cast a sorcery.| -Desolation Twin|Battle for Zendikar|6|R|{10}|Creature - Eldrazi|10|10|When you cast Desolation Twin, put a 10/10 colorless Eldrazi creature token onto the battlefield.| -Eldrazi Devastator|Battle for Zendikar|7|C|{8}|Creature - Eldrazi|8|9|Trample| -Kozilek's Channeler|Battle for Zendikar|10|C|{5}|Creature - Eldrazi|4|4|{T}: Add {2} to your mana pool.| -Oblivion Sower|Battle for Zendikar|11|M|{6}|Creature - Eldrazi|5|8|When you cast Oblivion Sower, target opponent exiles the top four cards of his or her library, then you may put any number of land cards that player owns from exile onto the battlefield under your control.| -Titan's Presence|Battle for Zendikar|14|U|{3}|Instant|||As an additional cost to cast Titan's Presence, reveal a colorless creature card from your hand.$Exile target creature if its power is less than or equal to the revealed card's power.| -Ulamog, the Ceaseless Hunger|Battle for Zendikar|15|M|{10}|Legendary Creature - Eldrazi|10|10|When you cast Ulamog, the Ceaseless Hunger, exile two target permanents.$Indestructible$Whenever Ulamog attacks, defending player exiles the top twenty cards of his or her library.| -Void Winnower|Battle for Zendikar|Battle for Zendikar|17|M|{9}|Your opponents can't cast spells with even converted mana costs. (Zero is even.)$Your opponents can't block with creatures with even converted mana costs.| +Blight Herder|Battle for Zendikar|002|R|{5}|Creature - Eldrazi Processor|4|5|When you cast Blight Herder, you may put two cards your opponents own from exile into their owners' graveyards. If you do, put three 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool."| +Kozilek's Channeler|Battle for Zendikar|010|C|{5}|Creature - Eldrazi|4|4|{T}: Add {2} to your mana pool.| +Eldrazi Devastator|Battle for Zendikar|007|C|{8}|Creature - Eldrazi|8|9|Trample| +Titan's Presence|Battle for Zendikar|014|U|{3}|Instant|||As an additional cost to cast Titan's Presence, reveal a colorless creature card from your hand.$Exile target creature if its power is less than or equal to the revealed card's power.| +Ulamog, the Ceaseless Hunger|Battle for Zendikar|015|M|{1}{0}|Legendary Creature - Eldrazi|10|10|When you cast Ulamog, the Ceaseless Hunger, exile two target permanents.$Indestructible$Whenever Ulamog attacks, defending player exiles the top twenty cards of his or her library.| +Breaker of Armies|Battle for Zendikar|003|U|{8}|Creature - Eldrazi|10|8|All creatures able to block Breaker of Armies do so.| +Desolation Twin|Battle for Zendikar|006|R|{1}{0}|Creature - Eldrazi|10|10|When you cast Desolation Twin, put a 10/10 colorless Eldrazi creature token onto the battlefield.| +Conduit of Ruin|Battle for Zendikar|004|R|{6}|Creature - Eldrazi|5|5|When you cast Conduit of Ruin, you may search your library for a colorless creature card with converted mana cost 7 or greater, reveal it, then shuffle your library and put that card on top of it.$The first creature spell you cast each turn costs {2} less to cast.| +Deathless Behemoth|Battle for Zendikar|005|U|{6}|Creature - Eldrazi|6|6|Vigilance$Sacrifice two Eldrazi Scions: Return Deathless Behemoth from your graveyard to your hand. Activate this ability only any time you could cast a sorcery.| +Void Winnower|Battle for Zendikar|017|M|{9}|Creature - Eldrazi|11|9|Your opponent can't cast spells with even converted mana costs. (Zero is even.)$Your opponents can't block with creatures with even converted mana costs.| +Endless One|Battle for Zendikar|008|R|{X}|Creature - Eldrazi|0|0|Endless One enters the battlefield with X +1/+1 counters on it.| +Scour from Existence|Battle for Zendikar|013|C|{7}|Instant|||Exile target permanent.| +Gruesome Slaughter|Battle for Zendikar|009|R|{6}|Sorcery|||Until end of turn, colorless creatures you control gain "{T}: This creature deals damage equal to its power to target creature."| +Bane of Bala Ged|Battle for Zendikar|001|U|{7}|Creature - Eldrazi|7|5|Whenever Bane of Bala Ged attacks, defending player exiles two permanents he or she controls.| +Ruin Processor|Battle for Zendikar|012|U|{7}|Creature - Eldrazi Processor|7|8|When you cast Ruin Processor, you may put a card an opponent owns from exile into that player's graveyard. If you do, you gain 5 life.| +Ulamog's Despoiler|Battle for Zendikar|016|U|{6}|Creature - Eldrazi Processor|5|5|As Ulamog's Despoiler enters the battlefield, you may put two cards your opponents own from exile into their owners' graveyards. If you do, Ulamog's Despoiler enters the battlefield with four +1/+1 counters on it.| +Oblivion Sower|Battle for Zendikar|011|M|{6}|Creature - Eldrazi|5|8|When you cast Oblivion Sower, target opponent exiles the top four cards of his or her library, then you may put any number of land cards that player owns from exile onto the battlefield under your control.| +Angel of Renewal|Battle for Zendikar|018|U|{5}{W}|Creature - Angel Ally|4|4|Flying$When Angel of Renewal enters the battlefield, you gain 1 life for each creature you control.| +Angelic Gift|Battle for Zendikar|019|C|{1}{W}|Enchantment - Aura|||Enchant creature$When Angelic Gift enters the battlefield, draw a card.$Enchanted creature has flying.| +Cliffside Lookout|Battle for Zendikar|020|C|{W}|Creature - Kor Scout Ally|1|1|{4}{W}: Creatures you control get +1/+1 until end of turn.| +Courier Griffin|Battle for Zendikar|020|C|{3}{W}|Creature - Griffin|2|3|Flying$When Courier Griffin enters the battlefield, you gain 2 life.| +Emeria Shepherd|Battle for Zendikar|22|R|{5}{W}{W}|Creature - Angel|4|4|Flying$Landfall — Whenever a land enters the battlefield under your control, you may return target nonland permanent card from your graveyard to your hand. If that land is a Plains, you may return that nonland permanent card to the battlefield instead.| +Encircling Fissure|Battle for Zendikar|023|U|{2}{W}|Instant|||Prevent all combat damage that would be dealt this turn by creatures target opponent controls.$Awaken 2 —{4}{W} (If you cast this spell for 5U, also put two +1/+1 counters on target land you control and it becomes a 0/0 Elemental creature with haste. It's still a land.)| +Expedition Envoy|Battle for Zendikar|024|U|{W}|Creature - Human Scout Ally|2|1|| Felidar Cub|Battle for Zendikar|25|C|{1}{W}|Creature - Cat Beast|2|2|Sacrifice Felidar Cub: Destroy target enchantment.| Felidar Sovereign|Battle for Zendikar|26|R|{4}{W}{W}|Creature - Cat Beast|4|6|Vigilance, lifelink$At the beginning of your upkeep, if you have 40 or more life, you win the game.| -Gideon, Ally of Zendikar|Battle for Zendikar|29|M|{2}{W}{W}|Planeswalker - Gideon|||+1: Until end of turn, Gideon, Ally of Zendikar becomes a 5/5 Human Soldier Ally creature with indestructible that's still a planeswalker. Prevent all damage that would be dealt to him this turn.$0: Put a 2/2 white Knight Ally creature token onto the battlefield.$-4: You get an emblem with "Creatures you control get +1/+1."| +Fortified Rampart|Battle for Zendikar|027|C|{1}{W}|Creature - Wall|0|6|Defender| +Ghostly Sentinel|Battle for Zendikar|028|C|{4}{W}|Creature - Kor Spirit|3|3|Flying, vigilance| +Gideon, Ally of Zendikar|Battle for Zendikar|29|M|{2}{W}{W}|Planeswalker - Gideon|4|+1: Until end of turn, Gideon, Ally of Zendikar becomes a 5/5 Human Soldier Ally creature with indestructible that's still a planeswalker. Prevent all damage that would be dealt to him this turn.$0: Put a 2/2 white Knight Ally creature token onto the battlefield.$-4: You get an emblem with "Creatures you control get +1/+1."| Gideon's Reproach|Battle for Zendikar|30|C|{1}{W}|Instant|||Gideon's Reproach deals 4 damage to target attacking or blocking creature.| -Hero of Goma Fada|Battle for Zendikar|31|R|{4}{W}|Creature - Human Knight Ally|4|3|Rally - Whenever Hero of Goma Fada or another Ally enters the battlefield under your control, creatures you control gain indestructible until end of turn.| -Lantern Scout|Battle for Zendikar|37|R|{2}{W}|Creature - Human Scout Ally|3|2|Rally - Whenever Lantern Scout or another Ally enters the battlefield under your control, creatures you control gain lifelink until end of turn.| -Planar Outburst|Battle for Zendikar|42|R|{3}{W}{W}|Sorcery|||Destroy all nonland creatures.$Awaken 4-{5}{W}{W}{W} If you cast this spell for {5}{W}{W}{W}, also put four +1/+1 counters on target land you control and it becomes a 0/0 Elemental creature with haste. It's still a land.)| -Retreat to Emeria|Battle for Zendikar|44|U|{3}{W}|Enchantment|||Landfall - Whenever a land enters the battlefield under you control, choose one - Put a 1/1 white Kor Ally creature token onto the battlefield; or Creatures you control get +1/+1 until end of turn.| -Sheer Drop|Battle for Zendikar|48|C|{2}{W}|Sorcery|||Destroy target tapped creature.$Awaken 3-{5}{W} (If you cast this spell for {5}{W}, also put three +1/+1 counters on target land you control and it becomes a 0/0 Elemental creature with haste. It's still a land.)| -Stasis Snare|Battle for Zendikar|50|U|{1}{W}{W}|Enchantment|||Flash$When Stasis Snare enters the battlefield, exile target creature an opponent controls until Stasis Snare leaves the battlefield.| +Hero of Goma Fada|Battle for Zendikar|31|R|{4}{W}|Creature - Human Knight Ally|4|3|Rally — Whenever Hero of Goma Fada or another Ally enters the battlefield under your control, creatures you control gain indestructible until end of turn.| +Inspired Charge|Battle for Zendikar|032|C|{2}{W}{W}|Instant|||Creatures you control get +2/+1 until end of turn.| +Kitesail Scout|Battle for Zendikar|033|C|{W}|Creature - Kor Scout|1|1|Flying| +Kor Bladewhirl|Battle for Zendikar|034|U|{1}{W}|Creature - Kor Soldier Ally|2|2|Rally — Whenever Kor Bladewhirl or another Ally enters the battlefield under your control, creatures you control gain first strike until end of turn.| +Kor Castigator|Battle for Zendikar|035|C|{1}{W}|Creature - Kor Wizard Ally|3|1|Kor Castigator can't be blocked by Eldrazi Scions.| +Kor Entanglers|Battle for Zendikar|036|U|{4}{W}|Creature - Kor Soldier Ally|3|4|Rally — Whenever Kor Entanglers or another Ally enters the battlefield under your control, tap target creature an opponent controls.| +Lantern Scout|Battle for Zendikar|37|R|{2}{W}|Creature - Human Scout Ally|3|2|Rally — Whenever Lantern Scout or another Ally enters the battlefield under your control, creatures you control gain lifelink until end of turn.| +Lithomancer's Focus|Battle for Zendikar|038|C|{W}|Instant|||Target creature gets +2/+2 until end of turn. Prevent all damage that would be dealt to that creature this turn by colorless sources.| +Makindi Patrol|Battle for Zendikar|039|C|{2}{W}|Creature - Human Knight Ally|2|3|Rally — Whenever Makindi Patrol or another Ally enters the battlefield under your control, creatures you control gain vigilance until end of turn.| +Ondu Greathorn|Battle for Zendikar|040|C|{3}{W}|Creature - Beast|2|3|First strike$Landfall — Whenever a land enters the battlefield under your control, Ondu Greathorn gets +2/+2 until end of turn.| +Ondu Rising|Battle for Zendikar|041|U|{1}{W}|Sorcery|||Whenever a creature attacks this turn, it gains lifelink until end of turn.$Awaken 4—{4}{W} (If you cast this spell for 5U, also put four +1/+1 counters on target land you control and it becomes a 0/0 Elemental creature with haste. It's still a land.)| +Planar Outburst|Battle for Zendikar|42|R|{3}{W}{W}|Sorcery|||Destroy all nonland creatures.$Awaken 4—{5}{W}{W}{W} (If you cast this spell for {5}{W}{W}{W}, also put four +1/+1 counters on target land you control and it becomes a 0/0 Elemental creature with haste. It's still a land.)| +Quarantine Field|Battle for Zendikar|43|M|{X}{X}{W}{W}|Enchantment|||Quarantine Field enters the battlefield with X isolation counters on it.$When Quarantine Field enters the battlefield, for each isolation counter on it, exile up to one target nonland permanent an opponent controls until Quarantine Field leaves the battlefield.| +Retreat to Emeria|Battle for Zendikar|44|U|{3}{W}|Enchantment|||Landfall — Whenever a land enters the battlefield under your control, choose one —$• Put a 1/1 white Kor Ally creature token onto the battlefield.$• Creatures you control get +1/+1 until end of turn.| +Roil's Retribution|Battle for Zendikar|045|U|{3}{W}{W}|Instant|||Roil's Retribution deals 5 damage divided as you choose among any number of target attacking or blocking creatures.| +Serene Steward|Battle for Zendikar|046|U|{1}{W}|Creature - Human Cleric Ally|2|2|Whenever you gain life, you may pay {W}. If you do, put a +1/+1 counter on target creature.| +Shadow Glider|Battle for Zendikar|047|C|{2}{W}|Creature - Kor Soldier|2|2|Flying| +Sheer Drop|Battle for Zendikar|48|C|{2}{W}|Sorcery|||Destroy target tapped creature.$Awaken 3—{5}{W} (If you cast this spell for {5}{W}, also put three +1/+1 counters on target land you control and it becomes a 0/0 Elemental creature with haste. It's still a land.)| +Smite the Monstrous|Battle for Zendikar|049|C|{3}{W}|Instant|||Destroy target creature with power 4 or greater.| +Stasis Snare|Battle for Zendikar|50|U|{1}{W}{W}|Enchantment|||Flash$When Stasis Snare enters the battlefield, exile target creature an opponent controls until Stasis Snare leaves the battlefield. (That creature returns under its owner's control.)| +Stone Haven Medic|Battle for Zendikar|051|C|{1}{W}|Creature - Kor Cleric|1|3|{W}, {t}: You gain 1 life.| Tandem Tactics|Battle for Zendikar|52|C|{1}{W}|Instant|||Up to two target creatures each get +1/+2 until end of turn. You gain 2 life.| -Drowner of Hope|Battle for Zendikar|57|R|{5}{U}|Creature - Eldrazi|5|5|Devoid (This card has no color.)$When Drowner of Hope enters the battlefield, put two 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool."$Sacrifice an Eldrazi Scion: Tap target creature.| -Incubator Drone|Battle for Zendikar|60|C|{3}{U}|Creature - Eldrazi Drone|2|3|Devoid (This card has no color.)$Whenever Incubator Drone enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool."| -Mist Intruder|Battle for Zendikar|61|C|{1}{U}|Creature - Eldrazi Drone|1|2|Devoid (This card has no color.)$Flying$Ingest (Whenever this creature deals combat damage to a player, that player exiles the top card of his or her library.)| -Coastal Discovery|Battle for Zendikar|73|U|{3}{U}|Sorcery|||Draw two cards.$Awaken 4 - {5}U} If you cast this spell for {5}{U}, also put four +1/+1 counters on target land you control and it becomes a 0/0 Elemental creature with haste. It's still a land.)| -Exert Influence|Battle for Zendikar|77|R|{4}{U}|Sorcery|||Converge-Gain control of target creature if its power is less than or equal to the number of colors spent to cast Exert Influence.| -Guardian of Tazeem|Battle for Zendikar|78|R|{3}{U}{U}|Creature - Sphinx|4|5|Flying$Landfall - Whenever a land enters the battlefield under your control, tap target creature an opponent controls. If that land is an Island, that creature doesn't untap during its controller's next untap step.| -Prism Network|Battle for Zendikar|81|R|{4}{U}|Enchantment|||Converge-Prism Network enters the battlefield with hedron counters equal to the number of colors spent to cast Prism Network.$Remove a hedron counter from Prism Network: Tap target creature.${W}{U}{B}{R}{G}: Scry 3.| -Dominator Drone|Battle for Zendikar|92|C|{2}{B}|Creature - Eldrazi Drone|3|2|Devoid (This card has no color.)$Ingest (Whenever this creature deals combat damage to a player, that player exiles the top card of his or her library.)$When Dominator Drone enters the battlefield, if you control another colorless creature, each opponent loses 2 life.| -Skitterskin|Battle for Zendikar|97|U|{3}{B}|Creature - Eldrazi Drone|4|3|Devoid (This card has no color.)$Skitterskin can't block.${1}{B}: Regenerate Skitterskin. Activate this ability only if you control another colorless creature.| -Smothering Abomination|Battle for Zendikar|99|R|{2}{B}{B}|Creature - Eldrazi|4|3|Devoid (This card has no color.)$Flying$At the beginning of your upkeep, sacrifice a creature.$Whenever you sacrifice a creature, draw a card.| -Transgress the Mind|Battle for Zendikar|101|U|{1}{B}|Sorcery|||Devoid (This card has no color.)$Target player reveals his or her hand. You may choose a card from it with converted mana cost 3 or greater and exile that card.| +Unified Front|Battle for Zendikar|053|U|{3}{W}|Sorcery|||Converge — Put a 1/1 white Kor Ally creature token onto the battlefield for each color of mana spent to cast Unified Front.| +Adverse Conditions|Battle for Zendikar|54|U|{3}{U}|Instant|||Devoid (This card has no color.)$Tap up to two target creatures. Those creatures don't untap during their controller's next untap step. Put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool."| +Anticipate|Battle for Zendikar|69|C|{1}{U}|Instant|||Look at the top three cards of your library. Put one of them into your hand and the rest on the bottom of your library in any order.| +Benthic Infiltrator|Battle for Zendikar|55|C|{2}{U}|Creature - Eldrazi Drone|1|4|Devoid (This card has no color.)$Ingest (Whenever this creature deals combat damage to a player, that player exiles the top card of his or her library.)$Benthic Infiltrator can't be blocked.| +Brilliant Spectrum|Battle for Zendikar|70|C|{3}{U}|Sorcery|||Converge — Draw X cards, where X is the number of colors of mana spent to cast Brilliant Spectrum. Then discard two cards.| +Cloud Manta|Battle for Zendikar|71|C|{3}{U}|Creature - Fish|3|2|Flying| +Clutch of Currents|Battle for Zendikar|72|C|{U}|Sorcery|||Return target creature to its owner's hand.$Awaken 3—{4}{U} (If you cast this spell for {4}{U}, also put three +1/+1 counters on target land you control and it becomes a 0/0 Elemental creature with haste. It's still a land.)| +Coastal Discovery|Battle for Zendikar|073|U|{3}{U}|Sorcery|||Draw two cards.$Awaken 4—{5}{U} (If you cast this spell for {5}{U}, also put four +1/+1 counters on target land you control and it becomes a 0/0 Elemental creature with haste. It's still a land.)| +Coralhelm Guide|Battle for Zendikar|74|C|{1}{U}|Creature - Merfolk Scout Ally|2|1|{4}{U}: Target creature can't be blocked this turn.| +Cryptic Cruiser|Battle for Zendikar|56|U|{3}{U}|Creature - Eldrazi Processor|3|3|Devoid (This card has no color.)${2}{U}, Put a card an opponent owns from exile into that player's graveyard: Tap target creature.| +Dampening Pulse|Battle for Zendikar|75|U|{3}{U}|Enchantment|||Creatures your opponents control get -1/-0.| +Dispel|Battle for Zendikar|76|C|{U}|Instant|||Counter target instant spell.| +Drowner of Hope|Battle for Zendikar|057|R|{5}{U}|Creature - Eldrazi|5|5|Devoid (This card has no color.)$When Drowner of Hope enters the battlefield, put two 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool."$Sacrifice an Eldrazi Scion: Tap Target creature.| +Eldrazi Skyspawner|Battle for Zendikar|58|C|{2}{U}|Creature - Eldrazi Drone|2|1|Devoid (This card has no color.)$Flying$When Eldrazi Skyspawner enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool."| +Exert Influence|Battle for Zendikar|077|R|{4}{U}|Sorcery|||Converge — Gain control of target creature if its power is less than or equal to the number of colors of mana spent to cast Exert Influence.| +Guardian of Tazeem|Battle for Zendikar|078|R|{3}{U}{U}|Creature - Sphinx|4|5|Flying$Landfall — Whenever a land enters the battlefield under your control, tap target creature an opponent controls. If that land is an Island, that creature doesn't untap during its controller's next untap step. | +Halimar Tidecaller|Battle for Zendikar|79|U|{2}{U}|Creature - Human Wizard Ally|2|3|When Halimar Tidecaller enters the battlefield, you may return target card with awaken from your graveyard to your hand.$Land creatures you control have flying.| +Horribly Awry|Battle for Zendikar|059|U|{1}{U}|Instant|||Devoid (This card has no color.)$Counter target creature spell with converted mana cost 4 or less. If that spell is countered this way, exile it instead of putting it into its owner's graveyard.| +Incubator Drone|Battle for Zendikar|060|C|{3}{U}|Creature - Eldrazi Drone|2|3|Devoid (This card has no color.)$When Incubator Drone enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool."| +Mist Intruder|Battle for Zendikar|061|C|{1}{U}|Creature - Eldrazi Drone|1|2|Devoid (This card has no color.)$Flying$Ingest (Whenever this creature deals combat damage to a player, that player exiles the top card of his or her library.)| +Murk Strider|Battle for Zendikar|62|C|{3}{U}|Creature - Eldrazi Processor|3|2|When Murk Strider enters the battlefield, you may put a card an opponent owns from exile into that player's graveyard. If you do, return target creature to its owner's hand.| +Oracle of Dust|Battle for Zendikar|63|C|{4}{U}|Creature - Eldrazi Processor|3|5|Devoid (This card has no color.)${2}, Put a card an opponent owns from exile into that player's graveyard: Draw a card, then discard a card.| +Part the Waterveil|Battle for Zendikar|80|M|{4}{U}{U}|Sorcery|||Take an extra turn after this one. Exile Part the Waterveil.$Awaken 6—{6}{U}{U}{U} (If you cast this spell for {6}{U}{U}{U}, also put six +1/+1 counters on target land you control and it becomes a 0/0 Elemental creature with haste. It's still a land.)| +Prism Array|Battle for Zendikar|081|R|{4}{U}|Enchantment|||Converge — Prism Array enters the battlfield with a crystal counter on it for each color of mana spent to cast it.$Remove a crystal counter from Prism Array: Tap target creature.${W}{U}{B}{R}{G}: Scry 3. | +Retreat to Coralhelm|Battle for Zendikar|082|U|{2}{U}|Enchantment|||Landfall — Whenever a land enters the battlefield under your control, choose one —$• You may tap or untap target creature.$• Scry 1.| +Roilmage's Trick|Battle for Zendikar|83|C|{3}{U}|Instant|||Converge — Creatures your opponents control get -X/-0 until end of turn, where X is the number of colors of mana spent to cast Roilmage's Trick.$Draw a card.| +Ruination Guide|Battle for Zendikar|64|U|{2}{U}|Creature - Eldrazi Drone|3|2|Devoid (This card has no color.)$Ingest (Whenever this creature deals combat damage to a player, that player exiles the top card of his or her library.)$Other colorless creatures you control get +1/+0.| +Rush of Ice|Battle for Zendikar|84|C|{U}|Sorcery|||Tap target creature. It doesn't untap during its controller's next untap step.$Awaken 3—{4}{U} (If you cast this spell for {4}{U}, also put three +1/+1 counters on target land you control and it becomes a 0/0 Elemental creature with haste. It's still a land.)| +Salvage Drone|Battle for Zendikar|65|C|{U}|Creature - Eldrazi Drone|1|1|Devoid (This card has no color.)$Ingest (Whenever this creature deals combat damage to a player, that player exiles the top card of his or her library.)$When Salvage Drone dies, you may draw a card. If you do, discard a card.| +Scatter to the Winds|Battle for Zendikar|85|R|{1}{U}{U}|Instant|||Counter target spell.$Awaken 3—{4}{U}{U} (If you cast this spell for {4}{U}{U}, also put three +1/+1 counters on target land you control and it becomes a 0/0 Elemental creature with haste. It's still a land.)| +Spell Shrivel|Battle for Zendikar|66|C|{2}{U}|Instant|||Devoid (This card has no color.)$Counter target spell unless its controller pays {4}. If that spell is countered this way, exile it instead of putting it into its owner's graveyard.| +Tide Drifter|Battle for Zendikar|67|U|{1}{U}|Creature - Eldrazi Drone|0|5|Devoid (This card has no color.)$Other colorless creatures you control get +0/+1.| +Tightening Coils|Battle for Zendikar|86|C|{1}{U}|Enchantment - Aura|||Enchant creature$Enchanted creature gets -6/-0 and loses flying.| +Ugin's Insight|Battle for Zendikar|087|R|{3}{U}{U}|Sorcery|||Scry X, where X is the highest converted mana cost among permanents you control, then draw three cards.| +Ulamog's Reclaimer|Battle for Zendikar|68|U|{4}{U}|Creature - Eldrazi Processor|2|5|Devoid (This card has no color.)$When Ulamog's Reclaimer enters the battlefield, you may put a card an opponent owns from exile into that player's graveyard. If you do, return target instant or sorcery card from your graveyard to your hand.| +Wave-Wing Elemental|Battle for Zendikar|088|C|{5}{U}|Creature - Elemental|3|4|Flying$Landfall — Whenver a land enters the battlefield under your control, Wave-Wing Elemental gets +2/+2 until end of turn.| +Windrider Patrol|Battle for Zendikar|089|U|{3}{U}{U}|Creature - Merfolk Wizard|4|3|Flying$Whenever Windrider Patrol deals combat damage to a player, scry 2.| +Altar's Reap|Battle for Zendikar|103|C|{1}{B}|Instant|||As an additional cost to cast Altar's Reap, sacrifice a creature.$Draw two cards.| +Bloodbond Vampire|Battle for Zendikar|104|U|{2}{B}{B}|Creature - Vampire Shaman Ally|3|3|Whenever you gain life, put a +1/+1 counter on Bloodbond Vampire.| +Bone Splinters|Battle for Zendikar|105|C|{B}|Sorcery|||As an additional cost to cast Bone Splinters, sacrifice a creature.$Destroy target creature.| +Carrier Thrall|Battle for Zendikar|106|U|{1}{B}|Creature - Vampire|2|1|When Carrier Thrall dies, put a 1/1 colorless Eldrazi Scion token onto the battlefield. It has "Sacrifice this creature. Add {1} to your mana pool."| +Complete Disregard|Battle for Zendikar|90|C|{2}{B}|Instant|||Devoid (This card has no color.)$Exile target creature with power 3 or less.| +Culling Drone|Battle for Zendikar|91|C|{1}{B}|Creature - Eldrazi Drone|2|2|Devoid (This card has no color.)$Ingest (Whenever this creature deals combat damage to a player, that player exiles the top card of his or her library.)| Defiant Bloodlord|Battle for Zendikar|107|R|{5}{B}{B}|Creature - Vampire|4|5|Flying$Whenever you gain life, target opponent loses that much life.| -Ob Nixilis Reignited|Battle for Zendikar|119|M|{3}{B}{B}|Planeswalker - Nixilis|||+1: You draw a card and you lose 1 life.$-3: Destroy target creature.$-8: Target opponent gets an emblem with "Whenever a player draws a card, you lose 2 life."| -Ruinous Path|Battle for Zendikar|123|R|{1}{B}{B}|Sorcery|||Destroy target creature or planeswalker.$Awaken 4-{5}{B}{B} (If you cast this spell for {5}{B}{B}, also put four +1/+1 counters on target land you control and it becomes a 0/0 Elemental creature with haste. It's still a land.)| +Demon's Grasp|Battle for Zendikar|108|C|{4}{B}|Sorcery|||Target creature gets -5/-5 until end of turn.| +Dominator Drone|Battle for Zendikar|92|C|{2}{B}|Creature - Eldrazi Drone|3|2|Devoid (This creature has no color.)$Ingest (Whenever this creature deals combat damage to a player, that player exiles the top card of his or her library.)$When Dominator Drone enters the battlefield, if you control another colorless creature, each opponent loses 2 life.| +Drana, Liberator of Malakir|Battle for Zendikar|109|M|{1}{B}{B}|Legendary Creature - Vampire Ally|2|3|Flying, first strike$Whenever Drana, Liberator of Malakir deals combat damage to a player, put a +1/+1 counter on each attacking creature you control.| +Dutiful Return|Battle for Zendikar|110|C|{3}{B}|Sorcery|||Return up to two target creature cards from your graveyard to your hand.| +Geyserfield Stalker|Battle for Zendikar|111|C|{4}{B}|Creature - Elemental|3|2|Menace$Landfall - Whenever a land enters the battlefield under your control, Geyserfield Stalker gets +2/+2 until end of turn.| +Grave Birthing|Battle for Zendikar|93|C|{2}{B}|Instant|||Devoid (This card has no color.)$Target opponent exiles a card from his or her graveyard. You put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool."$Draw a card.| +Grip of Desolation|Battle for Zendikar|94|U|{4}{B}{B}|Intant|||Devoid (This card has no color.)$Exile target creature and target land.| +Guul Draz Overseer|Battle for Zendikar|112|R|{4}{B}{B}|Creature - Vampire|3|4|Flying$Landfall — Whenever a land enters the battlefield under your control, other creatures you control get +1/+0 until end of turn. If that land is a Swamp, those creatures get +2/+0 until end of turn instead.| +Hagra Sharpshooter|Battle for Zendikar|113|U|{2}{B}|Creature - Human Assassin Ally|2|2|{4}{B}: Target creature gets -1/-1 until end of turn.| +Kalastria Healer|Battle for Zendikar|114|C|{1}{B}|Creature - Vampire Cleric Ally|1|2|Rally - Whenever Kalastria Healer or another Ally enters the battlefield under your control, each opponent loses 1 life and you gain 1 life.| +Kalastria Nightwatch|Battle for Zendikar|115|C|{4}{B}|Creature - Vampire Warrior Ally|4|5|Whenever you gain life, Kalastria Nightwatch gains flying until end of turn.| +Malakir Familiar|Battle for Zendikar|116|U|{2}{B}|Creature - Bat|2|1|Flying, deahtouch$Whenever you gain life, Malakir Familiar gets +1/+1 until end of turn.| +Mind Raker|Battle for Zendikar|95|C|{3}{B}|Creature - Eldrazi Processor|3|3|Devoid (This card has no color.)$When Mind Raker enters the battlefield, you may put a card an opponent owns from exile into that player's graveyard. If you do, each opponent discards a card.| +Mire's Malice|Battle for Zendikar|117|C|{3}{B}|Sorcery|||Target opponent discards two cards.$Awaken 3 - {5}{B} (If you cast this spell for {5}{B}, also put three +1/+1 counters on target land you control and it becomes a 0/0 Elemental creature with haste. It's still a land.)| +Nirkana Assassin|Battle for Zendikar|118|C|{2}{B}|Creature - Vampire Assassin Ally|2|3|Whenever you gain life, Nirkana Assassin gains deathtouch until end of turn.| +Ob Nixilis Reignited|Battle for Zendikar|119|M|{3}{B}{B}|Planeswalker - Nixilis|5|+1: You draw a card and you lose 1 life.$-3: Destroy target creature.$-8: Target opponent gets an emblem with "Whenever a player draws a card, you lose 2 life."| +Painful Truths|Battle for Zendikar|120|R|{2}{B}|Sorcery|||Converge — You draw X cards and you lose X life, where X is the number of colors of mana spent to cast Painful Truths.| +Retreat to Hagra|Battle for Zendikar|121|U|{2}{B}|Enchantment|||Landfall — Whenever a land enters the battlefield under your control, choose one —$• Target creature gets +1/+0 and gains deathtouch until end of turn.$• Each opponent loses 1 life and you gain 1 life.| +Rising Miasma|Battle for Zendikar|122|U|{3}{B}|Sorcery|||All creatures get -2/-2 until end of turn. $Awaken 3 - {5}{B}{B} (If you cast this spell for {5}{B}{B}, also put three +1/+1 counters on target land you control and it becomes a 0/0 Elemental creature with haste. It's still a land.)| +Ruinous Path|Battle for Zendikar|123|R|{1}{B}{B}|Sorcery|||Destroy target creature or planeswalker.$Awaken 4—{5}{B}{B} (If you cast this spell for {5}{B}{B}, also put four +1/+1 counters on target land you control and it becomes a 0/0 Elemental creature with haste. It's still a land.)| +Silent Skimmer|Battle for Zendikar|96|C|{3}{B}|Creature - Eldrazi Drone|0|4|Devoid (This card has no color.)$Flying$Whenever Silent Skimmer attacks, defending player loses 2 life.| +Skitterskin|Battle for Zendikar|97|U|{3}{B}|Creature - Eldrazi Drone|4|3|Devoid (This card has no color.)$Skitterskin can't block.${1}{B}: Regenerate Skitterskin. Activate this ability only if you control another colorless creature.| +Sludge Crawler|Battle for Zendikar|98|C|{B}|Creature - Eldrazi Drone|1|1|Devoid (This card has no color.)$Ingest (Whenever this creature deals combat damage to a player, exile the top card of his or her library)${2}: Sludge Crawler gets +1/+1 until end of turn.| +Smothering Abomination|Battle for Zendikar|99|R|{2}{B}{B}|Creature - Eldrazi|4|3|Devoid (This card has no color.)$Flying$At the beginning of your upkeep, sacrifice a creature.$Whenever you sacrifice a creature, draw a card.| +Swarm Surge|Battle for Zendikar|100|C|{2}{B}|Sorcery|||Devoid (This card has no color.)$Creatures you control get +2/+0 until end of turn. Colorless creatures you control also gain first strike until end of turn.| +Transgress the Mind|Battle for Zendikar|101|U|{1}{B}|Sorcery|||Devoid (This card has no color.)$Target player reveals his or her hand. You choose a card with converted mana cost 3 or greater and exile that card.| +Vampiric Rites|Battle for Zendikar|124|U|{B}|Enchantment|||{1}{B}, Sacrifice a creature: You gain 1 life and draw a card.| +Voracious Null|Battle for Zendikar|125|C|{2}{B}|Creature - Zombie|2|2|{1}{B}, Sacrifice another creature: Put two +1/+1 counters on Voracious Null. Activate this ability only any time you could cast a sorcery.| +Wasteland Strangler|Battle for Zendikar|102|R|{2}{B}|Creature - Eldrazi Processor|3|2|Devoid (This card has no color.)$When Wasteland Strangler enters the battlefield, you may put a card an opponent owns from exile into that player's graveyard. If you do, target creature gets -3/-3 until end of turn.| +Zulaport Cutthroat|Battle for Zendikar|126|U|{1}{B}|Creature - Human Rogue Ally|1|1|Whenever Zulaport Cutthroat or another creature you control dies, each opponent loses 1 life and you gain 1 life.| +Akoum Firebird|Battle for Zendikar|138|M|{2}{R}{R}|Creature - Phoenix|3|3|Flying, haste$Akoum Firebird attacks each turn if able.$Landfall — Whenever a land enters the battlefield under your control, you may pay {4}{R}{R}. If you do, return Akoum Firebird from your graveyard to the battlefield.| +Akoum Hellkite|Battle for Zendikar|139|R|{4}{R}{R}|Creature - Dragon|4|4|Flying$Landfall — Whenever a land enters the battlefield under your control, Akoum Hellkite deals 1 damage to target creature or player. If that land was a Mountain, Akoum Hellkite deals 2 damage to that creature or player instead.| +Akoum Stonewaker|Battle for Zendikar|140|U|{1}{R}|Creature - Human Shaman|2|1|Landfall — Whenever a land enters the battlefield under your control, you may pay {2}{R}. If you do, put a 3/1 red Elemental creature token with trample and haste onto the battlefield. Exile that token at the beginning of the next end step.| Barrage Tyrant|Battle for Zendikar|127|R|{4}{R}|Creature - Eldrazi|5|3|Devoid (This card has no color.)${2}{R}, Sacrifice another colorless creature: Barrage Tyrant deals damage equal to the sacrificed creature's power to target creature or player.| -Akoum Firebird|Battle for Zendikar|138|M|{2}{R}{R}|Creature - Phoenix|3|3|Flying, haste$Akoum Firebird attacks each turn if able.$Landfall-Whenever a land enters the battlefield under your control, you may pay {4}{R}{R}. If you do, return Akoum Firebird from your graveyard to the battlefield.| -Akoum Hellkite|Battle for Zendikar|139|R|{4}{R}{R}|Creature - Dragon|4|4|Flying$Landfall-Whenever a land enters the battlefield under you control, Akoum Hellkite deals 1 damage to target creature or player. If that land is a Mountain, Akoum Hellkite deals 2 damage to that creature or player instead.| -Radiant Flames|Battle for Zendikar|151|R|{2}{R}|Sorcery||Converge - Radiant Flames deals X damage to each creature, where X is the number of colors of mana spent to cast Radiant Flames.| +Belligerent Whiptail|Battle for Zendikar|141|C|{3}{R}|Creature - Wurm|4|2|Landfall — Whenever a land enters the battlefield under your control, Belligerent Whiptail gains first strike until end of turn.| +Boiling Earth|Battle for Zendikar|142|C|{1}{R}|Sorcery|||Boiling Earth deals 1 damage to each creature your opponents control.$Awaken 4—{6}{R} (If you cast this spell for 5U, also put four +1/+1 counters on target land you control and it becomes a 0/0 Elemental creature with haste. It's still a land.)| +Chasm Guide|Battle for Zendikar|143|U|{3}{R}|Creature - Goblin Scout Ally|3|2|Rally — Whenever Chasm Guide or another Ally enters the battlefield under your control, creatures you control gain haste until end of turn.| +Crumble to Dust|Battle for Zendikar|128|U|{3}{R}|Sorcery|||Devoid (This card has no color.)$Exile target nonbasic land. Search it's controller's graveyard, hand and library for any number of cards with the same name as that land and exile them. Then that player shuffles his or her library.| +Dragonmaster Outcast|Battle for Zendikar|144|M|{R}|Creature - Human Shaman|1|1|At the beginning of your upkeep, if you control six or more lands, put a 5/5 red Dragon creature token with flying onto the battlefield.| +Firemantle Mage|Battle for Zendikar|145|U|{2}{R}|Creature - Human Shaman Ally|2|2|Rally — Whenver Firemantle Mage or another Ally enters the battlefield under your control, creatures you control gain menace until end of turn.| +Goblin War Paint|Battle for Zendikar|146|C|{1}{R}|Enchantment - Aura|||Enchant creature$Enchanted creature gets +2/+2 and has haste.| +Kozilek's Sentinel|Battle for Zendikar|129|C|{1}{R}|Creature - Eldrazi Drone|1|4|Devoid (This card has no color.)$Whenever you cast a colorless spell, Kozilek's Sentinel gets +1/+0 until end of turn.| +Lavastep Raider|Battle for Zendikar|147|C|{R}|Creature - Goblin Warrior|1|1|{2}{R}: Lavastep Raider gets +2/+0 until end of turn.| +Makindi Sliderunner|Battle for Zendikar|148|C|{1}{R}|Creature - Beast|2|1|Trample$Landfall — Whenever a land enters the battlefield under your control, Makindi Sliderunner gets +1/+1 until end of turn.| +Molten Nursery|Battle for Zendikar|130|U|{2}{R}|Enchantment|||Devoid (This card has no color.)$Whenever you cast a colorless spell, Molten Nursery deals 1 damage to target creature or player.| +Nettle Drone|Battle for Zendikar|131|C|{2}{R}|Creature - Eldrazi Drone|3|1|Devoid (This card has no color.)${t}: Nettle Drone deals 1 damage to each opponent.$Whenever you cast a colorless spell, untap Nettle Drone.| +Ondu Champion|Battle for Zendikar|149|C|{2}{R}{R}|Creature - Minotaur Warrior Ally|4|3|Rally — Whenever Ondu Champion or another Ally enters the battlefield under your control, creatures you control gain trample until end of turn.| +Outnumber|Battle for Zendikar|150|C|{R}|Instant|||Outnumber deals damage to target creature equal to the number of creatures you control.| +Processor Assault|Battle for Zendikar|132|U|{1}{R}|Sorcery|||Devoid (This card has no color.)$As an additional cost to cast Processor Assault, put a card an opponent owns from exile into its owner's graveyard.$Processor Assault deals 5 damage to target creature.| +Radiant Flames|Battle for Zendikar|151|R|{2}{R}|Sorcery|||Converge — Radiant Flames deals X damage to each creature, where X is the number of colors of mana spent to cast Radiant Flames.| +Reckless Cohort|Battle for Zendikar|152|C|{1}{R}|Creature - Human Warrior Ally|2|2|Reckless Cohort attacks each combat if able unless you control another Ally.| +Retreat to Valakut|Battle for Zendikar|153|U|{2}{R}|Enchantment|||Landfall — Whenever a land enters the battlefield under your control, choose one —$• Target creature gets +2/+0 until end of turn.$• Target creature can't block this turn.| Rolling Thunder|Battle for Zendikar|154|U|{X}{R}{R}|Sorcery|||Rolling Thunder deals X damage divided as you choose among any number of target creatures and/or players.| -Zada, Hedron Grinder|Battle for Zendikar|162|R|{3}{R}|Legendary Creature - Goblin Ally|3|3|Whenever you cast an instant or sorcery spell that targets only Zada, Hedron Grinder, copy that spell for each other creature you control that the spell could target. Each copy targets a different one of those creatures.| +Serpentine Spike|Battle for Zendikar|133|R|{5}{R}{R}|Sorcery|||Devoid (This card has no color.)$Serpentine Spike deals 2 damage to target creature, 3 damage to another target creature, and 4 damage to a third target creature. If a creature dealt damage this way would die this turn, exile it instead.| +Shatterskull Recruit|Battle for Zendikar|155|C|{3}{R}{R}|Creature - Giant Warrior Ally|4|4|Menace| +Stonefury|Battle for Zendikar|156|C|{3}{R}{R}|Instant|||Stonefury deals damage to target creature equal to the number of lands you control.| +Sure Strike|Battle for Zendikar|157|C|{1}{R}|Instant|||Target creature gets +3/+0 and gains first strike until end of turn.| +Touch of the Void|Battle for Zendikar|134|C|{2}{R}|Sorcery|||Devoid (This card has no color.)$Touch of the Void deals 3 damage to target creature or player. If a creature dealt damage this way would die this turn, exile it instead.| +Tunneling Geopede|Battle for Zendikar|158|U|{2}{R}|Creature - Insect|3|2|Landfall - Whenever a land enters the battlefield under your control, Tunneling Geopede deals 1 damage to each opponent.| +Turn Against|Battle for Zendikar|135|U|{4}{R}|Instant|||Devoid (This card has no color.)$Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn.| +Valakut Invoker|Battle for Zendikar|159|C|{2}{R}|Creature - Human Shaman|2|3|{8}: Valakut Invoker deals 3 damage to target creature or player.| +Valakut Predator|Battle for Zendikar|160|C|{2}{R}|Creature - Elemental|2|2|Landfall - Whenever a land enters the battlefield under your control, Valakut Predator gets +2/+2 until end of turn.| +Vestige of Emrakul|Battle for Zendikar|136|C|{3}{R}|Creature - Eldrazi Drone|3|4|Devoid (This card has no color.)$Trample| +Vile Aggregate|Battle for Zendikar|137|U|{2}{R}|Creature - Eldrazi Drone|0|5|Devoid (This card has no color.)$Vile Aggregate's power is equal to the number of colorless creatures you control.$Trample$Ingest (Whenever this creature deals combat damage to a player, that player exiles the top card of his or her library.)| +Volcanic Upheaval|Battle for Zendikar|161|C|{3}{R}|Instant|||Destroy target land.| +Zada, Hedron Grinder|Battle for Zendikar|162|R|{3}{R}|Legendary Creature - Goblin Ally|3|3|Whenever you cast an instant or sorcery spell that targets only Zada, Hedron Grinder, copy that spell for each other creature you control that the spell could target. Each copy targets a different one of those creatures.| +Beastcaller Savant|Battle for Zendikar|170|R|{1}{G}|Creature - Elf Shaman Ally|1|1|Haste${T}: Add one mana of any color to your mana pool. Spend this mana only to cast a creature spell.| +Blisterpod|Battle for Zendikar|163|C|{G}|Creature - Eldrazi Drone|1|1|Devoid (This card has no color.)$When Blisterpod dies, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool."| +Brood Monitor|Battle for Zendikar|164|U|{4}{G}{G}|Creature - Eldrazi Drone|3|3|Devoid (This card has no color.)$When Brood Monitor enters the battlefield, put three 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool."| +Broodhunter Wurm|Battle for Zendikar|171|C|{3}{G}|Creature - Wurm|4|3|| +Call the Scions|Battle for Zendikar|165|C|{2}{G}|Sorcery|||Devoid (This card has no color.)$Put two 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: add {1} to your mana pool."| +Earthen Arms|Battle for Zendikar|172|C|{1}{G}|Sorcery|||Put two +1/+1 counters on target permanent.$Awaken 4 - {6}{G} (If you cast this spell for {6}{G}, also put four +1/+1 counters on target land you control and it becomes a 0/0 Elemental creature with haste. It's still a land.)| +Eyeless Watcher|Battle for Zendikar|166|C|{3}{G}|Creature - Eldrazi Drone|1|1|Devoid (This card has no color.)$When Eyeless Watcher enters the battlefield, put two 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool."| From Beyond|Battle for Zendikar|167|R|{3}{G}|Enchantment|||Devoid (This card has no color.)$At the beginning of your upkeep, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool."${1}{G}, Sacrifice From Beyond: Search your library for an Eldrazi card, reveal it, put it into your hand, then shuffle your library.| -Greenwarden of Murasa|Battle for Zendikar|174|M|{4}{G}{G}|Creature - Elemental|5|4|When Greenwarden of Murasa enters the battlefield, you may return target card from your graveyard to your hand.$When Greenwarden of Murasa dies, you may exile it. If you do, return target card from your graveyard to your hand.| +Giant Mantis|Battle for Zendikar|173|C|{3}{G}|Creature - Insect|2|4|Reach (This creature can block creatures with flying.)| +Greenwarden of Murasa|Battle for Zendikar|174|M|{4}{G}{G}|Creature - Elemental|5|4|When Greenwarden of Murasa enters the battlefield, you may return target card from your graveyard to your hand.$When Greenwarden of Murasa dies, you may exile it. If you do, you may return target card from your graveyard to your hand.| +Infuse with the Elements|Battle for Zendikar|175|U|{3}{G}|Instant|||Converge - Put X +1/+1 counters on target creature, where X is the number of colors of mana spent to cast Infuse with the Elements. That creature gains trample until end of turn.| +Jaddi Offshoot|Battle for Zendikar|176|U|{G}|Creature - Plant|0|3|Defender$Landfall - Whenever a land enters the battlefield under your control, you gain 1 life.| +Lifespring Druid|Battle for Zendikar|177|C|{2}{G}|Creature - Elf Druid|2|1|{T}: Add one mana of any color to your mana pool.| +Murasa Ranger|Battle for Zendikar|178|U|{3}{G}|Creature - Human Warrior|3|3|Landfall - Whenever a land enters the battlefield under your control, you may pay {3}{G}. IF you do, put two +1/+1 counters on Murasa Ranger.| +Natural Connection|Battle for Zendikar|179|C|{2}{G}|Instant|||Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library.| Nissa's Renewal|Battle for Zendikar|180|R|{5}{G}|Sorcery|||Search your library for up to three basic land cards, put them onto the battlefield tapped, then shuffle your library. You gain 7 life.| -Oran-Rief Hydra|Battle for Zendikar|181|R|{4}{G}{G}|Creature - Hydra|5|5|Trample$Landfall - Whenever a land enters the battlefield under your control, put a +1/+1 counter on Oran-Rief Hydra. If that land is a Forest, put two +1/+1 counters on Oran-Rief Hydra instead.| -Retreat to Kazandu|Battle for Zendikar|186||U|{2}{G}|Enchantment|||Landfall-Whenever a land enters the battlefield under your control, choose one - Put a +1/+1 counter on target creature; or You gain 2 life.| -Scythe Leopard|Battle for Zendikar|188|U|{G}|Creature - Cat|1|1|Landfall-Whenever a land enters the battlefield under your control, Scythe Leopard gets +1/+1 until end of turn.| +Oran-Rief Hydra|Battle for Zendikar|181|R|{4}{G}{G}|Creature - Hydra|5|5|Trample$Landfall — Whenever a land enters the battlefield under your control, put a +1/+1 counter on Oran-Rief Hydra. If that land is a Forest, put two +1/+1 counters on Oran-Rief Hydra instead.| +Oran-Rief Invoker|Battle for Zendikar|182|C|{1}{G}|Creature - Human Shaman|2|2|{8}: Oran-Rief Invoker gets +5/+5 and gains trample until end of turn.| +Plated Crusher|Battle for Zendikar|183|U|{4}{G}{G}{G}|Creature - Beast|7|6|Trample, hexproof| +Plummet|Battle for Zendikar|184|C|{1}{G}|Instant|||Destroy target creature with flying.| +Reclaiming Vines|Battle for Zendikar|185|C|{2}{G}{G}|Sorcery|||Destroy target artifact, enchantment, or land.| +Retreat to Kazandu|Battle for Zendikar|186|U|{2}{G}|Enchantment|||Landfall — Whenever a land enters the battlefield under your control, choose one —$• Put a +1/+1 counter on target creature.$• You gain 2 life.| +Rot Shambler|Battle for Zendikar|187|U|{1}{G}|Creature - Fungus|1|1|Whenever another creature you control dies, put a +1/+1 counter on Rot Shambler.| +Scythe Leopard|Battle for Zendikar|188|U|{G}|Creature - Cat|1|1|Landfall — Whenever a land enters the battlefield under your control, Scythe Leopard gets +1/+1 until end of turn.| +Seek the Wilds|Battle for Zendikar|189|C|{1}{G}|Sorcery|||Look at the top four cards of your library. You may reveal a creature or land card from among them and put it into your hand. Put the rest on the bottom of your library in any order.| +Snapping Gnarlid|Battle for Zendikar|190|C|{1}{G}|Creature - Beast|2|2|Landfall — Whenever a land enters the battlefield under your control, Snapping Gnarlid gets +1/+1 until end of turn.| +Swell of Growth|Battle for Zendikar|191|C|{1}{G}|Instant|||Target creature gets +2/+2 until end of turn. You may put a land card from your hand onto the battlefield.| Sylvan Scrying|Battle for Zendikar|192|U|{1}{G}|Sorcery|||Search your library for a land card, reveal it, and put it into your hand. Then shuffle your library.| -Tajuru Warcaller|Battle for Zendikar|195|U|{3}{G}{G}|Creature - Elf Warrior Ally|2|1|Rally-Whenever Tajuru Warcaller or another Ally enters the battlefield under your control, creatures you control get +2/+2 until end of turn.| -Undergrowth Champion|Battle for Zendikar|197|M|{1}{G}{G}|Creature - Elemental|2|2|If damage would be dealt to Undergrowth Champion while it has a +1/+1 counter on it, prevent that damage and remove a +1/+1 counter from Undergrowth Champion.$Landfall-Whenever a land enters the battlefield under your control, put a +1/+1 counter on Undergrowth Champion.| +Tajuru Beastmaster|Battle for Zendikar|193|C|{5}{G}|Creature - Elf Warrior Ally|5|5|Rally - Whenever Tajuru Beastmaster or another Ally creature enters the battlefield under your control, creatures you control get +1/+1 until end of turn.| +Tajuru Stalwart|Battle for Zendikar|194|C|{2}{G}|Creature - Elf Scout Ally|0|1|Converge - Tajuru Stalwart enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it.| +Tajuru Warcaller|Battle for Zendikar|195|U|{3}{G}{G}|Creature - Elf Warrior Ally|2|1|Rally — Whenever Tajuru Warcaller or another Ally enters the battlefield under your control, creatures you control get +2/+2 until end of turn.| +Territorial Baloth|Battle for Zendikar|196|C|{4}{G}|Creature - Beast|4|4|Landfall - Whenever a land enters the battlefield under your control, Territorial Baloth gets +2/+2 until end of turn.| +Undergrowth Champion|Battle for Zendikar|197|M|{1}{G}{G}|Creature - Elemental|2|2|If damage would be dealt to Undergrowth Champion while it has a +1/+1 counter on it, prevent that damage and remove a +1/+1 counter from Undergrowth Champion.$Landfall — Whenever a land enters the battlefield under your control, put a +1/+1 counter on Undergrowth Champion.| +Unnatural Aggression|Battle for Zendikar|168|C|{2}{G}|Instant|||Devoid (This card has no color.)$Target creature you control fights target creature an opponent controls. If the creature an opponent controls would die this turn, exile it instead.| +Void Attendant|Battle for Zendikar|169|U|{2}{G}|Creature - Eldrazi Processor|2|3|Devoid (This card has no color.)${1}{G}, Put a card an opponent owns from exile into that player's graveyard: Put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool."| +Woodland Wanderer|Battle for Zendikar|198|R|{3}{G}|Creature - Elemental|2|2|Vigilance, trample$Converge — Woodland Wanderer enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it.| +Angelic Captain|Battle for Zendikar|208|R|{3}{R}{W}|Creature - Angel Ally|4|3|Flying$Whenever Angelic Captain attacks, it gets +1/+1 until end of turn for each other attacking Ally.| +Bring to Light|Battle for Zendikar|209|R|{3}{G}{U}|Sorcery|||Converge — Search your library for a creature, instant, or sorcery card with converted mana cost less than or equal to the number of colors of mana spent to cast Bring to Light, exile that card, then shuffle your library. You may cast that card without paying its mana cost.| Brood Butcher|Battle for Zendikar|199|R|{3}{B}{G}|Creature - Eldrazi Drone|3|3|Devoid (This card has no color.)$When Brood Butcher enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool."${B}{G}, Sacrifice a creature: Target creature gets -2/-2 until end of turn.| -Brutal Expulsion|Battle for Zendikar|200|R|{2}{U}{R}|Instant|||Devoid (This card has no color.)$Choose one or both - Return target spell or creature to its owner's hand; or Brutal Expulsion deals 2 damage to target creature or planeswalker. If that permanent would be put into a graveyard this turn, exile it instead.| -Catacomb Sifter|Battle for Zendikar|201|U|{1}{B}{G}|Creature - Eldrazi Drone|2|3|Devoid (This card has no color.)$When Catacomb Sifter enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool."$Whenever another creature you control dies, scry 1 (Look at the top card of your library. You may put that card on the bottom of your library.)| -Fathom Feeder|Battle for Zendikar|203|R|{U}{B}|Creature - Eldrazi Drone|1|1|Devoid (This card has no color.)$Deathtouch$Ingest Whenever this creature deals combat damage to a player, that player exiles the top card of his or her library.)${3}{U}{B}: Draw a card. Each opponent exiles the top card of his or her library.| -Forerunner of Slaughter|Battle for Zendikar|204|U|{B}{R}|Creature - Eldrazi Drone|3|2|Devoid (This card has no color.)${1}: Target colorless creature gains haste until end of turn.| -Herald of Kozilek|Battle for Zendikar|205|U|{1}{U}{R}|Creature - Eldrazi Drone|2|4|Devoid (This card has no color.)$Colorless spells you cast cost {1} less to cast.| -Ulamog's Nullifier|Battle for Zendikar|207|U|{2}{U}{B}|Creature - Eldrazi Processor|2|3|Devoid (This card has no color.)$Flash$Flying$When Ulamog's Nullifier enters the battlefield, you may put two cards your opponents own from exile into their owners' graveyards. If you do, counter target spell.| -Bring to Light|Battle for Zendikar|209|R|{3}{G}{U}|Sorcery|||Converge-Search your library for a creature, instant, or sorcery card with converted mana cost less than or equal to the number of colors of mana spent to cast Bring to Light, exile that card, then shuffle your library. You may cast that card without paying its mana cost.| +Brutal Expulsion|Battle for Zendikar|200|R|{2}{U}{R}|Instant|||Devoid (This card has no color.)$Choose one or both —$• Return target spell or creature to its owner's hand.$• Brutal Expulsion deals 2 damage to target creature or planeswalker. If that permanent would be put into a graveyard this turn, exile it instead.| +Catacomb Sifter|Battle for Zendikar|201|U|{1}{B}{G}|Creature - Eldrazi Drone|2|3|Devoid (This card has no color.)$When Catacomb Sifter enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: add {1} to your mana pool."$Whenever another creature you control dies, scry 1. (Look at the top card of your library. You may put that card on the bottom of your library.)| Drana's Emissary|Battle for Zendikar|210|U|{1}{W}{B}|Creature - Vampire Cleric Ally|2|2|Flying$At the beginning of your upkeep, each opponent loses 1 life and you gain 1 life.| -Grove Rumbler|Battle for Zendikar|211|U|{2}{R}{G}|Creature - Elemental|3|3|Trample$Landfall-Whenever a land enters the battlefield under your control, Grove Rumbler gets +2/+2 until end of turn.| -Grovetender Druids|Battle for Zendikar|212|U|{2}{G}{W}|Creature - Elf Druid Ally|3|3|Rally-Whenever Grovetender Druids or another Ally enters the battlefield under your control, you may pay {1}. If you do, put a 1/1 green Plant creature token onto the battlefield.| -Kiora, Master of the Depths|Battle for Zendikar|213|M|{2}{G}{U}|Planeswalker - Kiora|||+1: Untap up to one target creature and up to one target land.$-2: Reveal the top four cards of your library. You may put a creature card and/or a land card from among them into your hand. Put the rest into your graveyard.$-8: You get an emblem with "Whenever a creature enters the battlefield under your control, you may have it fight target creature." Then put three 8/8 blue Octopus creature tokens onto the battlefield.| -March from the Tomb|Battle for Zendikar|214|R|{3}{W}{B}|Sorcery|||Return any number of target Ally creature cards with total converted mana cost of 8 or less from your graveyard to the battlefield.| -Munda, Ambush Leader|Battle for Zendikar|215|R|{2}{R}{W}|Legendary Creature - Kor Ally|3|4|Haste$Rally-Whenever Munda, Ambush Leader or another Ally enters the battlefield under your control, you may look at the top four cards of your library. If you do, reveal any number of Ally cards from among them, then put those cards on top of your library in any order and the rest on the bottom in any order.| -Omnath, Locus of Rage|Battle for Zendikar|217|M|{3}{R}{R}{G}{G}|Legendary Creature - Elemental|5|5|Landfall - Whenever a land enters the battlefield under your control, put a 5/5 red and green Elemental creature token onto the battlefield.$Whenever Omnath, Locus of Rage or another Elemental you control dies, Omnath deals 3 damage to target creature or player.| -Resolute Blademaster|Battle for Zendikar|218|U|{3}{R}{W}|Creature - Human Soldier Ally|2|2|Rally-Whenever Resolute Blademaster or another Ally enters the battlefield under your control, creatures you control gain double strike until end of turn.| -Roil Spout|Battle for Zendikar|219|U|{1}{W}{U}|Sorcery|||Put target creature on top of its owner's library.$Awaken 4-{4}{W}{U} (If you cast this spell for {4}{W}{U}, also put four +1/+1 counters on target land you control and it becomes a 0/0 Elemental creature with haste. It's still a land.)| -Skyrider Elf|Battle for Zendikar|220|U|{X}{G}{U}|Creature - Elf Warrior Ally|0|0|Flying$Converge-Skyrider Elf enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it.| +Dust Stalker|Battle for Zendikar|202|R|{2}{B}{R}|Creature - Eldrazi|5|3|Devoid (This card has no color.)$Haste$At the beginning of each end step, if you control no other colorless creatures, return Dust Stalker to its owner's hand.| +Fathom Feeder|Battle for Zendikar|203|R|{U}{B}|Creature - Eldrazi Drone|1|1|Devoid (This creature has no color.)$Deathtouch$Ingest (Whenever this creature deals combat damage to a player, that player exiles the top card of his or her library.)${3}{U}{B}: Draw a card. Each opponent exiles the top card of his or her library.| +Forerunner of Slaughter|Battle for Zendikar|204|U|{B}{R}|Creature - Eldrazi Drone|3|2|Devoid (This card has no color.)${1}: Target colorless creature gains haste until end of turn.| +Grove Rumbler|Battle for Zendikar|211|U|{2}{R}{G}|Creature - Elemental|3|3|Trample$Landfall — Whenever a land enters the battlefield under your control, Grove Rumbler gets +2/+2 until end of turn.| +Grovetender Druids|Battle for Zendikar|212|U|{2}{G}{W}|Creature - Elf Druid Ally|3|3|Rally — Whenever Grovetender Druids or another Ally enters the battlefield under your control, you may pay {1}. If you do, put a 1/1 green Plant creature token onto the battlefield.| +Herald of Kozilek|Battle for Zendikar|205|U|{1}{U}{R}|Creature - Eldrazi Drone|2|4|Devoid (This card has no color.)$Colorless spells you cast cost {1} less.| +Kiora, Master of the Depths|Battle for Zendikar|213|M|{2}{G}{U}|Planeswalker - Kiora|4|+1: Untap up to one target creature and up to one target land.$-2: Reveal the top four cards of your library. You may put a creature card and/or a land card from among them into your hand. Put the rest into your graveyard.$-8: You get an emblem with "Whenever a creature enters the battlefield under your control, you may have it fight target creature." Then put three 8/8 blue Octopus creature tokens onto the battlefield under your control.| +March from the Tomb|Battle for Zendikar|214|R|{3}{W}{B}|Sorcery|||Return any number of target Ally creature cards with total converted mana cost 8 or less from your graveyard to the battlefield.| +Munda, Ambush Leader|Battle for Zendikar|215|R|{2}{R}{W}|Legendary Creature - Kor Ally|3|4|Haste$Rally — Whenever Munda, Ambush Leader or another Ally enters the battlefield under you control, you may look at the top four cards of your library. If you do, reveal any number of Ally cards from among them, then put those cards on top of your library in any order and the rest on the bottom in any order.| +Noyan Dar, Roil Shaper|Battle for Zendikar|216|R|{3}{W}{U}|Legendary Creature - Merfolk Ally|4|4|Whenever you cast an instant or sorcery spell, you may put three +1/+1 counters on target land you control. If you do, that land becomes a 0/0 Elemental creature with haste that's still a land.| +Omnath, Locus of Rage|Battle for Zendikar|217|M|{3}{R}{R}{G}{G}|Legendary Creature - Elemental|5|5|Landfall — Whenever a land enters the battlefield under your control, put a 5/5 red and green Elemental creature token onto the battlefield.$Whenever Omnath, Locus of Rage or another Elemental you control dies, Omnath deals 3 damage to target creature or player.| +Resolute Blademaster|Battle for Zendikar|218|U|{3}{R}{W}|Creature - Human Soldier Ally|2|2|Rally — Whenever Resolute Blademaster or another Ally enters the battlefield under your control, creatures you control gain double strike until end of turn.| +Roil Spout|Battle for Zendikar|219|U|{1}{W}{U}|Sorcery|||Put target creature on top of its owner's library.$Awaken 4—{4}{W}{U} (If you cast this spell for {4}{W}{U}, also put four +1/+1 counters on target land you control and it becomes a 0/0 Elemental creature with haste. It's still a land.)| +Sire of Stagnation|Battle for Zendikar|206|M|{4}{U}{B}|Creature - Eldrazi|5|7|Devoid (This card has no color.)$Whenever a land enters the battlefield under an opponent's control, that player exiles the top two cards of his or her library and you draw two cards.| +Skyrider Elf|Battle for Zendikar|220|U|{X}{G}{U}|Creature - Elf Warrior Ally|0|0|Flying$Converge — Skyrider Elf enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it.| +Ulamog's Nullifier|Battle for Zendikar|207|U|{2}{U}{B}|Creature - Eldrazi Processor|2|3|Devoid (This card has no color.)$Flash$Flying$When Ulamog's Nullifier enters the battlefield, you may put two cards your opponents own from exile into their owners' graveyards. If you do, counter target spell.| Veteran Warleader|Battle for Zendikar|221|R|{1}{G}{W}|Creature - Human Soldier Ally|0|0|Veteran Warleader's power and toughness are each equal to the number of creatures you control.$Tap another untapped Ally you control: Veteran Warleader gains your choice of first strike, vigilance, or trample until end of turn.| -Circle of Hedrons|Battle for Zendikar|222|R|{4}|Artifact|||When Circle of Hedrons enters the battlefield, exile all creatures with power 5 or greater until Circle of Hedrons leaves the battlefield.| -Hedron Archive|Battle for Zendikar|223|U|{4}|Artifact|||{T}: Add {2} to your mana pool.${2}, {T}, Sacrifice Hedron Archive: Draw two cards.| -Canopy Vista|Battle for Zendikar|234|R||Land - Forest Plains|||Canopy Vista enters the battlefield tapped unless you control two or more basic lands.| -Cinder Glade|Battle for Zendikar|235|R||Land - Mountain Forest|||Cinder Glade enters the battlefield tapped unless you control two or more basic lands.| +Aligned Hedron Network|Battle for Zendikar|222|R|{4}|Artifact|||When Aligned Hedron Network enters the battlefield, exile all creatures with power 5 or greater until Aligned Hedron Network leaves the battlefield. (Those creatures return under their owners' control.)| +Hedron Archive|Battle for Zendikar|223|U|{4}|Artifact|||{t}: Add {2} to your mana pool.${2}, {t}, Sacrifice Hedron Archive: Draw two cards.| +Hedron Blade|Battle for Zendikar|224|C|{1}|Artifact - Equipment|||Equipped creature gets +1/+1.$Whenever equipped creature becomes blocked by one or more colorless creatures, it gains deathtouch until end of turn. (Any amount of damage it deals to a creature is enough to destroy it.)$Equip {2} ({2}: Attach to target creature you control. Equip only as a sorcery.)| +Pathway Arrows|Battle for Zendikar|225|U|{1}|Artifact - Equipment|||Equipped creature has "{2}, {T}: This creature deals 1 damage to target creature. If a colorless creature is dealt damage this way, tap it."$Equip {2}| +Pilgrim's Eye|Battle for Zendikar|226|U|{3}|Artifact Creature - Thopter|1|1|Flying$When Pilgrim's Eye enters the battlefield, you may search your library for a basic land card, reveal it, put it into your hand, then shuffle your library.| +Slab Hammer|Battle for Zendikar|227|U|{2}|Artifact - Equipment|||Whenever equipped creature attacks, you may return a land you control to its owner's hand. If you do, the creature gets +2/+2 until end of turn.$Equip {2}| +Ally Encampment|Battle for Zendikar|228|R||Land|||{t}: Add {1} to your mana pool.${t}: Add one mana of any color to your mana pool. Spend this mana only to cast an Ally spell.${1}, {t}, Sacrifice Ally Encampment: Return an Ally you control to its owner's hand.| +Blighted Cataract|Battle for Zendikar|229|U||Land|||{T}: Add {1} to your mana pool.${5}{U}, {T}, Sacrifice Blighted Cataract: Draw 2 cards.| +Blighted Fen|Battle for Zendikar|230|U||Land|||{T}: Add {1} to your mana pool.${4}{B}, {T}, Sacrifice Blighted Fen: Target opponent sacrifices a creature.| +Blighted Gorge|Battle for Zendikar|231|U||Land|||{T}: Add {1} to your mana pool.${4}{R}, {T}, Sacrifice Blighted Gorge: Blighted Gorge deals 2 damage to target creature or player.| +Blighted Steppe|Battle for Zendikar|232|U||Land|||{T}: Add {1} to your mana pool.${3}{W}, {T}, Sacrifice Blighted Steppe: You gain 2 life for each creature you control.| +Blighted Woodland|Battle for Zendikar|233|U||Land|||{T}: Add {1} to your mana pool.${3}{G}, {T}, Sacrifice Blighted Woodland: Search your library for up to two basic land cards and put them onto the battlefield tapped. Then shuffle your library.| +Canopy Vista|Battle for Zendikar|234|R||Land - Forest Plains|||({T}: Add {G} or {W} to your mana pool.)$Canopy Vista enters the battlefield tapped unless you control two or more basic lands.| +Cinder Glade|Battle for Zendikar|235|R||Land - Mountain Forest|||({T}: Add {R} or {G} to your mana pool.)$Cinder Glade enters the battlefield tapped unless you control two or more basic lands.| Evolving Wilds|Battle for Zendikar|236|C||Land|||{T}, Sacrifice Evolving Wilds: Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library.| -Lumbering Falls|Battle for Zendikar|239|R||Land|||Lumbering Falls enters the battlefield tapped.${T}: Add {G} or {U} to your mana pool.${2}{G}{U}: Lumbering Falls becomes a 3/3 green and blue Elemental creature with hexproof until end of turn. It's still a land.| -Prairie Stream|Battle for Zendikar|241|R||Land - Plains Island|||Prairie Stream enters the battlefield tapped unless you control two or more basic lands.| -Shambling Vent|Battle for Zendikar|244|R||Land|||Shambling Vent enters the battlefield tapped.${T}: Add {W} or {B} to your mana pool.${1}{W}{B}: Shambling Vent becomes a 2/3 white and black Elemental creature with lifelink until end of turn. It's still a land.| -Shrine of the Forsaken Gods|Battle for Zendikar|245|R||Land|||{T}: Add {1} to your mana pool.${T}: Add {2} to your mana pool. Spend this mana only to cast colorless spells. Activate this ability only if you control seven or more lands.| -Smoldering Marsh|Battle for Zendikar|247|R||Land - Swamp Mountain|||Smoldering Marsh enters the battlefield tapped unless you control two or more basic lands.| -Sunken Hollow|Battle for Zendikar|248|R||Land - Island Swamp|||Sunken Hollow enters the battlefield tapped unless you control two or more basic lands.| -Plains|Battle for Zendikar|250|L||Basic Land - Forest|||W| -Plains|Battle for Zendikar|251|L||Basic Land - Forest|||W| -Plains|Battle for Zendikar|252|L||Basic Land - Forest|||W| -Plains|Battle for Zendikar|253|L||Basic Land - Forest|||W| -Plains|Battle for Zendikar|254|L||Basic Land - Forest|||W| -Island|Battle for Zendikar|255|L||Basic Land - Forest|||U| -Island|Battle for Zendikar|256|L||Basic Land - Forest|||U| -Island|Battle for Zendikar|257|L||Basic Land - Forest|||U| -Island|Battle for Zendikar|258|L||Basic Land - Forest|||U| -Island|Battle for Zendikar|259|L||Basic Land - Forest|||U| -Swamp|Battle for Zendikar|260|L||Basic Land - Forest|||B| -Swamp|Battle for Zendikar|261|L||Basic Land - Forest|||B| -Swamp|Battle for Zendikar|262|L||Basic Land - Forest|||B| -Swamp|Battle for Zendikar|263|L||Basic Land - Forest|||B| -Swamp|Battle for Zendikar|264|L||Basic Land - Forest|||B| -Mountain|Battle for Zendikar|265|L||Basic Land - Forest|||R| -Mountain|Battle for Zendikar|266|L||Basic Land - Forest|||R| -Mountain|Battle for Zendikar|267|L||Basic Land - Forest|||R| -Mountain|Battle for Zendikar|268|L||Basic Land - Forest|||R| -Mountain|Battle for Zendikar|269|L||Basic Land - Forest|||R| -Forest|Battle for Zendikar|270|L||Basic Land - Forest|||G| -Forest|Battle for Zendikar|271|L||Basic Land - Forest|||G| -Forest|Battle for Zendikar|272|L||Basic Land - Forest|||G| -Forest|Battle for Zendikar|273|L||Basic Land - Forest|||G| -Forest|Battle for Zendikar|274|L||Basic Land - Forest|||G| \ No newline at end of file +Fertile Thicket|Battle for Zendikar|237|C||Land|||Fertile Thicket enters the battlefield tapped.$When Fertile Thicket enters the battlefield, you may look at the top five cards of your library. If you do, reveal up to one basic land card from among them, then put that card on top of your library and the rest on the bottom in any order.${T}: Add {G} to your mana pool.| +Forest|Battle for Zendikar|273|L||Basic Land - Forest|||| +Forest|Battle for Zendikar|274|L||Basic Land - Forest|||| +Forest|Battle for Zendikar|272|L||Basic Land - Forest|||| +Forest|Battle for Zendikar|271|L||Basic Land - Forest|||| +Forest|Battle for Zendikar|270|L||Basic Land - Forest|||| +Island|Battle for Zendikar|258|L||Basic Land - Island|||({t}: Add {U} to yoru mana pool.)| +Island|Battle for Zendikar|259|L||Basic Land - Island|||({t}: Add {U} to your mana pool.)| +Island|Battle for Zendikar|256|L||Basic Land - Island|||({t}: Add {U} to your mana pool.)| +Island|Battle for Zendikar|257|L||Basic Land - Island|||({t}: Add {U} to your mana pool.)| +Island|Battle for Zendikar|255|L||Basic Land - Island|||({t}: Add {U} to your mana pool.)| +Looming Spires|Battle for Zendikar|238|C||Land|||Looming Spires enters the battlefield tapped.$When Looming Spires enters the battlefield, target creature gets +1/+1 and gains first strike until end of turn.${T}: Add {R} to your mana pool.| +Lumbering Falls|Battle for Zendikar|239|R||Land|||Lumbering falls enters the battlefield tapped.${t}: Add {G} or {U} to your mana pool.${2}{G}{U}: Lumbering Falls becomes a 3/3 green and blue Elemental creature with hexproof until end of turn. It's still a land.| +Mortuary Mire|Battle for Zendikar|240|C||Land|||Mortuary Mire enters the battlefield tapped.$When Mortuary Mire enters the battlefield, you may put target creature card from your graveyard on top of your library.${T}: Add {B} to your mana pool.| +Mountain|Battle for Zendikar|265|L||Basic Land - Mountain|||| +Mountain|Battle for Zendikar|266|L||Basic Land - Mountain|||| +Mountain|Battle for Zendikar|267|L||Basic Land - Mountain|||| +Mountain|Battle for Zendikar|269|L||Basic Land - Mountain|||| +Mountain|Battle for Zendikar|268|L||Basic Land - Mountain|||| +Plains|Battle for Zendikar|250|L||Basic Land - Plains|||({T}: Add {W} to your mana pool.)| +Plains|Battle for Zendikar|252|L||Basic Land - Plains|||({T}: Add {W} to your mana pool.)| +Plains|Battle for Zendikar|253|L||Basic Land - Plains|||({T}: Add {W} to your mana pool.)| +Plains|Battle for Zendikar|254|L||Basic Land - Plains|||({T}: Add {W} to your mana pool.)| +Plains|Battle for Zendikar|251|L||Basic Land - Plains|||({T}: Add {W} to your mana pool.)| +Prairie Stream|Battle for Zendikar|241|R||Land - Plains Island|||({T}: Add {W} or {U} to your mana pool.)$Prairie Stream enters the battlefield tapped unless you control two or more basic lands.| +Sanctum of Ugin|Battle for Zendikar|242|R||Land|||{T}: Add {1} to your mana pool.$Whenever you cast a colorless spell with converted mana cost 7 or greater, you may sacrifice Sanctum of Ugin. If you do, search your library for a colorless creature card, reveal it, put it into your hand, then shuffle your library.| +Sandstone Bridge|Battle for Zendikar|243|C||Land|||Sandstone Bridge enters the battlefield tapped.$When Sandstone Bridge enters the battlefield, target creature gets +1/+1 and gains vigilance until end of turn.${T}: Add {W} to your mana pool.| +Shambling Vent|Battle for Zendikar|244|R||Land|||Shambling Vent enters the battlefield tapped.${T}: Add {W} or {B} to your mana pool.${1}{W}{B}: Shambling Vent becomes a 2/3 white and black elemental creature with lifelink until end of turn. It's still a land.| +Shrine of the Forsaken Gods|Battle for Zendikar|245|R||Land|||{t}: Add {1} to your mana pool.${t}: Add {2} to your mana pool. Spend this mana only to cast colorless spells. Activate this ability only if you control seven or more lands.| +Skyline Cascade|Battle for Zendikar|246|C||Land|||Skyline Cascade enters the battlefield tapped.$When Skyline Cascade enters the battlefield, target creature an opponent controls doesn't untap during its controller's next untap step.${T}: Add {U} to your mana pool.| +Smoldering Marsh|Battle for Zendikar|247|R||Land - Swamp Mountain|||({T}: Add {B} or {R} to your mana pool.)$Smoldering Marsh enters the battlefield tapped unless you control two or more basic lands.| +Spawning Bed|Battle for Zendikar|248|U||Land|||{T}: Add {1} to your mana pool.${6}, {T}, Sacrifice Spawning Bed: Put three 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool."| +Sunken Hollow|Battle for Zendikar|249|R||Land - Island Swamp|||({T}: Add {U} or {B} to your mana pool.)$Sunken Hollow enters the battlefield tapped unless you control two or more basic lands.| +Swamp|Battle for Zendikar|263|L||Basic Land - Swamp|||({t}: Add {B} to your mana pool.)| +Swamp|Battle for Zendikar|262|L||Basic Land - Swamp|||({t}: Add {B} to your mana pool.)| +Swamp|Battle for Zendikar|264|L||Basic Land - Swamp|||({t}: Add {B} to your mana pool.)| +Swamp|Battle for Zendikar|260|L||Basic Land - Swamp|||({t}: Add {B} to your mana pool.)| +Swamp|Battle for Zendikar|261|L||Basic Land - Swamp|||({t}: Add {B} to your mana pool.)| diff --git a/Utils/mtg-sets-data.txt b/Utils/mtg-sets-data.txt index cec0f4dfbf2..83e479e4585 100644 --- a/Utils/mtg-sets-data.txt +++ b/Utils/mtg-sets-data.txt @@ -110,6 +110,7 @@ MTGO Vanguard|VGO| New Phyrexia|NPH| Ninth Edition|9ED| Nemesis|NMS| +Oath of the Gatewatch|OGW| Odyssey|ODY| Onslaught|ONS| Prophecy|PCY| @@ -160,4 +161,5 @@ Weatherlight|WTH| World Magic Cup Qualifier|WMCQ| Worldwake|WWK| WPN Gateway|GRC| -Zendikar|ZEN| \ No newline at end of file +Zendikar|ZEN| +Zendikar Expeditions|EXP| \ No newline at end of file diff --git a/Utils/release/getting_implemented_cards.txt b/Utils/release/getting_implemented_cards.txt index 444228c30bb..3a42aba4874 100644 --- a/Utils/release/getting_implemented_cards.txt +++ b/Utils/release/getting_implemented_cards.txt @@ -22,10 +22,16 @@ git log 23039572f2206ade860f5835e9b85e82a9c4b2a1..HEAD --diff-filter=A --name-st since 1.4.4.v0 -git log 0a458707ddaaa5e7e82ab06d17633084f67077c1..23039572f2206ade860f5835e9b85e82a9c4b2a1 --diff-filter=A --name-status | sed -ne "s/^A[^u]Mage.Sets\/src\/mage\/sets\///p" | sort > added_cards.txt +git log 0a458707ddaaa5e7e82ab06d17633084f67077c1..HEAD --diff-filter=A --name-status | sed -ne "s/^A[^u]Mage.Sets\/src\/mage\/sets\///p" | sort > added_cards.txt since 1.4.4.v3 -git log 3d8494edb5c0fddcb972758f7d983b8b66a9651e..0a458707ddaaa5e7e82ab06d17633084f67077c1 --diff-filter=A --name-status | sed -ne "s/^A[^u]Mage.Sets\/src\/mage\/sets\///p" | sort > added_cards.txt +git log 3d8494edb5c0fddcb972758f7d983b8b66a9651e..head --diff-filter=A --name-status | sed -ne "s/^A[^u]Mage.Sets\/src\/mage\/sets\///p" | sort > added_cards.txt + +since 1.4.4.v4 +git log 513a574ae98aff3d7820e5411a8e5f2a6506e69c..head --diff-filter=A --name-status | sed -ne "s/^A[^u]Mage.Sets\/src\/mage\/sets\///p" | sort > added_cards.txt + +since 1.4.4.v6 +git log 7650f53dee0b4d480d2a63befed72b6c8197e752..head --diff-filter=A --name-status | sed -ne "s/^A[^u]Mage.Sets\/src\/mage\/sets\///p" | sort > added_cards.txt 3. Copy added_cards.txt to trunk\Utils folder 4. Run script: